This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/46488] [4.5 regression] server/core_filters.c from apache httpd 2.2.17 miscompiled at -O3
- From: "ebotcazou at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 1 Dec 2010 12:15:27 +0000
- Subject: [Bug middle-end/46488] [4.5 regression] server/core_filters.c from apache httpd 2.2.17 miscompiled at -O3
- Auto-submitted: auto-generated
- References: <bug-46488-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46488
Eric Botcazou <ebotcazou at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |INVALID
--- Comment #37 from Eric Botcazou <ebotcazou at gcc dot gnu.org> 2010-12-01 12:15:02 UTC ---
> If you'd re-use the same type the issue would go away as well (I think).
Yes, this works for the testcase, but probably only because the problematic
fields are now volatile too (APR_RING_ENTRY has volatile fields, APR_RING_HEAD
doesn't). The warning is still emitted for the more natural:
#define APR_RING_SENTINEL(hp, elem, link) \
(struct elem *)((char *)(hp) - APR_OFFSETOF(struct elem, link))
with -Wstrict-aliasing so the underlying aliasing issue is probably still
there.
Closing as "invalid" since the original SPARC issues were fixed elsewhere and
the -O3 issue is an aliasing violation in the source code.