Commit af618949 by Michael Matz Committed by Michael Matz

re PR target/40031 (ARM broken with addresses in PHIs with -fPIC)

        PR target/40031
        * config/arm/arm.c (require_pic_register): Emit on entry
        edge, not at entry of function.
testsuite/
        * gcc.dg/pr40031.c: New test.

From-SVN: r147350
parent b7d7a473
2009-05-10 Michael Matz <matz@suse.de>
PR target/40031
* config/arm/arm.c (require_pic_register): Emit on entry edge,
not at entry of function.
2009-05-10 Richard Guenther <rguenther@suse.de> 2009-05-10 Richard Guenther <rguenther@suse.de>
PR tree-optimization/40081 PR tree-optimization/40081
......
...@@ -3596,7 +3596,11 @@ require_pic_register (void) ...@@ -3596,7 +3596,11 @@ require_pic_register (void)
seq = get_insns (); seq = get_insns ();
end_sequence (); end_sequence ();
emit_insn_after (seq, entry_of_function ()); /* We can be called during expansion of PHI nodes, where
we can't yet emit instructions directly in the final
insn stream. Queue the insns on the entry edge, they will
be committed after everything else is expanded. */
insert_insn_on_edge (seq, single_succ_edge (ENTRY_BLOCK_PTR));
} }
} }
} }
......
2009-05-10 Michael Matz <matz@suse.de>
PR target/40031
* gcc.dg/pr40031.c: New test.
2009-05-10 Paul Thomas <pault@gcc.gnu.org> 2009-05-10 Paul Thomas <pault@gcc.gnu.org>
PR fortran/40018 PR fortran/40018
......
/* { dg-do compile { target fpic } } */
/* { dg-options "-O2 -fPIC" } */
double c;
double d;
double *f(int a)
{
if(a) return &c;
return &d;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment