OSDN Git Service

2011-09-26 Janus Weil <janus@gcc.gnu.org>
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / gfortran.dg / typebound_assignment_3.f03
1 ! { dg-do compile }
2 !
3 ! PR 49074: [OOP] Defined assignment w/ CLASS arrays: Incomplete error message
4 !
5 ! Contribute by Jerry DeLisle <jvdelisle@gcc.gnu.org>
6
7 module foo
8
9   type bar
10   contains
11     generic :: assignment (=) => assgn
12     procedure :: assgn
13   end type
14
15 contains
16
17   elemental subroutine assgn (a, b)
18     class (bar), intent (inout) :: a
19     class (bar), intent (in) :: b
20   end subroutine
21
22 end module
23
24
25   use foo
26   type (bar) :: foobar(2)
27   foobar = bar()           ! { dg-error "currently not implemented" }
28 end
29
30 ! { dg-final { cleanup-modules "foo" } }