------- Additional Comments From hp at gcc dot gnu dot org 2005-02-23 15:45
-------
It deserves mentioning (for the audience) that the right thing happens for
the generated code in the test-case; this problem is mainly an internal
wart (IIUC):
...
<dnovillo> now, the problem is that if there is a mix of regular and 'const'
functions, we will have created .GLOBAL_VAR
unnecessarily. that's bad.
<dnovillo> testing for !TREE_SIDE_EFFECTS is too broad. We don't want to
consider 'const' functions.
...
<hp> yes, but I don't know how to create a test-case for *that*
...
<dnovillo> hp: this one is good enough. we created .GLOBAL_VAR. we shouldn't
have created it.
<dnovillo> the call to bambam shouldn't have a V_MAY_DEF for .GLOBAL_VAR
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20168