Commit 2d3fc6aa by Jakub Jelinek

cfgexpand.c (expand_debug_expr): Fail if bitpos < 0 for non-MEM op0.

	* cfgexpand.c (expand_debug_expr): Fail if bitpos < 0 for non-MEM
	op0.

	* gcc.dg/debug/vta-3.c: New test.

From-SVN: r152972
parent 69925f6c
2009-10-17 Andy Hutchinson <hutchinsonandy@gcc.gnu.org>
2009-10-19 Jakub Jelinek <jakub@redhat.com>
* cfgexpand.c (expand_debug_expr): Fail if bitpos < 0 for non-MEM
op0.
2009-10-17 Andy Hutchinson <hutchinsonandy@gcc.gnu.org>
PR middle-end/41738
* optabs.c (expand_binop): Make mode of shift count expression mode
......@@ -2593,6 +2593,9 @@ expand_debug_expr (tree exp)
if (bitpos == 0 && mode == GET_MODE (op0))
return op0;
if (bitpos < 0)
return NULL;
if ((bitpos % BITS_PER_UNIT) == 0
&& bitsize == GET_MODE_BITSIZE (mode1))
{
......
2009-10-19 Jakub Jelinek <jakub@redhat.com>
* gcc.dg/debug/vta-3.c: New test.
2009-10-17 Eric Botcazou <ebotcazou@adacore.com>
* gnat.dg/nested_proc.adb: Rename into...
......
/* { dg-do compile } */
int
foo (void)
{
union { char e[8]; int i; } a, b;
char *c, *d;
unsigned int i;
c = a.e;
d = &b.e[sizeof (int) - 1];
for (i = 0; i < sizeof (int); i++)
{
*d = *c++;
--d;
}
return b.i;
}
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