Commit dc38a610 by Fariborz Jahanian Committed by Fariborz Jahanian

Fix ppc -m64 constant address expression expansion bug.

Oked by Richard Henderson.

From-SVN: r103676
parent f471f0fc
2005-08-31 Fariborz Jahanian <fjahanian@apple.com>
* expr.c (expand_expr_real_1): Compare size of address
mode to target's address mode size in deciding expansion of
the constant address.
2005-08-31 Richard Guenther <rguenther@suse.de>
PR middle-end/23477
......
......@@ -7673,7 +7673,7 @@ expand_expr_real_1 (tree exp, rtx target, enum machine_mode tmode,
}
else if (TREE_CODE (TREE_OPERAND (exp, 1)) == INTEGER_CST
&& GET_MODE_BITSIZE (mode) <= HOST_BITS_PER_INT
&& GET_MODE_BITSIZE (mode) <= HOST_BITS_PER_WIDE_INT
&& TREE_CONSTANT (TREE_OPERAND (exp, 0)))
{
rtx constant_part;
......
#include <stdio.h>
#include <stdlib.h>
extern void abort();
typedef struct foo
{
int uaattrid;
char *name;
} FOO;
FOO Upgrade_items[] =
{
{1, "1"},
{2, "2"},
{0, NULL}
};
int *Upgd_minor_ID =
(int *) &((Upgrade_items + 1)->uaattrid);
int *Upgd_minor_ID1 =
(int *) &((Upgrade_items)->uaattrid);
int
main(int argc, char **argv)
{
if (*Upgd_minor_ID != 2)
abort();
if (*Upgd_minor_ID1 != 1)
abort();
return 0;
}
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