This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/41089] [4.5/4.6 Regression] stdarg pass produces wrong code
- From: "ubizjak at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 1 Aug 2010 12:50:21 -0000
- Subject: [Bug tree-optimization/41089] [4.5/4.6 Regression] stdarg pass produces wrong code
- References: <bug-41089-1649@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #47 from ubizjak at gmail dot com 2010-08-01 12:50 -------
(In reply to comment #39)
> or alpha could make the va_list struct copies volatile. Or we can
> schedule tree-stdarg earlier.
Well, following patch fixes remaining gcc.c-torture/execute/stdarg-1.c failure
as well:
Index: alpha/alpha.c
===================================================================
--- alpha/alpha.c (revision 162794)
+++ alpha/alpha.c (working copy)
@@ -5948,6 +5948,7 @@ alpha_build_builtin_va_list (void)
ofs = build_decl (BUILTINS_LOCATION,
FIELD_DECL, get_identifier ("__offset"),
integer_type_node);
+ TREE_THIS_VOLATILE (ofs) = 1;
DECL_FIELD_CONTEXT (ofs) = record;
DECL_CHAIN (ofs) = space;
Does this patch makes sense w.r.t to stdarg optimizations?
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41089