This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug fortran/54435] [4.7/4.8 Regression] ICE with SELECT TYPE on a non-CLASS object


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]