diff options
author | Paul Thomas <pault@gcc.gnu.org> | 2013-03-10 13:23:58 +0000 |
---|---|---|
committer | Paul Thomas <pault@gcc.gnu.org> | 2013-03-10 13:23:58 +0000 |
commit | 8ec4321fafac5e8c03b80904a4a46d85efb115d6 (patch) | |
tree | 3bca7c6bfeb4752caf475053c6a76a4a2555bbc1 /gcc/fortran/resolve.c | |
parent | d16d44d338c7e4632e1d34bca0351f9dbab126de (diff) | |
download | gcc-8ec4321fafac5e8c03b80904a4a46d85efb115d6.zip gcc-8ec4321fafac5e8c03b80904a4a46d85efb115d6.tar.gz gcc-8ec4321fafac5e8c03b80904a4a46d85efb115d6.tar.bz2 |
re PR fortran/56575 (An invalid OO code causes ICE)
2013-03-10 Paul Thomas <pault@gcc.gnu.org>
PR fortran/56575
* expr.c (gfc_default_initializer): Check that a class declared
type has any components.
* resolve.c (resolve_fl_derived0): On failing the test for C437
set the type to BT_UNKNOWN to prevent repeat error messages.
2013-03-10 Paul Thomas <pault@gcc.gnu.org>
PR fortran/56575
* gfortran.dg/class_56.f90: New test.
From-SVN: r196580
Diffstat (limited to 'gcc/fortran/resolve.c')
-rw-r--r-- | gcc/fortran/resolve.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/gcc/fortran/resolve.c b/gcc/fortran/resolve.c index 01e68ab..bb0b946 100644 --- a/gcc/fortran/resolve.c +++ b/gcc/fortran/resolve.c @@ -12866,6 +12866,8 @@ resolve_fl_derived0 (gfc_symbol *sym) { gfc_error ("Component '%s' with CLASS at %L must be allocatable " "or pointer", c->name, &c->loc); + /* Prevent a recurrence of the error. */ + c->ts.type = BT_UNKNOWN; return FAILURE; } |