Debian Codegraph @

gcc/testsuite/gfortran.dg/pr107215.f90

raw
1 ! { dg-do compile }
2 ! PR fortran/107215 - ICE in gfc_real2real and gfc_complex2complex
3 ! Contributed by G.Steinmetz
4
5 program p
6 double precision, parameter :: z = 1.0d0
7 complex :: x(1)
8 real :: y(1)
9 x = [real :: -'1'] * z ! { dg-error "Operand of unary numeric operator" }
10 y = z * [real :: -'1'] ! { dg-error "Operand of unary numeric operator" }
11 x = [real :: -(.true.)] * z ! { dg-error "Operand of unary numeric operator" }
12 y = z * [real :: -(.true.)] ! { dg-error "Operand of unary numeric operator" }
13 x = [complex :: -'1'] * z ! { dg-error "Operand of unary numeric operator" }
14 y = z * [complex :: -'1'] ! { dg-error "Operand of unary numeric operator" }
15 x = [complex :: -(.true.)] * z ! { dg-error "Operand of unary numeric operator" }
16 y = z * [complex :: -(.true.)] ! { dg-error "Operand of unary numeric operator" }
17 end