From 753fc83cd3455fc7f0d29d4583882d283aebfc50 Mon Sep 17 00:00:00 2001 From: Bud Davis Date: Fri, 5 Nov 2010 03:19:13 +0000 Subject: [PATCH] intrinsic_numeric_arg.f: Add test to check error message. 2010-11-04 Bud Davis * gfortran.dg/intrinsic_numeric_arg.f: Add test to check error message. From-SVN: r166347 --- gcc/testsuite/ChangeLog | 5 +++++ gcc/testsuite/gfortran.dg/intrinsic_numeric_arg.f | 9 +++++++++ 2 files changed, 14 insertions(+) create mode 100644 gcc/testsuite/gfortran.dg/intrinsic_numeric_arg.f diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 7bac010f78a..a1fb0b11d0c 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2010-11-04 Bud Davis + + * gfortran.dg/intrinsic_numeric_arg.f: Add test to check + error message. + 2010-11-04 Chao-ying Fu * gcc.target/mips/mips32-dsp.c: Add tests for madd, maddu, msub, diff --git a/gcc/testsuite/gfortran.dg/intrinsic_numeric_arg.f b/gcc/testsuite/gfortran.dg/intrinsic_numeric_arg.f new file mode 100644 index 00000000000..3257d456f75 --- /dev/null +++ b/gcc/testsuite/gfortran.dg/intrinsic_numeric_arg.f @@ -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