Debian Codegraph @

libgomp/testsuite/libgomp.c++/target-exceptions-throw-1.C

raw
1 /* 'throw' in OpenMP 'target' region. */
2
3 /* { dg-require-effective-target exceptions }
4 { dg-additional-options -fexceptions } */
5 /* { dg-additional-options -fdump-tree-optimized-raw }
6 { dg-additional-options -foffload-options=-fdump-tree-optimized-raw } */
7
8 #include "../libgomp.oacc-c++/exceptions-throw-1.C"
9
10 /* { dg-output {CheCKpOInT[\r\n]+} }
11
12 { dg-final { scan-tree-dump-times {gimple_call <__cxa_allocate_exception, } 1 optimized } }
13 { dg-final { scan-tree-dump-times {gimple_call <__cxa_throw, } 1 optimized } }
14 { dg-final { scan-offload-tree-dump-times {gimple_call <__cxa_allocate_exception, } 1 optimized } }
15 { dg-final { scan-offload-tree-dump-times {gimple_call <__cxa_throw, } 1 optimized } }
16 For host execution, we print something like:
17 terminate called after throwing an instance of 'MyException'
18 Aborted (core dumped)
19 { dg-output {.*MyException} { target { ! offload_device } } }
20 For GCN, nvptx offload execution, we don't print anything, but just 'abort'.
21
22 { dg-shouldfail {'MyException' exception} } */