diff mbox

[fortran] Fix ICEs with -fimplicit-none

Message ID b26f04b4-37a8-b401-26be-7290844b0805@netcologne.de
State New
Headers show

Commit Message

Thomas Koenig Dec. 11, 2016, 10:21 p.m. UTC
Hello world,

the attached patch fixes a 5/6/7 regression with -fimplicit-none.

Regression-tested.  OK for all affected branches?

Regards

	Thomas

2016-12-11  Thomas Koenig  <tkoenig@gcc.gnu.org>

         PR fortran/78239
         * decl.c(char_len_param_value): Also check for -fimplicit-none
         when determining if implicit none is in force.

2016-12-11  Thomas Koenig  <tkoenig@gcc.gnu.org>

         PR fortran/78239
         * gfortran.dg/fimplicit_none_1.f90:  New test.
         * gfortran.dg/fimplicit_none_2.f90:  New test.

Comments

Mikael Morin Dec. 13, 2016, 9:27 p.m. UTC | #1
Le 11/12/2016 à 23:21, Thomas Koenig a écrit :
> Hello world,

>

> the attached patch fixes a 5/6/7 regression with -fimplicit-none.

>

> Regression-tested.  OK for all affected branches?

>

OK. Thanks

Mikael
diff mbox

Patch

Index: decl.c
===================================================================
--- decl.c	(Revision 243516)
+++ decl.c	(Arbeitskopie)
@@ -922,7 +922,8 @@  char_len_param_value (gfc_expr **expr, bool *defer
 
       if (!t && e->ts.type == BT_UNKNOWN
 	  && e->symtree->n.sym->attr.untyped == 1
-	  && (e->symtree->n.sym->ns->seen_implicit_none == 1
+	  && (flag_implicit_none
+	      || e->symtree->n.sym->ns->seen_implicit_none == 1
 	      || e->symtree->n.sym->ns->parent->seen_implicit_none == 1))
 	{
 	  gfc_free_expr (e);