[Bug tree-optimization/125885] [16/17 Regression] False -Warray-bounds array subscript above array bounds with lookup table

pinskia at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Thu Jun 18 19:47:37 GMT 2026


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=125885

Drea Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |16.2
     Ever confirmed|0                           |1
            Summary|False -Warray-bounds array  |[16/17 Regression] False
                   |subscript above array       |-Warray-bounds array
                   |bounds with lookup table    |subscript above array
                   |                            |bounds with lookup table
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2026-06-18
                 CC|                            |pinskia at gcc dot gnu.org

--- Comment #3 from Drea Pinski <pinskia at gcc dot gnu.org> ---
A Simple workaround (which should not be needed) is add:
```
default:
  __builtin_unreachable ();
```

To that switch statment.

I am not sure why trailingBytesForUTF8's range was not figured out to be [0,0]
either.


More information about the Gcc-bugs mailing list