[Bug middle-end/85880] Different code generation for uninitialized variables

2018-05-23 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85880 Richard Biener changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED Resolution|---

[Bug middle-end/85880] Different code generation for uninitialized variables

2018-05-22 Thread fredrik.hederstie...@securitas-direct.com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85880 --- Comment #4 from Fredrik Hederstierna --- Ok, you are probably right. I just was surprised that all GCC 4,5,6,7 gave same result, but something changed with 8. But you are right, its unpredictable results since its undefined. I practice it ga

[Bug middle-end/85880] Different code generation for uninitialized variables

2018-05-22 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85880 --- Comment #3 from Andrew Pinski --- I don't see any value in this bug report. Undefined code changes behavior (and code generation) between different versions of GCC all the time. In your example, GCC could have decided to just return -1 for

[Bug middle-end/85880] Different code generation for uninitialized variables

2018-05-22 Thread fredrik.hederstie...@securitas-direct.com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85880 --- Comment #2 from Fredrik Hederstierna --- All old GCC < 8 --- Disassembly of section .text: : 0: 2000movsr0, #0 2: 4770bx lr 0004 : 4: b500push{lr}