| 1 |
/* 'throw' in OpenMP 'target' region, caught. */ |
| 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-2.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 |
{ dg-output {.*caught 'MyException'[\r\n]+} { target { ! offload_device } } } |
| 17 |
For GCN, nvptx offload execution, we don't print anything, but just 'abort'. |
| 18 |
|
| 19 |
For GCN, nvptx offload execution, there is no 'catch'ing; any exception is fatal. |
| 20 |
{ dg-shouldfail {'MyException' exception} { offload_device } } */ |