This is the mail archive of the gcc-patches@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]

[PATCH 3.4/branch ] PR#11476 fixed


Hi ,

This is a patch to fix PR#11476 . Checked with gcc 3.4 branch. This problem does not occur anyway with 3.5 since build handles unary operators correctly by calling build1 changed as pointed out Andrew Pinski.




Ok to commit? Could someone commit this into the 3.4 branch ?



ChangeLog


2004-09-07  Ramana Radhakrishnan <ramana.radhakrishnan@codito.com>
	PR target / 11476
	* gcc/config/arc/arc.c : arc_va_args
	  * Call build1 instead of build for unary tree operators.
	  	


cheers Ramana



Index: arc.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/arc/arc.c,v
retrieving revision 1.46.4.1
diff -a -u -r1.46.4.1 arc.c
--- arc.c       18 Jan 2004 22:39:57 -0000      1.46.4.1
+++ arc.c       7 Sep 2004 07:59:13 -0000
@@ -2284,8 +2284,8 @@
     {
       tree type_ptr_ptr = build_pointer_type (type_ptr);

-      addr = build (INDIRECT_REF, type_ptr,
-                   build (NOP_EXPR, type_ptr_ptr, valist));
+      addr = build1(INDIRECT_REF, type_ptr,
+                   build1 (NOP_EXPR, type_ptr_ptr, valist));

       incr = build (PLUS_EXPR, TREE_TYPE (valist),
                    valist, build_int_2 (UNITS_PER_WORD, 0));
@@ -2305,12 +2305,12 @@
        {
          /* AP = (TYPE *)(((int)AP + 7) & -8)  */

-         addr = build (NOP_EXPR, integer_type_node, valist);
+         addr = build1 (NOP_EXPR, integer_type_node, valist);
          addr = fold (build (PLUS_EXPR, integer_type_node, addr,
                              build_int_2 (7, 0)));
          addr = fold (build (BIT_AND_EXPR, integer_type_node, addr,
                              build_int_2 (-8, 0)));
-         addr = fold (build (NOP_EXPR, TREE_TYPE (valist), addr));
+         addr = fold (build1 (NOP_EXPR, TREE_TYPE (valist), addr));
        }

       /* The increment is always rounded_size past the aligned pointer.  */


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