From 45f159a0a036544bf50ada7bb7927c78d3b2cfb5 Mon Sep 17 00:00:00 2001 From: Thomas Koenig Date: Thu, 1 Nov 2018 11:56:26 +0000 Subject: [PATCH] re PR fortran/46020 (Improve error string for BIND(C) diagnostic for len>1 character return type) 2018-11-01 Thomas Koenig PR fortran/46020 * gfortran.dg/bind_c_usage_32.f90: Really commit. From-SVN: r265717 --- gcc/testsuite/gfortran.dg/bind_c_usage_32.f90 | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 gcc/testsuite/gfortran.dg/bind_c_usage_32.f90 diff --git a/gcc/testsuite/gfortran.dg/bind_c_usage_32.f90 b/gcc/testsuite/gfortran.dg/bind_c_usage_32.f90 new file mode 100644 index 00000000000..c10b0abf707 --- /dev/null +++ b/gcc/testsuite/gfortran.dg/bind_c_usage_32.f90 @@ -0,0 +1,13 @@ +! { dg-do compile } +! PR 46020 - check for clear error message +! { dg-options "" } +FUNCTION F_X(A) bind(c,name='F_X') ! { dg-error "must have length 1" } + CHARACTER*(*) F_X +END FUNCTION + + +FUNCTION F_Y(A) bind(c,name='F_Y') ! { dg-error "must have length 1" } + CHARACTER*(2) F_Y +END FUNCTION + + -- 2.30.2