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[] = "seh0055.c"; 9 int perfect; 10 11 LONG Echo(LONG Value) { return Value; } 12 13 int main() { 14 LONG Counter; 15 16 Counter = 0; 17 18 try { 19 try { 20 if (Echo(Counter) == Counter) { 21 Counter += 3; 22 leave; 23 24 } else { 25 Counter += 100; 26 } 27 } 28 finally { 29 if (abnormal_termination() == FALSE) { 30 Counter += 5; 31 leave; 32 } 33 } 34 endtry 35 36 Counter += 100; 37 } 38 finally { 39 if (abnormal_termination() == FALSE) { 40 Counter += 5; 41 } 42 } 43 endtry 44 45 if (Counter != 13) { 46 printf("TEST 55 FAILED, Counter = %d\n", Counter); 47 return -1; 48 } 49 50 return 0; 51 } 52