Mercurial > hg > CbC > CbC_gcc
comparison gcc/testsuite/g++.dg/opt/pr95080.C @ 152:2b5abeee2509
update gcc11
author | anatofuz |
---|---|
date | Mon, 25 May 2020 07:50:57 +0900 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
145:1830386684a0 | 152:2b5abeee2509 |
---|---|
1 // PR debug/95080 | |
2 // { dg-do compile } | |
3 // { dg-options "-Og -fcse-follow-jumps -fnon-call-exceptions -fcompare-debug" } | |
4 | |
5 char *a; | |
6 | |
7 void baz (); | |
8 | |
9 static inline bool | |
10 bar () | |
11 { | |
12 int j = a[0] - 1; | |
13 switch (j) | |
14 { | |
15 case 0: | |
16 case 2: | |
17 return true; | |
18 default: | |
19 return false; | |
20 } | |
21 } | |
22 | |
23 static inline bool | |
24 foo () | |
25 { | |
26 if (bar ()) | |
27 baz (); | |
28 return 0; | |
29 } | |
30 | |
31 struct S | |
32 { | |
33 int h; | |
34 ~S (); | |
35 }; | |
36 | |
37 S::~S () | |
38 { | |
39 if (a[0] == 0) | |
40 foo () != h; | |
41 } |