aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran
diff options
context:
space:
mode:
authorJanus Weil <janus@gcc.gnu.org>2010-08-27 21:02:15 +0200
committerJanus Weil <janus@gcc.gnu.org>2010-08-27 21:02:15 +0200
commitcbadd64af4764fe75658a20c229050453379841d (patch)
treec5eca6c196ed2d20080321871f9c09dfb0c08787 /gcc/fortran
parentee1e5e63ec2e20eb118af50d2b29f4099b536d19 (diff)
downloadgcc-cbadd64af4764fe75658a20c229050453379841d.zip
gcc-cbadd64af4764fe75658a20c229050453379841d.tar.gz
gcc-cbadd64af4764fe75658a20c229050453379841d.tar.bz2
re PR fortran/45420 ([OOP] polymorphic TBP call in a CLASS DEFAULT clause)
2010-08-27 Janus Weil <janus@gcc.gnu.org> PR fortran/45420 * match.c (select_type_set_tmp): Add the possibility to reset the temporary to NULL. (gfc_match_class_is): Reset the temporary in CLASS DEFAULT clauses. 2010-08-27 Janus Weil <janus@gcc.gnu.org> PR fortran/45420 * gfortran.dg/select_type_15.f03: New. From-SVN: r163594
Diffstat (limited to 'gcc/fortran')
-rw-r--r--gcc/fortran/ChangeLog7
-rw-r--r--gcc/fortran/match.c7
2 files changed, 14 insertions, 0 deletions
diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog
index 9bd81c3..a15c136 100644
--- a/gcc/fortran/ChangeLog
+++ b/gcc/fortran/ChangeLog
@@ -1,3 +1,10 @@
+2010-08-27 Janus Weil <janus@gcc.gnu.org>
+
+ PR fortran/45420
+ * match.c (select_type_set_tmp): Add the possibility to reset the
+ temporary to NULL.
+ (gfc_match_class_is): Reset the temporary in CLASS DEFAULT clauses.
+
2010-08-27 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/45159
diff --git a/gcc/fortran/match.c b/gcc/fortran/match.c
index 21dbcde..7c0dfc7 100644
--- a/gcc/fortran/match.c
+++ b/gcc/fortran/match.c
@@ -4460,6 +4460,12 @@ select_type_set_tmp (gfc_typespec *ts)
char name[GFC_MAX_SYMBOL_LEN];
gfc_symtree *tmp;
+ if (!ts)
+ {
+ select_type_stack->tmp = NULL;
+ return;
+ }
+
if (!gfc_type_is_extensible (ts->u.derived))
return;
@@ -4708,6 +4714,7 @@ gfc_match_class_is (void)
c->where = gfc_current_locus;
c->ts.type = BT_UNKNOWN;
new_st.ext.case_list = c;
+ select_type_set_tmp (NULL);
return MATCH_YES;
}