This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [Patch/testsuite]: Adjust g++.dg/torture/stackalign/unwind-*.C testcases for __USER_LABEL_PREFIX__
- From: "H.J. Lu" <hjl dot tools at gmail dot com>
- To: janis187 at us dot ibm dot com
- Cc: Danny Smith <dansmister at gmail dot com>, gcc-patches <gcc-patches at gcc dot gnu dot org>
- Date: Mon, 26 Jan 2009 12:32:21 -0800
- Subject: Re: [Patch/testsuite]: Adjust g++.dg/torture/stackalign/unwind-*.C testcases for __USER_LABEL_PREFIX__
- References: <9c03c2dd0810012024t52cf2f36k41a75a68d33f17bf@mail.gmail.com> <1222971706.6065.9.camel@janis-laptop>
On Thu, Oct 2, 2008 at 10:21 AM, Janis Johnson <janis187@us.ibm.com> wrote:
> On Thu, 2008-10-02 at 16:24 +1300, Danny Smith wrote:
>> The unwind[1-6].C testcases in g++.dg/torture/stackalign fail on
>> mingw32 and cygwin because the inline asm statements refer to symbols
>> without the __USER_LABEL_PREFIX__, ("_" for these targets). This
>> causes undefined references .eg:
>>
>> c:\tmp/cccCuiyY.o:unwind-1.C:(.text+0xa3): undefined reference to `g_ebp_save'
>> c:\tmp/cccCuiyY.o:unwind-1.C:(.text+0xa9): undefined reference to `g_esp_save'
>> c:\tmp/cccCuiyY.o:unwind-1.C:(.text+0xc3): undefined reference to `g_edi'
>> c:\tmp/cccCuiyY.o:unwind-1.C:(.text+0xc9): undefined reference to `g_esi'
>> c:\tmp/cccCuiyY.o:unwind-1.C:(.text+0xcf): undefined reference to `g_ebx'
>> c:\tmp/cccCuiyY.o:unwind-1.C:(.text+0xd5): undefined reference to `g_ebp'
>> c:\tmp/cccCuiyY.o:unwind-1.C:(.text+0xdb): undefined reference to `g_esp'
>>
>> This fixes by preprocessing the __USER_LABEL_PREFIX__ into the literal
>> asm names.
>>
>> 2008-10-02 Danny Smith <dannysmith@users.sourceforge.net>
>>
>> * g++.dg/torture/stackalign/test-unwind.h (ASMNAME): Define.
>> Use instead of C name in asm statements.
>
> This is OK when it's been tested on a target where the test passed
> before the patch.
>
I ran it on Linux/ia32 and Linux/intel64. Results are OK:
http://gcc.gnu.org/ml/gcc-testresults/2009-01/msg02692.html
http://gcc.gnu.org/ml/gcc-testresults/2009-01/msg02690.html
I am checking it in.
Thanks.
--
H.J.