summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gfortran.dg/shape_9.f90
blob: 6d33f976cb82005baf11c7653bdf6ee0dad9068c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
! { dg-do  run }
! { dg-require-effective-target lto }
! { dg-options "-flto" }
! Check that there are no warnings with LTO for a KIND argument.
!
program test
   implicit none
   real, allocatable :: x(:,:)

   allocate(x(2,5))
   if (any(shape(x) /= [ 2, 5 ])) call abort
   if (any(shape(x,kind=1) /= [ 2, 5 ])) call abort
   if (any(shape(x,kind=2) /= [ 2, 5 ])) call abort
   if (any(shape(x,kind=4) /= [ 2, 5 ])) call abort
   if (any(shape(x,kind=8) /= [ 2, 5 ])) call abort
 end program test