$ cat z1.f90 blockdata real x common /c/ x[*] data x /1.0/ end blockdata $ gfortran-6 --version GNU Fortran (SUSE Linux) 6.0.0 20160108 (experimental) [trunk revision 232162] $ gfortran-6 -fcoarray=single -c z1.f90 z1.f90:5:0: end blockdata internal compiler error: tree check: expected array_type, have real_type in gfc_conv_array_initializer, at fortran/trans-array.c:5618
$ gfortran-5.3.1 -fcoarray=single -c z1.f90 z1.f90:5:0: end blockdata ^ internal compiler error: Segmentation fault
Confirmed: from 4.8 up to 5.3 the ICE is a Segmentation fault and the ICE is in gfc_conv_array_initializer, at fortran/trans-array.c for trunk (6.0).
Patch: https://gcc.gnu.org/pipermail/fortran/2021-October/056824.html
The master branch has been updated by Harald Anlauf <anlauf@gcc.gnu.org>: https://gcc.gnu.org/g:432ed97b992ccfe93616d5af1fa5c1a7d7aff9ff commit r12-4964-g432ed97b992ccfe93616d5af1fa5c1a7d7aff9ff Author: Harald Anlauf <anlauf@gmx.de> Date: Fri Nov 5 23:13:57 2021 +0100 Fortran: a symbol in a COMMON cannot be a coarray gcc/fortran/ChangeLog: PR fortran/69419 * match.c (gfc_match_common): Check array spec of a symbol in a COMMON object list and reject it if it is a coarray. gcc/testsuite/ChangeLog: PR fortran/69419 * gfortran.dg/pr69419.f90: New test.
Fixed on mainline for gcc-12. Closing. Thanks for the report!