1! { 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 <burnus@gcc.gnu.org> 8 9type t 10 integer(kind=4) :: a 11end type 12 13class(t), pointer :: x => null() 14class(t), allocatable :: y 15 16if (storage_size(x)/=32) call abort() 17if (storage_size(y)/=32) call abort() 18 19allocate(y) 20 21if (storage_size(y)/=32) call abort() 22 23deallocate(y) 24 25if (storage_size(y)/=32) call abort() 26 27end 28