https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92994

G. Steinmetz <gs...@t-online.de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |ice-on-invalid-code

--- Comment #1 from G. Steinmetz <gs...@t-online.de> ---

Also related :


$ cat z6.f90
subroutine s
   associate (y => (s))
   end associate
end


$ cat z7.f90
program p
   associate (y => (p))
   end associate
end


They are older (down to gcc-7), and produce different backtraces, e.g.

$ gfortran-6 -c z6.f90
z6.f90:2:14:

    associate (y => (s))
              1
Error: Expected association at (1)
z6.f90:3:6:

    end associate
      1
Error: Expecting END SUBROUTINE statement at (1)


$ gfortran-10-20191215 -c z6.f90
z6.f90:2:20:

    2 |    associate (y => (s))
      |                    1
Warning: Non-RECURSIVE procedure 's' at (1) is possibly calling itself
recursively.  Declare it RECURSIVE or use '-frecursive'
z6.f90:2:0:

    2 |    associate (y => (s))
      |
internal compiler error: in fold_convert_loc, at fold-const.c:2436
0x8cee27 fold_convert_loc(unsigned int, tree_node*, tree_node*)
        ../../gcc/fold-const.c:2435
0x705ac9 gfc_trans_scalar_assign(gfc_se*, gfc_se*, gfc_typespec, bool, bool,
bool)
        ../../gcc/fortran/trans-expr.c:9667
0x7170cd gfc_trans_assignment_1
        ../../gcc/fortran/trans-expr.c:11051
0x743b7c trans_associate_var
        ../../gcc/fortran/trans-stmt.c:2170
0x74a221 gfc_trans_block_construct(gfc_code*)
        ../../gcc/fortran/trans-stmt.c:2283
0x6d6d37 trans_code
        ../../gcc/fortran/trans.c:1960
0x700124 gfc_generate_function_code(gfc_namespace*)
        ../../gcc/fortran/trans-decl.c:6801
0x6891b6 translate_all_program_units
        ../../gcc/fortran/parse.c:6302
0x6891b6 gfc_parse_file()
        ../../gcc/fortran/parse.c:6541
0x6d365f gfc_be_parse_file
        ../../gcc/fortran/f95-lang.c:210

Reply via email to