diff options
author | Thomas Koenig <tkoenig@gcc.gnu.org> | 2020-04-26 14:57:16 +0200 |
---|---|---|
committer | Thomas Koenig <tkoenig@gcc.gnu.org> | 2020-04-26 14:57:16 +0200 |
commit | 870923cd48e1e715120ff68425437e5b346283a1 (patch) | |
tree | 9c651c4cd557fda04e1589aeb1b26b0e55bce3ee | |
parent | 2bf7698e0d2312410e7aaab5ee8447e25d8bf8a6 (diff) | |
download | gcc-870923cd48e1e715120ff68425437e5b346283a1.zip gcc-870923cd48e1e715120ff68425437e5b346283a1.tar.gz gcc-870923cd48e1e715120ff68425437e5b346283a1.tar.bz2 |
Added test case from PR 94737.
2020-04-26 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/94737
* gfortran.dg/binding_label_tests_34.f90: New test case.
-rw-r--r-- | gcc/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/testsuite/gfortran.dg/binding_label_tests_34.f90 | 25 |
2 files changed, 30 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index cce5944..c4f5f83 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2020-04-26 Thomas Koenig <tkoenig@gcc.gnu.org> + + PR fortran/94737 + * gfortran.dg/binding_label_tests_34.f90: New test case. + 2020-04-25 David Edelsohn <dje.gcc@gmail.com> * g++.dg/debug/dwarf2/pr61433.C: Unfail AIX. diff --git a/gcc/testsuite/gfortran.dg/binding_label_tests_34.f90 b/gcc/testsuite/gfortran.dg/binding_label_tests_34.f90 new file mode 100644 index 0000000..f4f1862 --- /dev/null +++ b/gcc/testsuite/gfortran.dg/binding_label_tests_34.f90 @@ -0,0 +1,25 @@ +! { dg-do compile } +! PR 94737 - global symbols are case-insensitive; an error should be +! reported if they match (see F2018, 9.2, paragraph 2). Original +! test case by Lee Busby. + +module foo + +interface +function func1(ii) result (k) bind(c, name="c_func") + integer :: ii + integer :: k +end function func1 +subroutine sub1(ii,jj) bind(c, name="c_Func") ! { dg-error "Global binding name" } + integer :: ii,jj +end subroutine sub1 +end interface + +contains + +function func2(ii) result (k) + integer :: ii + integer :: k + k = func1(ii) ! { dg-error "Global binding name" } +end function func2 +end module foo |