c: Fix up pointer types to may_alias structures [PR114493]
[official-gcc.git] / gcc / testsuite / gfortran.dg / pointer_2.f90
bloba9b039d350b5dc13b752d013da6a442a0d71c018
1 ! { dg-do compile }
2 ! Check that the compiler reports the errors, but does not segfault.
3 ! Contributed by: Andre Vehreschild <vehre@gcc.gnu.org>
5 program test
6 implicit none
7 class(*), pointer :: P
8 class(*), allocatable :: P2
10 allocate(P2, source=convertType(P))
12 contains
14 function convertType(in) ! { dg-error "must be dummy, allocatable or pointer" }
15 class(*), intent(in) :: in
16 class(*) :: convertType
17 end function
18 end program test