c++: Mangling of dependent conversions [PR91377]
We skip over other conversion codes when mangling expressions, we should do the same with IMPLICIT_CONV_EXPR. gcc/cp/ChangeLog 2020-04-04 Jason Merrill <jason@redhat.com> PR c++/91377 * mangle.c (write_expression): Skip IMPLICIT_CONV_EXPR.
This commit is contained in:
parent
49a86fce1a
commit
75c8d6e54a
3 changed files with 19 additions and 0 deletions
|
@ -1,3 +1,8 @@
|
|||
2020-04-04 Jason Merrill <jason@redhat.com>
|
||||
|
||||
PR c++/91377
|
||||
* mangle.c (write_expression): Skip IMPLICIT_CONV_EXPR.
|
||||
|
||||
2020-04-04 Patrick Palka <ppalka@redhat.com>
|
||||
|
||||
PR c++/94205
|
||||
|
|
|
@ -2875,6 +2875,7 @@ write_expression (tree expr)
|
|||
/* Skip NOP_EXPR and CONVERT_EXPR. They can occur when (say) a pointer
|
||||
argument is converted (via qualification conversions) to another type. */
|
||||
while (CONVERT_EXPR_CODE_P (code)
|
||||
|| code == IMPLICIT_CONV_EXPR
|
||||
|| location_wrapper_p (expr)
|
||||
/* Parentheses aren't mangled. */
|
||||
|| code == PAREN_EXPR
|
||||
|
|
13
gcc/testsuite/g++.dg/abi/mangle75.C
Normal file
13
gcc/testsuite/g++.dg/abi/mangle75.C
Normal file
|
@ -0,0 +1,13 @@
|
|||
// PR c++/91377
|
||||
// { dg-do compile { target c++11 } }
|
||||
|
||||
struct f {
|
||||
static constexpr int d = 3;
|
||||
typedef int e;
|
||||
};
|
||||
template <int a> struct x { };
|
||||
template <typename g, g j, g m> using n = x<j + m>;
|
||||
template <typename ac> auto v() -> n<typename ac::e, 0, ac::d>;
|
||||
void af() { v<f>(); }
|
||||
|
||||
// { dg-final { scan-assembler "_Z1vI1fE1xIXplLi0EsrT_1dEEv" } }
|
Loading…
Add table
Reference in a new issue