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]

RE: [PATCH][Cilkplus] Patch to fix Template type inside cilk_for


Here is a fixed patch with all the changes you have requested.

Thanks,

Balaji V. Iyer.

-----Original Message-----
From: H.J. Lu [mailto:hjl.tools@gmail.com] 
Sent: Friday, September 09, 2011 9:49 AM
To: Iyer, Balaji V
Cc: gcc-patches@gcc.gnu.org
Subject: Re: [PATCH][Cilkplus] Patch to fix Template type inside cilk_for

On Thu, Sep 8, 2011 at 8:30 PM, Iyer, Balaji V <balaji.v.iyer@intel.com> wrote:
> Hello Everyone,
> ? ? ? ?This patch is for the Cilk Plus branch GCC C++ compiler. It will fix the following cases of cilk_for (where 'T' is a template type)
>
> _Cilk_for ( T ii = <INITIAL VALUE> ; ?ii <RELATIONAL_OPERATOR> <END_VALUE> ; ? ?ii <+/->= <INCREMENT/DECREMENT VALUE>)
> ? ? ? ?<statement>
>

+	* cilk.c (check_incr): added "&& (TREE_OPERAND (incr, 0) !=
                                         ^  Should be 'A'.
+	DECL_NAME (var))" to if (TREE_OPERAND(incr, 0) != var) and to the outer
+	else if statements. Also removed gcc_assert (TREE_OPERAND (incr, 0) ==
+	var) from the body of both of these statements.

Can you find better description without quoting sources?

-      if (TREE_OPERAND (incr, 0) != var)
+      if ((TREE_OPERAND (incr, 0) != var) &&

^^^^ It should be on the next line.
+	  (DECL_NAME (TREE_OPERAND (incr, 0)) != DECL_NAME (var)))

Please remove the extra ().  You have many extra () in your change.
All the trailing && and || should be on the next line.

+	* g++.dg/cilk-plus/template_cilk_for_plus_equal.cpp: New

Please add' the missing period and create a separate entry.

-- 
H.J.

Attachment: template_cilk_for_patch.txt
Description: template_cilk_for_patch.txt


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