diff options
author | Jakub Jelinek <jakub@redhat.com> | 2008-07-07 17:26:35 +0200 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2008-07-07 17:26:35 +0200 |
commit | 77092cda69052ab6d1eca621173e76040266e5d9 (patch) | |
tree | 3d161ccfa760f683cb46e4b2516936e429548555 /gcc/fortran/f95-lang.c | |
parent | 115340c79fdd40c3b8c809ef81a1deebec0a2500 (diff) | |
download | gcc-77092cda69052ab6d1eca621173e76040266e5d9.tar.gz |
re PR middle-end/36726 (ICE in move_stmt_r, at tree-cfg.c:5699 with -fopenmp)
PR middle-end/36726
* f95-lang.c (poplevel): Don't ever add subblocks to
global_binding_level.
* gfortran.dg/gomp/pr36726.f90: New test.
From-SVN: r137572
Diffstat (limited to 'gcc/fortran/f95-lang.c')
-rw-r--r-- | gcc/fortran/f95-lang.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/gcc/fortran/f95-lang.c b/gcc/fortran/f95-lang.c index 794cc41a2d0..9dfb4233210 100644 --- a/gcc/fortran/f95-lang.c +++ b/gcc/fortran/f95-lang.c @@ -435,6 +435,10 @@ poplevel (int keep, int reverse, int functionbody) DECL_INITIAL (current_function_decl) = block_node; BLOCK_VARS (block_node) = 0; } + else if (current_binding_level == global_binding_level) + /* When using gfc_start_block/gfc_finish_block from middle-end hooks, + don't add newly created BLOCKs as sublocks of global_binding_level. */ + ; else if (block_node) { current_binding_level->blocks |