Commit 0f643366 by Jakub Jelinek Committed by Jakub Jelinek

re PR middle-end/45461 (ICE: verify_gimple failed: INDIRECT_REF in gimple IL…

re PR middle-end/45461 (ICE: verify_gimple failed: INDIRECT_REF in gimple IL with -fshort-enums and va_arg)

	PR middle-end/45461
	* builtins.c (dummy_object): Return a MEM_REF instead of INDIRECT_REF.

	* gcc.dg/pr45461.c: New test.

From-SVN: r163678
parent 08350106
2010-08-31 Jakub Jelinek <jakub@redhat.com>
PR middle-end/45461
* builtins.c (dummy_object): Return a MEM_REF instead of INDIRECT_REF.
2010-08-31 Nathan Froyd <froydnj@codesourcery.com>
* config/fr30/fr30.c (fr30_move_double): Delete `dregno' and extra
......
......@@ -4741,7 +4741,7 @@ static tree
dummy_object (tree type)
{
tree t = build_int_cst (build_pointer_type (type), 0);
return build1 (INDIRECT_REF, type, t);
return build2 (MEM_REF, type, t, t);
}
/* Gimplify __builtin_va_arg, aka VA_ARG_EXPR, which is not really a
......
2010-08-31 Jakub Jelinek <jakub@redhat.com>
PR middle-end/45461
* gcc.dg/pr45461.c: New test.
2010-08-31 Richard Guenther <rguenther@suse.de>
PR testsuite/45455
......
/* PR middle-end/45461 */
/* { dg-do compile } */
#include <stdarg.h>
int
foo (int i, ...)
{
short e;
va_list ap;
va_start (ap, i);
e = va_arg (ap, short); /* { dg-warning "is promoted" } */
va_end (ap);
return e;
}
/* { dg-message "note: \\(so you should pass" "" {target *-*-* } 12 } */
/* { dg-message "note: if this code" "" {target *-*-* } 12 } */
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