OSDN Git Service

2012-01-05 Richard Guenther <rguenther@suse.de>
authorrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 5 Jan 2012 13:28:34 +0000 (13:28 +0000)
committerrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 5 Jan 2012 13:28:34 +0000 (13:28 +0000)
PR lto/41576
* gfortran.dg/lto/pr41576_0.f90: New testcase.
* gfortran.dg/lto/pr41576_1.f90: Likewise.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@182907 138bc75d-0d04-0410-961f-82ee72b054a4

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 d4a5c9c..25a52ba 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
+