From patchwork Thu Jan 5 13:26:15 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: testcase for PR41576 From: Richard Guenther X-Patchwork-Id: 134470 Message-Id: To: gcc-patches@gcc.gnu.org Date: Thu, 5 Jan 2012 14:26:15 +0100 (CET) Which was fixed in 4.6 already. We only warn for type mismatches for symbols in different TUs if they are not structurally compatible. Richard. 2012-01-05 Richard Guenther PR lto/41576 * gfortran.dg/lto/pr41576_0.f90: New testcase. * gfortran.dg/lto/pr41576_1.f90: Likewise. Index: gcc/testsuite/gfortran.dg/lto/pr41576_0.f90 =================================================================== --- gcc/testsuite/gfortran.dg/lto/pr41576_0.f90 (revision 0) +++ gcc/testsuite/gfortran.dg/lto/pr41576_0.f90 (revision 0) @@ -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 + Index: gcc/testsuite/gfortran.dg/lto/pr41576_1.f90 =================================================================== --- gcc/testsuite/gfortran.dg/lto/pr41576_1.f90 (revision 0) +++ gcc/testsuite/gfortran.dg/lto/pr41576_1.f90 (revision 0) @@ -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 +