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: Another AIX Bootstrap failure


> Index: testsuite/gcc.dg/localalias.c
> ===================================================================
> --- testsuite/gcc.dg/localalias.c       (revision 0)
> +++ testsuite/gcc.dg/localalias.c       (revision 0)
> @@ -0,0 +1,42 @@
> +/* This test checks that local aliases behave sanely.  This is necessary for code correctness
> +   of aliases introduced by ipa-visibility pass.
> +
> +   If this test fails either aliases needs to be disabled on given target on aliases with
> +   proper semantic needs to be implemented.  This is problem with e.g. AIX .set pseudo-op
> +   that implementes alias syntactically (by substituting in assembler) rather as alternative
> +   symbol defined on a target's location.  */
> +
> +/* { dg-do run }
> +   { dg-options "-Wstrict-aliasing=2 -fstrict-aliasing" }
> +   { dg-require-alias "" }
> +   { dg-xfail-if "" { powerpc-ibm-aix* } { "*" } { "" } }
> +   { dg-additional-sources "localalias-2.c" } */
> +extern void abort (void);
> +extern int test2count;
> +int testcount;
> +__attribute__ ((weak,noinline))
> +void test(void)
> +{
> +  testcount++;
> +}
> +__attribute ((alias("test")))
> +static void test2(void);
> +
> +void main()
> +{
> +  test2();
> +  /* This call must bind locally.  */
> +  if (!testcount)
> +    abort ();
> +  test();
> +  /* Depending on linker choice, this one may bind locally
> +     or to the other unit.  */
> +  if (!testcount && !test2count)
> +    abort();
> +  tt();
> +
> +  if ((testcount != 1 || test2count != 3)
> +      && (testcount != 3 || test2count != 1))
> +    abort ();
> +  reutrn 0;
^^^^^^^^^^^^^^^^^ typo
> +}

return 0;

You probably should run the testcases before committing them.

Thanks, David


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