This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: c++ 2.97, warning: ICE: would have deleted prologue/epilogue insn
- To: Florian Lohoff <flo at rfc822 dot org>
- Subject: Re: c++ 2.97, warning: ICE: would have deleted prologue/epilogue insn
- From: Ralf Baechle <ralf at oss dot sgi dot com>
- Date: Tue, 31 Oct 2000 18:19:25 +0100
- Cc: gcc at gcc dot gnu dot org, Andreas Jaeger <aj at suse dot de>, Keith M Wesolowski <wesolows at chem dot unr dot edu>, "Maciej W. Rozycki" <macro at ds2 dot pg dot gda dot pl>
- References: <20001031044702.A697@paradigm.rfc822.org>
Here is a smaller test case in plane C without includes that results in the
same error message. Note that the size of the array stack[] seems to be
a magic factor. The ICE only happens if it's larger than 8188 elements
that is the resulting total stack frame is larger than 32kb.
As I interpret this case;
- The instruction represented by the patern isn't actually part of the
epilogue but of the function body.
- The instruction is really dead code and should be removed.
- The warning is bogus.
[root@babe redhat]# cat sit.c
void sit_mw_out(void)
{
int stack_ptr;
int stack[16384];
int ptr;
ptr = stack[--stack_ptr];
}
[root@babe redhat]# gcc -O -S -dp sit.c
sit.c: In function `sit_mw_out':
sit.c:8: warning: ICE: would have deleted prologue/epilogue insn
(insn 42 40 43 (set (reg:SI 13 t5)
(plus:SI (reg:SI 12 t4)
(reg:SI 29 sp))) -1 (nil)
(nil))
[root@babe redhat]# cat sit.s
.file 1 "sit.c"
.abicalls
.version "01.01"
gcc2_compiled.:
__gnu_compiled_c:
.text
.align 2
.globl sit_mw_out
.ent sit_mw_out
sit_mw_out:
.frame $sp,65552,$31 # vars= 65536, regs= 1/0, args= 0, extra= 8
.mask 0x10000000,-8
.fmask 0x00000000,0
.set noreorder
.cpload $25
.set reorder
subu $sp,$sp,65552
.cprestore 0
li $13,65536 # 0x10000 # 30 movsi_internal2/3 [length = 4]
ori $13,$13,0x8 # 32 anddi3_internal1+1/2 [length = 4]
addu $13,$13,$sp # 34 addsi3_internal [length = 4]
sw $28,0($13) # 36 movsi_internal2/7 [length = 4]
li $12,65536 # 0x10000 # 51 movsi_internal2/3 [length = 4]
ori $12,$12,0x10 # 52 anddi3_internal1+1/2 [length = 4]
addu $13,$12,$sp # 42 addsi3_internal [length = 4]
.set noreorder
.set nomacro
j $31 # 46 return_internal [length = 4]
addu $sp,$sp,$12 # 45 addsi3_internal [length = 4]
.set macro
.set reorder
.end sit_mw_out