This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Additional test case
- From: "Davis, Jimmie" <jimmied at mail dot smu dot edu>
- To: "fortran at gcc dot gnu dot org" <fortran at gcc dot gnu dot org>
- Cc: "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>
- Date: Fri, 5 Nov 2010 02:33:42 +0000
- Subject: Additional test case
This test case adds the test for a non-numeric argument to certain intrinsics.
2010-11-04 Bud Davis <jimmied@smu.edu>
* 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