aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gfortran.dg/pr107215.f90
blob: 2c2a0ca750200167837b8a6be7d8205c4b218886 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
! { dg-do compile }
! PR fortran/107215 - ICE in gfc_real2real and gfc_complex2complex
! Contributed by G.Steinmetz

program p
  double precision, parameter :: z = 1.0d0
  complex :: x(1)
  real    :: y(1)
  x = [real :: -'1'] * z      ! { dg-error "Operand of unary numeric operator" }
  y = z * [real :: -'1']      ! { dg-error "Operand of unary numeric operator" }
  x = [real :: -(.true.)] * z ! { dg-error "Operand of unary numeric operator" }
  y = z * [real :: -(.true.)] ! { dg-error "Operand of unary numeric operator" }
  x = [complex :: -'1'] * z   ! { dg-error "Operand of unary numeric operator" }
  y = z * [complex :: -'1']   ! { dg-error "Operand of unary numeric operator" }
  x = [complex :: -(.true.)] * z ! { dg-error "Operand of unary numeric operator" }
  y = z * [complex :: -(.true.)] ! { dg-error "Operand of unary numeric operator" }
end