http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55036
Bug #: 55036 Summary: Compiler fails with message "internal compiler error: in reg_save_code, at caller-save.c:158" Classification: Unclassified Product: gcc Version: 4.6.3 Status: UNCONFIRMED Severity: normal Priority: P3 Component: target AssignedTo: unassig...@gcc.gnu.org ReportedBy: jantlat...@gmail.com Assume the movm insn is the first define_insn pattern in the target md file: When compiling with the built compiler at least with optimization level 2 (-O2), the compiler will always fail during compile when function calls are involved. The following error message occurs: "internal compiler error: in reg_save_code, at caller-save.c:158" A short web search lead me to this: http://old.nabble.com/upgrading-gcc-4.4.0-to-gcc-4.7.0%3Aconfigure%3A-error%3A-cannot-compute-suffix-of-object-files%3A-cannot-compile-td34003613.html Apparently he could fix it by putting any other define_insn (e.g. nop) right before the mov insns, so the first mov insn does not get the index 0. That worked for me as well. I could not find any documentation about not putting a mov insn pattern at the beginning of the md file. Therefore I assume it's a bug.