This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug tree-optimization/53663] [4.7/4.8 Regression] inconsistent inline handling of bool within union


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53663

--- Comment #13 from Richard Guenther <rguenth at gcc dot gnu.org> 2012-09-24 11:44:32 UTC ---
This boils down to the question whether reading a 1-bit precision quantity
from memory has to disregard the upper bits or not (I think we had similar
issues with SRA).  Thus, whether reading a _Bool from memory is a
bitfield extract or not (expansion does not treat it as bitfield extract
because the FIELD_DECLs size is 8, not 1).

We go into

  /* 3) Assignment from a constant.  We can use folds native encode/interpret
     routines to extract the assigned bits.  */

which has the issue that it doesn't work if TYPE_PRECISION is not equal
to TYPE_SIZE.  At least not for detecting redundant stores (it does work
for folding a read of v.b though).

I have a patch.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]