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

Subversion Repositories openrisc

[/] [openrisc/] [tags/] [gnu-src/] [gcc-4.5.1/] [gcc-4.5.1-or32-1.0rc3/] [gcc/] [testsuite/] [gfortran.dg/] [c_sizeof_1.f90] - Blame information for rev 516

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 302 jeremybenn
! { dg-do run }
2
! Support F2008's c_sizeof()
3
!
4
integer(4) :: i, j(10)
5
character(4),parameter :: str(1) = "abcd"
6
 
7
! Using F2008's C_SIZEOF
8
i = c_sizeof(i)
9
if (i /= 4) call abort()
10
 
11
i = c_sizeof(j)
12
if (i /= 40) call abort()
13
 
14
i = c_sizeof(str)
15
if (i /= 4) call abort()
16
 
17
i = c_sizeof(str(1))
18
if (i /= 4) call abort()
19
 
20
i = c_sizeof(str(1)(1:3))
21
print *, i
22
if (i /= 3) call abort()
23
 
24
! Using GNU's SIZEOF
25
i = sizeof(i)
26
if (i /= 4) call abort()
27
 
28
i = sizeof(j)
29
if (i /= 40) call abort()
30
 
31
i = sizeof(str)
32
if (i /= 4) call abort()
33
 
34
i = sizeof(str(1))
35
if (i /= 4) call abort()
36
 
37
i = sizeof(str(1)(1:3))
38
if (i /= 3) call abort()
39
end
40
 

powered by: WebSVN 2.1.0

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