Additional test case
Davis, Jimmie
jimmied@mail.smu.edu
Fri Nov 5 02:35:00 GMT 2010
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
More information about the Fortran
mailing list