public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/54852] New: Bogus(?) warnings when compiling gfortran.dg/bind_c_vars.f90 gfortran.dg/bind_c_vars_driver.c with -flto
@ 2012-10-07 21:46 dominiq at lps dot ens.fr
  2013-06-29 14:50 ` [Bug fortran/54852] " dominiq at lps dot ens.fr
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: dominiq at lps dot ens.fr @ 2012-10-07 21:46 UTC (permalink / raw)
  To: gcc-bugs


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.


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2014-02-04 11:41 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-10-07 21:46 [Bug fortran/54852] New: Bogus(?) warnings when compiling gfortran.dg/bind_c_vars.f90 gfortran.dg/bind_c_vars_driver.c with -flto dominiq at lps dot ens.fr
2013-06-29 14:50 ` [Bug fortran/54852] " dominiq at lps dot ens.fr
2014-02-04 11:39 ` dominiq at lps dot ens.fr
2014-02-04 11:41 ` rguenth at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).