gcc/testsuite/gfortran.dg/pdt_20.f03
raw| 1 | ! { dg-do run } |
| 2 | ! |
| 3 | ! Tests the fix for PR82622. |
| 4 | ! |
| 5 | ! Contributed by Gerhard Steinmetz <[email protected]> |
| 6 | ! |
| 7 | program p |
| 8 | type t(a) |
| 9 | integer, len :: a |
| 10 | end type |
| 11 | type t2(b) |
| 12 | integer, len :: b |
| 13 | type(t(1)) :: r(b) |
| 14 | end type |
| 15 | type(t2(:)), allocatable :: x |
| 16 | allocate (t2(3) :: x) ! Used to segfault in trans-array.c. |
| 17 | if (x%b .ne. 3) STOP 1 |
| 18 | if (x%b .ne. size (x%r, 1)) STOP 2 |
| 19 | if (any (x%r%a .ne. 1)) STOP 3 |
| 20 | end |