https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64452
Bug ID: 64452 Summary: ICE in avr-gcc when passing struct member to varargs function Product: gcc Version: 4.8.2 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: chris.foster at roames dot com.au Created attachment 34366 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=34366&action=edit Reduced test case Compiling the attached test case with gcc 4.8.2 (ubuntu 14.04.1 LTS) produces $ avr-gcc -c avr-gcc-ice.c avr-gcc-ice.c: In function ‘foo’: avr-gcc-ice.c:12:1: internal compiler error: in push_reload, at reload.c:1360 } ^ Please submit a full bug report, with preprocessed source if appropriate. See <http://gcc.gnu.org/bugs.html> for instructions. The ICE seems to be triggered by the specific combination of: * struct layout (switching field order in A avoids the error) * passing the structs by value (passing pointers to A avoids the error) * passing to a varargs function (replacing the call to printf with a non-varargs function which accepts the same args avoids the error)