[apple-ppc-branch] My CONSTRUCTORs are getting cloned!

Ziemowit Laski zlaski@apple.com
Tue May 4 18:10:00 GMT 2004


(I suspect this applies to tree-ssa as well.)

In the past (i.e., during 3.3 days), multiple CONSTRUCTORs (made via
a call to build_constructor()) containing identical data would get
uniqued.  But in the apple-ppc-branch, this does not happen.  As a
countermeasure, I added hashing logic to my code so that only a single
CONSTRUCTOR with a given contents ever gets created, only to discover
that it spawns multiple copies of itself in the final assembly output.
The CONSTRUCTOR in question gets referenced (via an ADDR_EXPR) in
several places during compilation, and the clones appear to be created
as a result of some (though not all) of these references.

Does anyone have any suggestions as to how to fix this?  I cannot quite
believe that this CONSTRUCTOR-cloning behavior is intentional...

Many thanks in advance,

--Zem
--------------------------------------------------------------
Ziemowit Laski                 1 Infinite Loop, MS 301-2K
Mac OS X Compiler Group        Cupertino, CA USA  95014-2083
Apple Computer, Inc.           +1.408.974.6229  Fax .5477



More information about the Gcc mailing list