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[] = "SEH0001.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() == 0) {
21       Counter += 1;
22     }
23   }
24   endtry
25 
26   if (Counter != 2) {
27     printf("TEST 1 FAILED.  Counter = %d\n\r", Counter);
28     return -1;
29   }
30   return 0;
31 }
32