aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-ssa-loop-split.c
diff options
context:
space:
mode:
authorMarek Polacek <polacek@redhat.com>2020-06-22 21:26:49 -0400
committerMarek Polacek <polacek@redhat.com>2020-07-14 16:02:39 -0400
commit8e64d182850560dbedfabb88aac90d4fc6155067 (patch)
treea468074edc704d74694205b893742e8dcf6dcd09 /gcc/tree-ssa-loop-split.c
parent0c78f438fafdc2f4b2fc3a4d385f814378e3d3f5 (diff)
downloadgcc-8e64d182850560dbedfabb88aac90d4fc6155067.zip
gcc-8e64d182850560dbedfabb88aac90d4fc6155067.tar.gz
gcc-8e64d182850560dbedfabb88aac90d4fc6155067.tar.bz2
c++: Make convert_like complain about bad ck_ref_bind again [PR95789]
convert_like issues errors about bad_p conversions at the beginning of the function, but in the ck_ref_bind case, it only issues them after we've called convert_like on the next conversion. This doesn't work as expected since r10-7096 because when we see a conversion from/to class type in a template, we return early, thereby missing the error, and a bad_p conversion goes by undetected. That made the attached test to compile even though it should not. I had thought that I could just move the ck_ref_bind/bad_p errors above to the rest of them, but that regressed diagnostics because expr then wasn't converted yet by the nested convert_like_real call. So, for bad_p conversions, do the normal processing, but still return the IMPLICIT_CONV_EXPR to avoid introducing trees that the template processing can't handle well. This I achieved by adding a wrapper function. gcc/cp/ChangeLog: PR c++/95789 PR c++/96104 PR c++/96179 * call.c (convert_like_real_1): Renamed from convert_like_real. (convert_like_real): New wrapper for convert_like_real_1. gcc/testsuite/ChangeLog: PR c++/95789 PR c++/96104 PR c++/96179 * g++.dg/conversion/ref4.C: New test. * g++.dg/conversion/ref5.C: New test. * g++.dg/conversion/ref6.C: New test.
Diffstat (limited to 'gcc/tree-ssa-loop-split.c')
0 files changed, 0 insertions, 0 deletions