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

Subversion Repositories openrisc

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

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 694 jeremybenn
! { dg-do run }
2
! { dg-options "-std=gnu" }
3
! Test that the BOZ constant on the RHS, which are of different KIND than
4
! the LHS, are correctly converted.
5
!
6
program boz
7
 
8
   implicit none
9
 
10
   integer(1), parameter :: b1 = b'000000000001111'
11
   integer(2), parameter :: b2 = b'00000000000000000111000011110000'
12
   integer(4), parameter :: &
13
   &  b4 = b'0000000000000000000000000000000001110000111100001111000011110000'
14
 
15
   integer(1), parameter :: o1 = o'0012'
16
   integer(2), parameter :: o2 = o'0004321'
17
   integer(4), parameter :: o4 = o'0000000043210765'
18
 
19
   integer(1), parameter :: z1 = z'0a'
20
   integer(2), parameter :: z2 = z'00ab'
21
   integer(4), parameter :: z4 = z'0000dead'
22
 
23
   if (b1 /= 15_1) call abort
24
   if (b2 /= 28912_2) call abort
25
   if (b4 /= 1894838512_4) call abort
26
 
27
   if (o1 /= 10_1) call abort
28
   if (o2 /= 2257_2) call abort
29
   if (o4 /= 9245173_4) call abort
30
 
31
   if (z1 /= 10_1) call abort
32
   if (z2 /= 171_2) call abort
33
   if (z4 /= 57005_4) call abort
34
 
35
end program boz

powered by: WebSVN 2.1.0

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