alpha.c (alpha_build_builtin_va_list): Mark __offset as volatile.
authorUros Bizjak <ubizjak@gmail.com>
Mon, 2 Aug 2010 17:26:40 +0000 (19:26 +0200)
committerUros Bizjak <uros@gcc.gnu.org>
Mon, 2 Aug 2010 17:26:40 +0000 (19:26 +0200)
target/41089
* config/alpha/alpha.c (alpha_build_builtin_va_list): Mark __offset
as volatile.

From-SVN: r162826

gcc/ChangeLog
gcc/config/alpha/alpha.c

index ad2b271..c37e93d 100644 (file)
@@ -1,3 +1,9 @@
+2010-08-02  Uros Bizjak  <ubizjak@gmail.com>
+
+       PR target/41089
+       * config/alpha/alpha.c (alpha_build_builtin_va_list): Mark __offset
+       as volatile.
+
 2010-08-02  Sebastian Pop  <sebastian.pop@amd.com>
 
        * common.opt (ftree-loop-distribute-patterns): New.
index 35d66b6..1cfca58 100644 (file)
@@ -5950,6 +5950,10 @@ alpha_build_builtin_va_list (void)
                    integer_type_node);
   DECL_FIELD_CONTEXT (ofs) = record;
   DECL_CHAIN (ofs) = space;
+  /* ??? This is a hack, __offset is marked volatile to prevent
+     DCE that confuses stdarg optimization and results in
+     gcc.c-torture/execute/stdarg-1.c failure.  See PR 41089.  */
+  TREE_THIS_VOLATILE (ofs) = 1;
 
   base = build_decl (BUILTINS_LOCATION,
                     FIELD_DECL, get_identifier ("__base"),