diff options
author | Lewis Hyatt <lhyatt@gmail.com> | 2024-12-26 10:58:57 -0500 |
---|---|---|
committer | Lewis Hyatt <lhyatt@gcc.gnu.org> | 2024-12-29 21:12:25 -0500 |
commit | 83e291014fff0b3ce1baedf59292390726d67335 (patch) | |
tree | 75f17d5978f964dc85b4e4e8265a324a4e3446ef /gcc/config/mmix/mmix.cc | |
parent | 4bbf650e4bb63b424a2846045934368db1aa7d7e (diff) | |
download | gcc-83e291014fff0b3ce1baedf59292390726d67335.zip gcc-83e291014fff0b3ce1baedf59292390726d67335.tar.gz gcc-83e291014fff0b3ce1baedf59292390726d67335.tar.bz2 |
tree-optimization: Fix ICE in tree-parloops.cc reduction_phi() [PR118205]
Prior to r15-6001, reduction_phi() could be called with the PHI parameter
not actually being a gphi*. The search through reduction_list would fail and
return NULL. r15-6001 added a requirement that PHI actually be a gphi*, but
did not add a check for this. The PR shows an example where the check is
needed; fix by explicitly returning NULL in this case.
gcc/ChangeLog:
PR tree-optimization/118205
* tree-parloops.cc (reduction_phi): Return NULL if PHI parameter is
not a phi node.
gcc/testsuite/ChangeLog:
PR tree-optimization/118205
* c-c++-common/pr118205.c: New test.
Diffstat (limited to 'gcc/config/mmix/mmix.cc')
0 files changed, 0 insertions, 0 deletions