This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Last testcase for PR middle-end/25140
- From: Richard Biener <richard dot guenther at gmail dot com>
- To: Jan Hubicka <hubicka at ucw dot cz>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Thu, 17 Dec 2015 09:59:43 +0100
- Subject: Re: Last testcase for PR middle-end/25140
- Authentication-results: sourceware.org; auth=none
- References: <20151216192236 dot GR5527 at kam dot mff dot cuni dot cz>
On Wed, Dec 16, 2015 at 8:22 PM, Jan Hubicka <hubicka@ucw.cz> wrote:
> Hi,
> I checked the ipa-pta and pta implementations and these seems to work just
> fine with presence of aliases because get_constraint_for_ssa_var already
> looks into the alias targets.
>
> This patch adds a testcase I constructed. Since I am done with auditing
> *alias*.c for variable aliases I will close the PR (after 10 years, yay)
Note that alias-2.c still fails on some targets (miscompiled in RTL
opt somewhere).
PR68832
Richard.
> Honza
>
> PR middle-end/25140
> * gcc.c-torture/execute/alias-4.c: New testcase.
> Index: testsuite/gcc.c-torture/execute/alias-4.c
> ===================================================================
> --- testsuite/gcc.c-torture/execute/alias-4.c (revision 0)
> +++ testsuite/gcc.c-torture/execute/alias-4.c (revision 0)
> @@ -0,0 +1,19 @@
> +/* { dg-require-alias "" } */
> +int a = 1;
> +extern int b __attribute__ ((alias ("a")));
> +int c = 1;
> +extern int d __attribute__ ((alias ("c")));
> +main (int argc)
> +{
> + int *p;
> + int *q;
> + if (argc)
> + p = &a, q = &b;
> + else
> + p = &c, q = &d;
> + *p = 1;
> + *q = 2;
> + if (*p == 1)
> + __builtin_abort ();
> + return 0;
> +}