https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85536
--- Comment #2 from Tiziano Müller ---
Ok, I got around to generate a backtrace from gfortran:
[...]
Starting program: /home/tiziano/tmp/gfortran/gcc/f951 ice_minimal_rep.f90
-quiet -dumpbase ice_minimal_rep.f90 -mtune=generic -march=x86-64 -auxbase
ice_minimal_rep -fintrinsic-modules-path finclude -o /tmp/ccQdv1nJ.s
Program received signal SIGSEGV, Segmentation fault.
0x00844729 in compare_type (s1=0x2d78570, s2=0x2d78570) at
../../gcc/gcc/fortran/interface.c:744
744 return gfc_compare_types (>ts, >ts) || s2->ts.type ==
BT_ASSUMED;
(gdb) bt
#0 0x00844729 in compare_type (s1=0x2d78570, s2=0x2d78570) at
../../gcc/gcc/fortran/interface.c:744
#1 0x008457e3 in gfc_check_dummy_characteristics (s1=0x2d78570,
s2=0x2d78570, type_must_agree=true, errmsg=0x7bfff210 "", err_len=200)
at ../../gcc/gcc/fortran/interface.c:1294
#2 0x00846b91 in gfc_compare_interfaces (s1=0x2d78570, s2=0x2d78570,
name2=0x76fe4370 "nextparser", generic_flag=0, strict_flag=1,
errmsg=0x7bfff210 "", err_len=200, p1=0x0, p2=0x0) at
../../gcc/gcc/fortran/interface.c:1755
#3 0x00845cb3 in gfc_check_dummy_characteristics (s1=0x2d78570,
s2=0x2d78570, type_must_agree=true, errmsg=0x7bfff3c0 "", err_len=200)
at ../../gcc/gcc/fortran/interface.c:1384
#4 0x00846b91 in gfc_compare_interfaces (s1=0x2d78570, s2=0x2d78570,
name2=0x76fe4370 "nextparser", generic_flag=0, strict_flag=1,
errmsg=0x7bfff3c0 "", err_len=200, p1=0x0, p2=0x0) at
../../gcc/gcc/fortran/interface.c:1755
#5 0x00845cb3 in gfc_check_dummy_characteristics (s1=0x2d78570,
s2=0x2d78570, type_must_agree=true, errmsg=0x7bfff570 "", err_len=200)
at ../../gcc/gcc/fortran/interface.c:1384
#6 0x00846b91 in gfc_compare_interfaces (s1=0x2d78570, s2=0x2d78570,
name2=0x76fe4370 "nextparser", generic_flag=0, strict_flag=1,
errmsg=0x7bfff570 "", err_len=200, p1=0x0, p2=0x0) at
../../gcc/gcc/fortran/interface.c:1755
#7 0x00845cb3 in gfc_check_dummy_characteristics (s1=0x2d78570,
s2=0x2d78570, type_must_agree=true, errmsg=0x7bfff720 "", err_len=200)
at ../../gcc/gcc/fortran/interface.c:1384
#8 0x00846b91 in gfc_compare_interfaces (s1=0x2d78570, s2=0x2d78570,
name2=0x76fe4370 "nextparser", generic_flag=0, strict_flag=1,
errmsg=0x7bfff720 "", err_len=200, p1=0x0, p2=0x0) at
../../gcc/gcc/fortran/interface.c:1755
#9 0x00845cb3 in gfc_check_dummy_characteristics (s1=0x2d78570,
s2=0x2d78570, type_must_agree=true, errmsg=0x7bfff8d0 "", err_len=200)
at ../../gcc/gcc/fortran/interface.c:1384
[...]
which seems to be an endless loop between gfc_check_dummy_characteristics and
gfc_compare_interfaces.
What I find interesting is the fact that ifort (18.0.2) chokes the same way on
the same example:
$ ifort -o ice_minimal_rep ice_minimal_rep.f90
ice_minimal_rep.f90(19): internal error: Please visit
'http://www.intel.com/software/products/support' for assistance.
end program
^
[ Aborting due to internal error. ]
compilation aborted for ice_minimal_rep.f90 (code 1)