Mercurial > hg > CbC > CbC_gcc
annotate gcc/testsuite/g++.dg/opt/pr20991.C @ 131:84e7813d76e9
gcc-8.2
author | mir3636 |
---|---|
date | Thu, 25 Oct 2018 07:37:49 +0900 |
parents | 04ced10e8804 |
children |
rev | line source |
---|---|
111 | 1 // PR middle-end/20991 |
2 // { dg-options "-O2" } | |
3 // { dg-do compile } | |
4 | |
5 struct S | |
6 { | |
7 virtual inline int foo () const; | |
8 virtual inline bool bar () const; | |
9 virtual int baz (int) const; | |
10 }; | |
11 | |
12 inline int S::foo () const | |
13 { | |
14 return 1; | |
15 } | |
16 | |
17 inline bool S::bar () const | |
18 { | |
19 return foo () == 0; | |
20 } | |
21 | |
22 void A () | |
23 { | |
24 S s; | |
25 if (s.bar ()) | |
26 s.foo (); | |
27 } | |
28 | |
29 void B () | |
30 { | |
31 S s; | |
32 if (s.bar ()) | |
33 s.foo (); | |
34 } |