diff options
author | Steven G. Kargl <kargls@comcast.net> | 2005-09-22 19:04:13 +0000 |
---|---|---|
committer | Steven G. Kargl <kargl@gcc.gnu.org> | 2005-09-22 19:04:13 +0000 |
commit | 6445dc54f8c1b453e8c15900049b9e852b2b5651 (patch) | |
tree | e3df028b250e8e59091e4e6c9545f7ef3f552d21 /gcc | |
parent | 6970fcc83eae5053ffc876d8f8fb75f9ccb4159c (diff) | |
download | gcc-6445dc54f8c1b453e8c15900049b9e852b2b5651.zip gcc-6445dc54f8c1b453e8c15900049b9e852b2b5651.tar.gz gcc-6445dc54f8c1b453e8c15900049b9e852b2b5651.tar.bz2 |
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
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 + |