This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Constant folding and Constant propagation
- From: Jean Christophe Beyler <jean dot christophe dot beyler at gmail dot com>
- To: Adam Nemet <anemet at caviumnetworks dot com>
- Cc: gcc at gcc dot gnu dot org
- Date: Fri, 13 Mar 2009 17:03:22 -0400
- Subject: Re: Constant folding and Constant propagation
- References: <4D60B0700D1DB54A8C0C6E9BE691637008EB795E@EXCHANGEVS.IceraSemi.local> <c568a2600902251424s2409ddbv9d1555335a697566@mail.gmail.com> <4D60B0700D1DB54A8C0C6E9BE6916370091E7FE7@EXCHANGEVS.IceraSemi.local> <c568a2600902261127j5a39de55ta6a5db3d980f8b02@mail.gmail.com> <4D60B0700D1DB54A8C0C6E9BE6916370091E8780@EXCHANGEVS.IceraSemi.local> <o7zlg7fyte.fsf@ropi.home> <o77i36s8j0.fsf@ropi.home>
I set up your patch and I get an internal error on this test program:
extern void foo(int, int);
extern int bar(void);
int startup;
void foobar()
{
int i;
while(1)
{
if (bar()) {
foo(0,0);
}
}
}
Here's the error:
/home/beyler/cyclops64/src/tnt/kernel/process_manager/testnode.c: In
function 'foobar':
/home/beyler/cyclops64/src/tnt/kernel/process_manager/testnode.c:15:
internal compiler error: in insert_regs, at cse.c:1156
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.
I think it's got something to do with my machine description but this
only happens when the values of foo are both 0. I haven't found
another case where it fails. It seems when the compiler sees two
constants 0 for the register (r8 which is my first input register), it
fails on the second. Somewhere between both calls, it must remove the
quantity.
Any ideas ?
Jc