This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug tree-optimization/63583] New: ICF does not check that the template strings are the same


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]