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[] = "seh0057.c";
9 int perfect;
10 
11 int main() {
12   LONG Counter;
13 
14   Counter = 0;
15 
16   try {
17     Counter += 1;
18   }
19   finally {
20     if (abnormal_termination() == FALSE) {
21       try {
22         Counter += 3;
23       }
24       finally {
25         if (abnormal_termination() == FALSE) {
26           Counter += 5;
27         }
28       }
29       endtry
30     }
31   }
32   endtry
33 
34   if (Counter != 9) {
35     printf("TEST 57 FAILED, Counter = %d\n", Counter);
36     return -1;
37   }
38 
39   return 0;
40 }
41