This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/54852] New: Bogus(?) warnings when compiling gfortran.dg/bind_c_vars.f90 gfortran.dg/bind_c_vars_driver.c with -flto
- From: "dominiq at lps dot ens.fr" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sun, 07 Oct 2012 21:46:42 +0000
- Subject: [Bug fortran/54852] New: Bogus(?) warnings when compiling gfortran.dg/bind_c_vars.f90 gfortran.dg/bind_c_vars_driver.c with -flto
- Auto-submitted: auto-generated
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.