This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug fortran/29565] [4.1/4.2 Regression] ICE in gimplify_var_or_parm_decl, at gimplify.c



------- Comment #4 from fxcoudert at gcc dot gnu dot org  2006-10-23 17:11 -------
Further reduced testcase, confirmed on ppc-darwin:

  type element_t
    integer :: gid
  end type element_t

  type(element_t) :: element(1)
   call hash_read_key(element%gid)
   call hash_read_key(element%gid)
   call hash_read_key(element%gid)
contains
  subroutine hash_read_key(key)
    integer, intent(out) :: key(1)
  end subroutine hash_read_key
end


I'll also note that the following slightly modified testcase segfaults:

  type element_t
    integer :: gid
  end type element_t

contains
  subroutine hash_read_key(key)
    integer, intent(out) :: key(1)
  end subroutine hash_read_key

  type(element_t) :: element(1)
   call hash_read_key(element%gid)
   call hash_read_key(element%gid)
   call hash_read_key(element%gid)
end

Program received signal SIGSEGV, Segmentation fault.
0x0805b323 in variable_decl (elem=Variable "elem" is not available.
) at ../../../trunk/gcc/fortran/decl.c:1424
1424      if (current_ts.type == BT_DERIVED
(gdb) where
#0  0x0805b323 in variable_decl (elem=Variable "elem" is not available.
)
    at ../../../trunk/gcc/fortran/decl.c:1424
#1  0x0805bcbc in gfc_match_data_decl ()
    at ../../../trunk/gcc/fortran/decl.c:3381
#2  0x0808716a in match_word (str=Variable "str" is not available.
) at ../../../trunk/gcc/fortran/parse.c:66
#3  0x0808770d in decode_statement () at ../../../trunk/gcc/fortran/parse.c:135
#4  0x0808809e in next_statement () at ../../../trunk/gcc/fortran/parse.c:499
#5  0x0808a3cd in parse_contained (module=0)
    at ../../../trunk/gcc/fortran/parse.c:2796


-- 

fxcoudert at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Last reconfirmed|2006-10-23 15:58:29         |2006-10-23 17:11:08
               date|                            |


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]