diff options
author | Martin Jambor <mjambor@suse.cz> | 2022-05-27 13:05:40 +0200 |
---|---|---|
committer | Martin Jambor <mjambor@suse.cz> | 2022-05-27 13:06:02 +0200 |
commit | f571596f8cd8fbad34305b4bec1a813620e0cbf0 (patch) | |
tree | deb79205a9429002d75dae5653f7d230cf6d53cb /gcc/ada/gcc-interface | |
parent | 0ccba4ed8571c18c7015413441e971d4863c3644 (diff) | |
download | gcc-f571596f8cd8fbad34305b4bec1a813620e0cbf0.zip gcc-f571596f8cd8fbad34305b4bec1a813620e0cbf0.tar.gz gcc-f571596f8cd8fbad34305b4bec1a813620e0cbf0.tar.bz2 |
ipa: Check cst type when propagating controled uses info
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.
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.
Diffstat (limited to 'gcc/ada/gcc-interface')
0 files changed, 0 insertions, 0 deletions