https://gcc.gnu.org/bugzilla/show_bug.cgi?id=73285
Bug ID: 73285 Summary: perhaps avoid duplication? Product: gcc Version: 7.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: drepper.fsp+rhbz at gmail dot com Target Milestone: --- For some architectures functions with different interfaces generate identical code. For instance, on x86-64 (not the old x86 ABI): double f1(int a, double b) { return a + b; } double f2(double a, int b) { return a + b; } Obviously the reason is that the parameters are stored in the same registers for both functions. Perhaps this could be recognized and the compiler could avoid generating the code twice?