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

Subversion Repositories openrisc

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

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 694 jeremybenn
! { dg-do run }
2
! Tests the fix for PR35780, in which the assignment for C was not
3
! scalarized in expr.c.
4
!
5
! Contributed by Dick Hendrickson 
6
!
7
MODULE MODS
8
  integer, parameter :: N = 10
9
  INTEGER, PARAMETER, DIMENSION(N) ::  A = [(i, i = 1, N)]
10
  INTEGER, PARAMETER, DIMENSION(N) ::  B = [(i - 5, i = 1, N)]
11
  INTEGER, PARAMETER, DIMENSION(N)  :: C = ISHFTC(3, B, 5)   !ICE
12
  INTEGER, PARAMETER, DIMENSION(N)  :: D = ISHFTC(A, 3, 5)   !  OK
13
  INTEGER, PARAMETER, DIMENSION(N)  :: E = ISHFTC(A, B, 5)   !  OK
14
 
15
END MODULE MODS
16
 
17
  use mods
18
  integer, dimension(N) :: X = A
19
  integer, dimension(N) :: Y = B
20
 
21
! Check the simplifed expressions against the library
22
  if (any (ISHFTC(3, Y, 5) /= C)) call abort ()
23
  if (any (ISHFTC(X, 3, 5) /= D)) call abort ()
24
  if (any (ISHFTC(X, Y, 5) /= E)) call abort ()
25
end
26
! { dg-final { cleanup-modules "mods" } }

powered by: WebSVN 2.1.0

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