diff gcc/testsuite/gfortran.dg/common_2.f90 @ 111:04ced10e8804

gcc 7
author kono
date Fri, 27 Oct 2017 22:46:09 +0900
parents
children 84e7813d76e9
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/gcc/testsuite/gfortran.dg/common_2.f90	Fri Oct 27 22:46:09 2017 +0900
@@ -0,0 +1,15 @@
+! { dg-do run }
+! The equivalence was causing us to miss out c when laying out the common
+! block.
+program common_2
+  common /block/ a, b, c, d
+  integer a, b, c, d, n
+  dimension n(4)
+  equivalence (a, n(1))
+  equivalence (c, n(3))
+  a = 1
+  b = 2
+  c = 3
+  d = 4
+  if (any (n .ne. (/1, 2, 3, 4/))) call abort
+end program