https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116315
Andrew Pinski <pinskia at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Resolution|--- |INVALID --- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> --- I think this is not exactly a false positive. If fi.opamp_voltage_size is zero or negative, then undefine behavior happens. There is no way for GCC to know it was neither. Adding an assert that `fi.opamp_voltage_size > 0` is true right after the definition of scaled_voltage before the initialization loop fixes the issue. Note you might want to also assert it is less than or equal to 50 too.