Hello Everyone,
        This patch is for the Cilk Plus branch mainly affecting the C compiler. 
It will fix tests failing in gcc.c-torture and some  -Wpadding tests.

Thanking You,

Yours sincerely,

Balaji V. Iyer.
Index: cilk.c
===================================================================
--- cilk.c      (revision 189265)
+++ cilk.c      (working copy)
@@ -67,7 +67,7 @@
 add_field (const char *name, tree type, tree fields)
 {
   tree  t = get_identifier(name);
-  tree field = build_decl (EXPR_LOCATION(t), FIELD_DECL, t, type);
+  tree field = build_decl (BUILTINS_LOCATION, FIELD_DECL, t, type);
   TREE_CHAIN (field) = fields;
   return field;
 }
Index: c-typeck.c
===================================================================
--- c-typeck.c  (revision 189265)
+++ c-typeck.c  (working copy)
@@ -10321,6 +10321,7 @@
              switch (code)
                {
                case MULT_EXPR:
+                 op0 = c_save_expr (op0);
                  imag = build2 (resultcode, real_type, op0, imag);
                  /* Fall through.  */
                case PLUS_EXPR:
Index: ChangeLog.cilk
===================================================================
--- ChangeLog.cilk      (revision 189265)
+++ ChangeLog.cilk      (working copy)
@@ -1,3 +1,8 @@
+2012-07-05  Balaji V. Iyer  <balaji.v.i...@intel.com>
+
+       * c-typeck.c (build_binary_op): Added a call to c_save_expr.
+       * cilk.c (add_field): Changed the location of field to builtin location.
+
 2012-07-03  Balaji V. Iyer  <balaji.v.i...@intel.com>
 
        * cilk-spawn.c (compute_loop_var): Changed count_type from the struct

Reply via email to