diff mbox

[Cilkplus] Patch to fix a couple testsuite results

Message ID BF230D13CA30DD48930C31D4099330000F291138@FMSMSX102.amr.corp.intel.com
State New
Headers show

Commit Message

Iyer, Balaji V July 5, 2012, 9:17 p.m. UTC
Sorry, I created the patch in the wrong directory. Please see the corrected patch.

Thanks,

Balaji V. Iyer.

-----Original Message-----
From: Iyer, Balaji V 
Sent: Thursday, July 05, 2012 5:09 PM
To: 'gcc-patches@gcc.gnu.org'
Subject: [PATCH][Cilkplus] Patch to fix a couple testsuite results

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.
diff mbox

Patch

Index: gcc/cilk.c
===================================================================
--- gcc/cilk.c	(revision 189265)
+++ gcc/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: gcc/c-typeck.c
===================================================================
--- gcc/c-typeck.c	(revision 189265)
+++ gcc/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: gcc/ChangeLog.cilk
===================================================================
--- gcc/ChangeLog.cilk	(revision 189265)
+++ gcc/ChangeLog.cilk	(working copy)
@@ -1,3 +1,8 @@ 
+2012-07-05  Balaji V. Iyer  <balaji.v.iyer@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.iyer@intel.com>
 
 	* cilk-spawn.c (compute_loop_var): Changed count_type from the struct