This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug tree-optimization/41089] [4.5/4.6 Regression] stdarg pass produces wrong code



------- 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]