This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/79404] h8300: ICE at gcc/ira.c:5541 whilst building libgcc
- From: "dhowells at redhat dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 08 Feb 2017 12:13:23 +0000
- Subject: [Bug target/79404] h8300: ICE at gcc/ira.c:5541 whilst building libgcc
- Auto-submitted: auto-generated
- References: <bug-79404-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79404
--- Comment #3 from dhowells at redhat dot com <dhowells at redhat dot com> ---
Program received signal SIGSEGV, Segmentation fault.
0x00000000007e13fb in allocno_copy_cost_saving (
allocno=allocno@entry=0x149f340, hard_regno=2)
at ../../gcc-7.0.1-20170204/gcc/ira-color.c:2764
2764 cost += cp->freq *
ira_register_move_cost[allocno_mode][rclass][rclass];
(gdb) p cp
$1 = (ira_copy_t) 0x14cee38
(gdb) p cp->freq
$2 = 194
0x00000000007e13f0 <+176>: mov %r9,%rdx
0x00000000007e13f3 <+179>: add 0x12a4860(,%r10,8),%rdx
=> 0x00000000007e13fb <+187>: movzwl (%rdx,%r11,1),%edx
r9 0x8 8
r10 0x21b 539
r11 0x38 56
rdx 0x8 8
$3 = (target_ira_int *) 0x12a4860 <default_target_ira_int>
(gdb) p &((struct target_ira_int*)0)->x_ira_register_move_cost
$4 = (move_table *(*)[39]) 0x10a0
(gdb) p 0x10a0/8
$5 = 532
So r10 is the offset of x_ira_register_move_cost/8 + 7 where allocno_mode is 7
(DImode).
But:
(gdb) p default_target_ira_int.x_ira_register_move_cost[7]
$8 = (move_table *) 0x0
(gdb) p default_target_ira_int.x_ira_register_move_cost
$2 = {0x12f7170, 0x12f7170, 0x13e8f80, 0x0, 0x14876f0, 0x1487450, 0x14875a0,
0x0 <repeats 32 times>}