[Bug middle-end/53695] [4.8 Regression] ICE: in dfs_enumerate_from, at cfganal.c:1221 with -O2 -ftracer and labels/gotos

steven at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Thu Aug 23 09:44:00 GMT 2012


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

--- Comment #19 from Steven Bosscher <steven at gcc dot gnu.org> 2012-08-23 09:44:18 UTC ---
FWIW, applying the transformation tracer performs on the test case by hand:

void
foo (const void * * p)
{
  void *labs[] = { &&l1, &&l2, &&l3 };

  void *gotovar;
  long unsigned int p0;
  long unsigned int t7;
  long unsigned int t13;

  gotovar = p;
  p0 = (long unsigned int) gotovar;
  t13 = p0 + 8;
  p = (const void **) t13;
  goto bb5;

l1:
  gotovar = p;
  p0 = (long unsigned int) gotovar;
  t7 = p0 + 8;
  p = (const void **) t7;
  goto bb5;

bb5:
  goto *gotovar;

l2:
  gotovar = p;
  goto bb5;

l3:
  return;
}

This compiles without problem. Gives:
Disambiguating loop 1 with multiple latches
Merged latch edges of loop 1
;; 2 loops found
;;
;; Loop 0
;;  header 0, latch 1
;;  depth 0, outer -1
;;  nodes: 0 1 2 3 4 7 5 6
;;
;; Loop 1
;;  header 7, latch 4
;;  depth 1, outer 0
;;  nodes: 7 4 5 3
;; 2 succs { 7 }
;; 3 succs { 4 }
;; 4 succs { 7 }
;; 7 succs { 3 5 6 }
;; 5 succs { 4 }
;; 6 succs { 1 }



More information about the Gcc-bugs mailing list