Hi Jason, > From: gcc-patches-ow...@gcc.gnu.org [mailto:gcc-patches- > ow...@gcc.gnu.org] On Behalf Of Jason Merrill > Sent: 14 July 2013 00:00 > To: Joseph S. Myers > Cc: Eric Botcazou; gcc-patches@gcc.gnu.org; Richard Biener > Subject: PATCH (c,c++) for c++/57793 > > On 07/10/2013 01:24 AM, Eric Botcazou wrote: > > The idea behind the existing trick is that the reference is within the > bounds > > of the base object, i.e. the global offset (offset<<3 + bitpos) is > positive, > > but the bitpos part is negative, so we rearrange it into ((offset- > c>>3)<<3 + > > (bitpos+c)). Here the global offset is negative because it has > overflowed so > > I'm not sure the rearrangement makes any sense. > > I thought the idea of the trick was that when offset<<3 is too big, we > can use offset as a byte offset and then use bitpos separately in order > to avoid the overflowing operation. But I guess I was wrong; we end up > with a negative number in the assembly output. > > So here's a patch that just complains about the class being too big. > Tested x86_64-pc-linux-gnu, applying to trunk. Joseph, I'm assuming the > change makes sense for C as well; let me know if you disagree.
With this patch we now get PASS->FAIL: gcc.dg/pr42611.c, because the error message now appears on the line of the definition of the struct. This patch fixes the testcase. Ok to apply to trunk? Thanks, Kyrill 2013-07-17 Kyrylo Tkachov <kyrylo.tkac...@arm.com> * gcc.dg/pr42611.c: Move dg-error to correct line.
pr42611.patch
Description: Binary data