This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH] Fix abi_tag23* test failure (PR c++/77379)
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Jason Merrill <jason at redhat dot com>
- Cc: gcc-patches List <gcc-patches at gcc dot gnu dot org>
- Date: Mon, 29 Aug 2016 22:10:47 +0200
- Subject: [PATCH] Fix abi_tag23* test failure (PR c++/77379)
- Authentication-results: sourceware.org; auth=none
- References: <CADzB+2n=jh+bJS6yHxGNkNv+bMh5Gn_L0s3_UdDv-Jc-tu8gmQ@mail.gmail.com>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Mon, Aug 29, 2016 at 12:42:28PM -0400, Jason Merrill wrote:
> Another missing ABI tag, sigh.
>
> Tested x86_64-pc-linux-gnu, applying to trunk.
> commit 1337a943a2d3926537b63d6e1f0d7f46ef10a06d
> Author: Jason Merrill <jason@redhat.com>
> Date: Fri Aug 26 15:12:52 2016 -0400
>
> PR c++/77379 - ABI tag on thunk
>
> * mangle.c (maybe_check_abi_tags): Add version parm, handle thunks.
> (mangle_thunk): Add thunk parameter.
> * method.c (finish_thunk): Pass it.
> * cp-tree.h: Declare it.
> --- /dev/null
> +++ b/gcc/testsuite/g++.dg/abi/abi-tag23.C
> +// { dg-final { scan-assembler "_ZThn16_N7Derived7get_fooB3barEv" } }
This unfortunately fails e.g. on i686-linux, because the symbol is
_ZThn8_N7Derived7get_fooB3barEv instead of
_ZThn16_N7Derived7get_fooB3barEv
The following patch accepts any negative offsets. Tested on x86_64-linux
and i686-linux, ok for trunk?
2016-08-29 Jakub Jelinek <jakub@redhat.com>
PR c++/77379
* g++.dg/abi/abi-tag23.C: Adjust scan-assembler regex for differing
thunk offsets.
* g++.dg/abi/abi-tag23a.C: Likewise.
--- gcc/g++.dg/abi/abi-tag23.C.jj 2016-08-29 19:34:12.000000000 +0200
+++ gcc/g++.dg/abi/abi-tag23.C 2016-08-29 22:04:16.328873328 +0200
@@ -32,4 +32,4 @@ int main()
Final().get_foo();
}
-// { dg-final { scan-assembler "_ZThn16_N7Derived7get_fooB3barEv" } }
+// { dg-final { scan-assembler "_ZThn\[0-9]+_N7Derived7get_fooB3barEv" } }
--- gcc/g++.dg/abi/abi-tag23a.C.jj 2016-08-29 19:34:12.000000000 +0200
+++ gcc/g++.dg/abi/abi-tag23a.C 2016-08-29 22:04:55.053398520 +0200
@@ -32,4 +32,4 @@ int main()
Final().get_foo();
}
-// { dg-final { scan-assembler "_ZThn16_N7Derived7get_fooEv" } }
+// { dg-final { scan-assembler "_ZThn\[0-9]+_N7Derived7get_fooEv" } }
Jakub