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