diff options
author | Jeff Law <law@redhat.com> | 2016-11-20 22:29:36 -0700 |
---|---|---|
committer | Jeff Law <law@gcc.gnu.org> | 2016-11-20 22:29:36 -0700 |
commit | fe12d76c19ad3eef5a4ac555a519bc14f09d7326 (patch) | |
tree | 0b5b40035eedaf847288f81a5c5be3bd4847c5e3 /gcc/reload1.c | |
parent | 29c90a3c28a7917023477648f0c88aa273e7510e (diff) | |
download | gcc-fe12d76c19ad3eef5a4ac555a519bc14f09d7326.zip gcc-fe12d76c19ad3eef5a4ac555a519bc14f09d7326.tar.gz gcc-fe12d76c19ad3eef5a4ac555a519bc14f09d7326.tar.bz2 |
re PR target/48551 (Following source code crashes the c++ compiler on coldfire platform.)
2016-11-20 Jeff Law <law@redhat.com>
PR target/48551
* reload.h (struct target_reload): Make x_double_reg_address_ok
be per-mode rather.
* reload.c (find_reloads_address): Check if double_reg_address_ok
is true for the mode of the memory reference.
* reload1.c (init_reload): Initialize double_reg_address_ok for
each mode.
PR target/48551
* gcc.target/m68k/pr48551.c: New test.
From-SVN: r242648
Diffstat (limited to 'gcc/reload1.c')
-rw-r--r-- | gcc/reload1.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/gcc/reload1.c b/gcc/reload1.c index 4ee3840..b855268 100644 --- a/gcc/reload1.c +++ b/gcc/reload1.c @@ -448,11 +448,10 @@ init_reload (void) /* This way, we make sure that reg+reg is an offsettable address. */ tem = plus_constant (Pmode, tem, 4); - if (memory_address_p (QImode, tem)) - { - double_reg_address_ok = 1; - break; - } + for (int mode = 0; mode < MAX_MACHINE_MODE; mode++) + if (!double_reg_address_ok[mode] + && memory_address_p ((enum machine_mode)mode, tem)) + double_reg_address_ok[mode] = 1; } /* Initialize obstack for our rtl allocation. */ |