https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88155
kargl at gcc dot gnu.org changed: What |Removed |Added ---------------------------------------------------------------------------- Priority|P3 |P4 Status|UNCONFIRMED |NEW Last reconfirmed| |2018-11-22 Ever confirmed|0 |1 --- Comment #1 from kargl at gcc dot gnu.org --- (In reply to G. Steinmetz from comment #0) > With a typo, down to at least gcc-5 : > > > $ cat z1.f90 > program p > type t > integer :: a > end type > type(t) :: x > data x /t()1/ > print *, x > end > > > $ gfortran-9-20181118 -c z1.f90 > 0x618fae gfc_format_decoder > ../../gcc/fortran/error.c:947 > 0x131577e pp_format(pretty_printer*, text_info*) > ../../gcc/pretty-print.c:1390 > 0x130b125 diagnostic_report_diagnostic(diagnostic_context*, diagnostic_info*) > ../../gcc/diagnostic.c:1015 > 0x618e4c gfc_error_opt > ../../gcc/fortran/error.c:1313 > 0x61a3f0 gfc_error(char const*, ...) > ../../gcc/fortran/error.c:1342 > 0x675e10 build_actual_constructor > ../../gcc/fortran/primary.c:2934 Interesting bug. The pointer components of gfc_current_locus are NULL. Changing the use of %C to %L in gfc_error and using comp->loc yields troutmask:sgk[203] gfcx -c a.f90 a.f90:3:18: 3 | integer :: a | 1 Error: No initializer for component 'a' given in the structure constructor at (1) which is of course the bogus locus. Completely suppressing %C yields an error message but not a locus and source line output.