From: kargl Date: Thu, 22 Sep 2005 19:04:13 +0000 (+0000) Subject: PR fortran/23516 X-Git-Url: http://git.sourceforge.jp/view?p=pf3gnuchains%2Fgcc-fork.git;a=commitdiff_plain;h=45770a4480592be9d675c74ce0f44a460d1902be;ds=sidebyside PR fortran/23516 * 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 --- diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 34c6f4aaee9..6277f2fcc77 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,9 @@ +2005-09-22 Steven G. Kargl + + PR fortran/23516 + * gfortran.dg/imag_1.f: New test. + * gfortran.dg/imag_2.f: Ditto. + 2005-09-22 J"orn Rennecke * 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 00000000000..66155ae5aa6 --- /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 00000000000..7b2b54591fa --- /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 +