t1.f90 ------ subroutine foo common /bar/ a, b integer(4) :: a ,b a = 1 b = 2 end
t2.f90 ------ program test common /bar/ c, d integer(4) :: c, d call foo if (c/=1 .or. d/=2) call abort end program test > ./gfortran -B. -B ../x86_64-unknown-linux-gnu/libgfortran/.libs -o t t1.f90 > t2.f90 -flto t1.f90:2:0: warning: type of 'bar' does not match original declaration t2.f90:2:0: note: previously declared here testcase reduced from for example 436.cactusADM -- Summary: LTO complains about mismatches in common sections Product: gcc Version: 4.5.0 Status: UNCONFIRMED Keywords: wrong-code, diagnostic Severity: normal Priority: P3 Component: lto AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: rguenth at gcc dot gnu dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41576