annotate gcc/testsuite/gfortran.dg/transfer_array_intrinsic_5.f90 @ 144:8f4e72ab4e11

fix segmentation fault caused by nothing next cur_op to end
author Takahiro SHIMIZU <anatofuz@cr.ie.u-ryukyu.ac.jp>
date Sun, 23 Dec 2018 21:23:56 +0900
parents 04ced10e8804
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 ! PR35680 - used to ICE because the argument of SIZE, being in a restricted
kono
parents:
diff changeset
3 ! expression, was not checked if it too is restricted or is a variable. Since
kono
parents:
diff changeset
4 ! it is neither, an error should be produced.
kono
parents:
diff changeset
5 !
kono
parents:
diff changeset
6 ! Contributed by Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
kono
parents:
diff changeset
7 !
kono
parents:
diff changeset
8 program main
kono
parents:
diff changeset
9 print *, foo (), bar (), foobar ()
kono
parents:
diff changeset
10 contains
kono
parents:
diff changeset
11 function foo ()
kono
parents:
diff changeset
12 integer foo(size (transfer (x, [1]))) ! { dg-error "cannot appear" }
kono
parents:
diff changeset
13 real x
kono
parents:
diff changeset
14 end function
kono
parents:
diff changeset
15 function bar()
kono
parents:
diff changeset
16 real x
kono
parents:
diff changeset
17 integer bar(size (transfer (x, [1]))) ! { dg-error "cannot appear" }
kono
parents:
diff changeset
18 end function
kono
parents:
diff changeset
19 function foobar() ! { dg-error "no IMPLICIT" }
kono
parents:
diff changeset
20 implicit none
kono
parents:
diff changeset
21 integer foobar(size (transfer (x, [1]))) ! { dg-error "used before" }
kono
parents:
diff changeset
22 real x
kono
parents:
diff changeset
23 end function
kono
parents:
diff changeset
24 end program