https://gcc.gnu.org/bugzilla/show_bug.cgi?id=38239
Rainer Orth <ro at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |ASSIGNED Last reconfirmed| |2016-03-14 Known to work| |4.3.2, 4.4.2, 4.5.2, 4.6.0, | |4.7.2, 4.8.0 Assignee|unassigned at gcc dot gnu.org |ro at gcc dot gnu.org Target Milestone|--- |6.0 Summary|The function mcount in |[4.9, 5, 6 regression] The |gmon.o changes register ecx |function mcount in gmon.o | |changes register ecx Ever confirmed|0 |1 Known to fail| |4.9.0, 5.1.0, 6.0 --- Comment #2 from Rainer Orth <ro at gcc dot gnu.org> --- I can now reproduce this, starting with gcc 4.9. After some digging, I found that _mcount isn't called like a regular function, but has to take care of saving and restoring call-clobbered registers itself. Rainer