extern void abort (void); void __attribute__((noinline)) g(int **a, int *b) { *a = b; } int foo(int * restrict p, int *q) { g(&q, p); *p = 1; *q = 2; return *p + *q; } int main() { int x, y; if (foo(&x, &y) != 4) abort (); return 0; }
I have a patch.
Author: rguenth Date: Mon Oct 15 10:58:28 2018 New Revision: 265160 URL: https://gcc.gnu.org/viewcvs?rev=265160&root=gcc&view=rev Log: 2018-10-15 Richard Biener <rguenther@suse.de> PR middle-end/87610 * tree-ssa-structalias.c (struct vls_data): Add escaped_p member. (visit_loadstore): When a used restrict tag escaped verify that the points-to solution of "other" pointers do not include escaped. (compute_dependence_clique): If a used restrict tag escaped communicated that down to visit_loadstore. * gcc.dg/torture/restrict-6.c: New testcase. Added: trunk/gcc/testsuite/gcc.dg/torture/restrict-6.c Modified: trunk/gcc/ChangeLog trunk/gcc/testsuite/ChangeLog trunk/gcc/tree-ssa-structalias.c
Fixed on trunk sofar.
Author: rguenth Date: Tue Oct 16 07:28:49 2018 New Revision: 265185 URL: https://gcc.gnu.org/viewcvs?rev=265185&root=gcc&view=rev Log: 2018-10-16 Richard Biener <rguenther@suse.de> Backport from mainline 2018-10-15 Richard Biener <rguenther@suse.de> PR middle-end/87610 * tree-ssa-structalias.c (struct vls_data): Add escaped_p member. (visit_loadstore): When a used restrict tag escaped verify that the points-to solution of "other" pointers do not include escaped. (compute_dependence_clique): If a used restrict tag escaped communicated that down to visit_loadstore. * gcc.dg/torture/restrict-6.c: New testcase. 2018-10-01 Richard Biener <rguenther@suse.de> PR tree-optimization/87465 * tree-ssa-loop-ivcanon.c (tree_estimate_loop_size): Fix typo causing branch miscounts. * gcc.dg/tree-ssa/cunroll-15.c: New testcase. Added: branches/gcc-8-branch/gcc/testsuite/gcc.dg/torture/restrict-6.c branches/gcc-8-branch/gcc/testsuite/gcc.dg/tree-ssa/cunroll-15.c Modified: branches/gcc-8-branch/gcc/ChangeLog branches/gcc-8-branch/gcc/testsuite/ChangeLog branches/gcc-8-branch/gcc/tree-ssa-loop-ivcanon.c branches/gcc-8-branch/gcc/tree-ssa-structalias.c
GCC 6 branch is being closed
*** Bug 88014 has been marked as a duplicate of this bug. ***
Fixed.
Author: rguenth Date: Mon Nov 26 13:31:21 2018 New Revision: 266460 URL: https://gcc.gnu.org/viewcvs?rev=266460&root=gcc&view=rev Log: 2018-11-26 Richard Biener <rguenther@suse.de> Backport from mainline 2018-10-15 Richard Biener <rguenther@suse.de> PR middle-end/87610 * tree-ssa-structalias.c (struct vls_data): Add escaped_p member. (visit_loadstore): When a used restrict tag escaped verify that the points-to solution of "other" pointers do not include escaped. (compute_dependence_clique): If a used restrict tag escaped communicated that down to visit_loadstore. * gcc.dg/torture/restrict-6.c: New testcase. 2018-10-25 Richard Biener <rguenther@suse.de> PR tree-optimization/87665 PR tree-optimization/87745 * tree-vectorizer.h (get_earlier_stmt): Remove. (get_later_stmt): Pick up UID from the original non-pattern stmt. * gfortran.dg/20181025-1.f: New testcase. 2018-10-24 Richard Biener <rguenther@suse.de> PR tree-optimization/87665 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Adjust to reflect reality. * gcc.dg/torture/pr87665.c: New testcase. Added: branches/gcc-7-branch/gcc/testsuite/gcc.dg/torture/pr87665.c branches/gcc-7-branch/gcc/testsuite/gcc.dg/torture/restrict-6.c branches/gcc-7-branch/gcc/testsuite/gfortran.dg/20181025-1.f Modified: branches/gcc-7-branch/gcc/ChangeLog branches/gcc-7-branch/gcc/testsuite/ChangeLog branches/gcc-7-branch/gcc/tree-ssa-structalias.c branches/gcc-7-branch/gcc/tree-vect-data-refs.c branches/gcc-7-branch/gcc/tree-vectorizer.h