https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116519
Bug ID: 116519 Summary: Arm64(?): undue array bounds warning Product: gcc Version: 14.2.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: jbeulich at suse dot com Target Milestone: --- Created attachment 59020 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=59020&action=edit shrunk down example The attached example compiles fine with 13.3, but raises a warning (fails with -Werror) on 14.2 with -Wall -O2, claiming an array subscript of -2 in __irq_to_desc() when inlined into route_irq_to_guest(). Changing __irq_to_desc()'s parameter to unsigned int makes the issue go away. Whether this is Arm64-specific I can't tell; the code in question takes this specific form just there in the project the issue was first observed in.