aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2022-06-01 14:00:49 +0200
committerJakub Jelinek <jakub@redhat.com>2022-06-01 14:00:49 +0200
commit0d5cc976a36af07c9790c38a99a0b98110c89795 (patch)
tree7564d5ff9124d49fed52f08a1d2dc70c77070d62 /gcc/ada
parent45c8523dd3e50daa5f0bba040099fdfd2ad1aaaa (diff)
downloadgcc-0d5cc976a36af07c9790c38a99a0b98110c89795.zip
gcc-0d5cc976a36af07c9790c38a99a0b98110c89795.tar.gz
gcc-0d5cc976a36af07c9790c38a99a0b98110c89795.tar.bz2
unswitch: Fold case label lo/hi values to index type [PR105770]
The following testcase ICEs because we use different types in comparison, idx has int type, while CASE_LOW has char type. While I believe all CASE_{LOW,HIGH} in the same switch have to use the same or compatible type, the index expression can have a promoted type as happens in this testcase. Other spots that handle switches do such foldings too. 2022-06-01 Jakub Jelinek <jakub@redhat.com> PR tree-optimization/105770 * tree-ssa-loop-unswitch.cc (find_unswitching_predicates_for_bb): Cast CASE_LOW and CASE_HIGH to TREE_TYPE (idx) before comparisons with idx. * gcc.dg/pr105770.c: New test.
Diffstat (limited to 'gcc/ada')
0 files changed, 0 insertions, 0 deletions