From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27244 invoked by alias); 7 Oct 2012 21:46:56 -0000 Received: (qmail 27187 invoked by uid 48); 7 Oct 2012 21:46:43 -0000 From: "dominiq at lps dot ens.fr" To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/54852] New: Bogus(?) warnings when compiling gfortran.dg/bind_c_vars.f90 gfortran.dg/bind_c_vars_driver.c with -flto Date: Sun, 07 Oct 2012 21:46:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: fortran X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: dominiq at lps dot ens.fr X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Message-ID: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2012-10/txt/msg00626.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54852 Bug #: 54852 Summary: Bogus(?) warnings when compiling gfortran.dg/bind_c_vars.f90 gfortran.dg/bind_c_vars_driver.c with -flto Classification: Unclassified Product: gcc Version: 4.8.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran AssignedTo: unassigned@gcc.gnu.org ReportedBy: dominiq@lps.ens.fr When compiling gfortran.dg/bind_c_vars.f90 gfortran.dg/bind_c_vars_driver.c with -flto, one gets the following warnings which seem bogus: [macbook] f90/bug% /opt/gcc/gcc4.8a/bin/gfortran -flto /opt/gcc/work/gcc/testsuite/gfortran.dg/bind_c_vars.f90 /opt/gcc/work/gcc/testsuite/gfortran.dg/bind_c_vars_driver.c In file included from /opt/gcc/work/gcc/testsuite/gfortran.dg/bind_c_vars.f90:16:0, from :0: /opt/gcc/work/gcc/testsuite/gfortran.dg/bind_c_vars_driver.c:12:5: warning: type of 'myF90Array2D' does not match original declaration [enabled by default] int myF90Array2D[2][3]; /* B in bind_c_vars */ ^ In file included from :0:0: /opt/gcc/work/gcc/testsuite/gfortran.dg/bind_c_vars.f90:16:0: note: previously declared here integer(c_int), bind(c, name="myF90Array2D") :: B(3, 2) ^ In file included from /opt/gcc/work/gcc/testsuite/gfortran.dg/bind_c_vars.f90:16:0, from :0: /opt/gcc/work/gcc/testsuite/gfortran.dg/bind_c_vars_driver.c:11:5: warning: type of 'myF90Array3D' does not match original declaration [enabled by default] int myF90Array3D[10][5][18]; /* A in bind_c_vars */ ^ In file included from :0:0: /opt/gcc/work/gcc/testsuite/gfortran.dg/bind_c_vars.f90:15:0: note: previously declared here integer(c_int), bind(c, name="myF90Array3D") :: A(18, 3:7, 10) ^ The executable runs fine.