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 char test[] = "SEH0017.c"; 9 int perfect; 10 11 int main() { 12 13 LONG Counter; 14 15 Counter = 0; 16 17 try { 18 try { 19 /* set counter = 1 */ 20 Counter += 1; 21 } 22 finally { 23 /* set counter = 2 */ 24 Counter += 1; 25 #if defined(_MSC_VER) && !defined(__clang__) 26 goto t12; /* can't jump into a try/finally */ 27 #endif 28 } 29 endtry 30 31 t12: 32 ; 33 } 34 finally { 35 /* set counter = 3 */ 36 Counter += 1; 37 } 38 endtry 39 40 if (Counter != 3) { 41 printf("TEST 17 FAILED. Counter = %d\n\r", Counter); 42 return -1; 43 } 44 45 return 0; 46 } 47