Re: [match-and-simplify] error checking on user defined oper in for

2014-10-28 Thread Richard Biener
On Tue, Oct 28, 2014 at 11:27 AM, Prathamesh Kulkarni wrote: > On Tue, Oct 28, 2014 at 3:45 PM, Richard Biener > wrote: >> On Sat, Oct 25, 2014 at 8:16 PM, Prathamesh Kulkarni >> wrote: >>> Currently this is accepted: >>> (for plus (mult div) >>> ...) >>> which is incorrect. This patch puts mo

Re: [match-and-simplify] error checking on user defined oper in for

2014-10-28 Thread Prathamesh Kulkarni
On Tue, Oct 28, 2014 at 3:45 PM, Richard Biener wrote: > On Sat, Oct 25, 2014 at 8:16 PM, Prathamesh Kulkarni > wrote: >> Currently this is accepted: >> (for plus (mult div) >> ...) >> which is incorrect. This patch puts more error-checks on the user-defined >> operator in for-pattern. > > Nice

Re: [match-and-simplify] error checking on user defined oper in for

2014-10-28 Thread Richard Biener
On Sat, Oct 25, 2014 at 8:16 PM, Prathamesh Kulkarni wrote: > Currently this is accepted: > (for plus (mult div) > ...) > which is incorrect. This patch puts more error-checks on the user-defined > operator in for-pattern. Nicely spotted issue. But I prefer to fix it simpler like with the foll

[match-and-simplify] error checking on user defined oper in for

2014-10-25 Thread Prathamesh Kulkarni
Currently this is accepted: (for plus (mult div) ...) which is incorrect. This patch puts more error-checks on the user-defined operator in for-pattern. * genmatch.c (insert_operator): New function. (parse_for): Call insert_operator. Thanks, Prathamesh Index: gcc/genmatch.c