------- Additional Comments From schlie at comcast dot net  2005-04-14 21:28 
-------
(In reply to comment #0)

I guess I misunderstand the problem, as given:

  const double ggPi = 3.14159265358979323846;
  double const divPi = 1 / ggPi;

It would seem that neither ggPi or divPI should be designated "unchanging"
at the tree/rtl level, as neither are global static const objects, although:

  3.14159265358979323846

is, if stored as a value; as opposed to being inlined in the code as an 
immediate.

ggPi and divPi are simply variables which are initialized with values at 
runtime;
where the fact that they're "const" has prevented an assignment (other than an
initializing one) being accepted as valid during semantic analysis.  Where post
semantic analysis, they're just variables just like any others which happen to
have no assignments specified post initialization (as enforced by the front 
end);
so should not be marked READONLY/unchanging to begin with, it would seem?


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20912

Reply via email to