https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68400
Bug ID: 68400 Summary: ICE in change_address_1, at emit-rtl.c:2125 Product: gcc Version: 5.2.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: target Assignee: unassigned at gcc dot gnu.org Reporter: nbd at nbd dot name Target Milestone: --- Created attachment 36748 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=36748&action=edit Proposed fix When MIPS16 is enabled, I get the following ICE when compiling libpcap: ./pcap-common.c: In function 'swap_linux_usb_header.isra.0': ./pcap-common.c:1296:1: internal compiler error: in change_address_1, at emit-rtl.c:2125 } I've analyzed this, and found that it generates a single-byte load from the stack, which is not valid in MIPS16 - only size 4 or 8 is valid for access with offset from the stack pointer, as explained by the comment in mips_regno_mode_ok_for_base_p(). I've attached a patch which fixes the issue.