This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]