Debian Codegraph @

libgomp/testsuite/libgomp.oacc-c++/exceptions-bad_cast-2-offload-sorry-GCN.C

raw
1 /* 'std::bad_cast' exception in OpenACC compute region, caught, '-foffload-options=-mno-fake-exceptions'. */
2
3 /* As this test case involves an expected offload compilation failure, we have to handle each offload target individually.
4 { dg-do link { target openacc_radeon_accel_selected } } */
5 /* { dg-require-effective-target exceptions }
6 { dg-additional-options -fexceptions } */
7 /* { dg-additional-options -foffload-options=-mno-fake-exceptions } */
8 /* { dg-additional-options -fdump-tree-optimized-raw }
9 { dg-additional-options -foffload-options=-fdump-tree-optimized-raw } */
10
11 #include "exceptions-bad_cast-2.C"
12
13 /* { dg-final { scan-tree-dump-times {gimple_call <__cxa_bad_cast, } 1 optimized } }
14 { dg-final { only_for_offload_target amdgcn-amdhsa scan-offload-tree-dump-times {gimple_call <__cxa_bad_cast, } 1 optimized } }
15 Given '-foffload-options=-mno-fake-exceptions', offload compilation fails:
16 { dg-regexp {[^\r\n]+: In function 'main[^']+':[\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.)
18 { dg-excess-errors {'mkoffload' failure etc.} } */