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