[arm] PR target/82975: Guard against reg_renumber being NULL in arm.h
Backport from mainline 2017-12-20 Kyrylo Tkachov <kyrylo.tkachov@arm.com> PR target/82975 * config/arm/arm.h (TEST_REGNO): Adjust comment as expected in r255830. * gcc.dg/pr82975.c: New test. From-SVN: r256350
This commit is contained in:
parent
2fc75a03b0
commit
9192145f0b
@ -1,3 +1,11 @@
|
||||
2018-01-08 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
|
||||
|
||||
Backport from mainline
|
||||
2017-12-20 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
|
||||
|
||||
PR target/82975
|
||||
* config/arm/arm.h (TEST_REGNO): Adjust comment as expected in r255830.
|
||||
|
||||
2018-01-08 Sebastian Huber <sebastian.huber@embedded-brains.de>
|
||||
|
||||
Backported from mainline
|
||||
|
@ -1662,12 +1662,10 @@ enum arm_auto_incmodes
|
||||
|
||||
/* These assume that REGNO is a hard or pseudo reg number.
|
||||
They give nonzero only if REGNO is a hard reg of the suitable class
|
||||
or a pseudo reg currently allocated to a suitable hard reg.
|
||||
Since they use reg_renumber, they are safe only once reg_renumber
|
||||
has been allocated, which happens in reginfo.c during register
|
||||
allocation. */
|
||||
or a pseudo reg currently allocated to a suitable hard reg. */
|
||||
#define TEST_REGNO(R, TEST, VALUE) \
|
||||
((R TEST VALUE) || ((unsigned) reg_renumber[R] TEST VALUE))
|
||||
((R TEST VALUE) \
|
||||
|| (reg_renumber && ((unsigned) reg_renumber[R] TEST VALUE)))
|
||||
|
||||
/* Don't allow the pc to be used. */
|
||||
#define ARM_REGNO_OK_FOR_BASE_P(REGNO) \
|
||||
|
@ -1,3 +1,11 @@
|
||||
2018-01-08 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
|
||||
|
||||
Backport from mainline
|
||||
2017-12-19 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
|
||||
|
||||
PR target/82975
|
||||
* gcc.dg/pr82975.c: New test.
|
||||
|
||||
2018-01-04 Uros Bizjak <ubizjak@gmail.com>
|
||||
|
||||
PR target/83628
|
||||
|
20
gcc/testsuite/gcc.dg/pr82975.c
Normal file
20
gcc/testsuite/gcc.dg/pr82975.c
Normal file
@ -0,0 +1,20 @@
|
||||
/* PR target/82975. */
|
||||
/* { dg-do compile } */
|
||||
/* { dg-options "-fno-sched-pressure -O2" } */
|
||||
/* { dg-additional-options "-mtune=cortex-a57" { target arm*-*-* aarch64*-*-* } } */
|
||||
|
||||
typedef __SIZE_TYPE__ size_t;
|
||||
|
||||
struct S1
|
||||
{
|
||||
char pad1;
|
||||
char val;
|
||||
short pad2;
|
||||
};
|
||||
|
||||
extern char t[256];
|
||||
|
||||
void foo (struct S1 a, size_t i)
|
||||
{
|
||||
t[i] = a.val;
|
||||
}
|
Loading…
Reference in New Issue
Block a user