forked from gcc-mirror/gcc
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix PR70182 -- missing "on" in mangling of unresolved operators
The ABI says: <unresolved-name> ::= [gs] <base-unresolved-name> ::= sr <unresolved-type> <base-unresolved-name> ::= srN <unresolved-type> <unresolved-qualifier-level>+ E <base-unresolved-name> ::= [gs] sr <unresolved-qualifier-level>+ E <base-unresolved-name> <base-unresolved-name> ::= <simple-id> ::= on <operator-name> ::= on <operator-name> <template-args> ::= dn <destructor-name libiberty: PR c++/70182 * cp-demangle.c (d_unqualified_name): Handle "on" for operator names. * testsuite/demangle-expected: Add tests. gcc/cp: PR c++/70182 * mangle.c (write_template_args): Add "on" for operator names. gcc: PR c++/70182 * doc/invoke.texi (fabi-version): Mention mangling fix for operator names. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@244567 138bc75d-0d04-0410-961f-82ee72b054a4
- Loading branch information
trippels
committed
Jan 18, 2017
1 parent
a2929a3
commit 322066d
Showing
11 changed files
with
68 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
// { dg-options "-fabi-version=0" } | ||
|
||
struct A { | ||
template <typename T> int f (); | ||
int operator+(); | ||
operator int (); | ||
template <typename T> | ||
int operator-(); | ||
}; | ||
|
||
typedef int (A::*P)(); | ||
|
||
template <P> struct S {}; | ||
|
||
template <typename T> void g (S<&T::template f<int> >) {} | ||
template <typename T> void g (S<&T::operator+ >) {} | ||
template <typename T> void g (S<&T::operator int>) {} | ||
template <typename T> void g (S<&T::template operator- <double> >) {} | ||
|
||
template void g<A> (S<&A::f<int> >); | ||
template void g<A> (S<&A::operator+>); | ||
template void g<A> (S<&A::operator int>); | ||
template void g<A> (S<&A::operator-<double> >); | ||
|
||
// { dg-final { scan-assembler _Z1gI1AEv1SIXadsrT_1fIiEEE } } | ||
// { dg-final { scan-assembler _Z1gI1AEv1SIXadsrT_onplEE } } | ||
// { dg-final { scan-assembler _Z1gI1AEv1SIXadsrT_oncviEE } } | ||
// { dg-final { scan-assembler _Z1gI1AEv1SIXadsrT_onmiIdEEE } } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters