Re: [PATCH, generic] Fix for define_subst

2012-11-30 Thread Kirill Yukhin
Hello, > Ok. Thanks, checked in: http://gcc.gnu.org/ml/gcc-cvs/2012-11/msg00937.html Thanks, K

Re: [PATCH, generic] Fix for define_subst

2012-11-29 Thread Richard Henderson
On 2012-11-29 00:58, Michael Zolotukhin wrote: > 2012-11-29 Michael Zolotukhin > > * gensupport.c (maybe_eval_c_test): Remove not-null check for expr. > * read-rtl.c (apply_iterators): Initialize condition with "" instead > of NULL. Ok. r~

Re: [PATCH, generic] Fix for define_subst

2012-11-29 Thread Michael Zolotukhin
So, ok for commit this patch? Changelog: 2012-11-29 Michael Zolotukhin * gensupport.c (maybe_eval_c_test): Remove not-null check for expr. * read-rtl.c (apply_iterators): Initialize condition with "" instead of NULL. On 28 November 2012 23:46, Michael Zolotukhin wrote

Re: [PATCH, generic] Fix for define_subst

2012-11-28 Thread Michael Zolotukhin
> Well, there does seem to be a mistake -- the use of NULL in the first > place. It seems to me that the easiest fix is > > condition = ""; > > right at the beginning. Yep, that'll work too, you're right. On 28 November 2012 22:36, Richard Henderson wrote: > On 11/28/2012 09:20 AM, Michael Zol

Re: [PATCH, generic] Fix for define_subst

2012-11-28 Thread Richard Henderson
On 11/28/2012 09:20 AM, Michael Zolotukhin wrote: >> Where was the null condition created in the first place? > The reason it's happening is following. Before introduction of > define_subst, function apply_iterators had the following loop: > condition = NULL; > FOR_EACH_VEC_ELT (iterato

Re: [PATCH, generic] Fix for define_subst

2012-11-28 Thread Michael Zolotukhin
> Where was the null condition created in the first place? The reason it's happening is following. Before introduction of define_subst, function apply_iterators had the following loop: condition = NULL; FOR_EACH_VEC_ELT (iterator_uses, i, iuse) { v = iuse->iterator->cu

Re: [PATCH, generic] Fix for define_subst

2012-11-28 Thread Richard Henderson
On 11/28/2012 07:55 AM, Michael Zolotukhin wrote: > Originally, that fail is caused by function join_c_conditions(const > char *cond1, const char *cond2) - if cond1 is "" and cond2 is NULL Joining a null condition suggests that's not the original fail. Where was the null condition created in the f

Re: [PATCH, generic] Fix for define_subst

2012-11-28 Thread Michael Zolotukhin
Hi Richard, > This looks like it's working around a bug elsewhere. Originally, that fail is caused by function join_c_conditions(const char *cond1, const char *cond2) - if cond1 is "" and cond2 is NULL, then the function returns cond2, i.e. NULL. Attached patch fixes it - specifically, with it the

Re: [PATCH, generic] Fix for define_subst

2012-11-27 Thread Richard Henderson
On 11/22/2012 09:36 AM, Kirill Yukhin wrote: > @@ -2668,7 +2668,7 @@ add_c_test (const char *expr, int value) > { >struct c_test *test; > > - if (expr[0] == 0) > + if (!expr || expr[0] == 0) > return; This looks like it's working around a bug elsewhere. r~

Re: [PATCH, generic] Fix for define_subst

2012-11-26 Thread Kirill Yukhin
Guys, this is a ping. Thanks, K On Thu, Nov 22, 2012 at 9:36 PM, Kirill Yukhin wrote: > Hello, > Here is copy-and-paste from issue raised by Ian (in the bottom). > > Fix is attached. > ChangeLog entry: > 2012-11-22 Michael Zolotukhin > > * gensupport.c (add_c_test): Check if expr isn'

[PATCH, generic] Fix for define_subst

2012-11-22 Thread Kirill Yukhin
Hello, Here is copy-and-paste from issue raised by Ian (in the bottom). Fix is attached. ChangeLog entry: 2012-11-22 Michael Zolotukhin * gensupport.c (add_c_test): Check if expr isn't NULL. Is it ok for trunk? === CUT HERE === It looks like the recent VEC rewrite might have interact