diff options
Diffstat (limited to 'clang/test/OpenMP/nvptx_target_exceptions_messages.cpp')
| -rw-r--r-- | clang/test/OpenMP/nvptx_target_exceptions_messages.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/clang/test/OpenMP/nvptx_target_exceptions_messages.cpp b/clang/test/OpenMP/nvptx_target_exceptions_messages.cpp index 15c9522540f..433ba13f73d 100644 --- a/clang/test/OpenMP/nvptx_target_exceptions_messages.cpp +++ b/clang/test/OpenMP/nvptx_target_exceptions_messages.cpp @@ -68,4 +68,17 @@ int baz2() { return 2 + baz3(); } +int baz1() { throw 1; } // expected-error {{cannot use 'throw' with exceptions disabled}} + +int foobar1(); +int foobar2(); + +int (*A)() = &foobar1; +#pragma omp declare target +int (*B)() = &foobar2; +#pragma omp end declare target + +int foobar1() { throw 1; } +int foobar2() { throw 1; } // expected-error {{cannot use 'throw' with exceptions disabled}} + #endif // HEADER |

