gcc/testsuite/gfortran.dg/reshape_8.f90
raw| 1 | ! { dg-do compile } |
| 2 | ! { dg-options "-fdump-tree-original" } |
| 3 | ! |
| 4 | ! Test the fix for PR96624 in which an attempt was made to assign |
| 5 | ! to the zero length temporary created by reshape, resulting in a segfault. |
| 6 | ! |
| 7 | ! Contributed by Dong Shenpo <[email protected]> |
| 8 | ! |
| 9 | program test |
| 10 | integer :: a(2,0) |
| 11 | a = reshape([1,2,3,4], [2,0]) |
| 12 | print *, a |
| 13 | end |
| 14 | ! { dg-final { scan-tree-dump-not "data..0. =" "original" } } |