Debian Codegraph @

gcc/testsuite/g++.dg/opt/pr71210-1.C

raw
1 // PR c++/71210
2 // { dg-do compile }
3 // { dg-options "-O2" }
4
5 #include <typeinfo>
6
7 void f1 (const std::type_info&) __attribute__((noreturn));
8 struct S1 { ~S1 (); };
9 struct S2
10 {
11 virtual S1 f2 () const { f1 (typeid (*this)); }
12 S1 f3 () const { return f2 (); }
13 };
14 void f4 () { S2 a; a.f3 (); }