[Bug tree-optimization/90662] strlen of a string in a vla plus offset not folded

2019-06-13 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90662 --- Comment #6 from Martin Sebor --- Author: msebor Date: Fri Jun 14 02:07:02 2019 New Revision: 272281 URL: https://gcc.gnu.org/viewcvs?rev=272281=gcc=rev Log: PR tree-optimization/90662 - strlen of a string in a vla plus offset not folded

[Bug tree-optimization/90662] strlen of a string in a vla plus offset not folded

2019-06-12 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90662 Martin Sebor changed: What|Removed |Added Status|ASSIGNED|RESOLVED Resolution|---

[Bug tree-optimization/90662] strlen of a string in a vla plus offset not folded

2019-06-12 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90662 --- Comment #4 from Martin Sebor --- Author: msebor Date: Wed Jun 12 16:33:04 2019 New Revision: 272197 URL: https://gcc.gnu.org/viewcvs?rev=272197=gcc=rev Log: PR tree-optimization/90662 - strlen of a string in a vla plus offset not folded

[Bug tree-optimization/90662] strlen of a string in a vla plus offset not folded

2019-06-05 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90662 Martin Sebor changed: What|Removed |Added Keywords||patch Status|UNCONFIRMED

[Bug tree-optimization/90662] strlen of a string in a vla plus offset not folded

2019-05-29 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90662 --- Comment #2 from Martin Sebor --- It doesn't help that the ADDR_EXPR is rendered as &*a.1_9[2] when it should be &(*a.1_9)[2] because a.1_9 is a pointer to a char[n] array. With the parenthesization the problem becomes more apparent (to me,

[Bug tree-optimization/90662] strlen of a string in a vla plus offset not folded

2019-05-28 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90662 --- Comment #1 from Martin Sebor --- The inequality in g() should be != 3, not != 5: void g (int n) { char a[n]; __builtin_strcpy (a, "12345"); if (__builtin_strlen ([2]) != 3) // not folded __builtin_abort (); } The