+2019-09-07 Paul Thomas <pault@gcc.gnu.org>
+
+ Backport from mainline
+ PR fortran/91589
+ * primary.c (gfc_match_varspec): Return MATCH_NO on an apparent
+ component ref, when the primary type is intrinsic.
+
2019-09-05 Harald Anlauf <anlauf@gmx.de>
Backport from mainline
PR fortran/90563
* frontend-passes.c (insert_index): Suppress errors while
simplifying the resulting expression.
-
+
2019-08-13 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/88072
match m;
bool unknown;
bool inquiry;
+ bool intrinsic;
locus old_loc;
char sep;
if (m != MATCH_YES)
return MATCH_ERROR;
+ intrinsic = false;
if (primary->ts.type != BT_CLASS && primary->ts.type != BT_DERIVED)
{
inquiry = is_inquiry_ref (name, &tmp);
if (inquiry)
sym = NULL;
+
+ if (sep == '%' && primary->ts.type != BT_UNKNOWN)
+ intrinsic = true;
}
else
inquiry = false;
break;
}
- if (!inquiry)
+ if (!inquiry && !intrinsic)
component = gfc_find_component (sym, name, false, false, &tmp);
else
component = NULL;
- if (component == NULL && !inquiry)
+ /* In some cases, returning MATCH_NO gives a better error message. Most
+ cases return "Unclassifiable statement at..." */
+ if (intrinsic && !inquiry)
+ return MATCH_NO;
+ else if (component == NULL && !inquiry)
return MATCH_ERROR;
/* Extend the reference chain determined by gfc_find_component or
+2019-09-07 Paul Thomas <pault@gcc.gnu.org>
+
+ Backport from mainline
+ PR fortran/91589
+ * gfortran.dg/pr91589.f90 : New test.
+
2019-09-05 Harald Anlauf <anlauf@gmx.de>
Backport from mainline
Backport from mainline.
2019-05-15 Iain Sandoe <iain@sandoe.co.uk>
- * lib/target-supports.exp
+ * lib/target-supports.exp
(check_effective_target_powerpc_p8vector_ok): No support for Darwin.
(check_effective_target_powerpc_p9vector_ok): Likewise.
(check_effective_target_powerpc_float128_sw_ok): Likewise.
--- /dev/null
+! { dg-do compile }
+!
+! Check the fix for PR91589, in which the invalid expression caused an ICE.
+! Other statements using this invalid expression cause "Unclassifiable statement at..."
+!
+! Contributed by Gerhardt Steinmetz <gscfq@t-online.de>
+!
+program p
+ type t
+ integer :: a
+ end type
+ type(t) :: x = t(1)
+ call sub (x%a%a) ! { dg-error "Syntax error in argument list" }
+end
+