This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] Fix abi_tag23* test failure (PR c++/77379)


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]