diff options
author | Uros Bizjak <uros@gcc.gnu.org> | 2012-04-05 23:47:16 +0200 |
---|---|---|
committer | Uros Bizjak <uros@gcc.gnu.org> | 2012-04-05 23:47:16 +0200 |
commit | 4bdd6fa67e3e13f0cb8f5d9c738f374135ec9748 (patch) | |
tree | 0acf94b6121f5ac58211c8fbf0d8230cbe62c2a9 | |
parent | 9b9ad23f888c646982731e8c9c797885559bdb4f (diff) | |
download | gcc-4bdd6fa67e3e13f0cb8f5d9c738f374135ec9748.zip gcc-4bdd6fa67e3e13f0cb8f5d9c738f374135ec9748.tar.gz gcc-4bdd6fa67e3e13f0cb8f5d9c738f374135ec9748.tar.bz2 |
re PR target/52882 (ICE in memory_address_length, at config/i386/i386.c:23373)
PR target/52882
* config/i386/i386.c (ix86_decompose_address): Allow VOIDmode
CONST_INT operands, zero-extended with AND.
testsuite/ChangeLog:
PR target/52882
* gcc.target/i386/pr52882.c: New test.
From-SVN: r186170
-rw-r--r-- | gcc/ChangeLog | 8 | ||||
-rw-r--r-- | gcc/config/i386/i386.c | 2 | ||||
-rw-r--r-- | gcc/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/testsuite/gcc.target/i386/pr52882.c | 19 |
4 files changed, 32 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index e24e0d2..0df25cf 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,10 +1,16 @@ +2012-04-05 Uros Bizjak <ubizjak@gmail.com> + + PR target/52882 + * config/i386/i386.c (ix86_decompose_address): Allow VOIDmode + CONST_INT operands, zero-extended with AND. + 2012-04-05 Oleg Endo <olegendo@gcc.gnu.org> PR target/50751 * config/sh/sh.c (sh_find_mov_disp_adjust): Take machine_mode as the first argument instead of mode size. Move displacement calculations to ... - (mov_insn_size, max_mov_insn_displacement, mov_insn_alignment_mask): + (mov_insn_size, max_mov_insn_displacement, mov_insn_alignment_mask): ... these new functions. (disp_adjust): Remove max_mov_disp field. (sh_legitimate_index_p): Use max_mov_insn_displacement and diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c index d58dafc..c959113 100644 --- a/gcc/config/i386/i386.c +++ b/gcc/config/i386/i386.c @@ -11510,7 +11510,7 @@ ix86_decompose_address (rtx addr, struct ix86_address *out) addr = SUBREG_REG (addr); else if (GET_MODE (addr) == DImode) addr = gen_rtx_SUBREG (SImode, addr, 0); - else + else if (GET_MODE (addr) != VOIDmode) return 0; } } diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index c4e4ecb..cde30ef 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2012-04-05 Uros Bizjak <ubizjak@gmail.com> + + PR target/52882 + * gcc.target/i386/pr52882.c: New test. + 2012-04-05 Bill Schmidt <wschmidt@linux.vnet.ibm.com> Dominique D'Humieures <dominiq@lps.ens.fr> diff --git a/gcc/testsuite/gcc.target/i386/pr52882.c b/gcc/testsuite/gcc.target/i386/pr52882.c new file mode 100644 index 0000000..5f0f12a --- /dev/null +++ b/gcc/testsuite/gcc.target/i386/pr52882.c @@ -0,0 +1,19 @@ +/* { dg-do compile } */ +/* { dg-options "-O" } */ + +struct S1 { + int f0; + int f1; +}; + +int fn1 (); +void fn2 (struct S1); + +void +fn3 () { + struct S1 a = { 1, 0 }; + if (fn1 ()) + fn2 (a); + for (; a.f1;) { + } +} |