From patchwork Fri Nov 5 02:33:42 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: Additional test case Date: Thu, 04 Nov 2010 16:33:42 -0000 From: Davis, Jimmie X-Patchwork-Id: 70206 Message-Id: <00061D6890083E418784FC390A35E43701D18C@SXMB1PG.SYSTEMS.SMU.EDU> To: "fortran@gcc.gnu.org" Cc: "gcc-patches@gcc.gnu.org" This test case adds the test for a non-numeric argument to certain intrinsics. 2010-11-04 Bud Davis * gfortran.dg/intrinsic_numeric_arg.f: Add test to check error message. Index: gcc/gcc/testsuite/gfortran.dg/intrinsic_numeric_arg.f =================================================================== --- gcc/gcc/testsuite/gfortran.dg/intrinsic_numeric_arg.f (revision 0) +++ gcc/gcc/testsuite/gfortran.dg/intrinsic_numeric_arg.f (revision 0) @@ -0,0 +1,9 @@ +! this test checks for a non-numeric argument to an +! intrinsic function (of which ABS() is one of many). +! { dg-do compile } + LOGICAL Z + CHARACTER A + REAL R + R = ABS(Z) ! { dg-error " must be a numeric type" } + R = ABS(A) ! { dg-error " must be a numeric type" } + END