Patchwork Additional test case

login
register
mail settings
Submitter Davis, Jimmie
Date Nov. 5, 2010, 2:33 a.m.
Message ID <00061D6890083E418784FC390A35E43701D18C@SXMB1PG.SYSTEMS.SMU.EDU>
Download mbox | patch
Permalink /patch/70206/
State New
Headers show

Comments

Davis, Jimmie - Nov. 5, 2010, 2:33 a.m.
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.
Steve Kargl - Nov. 5, 2010, 2:48 a.m.
On Fri, Nov 05, 2010 at 02:33:42AM +0000, Davis, Jimmie wrote:
> 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.
> 
> 

OK.

Have you decided whether the if-block is dead code?
Davis, Jimmie - Nov. 5, 2010, 3:14 a.m.

Patch

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