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]

Re: PATCH: Don't use # comments in inline asm (PR testsuite/41522)


On Mon, Jan 25, 2010 at 12:45 PM, Rainer Orth
<ro@cebitec.uni-bielefeld.de> wrote:
> As reported in PR testsuite/41522, the gcc.c-torture/compile/pr38789.c
> testcase fails on Solaris 2/SPARC with the native assembler:
>
> FAIL: gcc.c-torture/compile/pr38789.c ?-O0 ?(test for excess errors)
> Excess errors:
> /usr/bin/as: "/var/tmp//ccITaiLr.s", line 23: error: invalid character (0x72)
> /usr/bin/as: "/var/tmp//ccITaiLr.s", line 23: error: unknown opcode "register"
> /usr/bin/as: "/var/tmp//ccITaiLr.s", line 23: error: statement syntax
> /usr/bin/as: "/var/tmp//ccITaiLr.s", line 29: error: invalid character (0x72)
> /usr/bin/as: "/var/tmp//ccITaiLr.s", line 29: error: unknown opcode "register"
> /usr/bin/as: "/var/tmp//ccITaiLr.s", line 29: error: statement syntax
>
> This happens since the comment character for the SPARC Sun as is !, not
> #. ?Fixed as suggested by Andrew in the PR, tested on
> sparc-sun-solaris2.1[01].
>
> Ok for mainline?

Hmm, ISTR issues when you are not actually using inputs/outputs
in the asm text.  Can you instead dg-skip your target?

Thanks,
Richard.

> ? ? ? ?Rainer
>
> --
> -----------------------------------------------------------------------------
> Rainer Orth, Center for Biotechnology, Bielefeld University
>
>
> 2010-01-22 ?Rainer Orth ?<ro@CeBiTec.Uni-Bielefeld.DE>
>
> ? ? ? ?PR testsuite/41522
> ? ? ? ?* gcc.c-torture/compile/pr38789.c (baz): Don't use # comments in
> ? ? ? ?inline asm.
>
> diff -r 580de06034a2 gcc/testsuite/gcc.c-torture/compile/pr38789.c
> --- a/gcc/testsuite/gcc.c-torture/compile/pr38789.c ? ? Wed Jan 20 14:17:00 2010 +0000
> +++ b/gcc/testsuite/gcc.c-torture/compile/pr38789.c ? ? Mon Jan 25 12:39:55 2010 +0100
> @@ -6,13 +6,13 @@
> ? unsigned a = (v == 1) ? 1 : 2;
>
> ? if (__builtin_constant_p (a))
> - ? ?asm volatile ("# constant %0" :: "i" (a));
> + ? ?asm volatile ("" :: "i" (a));
> ? else
> - ? ?asm volatile ("# register %0" :: "r" (a));
> + ? ?asm volatile ("" :: "r" (a));
>
> ? a = 6;
> ? if (__builtin_constant_p (a))
> - ? ?asm volatile ("# constant %0" :: "i" (a));
> + ? ?asm volatile ("" :: "i" (a));
> ? else
> - ? ?asm volatile ("# register %0" :: "r" (a));
> + ? ?asm volatile ("" :: "r" (a));
> ?}
>


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