Patchwork [testsuite] Patch for PR 43283, semicolon may not start new line

login
register
mail settings
Submitter Steve Ellcey
Date June 24, 2010, 5:11 p.m.
Message ID <201006241711.o5OHBYu01679@lucas.cup.hp.com>
Download mbox | patch
Permalink /patch/56812/
State New
Headers show

Comments

Steve Ellcey - June 24, 2010, 5:11 p.m.
The gcc.dg/lto/20091216-1 test fails on PA and IA64 platforms for two
reasons.  One is that a semicolon starts a comment on these platforms
and not a new line.  Other platforms probably have this issue too based
on the value of comment_chars in the GNU assembler sources. The second
issue is that the nop statement on IA64 requires an argument.  This
patch fixes both problems.  I made the change from a semicolon to a
newline global but it could be ifdefed on __hppa if people don't want
the change to be global.  This seems to work fine for me though on x86
linux as well as my PA and IA64 platforms.

Tested on hppa2.0w-hp-hpux11.11, hppa64-hp-hpux11.11, ia64-hp-hpux11.23,
ia64-debian-linux-gnu, and x86_64-redhat-linux-gnu.

OK for checkin?

Steve Ellcey
sje@cup.hp.com



2010-06-24  Steve Ellcey  <sje@cup.hp.com>

	PR testsuite/43283
	* gcc.dg/lto/20091216-1_0.c: Use newline instead of semicolon
	and add argument to nop for IA64.
Richard Guenther - June 24, 2010, 8:28 p.m.
On Thu, Jun 24, 2010 at 7:11 PM, Steve Ellcey <sje@cup.hp.com> wrote:
> The gcc.dg/lto/20091216-1 test fails on PA and IA64 platforms for two
> reasons.  One is that a semicolon starts a comment on these platforms
> and not a new line.  Other platforms probably have this issue too based
> on the value of comment_chars in the GNU assembler sources. The second
> issue is that the nop statement on IA64 requires an argument.  This
> patch fixes both problems.  I made the change from a semicolon to a
> newline global but it could be ifdefed on __hppa if people don't want
> the change to be global.  This seems to work fine for me though on x86
> linux as well as my PA and IA64 platforms.
>
> Tested on hppa2.0w-hp-hpux11.11, hppa64-hp-hpux11.11, ia64-hp-hpux11.23,
> ia64-debian-linux-gnu, and x86_64-redhat-linux-gnu.
>
> OK for checkin?

Ok.

Richard.

> Steve Ellcey
> sje@cup.hp.com
>
>
>
> 2010-06-24  Steve Ellcey  <sje@cup.hp.com>
>
>        PR testsuite/43283
>        * gcc.dg/lto/20091216-1_0.c: Use newline instead of semicolon
>        and add argument to nop for IA64.
>
>
> Index: gcc.dg/lto/20091216-1_0.c
> ===================================================================
> --- gcc.dg/lto/20091216-1_0.c   (revision 161306)
> +++ gcc.dg/lto/20091216-1_0.c   (working copy)
> @@ -1,6 +1,10 @@
>  /* { dg-lto-do run } */
>
> -asm (".globl start_; start_: nop");
> +#ifdef __ia64
> +asm (".globl start_\nstart_: nop 0");
> +#else
> +asm (".globl start_\nstart_: nop");
> +#endif
>
>  int
>  main ()
>

Patch

Index: gcc.dg/lto/20091216-1_0.c
===================================================================
--- gcc.dg/lto/20091216-1_0.c	(revision 161306)
+++ gcc.dg/lto/20091216-1_0.c	(working copy)
@@ -1,6 +1,10 @@ 
 /* { dg-lto-do run } */
 
-asm (".globl start_; start_: nop");
+#ifdef __ia64
+asm (".globl start_\nstart_: nop 0");
+#else
+asm (".globl start_\nstart_: nop");
+#endif
 
 int
 main ()