aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/trans-stmt.c
diff options
context:
space:
mode:
authorTobias Burnus <burnus@gcc.gnu.org>2009-10-09 22:34:35 +0200
committerTobias Burnus <burnus@gcc.gnu.org>2009-10-09 22:34:35 +0200
commitd0a9804e353b33d339e20f0aa2bd458a4ff08649 (patch)
tree7eeb58c662060f0443817dc0734fd9cc29a924a0 /gcc/fortran/trans-stmt.c
parent7431bf06bc2bb01a307a796bf4de57d9ca48bb38 (diff)
downloadgcc-d0a9804e353b33d339e20f0aa2bd458a4ff08649.zip
gcc-d0a9804e353b33d339e20f0aa2bd458a4ff08649.tar.gz
gcc-d0a9804e353b33d339e20f0aa2bd458a4ff08649.tar.bz2
re PR fortran/41582 ([OOP] Allocation of abstract types requires a type spec or a SOURCE)
2009-10-09 Tobias Burnus <burnus@net-b.de> PR fortran/41582 * decl.c (encapsulate_class_symbol): Save attr.abstract. * resolve.c (resolve_allocate_expr): Reject class allocate without typespec or source=. * trans-stmt.c (gfc_trans_allocate): Change gfc_warning into gfc_error for "not yet implemented". 2009-10-09 Tobias Burnus <burnus@net-b.de> PR fortran/41582 * gfortran.dg/class_allocate_1.f03: Modify code such that it compiles with the gfc_warning->gfc_error change. * gfortran.dg/class_allocate_1.f03: New test. From-SVN: r152601
Diffstat (limited to 'gcc/fortran/trans-stmt.c')
-rw-r--r--gcc/fortran/trans-stmt.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gcc/fortran/trans-stmt.c b/gcc/fortran/trans-stmt.c
index 05ed23e..110534d 100644
--- a/gcc/fortran/trans-stmt.c
+++ b/gcc/fortran/trans-stmt.c
@@ -4025,8 +4025,8 @@ gfc_trans_allocate (gfc_code * code)
gfc_typespec *ts;
/* TODO: Size must be determined at run time, since it must equal
the size of the dynamic type of SOURCE, not the declared type. */
- gfc_warning ("Dynamic size allocation at %L not supported yet, "
- "using size of declared type", &code->loc);
+ gfc_error ("Using SOURCE= with a class variable at %L not "
+ "supported yet", &code->loc);
ts = &code->expr3->ts.u.derived->components->ts;
tmp = TYPE_SIZE_UNIT (gfc_typenode_for_spec (ts));
}