Bug 14436 - ICE building libgcc.a
Summary: ICE building libgcc.a
Status: RESOLVED WONTFIX
Alias: None
Product: gcc
Classification: Unclassified
Component: target (show other bugs)
Version: 3.3.3
: P2 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords: build, ice-on-valid-code
: 15436 17633 (view as bug list)
Depends on:
Blocks: 14538
  Show dependency treegraph
 
Reported: 2004-03-04 23:40 UTC by Joel Sherrill
Modified: 2015-01-02 22:39 UTC (History)
5 users (show)

See Also:
Host: i686-pc-linux-gnu
Target: tic4x-rtems4.7
Build: i686-pc-linux-gnu
Known to work: 3.3.2
Known to fail: 3.3.3, 3.4.0, 3.4.3
Last reconfirmed: 2004-09-10 00:45:59


Attachments
simplified test case (160 bytes, text/plain)
2004-03-05 00:10 UTC, Joel Sherrill
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Joel Sherrill 2004-03-04 23:40:27 UTC
ICE while building compiler.  This is with binutils 2.14.

/home/rtems/src/packages/BUILD/rtems-4.7-tic4x-rtems4.7-gcc-newlib-gcc3.3.3newlib1.11.0/build/gcc/xgcc
-B/home/rtems/src/packages/BUILD/rtems-4.7-tic4x-rtems4.7-gcc-newlib-gcc3.3.3newlib1.11.0/build/gcc/
-nostdinc
-B/home/rtems/src/packages/BUILD/rtems-4.7-tic4x-rtems4.7-gcc-newlib-gcc3.3.3newlib1.11.0/build/tic4x-rtems4.7/newlib/
-isystem
/home/rtems/src/packages/BUILD/rtems-4.7-tic4x-rtems4.7-gcc-newlib-gcc3.3.3newlib1.11.0/build/tic4x-rtems4.7/newlib/targ-include
-isystem
/home/rtems/src/packages/BUILD/rtems-4.7-tic4x-rtems4.7-gcc-newlib-gcc3.3.3newlib1.11.0/gcc-3.3.3/newlib/libc/include
-B/opt/rtems-4.7/tic4x-rtems4.7/bin/ -B/opt/rtems-4.7/tic4x-rtems4.7/lib/
-isystem /opt/rtems-4.7/tic4x-rtems4.7/include -O2  -DIN_GCC -DCROSS_COMPILE  
-W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -isystem
./include  -Dexit=unused_exit -g -DHAVE_GTHR_DEFAULT -DIN_LIBGCC2
-D__GCC_FLOAT_NOT_NEEDED -Dinhibit_libc -I. -I. -I../../gcc-3.3.3/gcc
-I../../gcc-3.3.3/gcc/. -I../../gcc-3.3.3/gcc/config
-I../../gcc-3.3.3/gcc/../include  -msmall -DL__main -c
../../gcc-3.3.3/gcc/libgcc2.c -o libgcc/small/__main.o
../../gcc-3.3.3/gcc/libgcc2.c: In function `__do_global_dtors':
../../gcc-3.3.3/gcc/libgcc2.c:1848: error: insn does not satisfy its constraints:
(insn:HI 48 57 49 0 0x4001b344 (set (reg/s/f:QI 8 ar0 [37])
        (mem/f:QI (symbol_ref:QI ("p$0")) [4 p+0 S1 A32])) 8 {movqi_noclobber} (nil)
    (nil))
../../gcc-3.3.3/gcc/libgcc2.c:1848: internal compiler error: in
reload_cse_simplify_operands, at reload1.c:8353
Comment 1 Andrew Pinski 2004-03-04 23:55:48 UTC
This is caused by:
2004-01-09  Richard Henderson  <rth@redhat.com>

        * recog.c (constrain_operands): Validate mem operands.

But it is laten target bug.
Comment 2 Joel Sherrill 2004-03-05 00:10:17 UTC
Created attachment 5861 [details]
simplified test case

This is reduced from the original test.  It now fails with:

./xgcc -O2  -msmall -B./ -c pr14436.c
./xgcc	 -msmall -B./ -c pr14436.c

but not if the -msmall is dropped.  It do not know if it helps
but it can actually be reduced to this:
extern int *I;
void __do_global_dtors (void)
{
  int *p = I;
  while (*p)
    {
    }
}
Comment 3 Andrew Pinski 2004-03-06 13:51:07 UTC
tic4x-rtems4.7 can never be critical.
Comment 4 Joel Sherrill 2004-03-09 12:07:22 UTC
Also occurs on 3.4 branch with the same error in the same source file but the
gcc source file reported is different.

./../gcc-3.4-branch/gcc/libgcc2.c:1596: internal compiler error: in
reload_cse_simplify_operands, at postreload.c:378
Comment 5 Andrew Pinski 2004-05-14 15:42:11 UTC
*** Bug 15436 has been marked as a duplicate of this bug. ***
Comment 6 Andrew Pinski 2004-09-10 00:45:59 UTC
Moving to 3.4.3 per GDR.
Comment 7 Andrew Pinski 2004-09-23 13:02:08 UTC
*** Bug 17633 has been marked as a duplicate of this bug. ***
Comment 8 Mark Mitchell 2004-11-01 00:46:02 UTC
Postponed until GCC 3.4.4.
Comment 9 Andrew Pinski 2004-12-05 03:49:27 UTC
Fixed on the mainline.
Comment 10 Joel Sherrill 2005-01-09 16:37:50 UTC
(In reply to comment #9)
> Fixed on the mainline.

Could this fix be applied to the 3.4 branch? 
Comment 11 Joel Sherrill 2005-01-10 12:28:43 UTC
(In reply to comment #10)
> (In reply to comment #9)
> > Fixed on the mainline.
> 
> Could this fix be applied to the 3.4 branch? 

Are you sure it is even fixed?  with gcc-4.0-20050109, the build fails with this
message at what appears to be the same location in the compilation.  

../../gcc-4.0.20050109/gcc/libgcc2.c: In function '__do_global_ctors':
../../gcc-4.0.20050109/gcc/libgcc2.c:1674: internal compiler error: in
integer_all_onesp, at tree.c:995
Comment 12 Ralf Corsepius 2005-01-10 15:45:23 UTC
(In reply to comment #11)
> Are you sure it is even fixed?  with gcc-4.0-20050109, the build fails with this
> message at what appears to be the same location in the compilation.  
> 
> ../../gcc-4.0.20050109/gcc/libgcc2.c: In function '__do_global_ctors':
> ../../gcc-4.0.20050109/gcc/libgcc2.c:1674: internal compiler error: in
> integer_all_onesp, at tree.c:995
Are you building w/ c++ enabled? Building g++ for the c4x has not worked as long
as I can think back.
Comment 13 Mark Mitchell 2005-05-10 01:38:03 UTC
C4x is not a primary or secondary platform; removing target milestone.
Comment 14 Joel Sherrill 2015-01-02 22:39:16 UTC
CPU long dead. Target removed from GCC long ago. Closing as won't fix.