Debian Codegraph @

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

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