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

Subversion Repositories openrisc

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

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

Line No. Rev Author Line
1 694 jeremybenn
! { dg-do run }
2
!
3
! PR 44649: [OOP] F2008: storage_size intrinsic
4
!
5
! Contributed by Janus Weil 
6
 
7
type :: t
8
  integer(4) :: i
9
  real(4) :: r
10
end type
11
 
12
type,extends(t) :: t2
13
  integer(4) :: j
14
end type
15
 
16
type(t) :: a
17
type(t), dimension(1:3) :: b
18
class(t), allocatable :: cp
19
 
20
allocate(t2::cp)
21
 
22
if (sizeof(a)        /=  8) call abort()
23
if (storage_size(a)  /= 64) call abort()
24
 
25
if (sizeof(b)        /= 24) call abort()
26
if (storage_size(b)  /= 64) call abort()
27
 
28
if (sizeof(cp)       /=  8) call abort()
29
if (storage_size(cp) /= 96) call abort()
30
 
31
end

powered by: WebSVN 2.1.0

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