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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gfortran.dg/] [storage_size_2.f08] - Blame information for rev 708

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 694 jeremybenn
! { dg-do compile }
2
!
3
! PR 44649: [OOP] F2008: storage_size intrinsic
4
!
5
! Contributed by Janus Weil 
6
 
7
use iso_c_binding, only: c_int, c_sizeof
8
 
9
type, bind(c) :: t
10
  integer(c_int) :: j
11
end type
12
 
13
integer(4) :: i1
14
integer(c_int) :: i2
15
type(t) :: x
16
 
17
print *,c_sizeof(i1)                ! { dg-error "must be an interoperable data entity" }
18
print *,c_sizeof(i2)
19
print *,c_sizeof(x)
20
print *, c_sizeof(ran())            ! { dg-error "must be an interoperable data entity" }
21
 
22
print *,storage_size(1.0,4)
23
print *,storage_size(1.0,3.2)       ! { dg-error "must be INTEGER" }
24
print *,storage_size(1.0,(/1,2/))   ! { dg-error "must be a scalar" }
25
print *,storage_size(1.0,irand())   ! { dg-error "must be a constant" }
26
 
27
end

powered by: WebSVN 2.1.0

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