Commit 6445dc54 by Steven G. Kargl Committed by Steven G. Kargl

re PR fortran/23516 (IMAG is not a generic function when implicit none is declared)

PR fortran/23516
* gfortran.dg/imag_1.f: New test.
* gfortran.dg/imag_2.f: Ditto.

From-SVN: r104539
parent 6970fcc8
2005-09-22 Steven G. Kargl <kargls@comcast.net>
PR fortran/23516
* gfortran.dg/imag_1.f: New test.
* gfortran.dg/imag_2.f: Ditto.
2005-09-22 J"orn Rennecke <joern.rennecke@st.com>
* gcc.dg/intmax_t-1.c: Remove sh*-*-elf from dg-error statement.
! { dg-do compile }
program bug
implicit none
double complex z
double precision x,y
z = cmplx(1.e0_8,2.e0_8)
y = imag(z)
y = imagpart(z)
x = realpart(z)
end
! { dg-do compile }
! { dg-options "-std=f95" }
program bug
implicit none
double complex z
double precision x
z = cmplx(1.e0_8, 2.e0_8)
x = imag(z) ! { dg-error "has no IMPLICIT type" "" }
x = imagpart(z) ! { dg-error "has no IMPLICIT type" "" }
x = realpart(z) ! { dg-error "has no IMPLICIT type" "" }
x = imag(x) ! { dg-error "has no IMPLICIT type" "" }
x = imagpart(x) ! { dg-error "has no IMPLICIT type" "" }
x = realpart(x) ! { dg-error "has no IMPLICIT type" "" }
end
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment