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.
PR c++/69317 - [6 regression] wrong ABI version in -Wabi warnings
gcc/cp/ChangeLog: 2016-01-27 Martin Sebor <msebor@redhat.com> PR c++/69317 * mangle.c (mangle_decl): Reference the correct (saved) version of the ABI in -Wabi diagnostics. gcc/testsuite/ChangeLog: 2016-01-27 Martin Sebor <msebor@redhat.com> PR c++/69317 * g++.dg/abi/Wabi-2-2.C: New test. * g++.dg/abi/Wabi-2-3.C: New test. * g++.dg/abi/Wabi-3-2.C: New test. * g++.dg/abi/Wabi-3-3.C: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@232881 138bc75d-0d04-0410-961f-82ee72b054a4
- Loading branch information
msebor
committed
Jan 27, 2016
1 parent
9ce22fb
commit 18e9663
Showing
7 changed files
with
77 additions
and
3 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
// Verify that no diagnostic is issued when the version specified | ||
// via -Wabi= matches the version specified by -fabi-version=. | ||
|
||
// { dg-options "-Werror -Wabi=2 -fabi-version=2" } | ||
// { dg-do compile } | ||
|
||
// The mangling of templates with a non-type template parameter | ||
// of reference type changed in ABI version 3: | ||
extern int N; | ||
template <int &> struct S { }; | ||
|
||
// Expect no diagnostic. | ||
void foo (S<N>) { } | ||
|
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,16 @@ | ||
// PR c++/69317 - [6 regression] wrong ABI version in -Wabi warnings | ||
// Exercise that the correct ABI versions are referenced in the -Wabi | ||
// diagnostic. See also the equivalent Wabi-3-2.C test. | ||
|
||
// { dg-options "-Wabi=2 -fabi-version=3" } | ||
// { dg-do compile } | ||
|
||
// The mangling of templates with a non-type template parameter | ||
// of reference type changed in ABI version 3: | ||
extern int N; | ||
template <int &> struct S { }; | ||
|
||
// Expect the diagnostic to reference the ABI version specified via | ||
// -fabi-version=3 and the ABI version specified via -Wabi=2. | ||
void foo (S<N>) { } // { dg-warning "the mangled name of .void foo\\(S<N>\\). changed between -fabi-version=3 \\(_Z3foo1SILZ1NEE\\) and -fabi-version=2 \\(_Z3foo1SIL_Z1NEE\\)" } | ||
|
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,16 @@ | ||
// PR c++/69317 - [6 regression] wrong ABI version in -Wabi warnings | ||
// Exercise that the correct ABI versions are referenced in the -Wabi | ||
// diagnostic. See also the equivalent Wabi-2-3.C test. | ||
|
||
// { dg-options "-Wabi=3 -fabi-version=2" } | ||
// { dg-do compile } | ||
|
||
// The mangling of templates with a non-type template parameter | ||
// of reference type changed in ABI version 3: | ||
extern int N; | ||
template <int &> struct S { }; | ||
|
||
// Expect the diagnostic to reference the ABI version specified via | ||
// -fabi-version=2 and the ABI version specified via -Wabi=3. | ||
void foo (S<N>) { } // { dg-warning "the mangled name of .void foo\\(S<N>\\). changed between -fabi-version=2 \\(_Z3foo1SIL_Z1NEE\\) and -fabi-version=3 \\(_Z3foo1SILZ1NEE\\)" } | ||
|
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,14 @@ | ||
// Verify that no diagnostic is issued when the version specified | ||
// via -Wabi= matches the version specified by -fabi-version=. | ||
|
||
// { dg-options "-Werror -Wabi=3 -fabi-version=3" } | ||
// { dg-do compile } | ||
|
||
// The mangling of templates with a non-type template parameter | ||
// of reference type changed in ABI version 3: | ||
extern int N; | ||
template <int &> struct S { }; | ||
|
||
// Expect no diagnostic. | ||
void foo (S<N>) { } | ||
|