view gcc/testsuite/gfortran.dg/data_value_1.f90 @ 131:84e7813d76e9

gcc-8.2
author mir3636
date Thu, 25 Oct 2018 07:37:49 +0900
parents 04ced10e8804
children
line wrap: on
line source

! { dg-do compile }
! Test the fix for PR40402, in which it was not detected that X
! is not a constant and so the DATA statement did not have
! a constant value expression.
!
! Modified dg-error for PR41807
!
! Contributed by Philippe Marguinaud <philippe.marguinaud@meteo.fr>
!
      TYPE POINT
        REAL :: X 
      ENDTYPE
      TYPE(POINT) :: P
      DATA P / POINT(1.+X) / ! { dg-error "non-constant initialization" }
      print *, p
      END