* [Bug tree-optimization/96730] [10/11 Regression] ICE on x86_64-linux-gnu with `-O1` to `-O3` (in verify_sra_access_forest, at tree-sra.c:2352) since r10-6320-g5b9e89c922dc2e7e
2020-08-21 3:33 [Bug tree-optimization/96730] New: ICE on x86_64-linux-gnu with `-O1` to `-O3` (in verify_sra_access_forest, at tree-sra.c:2352) cnsun at uwaterloo dot ca
@ 2020-08-24 8:18 ` marxin at gcc dot gnu.org
2020-08-24 9:50 ` jamborm at gcc dot gnu.org
` (5 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: marxin at gcc dot gnu.org @ 2020-08-24 8:18 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96730
Martin Liška <marxin at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Ever confirmed|0 |1
Last reconfirmed| |2020-08-24
Summary|ICE on x86_64-linux-gnu |[10/11 Regression] ICE on
|with `-O1` to `-O3` (in |x86_64-linux-gnu with `-O1`
|verify_sra_access_forest, |to `-O3` (in
|at tree-sra.c:2352) |verify_sra_access_forest,
| |at tree-sra.c:2352) since
| |r10-6320-g5b9e89c922dc2e7e
CC| |jamborm at gcc dot gnu.org,
| |marxin at gcc dot gnu.org
Known to work| |9.3.0
Status|UNCONFIRMED |NEW
Known to fail| |10.2.0, 11.0
--- Comment #1 from Martin Liška <marxin at gcc dot gnu.org> ---
Thanks for report.
Started with Martin's r10-6320-g5b9e89c922dc2e7e.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug tree-optimization/96730] [10/11 Regression] ICE on x86_64-linux-gnu with `-O1` to `-O3` (in verify_sra_access_forest, at tree-sra.c:2352) since r10-6320-g5b9e89c922dc2e7e
2020-08-21 3:33 [Bug tree-optimization/96730] New: ICE on x86_64-linux-gnu with `-O1` to `-O3` (in verify_sra_access_forest, at tree-sra.c:2352) cnsun at uwaterloo dot ca
2020-08-24 8:18 ` [Bug tree-optimization/96730] [10/11 Regression] ICE on x86_64-linux-gnu with `-O1` to `-O3` (in verify_sra_access_forest, at tree-sra.c:2352) since r10-6320-g5b9e89c922dc2e7e marxin at gcc dot gnu.org
@ 2020-08-24 9:50 ` jamborm at gcc dot gnu.org
2020-08-24 15:09 ` jamborm at gcc dot gnu.org
` (4 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: jamborm at gcc dot gnu.org @ 2020-08-24 9:50 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96730
Martin Jambor <jamborm at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |ASSIGNED
Assignee|unassigned at gcc dot gnu.org |jamborm at gcc dot gnu.org
--- Comment #2 from Martin Jambor <jamborm at gcc dot gnu.org> ---
Mine.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug tree-optimization/96730] [10/11 Regression] ICE on x86_64-linux-gnu with `-O1` to `-O3` (in verify_sra_access_forest, at tree-sra.c:2352) since r10-6320-g5b9e89c922dc2e7e
2020-08-21 3:33 [Bug tree-optimization/96730] New: ICE on x86_64-linux-gnu with `-O1` to `-O3` (in verify_sra_access_forest, at tree-sra.c:2352) cnsun at uwaterloo dot ca
2020-08-24 8:18 ` [Bug tree-optimization/96730] [10/11 Regression] ICE on x86_64-linux-gnu with `-O1` to `-O3` (in verify_sra_access_forest, at tree-sra.c:2352) since r10-6320-g5b9e89c922dc2e7e marxin at gcc dot gnu.org
2020-08-24 9:50 ` jamborm at gcc dot gnu.org
@ 2020-08-24 15:09 ` jamborm at gcc dot gnu.org
2020-08-25 11:19 ` rguenth at gcc dot gnu.org
` (3 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: jamborm at gcc dot gnu.org @ 2020-08-24 15:09 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96730
--- Comment #3 from Martin Jambor <jamborm at gcc dot gnu.org> ---
I have proposed a fix on the mailing list:
https://gcc.gnu.org/pipermail/gcc-patches/2020-August/552488.html
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug tree-optimization/96730] [10/11 Regression] ICE on x86_64-linux-gnu with `-O1` to `-O3` (in verify_sra_access_forest, at tree-sra.c:2352) since r10-6320-g5b9e89c922dc2e7e
2020-08-21 3:33 [Bug tree-optimization/96730] New: ICE on x86_64-linux-gnu with `-O1` to `-O3` (in verify_sra_access_forest, at tree-sra.c:2352) cnsun at uwaterloo dot ca
` (2 preceding siblings ...)
2020-08-24 15:09 ` jamborm at gcc dot gnu.org
@ 2020-08-25 11:19 ` rguenth at gcc dot gnu.org
2020-08-25 11:34 ` cvs-commit at gcc dot gnu.org
` (2 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: rguenth at gcc dot gnu.org @ 2020-08-25 11:19 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96730
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |ice-checking,
| |ice-on-valid-code
Priority|P3 |P2
Target Milestone|--- |10.3
Version|unknown |10.2.1
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug tree-optimization/96730] [10/11 Regression] ICE on x86_64-linux-gnu with `-O1` to `-O3` (in verify_sra_access_forest, at tree-sra.c:2352) since r10-6320-g5b9e89c922dc2e7e
2020-08-21 3:33 [Bug tree-optimization/96730] New: ICE on x86_64-linux-gnu with `-O1` to `-O3` (in verify_sra_access_forest, at tree-sra.c:2352) cnsun at uwaterloo dot ca
` (3 preceding siblings ...)
2020-08-25 11:19 ` rguenth at gcc dot gnu.org
@ 2020-08-25 11:34 ` cvs-commit at gcc dot gnu.org
2020-08-25 14:12 ` cvs-commit at gcc dot gnu.org
2020-08-25 14:15 ` jamborm at gcc dot gnu.org
6 siblings, 0 replies; 8+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2020-08-25 11:34 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96730
--- Comment #4 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Martin Jambor <jamborm@gcc.gnu.org>:
https://gcc.gnu.org/g:556600286dd312d3ddf3d673a8579576862663e3
commit r11-2838-g556600286dd312d3ddf3d673a8579576862663e3
Author: Martin Jambor <mjambor@suse.cz>
Date: Tue Aug 25 13:33:44 2020 +0200
sra: Bail out when encountering accesses with negative offsets (PR 96730)
I must admit I was quite surprised to see that SRA does not disqualify
an aggregate from any transformations when it encounters an offset for
which get_ref_base_and_extent returns a negative offset. It may not
matter too much because I sure hope such programs always have
undefined behavior (SRA candidates are local variables on stack) but
it is probably better not to perform weird transformations on them as
build ref model with the new build_reconstructed_reference function
currently happily do for negative offsets (they just copy the existing
expression which is then used as the expression of a "propagated"
access) and of course the compiler must not ICE (as it currently does
because the SRA forest verifier does not like the expression).
gcc/ChangeLog:
2020-08-24 Martin Jambor <mjambor@suse.cz>
PR tree-optimization/96730
* tree-sra.c (create_access): Disqualify any aggregate with
negative
offset access.
(build_ref_for_model): Add assert that offset is non-negative.
gcc/testsuite/ChangeLog:
2020-08-24 Martin Jambor <mjambor@suse.cz>
PR tree-optimization/96730
* gcc.dg/tree-ssa/pr96730.c: New test.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug tree-optimization/96730] [10/11 Regression] ICE on x86_64-linux-gnu with `-O1` to `-O3` (in verify_sra_access_forest, at tree-sra.c:2352) since r10-6320-g5b9e89c922dc2e7e
2020-08-21 3:33 [Bug tree-optimization/96730] New: ICE on x86_64-linux-gnu with `-O1` to `-O3` (in verify_sra_access_forest, at tree-sra.c:2352) cnsun at uwaterloo dot ca
` (4 preceding siblings ...)
2020-08-25 11:34 ` cvs-commit at gcc dot gnu.org
@ 2020-08-25 14:12 ` cvs-commit at gcc dot gnu.org
2020-08-25 14:15 ` jamborm at gcc dot gnu.org
6 siblings, 0 replies; 8+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2020-08-25 14:12 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96730
--- Comment #5 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-10 branch has been updated by Martin Jambor
<jamborm@gcc.gnu.org>:
https://gcc.gnu.org/g:e57cdbca52df908a48bbf92c64d50dd46f483de9
commit r10-8661-ge57cdbca52df908a48bbf92c64d50dd46f483de9
Author: Martin Jambor <mjambor@suse.cz>
Date: Tue Aug 25 16:11:56 2020 +0200
sra: Bail out when encountering accesses with negative offsets (PR 96730)
I must admit I was quite surprised to see that SRA does not disqualify
an aggregate from any transformations when it encounters an offset for
which get_ref_base_and_extent returns a negative offset. It may not
matter too much because I sure hope such programs always have
undefined behavior (SRA candidates are local variables on stack) but
it is probably better not to perform weird transformations on them as
build ref model with the new build_reconstructed_reference function
currently happily do for negative offsets (they just copy the existing
expression which is then used as the expression of a "propagated"
access) and of course the compiler must not ICE (as it currently does
because the SRA forest verifier does not like the expression).
gcc/ChangeLog:
2020-08-24 Martin Jambor <mjambor@suse.cz>
PR tree-optimization/96730
* tree-sra.c (create_access): Disqualify any aggregate with
negative
offset access.
(build_ref_for_model): Add assert that offset is non-negative.
gcc/testsuite/ChangeLog:
2020-08-24 Martin Jambor <mjambor@suse.cz>
PR tree-optimization/96730
* gcc.dg/tree-ssa/pr96730.c: New test.
(cherry picked from commit 556600286dd312d3ddf3d673a8579576862663e3)
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug tree-optimization/96730] [10/11 Regression] ICE on x86_64-linux-gnu with `-O1` to `-O3` (in verify_sra_access_forest, at tree-sra.c:2352) since r10-6320-g5b9e89c922dc2e7e
2020-08-21 3:33 [Bug tree-optimization/96730] New: ICE on x86_64-linux-gnu with `-O1` to `-O3` (in verify_sra_access_forest, at tree-sra.c:2352) cnsun at uwaterloo dot ca
` (5 preceding siblings ...)
2020-08-25 14:12 ` cvs-commit at gcc dot gnu.org
@ 2020-08-25 14:15 ` jamborm at gcc dot gnu.org
6 siblings, 0 replies; 8+ messages in thread
From: jamborm at gcc dot gnu.org @ 2020-08-25 14:15 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96730
Martin Jambor <jamborm at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |FIXED
Status|ASSIGNED |RESOLVED
--- Comment #6 from Martin Jambor <jamborm at gcc dot gnu.org> ---
Fixed, thanks for reporting.
^ permalink raw reply [flat|nested] 8+ messages in thread