On 2015/6/30 下午 01:13, Chung-Lin Tang wrote: > On 2015/6/30 12:22 PM, Sandra Loosemore wrote: >> On 06/29/2015 09:07 PM, Kito Cheng wrote: >>> Hi all: >>> >>> This patch seem will broken when disable assert checking for c6x.... >>> >>> Index: gcc/config/c6x/c6x.c >>> =================================================================== >>> --- gcc/config/c6x/c6x.c (revision 225104) >>> +++ gcc/config/c6x/c6x.c (working copy) >>> @@ -3516,7 +3516,7 @@ try_rename_operands (rtx_insn *head, rtx >>> best_reg = >>> find_rename_reg (this_head, super_class, &unavailable, old_reg, true); >>> >>> - regrename_do_replace (this_head, best_reg); >>> + gcc_assert (regrename_do_replace (this_head, best_reg)); >>> >>> count_unit_reqs (new_reqs, head, PREV_INSN (tail)); >>> merge_unit_reqs (new_reqs); >>> @@ -3529,7 +3529,7 @@ try_rename_operands (rtx_insn *head, rtx >>> unit_req_imbalance (reqs), unit_req_imbalance (new_reqs)); >>> } >>> if (unit_req_imbalance (new_reqs) > unit_req_imbalance (reqs)) >>> - regrename_do_replace (this_head, old_reg); >>> + gcc_assert (regrename_do_replace (this_head, old_reg)); >>> else >>> memcpy (reqs, new_reqs, sizeof (unit_req_table)); >>> >> >> I'm sorry; do you have a suggestion for a fix? I thought this was the >> change I was asked to make, and as I noted previously, I'm not set up to >> test (or even build) for this target. >> >> -Sandra the obviously confused :-( > > You probably have to separate out the regrename_do_replace() bool result into > a variable, > placing the whole call into the gcc_assert() might make it disappear when > assertions are turned off.
I notice the way gcc_assert() is defined in system.h now, the test won't disappear even when runtime checks are disabled, though you might still adjust it to avoid any programmer confusion. Chung-Lin