Mercurial > hg > CbC > CbC_gcc
annotate gcc/testsuite/gfortran.dg/pointer_2.f90 @ 158:494b0b89df80 default tip
...
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Mon, 25 May 2020 18:13:55 +0900 |
parents | 04ced10e8804 |
children |
rev | line source |
---|---|
111 | 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> | |
4 ! | |
5 program test | |
6 implicit none | |
7 class(*), pointer :: P | |
8 class(*), allocatable :: P2 | |
9 | |
10 allocate(P2, source=convertType(P)) | |
11 | |
12 contains | |
13 | |
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 |