From: Martin Jambor <mjambor@suse.cz>
To: Richard Biener <richard.guenther@gmail.com>
Cc: GCC Patches <gcc-patches@gcc.gnu.org>, Jan Hubicka <jh@suse.cz>
Subject: Re: [PATCH] ipa: Check cst type when propagating controled uses info (PR 105639)
Date: Fri, 27 May 2022 12:19:13 +0200 [thread overview]
Message-ID: <ri6fskvgtwe.fsf@suse.cz> (raw)
In-Reply-To: <CAFiYyc2NxXRiRyRR6wPB41aRV6u81OudpM9VPSYZPUh7DqrjJA@mail.gmail.com>
Hi,
On Fri, May 27 2022, Richard Biener wrote:
> On Thu, May 26, 2022 at 4:47 PM Martin Jambor <mjambor@suse.cz> wrote:
>>
>> Hi,
>>
>> PR 105639 shows that code with type-mismatches can trigger an assert
>> after runnning into a branch that was inteded only for references to
>> variables - as opposed to references to functions. Fixed by moving
>> the condition from the assert to the guarding if statement.
>>
>> Bootstrapped and tested on x86_64. OK for trunk and then gcc 12?
>
> OK. There's the same assert below - I guess that doesn't need the same
> treatment?
Thanks. The assert below also allows the case when cst is an ADDR_EXPR of
a function. And the whole reference-counting is initiated only for
these two cases. So in all other cases the condition
rdesc->refcount != IPA_UNDESCRIBED_USE
will be false.
Martin
>>
>>
>> gcc/ChangeLog:
>>
>> 2022-05-25 Martin Jambor <mjambor@suse.cz>
>>
>> PR ipa/105639
>> * ipa-prop.cc (propagate_controlled_uses): Check type of the
>> constant before adding a LOAD reference.
>>
>> gcc/testsuite/ChangeLog:
>>
>> 2022-05-25 Martin Jambor <mjambor@suse.cz>
>>
>> PR ipa/105639
>> * gcc.dg/ipa/pr105639.c: New test.
prev parent reply other threads:[~2022-05-27 10:19 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-26 14:47 Martin Jambor
2022-05-27 6:40 ` Richard Biener
2022-05-27 10:19 ` Martin Jambor [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ri6fskvgtwe.fsf@suse.cz \
--to=mjambor@suse.cz \
--cc=gcc-patches@gcc.gnu.org \
--cc=jh@suse.cz \
--cc=richard.guenther@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).