This is the mail archive of the gcc-patches@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]

Re: [PR middle-end/20739] lvalue cond-expr gimplification may crash on cv-qual diffs


On Apr 15, 2005, Jeffrey A Law <law@redhat.com> wrote:

> On Thu, 2005-04-14 at 14:02 -0300, Alexandre Oliva wrote:
>> On Apr  4, 2005, Alexandre Oliva <aoliva@redhat.com> wrote:
>> 
>> > If the operands of a cond-expr used as an lvalue differ in cv
>> > qualification, the front-end adds nop_exprs to add cv qualifiers that
>> > the gimplifier drops when simplifying &(T const)*v.  The `&' was added
>> > by gimplify_cond_expr.
>> 
>> > The problem is that gimplify_addr_expr gimplifies its operand in such
>> > a way that the nop_expr is dropped, and nothing puts it back in, so
>> > when we test that, in the indirect_ref case in gimplify_addr_expr, the
>> > types are compatible, the test fails because of the missing
>> > cv-qualifier in the pointed-to type.  This patch fixes this.
>> 
>> > Ok to install if bootstrap and regtest on amd64-linux-gnu pass?
>> 
>> Bootstrap and regtest pased on amd64-linux-gnu, at least for mainline.
>> I'm retesting on the branch, since I'm not entirely sure I actually
>> tested it there.
> Approved for mainline.  Mark has final call on the branch.

Thanks, Roger had already approved it for mainline, but not yet for
the branch.  Mark?

-- 
Alexandre Oliva             http://www.ic.unicamp.br/~oliva/
Red Hat Compiler Engineer   aoliva@{redhat.com, gcc.gnu.org}
Free Software Evangelist  oliva@{lsd.ic.unicamp.br, gnu.org}


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