diff options
author | Jakub Jelinek <jakub@redhat.com> | 2006-11-24 22:28:38 +0100 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2006-11-24 22:28:38 +0100 |
commit | 5c386a95ee20b9bb8f705ed1f8394ca7b4bafa7d (patch) | |
tree | 36c8035a96cc911760ed8fd295e9fcba32d8a983 /gcc/c-parser.c | |
parent | 238564598bce2cc56d65382076806f3ca73af4de (diff) | |
download | gcc-5c386a95ee20b9bb8f705ed1f8394ca7b4bafa7d.zip gcc-5c386a95ee20b9bb8f705ed1f8394ca7b4bafa7d.tar.gz gcc-5c386a95ee20b9bb8f705ed1f8394ca7b4bafa7d.tar.bz2 |
re PR c/29955 (ICE with -fopenmp -fexceptions)
PR c/29955
* c-tree.h (c_maybe_initialize_eh): New prototype.
* c-decl.c (finish_decl): Move EH initialization...
(c_maybe_initialize_eh): ... here. New function.
* c-parser.c (c_parser_omp_construct): Call c_maybe_initialize_eh
if not #pragma omp atomic.
* gcc.dg/gomp/pr29955.c: New test.
From-SVN: r119168
Diffstat (limited to 'gcc/c-parser.c')
-rw-r--r-- | gcc/c-parser.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/gcc/c-parser.c b/gcc/c-parser.c index 8520253..c6be639 100644 --- a/gcc/c-parser.c +++ b/gcc/c-parser.c @@ -7755,6 +7755,12 @@ c_parser_omp_construct (c_parser *parser) p_kind = c_parser_peek_token (parser)->pragma_kind; c_parser_consume_pragma (parser); + /* For all constructs below except #pragma omp atomic + MUST_NOT_THROW catch handlers are needed when exceptions + are enabled. */ + if (p_kind != PRAGMA_OMP_ATOMIC) + c_maybe_initialize_eh (); + switch (p_kind) { case PRAGMA_OMP_ATOMIC: |