Debian Codegraph @

gcc/testsuite/g++.target/gcn/exceptions-bad_cast-2_-mfake-exceptions.C

raw
1 /* 'std::bad_cast' exception, caught, '-mfake-exceptions'. */
2
3 /* { dg-do run } */
4 /* Via the magic string "-std=*++" indicate that testing one (the default) C++ standard is sufficient. */
5 /* { dg-additional-options -fexceptions } */
6 /* { dg-additional-options -mfake-exceptions }
7 { dg-bogus {sorry, unimplemented: exception handling not supported} {} { target *-*-* } 0 } */
8 /* { dg-additional-options -fdump-tree-optimized-raw } */
9
10 #include "exceptions-bad_cast-2.C"
11
12 /* { dg-output {CheCKpOInT[\r\n]+} }
13
14 { dg-final { scan-tree-dump-times {gimple_call <__cxa_bad_cast, } 1 optimized } }
15 We don't print anything, but just 'abort'.
16
17 There is no 'catch'ing; any exception is fatal.
18 { dg-shouldfail {'std::bad_cast' exception} } */