diff mbox

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

Message ID 20160829201047.GN14857@tucnak.redhat.com
State New
Headers show

Commit Message

Jakub Jelinek Aug. 29, 2016, 8:10 p.m. UTC
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.



	Jakub

Comments

Christophe Lyon Aug. 30, 2016, 9:24 a.m. UTC | #1
On 29 August 2016 at 22:10, Jakub Jelinek <jakub@redhat.com> wrote:
> 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

It also fails on arm* targets.

> _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
Jason Merrill Sept. 16, 2016, 7:46 p.m. UTC | #2
OK.

On Mon, Aug 29, 2016 at 4:10 PM, Jakub Jelinek <jakub@redhat.com> wrote:
> 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
diff mbox

Patch

--- 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" } }