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



Dominique d'Humieres <dominiq at lps dot ens.fr> changed:



           What    |Removed                     |Added

----------------------------------------------------------------------------

             Status|UNCONFIRMED                 |NEW

   Last reconfirmed|                            |2013-04-06

            Summary|ICE on invalid: "Bad array  |[4.6/4.7/4.8/4.9

                   |reference" for an           |Regression] ICE on invalid:

                   |undeclared loop variable    |"Bad array reference" for

                   |                            |an undeclared loop variable

     Ever Confirmed|0                           |1



--- Comment #1 from Dominique d'Humieres <dominiq at lps dot ens.fr> 2013-04-06 
09:33:10 UTC ---

Confirmed. Revision 164285 (2010-09-14) gives the error



pr56852.f90:5.14:



  read(0) (a(i),i=1,4)

              1

Error: Symbol 'i' at (1) has no IMPLICIT type



without ICE. Revision 164728 (2010-09-29) gives the same error plus the ICE



program test

            1

Internal Error at (1):

gfc_variable_attr(): Bad array reference



Backtrace for revision 197238



#0  gfc_variable_attr (expr=0x141a141d0, ts=0x0) at

../../_clean/gcc/fortran/primary.c:2135

#1  0x00000001000863b0 in gfc_expr_attr (e=<value optimized out>) at

../../_clean/gcc/fortran/primary.c:2267

#2  0x000000010003c5f9 in gfc_check_vardef_context (e=0x141a141d0,

pointer=false, alloc_obj=<value optimized out>, own_scope=<value optimized

out>, 

    context=0x100b3949f "item in READ") at ../../_clean/gcc/fortran/expr.c:4706

#3  0x000000010009cc2d in resolve_code (code=<value optimized out>, ns=<value

optimized out>) at ../../_clean/gcc/fortran/resolve.c:8150

#4  0x000000010009a90c in gfc_resolve_blocks (b=<value optimized out>,

ns=<value optimized out>) at ../../_clean/gcc/fortran/resolve.c:8885

#5  0x000000010009adc2 in resolve_code (code=<value optimized out>, ns=<value

optimized out>) at ../../_clean/gcc/fortran/resolve.c:9557

#6  0x000000010009a90c in gfc_resolve_blocks (b=<value optimized out>,

ns=<value optimized out>) at ../../_clean/gcc/fortran/resolve.c:8885

#7  0x000000010009adc2 in resolve_code (code=<value optimized out>, ns=<value

optimized out>) at ../../_clean/gcc/fortran/resolve.c:9557

#8  0x000000010009dab4 in resolve_codes (ns=<value optimized out>) at

../../_clean/gcc/fortran/resolve.c:14411

#9  0x000000010008e1bd in gfc_resolve (ns=<value optimized out>) at

../../_clean/gcc/fortran/resolve.c:14439

#10 0x00000001000825db in gfc_parse_file () at

../../_clean/gcc/fortran/parse.c:4399

#11 0x00000001000c25c6 in gfc_be_parse_file () at

../../_clean/gcc/fortran/f95-lang.c:189

#12 0x000000010076ce94 in compile_file () at ../../_clean/gcc/toplev.c:543

#13 0x000000010076ef69 in toplev_main (argc=2, argv=0x7fff5fbfd7c8) at

../../_clean/gcc/toplev.c:1864

#14 0x0000000100009b54 in start (pc=<value optimized out>, bases=0x0) at

../../../_clean/libgcc/config/unwind-dw2-fde-darwin.c:272

Reply via email to