Commit ea59b186 by Tobias Burnus Committed by Tobias Burnus

re PR fortran/41587 ([OOP] ICE with ALLOCATABLE CLASS components)

2012-05-06  Tobias Burnus  <burnus@net-b.de>

        PR fortran/41587
        * decl.c (build_struct): Don't ignore FAILED status.

2012-05-06  Tobias Burnus  <burnus@net-b.de>

        PR fortran/41587
        * gfortran.dg/class_array_13.f90: New.

From-SVN: r187214
parent 91000c66
2012-05-06 Tobias Burnus <burnus@net-b.de>
PR fortran/41587
* decl.c (build_struct): Don't ignore FAILED status.
2012-05-05 Paul Thomas <pault@gcc.gnu.org> 2012-05-05 Paul Thomas <pault@gcc.gnu.org>
PR fortran/41600 PR fortran/41600
......
...@@ -1658,7 +1658,10 @@ scalar: ...@@ -1658,7 +1658,10 @@ scalar:
bool delayed = (gfc_state_stack->sym == c->ts.u.derived) bool delayed = (gfc_state_stack->sym == c->ts.u.derived)
|| (!c->ts.u.derived->components || (!c->ts.u.derived->components
&& !c->ts.u.derived->attr.zero_comp); && !c->ts.u.derived->attr.zero_comp);
return gfc_build_class_symbol (&c->ts, &c->attr, &c->as, delayed); gfc_try t2 = gfc_build_class_symbol (&c->ts, &c->attr, &c->as, delayed);
if (t != FAILURE)
t = t2;
} }
return t; return t;
......
2012-05-06 Tobias Burnus <burnus@net-b.de>
PR fortran/41587
* gfortran.dg/class_array_13.f90: New.
2012-05-06 Tristan Gingold <gingold@adacore.com> 2012-05-06 Tristan Gingold <gingold@adacore.com>
* gnat.dg/warn7.adb: New test. * gnat.dg/warn7.adb: New test.
......
! { dg-do compile }
! { dg-options "-fcoarray=single" }
!
! PR fortran/41587
!
type t0
integer :: j = 42
end type t0
type t
integer :: i
class(t0), allocatable :: foo(3) ! { dg-error "must have a deferred shape" }
end type t
type t2
integer :: i
class(t0), pointer :: foo(3) ! { dg-error "must have a deferred shape" }
end type t2
type t3
integer :: i
class(t0), allocatable :: foo[3] ! { dg-error "Upper bound of last coarray dimension must be '\\*'" }
end type t3
end
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment