This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Fix alias handling (PR middle-end/20622)
- From: Hans-Peter Nilsson <hans-peter dot nilsson at axis dot com>
- To: jakub at redhat dot com
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Wed, 30 Mar 2005 01:46:52 +0200
- Subject: Re: [PATCH] Fix alias handling (PR middle-end/20622)
> Date: Fri, 25 Mar 2005 05:45:25 -0500
> From: Jakub Jelinek <jakub@redhat.com>
> --- gcc/testsuite/gcc.dg/alias-7.c.jj 2005-03-24 16:13:50.000000000 +0100
> +++ gcc/testsuite/gcc.dg/alias-7.c 2005-03-24 14:29:57.000000000 +0100
> @@ -0,0 +1,16 @@
> +/* { dg-do run } */
> +/* { dg-require-alias "" } */
> +/* { dg-options "-O2" } */
> +
> +extern void abort (void);
> +
> +int foo __asm__ ("foo") __attribute__((nocommon));
> +extern __typeof (foo) bar __attribute__ ((weak, alias ("foo")));
> +
> +int
> +main (void)
> +{
> + if (&foo != &bar || foo || bar)
> + abort ();
> + return bar;
> +}
I get FAIL for cris-axis-elf, but not for mmix-knuth-mmixware
for this test. It seems to be the same symbol-prefix issue as
for PR 20524. If I change that asm-line to
#define XSTR(x) #x
#define STR(x) XSTR(x)
int foo __asm__ (STR (__USER_LABEL_PREFIX__) "foo") __attribute__((nocommon));
the test passes. Note that cris-axis-elf has
USER_LABEL_PREFIX="_" but not mmix-knuth-mmixware. I noted in
PR 20524 that the issue was likely one of USER_LABEL_PREFIX for
the FAILs (not the ICE, though). Now that's confirmed. (FWIW,
that means the alias-7.c test will fail for arm-elf too; a
first-class release criteria.)
Again, I suggest syncing asm-name and alias names; I guess that
means not applying user-label-prefix to alias or to apply the
above change to all applicable alias tests. I don't know which
is best. Comments?
brgds, H-P