* gfortran.dg/imag_1.f: New test.
* gfortran.dg/imag_2.f: Ditto.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@104539
138bc75d-0d04-0410-961f-
82ee72b054a4
+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.
--- /dev/null
+! { 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
+
--- /dev/null
+! { 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
+