Mercurial > hg > CbC > CbC_gcc
annotate gcc/testsuite/g++.dg/opt/rtti2.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 "-O2" } | |
3 // We used to ICE in compare_values as the types for a comparison | |
4 // were not the same kind of types. | |
5 | |
6 struct class1 | |
7 { | |
8 virtual ~class1 (); | |
9 }; | |
10 struct class2 : class1 { }; | |
11 | |
12 void f(class1 * oo) | |
13 { | |
14 class2 * oj = dynamic_cast <class2 *>(oo) ; | |
15 if (oj) | |
16 delete oo; | |
17 } |