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