(In reply to Dominique d'Humieres from comment #1)
> Confirmed from 4.8 up to trunk (9.0). An instrumented compiler gives
>
> f951: Warning: No location in statement
> ../../work/gcc/fortran/trans.c:1768:39: runtime error: member access within
> null pointer of type 'struct gfc_linebuf'
> f951: internal compiler error: Segmentation fault: 11
The warning in comment#0 would be restored by the patch:
(In reply to Dominique d'Humieres from comment #1) gcc/fortran/ trans.c: 1768:39: runtime error: member access within
> Confirmed from 4.8 up to trunk (9.0). An instrumented compiler gives
>
> f951: Warning: No location in statement
> ../../work/
> null pointer of type 'struct gfc_linebuf'
> f951: internal compiler error: Segmentation fault: 11
The warning in comment#0 would be restored by the patch:
Index: gcc/fortran/trans.c ======= ======= ======= ======= ======= ======= ======= ======= ==== backend_ locus (locus * loc) backend_ file = loc->lb->file; backend_ file = loc->lb->file;
=======
--- gcc/fortran/trans.c (revision 267065)
+++ gcc/fortran/trans.c (working copy)
@@ -1765,8 +1765,11 @@
void
gfc_set_
{
- gfc_current_
- input_location = loc->lb->location;
+ if (loc->lb)
+ {
+ gfc_current_
+ input_location = loc->lb->location;
+ }
}
However, this papers over the issue that the locus is not properly set.