This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/12551] New: -O3 : internal compiler error: in clear_dead_regs, at regrename.c:137 or -O2 : internal compiler error: in sched_analyze_2, at sched-deps.c:757
- From: "heinrich dot brand at fujitsu-siemens dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 9 Oct 2003 14:56:06 -0000
- Subject: [Bug target/12551] New: -O3 : internal compiler error: in clear_dead_regs, at regrename.c:137 or -O2 : internal compiler error: in sched_analyze_2, at sched-deps.c:757
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12551
Summary: -O3 : internal compiler error: in clear_dead_regs, at
regrename.c:137 or -O2 : internal compiler error: in
sched_analyze_2, at sched-deps.c:757
Product: gcc
Version: 3.3.1
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: target
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: heinrich dot brand at fujitsu-siemens dot com
CC: gcc-bugs at gcc dot gnu dot org
GCC build triplet: s390-linux-gnu
GCC host triplet: s390-linux-gnu
GCC target triplet: s390-linux-gnu
Interal error with gcc -c -O3 or -O2 and Source:
(Is not in gcc-3.2 on s390-linux-gnu.)
typedef struct {
char *name;
unsigned long long a:16;
unsigned long long :7;
unsigned long long b:24;
unsigned long long (*f_fcn)(char *);
unsigned long long c:7;
unsigned long long d:5;
long long sum:61;
long long e:3;
char z;
} A;
typedef struct {
long long a:31;
long long b:31;
} B;
int foo(B sb, A s, long long b){
s.a |= s.b;
s.b |= s.c;
s.d |= s.c;
s.sum += s.a + s.b + s.c + s.d + sb.a + sb.b;
return s.sum;
}
#######################################################################
The problem is a STM instruction. It reads
(insn 3 26 29 0 0 (parallel [
(set (mem/s:SI (reg/f:SI 137) [3 S4 A32])
(reg:SI 2 %r2))
(set (mem/s:SI (plus:SI (reg/f:SI 137)
(const_int 4 [0x4])) [3 S4 A32])
(reg:SI 3 %r3))
]) 69 {*store_multiple_si} (insn_list 176 (nil))
(expr_list:REG_DEAD (reg:SI 3 %r3)
(expr_list:REG_DEAD (reg:SI 2 %r2)
(expr_list:REG_DEAD (reg/f:SI 137)
(nil)))))
In the s390.md only part of the parallel is really given. It reads
(define_insn "*store_multiple_si"
[(match_parallel 0 "store_multiple_operation"
[(set (match_operand:SI 1 "s_operand" "=Q")
(match_operand:SI 2 "register_operand" "r"))])]
When recognizing the instruction, the second set will not be put into a separate
operand field.
In the function eliminate_regs_in_insn the first use of reg 137 is seen and
replaced. The second use is not replaced. This causes an abort later.
One of the reasons is that 'insn_data[icode].operand[0].eliminable' is zero. So
elimination will not be done on the parallel as a whole, but only on operands
1 and 2.