diff options
author | Jakub Jelinek <jakub@redhat.com> | 2009-10-14 19:05:45 +0200 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2009-10-14 19:05:45 +0200 |
commit | 4f2a9af8626ef22fe1129a84c76f40f77a88c2ec (patch) | |
tree | 2266435d3a1ce217b2074a875954ca7c75d0fd50 /gcc/cfgexpand.c | |
parent | 1833192f30abf95ec0124033882e6bcb64552e6f (diff) | |
download | gcc-4f2a9af8626ef22fe1129a84c76f40f77a88c2ec.zip gcc-4f2a9af8626ef22fe1129a84c76f40f77a88c2ec.tar.gz gcc-4f2a9af8626ef22fe1129a84c76f40f77a88c2ec.tar.bz2 |
tree-parloops.c (separate_decls_in_region_debug_bind): Drop debug stmts setting DEBUG_EXPR_DECLs.
* tree-parloops.c (separate_decls_in_region_debug_bind): Drop debug
stmts setting DEBUG_EXPR_DECLs.
* cfgexpand.c (expand_debug_expr): Ignore zero-length bitfields.
Don't crash if mode1 is VOIDmode.
From-SVN: r152772
Diffstat (limited to 'gcc/cfgexpand.c')
-rw-r--r-- | gcc/cfgexpand.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/gcc/cfgexpand.c b/gcc/cfgexpand.c index 6882954..4f317d9 100644 --- a/gcc/cfgexpand.c +++ b/gcc/cfgexpand.c @@ -2524,6 +2524,9 @@ expand_debug_expr (tree exp) &mode1, &unsignedp, &volatilep, false); rtx orig_op0; + if (bitsize == 0) + return NULL; + orig_op0 = op0 = expand_debug_expr (tem); if (!op0) @@ -2561,6 +2564,9 @@ expand_debug_expr (tree exp) if (MEM_P (op0)) { + if (mode1 == VOIDmode) + /* Bitfield. */ + mode1 = smallest_mode_for_size (bitsize, MODE_INT); if (bitpos >= BITS_PER_UNIT) { op0 = adjust_address_nv (op0, mode1, bitpos / BITS_PER_UNIT); @@ -2568,7 +2574,8 @@ expand_debug_expr (tree exp) } else if (bitpos < 0) { - int units = (-bitpos + BITS_PER_UNIT - 1) / BITS_PER_UNIT; + HOST_WIDE_INT units + = (-bitpos + BITS_PER_UNIT - 1) / BITS_PER_UNIT; op0 = adjust_address_nv (op0, mode1, units); bitpos += units * BITS_PER_UNIT; } |