re PR target/35760 (ICE with complex types and -static on PPC darwin)
PR target/35760 * config/rs6000/rs6000.c (rs6000_legitimize_address): Only create LO_SUM on Darwin if mode has just one unit. * gcc.c-torture/compile/pr35760.c: New test. From-SVN: r141055
This commit is contained in:
parent
8d22015287
commit
506a7bc899
|
@ -1,3 +1,9 @@
|
|||
2008-10-11 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR target/35760
|
||||
* config/rs6000/rs6000.c (rs6000_legitimize_address): Only create
|
||||
LO_SUM on Darwin if mode has just one unit.
|
||||
|
||||
2008-10-10 H.J. Lu <hongjiu.lu@intel.com>
|
||||
|
||||
PR debug/37002
|
||||
|
|
|
@ -3860,6 +3860,7 @@ rs6000_legitimize_address (rtx x, rtx oldx ATTRIBUTE_UNUSED,
|
|||
&& GET_CODE (x) != CONST_INT
|
||||
&& GET_CODE (x) != CONST_DOUBLE
|
||||
&& CONSTANT_P (x)
|
||||
&& GET_MODE_NUNITS (mode) == 1
|
||||
&& ((TARGET_HARD_FLOAT && TARGET_FPRS && TARGET_DOUBLE_FLOAT)
|
||||
|| (mode != DFmode && mode != DDmode))
|
||||
&& mode != DImode
|
||||
|
|
|
@ -1,3 +1,8 @@
|
|||
2008-10-11 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR target/35760
|
||||
* gcc.c-torture/compile/pr35760.c: New test.
|
||||
|
||||
2008-10-10 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR c++/37146
|
||||
|
|
|
@ -0,0 +1,7 @@
|
|||
/* PR target/35760 */
|
||||
|
||||
void
|
||||
foo (void)
|
||||
{
|
||||
__complex__ float i = 0;
|
||||
}
|
|
@ -296,12 +296,29 @@ check_final_bb (void)
|
|||
{
|
||||
basic_block bb = gimple_phi_arg_edge (phi, i)->src;
|
||||
|
||||
if ((bb == info.switch_bb
|
||||
|| (single_pred_p (bb) && single_pred (bb) == info.switch_bb))
|
||||
&& !is_gimple_ip_invariant (gimple_phi_arg_def (phi, i)))
|
||||
if (bb == info.switch_bb
|
||||
|| (single_pred_p (bb) && single_pred (bb) == info.switch_bb))
|
||||
{
|
||||
info.reason = " Non-invariant value from a case\n";
|
||||
return false; /* Non-invariant argument. */
|
||||
tree reloc, val;
|
||||
|
||||
val = gimple_phi_arg_def (phi, i);
|
||||
if (!is_gimple_ip_invariant (val))
|
||||
{
|
||||
info.reason = " Non-invariant value from a case\n";
|
||||
return false; /* Non-invariant argument. */
|
||||
}
|
||||
reloc = initializer_constant_valid_p (val, TREE_TYPE (val));
|
||||
if ((flag_pic && reloc != null_pointer_node)
|
||||
|| (!flag_pic && reloc == NULL_TREE))
|
||||
{
|
||||
if (reloc)
|
||||
info.reason
|
||||
= " Value from a case would need runtime relocations\n";
|
||||
else
|
||||
info.reason
|
||||
= " Value from a case is not a valid initializer\n";
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue