Bug 25027 - [4.2 Regression] libgcov.c:652: ICE: in default_secondary_reload, at targhooks.c:529
Summary: [4.2 Regression] libgcov.c:652: ICE: in default_secondary_reload, at targhook...
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: middle-end (show other bugs)
Version: 4.2.0
: P3 blocker
Target Milestone: 4.2.0
Assignee: Not yet assigned to anyone
URL:
Keywords: build, ice-on-valid-code
Depends on:
Blocks:
 
Reported: 2005-11-24 23:00 UTC by John David Anglin
Modified: 2005-11-30 14:02 UTC (History)
3 users (show)

See Also:
Host: hppa*-*-*
Target: hppa*-*-*
Build: hppa*-*-*
Known to work:
Known to fail:
Last reconfirmed: 2005-11-28 04:58:36


Attachments
_gcov_merge_single.i (21.56 KB, text/plain)
2005-11-27 17:28 UTC, dave
Details

Note You need to log in before you can comment on or make changes to this bug.
Description John David Anglin 2005-11-24 23:00:33 UTC
./xgcc -B./ -B/home/dave/opt/gnu/gcc/gcc-4.1.0/hppa-linux/bin/ -isystem /home/da
ve/opt/gnu/gcc/gcc-4.1.0/hppa-linux/include -isystem /home/dave/opt/gnu/gcc/gcc-
4.1.0/hppa-linux/sys-include -L/home/dave/gnu/gcc-4.0/objdir/gcc/../ld -O2  -O2
-g -O2  -DIN_GCC    -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-proto
types -Wold-style-definition  -isystem ./include  -fPIC -DELF=1 -DLINUX=1 -g -DH
AVE_GTHR_DEFAULT -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED  -I. -I. -I../../gcc/gcc
-I../../gcc/gcc/. -I../../gcc/gcc/../include -I../../gcc/gcc/../libcpp/include
 -DL_gcov_merge_single -c ../../gcc/gcc/libgcov.c -o libgcc/./_gcov_merge_single
.o
../../gcc/gcc/libgcov.c: In function '__gcov_merge_single':
../../gcc/gcc/libgcov.c:652: internal compiler error: in default_secondary_reloa
d, at targhooks.c:529
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.
make[3]: *** [libgcc/./_gcov_merge_single.o] Error 1
Comment 1 Andrew Pinski 2005-11-24 23:14:10 UTC
I see that you are having a bad couple of weeks.
Comment 2 dave 2005-11-24 23:22:46 UTC
Subject: Re:  [4.2 Regression] libgcov.c:652: ICE: in default_secondary_reload, at targhooks.c:529

> I see that you are having a bad couple of weeks.

Yah.  Definitely, slows progress on PA specific stuff.

Dave
Comment 3 dave 2005-11-24 23:55:55 UTC
Subject: Re:  [4.2 Regression] libgcov.c:652: ICE: in default_secondary_reload, at targhooks.c:529

> I see that you are having a bad couple of weeks.

Thing were somewhat better before r107468.

Dave
Comment 4 Bernd Schmidt 2005-11-27 11:09:12 UTC
The preprocessed source is where?
Comment 5 dave 2005-11-27 17:28:38 UTC
Subject: Re:  [4.2 Regression] libgcov.c:652: ICE: in default_secondary_reload, at targhooks.c:529

> The preprocessed source is where?

Attached.

Dave
Comment 6 dave 2005-11-27 17:28:38 UTC
Created attachment 10349 [details]
_gcov_merge_single.i
Comment 7 dave 2005-11-27 17:51:26 UTC
Subject: Re:  [4.2 Regression] libgcov.c:652: ICE: in default_secondary_reload, at targhooks.c:529

This is what I see in gdb:

Assembling functions:
 __gcov_merge_single
Breakpoint 3, default_secondary_reload (in_p=0 '\0', x=0x4000d720,
    reload_class=FP_REGS, reload_mode=DImode, sri=0xbff5ed10)
    at ../../gcc/gcc/targhooks.c:534
534                   gcc_assert (scratch_class == class);
(gdb) p class
$1 = GENERAL_REGS
(gdb) p scratch_class
$2 = GENERAL_REGS
(gdb) p insn_data[(int) icode]
$3 = {name = 0x864b60 "reload_outdi", output = {single = 0x0, multi = 0x0,
    function = 0}, genfun = @0x8dfda2: 0x8e117c <fixup_branch_offset+15508>,
  operand = 0x862bc4, n_operands = 3 '\003', n_dups = 0 '\0',
  n_alternatives = 1 '\001', output_format = 0 '\0'}
(gdb) p debug_rtx (x)
(mem:DI (reg/f:SI 30 %r30) [0 S8 A64])
$4 = void
(gdb) p reload_class
$5 = FP_REGS
(gdb) p reload_mode
$6 = DImode

The problem is that the class for the scratch register specified in
"reload_outdi" is GENERAL_REGS but we actually need R1_REGS for certain
reloads.

The documentation indicates that reload_in* and reload_out* have
been obsoleted by the new target hook.  If that's really the case,
then it would appear emit_move_sequence needs a rewrite to somehow
integrate it with the new target hook.

Dave
Comment 8 Andrew Pinski 2005-11-28 04:58:36 UTC
Confirmed.
Comment 9 John David Anglin 2005-11-30 14:02:18 UTC
See http://gcc.gnu.org/ml/gcc-patches/2005-11/msg02110.html.