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 optimization/13177] [tree-ssa] ICE in calculate_live_on_entry, at tree-ssa-live.c:753


------- Additional Comments From amacleod at redhat dot com  2003-11-24 18:34 -------
THis appears to be a bug in PRE. I traced out the basic block flow, and PRE has
apparently inserted the specified stmt (p_201 = pretmp.344_32) in BB 9.
p_201 is only used in a PHI node in block 25:

# BLOCK 25
  # PRED: 18 (false,exec) 23 (false,exec) 55 53 24 (fallthru,exec)
  # pretmp.344_34 = PHI <p_201(18), p_201(24), pretmp.344_68(53),
pretmp.344_79(55), pretmp.344_32(23)>;

I can trace a path from BB0 to BB25 through BB18 which does not include BB9, and
so p_201 is undefined on that path:

BB0->BB3->BB26->BB4->BB5->BB7->BB8->BB17->BB18->BB25

So the error is correct, The assignment is incorrectly placed for some reason.

The problem goes away with -fno-tree-pre.

Andrew


PS, with the enw smaller testcase, the same thing can be seen:

  # BLOCK 4
  # PRED: 2 (true,exec) 3
  # pretmp.4_5 = PHI <pretmp.4_25(3), pretmp.4_26(2)>;
<L3>:;
  if (T.1_13 == 58) goto <L6>; else goto <L5>;
  # SUCC: 5 (false,exec) 6 (true,exec)

  # BLOCK 5
  # PRED: 4 (false,exec)
<L5>:;
  symbol_start_20 = pretmp.4_5;
  # SUCC: 6 (fallthru,exec)

  # BLOCK 6
  # PRED: 4 (true,exec) 9 5 (fallthru,exec)
  # symbol_start_1 = PHI <symbol_start_2(9), pretmp.4_5(4), pretmp.4_5(5)>;
  # pretmp.4_6 = PHI <symbol_start_20(4), pretmp.4_5(5), pretmp.4_24(9)>;
<L6>:;

The assignemnt symbol_start_20 is in block 5, but it is used in the PHI node
coming from block 4.

Andrew

-- 


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


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