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
* [Bug fortran/54852] Bogus(?) warnings when compiling gfortran.dg/bind_c_vars.f90 gfortran.dg/bind_c_vars_driver.c with -flto 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 ` 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 2 siblings, 0 replies; 4+ messages in thread From: dominiq at lps dot ens.fr @ 2013-06-29 14:50 UTC (permalink / raw) To: gcc-bugs http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54852 Dominique d'Humieres <dominiq at lps dot ens.fr> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |WAITING Last reconfirmed| |2013-06-29 CC| |jh at suse dot cz Ever confirmed|0 |1 --- Comment #1 from Dominique d'Humieres <dominiq at lps dot ens.fr> --- Still present at revision 200557. ^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug fortran/54852] Bogus(?) warnings when compiling gfortran.dg/bind_c_vars.f90 gfortran.dg/bind_c_vars_driver.c with -flto 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 2 siblings, 0 replies; 4+ messages in thread From: dominiq at lps dot ens.fr @ 2014-02-04 11:39 UTC (permalink / raw) To: gcc-bugs http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54852 Dominique d'Humieres <dominiq at lps dot ens.fr> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |rguenth at gcc dot gnu.org --- Comment #2 from Dominique d'Humieres <dominiq at lps dot ens.fr> --- *** Bug 60057 has been marked as a duplicate of this bug. *** ^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug fortran/54852] Bogus(?) warnings when compiling gfortran.dg/bind_c_vars.f90 gfortran.dg/bind_c_vars_driver.c with -flto 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 2 siblings, 0 replies; 4+ messages in thread From: rguenth at gcc dot gnu.org @ 2014-02-04 11:41 UTC (permalink / raw) To: gcc-bugs http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54852 Richard Biener <rguenth at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |diagnostic, lto Status|WAITING |NEW --- Comment #3 from Richard Biener <rguenth at gcc dot gnu.org> --- LTO warns that /space/rguenther/src/svn/trunk/gcc/testsuite/gfortran.dg/bind_c_vars_driver.c:12:5: warning: type of 'myF90Array2D' does not match original declaration [enabled by default] /space/rguenther/src/svn/trunk/gcc/testsuite/gfortran.dg/bind_c_vars.f90:16:0: note: previously declared here /space/rguenther/src/svn/trunk/gcc/testsuite/gfortran.dg/bind_c_vars_driver.c:11:5: warning: type of 'myF90Array3D' does not match original declaration [enabled by default] /space/rguenther/src/svn/trunk/gcc/testsuite/gfortran.dg/bind_c_vars.f90:15:0: note: previously declared here which effectively means that assignments in GIMPLE between those arrays would be invalid (not array members but whole arrays). Not sure if we can create a testcase that will eventually ICE though. Usually the above also means that the arrays use different alias sets but that's safe here because the alias set of an array is that of its element (and those are compatible here). The issue is that in C a[2][3] is ARRAY_TYPE <ARRAY_TYPE <...> > but GFortran represents a(2)(3) as 1D ARRAY_TYPE <...> and thus both types are not structurally equivalent (which is why LTO warns). Not sure if this case is motivation enough to treat arrays structurally the same if their overall size is the same. ^ 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).