Now that convert_like creates an IMPLICIT_CONV_EXPR when it converts something that involves a class in a template, we must be prepared to handle it. In this test, we have a class S and we're converting it to long int& using a user-defined conversion since we're performing -- on it. So cp_build_unary_op/POSTDECREMENT_EXPR calls build_expr_type_conversion which gets the IMPLICIT_CONV_EXPR. Before the convert_like change it got *S::operator long int &(&b) whose type is long int but now it gets IMPLICIT_CONV_EXPR<long int&>(b) whose type is a reference type. But the !MAYBE_CLASS_TYPE_P switch doesn't handle reference types and so we complain. Fixed by calling convert_from_reference on the result of convert_like. PR c++/94190 - wrong no post-decrement operator error in template. * call.c (convert_like_real): Use convert_from_reference on the result. * g++.dg/conversion/op7.C: New test.
| Name |
Last commit
|
Last update |
|---|---|---|
| .. | ||
| Wwrite-strings.C | Loading commit data... | |
| access1.C | Loading commit data... | |
| ambig1.C | Loading commit data... | |
| ambig2.C | Loading commit data... | |
| ambig3.C | Loading commit data... | |
| ambig4.C | Loading commit data... | |
| base1.C | Loading commit data... | |
| bitfield1.C | Loading commit data... | |
| bitfield10.C | Loading commit data... | |
| bitfield11.C | Loading commit data... | |
| bitfield2.C | Loading commit data... | |
| bitfield3.C | Loading commit data... | |
| bitfield4.C | Loading commit data... | |
| bitfield5.C | Loading commit data... | |
| bitfield6.C | Loading commit data... | |
| bitfield7.C | Loading commit data... | |
| bitfield8.C | Loading commit data... | |
| bitfield9.C | Loading commit data... | |
| cast1.C | Loading commit data... | |
| cast2.C | Loading commit data... | |
| cast3.C | Loading commit data... | |
| cond1.C | Loading commit data... | |
| cond2.C | Loading commit data... | |
| cond3.C | Loading commit data... | |
| cond4.C | Loading commit data... | |
| cond6.C | Loading commit data... | |
| const1.C | Loading commit data... | |
| const2.C | Loading commit data... | |
| const3.C | Loading commit data... | |
| dr195-1.C | Loading commit data... | |
| dr195.C | Loading commit data... | |
| dynamic1.C | Loading commit data... | |
| enum1.C | Loading commit data... | |
| err-recover1.C | Loading commit data... | |
| memfn1.C | Loading commit data... | |
| memfn2.C | Loading commit data... | |
| nullptr1.C | Loading commit data... | |
| nullptr2.C | Loading commit data... | |
| op1.C | Loading commit data... | |
| op2.C | Loading commit data... | |
| op3.C | Loading commit data... | |
| op4.C | Loading commit data... | |
| op5.C | Loading commit data... | |
| op6.C | Loading commit data... | |
| op7.C | Loading commit data... | |
| packed1.C | Loading commit data... | |
| packed2.C | Loading commit data... | |
| pr16333.C | Loading commit data... | |
| pr41426.C | Loading commit data... | |
| pr59879.C | Loading commit data... | |
| pr66211.C | Loading commit data... | |
| pr66895.C | Loading commit data... | |
| ptrmem1.C | Loading commit data... | |
| ptrmem2.C | Loading commit data... | |
| ptrmem3.C | Loading commit data... | |
| ptrmem4.C | Loading commit data... | |
| ptrmem5.C | Loading commit data... | |
| ptrmem6.C | Loading commit data... | |
| ptrmem7.C | Loading commit data... | |
| ptrmem8.C | Loading commit data... | |
| ptrmem9.C | Loading commit data... | |
| qual1.C | Loading commit data... | |
| qual2.C | Loading commit data... | |
| qual3.C | Loading commit data... | |
| ref1.C | Loading commit data... | |
| ref2.C | Loading commit data... | |
| ref3.C | Loading commit data... | |
| reinterpret1.C | Loading commit data... | |
| reinterpret2.C | Loading commit data... | |
| reinterpret3.C | Loading commit data... | |
| reinterpret4.C | Loading commit data... | |
| self1.C | Loading commit data... | |
| simd1.C | Loading commit data... | |
| simd2.C | Loading commit data... | |
| simd3.C | Loading commit data... | |
| simd4.C | Loading commit data... | |
| to-virtual-base-1.C | Loading commit data... | |
| void1.C | Loading commit data... | |
| void2.C | Loading commit data... |