]> git.ipfire.org Git - thirdparty/gcc.git/blob - gcc/testsuite/gcc.dg/torture/pr57147-1.c
re PR middle-end/57147 (setjmp call and if body wrongly elided (function runs off...
[thirdparty/gcc.git] / gcc / testsuite / gcc.dg / torture / pr57147-1.c
1 /* { dg-do compile } */
2 /* { dg-options "-fdump-tree-optimized" } */
3 /* { dg-skip-if "" { *-*-* } { "-fno-fat-lto-objects" } { "" } } */
4
5 struct __jmp_buf_tag {};
6 typedef struct __jmp_buf_tag jmp_buf[1];
7 extern int _setjmp (struct __jmp_buf_tag __env[1]);
8
9 jmp_buf g_return_jmp_buf;
10
11 void SetNaClSwitchExpectations (void)
12 {
13 }
14 void TestSyscall(void)
15 {
16 SetNaClSwitchExpectations();
17 _setjmp (g_return_jmp_buf);
18 }
19
20 /* { dg-final { scan-tree-dump-not "builtin_unreachable" "optimized" } } */
21 /* { dg-final { cleanup-tree-dump "optimized" } } */