[Issue 4169] building dmd with a modern gcc produces a buggy compiler
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sun May 9 19:39:12 PDT 2010
http://d.puremagic.com/issues/show_bug.cgi?id=4169
Walter Bright <bugzilla at digitalmars.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |bugzilla at digitalmars.com
--- Comment #1 from Walter Bright <bugzilla at digitalmars.com> 2010-05-09 19:39:10 PDT ---
Wikipedia says: "To enable such optimizations in a predictable manner, the ISO
standard for the C programming language (including its newer C99 edition)
specifies that it is illegal (with some exceptions) for pointers of different
types to reference the same memory location. This rule, known as "strict
aliasing", allows impressive increases in performance[citation needed], but has
been known to break some otherwise valid code. Several software projects
intentionally violate this portion of the C99 standard. For example, Python 2.x
did so to implement reference counting,[1] and required changes to the basic
object structs in Python 3 to enable this optimisation. The Linux kernel does
this because strict aliasing causes problems with optimization of inlined
code.[2] In such cases, when compiled with gcc, the option -fno-strict-aliasing
is invoked to prevent unwanted or invalid optimizations that could produce
incorrect code."
The compiler does do a lot of aliasing, so I don't know if this is a gcc bug or
a dmd bug. The way to track it down is to compile half of dmd with
no-strict-aliasing, the other half without, see if it still fails/succeeds.
This isolates it down to which half has the problem. Rinse, repeat, until the
offending source file is isolated.
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list