aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran
diff options
context:
space:
mode:
authorJanus Weil <janus@gcc.gnu.org>2012-09-04 10:03:09 +0200
committerJanus Weil <janus@gcc.gnu.org>2012-09-04 10:03:09 +0200
commitee3bea0b28549727df923754c8d5e9590f53bba2 (patch)
treecc6f9e1c67fc4afdd8358b2a47491dbb82c190b5 /gcc/fortran
parentff596ca15ca105fc571e95cdf35c074cb4f011d4 (diff)
downloadgcc-ee3bea0b28549727df923754c8d5e9590f53bba2.zip
gcc-ee3bea0b28549727df923754c8d5e9590f53bba2.tar.gz
gcc-ee3bea0b28549727df923754c8d5e9590f53bba2.tar.bz2
re PR fortran/54435 (ICE with SELECT TYPE on a non-CLASS object)
2012-09-04 Janus Weil <janus@gcc.gnu.org> PR fortran/54435 PR fortran/54443 * match.c (gfc_match_select_type): Make sure to only access CLASS_DATA for BT_CLASS. 2012-09-04 Janus Weil <janus@gcc.gnu.org> PR fortran/54243 PR fortran/54244 * gfortran.dg/select_type_29.f03: New. From-SVN: r190910
Diffstat (limited to 'gcc/fortran')
-rw-r--r--gcc/fortran/ChangeLog7
-rw-r--r--gcc/fortran/match.c4
2 files changed, 9 insertions, 2 deletions
diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog
index c1de983..dbafc44 100644
--- a/gcc/fortran/ChangeLog
+++ b/gcc/fortran/ChangeLog
@@ -1,3 +1,10 @@
+2012-09-04 Janus Weil <janus@gcc.gnu.org>
+
+ PR fortran/54435
+ PR fortran/54443
+ * match.c (gfc_match_select_type): Make sure to only access CLASS_DATA
+ for BT_CLASS.
+
2012-09-03 Tobias Burnus <burnus@net-b.de>
PR fortran/54467
diff --git a/gcc/fortran/match.c b/gcc/fortran/match.c
index 4c713a5..cf85d52 100644
--- a/gcc/fortran/match.c
+++ b/gcc/fortran/match.c
@@ -5368,10 +5368,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