[project @ 2005-11-08 12:56:04 by simonmar]
authorsimonmar <unknown>
Tue, 8 Nov 2005 12:56:04 +0000 (12:56 +0000)
committersimonmar <unknown>
Tue, 8 Nov 2005 12:56:04 +0000 (12:56 +0000)
commit033418425ff8b4591580bf2bc4476b7ecc203ba6
treea4e333bff110f916c32dd3644d487ed39eb4d2cd
parent2724902344992a88cc142a892b353466146b348d
[project @ 2005-11-08 12:56:04 by simonmar]
gcc's -fstrict-aliasing is biting us when we use the stack to store
different types of objects.  For example:

  *((StgDouble*)((W_)Sp-8)) = *((StgDouble*)((W_)Sp+8));
  Sp[1] = (W_)&s1Cx_info;

gcc feels free to reorder these two lines, because they refer to
differently typed objects, even though the assignment to Sp[1] clearly
aliases the read from the same location.

Trying to fix this by accessing locations using union types might be
possible, but I took the sledgehammer approach of
-fno-strict-aliasing.  This is justified to a certain extent because
our generated C code is derived from a very weakly-typed internal
language (C--).
ghc/compiler/main/DriverPipeline.hs