diff mbox

[Cilkplus] Patch to fix array notation bug

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

Commit Message

Iyer, Balaji V June 5, 2012, 4:24 p.m. UTC
Hello Everyone,
    This patch is for the Cilkplus branch affecting the C++ compiler. This patch will fix some cases were array notation is not decomposed correctly in parser.

Thanking You,

Yours Sincerely,

Balaji V. Iyer.
diff mbox

Patch

Index: gcc/cp/parser.c
===================================================================
--- gcc/cp/parser.c	(revision 188243)
+++ gcc/cp/parser.c	(working copy)
@@ -18045,6 +18045,11 @@ 
   cp_parser_function_body (parser, in_function_try_block);
   if (check_body_p)
     check_constexpr_ctor_body (last, list);
+
+  if (flag_enable_cilk)
+    if (contains_array_notation_expr (body))
+      body = fix_array_notation_exprs (body);
+  
   /* Finish the function body.  */
   finish_function_body (body);
 
Index: gcc/cp/ChangeLog.cilk
===================================================================
--- gcc/cp/ChangeLog.cilk	(revision 188243)
+++ gcc/cp/ChangeLog.cilk	(working copy)
@@ -1,3 +1,8 @@ 
+2012-06-05  Balaji V. Iyer  <balaji.v.iyer@intel.com>
+
+	* parser.c (cp_parser_ctor_initializer_opt_and_function_body): Added a
+	check for array notation expressions. If so, then decompose them.
+
 2012-06-04  Balaji V. Iyer  <balaji.v.iyer@intel.com>
 
 	* cilk.c (cp_make_cilk_frame): Removed adding body to the orig body's