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

--- Comment #2 from janus at gcc dot gnu.org 2010-12-29 22:44:26 UTC ---
While reducing the test case I noticed that the following invalid code triggers
an ICE:


  type :: t0
  end type
  class(t0) :: x
  allocate(x)
  end


Backtrace:

Program received signal SIGSEGV, Segmentation fault.
0x0000000000520e06 in gfc_match_varspec (primary=0x1939130, equiv_flag=0,
sub_flag=0 '\000', ppc_arg=0 '\000') at
/home/jweil/gcc46/trunk/gcc/fortran/primary.c:1777
1777          || (sym->ts.type == BT_CLASS && CLASS_DATA
(sym)->attr.dimension))
(gdb) bt
#0  0x0000000000520e06 in gfc_match_varspec (primary=0x1939130, equiv_flag=0,
sub_flag=0 '\000', ppc_arg=0 '\000') at
/home/jweil/gcc46/trunk/gcc/fortran/primary.c:1777
#1  0x0000000000523b56 in match_variable (result=0x192eb80, equiv_flag=0,
host_flag=1) at /home/jweil/gcc46/trunk/gcc/fortran/primary.c:3104
#2  0x0000000000523bac in gfc_match_variable (result=0x192eb80, equiv_flag=0)
at /home/jweil/gcc46/trunk/gcc/fortran/primary.c:3119
#3  0x0000000000503697 in gfc_match_allocate () at
/home/jweil/gcc46/trunk/gcc/fortran/match.c:2908

Reply via email to