This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Are egcs optimizations safe for conservative GC?


> Date: Tue, 04 Jan 2000 22:49:33 -0500
> From: Kevin Atkinson <kevinatk@home.com>

> The last time this came up I got two very diffrent answers and no
> one answered my question of how to prevent the loop optimizer from
> doing this.  Is gcc GC safe is there is always at least one variable
> that is not a local pointing to the object in question? Is there
> anything one can do with volatile to help prevent this?  --

Well, -fvolatile I think would prevent most variables from going away
or being transformed.  This would be a sledge hammer approach.  I
think the answer is, if you find any `bugs' (should be rare judging by
the experience of the gc folks), please report them as bugs, and we
can then introduce a -fgc switch to the compiler that says, please
turn off all optimizations that gc systems would not like and then tie
the particular optimization that caused the bug to this switch.

I think that gc is a good long term technology that will become more
and more important and popular as time goes on.  I don't think we'd
reject patches to improve the compiler in these systems.

Now, if someone wanted to go gunning for such `bugs' before they are
reported and fixed them that would be great (for the gc folks out
there), but like all donations, this doesn't happen, unless someone
_wants_ to make it happen.  So far, no one has stepped forward to
donate the work.

Another way of asking your question is, are there any bugs in gcc?
The answer is sure, but you might not hit any.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]