This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/33374] GCC 4.1.2 produce wrong assembler code with -O2 option enabled.
- From: "rask at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 11 Sep 2007 21:25:09 -0000
- Subject: [Bug target/33374] GCC 4.1.2 produce wrong assembler code with -O2 option enabled.
- References: <bug-33374-15076@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #6 from rask at gcc dot gnu dot org 2007-09-11 21:25 -------
That code looks very similar to the doubly linked lists that AmigaOS
exec.library uses. Just remove the XL and XLM prefixes from the names and it's
the same. That code indeed plays nasty type casting tricks to reuse a NULL
pointer in the list head, so as to save four bytes of memory. I guess aliasing
violations were not a major concern when that code was written back in about
1985 or so. :-) Maybe the AROS project has revised code which survives alias
analysis.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33374