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

Subversion Repositories openrisc

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

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 47024: [OOP] STORAGE_SIZE (for polymorphic types): Segfault at run time
4
! PR 47189: [OOP] calling STORAGE_SIZE on a NULL-initialized class pointer
5
! PR 47194: [OOP] EXTENDS_TYPE_OF still returns the wrong result if the polymorphic variable is unallocated
6
!
7
! Contributed by Tobias Burnus 
8
 
9
type t
10
  integer(kind=4) :: a
11
end type
12
 
13
class(t), pointer :: x => null()
14
class(t), allocatable :: y
15
 
16
if (storage_size(x)/=32) call abort()
17
if (storage_size(y)/=32) call abort()
18
 
19
allocate(y)
20
 
21
if (storage_size(y)/=32) call abort()
22
 
23
deallocate(y)
24
 
25
if (storage_size(y)/=32) call abort()
26
 
27
end

powered by: WebSVN 2.1.0

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