[Bug tree-optimization/35501] Wrong value returned from const int

2010-02-05 Thread reza dot yazdani at amd dot com
--- Comment #5 from reza dot yazdani at amd dot com 2010-02-05 23:14 --- "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

[Bug tree-optimization/35501] Wrong value returned from const int

2008-05-08 Thread matz at gcc dot gnu dot org
--- Comment #4 from matz at gcc dot gnu dot org 2008-05-08 15:13 --- Hmm, actually I sort of agree with HJ. It's a global (and unhidden) definition, which very well can be replaced by a different definition at runtime. In particular that will happen for instance if the global data is d

[Bug tree-optimization/35501] Wrong value returned from const int

2008-05-07 Thread hjl dot tools at gmail dot com
--- Comment #3 from hjl dot tools at gmail dot com 2008-05-07 20:29 --- Created an attachment (id=15613) --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=15613&action=view) A testcase [EMAIL PROTECTED] pic-1]$ make /export/build/gnu/gcc-expand/build-x86_64-linux/gcc/xgcc -B/export/bu

[Bug tree-optimization/35501] Wrong value returned from const int

2008-05-07 Thread rguenth at gcc dot gnu dot org
--- Comment #2 from rguenth at gcc dot gnu dot org 2008-05-07 19:45 --- Right. I believe there was even some ELF reasoning here... Micha? -- rguenth at gcc dot gnu dot org changed: What|Removed |Added --

[Bug tree-optimization/35501] Wrong value returned from const int

2008-05-04 Thread pinskia at gcc dot gnu dot org
--- Comment #1 from pinskia at gcc dot gnu dot org 2008-05-05 05:51 --- Actually it does not make sense to have any other value than 3 here. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35501