OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gfortran.dg/] [minmaxval_1.f90] - Blame information for rev 694

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 694 jeremybenn
! { 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.
5
!
6
! Contributed by Tobias Burnus 
7
!
8
! nint(exp(3.0)) is equal to 20 :-)
9
!
10
      function fun4a()
11
         integer fun4a
12
         real y(minval([25, nint(exp(3.0)), 15]))
13
 
14
        fun4a = size (y, 1)
15
       end function fun4a
16
 
17
      function fun4b()
18
         integer fun4b
19
         real y(maxval([25, nint(exp(3.0)), 15]))
20
         save
21
 
22
         fun4b = size (y, 1)
23
      end function fun4b
24
 
25
      EXTERNAL fun4a, fun4b
26
      integer fun4a, fun4b
27
      if (fun4a () .ne. 15) call abort
28
      if (fun4b () .ne. 25) call abort
29
      end

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.