re PR lto/41576 (LTO complains about mismatches in common sections)
authorRichard Guenther <rguenther@suse.de>
Thu, 5 Jan 2012 13:28:34 +0000 (13:28 +0000)
committerRichard Biener <rguenth@gcc.gnu.org>
Thu, 5 Jan 2012 13:28:34 +0000 (13:28 +0000)
2012-01-05  Richard Guenther  <rguenther@suse.de>

PR lto/41576
* gfortran.dg/lto/pr41576_0.f90: New testcase.
* gfortran.dg/lto/pr41576_1.f90: Likewise.

From-SVN: r182907

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

index d4a5c9cbf5a216cbe209197c1341f01e550b5fb3..25a52baf9604edc54257a7ea76e7fa4a9301038a 100644 (file)
@@ -1,3 +1,9 @@
+2012-01-05  Richard Guenther  <rguenther@suse.de>
+
+       PR lto/41576
+       * gfortran.dg/lto/pr41576_0.f90: New testcase.
+       * gfortran.dg/lto/pr41576_1.f90: Likewise.
+
 2012-01-04  Jakub Jelinek  <jakub@redhat.com>
 
        PR debug/51695
diff --git a/gcc/testsuite/gfortran.dg/lto/pr41576_0.f90 b/gcc/testsuite/gfortran.dg/lto/pr41576_0.f90
new file mode 100644 (file)
index 0000000..feda0b1
--- /dev/null
@@ -0,0 +1,10 @@
+! { dg-lto-do run }
+! { dg-lto-options { { -O2 -flto -Werror } } }
+
+subroutine foo
+  common /bar/ a, b
+  integer(4) :: a ,b
+  a = 1
+  b = 2
+end
+
diff --git a/gcc/testsuite/gfortran.dg/lto/pr41576_1.f90 b/gcc/testsuite/gfortran.dg/lto/pr41576_1.f90
new file mode 100644 (file)
index 0000000..6aefcc8
--- /dev/null
@@ -0,0 +1,7 @@
+program test
+  common /bar/ c, d
+  integer(4) :: c, d
+  call foo
+  if (c/=1 .or. d/=2) call abort
+end program test
+