annotate gcc/testsuite/g++.dg/tree-ssa/pr94224.C @ 19:2b5abeee2509 default tip

update gcc11
author anatofuz
date Mon, 25 May 2020 07:50:57 +0900
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
19
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
1 // PR tree-optimization/94224
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
2 // { dg-do compile }
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
3 // { dg-options "-O2 -fnon-call-exceptions -Wno-return-type" }
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
4
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
5 void foo (int, int, long);
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
6
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
7 static inline int
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
8 bar (int &x)
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
9 {
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
10 x = 0;
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
11 }
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
12
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
13 struct U
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
14 {
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
15 int n, p;
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
16 long q;
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
17 bool *z;
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
18 int a;
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
19 U () : n (), z (), a (1) {}
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
20 ~U () { if (n) foo (p, n, q); }
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
21 void baz () { bar (a); }
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
22 };
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
23
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
24 struct W
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
25 {
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
26 U w[2];
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
27 W () { w[0].baz (); }
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
28 };
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
29
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
30 void
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
31 qux ()
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
32 {
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
33 new W;
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
34 }