Commit 7d5d39bb by Jakub Jelinek Committed by Jakub Jelinek

re PR debug/43165 (ice in simplify_subreg, at simplify-rtx.c:5146)

	PR debug/43165
	* cfgexpand.c (expand_debug_expr): Don't call simplify_gen_subreg
	if bitpos isn't multiple of mode's bitsize.

	* gcc.dg/torture/pr43165.c: New test.

From-SVN: r157062
parent f205d1da
2010-02-25 Jakub Jelinek <jakub@redhat.com>
PR debug/43165
* cfgexpand.c (expand_debug_expr): Don't call simplify_gen_subreg
if bitpos isn't multiple of mode's bitsize.
2010-02-24 Manuel López-Ibáñez <manu@gcc.gnu.org> 2010-02-24 Manuel López-Ibáñez <manu@gcc.gnu.org>
* c.opt (-ftemplate-depth=): New. * c.opt (-ftemplate-depth=): New.
......
...@@ -2538,8 +2538,9 @@ expand_debug_expr (tree exp) ...@@ -2538,8 +2538,9 @@ expand_debug_expr (tree exp)
if (bitpos >= GET_MODE_BITSIZE (opmode)) if (bitpos >= GET_MODE_BITSIZE (opmode))
return NULL; return NULL;
return simplify_gen_subreg (mode, op0, opmode, if ((bitpos % GET_MODE_BITSIZE (mode)) == 0)
bitpos / BITS_PER_UNIT); return simplify_gen_subreg (mode, op0, opmode,
bitpos / BITS_PER_UNIT);
} }
return simplify_gen_ternary (SCALAR_INT_MODE_P (GET_MODE (op0)) return simplify_gen_ternary (SCALAR_INT_MODE_P (GET_MODE (op0))
......
2010-02-25 Jakub Jelinek <jakub@redhat.com>
PR debug/43165
* gcc.dg/torture/pr43165.c: New test.
2010-02-24 Manuel López-Ibáñez <manu@gcc.gnu.org> 2010-02-24 Manuel López-Ibáñez <manu@gcc.gnu.org>
PR c/43128 PR c/43128
......
/* PR debug/43165 */
/* { dg-options "-g" } */
struct __attribute__((packed)) S
{
unsigned char a;
unsigned short b;
unsigned short c;
unsigned d : 24;
};
void
foo (struct S p)
{
for (; p.c; p.c++)
;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment