https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63583
Bug ID: 63583 Summary: ICF does not check that the template strings are the same Product: gcc Version: 5.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: pinskia at gcc dot gnu.org Take: static int f(int t) __attribute__((noinline)); static int g(int t) __attribute__((noinline)); static int g(int t) { asm("addl %0, 1": "+r"(t)); return t; } static int f(int t) { asm("addq %0, -1": "+r"(t)); return t; } int h(int t) { return f(t) + g(t); } --- CUT --- ICF decides both g and f are the same function but they are not due to the different strings in the inline-asm.