re PR fortran/39239 (Reject SAVEd variables EQUIVALENCEd to a COMMON)
authorNicolas Koenig <koenigni@student.ethz.ch>
Wed, 22 Mar 2017 19:08:36 +0000 (20:08 +0100)
committerNicolas Koenig <koenigni@gcc.gnu.org>
Wed, 22 Mar 2017 19:08:36 +0000 (19:08 +0000)
2017-03-22 Nicolas Koenig <koenigni@student.ethz.ch>

PR fortran/39239
* gfortran.dg/equiv_constraint_bind_c.f90: New test.

From-SVN: r246405

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

index 2ad0670cc6a2face82e88419a9cc8eb1607b7b5b..555671f7d6afeab7193bb8729155dbf081d3b6c7 100644 (file)
@@ -1,3 +1,8 @@
+2017-03-22 Nicolas Koenig <koenigni@student.ethz.ch>
+
+       PR fortran/39239        
+       * gfortran.dg/equiv_constraint_bind_c.f90: New test.
+
 2017-03-22  Jakub Jelinek  <jakub@redhat.com>
 
        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 (file)
index 0000000..4826475
--- /dev/null
@@ -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
+