[Bug tree-optimization/88771] [9 Regression] Misleading -Werror=array-bounds error

2019-02-21 Thread law at redhat dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88771 Jeffrey A. Law changed: What|Removed |Added CC||law at redhat dot com --- Comment #21

[Bug tree-optimization/88771] [9 Regression] Misleading -Werror=array-bounds error

2019-02-11 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88771 Martin Sebor changed: What|Removed |Added Status|ASSIGNED|NEW --- Comment #20 from Martin Sebor

[Bug tree-optimization/88771] [9 Regression] Misleading -Werror=array-bounds error

2019-02-11 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88771 --- Comment #19 from Martin Sebor --- Author: msebor Date: Mon Feb 11 17:44:05 2019 New Revision: 268775 URL: https://gcc.gnu.org/viewcvs?rev=268775=gcc=rev Log: PR tree-optimization/88771 - Misleading -Werror=array-bounds error gcc/ChangeLog:

[Bug tree-optimization/88771] [9 Regression] Misleading -Werror=array-bounds error

2019-02-06 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88771 Martin Sebor changed: What|Removed |Added Keywords||patch --- Comment #18 from Martin Sebor

[Bug tree-optimization/88771] [9 Regression] Misleading -Werror=array-bounds error

2019-02-05 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88771 --- Comment #17 from Martin Sebor --- Just for reference, GCC goes to a lot of trouble to diagnose this sort of thing and issues one of three warnings for this code, depending on which one is enabled. The first two are issued by the wrestrict

[Bug tree-optimization/88771] [9 Regression] Misleading -Werror=array-bounds error

2019-02-05 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88771 Martin Sebor changed: What|Removed |Added Status|NEW |ASSIGNED Assignee|unassigned

[Bug tree-optimization/88771] [9 Regression] Misleading -Werror=array-bounds error

2019-02-05 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88771 --- Comment #15 from Richard Biener --- Can we (did we already?) fix the diagnostic with respect to the range printing as said in comment#5? I'd defer the rest. Maybe we can even have jump-threading cancel paths that would introduce these kind

[Bug tree-optimization/88771] [9 Regression] Misleading -Werror=array-bounds error

2019-01-14 Thread rguenther at suse dot de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88771 --- Comment #14 from rguenther at suse dot de --- On Mon, 14 Jan 2019, jakub at gcc dot gnu.org wrote: > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88771 > > --- Comment #13 from Jakub Jelinek --- > (In reply to rguent...@suse.de from

[Bug tree-optimization/88771] [9 Regression] Misleading -Werror=array-bounds error

2019-01-14 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88771 --- Comment #13 from Jakub Jelinek --- (In reply to rguent...@suse.de from comment #12) > On Fri, 11 Jan 2019, msebor at gcc dot gnu.org wrote: > > > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88771 > > > > --- Comment #11 from Martin Sebor

[Bug tree-optimization/88771] [9 Regression] Misleading -Werror=array-bounds error

2019-01-14 Thread rguenther at suse dot de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88771 --- Comment #12 from rguenther at suse dot de --- On Fri, 11 Jan 2019, msebor at gcc dot gnu.org wrote: > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88771 > > --- Comment #11 from Martin Sebor --- > I understand what jump threading does but

[Bug tree-optimization/88771] [9 Regression] Misleading -Werror=array-bounds error

2019-01-11 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88771 --- Comment #11 from Martin Sebor --- I understand what jump threading does but I don't know enough about how it works to have a clear idea how viable marking up the created statements would be. To avoid false negatives it would need to make it

[Bug tree-optimization/88771] [9 Regression] Misleading -Werror=array-bounds error

2019-01-11 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88771 Jakub Jelinek changed: What|Removed |Added CC||jakub at gcc dot gnu.org --- Comment

[Bug tree-optimization/88771] [9 Regression] Misleading -Werror=array-bounds error

2019-01-10 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88771 --- Comment #9 from Martin Sebor --- It might be possible for some. I'm not sure how successful it would be for others. The thread_jumps pass runs four times and moving the warn_restrict pass before its first instance results in dozens of

[Bug tree-optimization/88771] [9 Regression] Misleading -Werror=array-bounds error

2019-01-10 Thread amonakov at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88771 --- Comment #8 from Alexander Monakov --- Yeah, on GCC users' side I think there's a demand for both: treating UB as unreachable (e.g. on tiny systems with heavy program size constraints) and transforming UB to a trap briefly annotated with

[Bug tree-optimization/88771] [9 Regression] Misleading -Werror=array-bounds error

2019-01-10 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88771 --- Comment #7 from Martin Sebor --- Yes, that's exactly right.

[Bug tree-optimization/88771] [9 Regression] Misleading -Werror=array-bounds error

2019-01-09 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88771 Martin Liška changed: What|Removed |Added CC||amonakov at gcc dot gnu.org --- Comment

[Bug tree-optimization/88771] [9 Regression] Misleading -Werror=array-bounds error

2019-01-09 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88771 --- Comment #5 from Martin Sebor --- That said, the size range in the warning output is wrong. It should be just 4294967295. The warning should probably also be changed to -Wstringop-overflow which diagnoses both out-of-bounds writes and

[Bug tree-optimization/88771] [9 Regression] Misleading -Werror=array-bounds error

2019-01-09 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88771 --- Comment #4 from Martin Sebor --- The warning is triggered by the excessive size argument in the strncpy call. The excessive size makes the call invalid regardless of the values of the two pointer arguments. This happens both with the

[Bug tree-optimization/88771] [9 Regression] Misleading -Werror=array-bounds error

2019-01-09 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88771 --- Comment #3 from Martin Liška --- Original test-case started to produce the warning since r263662.

[Bug tree-optimization/88771] [9 Regression] Misleading -Werror=array-bounds error

2019-01-09 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88771 --- Comment #2 from Martin Liška --- Created attachment 45390 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=45390=edit original test-case Original test that fails just with -m32: $ gcc om-original.i -c -O2 -Werror=array-bounds -m32 In

[Bug tree-optimization/88771] [9 Regression] Misleading -Werror=array-bounds error

2019-01-09 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88771 Richard Biener changed: What|Removed |Added Status|UNCONFIRMED |NEW Ever confirmed|0

[Bug tree-optimization/88771] [9 Regression] Misleading -Werror=array-bounds error

2019-01-09 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88771 Martin Liška changed: What|Removed |Added Last reconfirmed||2019-1-9 CC|