OSDN Git Service

PR fortran/23516
authorkargl <kargl@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 22 Sep 2005 19:04:13 +0000 (19:04 +0000)
committerkargl <kargl@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 22 Sep 2005 19:04:13 +0000 (19:04 +0000)
* 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

gcc/testsuite/ChangeLog
gcc/testsuite/gfortran.dg/imag_1.f [new file with mode: 0644]
gcc/testsuite/gfortran.dg/imag_2.f [new file with mode: 0644]

index 34c6f4a..6277f2f 100644 (file)
@@ -1,3 +1,9 @@
+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.
 2005-09-22  J"orn Rennecke <joern.rennecke@st.com>
 
        * gcc.dg/intmax_t-1.c: Remove sh*-*-elf from dg-error statement.
diff --git a/gcc/testsuite/gfortran.dg/imag_1.f b/gcc/testsuite/gfortran.dg/imag_1.f
new file mode 100644 (file)
index 0000000..66155ae
--- /dev/null
@@ -0,0 +1,11 @@
+! { 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
+
diff --git a/gcc/testsuite/gfortran.dg/imag_2.f b/gcc/testsuite/gfortran.dg/imag_2.f
new file mode 100644 (file)
index 0000000..7b2b545
--- /dev/null
@@ -0,0 +1,15 @@
+! { 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
+