------- Comment #7 from fxcoudert at gcc dot gnu dot org  2009-03-28 12:07 
-------
This is a reduced test case, confirmed the ICE on x86_64-linux, both -m32 and
-m64 with gfortran 4.3.2:

module m
  integer :: n 
contains
  subroutine AC_reorder
    integer :: p
    !$OMP PARALLEL DEFAULT(private)
    !$OMP DO
    do p = 1, n
    enddo
    !$OMP END DO
    !$OMP END PARALLEL 
  contains
    subroutine insert_coef
    end subroutine insert_coef
  end subroutine AC_reorder
end module m

It works with the 4.4 branch and trunk at both -m32 and -m64. The backtrace for
the 4.3.2 segfault is:

#0  get_frame_type (info=0x0) at ../../gcc-4.3.2/gcc/tree-nested.c:198
#1  0x000000000066d0f8 in get_chain_decl (info=0x1504e4c0)
    at ../../gcc-4.3.2/gcc/tree-nested.c:304
#2  0x000000000066e12d in get_nonlocal_debug_decl (info=0x1504e4c0, 
    decl=0x2acef1a6baa0) at ../../gcc-4.3.2/gcc/tree-nested.c:904
#3  0x000000000066f986 in convert_nonlocal_omp_clauses (
    pclauses=<value optimized out>, wi=0x7fffbc6d6e50)
    at ../../gcc-4.3.2/gcc/tree-nested.c:1181
#4  0x000000000066f6a8 in convert_nonlocal_reference (
    tp=<value optimized out>, walk_subtrees=<value optimized out>, 
    data=<value optimized out>) at ../../gcc-4.3.2/gcc/tree-nested.c:1099
#5  0x000000000072e5d7 in walk_tree_1 (tp=0x2acef1a587d0, 
    func=0x66f440 <convert_nonlocal_reference>, data=0x7fffbc6d6e50, pset=0x0, 
    lh=0) at ../../gcc-4.3.2/gcc/tree.c:8415
#6  0x000000000066e5ca in walk_stmts (wi=0x7fffbc6d6e50, tp=0x2acef1a587d0)
    at ../../gcc-4.3.2/gcc/tree-nested.c:640
#7  0x000000000066e774 in walk_stmts (wi=0x7fffbc6d6e50, 
    tp=<value optimized out>) at ../../gcc-4.3.2/gcc/tree-nested.c:575
#8  0x000000000066e61c in walk_stmts (wi=0x7fffbc6d6e50, tp=0x2acef1a70098)
    at ../../gcc-4.3.2/gcc/tree-nested.c:594
#9  0x000000000066e81b in walk_body (callback=<value optimized out>, 
    info=<value optimized out>, stmt_p=0x0)
    at ../../gcc-4.3.2/gcc/tree-nested.c:657

which shows that it is a duplicate of PR36632.

To Richard: as a conclusion, it's fixed for 4.4 and will likely not be fixed on
the 4.3.x series, so your best bet is to update to 4.4.0 when it comes out,
which should be soon (a matter of days or few weeks).

*** This bug has been marked as a duplicate of 36632 ***


-- 

fxcoudert at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
  GCC build triplet|see description below       |
   GCC host triplet|see description below       |
 GCC target triplet|see description below       |
           Keywords|                            |ice-on-valid-code
      Known to fail|                            |4.3.2
      Known to work|                            |4.4.0 4.5.0
         Resolution|                            |DUPLICATE
            Summary|compiler Segmentation fault |[4.3 only] ICE on valid
                   |                            |OpenMP code


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37644

Reply via email to