annotate gcc/testsuite/g++.dg/torture/pr64378.C @ 131:84e7813d76e9

gcc-8.2
author mir3636
date Thu, 25 Oct 2018 07:37:49 +0900
parents 04ced10e8804
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
111
kono
parents:
diff changeset
1 // { dg-do compile }
kono
parents:
diff changeset
2 // { dg-options "-fno-ipa-cp" }
kono
parents:
diff changeset
3 struct data {
kono
parents:
diff changeset
4 data(int) {}
kono
parents:
diff changeset
5 };
kono
parents:
diff changeset
6
kono
parents:
diff changeset
7 struct top {
131
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
8 virtual int topf() { return 0; }
111
kono
parents:
diff changeset
9 };
kono
parents:
diff changeset
10
kono
parents:
diff changeset
11 struct child1: top {
kono
parents:
diff changeset
12 void childf()
kono
parents:
diff changeset
13 {
kono
parents:
diff changeset
14 data d(topf());
kono
parents:
diff changeset
15 }
kono
parents:
diff changeset
16 };
kono
parents:
diff changeset
17
kono
parents:
diff changeset
18 void test(top *t)
kono
parents:
diff changeset
19 {
kono
parents:
diff changeset
20 child1 *c = static_cast<child1 *>(t);
kono
parents:
diff changeset
21 c->childf();
kono
parents:
diff changeset
22 child1 d;
kono
parents:
diff changeset
23 test(&d);
kono
parents:
diff changeset
24 }