mirror of git://gcc.gnu.org/git/gcc.git
re PR rtl-optimization/58831 (wrong code at -O2 and -O3 on x86_64-linux-gnu in 64-bit mode)
PR rtl-optimization/58831 * alias.c (init_alias_analysis): At the beginning of each iteration, set the reg_seen[N] bit if static_reg_base_value[N] is non-null. From-SVN: r204055
This commit is contained in:
parent
2e30c7fbc4
commit
356610cb47
|
|
@ -1,3 +1,9 @@
|
||||||
|
2013-10-25 Eric Botcazou <ebotcazou@adacore.com>
|
||||||
|
|
||||||
|
PR rtl-optimization/58831
|
||||||
|
* alias.c (init_alias_analysis): At the beginning of each iteration, set
|
||||||
|
the reg_seen[N] bit if static_reg_base_value[N] is non-null.
|
||||||
|
|
||||||
2013-10-25 Eric Botcazou <ebotcazou@adacore.com>
|
2013-10-25 Eric Botcazou <ebotcazou@adacore.com>
|
||||||
|
|
||||||
* recog.c (search_ofs): New static variable moved from...
|
* recog.c (search_ofs): New static variable moved from...
|
||||||
|
|
|
||||||
17
gcc/alias.c
17
gcc/alias.c
|
|
@ -2975,16 +2975,13 @@ init_alias_analysis (void)
|
||||||
/* Wipe the reg_seen array clean. */
|
/* Wipe the reg_seen array clean. */
|
||||||
bitmap_clear (reg_seen);
|
bitmap_clear (reg_seen);
|
||||||
|
|
||||||
/* Mark all hard registers which may contain an address.
|
/* Initialize the alias information for this pass. */
|
||||||
The stack, frame and argument pointers may contain an address.
|
for (i = 0; i < FIRST_PSEUDO_REGISTER; i++)
|
||||||
An argument register which can hold a Pmode value may contain
|
if (static_reg_base_value[i])
|
||||||
an address even if it is not in BASE_REGS.
|
{
|
||||||
|
new_reg_base_value[i] = static_reg_base_value[i];
|
||||||
The address expression is VOIDmode for an argument and
|
bitmap_set_bit (reg_seen, i);
|
||||||
Pmode for other registers. */
|
}
|
||||||
|
|
||||||
memcpy (new_reg_base_value, static_reg_base_value,
|
|
||||||
FIRST_PSEUDO_REGISTER * sizeof (rtx));
|
|
||||||
|
|
||||||
/* Walk the insns adding values to the new_reg_base_value array. */
|
/* Walk the insns adding values to the new_reg_base_value array. */
|
||||||
for (i = 0; i < rpo_cnt; i++)
|
for (i = 0; i < rpo_cnt; i++)
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,8 @@
|
||||||
2013-10-24 Nick Clifton <nickc@redhat.com>
|
2013-10-25 Eric Botcazou <ebotcazou@adacore.com>
|
||||||
|
|
||||||
|
* gcc.c-torture/execute/pr58831.c: New test.
|
||||||
|
|
||||||
|
2013-10-25 Nick Clifton <nickc@redhat.com>
|
||||||
|
|
||||||
* c-c++-common/pr57793.c: Add expected error messages for
|
* c-c++-common/pr57793.c: Add expected error messages for
|
||||||
targets with small integers.
|
targets with small integers.
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,40 @@
|
||||||
|
#include <assert.h>
|
||||||
|
|
||||||
|
int a, *b, c, d, f, **i, p, q, *r;
|
||||||
|
short o, j;
|
||||||
|
|
||||||
|
static int __attribute__((noinline, noclone))
|
||||||
|
fn1 (int *p1, int **p2)
|
||||||
|
{
|
||||||
|
int **e = &b;
|
||||||
|
for (; p; p++)
|
||||||
|
*p1 = 1;
|
||||||
|
*e = *p2 = &d;
|
||||||
|
|
||||||
|
assert (r);
|
||||||
|
|
||||||
|
return c;
|
||||||
|
}
|
||||||
|
|
||||||
|
static int ** __attribute__((noinline, noclone))
|
||||||
|
fn2 (void)
|
||||||
|
{
|
||||||
|
for (f = 0; f != 42; f++)
|
||||||
|
{
|
||||||
|
int *g[3] = {0, 0, 0};
|
||||||
|
for (o = 0; o; o--)
|
||||||
|
for (; a > 1;)
|
||||||
|
{
|
||||||
|
int **h[1] = { &g[2] };
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return &r;
|
||||||
|
}
|
||||||
|
|
||||||
|
int
|
||||||
|
main (void)
|
||||||
|
{
|
||||||
|
i = fn2 ();
|
||||||
|
fn1 (b, i);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue