annotate gcc/testsuite/gfortran.dg/alloc_comp_constraint_4.f90 @ 111:04ced10e8804

gcc 7
author kono
date Fri, 27 Oct 2017 22:46:09 +0900
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
111
kono
parents:
diff changeset
1 ! { dg-do compile }
kono
parents:
diff changeset
2 ! Tests the fix for PR29422, in which function results
kono
parents:
diff changeset
3 ! were not tested for suitability in IO statements.
kono
parents:
diff changeset
4 !
kono
parents:
diff changeset
5 ! Contributed by Dominique d'Humieres <dominiq@lps.ens.fr>
kono
parents:
diff changeset
6 !
kono
parents:
diff changeset
7 Type drv
kono
parents:
diff changeset
8 Integer :: i
kono
parents:
diff changeset
9 Integer, allocatable :: arr(:)
kono
parents:
diff changeset
10 End type drv
kono
parents:
diff changeset
11
kono
parents:
diff changeset
12 print *, fun1 () ! { dg-error "cannot have ALLOCATABLE" }
kono
parents:
diff changeset
13
kono
parents:
diff changeset
14 contains
kono
parents:
diff changeset
15 Function fun1 ()
kono
parents:
diff changeset
16
kono
parents:
diff changeset
17 Type(drv) :: fun1
kono
parents:
diff changeset
18 fun1%i = 10
kono
parents:
diff changeset
19 end function fun1
kono
parents:
diff changeset
20 end
kono
parents:
diff changeset
21