Mercurial > hg > CbC > CbC_gcc
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 |
rev | line source |
---|---|
111 | 1 // { dg-do compile } |
2 // { dg-options "-fno-ipa-cp" } | |
3 struct data { | |
4 data(int) {} | |
5 }; | |
6 | |
7 struct top { | |
131 | 8 virtual int topf() { return 0; } |
111 | 9 }; |
10 | |
11 struct child1: top { | |
12 void childf() | |
13 { | |
14 data d(topf()); | |
15 } | |
16 }; | |
17 | |
18 void test(top *t) | |
19 { | |
20 child1 *c = static_cast<child1 *>(t); | |
21 c->childf(); | |
22 child1 d; | |
23 test(&d); | |
24 } |