This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/54435] [4.7/4.8 Regression] ICE with SELECT TYPE on a non-CLASS object
- From: "janus at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 31 Aug 2012 14:03:21 +0000
- Subject: [Bug fortran/54435] [4.7/4.8 Regression] ICE with SELECT TYPE on a non-CLASS object
- Auto-submitted: auto-generated
- References: <bug-54435-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54435
--- Comment #5 from janus at gcc dot gnu.org 2012-08-31 14:03:21 UTC ---
This kills the ICE and gets us back at least to the 4.6 behavior (see comment
#3):
Index: gcc/fortran/match.c
===================================================================
--- gcc/fortran/match.c (revision 190419)
+++ gcc/fortran/match.c (working copy)
@@ -5367,10 +5367,10 @@ gfc_match_select_type (void)
array, which can have a reference, from other expressions that
have references, such as derived type components, and are not
allowed by the standard.
- TODO; see is it is sufficient to exclude component and substring
+ TODO: see if it is sufficient to exclude component and substring
references. */
class_array = expr1->expr_type == EXPR_VARIABLE
- && expr1->ts.type != BT_UNKNOWN
+ && expr1->ts.type == BT_CLASS
&& CLASS_DATA (expr1)
&& (strcmp (CLASS_DATA (expr1)->name, "_data") == 0)
&& (CLASS_DATA (expr1)->attr.dimension