[Bug tree-optimization/49768] [4.6/4.7 Regression] C99 style union initializations does not work as expected with optimizations

2011-08-24 Thread sebastian.hu...@embedded-brains.de
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49768

Sebastian Huber sebastian.hu...@embedded-brains.de changed:

   What|Removed |Added

 CC||sebastian.huber@embedded-br
   ||ains.de

--- Comment #11 from Sebastian Huber sebastian.hu...@embedded-brains.de 
2011-08-24 10:34:05 UTC ---
*** Bug 49119 has been marked as a duplicate of this bug. ***


[Bug tree-optimization/49768] [4.6/4.7 Regression] C99 style union initializations does not work as expected with optimizations

2011-08-04 Thread vrahkone at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49768

--- Comment #10 from Valtteri Rahkonen vrahkone at gmail dot com 2011-08-04 
13:44:38 UTC ---
I tested latest gcc 4.6.1 from Debian unstable containing the patch and it
seems to work. I'm not going to dare to mark this as verified though because I
don't know your bugzilla policies ;).

Thanks.


[Bug tree-optimization/49768] [4.6/4.7 Regression] C99 style union initializations does not work as expected with optimizations

2011-07-19 Thread jakub at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49768

--- Comment #7 from Jakub Jelinek jakub at gcc dot gnu.org 2011-07-19 
09:24:31 UTC ---
Author: jakub
Date: Tue Jul 19 09:24:28 2011
New Revision: 176437

URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=176437
Log:
PR tree-optimization/49768
* gimple-fold.c (fold_nonarray_ctor_reference): Return NULL
if offset is smaller than bitoffset, but offset+size is bigger
than bitoffset.

* gcc.c-torture/execute/pr49768.c: New test.

Added:
trunk/gcc/testsuite/gcc.c-torture/execute/pr49768.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/gimple-fold.c
trunk/gcc/testsuite/ChangeLog


[Bug tree-optimization/49768] [4.6/4.7 Regression] C99 style union initializations does not work as expected with optimizations

2011-07-19 Thread jakub at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49768

Jakub Jelinek jakub at gcc dot gnu.org changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution||FIXED

--- Comment #9 from Jakub Jelinek jakub at gcc dot gnu.org 2011-07-19 
09:40:57 UTC ---
Fixed.


[Bug tree-optimization/49768] [4.6/4.7 Regression] C99 style union initializations does not work as expected with optimizations

2011-07-19 Thread jakub at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49768

--- Comment #8 from Jakub Jelinek jakub at gcc dot gnu.org 2011-07-19 
09:40:05 UTC ---
Author: jakub
Date: Tue Jul 19 09:40:03 2011
New Revision: 176438

URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=176438
Log:
PR tree-optimization/49768
* tree-ssa-ccp.c (fold_nonarray_ctor_reference): Return NULL
if offset is smaller than bitoffset, but offset+size is bigger
than bitoffset.

* gcc.c-torture/execute/pr49768.c: New test.

Added:
branches/gcc-4_6-branch/gcc/testsuite/gcc.c-torture/execute/pr49768.c
Modified:
branches/gcc-4_6-branch/gcc/ChangeLog
branches/gcc-4_6-branch/gcc/testsuite/ChangeLog
branches/gcc-4_6-branch/gcc/tree-ssa-ccp.c


[Bug tree-optimization/49768] [4.6/4.7 Regression] C99 style union initializations does not work as expected with optimizations

2011-07-18 Thread jakub at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49768

--- Comment #6 from Jakub Jelinek jakub at gcc dot gnu.org 2011-07-18 
12:47:36 UTC ---
Created attachment 24787
  -- http://gcc.gnu.org/bugzilla/attachment.cgi?id=24787
gcc47-pr49768.patch

The easier fix attached.  The more complicated would probably mean if we see
possible overlaps keeping recurding on all overlapping feelds and if the result
from them is INTEGER_CST, shift, mask and or them together.