https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64953
--- Comment #3 from manuel.reimer at gmx dot de --- Thank you for your suggestion. This helped me to narrow this down to the function "usbReset": https://github.com/tormodvolden/maple-bootloader/blob/unify_platforms/usb.c#L258 If I use "-Os" on everything but this one function, then the result still produces one error if I plug in, but stabilizes shortly after that and then works well.