libgfortran/ChangeLog:
[official-gcc.git] / gcc / testsuite / gfortran.dg / elemental_by_value_1.f90
blob4fc59471b5b5e0a0950275c4f2b08596fcdf434f
1 ! { dg-do run }
3 ! PR fortran/59026
5 ! Contributed by F-X Coudert <fxcoudert@gcc.gnu.org>
7 ! Failed to dereference the argument in scalarized loop.
9 elemental integer function foo(x)
10 integer, value :: x
11 foo = x + 1
12 end function
14 interface
15 elemental integer function foo(x)
16 integer, value :: x
17 end function
18 end interface
20 if (foo(42) .ne. 43) call abort
21 if (any (foo([0,1]) .ne. [1,2])) call abort
22 end