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