gcc/testsuite/gfortran.dg/class_allocate_24.f90
raw| 1 | ! { dg-do compile } |
| 2 | ! { dg-options "-fcheck=mem" } |
| 3 | ! |
| 4 | ! Compile time check only, to test that the ICE is fixed in the assignment of the |
| 5 | ! default initializer of the class to sf. |
| 6 | |
| 7 | implicit none |
| 8 | |
| 9 | type :: t |
| 10 | integer, pointer :: data => null () |
| 11 | end type |
| 12 | |
| 13 | class(t), dimension(:), allocatable :: sf |
| 14 | allocate (t :: sf (1)) |
| 15 | end |
| 16 |