http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59175
Bug ID: 59175
Summary: gcc.target/i386/memcpy-2.c fails with -m32
Product: gcc
Version: 4.9.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: middle-end
Assignee: unassigned at gcc dot gnu.org
Reporter: hjl.tools at gmail dot com
CC: hubicka at gcc dot gnu.org
On x86, gcc.target/i386/memcpy-2.c fails with -m32
With -m64, we got
[hjl@gnu-6 good]$ cat x.i.015t.ssa
;; Function t (t, funcdef_no=0, decl_uid=1792, symbol_order=2)
t (unsigned int c)
{
long unsigned int _4;
void * b.0_5;
void * a.1_6;
<bb 2>:
if (c_2(D) <= 9)
goto <bb 3>;
else
goto <bb 4>;
<bb 3>:
_4 = (long unsigned int) c_2(D);
b.0_5 = b;
a.1_6 = a;
memcpy (a.1_6, b.0_5, _4);
<bb 4>:
return;
}
[hjl@gnu-6 good]$
With -m32, we got
[hjl@gnu-6 bad]$ cat x.i.015t.ssa
;; Function t (t, funcdef_no=0, decl_uid=1763, symbol_order=2)
t (unsigned int c)
{
void * b.0_4;
void * a.1_5;
<bb 2>:
if (c_2(D) <= 9)
goto <bb 3>;
else
goto <bb 4>;
<bb 3>:
b.0_4 = b;
a.1_5 = a;
memcpy (a.1_5, b.0_4, c_2(D));
<bb 4>:
return;
}
[hjl@gnu-6 bad]$
get_range_info returns VR_VARYING on c_2(D), but VR_RANGE
on _4.