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

Subversion Repositories openrisc

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

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 694 jeremybenn
! { dg-do compile }
2
! PR fortran/50514
3
program ishft_3
4
 
5
   implicit none
6
 
7
   integer j, m
8
 
9
   m = 42
10
   !
11
   ! These should compile.
12
   !
13
   j = ishft(m, 16)
14
   j = ishft(m, -16)
15
   j = ishftc(m, 16)
16
   j = ishftc(m, -16)
17
   !
18
   ! These should issue an error.
19
   !
20
   j = ishft(m, 640)    ! { dg-error "absolute value of SHIFT" }
21
   j = ishftc(m, 640)   ! { dg-error "absolute value of SHIFT" }
22
   j = ishft(m, -640)   ! { dg-error "absolute value of SHIFT" }
23
   j = ishftc(m, -640)  ! { dg-error "absolute value of SHIFT" }
24
 
25
   ! abs(SHIFT) must be <= SIZE
26
 
27
   j = ishftc(m,  1, 2)
28
   j = ishftc(m,  1, 2)
29
   j = ishftc(m, -1, 2)
30
   j = ishftc(m, -1, 2)
31
 
32
   j = ishftc(m,  10, 2)! { dg-error "absolute value of SHIFT" }
33
   j = ishftc(m,  10, 2)! { dg-error "absolute value of SHIFT" }
34
   j = ishftc(m, -10, 2)! { dg-error "absolute value of SHIFT" }
35
   j = ishftc(m, -10, 2)! { dg-error "absolute value of SHIFT" }
36
 
37
   j = ishftc(m, 1, -2) ! { dg-error "must be positive" }
38
end program

powered by: WebSVN 2.1.0

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