This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Introduce mangle_assembler_name hook, resolve parts of PR43157, PR46674.
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Dave Korn <dave dot korn dot cygwin at gmail dot com>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Fri, 10 Dec 2010 20:53:39 +0100
- Subject: Re: [PATCH] Introduce mangle_assembler_name hook, resolve parts of PR43157, PR46674.
- References: <4D022637.8090809@gmail.com>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Fri, Dec 10, 2010 at 01:08:07PM +0000, Dave Korn wrote:
> gcc/testsuite/ChangeLog:
>
> 2010-12-10 Dave Korn <...
>
> PR middle-end/46674
> PR lto/43157
> * gcc.dg/pr43157.c: New file.
>
> --- gcc/testsuite/gcc.dg/pr43157.c (revision 0)
> +++ gcc/testsuite/gcc.dg/pr43157.c (revision 0)
> @@ -0,0 +1,19 @@
> +/* { dg-do link } */
> +/* { dg-require-effective-target lto } */
> +/* { dg-options "-O1 -flto -fuse-linker-plugin" } */
> +
> +#define LABEL3(pfx, x) # pfx x
> +#define LABEL2(pfx, x) LABEL3(pfx, x)
> +#define LABEL(x) LABEL2(__USER_LABEL_PREFIX__, x)
> +
> +unsigned int factorial_ (unsigned int) __asm__ (LABEL ("factorial"));
> +
> +unsigned int factorial (unsigned int i)
> +{
> + return i > 1 ? i * factorial_ (i - 1) : 1;
> +}
> +
> +int main (void)
> +{
> + return factorial (5);
> +}
The testcase fails when using GLD which doesn't support plugins.
I guess you want
/* { dg-require-linker-plugin "" } */
Jakub