This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: [Bug middle-end/39460] New: strange aliasing warnings compiling pymol under gcc 4.4
- From: Andrew Thomas Pinski <pinskia at gmail dot com>
- To: "gcc-bugzilla at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- Cc: "gcc-bugs at gcc dot gnu dot org" <gcc-bugs at gcc dot gnu dot org>
- Date: Fri, 13 Mar 2009 23:02:55 -0700
- Subject: Re: [Bug middle-end/39460] New: strange aliasing warnings compiling pymol under gcc 4.4
- References: <bug-39460-11113@http.gcc.gnu.org/bugzilla/>
Sent from my iPhone
On Mar 13, 2009, at 9:11 PM, "howarth at nitro dot med dot uc dot edu"
<gcc-bugzilla@gcc.gnu.org> wrote:
There are a number of aliasing warnings coming out of tree-ssa-
structalias.c
when compiling code in pymol which uses their endianswap.h header at
-O3 -Wall.
The warnings are of the form...
In file included from gromacsplugin.cpp:34:
endianswap.h: In function âint put_trx_real(md_file*, float)â:
endianswap.h:117: warning: dereferencing pointer âNâ does break
strict-aliasing
rules
endianswap.h:115: note: initialized from here
endianswap.h: In function âint trx_real(md_file*, float*)â:
endianswap.h:143: warning: dereferencing pointer âNâ does break
strict-aliasing
rules
endianswap.h:135: warning: dereferencing pointer âNâ does break
strict-aliasing
rules
endianswap.h:128: note: initialized from here
endianswap.h:144: warning: dereferencing pointer â<anonymous>â
does break
strict-aliasing rules
endianswap.h:139: warning: dereferencing pointer â<anonymous>â
does break
strict-aliasing rules
endianswap.h:139: note: initialized from here
endianswap.h: In function âint write_trr_timestep(void*, const
molfile_timestep_t*)â:
endianswap.h:117: warning: dereferencing pointer âNâ does break
strict-aliasing
rules
endianswap.h:115: note: initialized from here
endianswap.h:117: warning: dereferencing pointer âNâ does break
strict-aliasing
rules
endianswap.h:115: note: initialized from here
and don't occur under gcc 4.3. I am wondering if these are valid
warnings or a
bug in gcc 4.4? I am attaching the preprocessed source for
gromacsplugin.ii.
The weird part is that just compiling the contents of endianswap.h
doesn't
trigger the warnings. Also many files in pymol use this header and
the errors
appear rather randomly among them. Also I have never seen the 'does
break'
warning from tree-ssa-structalias.c, but only the 'will break'
warning from
c-common.c.
Inling causes warning to show up. The warning is correct though as the
access is via a short but the original type is float.
--
Summary: strange aliasing warnings compiling pymol under
gcc 4.4
Product: gcc
Version: 4.4.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: middle-end
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: howarth at nitro dot med dot uc dot edu
GCC build triplet: i686-apple-darwin9
GCC host triplet: i686-apple-darwin9
GCC target triplet: i686-apple-darwin9
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39460