Debian Codegraph @

gcc/testsuite/g++.dg/abi/arm_rtti1.C

raw
1 // { dg-do compile { target arm_eabi } }
2 // { dg-options "-O2" }
3 // Check that, even when optimizing, we emit an out-of-line call to
4 // the type-info comparison function.
5 // { dg-final { scan-assembler _ZNKSt9type_infoeqERKS_ { target { ! c++26 } } } }
6 // { dg-final { scan-assembler _ZNKSt9type_info7__equalERKS_ { target { c++26 } } } }
7
8 #include <typeinfo>
9
10 extern const std::type_info& t1;
11 extern const std::type_info& t2;
12
13 bool f() {
14 return t1 == t2;
15 }