re PR fortran/46020 (Improve error string for BIND(C) diagnostic for len>1 character...
authorThomas Koenig <tkoenig@gcc.gnu.org>
Thu, 1 Nov 2018 11:56:26 +0000 (11:56 +0000)
committerThomas Koenig <tkoenig@gcc.gnu.org>
Thu, 1 Nov 2018 11:56:26 +0000 (11:56 +0000)
2018-11-01  Thomas Koenig  <tkoenig@gcc.gnu.org>

    PR fortran/46020
    * gfortran.dg/bind_c_usage_32.f90: Really commit.

From-SVN: r265717

gcc/testsuite/gfortran.dg/bind_c_usage_32.f90 [new file with mode: 0644]

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 (file)
index 0000000..c10b0ab
--- /dev/null
@@ -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
+
+