[Bug middle-end/106892] [11/12 Regression] Wrong code at -O3 on x86_64-linux-gnu since r11-963-g80d6f89e78fc3b77

2022-10-11 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106892

--- Comment #14 from CVS Commits  ---
The releases/gcc-12 branch has been updated by Richard Biener
:

https://gcc.gnu.org/g:2b9e1f7ff476059724cca4b11d39972655d4468f

commit r12-8819-g2b9e1f7ff476059724cca4b11d39972655d4468f
Author: Richard Biener 
Date:   Fri Sep 9 12:06:38 2022 +0200

tree-optimization/106892 - avoid invalid pointer association in predcom

When predictive commoning builds a reference for iteration N it
prematurely associates a constant offset into the MEM_REF offset
operand which can be invalid if the base pointer then points
outside of an object which alias-analysis does not consider valid.

PR tree-optimization/106892
* tree-predcom.cc (ref_at_iteration): Do not associate the
constant part of the offset into the MEM_REF offset
operand, across a non-zero offset.

* gcc.dg/torture/pr106892.c: New testcase.

(cherry picked from commit a8b0b13da7379feb31950a9d2ad74b98a29c547f)

[Bug middle-end/106892] [11/12 Regression] Wrong code at -O3 on x86_64-linux-gnu since r11-963-g80d6f89e78fc3b77

2022-09-12 Thread marxin at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106892

--- Comment #13 from Martin Liška  ---
> Shouldn't that be 106892?

Right, I at least fixed ChangeLog entry in
g:3fa66b95570a125fd35d5721c9eb08d975f73e82.

[Bug middle-end/106892] [11/12 Regression] Wrong code at -O3 on x86_64-linux-gnu since r11-963-g80d6f89e78fc3b77

2022-09-10 Thread mikpelinux at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106892

Mikael Pettersson  changed:

   What|Removed |Added

 CC||mikpelinux at gmail dot com

--- Comment #12 from Mikael Pettersson  ---
(In reply to Richard Biener from comment #11)
> PR tree-optimization/106722

Shouldn't that be 106892?

> * tree-predcom.cc (ref_at_iteration): Do not associate the
> constant part of the offset into the MEM_REF offset
> operand, across a non-zero offset.
> 
> * gcc.dg/torture/pr106892.c: New testcase.