Debian Codegraph @

gcc/testsuite/g++.target/nvptx/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 /* { dg-bogus {_ZTISt8bad_cast} PR119734 { xfail *-*-* } 0 } */
10
11 #include "exceptions-bad_cast-2.C"
12
13 /* { dg-output {CheCKpOInT[\r\n]+} }
14
15 { dg-final { scan-tree-dump-times {gimple_call <__cxa_bad_cast, } 1 optimized } }
16 We don't print anything, but just 'abort'.
17
18 There is no 'catch'ing; any exception is fatal.
19 { dg-shouldfail {'std::bad_cast' exception} } */