diff options
author | Steven G. Kargl <kargl@gcc.gnu.org> | 2018-12-12 00:53:08 +0000 |
---|---|---|
committer | Steven G. Kargl <kargl@gcc.gnu.org> | 2018-12-12 00:53:08 +0000 |
commit | 2f00fb3d0ba1174dee21c33162a5fdc4e583a061 (patch) | |
tree | 98c1295e1c7a1c4c700f59c22e0955fe9d750858 /gcc/fortran/primary.c | |
parent | 85c223fa128516d2f428f85cb0599d464f9ddc1b (diff) | |
download | gcc-2f00fb3d0ba1174dee21c33162a5fdc4e583a061.zip gcc-2f00fb3d0ba1174dee21c33162a5fdc4e583a061.tar.gz gcc-2f00fb3d0ba1174dee21c33162a5fdc4e583a061.tar.bz2 |
re PR fortran/88155 (ICE in gfc_format_decoder, at fortran/error.c:947)
2018-12-11 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/88155
* primary.c (gfc_match_structure_constructor): Set the locus of
an expression to avoid a NULL pointer dereference.
2018-12-11 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/88155
* gfortran.dg/pr70870_1.f90: Update testcase to use -std=gnu.
* gfortran.dg/pr88155.f90: New test.
From-SVN: r267041
Diffstat (limited to 'gcc/fortran/primary.c')
-rw-r--r-- | gcc/fortran/primary.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/gcc/fortran/primary.c b/gcc/fortran/primary.c index d94a5c4..52cc2f1 100644 --- a/gcc/fortran/primary.c +++ b/gcc/fortran/primary.c @@ -3212,6 +3212,7 @@ gfc_match_structure_constructor (gfc_symbol *sym, gfc_expr **result) e = gfc_get_expr (); e->symtree = symtree; e->expr_type = EXPR_FUNCTION; + e->where = gfc_current_locus; gcc_assert (gfc_fl_struct (sym->attr.flavor) && symtree->n.sym->attr.flavor == FL_PROCEDURE); |