[to-be-committed] [RISC-V] Use Zbkb for general 64 bit constants when profitable
[official-gcc.git] / gcc / testsuite / gfortran.dg / minmaxval_1.f90
blob4466b38f35899283933991df24eec246f6f1d3c0
1 ! { dg-do compile }
2 ! Tests the fix for PR37836 in which the specification expressions for
3 ! y were not simplified because there was no simplifier for minval and
4 ! maxval.
6 ! Contributed by Tobias Burnus <burnus@gcc.gnu.org>
8 ! nint(exp(3.0)) is equal to 20 :-)
10 function fun4a()
11 integer fun4a
12 real y(minval([25, nint(exp(3.0)), 15]))
14 fun4a = size (y, 1)
15 end function fun4a
17 function fun4b()
18 integer fun4b
19 real y(maxval([25, nint(exp(3.0)), 15]))
20 save
22 fun4b = size (y, 1)
23 end function fun4b
25 EXTERNAL fun4a, fun4b
26 integer fun4a, fun4b
27 if (fun4a () .ne. 15) STOP 1
28 if (fun4b () .ne. 25) STOP 2
29 end