summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gfortran.dg/complex_parameter_1.f90
blob: 7b631a6cc7325d2c711f1f73a245dda6c2b746a0 (plain)
1
2
3
4
5
6
7
8
9
10
! { dg-do compile }
! { dg-options "-std=f95" }
  integer,parameter :: i = 42
  real,parameter :: x = 17.
  complex,parameter :: z = (1.,2.)
  complex,parameter :: c1 = (i, 0.5) ! { dg-error "Fortran 2003: PARAMETER symbol in complex constant" }
  complex,parameter :: c2 = (x, 0.5) ! { dg-error "Fortran 2003: PARAMETER symbol in complex constant" }
  complex,parameter :: c3 = (z, 0.) ! { dg-error "Fortran 2003: PARAMETER symbol in complex constant" }
  print *, c1, c2, c3
  end