This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: cbranchsi4
Florent Defay <spira.inhabitant@gmail.com> writes:
> After debugging with GDB, I found out that equiv_constant is called
> with a null rtx as argument:
>
> Program received signal SIGSEGV, Segmentation fault.
> equiv_constant (x=0x0) at ../../gcc-4.3.3/gcc/cse.c:3603
> 3603 if (REG_P (x)
> (gdb) bt
> #0 equiv_constant (x=0x0) at ../../gcc-4.3.3/gcc/cse.c:3603
> #1 0x0836bf37 in fold_rtx (x=0xb7c35c30, insn=0xb7c3baa0) at
> ../../gcc-4.3.3/gcc/cse.c:3056
> #2 0x0836c1b5 in fold_rtx (x=0xb7c36de0, insn=0xb7c3baa0) at
> ../../gcc-4.3.3/gcc/cse.c:3055
This strongly suggests that the insns has a NULL where it is not
permitted. In any case you need to see what the values are in the
code--e.g., what is being passed in the recursive call to fold_rtx, and
what is being returned. Try dumping the RTL in the debugger to see if
you can spot the issue. Take a look at gcc/gdbinit.in for some helpful
gdb commands.
Ian