[Bug rtl-optimization/57359] wrong code for union access at -O3 on x86_64-linux

2013-06-03 Thread dhazeghi at yahoo dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57359 Dara Hazeghi changed: What|Removed |Added Status|WAITING |RESOLVED Resolution|---

[Bug rtl-optimization/57359] wrong code for union access at -O3 on x86_64-linux

2013-05-31 Thread joseph at codesourcery dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57359 --- Comment #9 from joseph at codesourcery dot com --- I think this is invalid, because the assignment that changes the current union member doesn't go through the union type (cf. DR#236).

[Bug rtl-optimization/57359] wrong code for union access at -O3 on x86_64-linux

2013-05-31 Thread dhazeghi at yahoo dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57359 --- Comment #8 from Dara Hazeghi --- Okay, here is I think a more clear example. However, from what Jakub says above, this is probably undefined. int printf(const char *, ...); union { int i; long long ll; } u; long long *pll = &u.ll;

[Bug rtl-optimization/57359] wrong code for union access at -O3 on x86_64-linux

2013-05-31 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57359 Richard Biener changed: What|Removed |Added Status|RESOLVED|WAITING Last reconfirmed|

[Bug rtl-optimization/57359] wrong code for union access at -O3 on x86_64-linux

2013-05-30 Thread jakub at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57359 Jakub Jelinek changed: What|Removed |Added CC||jsm28 at gcc dot gnu.org --- Comment #6 f

[Bug rtl-optimization/57359] wrong code for union access at -O3 on x86_64-linux

2013-05-29 Thread dhazeghi at yahoo dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57359 --- Comment #5 from Dara Hazeghi --- Sorry to ask again on this, but after re-reading, I'm not sure I understand the type-punning argument here: **ppll = ll; // write to u.ll *k = 0; // write to u.i j = *ppa; // u not touched ia[0][0] =

[Bug rtl-optimization/57359] wrong code for union access at -O3 on x86_64-linux

2013-05-23 Thread jakub at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57359 Jakub Jelinek changed: What|Removed |Added CC||jakub at gcc dot gnu.org --- Comment #4 f

[Bug rtl-optimization/57359] wrong code for union access at -O3 on x86_64-linux

2013-05-23 Thread dhazeghi at yahoo dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57359 --- Comment #3 from Dara Hazeghi --- My apologies for the invalid report and thank you for the clear explanation. I've been using frama-c to check validity of the testcases, but clearly in this case it's not sufficient.

[Bug rtl-optimization/57359] wrong code for union access at -O3 on x86_64-linux

2013-05-21 Thread jakub at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57359 --- Comment #2 from Jakub Jelinek --- I think this testcase is invalid. C/C++ just disallow type punning through unions altogether (only one union member can be active at each point), while GCC allows it as an extension, it requires the accesses b

[Bug rtl-optimization/57359] wrong code for union access at -O3 on x86_64-linux

2013-05-21 Thread pinskia at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57359 Andrew Pinski changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED Resolution|---