https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61144
--- Comment #16 from Marc Glisse ---
(In reply to Rich Felker from comment #15)
> Can you clarify? As far as I can tell, the other bug is a missed
> optimization and this is an overly-aggressive, incorrect optimization.
The same test is wrong, i
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61144
--- Comment #15 from Rich Felker ---
Can you clarify? As far as I can tell, the other bug is a missed optimization
and this is an overly-aggressive, incorrect optimization.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61144
--- Comment #14 from Marc Glisse ---
This seems related to PR 59948 where Honza says the code is "really broken".
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=61144
--- Comment #13 from Rich Felker ---
I've added the related issue 61159.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=61144
--- Comment #12 from Rich Felker ---
Furthermore, __builtin_constant_p(dummy) wrongly returns 1, even though dummy
is modifiable externally via foo (assuming foo is not replaced by a strong
definition elsewhere). Perhaps this should be filed as a
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=61144
--- Comment #11 from Rich Felker ---
Adding __attribute__((__used__)) to the static object suppresses the symptom in
case that helps to isolate what's causing it.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=61144
--- Comment #10 from James Cloos ---
My tests on debian sid with GCC: (Debian 4.8.2-21) 4.8.2 do not replicate the
bug.
On debian sid, only 4.9 and gcc-snapshot (the 4.10 branch) show the bug.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=61144
--- Comment #9 from Jody Lee Bruchon ---
For my gcc versions (x86_64) compiled from release sources, I have the
following for this testcase, with and without static, using -O2:
=== gcc 4.8.2, with and without static ===
$ gcc -v
Using built-in s
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=61144
--- Comment #8 from Rich Felker ---
Further investigation suggests that the real gcc 4.8.2 is not affected; I was
mislead by the fact that Debian is shipping as "gcc-4.8_4.8.2-21" an svn
snapshot that's actually post-4.8.2. So 4.9.0 seems to be th