Debian Codegraph @

gcc/testsuite/g++.target/nvptx/exceptions-pr118794-1.C

raw
1 /* Exception handling constructs in dead code. */
2
3 /* Via the magic string "-std=*++" indicate that testing one (the default) C++ standard is sufficient. */
4 /* { dg-additional-options -fexceptions } */
5 /* { dg-additional-options -mno-fake-exceptions } */
6 /* { dg-additional-options -O0 } */
7 /* { dg-additional-options -fdump-tree-optimized-raw } */
8
9 #include "../../../../libgomp/testsuite/libgomp.c++/target-exceptions-pr118794-1.C"
10
11 /* In this specific C++ arrangement, distilled from PR118794, GCC synthesizes
12 '__builtin_eh_pointer', '__builtin_unwind_resume' calls as dead code in 'f':
13 { dg-final { scan-tree-dump-times {gimple_call <__builtin_eh_pointer, } 1 optimized } }
14 { dg-final { scan-tree-dump-times {gimple_call <__builtin_unwind_resume, } 1 optimized } }
15 Given '-O0', compilation fails:
16 { dg-regexp {[^\r\n]+: In function 'void f\(\)':[\r\n]+(?:[^\r\n]+: sorry, unimplemented: exception handling not supported[\r\n]+)+} }
17 (Note, using 'dg-regexp' instead of 'dg-message', as the former runs before the auto-mark-UNSUPPORTED.) */