Commit 6d8f280f by Jakub Jelinek

re PR target/38123 (error: incorrect sharing of tree nodes ap->fp_offset = D.2748;)

	PR target/38123
	* config/i386/i386.c (ix86_gimplify_va_arg): Don't share valist between
	gpr and other COMPONENT_REFs.

	* gcc.c-torture/compile/pr38123.c: New test.

From-SVN: r141889
parent 63894637
2008-11-15 Jakub Jelinek <jakub@redhat.com>
PR target/38123
* config/i386/i386.c (ix86_gimplify_va_arg): Don't share valist between
gpr and other COMPONENT_REFs.
2008-11-15 Richard Guenther <rguenther@suse.de>
PR tree-optimization/38051
......
......@@ -6579,8 +6579,9 @@ ix86_gimplify_va_arg (tree valist, tree type, gimple_seq *pre_p,
f_ovf = TREE_CHAIN (f_fpr);
f_sav = TREE_CHAIN (f_ovf);
gpr = build3 (COMPONENT_REF, TREE_TYPE (f_gpr),
build_va_arg_indirect_ref (valist), f_gpr, NULL_TREE);
valist = build_va_arg_indirect_ref (valist);
gpr = build3 (COMPONENT_REF, TREE_TYPE (f_gpr), valist, f_gpr, NULL_TREE);
fpr = build3 (COMPONENT_REF, TREE_TYPE (f_fpr), valist, f_fpr, NULL_TREE);
ovf = build3 (COMPONENT_REF, TREE_TYPE (f_ovf), valist, f_ovf, NULL_TREE);
sav = build3 (COMPONENT_REF, TREE_TYPE (f_sav), valist, f_sav, NULL_TREE);
......
2008-11-15 Jakub Jelinek <jakub@redhat.com>
PR target/38123
* gcc.c-torture/compile/pr38123.c: New test.
2008-11-15 Richard Guenther <rguenther@suse.de>
Jakub Jelinek <jakub@redhat.com>
Jakub Jelinek <jakub@redhat.com>
PR tree-optimization/38051
* gcc.c-torture/execute/pr38051.c: New testcase.
......
/* PR target/38123 */
#include <stdarg.h>
struct S { int i; double d; };
struct S
test (char *x, va_list ap)
{
struct S s;
s = va_arg (ap, struct S);
return s;
}
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