annotate gcc/testsuite/g++.dg/torture/pr64378.C @ 111:04ced10e8804

gcc 7
author kono
date Fri, 27 Oct 2017 22:46:09 +0900
parents
children 84e7813d76e9
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 {
kono
parents:
diff changeset
8 virtual int topf() {}
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 }