aboutsummaryrefslogtreecommitdiff
path: root/flang/test/Semantics/expr-errors05.f90
blob: 43133c836f3b47a7f00bbfbffa5f8d49b38ff870 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
! RUN: %python %S/test_errors.py %s %flang_fc1 -Werror -pedantic
!PORTABILITY: nonstandard usage: generalized COMPLEX constructor [-Wcomplex-constructor]
!PORTABILITY: Real part of complex constructor is not scalar [-Wcomplex-constructor]
complex, parameter :: z1(*) = ([1.,2.], 3.)
!PORTABILITY: nonstandard usage: generalized COMPLEX constructor [-Wcomplex-constructor]
!PORTABILITY: Imaginary part of complex constructor is not scalar [-Wcomplex-constructor]
complex, parameter :: z2(*) = (4., [5.,6.])
real, parameter :: aa(*) = [7.,8.]
!PORTABILITY: Real part of complex literal constant is not scalar [-Wcomplex-constructor]
complex, parameter :: z3(*) = (aa, 9.)
!PORTABILITY: Imaginary part of complex literal constant is not scalar [-Wcomplex-constructor]
complex, parameter :: z4(*) = (10., aa)
!We need a nonzero exit status to make test_errors.py look at messages :-(
!WARNING: division by zero [-Wfolding-exception]
real, parameter :: xxx = 1./0.
end