https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90238
Richard Biener <rguenth at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |diagnostic Status|UNCONFIRMED |ASSIGNED Last reconfirmed| |2019-04-25 Assignee|unassigned at gcc dot gnu.org |rguenth at gcc dot gnu.org Ever confirmed|0 |1 Severity|enhancement |normal --- Comment #6 from Richard Biener <rguenth at gcc dot gnu.org> --- Well, the warning code is confused by fortran passing &""[1], ignoring the one-after-the-array case for /* Empty array. */ if (up_bound && tree_int_cst_equal (low_bound, up_bound_p1)) warned = warning_at (location, OPT_Warray_bounds, "array subscript %E is above array bounds of %qT", low_bound, artype); not sure why this special-case was added here. I think you can't create this string literal with a C testcase (you always have the null termination). I've added this check at r222146 possibly to rule out erratic behavior in the anti-range handling case as part of the PR64277 fix.