This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/63583] New: ICF does not check that the template strings are the same
- From: "pinskia at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sat, 18 Oct 2014 01:22:25 +0000
- Subject: [Bug tree-optimization/63583] New: ICF does not check that the template strings are the same
- Auto-submitted: auto-generated
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.