Index: ChangeLog
* expmed.c (expand_shift): Correctly test for low part of a subreg. Index: testsuite/ChangeLog * gcc.c-torture/execute/20020225-2.c: New test. From-SVN: r50114
This commit is contained in:
parent
6bc627b3b8
commit
4e07d762e9
@ -1,3 +1,8 @@
|
||||
2002-02-27 Geoffrey Keating <geoffk@redhat.com>
|
||||
|
||||
* expmed.c (expand_shift): Correctly test for low part of a
|
||||
subreg.
|
||||
|
||||
2002-02-27 Ulrich Weigand <uweigand@de.ibm.com>
|
||||
|
||||
* config/s390/s390.c (s390_chunkify_pool): Do not confuse
|
||||
|
@ -1913,7 +1913,7 @@ expand_shift (code, mode, shifted, amount, target, unsignedp)
|
||||
op1 = GEN_INT ((unsigned HOST_WIDE_INT) INTVAL (op1)
|
||||
% GET_MODE_BITSIZE (mode));
|
||||
else if (GET_CODE (op1) == SUBREG
|
||||
&& SUBREG_BYTE (op1) == 0)
|
||||
&& subreg_lowpart_p (op1))
|
||||
op1 = SUBREG_REG (op1);
|
||||
}
|
||||
#endif
|
||||
|
@ -1,3 +1,7 @@
|
||||
2002-02-27 Geoffrey Keating <geoffk@redhat.com>
|
||||
|
||||
* gcc.c-torture/execute/20020225-2.c: New test.
|
||||
|
||||
2002-02-27 Zack Weinberg <zack@codesourcery.com>
|
||||
|
||||
* gcc.c-torture/execute/920730-1t.c,
|
||||
|
19
gcc/testsuite/gcc.c-torture/execute/20020225-2.c
Normal file
19
gcc/testsuite/gcc.c-torture/execute/20020225-2.c
Normal file
@ -0,0 +1,19 @@
|
||||
static int
|
||||
test(int x)
|
||||
{
|
||||
union
|
||||
{
|
||||
int i;
|
||||
double d;
|
||||
} a;
|
||||
a.d = 0;
|
||||
a.i = 1;
|
||||
return x >> a.i;
|
||||
}
|
||||
|
||||
int main(void)
|
||||
{
|
||||
if (test (5) != 2)
|
||||
abort ();
|
||||
exit (0);
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user