[Bug tree-optimization/101401] strlen of a constant char vector not folded

2025-04-09 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101401 --- Comment #2 from Andrew Pinski --- Here is some more: ``` void f1 () { char c8[8]; for(int i = 0;i < 8;i ++) { c8[i] = i < 4 ? ('a'+i) : 0; } if (__builtin_strlen (&c8[0]) != 4) __builtin_abort (); } void g1 (void) { __at

[Bug tree-optimization/101401] strlen of a constant char vector not folded

2025-04-09 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101401 Andrew Pinski changed: What|Removed |Added Severity|normal |enhancement Last reconfirmed|