aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/match.c
diff options
context:
space:
mode:
authorTobias Burnus <burnus@net-b.de>2011-12-03 19:30:36 +0100
committerTobias Burnus <burnus@gcc.gnu.org>2011-12-03 19:30:36 +0100
commit7d40e49f27458de1c3b0481b3cf94e03b73fdd7f (patch)
treefd93a90a523df23aa531f68dea337f8c7dd73fd7 /gcc/fortran/match.c
parent99b375d0b9802b28f3250ef3d2af6ac56d6d4c7c (diff)
downloadgcc-7d40e49f27458de1c3b0481b3cf94e03b73fdd7f.zip
gcc-7d40e49f27458de1c3b0481b3cf94e03b73fdd7f.tar.gz
gcc-7d40e49f27458de1c3b0481b3cf94e03b73fdd7f.tar.bz2
re PR fortran/48887 ([OOP] SELECT TYPE: Associate name shall not be a pointer/allocatable)
2011-12-03 Tobias Burnus <burnus@net-b.de> PR fortran/48887 * match.c (select_type_set_tmp): Don't set allocatable/pointer attribute. * class.c (gfc_build_class_symbol): Handle attr.select_type_temporary. 2011-12-03 Tobias Burnus <burnus@net-b.de> PR fortran/48887 * gfortran.dg/select_type_24.f90: New. * gfortran.dg/select_type_23.f03: Add dg-error. * gfortran.dg/class_45a.f03: Add missing TARGET attribute. From-SVN: r181975
Diffstat (limited to 'gcc/fortran/match.c')
-rw-r--r--gcc/fortran/match.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/gcc/fortran/match.c b/gcc/fortran/match.c
index fbafe82..3de9c72 100644
--- a/gcc/fortran/match.c
+++ b/gcc/fortran/match.c
@@ -5152,16 +5152,11 @@ select_type_set_tmp (gfc_typespec *ts)
gfc_get_sym_tree (name, gfc_current_ns, &tmp, false);
gfc_add_type (tmp->n.sym, ts, NULL);
gfc_set_sym_referenced (tmp->n.sym);
- if (select_type_stack->selector->ts.type == BT_CLASS &&
- CLASS_DATA (select_type_stack->selector)->attr.allocatable)
- gfc_add_allocatable (&tmp->n.sym->attr, NULL);
- else
- gfc_add_pointer (&tmp->n.sym->attr, NULL);
gfc_add_flavor (&tmp->n.sym->attr, FL_VARIABLE, name, NULL);
+ tmp->n.sym->attr.select_type_temporary = 1;
if (ts->type == BT_CLASS)
gfc_build_class_symbol (&tmp->n.sym->ts, &tmp->n.sym->attr,
&tmp->n.sym->as, false);
- tmp->n.sym->attr.select_type_temporary = 1;
/* Add an association for it, so the rest of the parser knows it is
an associate-name. The target will be set during resolution. */