diff options
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/testsuite/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/testsuite/gfortran.dg/imag_1.f | 11 | ||||
-rw-r--r-- | gcc/testsuite/gfortran.dg/imag_2.f | 15 |
3 files changed, 32 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 34c6f4a..6277f2f 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -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. diff --git a/gcc/testsuite/gfortran.dg/imag_1.f b/gcc/testsuite/gfortran.dg/imag_1.f new file mode 100644 index 0000000..66155ae --- /dev/null +++ b/gcc/testsuite/gfortran.dg/imag_1.f @@ -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 index 0000000..7b2b545 --- /dev/null +++ b/gcc/testsuite/gfortran.dg/imag_2.f @@ -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 + |