From 9cdf0363039a61e0949c88435436918d432201c3 Mon Sep 17 00:00:00 2001 From: Nicolas Koenig Date: Wed, 22 Mar 2017 20:08:36 +0100 Subject: [PATCH] re PR fortran/39239 (Reject SAVEd variables EQUIVALENCEd to a COMMON) 2017-03-22 Nicolas Koenig PR fortran/39239 * gfortran.dg/equiv_constraint_bind_c.f90: New test. From-SVN: r246405 --- gcc/testsuite/ChangeLog | 5 +++++ gcc/testsuite/gfortran.dg/equiv_constraint_bind_c.f90 | 11 +++++++++++ 2 files changed, 16 insertions(+) create mode 100644 gcc/testsuite/gfortran.dg/equiv_constraint_bind_c.f90 diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 2ad0670cc6a..555671f7d6a 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2017-03-22 Nicolas Koenig + + PR fortran/39239 + * gfortran.dg/equiv_constraint_bind_c.f90: New test. + 2017-03-22 Jakub Jelinek PR c++/80141 diff --git a/gcc/testsuite/gfortran.dg/equiv_constraint_bind_c.f90 b/gcc/testsuite/gfortran.dg/equiv_constraint_bind_c.f90 new file mode 100644 index 00000000000..4826475ecf7 --- /dev/null +++ b/gcc/testsuite/gfortran.dg/equiv_constraint_bind_c.f90 @@ -0,0 +1,11 @@ +! Testcase for using EQUIVALENCE with BIND(C) +! See PR fortran/39239 +! { dg-do compile } +module m + use iso_c_binding + implicit none + integer(c_int) :: i1, i2 + bind(C) :: i2 + equivalence(i1,i2) ! { dg-error "EQUIVALENCE attribute conflicts with BIND" } +end module m + -- 2.30.2