]> git.pld-linux.org Git - packages/gcc.git/blame - gcc-pr20606_pr24069.patch
- updated to 4.1.0-20051005T0949UTC.
[packages/gcc.git] / gcc-pr20606_pr24069.patch
CommitLineData
59a5f28b
PS
1The problem here is that we have an indirect jump to a label.
2JUMP_LABEL (insn) will be NULL but we will have a reg note REG_LABEL
3for the label. This patch fixes the problem by using that reg note.
4
5PR 24069 is reproducible with a profiledbootstrap on powerpc-linux-gnu
6and PR 20606 is reproducible with a java compiling from byte-code
7with -findirect-dispatch and -fPIC both of which are hard to a testcase
8for the testsuite.
9
10--- gcc/gcc/cfgbuild.c 25 Jun 2005 01:59:28 -0000 1.68
11+++ gcc/gcc/cfgbuild.c 2 Oct 2005 18:22:25 -0000
12@@ -347,8 +347,19 @@ make_edges (basic_block min, basic_block
13 /* Otherwise, we have a plain conditional or unconditional jump. */
14 else
15 {
16- gcc_assert (JUMP_LABEL (insn));
17- make_label_edge (edge_cache, bb, JUMP_LABEL (insn), 0);
18+ rtx label = JUMP_LABEL (insn);
19+ /* For indirect jumps to a label, JUMP_LABEL will be NULL, grab
20+ the label from the REG_LABEL note which should have been setup
21+ correctly already for the indirect jump. */
22+ if (!label)
23+ {
24+ label = find_reg_note (insn, REG_LABEL, NULL_RTX);
25+ if (label)
26+ label = XEXP (label, 0);
27+ }
28+
29+ gcc_assert (label);
30+ make_label_edge (edge_cache, bb, label, 0);
31 }
32 }
33
This page took 0.032037 seconds and 4 git commands to generate.