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]

Fix for incompletely duplicated code in strength_reduce


Joern Rennecke writes:
 > After strength_reduce has called consec_sets_giv to verify a giv for a
 > register that is set multiple times, it duplicates some code from
 > the called function to determine the insn that actually sets the value of
 > the giv.  However, the replication is incomplete, and if any insn that
 > doesn't set the giv is between insns that do set it, the loop stops too
 > early.
 > 
 > Here is a patch to remove the code duplication:

I'm finding that this patch causes a segfault for the c4x target,
since last_consec_insn is being referenced before it is set.
The following function triggers this.

int ccopy1(const __complex__ float *a, __complex__ float *b, int size)
{
    int i;
    
    for (i = 0; i < size; i++)
	b[i] = a[i];
    return 1;
}




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