https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106068
--- Comment #2 from Dave Flogeras <dflogeras2 at gmail dot com> ---
(In reply to Andrew Pinski from comment #1)
> You access an out of bounds for the array dhcp_rx_options_given in the while
> statement:
>
> while((dhcp_rx_options_given[8 + n] != 0) && (n < 2)) {
>
>
> Swap around the two expressions so you check to make sure n is less than 2
> before doing the array access. that is:
>
> while((n < 2) && (dhcp_rx_options_given[8 + n] != 0)) {
For that code, agreed, and that was indeed both our and upstreams workaround.
We were just wondering if it was a legitimate compiler bug given that it
generated an infinite loop in asm. Or does it just fall under "undefined"