This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH][4.1] Fix PR26258
- From: Richard Guenther <rguenther at suse dot de>
- To: Andrew Pinski <pinskia at physics dot uc dot edu>
- Cc: gcc-patches at gcc dot gnu dot org, Daniel Berlin <dberlin at dberlin dot org>
- Date: Mon, 13 Feb 2006 18:35:00 +0100 (CET)
- Subject: Re: [PATCH][4.1] Fix PR26258
- References: <200602131731.k1DHVouR022750@earth.phy.uc.edu>
On Mon, 13 Feb 2006, Andrew Pinski wrote:
> >
> >
> > This fixes PR26258, a missing special case for computing PTA information.
> >
> > Bootstrapped and tested on ia64-unknown-linux-gnu for 4.1 branch.
> >
> > Ok for 4.1 branch? (I have a similar patch for mainline, but DannyB is
> > supposed to come up with a more suitable patch there)
> >
> > Thanks,
> > Richard.
> >
> > :ADDPATCH alias:
> >
> > 2006-02-13 Richard Guenther <rguenther@suse.de>
> >
> > * tree-ssa-structalias.c (find_func_aliases): Handle aggregates
> > in PHI argument processing.
> >
> > * gcc.dg/tree-ssa/alias-13.c: New testcase.
> > Index: testsuite/gcc.dg/alias-13.c
> > ===================================================================
> > *** testsuite/gcc.dg/alias-13.c (revision 0)
> > --- testsuite/gcc.dg/alias-13.c (revision 0)
> > ***************
> > *** 0 ****
> > --- 1,29 ----
> > + /* { dg-do run } */
> > + /* { dg-options "-O2" } */
>
> Why don't you put the testcase in c.torture/execute instead?
> Also your changelog for the testcase does not match where you actually
> placed the testcase.
Whoops, I copied it to the wrong place. Will move it to gcc.dg/torture
instead. So
* gcc.dg/torture/pr26258.c: New testcase.
Index: testsuite/gcc.dg/torture/pr26258.c
===================================================================
*** testsuite/gcc.dg/torture/pr26258.c (revision 0)
--- testsuite/gcc.dg/torture/pr26258.c (revision 0)
***************
*** 0 ****
--- 1,28 ----
+ /* { dg-do run } */
+
+ extern void abort(void);
+
+ typedef struct Foo { int a; int b; } Foo;
+
+ Foo foo(Foo first, Foo last, _Bool ret_first)
+ {
+ Foo t;
+ Foo *t1 = (ret_first ? &first : &last);
+ first.a = 2;
+ last.b = 3;
+ t.a = t1->a;
+ t.b = t1->b;
+ t.a += first.a;
+ t.b += last.b;
+ return t;
+ }
+
+ int main()
+ {
+ Foo first = (Foo){1, 2};
+ Foo last = (Foo){3, 4};
+ Foo ret = foo(first, last, 0);
+ if (ret.b != 6)
+ abort ();
+ return 0;
+ }