http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51767

             Bug #: 51767
           Summary: [4.5/4.6/4.7 Regression] ICE with degenerated asm goto
    Classification: Unclassified
           Product: gcc
           Version: 4.7.0
            Status: UNCONFIRMED
          Keywords: ice-on-valid-code
          Severity: normal
          Priority: P3
         Component: rtl-optimization
        AssignedTo: unassig...@gcc.gnu.org
        ReportedBy: ja...@gcc.gnu.org
            Target: x86_64-linux


extern void fn1 (void), fn2 (void);

static inline __attribute__((always_inline)) int
foo (int *x, long y)
{
  asm goto ("" : : "r" (x), "r" (y) : "memory" : lab);
  return 0;
lab:
  return 1;
}

void
bar (int *x)
{
  if (foo (x, 23))
    fn1 ();
  else
    fn2 ();

  foo (x, 2);
}

ICEs at -O2 on x86_64-linux.

Reply via email to