summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkargl <kargl@138bc75d-0d04-0410-961f-82ee72b054a4>2015-10-02 00:45:59 +0000
committerkargl <kargl@138bc75d-0d04-0410-961f-82ee72b054a4>2015-10-02 00:45:59 +0000
commit80ae9b8a261b7e302c4b79055c284dfa314ee264 (patch)
tree61b8c947e7c94b277a73d232f1a5492ce631f9b4
parent0815dac228a58373807a957f3175afd3d042d689 (diff)
downloadgcc-80ae9b8a261b7e302c4b79055c284dfa314ee264.tar.gz
2015-10-01 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/67616 * primary.c (gfc_match_structure_constructor): Use a possibly host-associated symtree to prevent ICE. 2015-10-01 Steven G. Kargl <kargl@gcc.gnu.org> PR fortran/67616 * gfortran.dg/pr67616.f90: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@228363 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/fortran/ChangeLog6
-rw-r--r--gcc/fortran/primary.c2
-rw-r--r--gcc/testsuite/ChangeLog5
-rw-r--r--gcc/testsuite/gfortran.dg/pr67616.f9013
4 files changed, 25 insertions, 1 deletions
diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog
index 2830c912b03..2a306e55f69 100644
--- a/gcc/fortran/ChangeLog
+++ b/gcc/fortran/ChangeLog
@@ -1,3 +1,9 @@
+2015-10-01 Steven G. Kargl <kargl@gcc.gnu.org>
+
+ PR fortran/67616
+ * primary.c (gfc_match_structure_constructor): Use a possibly
+ host-associated symtree to prevent ICE.
+
2015-09-28 Paul Thomas <pault@gcc.gnu.org>
PR fortran/40054
diff --git a/gcc/fortran/primary.c b/gcc/fortran/primary.c
index c8c65816a33..9f75666becf 100644
--- a/gcc/fortran/primary.c
+++ b/gcc/fortran/primary.c
@@ -2697,7 +2697,7 @@ gfc_match_structure_constructor (gfc_symbol *sym, gfc_expr **result)
gfc_expr *e;
gfc_symtree *symtree;
- gfc_get_sym_tree (sym->name, NULL, &symtree, false); /* Can't fail */
+ gfc_get_ha_sym_tree (sym->name, &symtree);
e = gfc_get_expr ();
e->symtree = symtree;
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 92625b32e56..bf9b3e406f2 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2015-10-01 Steven G. Kargl <kargl@gcc.gnu.org>
+
+ PR fortran/67616
+ * gfortran.dg/pr67616.f90: New test.
+
2015-10-01 Ville Voutilainen <ville.voutilainen@gmail.com>
PR c++/54430
diff --git a/gcc/testsuite/gfortran.dg/pr67616.f90 b/gcc/testsuite/gfortran.dg/pr67616.f90
new file mode 100644
index 00000000000..3c2107d175c
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/pr67616.f90
@@ -0,0 +1,13 @@
+! { dg-do compile }
+! PR fortran/67616
+! Original code contributed by Gerhard Steinmetz
+program p
+ type t
+ end type
+ type(t) :: y
+ data y /t()/
+ block
+ type(t) :: x
+ data x /t()/ ! Prior to patch, this would ICE.
+ end block
+end