diff options
author | rus <rus@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-11-09 20:58:24 +0000 |
---|---|---|
committer | rus <rus@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-11-09 20:58:24 +0000 |
commit | 7f4db7c80779ecbc57d1146654daf0acfe18de66 (patch) | |
tree | 3af522a3b5e149c3fd498ecb1255994daae2129a /gcc/testsuite/gfortran.dg/class_allocate_2.f03 | |
parent | 611349f0ec42a37591db2cd02974a11a48d10edb (diff) | |
download | gcc-profile-stdlib.tar.gz |
merge from trunkprofile-stdlib
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/profile-stdlib@154052 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/testsuite/gfortran.dg/class_allocate_2.f03')
-rw-r--r-- | gcc/testsuite/gfortran.dg/class_allocate_2.f03 | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/gcc/testsuite/gfortran.dg/class_allocate_2.f03 b/gcc/testsuite/gfortran.dg/class_allocate_2.f03 new file mode 100644 index 00000000000..754faa9a9f4 --- /dev/null +++ b/gcc/testsuite/gfortran.dg/class_allocate_2.f03 @@ -0,0 +1,23 @@ +! { dg-do compile } +! +! PR fortran/41582 +! +subroutine test() +type :: t +end type t +class(t), allocatable :: c,d +allocate(t :: d) +allocate(c,source=d) +end + +type, abstract :: t +end type t +type t2 + class(t), pointer :: t +end type t2 + +class(t), allocatable :: a,c,d +type(t2) :: b +allocate(a) ! { dg-error "requires a type-spec or SOURCE" } +allocate(b%t) ! { dg-error "requires a type-spec or SOURCE" } +end |