------- Comment #4 from reza dot yazdani at amd dot com  2010-02-05 23:11 
-------
(In reply to comment #3)
> "The optimization performed is correct because:
> 
> In C++ (not in C) a const modifier in a global variable has internal
> linkage (i.e. it is treated like a static variable) and therefore the
> optimization performed is correct. A global const variable can have
> legally different values in different files.
> 
> In C, it is illegal to initialize a global variable in more than one
> location, and if initialized in more than one place all values must be
> the same, because its initial value is nondeterministic if different.
> 
> This bug is unrelated to PIC, it will behave the same, if the program is
> written according to the C/C++ standards."
> 
> I suggest to be closed and marked as user error.
> 

Sorry, ignore the above comment. I wanted to add the above comment to the bug
35501. It was the first time I was doing this and somehow, it got added to this
bug. Please ignore it.


-- 


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

Reply via email to