[Bug middle-end/46488] [4.5 regression] server/core_filters.c from apache httpd 2.2.17 miscompiled at -O3
rguenth at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Tue Nov 30 10:57:00 GMT 2010
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46488
--- Comment #30 from Richard Guenther <rguenth at gcc dot gnu.org> 2010-11-30 10:15:02 UTC ---
>From a quick look I can see that with -fstrict-aliasing we will never consider
ptr->link.next to alias ptr->list.next (so if they are made to alias via
casting the testcase is invalid).
Which I can see here:
brigade_move(apr_bucket_brigade *b, apr_bucket_brigade *a, apr_bucket *e)
{
apr_bucket *f;
if (e != (struct apr_bucket *)((char *)(&(&(b)->list)->next) - ((long)
(((char *) (&(((struct apr_bucket*)0)->link))) - ((char *) 0)))))
(struct apr_bucket *)((char *)(&(&(b)->list)->next) does exactly this
(would be nice to rewrite the testcase to use offsetof btw).
More information about the Gcc-bugs
mailing list