[Bug c/50284] possible miscompilation with -fstrict-aliasing

2011-09-04 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50284 Richard Guenther changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED Resolution|

[Bug c/50284] possible miscompilation with -fstrict-aliasing

2011-09-03 Thread rafael.espindola at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50284 Rafael Avila de Espindola changed: What|Removed |Added Attachment #25188|0 |1 is obsolete|

[Bug c/50284] possible miscompilation with -fstrict-aliasing

2011-09-03 Thread rafael.espindola at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50284 --- Comment #4 from Rafael Avila de Espindola 2011-09-03 22:54:10 UTC --- (In reply to comment #3) > struct Value { > struct jsval data; > }; > ... > struct jsval y = t3.array[i]; > struct Value *z = (struct Value*)&y; > if (z->data.

[Bug c/50284] possible miscompilation with -fstrict-aliasing

2011-09-03 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50284 --- Comment #3 from Richard Guenther 2011-09-03 20:52:49 UTC --- struct Value { struct jsval data; }; ... struct jsval y = t3.array[i]; struct Value *z = (struct Value*)&y; if (z->data.tag == 0xFF85) { that's invalid in GCCs re

[Bug c/50284] possible miscompilation with -fstrict-aliasing

2011-09-03 Thread rafael.espindola at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50284 --- Comment #2 from Rafael Avila de Espindola 2011-09-03 19:07:54 UTC --- Forgot to mention, this only reproduces with -fPIC. So to reproduce this you need * a linux 32 bit build older than 160947 * run cc1 with: -quiet -fPIC -O2 -std=c99

[Bug c/50284] possible miscompilation with -fstrict-aliasing

2011-09-03 Thread rafael.espindola at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50284 --- Comment #1 from Rafael Avila de Espindola 2011-09-03 18:53:58 UTC --- Created attachment 25188 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=25188 testcase