From 271dd55c784a8bae4edae33f9fd79f046be7cd6c Mon Sep 17 00:00:00 2001 From: Janus Weil Date: Wed, 9 Nov 2016 21:33:24 +0100 Subject: [multiple changes] 2016-11-09 Mikael Morin Janus Weil PR fortran/46459 * interface.c (compare_actual_formal): Add safety checks to avoid ICE. 2016-11-09 Janus Weil PR fortran/46459 * gfortran.dg/volatile14.f90: New test. From-SVN: r242020 --- gcc/fortran/interface.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'gcc/fortran/interface.c') diff --git a/gcc/fortran/interface.c b/gcc/fortran/interface.c index 4dd432ef..98a61df 100644 --- a/gcc/fortran/interface.c +++ b/gcc/fortran/interface.c @@ -3190,6 +3190,7 @@ compare_actual_formal (gfc_actual_arglist **ap, gfc_formal_arglist *formal, shape array, if the dummy argument has the VOLATILE attribute. */ if (f->sym->attr.volatile_ + && a->expr->expr_type == EXPR_VARIABLE && a->expr->symtree->n.sym->as && a->expr->symtree->n.sym->as->type == AS_ASSUMED_SHAPE && !(f->sym->as && f->sym->as->type == AS_ASSUMED_SHAPE)) @@ -3219,6 +3220,7 @@ compare_actual_formal (gfc_actual_arglist **ap, gfc_formal_arglist *formal, dummy argument has the VOLATILE attribute. */ if (f->sym->attr.volatile_ + && a->expr->expr_type == EXPR_VARIABLE && a->expr->symtree->n.sym->attr.pointer && a->expr->symtree->n.sym->as && !(f->sym->as -- cgit v1.1