Bug 100156 - ICE in gfc_trans_array_cobounds, at fortran/trans-array.c:6257
Summary: ICE in gfc_trans_array_cobounds, at fortran/trans-array.c:6257
Status: NEW
Alias: None
Product: gcc
Classification: Unclassified
Component: fortran (show other bugs)
Version: 11.0
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords: ice-on-valid-code
Depends on:
Blocks:
 
Reported: 2021-04-20 17:41 UTC by G. Steinmetz
Modified: 2021-04-21 06:21 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed: 2021-04-21 00:00:00


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description G. Steinmetz 2021-04-20 17:41:02 UTC
With option -fcoarray=single, affects versions down to at least r5 :
(compiles with -fcoarray=lib)
(compiles always without attribute volatile)


$ cat z1.f90
program p
   integer, volatile :: a = 1
   integer, volatile :: b[*] = 1
   if (a /= b) stop
end


$ gfortran-11-20210418 -c z1.f90 -fcoarray=lib
$
$ gfortran-11-20210418 -c z1.f90 -fcoarray=single
z1.f90:5:3:

    5 | end
      |   1
internal compiler error: Segmentation fault
0xc0b22f crash_signal
        ../../gcc/toplev.c:327
0x7425b1 gfc_trans_array_cobounds(tree_node*, stmtblock_t*, gfc_symbol const*)
        ../../gcc/fortran/trans-array.c:6257
0x75e271 gfc_trans_deferred_vars(gfc_symbol*, gfc_wrapped_block*)
        ../../gcc/fortran/trans-decl.c:4858
0x75fe22 gfc_generate_function_code(gfc_namespace*)
        ../../gcc/fortran/trans-decl.c:6988
0x6e66b6 translate_all_program_units
        ../../gcc/fortran/parse.c:6351
0x6e66b6 gfc_parse_file()
        ../../gcc/fortran/parse.c:6620
0x7329cf gfc_be_parse_file
        ../../gcc/fortran/f95-lang.c:212
Comment 1 Martin Liška 2021-04-21 06:21:28 UTC
Fails also with GCC 4.8.0.