1 // Copyright (c) Microsoft. All rights reserved. 2 // Licensed under the MIT license. See LICENSE file in the project root for 3 // full license information. 4 5 #include <windows.h> 6 #include "seh.h" 7 8 #define faill() 9 #define startest() 10 #define finish() 11 12 char test[] = "SEH0034.c"; 13 int perfect; 14 15 int main() { 16 ULONG Index1; 17 LONG Counter; 18 19 startest(); 20 21 Counter = 0; 22 23 for (Index1 = 0; Index1 < 10; Index1 += 1) { 24 try { 25 if ((Index1 & 0x1) == 0) { 26 /* add 1 to counter if Index1 is odd */ 27 Counter += 1; 28 } 29 } 30 finally { 31 /* add 2 to counter always */ 32 Counter += 2; 33 #if defined(_MSC_VER) && !defined(__clang__) 34 continue; 35 #endif 36 } 37 endtry 38 /* never gets executed due to continue in finally */ 39 Counter += 4; 40 } 41 42 if (Counter != 25) { 43 printf("TEST 34 FAILED. Counter = %d\n\r", Counter); 44 return -1; 45 } 46 47 return 0; 48 } 49