aboutsummaryrefslogtreecommitdiff
path: root/gcc/gimple-loop-versioning.cc
diff options
context:
space:
mode:
authorXi Ruoyao <xry111@mengyan1223.wang>2021-07-10 17:46:29 +0800
committerXi Ruoyao <xry111@mengyan1223.wang>2021-07-30 15:43:38 +0800
commit291416d3782e12e983483a3f7b2154a3dbfc9e1f (patch)
tree5c434a2b48ab252e5f65bcfeb7b1e028aa839353 /gcc/gimple-loop-versioning.cc
parente41ba804ba5f5ca433e09238d561b1b4c8b10985 (diff)
downloadgcc-291416d3782e12e983483a3f7b2154a3dbfc9e1f.zip
gcc-291416d3782e12e983483a3f7b2154a3dbfc9e1f.tar.gz
gcc-291416d3782e12e983483a3f7b2154a3dbfc9e1f.tar.bz2
ipa-devirt: check precision mismatch of enum values [PR101396]
We are comparing enum values (in wide_int) to check ODR violation. However, if we compare two wide_int values with different precision, we'll trigger an assert, leading to ICE. With enum-base introduced in C++11, it's easy to sink into this situation. To fix the issue, we need to explicitly check this kind of mismatch, and emit a proper warning message if there is such one. gcc/ PR ipa/101396 * ipa-devirt.c (ipa_odr_read_section): Compare the precision of enum values, and emit a warning if they mismatch. gcc/testsuite/ PR ipa/101396 * g++.dg/lto/pr101396_0.C: New test. * g++.dg/lto/pr101396_1.C: New test.
Diffstat (limited to 'gcc/gimple-loop-versioning.cc')
0 files changed, 0 insertions, 0 deletions