OpenCores
URL https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk

Subversion Repositories openrisc_2011-10-31

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.2.2/] [gcc/] [testsuite/] [gfortran.dg/] [boz_3.f90] - Blame information for rev 154

Details | Compare with Previous | View Log

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

powered by: WebSVN 2.1.0

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