public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/28193]  New: config/arm/arm.c:3140 ICE
@ 2006-06-28 16:23 sjackman at gmail dot com
  2006-06-28 17:53 ` [Bug c/28193] " sjackman at gmail dot com
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: sjackman at gmail dot com @ 2006-06-28 16:23 UTC (permalink / raw)
  To: gcc-bugs

Compiling crtstuff.c with arm-elf-gcc 4.0.3 for -mthumb -fPIC
-msingle-pic-base fails. I had no trouble compiling GCC 4.1.1.

Cheers,
Shaun

make[3]: Leaving directory `/home/sjackman/src/toolchain/gcc-4.0.3/_build/gcc'
make GCC_FOR_TARGET="/home/sjackman/src/toolchain/gcc-4.0.3/_build/gcc/xgcc
-B/home/sjackman/src/toolchain/gcc-4.0.3/_build/gcc/
-B/usr/local/arm-elf/bin/ -B/usr/local/arm-elf/lib/ -isystem
/usr/local/arm-elf/include -isystem /usr/local/arm-elf/sys-include" \
         AR_FOR_TARGET="arm-elf-ar" \
         AR_CREATE_FOR_TARGET="arm-elf-ar  rc" \
         AR_EXTRACT_FOR_TARGET="arm-elf-ar  x" \
         AR_FLAGS_FOR_TARGET="" \
         CC="gcc" CFLAGS="-g -O2  -W -Wall -Wwrite-strings
-Wstrict-prototypes-Wmissing-prototypes -pedantic -Wno-long-long
-Wno-variadic-macros -Wold-style-definition  " \
         BUILD_PREFIX="" \
         BUILD_PREFIX_1="loser-" \
         LANGUAGES="" \
         LIBGCC2_CFLAGS="-O2  -DIN_GCC -DCROSS_COMPILE   -W -Wall
-Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes
-Wold-style-definition  -isystem ./include  -Dinhibit_libc -fno-inline
-g  -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED -Dinhibit_libc -mthumb -fPIC
-msingle-pic-base "  \
         MULTILIB_CFLAGS=" -mthumb -fPIC -msingle-pic-base"
T=thumb/pic/xip/ thumb/pic/xip/crtbegin.o thumb/pic/xip/crtend.o
thumb/pic/xip/crti.o thumb/pic/xip/crtn.o
make[3]: Entering directory `/home/sjackman/src/toolchain/gcc-4.0.3/_build/gcc'
/home/sjackman/src/toolchain/gcc-4.0.3/_build/gcc/xgcc
-B/home/sjackman/src/toolchain/gcc-4.0.3/_build/gcc/
-B/usr/local/arm-elf/bin/ -B/usr/local/arm-elf/lib/-isystem
/usr/local/arm-elf/include -isystem /usr/local/arm-elf/sys-include
-O2-DIN_GCC -DCROSS_COMPILE   -W -Wall -Wwrite-strings
-Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition
-isystem ./include  -I. -Ithumb/pic/xip -I../../gcc
-I../../gcc/thumb/pic/xip -I../../gcc/../include
-I../../gcc/../libcpp/include  -mthumb -fPIC -msingle-pic-base -g0
-finhibit-size-directive -fno-inline-functions -fno-exceptions
-fno-zero-initialized-in-bss -fno-unit-at-a-time  \
         -Dinhibit_libc -c ../../gcc/crtstuff.c -DCRT_BEGIN \
         -o thumb/pic/xip/crtbegin.o
../../gcc/crtstuff.c: In function 'frame_dummy':
../../gcc/crtstuff.c:325: internal compiler error: in
thumb_find_work_register,at config/arm/arm.c:3140
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.
make[3]: *** [thumb/pic/xip/crtbegin.o] Error 1
make[3]: Leaving directory `/home/sjackman/src/toolchain/gcc-4.0.3/_build/gcc'
make[2]: *** [extrathumb_pic_xip] Error 2
make[2]: Leaving directory `/home/sjackman/src/toolchain/gcc-4.0.3/_build/gcc'
make[1]: *** [stmp-multilib] Error 2
make[1]: Leaving directory `/home/sjackman/src/toolchain/gcc-4.0.3/_build/gcc'
make: *** [all-gcc] Error 2


-- 
           Summary: config/arm/arm.c:3140 ICE
           Product: gcc
           Version: 4.0.3
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: sjackman at gmail dot com
 GCC build triplet: i686-pc-linux-gnu
  GCC host triplet: i686-pc-linux-gnu
GCC target triplet: arm-unknown-elf


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28193


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug c/28193] config/arm/arm.c:3140 ICE
  2006-06-28 16:23 [Bug c/28193] New: config/arm/arm.c:3140 ICE sjackman at gmail dot com
@ 2006-06-28 17:53 ` sjackman at gmail dot com
  2006-06-28 20:40 ` [Bug target/28193] " sjackman at gmail dot com
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: sjackman at gmail dot com @ 2006-06-28 17:53 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from sjackman at gmail dot com  2006-06-28 17:36 -------
Created an attachment (id=11772)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=11772&action=view)
Backport thumb_find_work_register from 4.1.1

2005-03-01  Nick Clifton  <nickc@redhat.com>

        * config/arm/arm.c (thumb_find_work_register): Check all of the
        argument registers to see if they are free, and a couple of
        special cases where the last argument register but can be proved
        to be available during the function's prologue.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28193


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug target/28193] config/arm/arm.c:3140 ICE
  2006-06-28 16:23 [Bug c/28193] New: config/arm/arm.c:3140 ICE sjackman at gmail dot com
  2006-06-28 17:53 ` [Bug c/28193] " sjackman at gmail dot com
@ 2006-06-28 20:40 ` sjackman at gmail dot com
  2006-06-28 21:06 ` sjackman at gmail dot com
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: sjackman at gmail dot com @ 2006-06-28 20:40 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from sjackman at gmail dot com  2006-06-28 20:18 -------
This proposed patch does help. At the very least, it prevents the ICE on
compiling crtstuff.c while compiling the toolchain. However, with this patch
applied, I saw the same bug later while compiling newlib. As the comment in
thumb_find_work_register suggests, the real bug is probably in
thumb_compute_save_reg_mask.

make[8]: Entering directory
`/home/sjackman/src/toolchain/src/_build/arm-elf/thumb/pic/xip/newlib/libc/stdio'
arm-elf-gcc -B/home/sjackman/src/toolchain/src/_build/arm-elf/newlib/ -isystem
/home/sjackman/src/toolchain/src/_build/arm-elf/newlib/targ-include -isystem
/home/sjackman/src/toolchain/src/newlib/libc/include -DPACKAGE_NAME=\"newlib\"
-DPACKAGE_TARNAME=\"newlib\" -DPACKAGE_VERSION=\"1.14.0\"
-DPACKAGE_STRING=\"newlib\1.14.0\" -DPACKAGE_BUGREPORT=\"\"  -I.
-I../../../../../../../../newlib/libc/stdio -O2 -D__NO_SYSCALLS__
-DNO_FLOATING_POINT -DHAVE_FCNTL -DHAVE_NANOSLEEP -fno-builtin      -O2 -g -O2 
 -mthumb -fPIC -msingle-pic-base -c -o lib_a-findfp.o `test -f 'findfp.c' ||
echo '../../../../../../../../newlib/libc/stdio/'`findfp.c
../../../../../../../../newlib/libc/stdio/findfp.c: In function 'std':
../../../../../../../../newlib/libc/stdio/findfp.c:61: internal compiler
error:in thumb_find_work_register, at config/arm/arm.c:3173
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.
make[8]: *** [lib_a-findfp.o] Error 1
make[8]: Leaving directory
`/home/sjackman/src/toolchain/src/_build/arm-elf/thumb/pic/xip/newlib/libc/stdio'


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28193


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug target/28193] config/arm/arm.c:3140 ICE
  2006-06-28 16:23 [Bug c/28193] New: config/arm/arm.c:3140 ICE sjackman at gmail dot com
  2006-06-28 17:53 ` [Bug c/28193] " sjackman at gmail dot com
  2006-06-28 20:40 ` [Bug target/28193] " sjackman at gmail dot com
@ 2006-06-28 21:06 ` sjackman at gmail dot com
  2006-06-28 23:31 ` sjackman at gmail dot com
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: sjackman at gmail dot com @ 2006-06-28 21:06 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from sjackman at gmail dot com  2006-06-28 20:51 -------
I tried backporting thumb_compute_save_reg_mask from GCC 4.1.1 to GCC 4.0.3
without success. I'll try backporting this entire patch from svn.

2005-03-01  Nick Clifton  <nickc@redhat.com>

        * config/arm/arm.c (thumb_find_work_register): Check all of the
        argument registers to see if they are free, and a couple of
        special cases where the last argument register but can be proved
        to be available during the function's prologue.
        (print_multi_reg, arm_compute_save_reg0_reg12_mask,
        output_return_instruction, emit_multi_reg_push, thumb_pushpop,
        thumb_unexpanded_epilogue): Use unsigned long as the type for the
        register bit-mask.
        (thumb_compute_save_reg_mask): Likewise.  Also use
        thumb_find_work_register() to ensure that there is agreement about
        which work register is going to be used in the prologue.
        (thumb_output_function_prologue): Use unsigned long as the type
        for the register bit-mask.  Also delay pushing the link register if
        other high registers are going to be pushed.
        (thumb_compute_save_reg_mask, emit_multi_reg_push,
        print_multi-reg, number_of_first_bit_set, thumb_pushpop): Remove
        redundant prototypes.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28193


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug target/28193] config/arm/arm.c:3140 ICE
  2006-06-28 16:23 [Bug c/28193] New: config/arm/arm.c:3140 ICE sjackman at gmail dot com
                   ` (2 preceding siblings ...)
  2006-06-28 21:06 ` sjackman at gmail dot com
@ 2006-06-28 23:31 ` sjackman at gmail dot com
  2006-06-28 23:32 ` [Bug target/28193] [4.0 only] " pinskia at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: sjackman at gmail dot com @ 2006-06-28 23:31 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from sjackman at gmail dot com  2006-06-28 22:30 -------
I tried applying r95736 (2005-03-01 Nick Clifton) and r103151 (2005-08-16
Richard Earnshaw) against GCC 4.0.3. Both these patches apply cleanly (with
offsets), but don't fix the problem compiling newlib.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28193


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug target/28193] [4.0 only] config/arm/arm.c:3140 ICE
  2006-06-28 16:23 [Bug c/28193] New: config/arm/arm.c:3140 ICE sjackman at gmail dot com
                   ` (3 preceding siblings ...)
  2006-06-28 23:31 ` sjackman at gmail dot com
@ 2006-06-28 23:32 ` pinskia at gcc dot gnu dot org
  2006-06-29  0:10 ` sjackman at gmail dot com
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-06-28 23:32 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from pinskia at gcc dot gnu dot org  2006-06-28 23:31 -------
Is this a regression?


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |ice-on-valid-code
            Summary|config/arm/arm.c:3140 ICE   |[4.0 only]
                   |                            |config/arm/arm.c:3140 ICE
   Target Milestone|---                         |4.0.4


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28193


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug target/28193] [4.0 only] config/arm/arm.c:3140 ICE
  2006-06-28 16:23 [Bug c/28193] New: config/arm/arm.c:3140 ICE sjackman at gmail dot com
                   ` (4 preceding siblings ...)
  2006-06-28 23:32 ` [Bug target/28193] [4.0 only] " pinskia at gcc dot gnu dot org
@ 2006-06-29  0:10 ` sjackman at gmail dot com
  2006-06-29  0:30 ` sjackman at gmail dot com
  2007-02-03 17:48 ` gdr at gcc dot gnu dot org
  7 siblings, 0 replies; 9+ messages in thread
From: sjackman at gmail dot com @ 2006-06-29  0:10 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #6 from sjackman at gmail dot com  2006-06-29 00:01 -------
Applying the patch from r103277 fixes this bug. I also had r95736 and r103151
applied against my 4.0.3 tree at the time. So, I don't know if r103277 alone is
sufficient. r103277 was meant to close PR target/23473, so this bug may be a
duplicate of #23473.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28193


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug target/28193] [4.0 only] config/arm/arm.c:3140 ICE
  2006-06-28 16:23 [Bug c/28193] New: config/arm/arm.c:3140 ICE sjackman at gmail dot com
                   ` (5 preceding siblings ...)
  2006-06-29  0:10 ` sjackman at gmail dot com
@ 2006-06-29  0:30 ` sjackman at gmail dot com
  2007-02-03 17:48 ` gdr at gcc dot gnu dot org
  7 siblings, 0 replies; 9+ messages in thread
From: sjackman at gmail dot com @ 2006-06-29  0:30 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #7 from sjackman at gmail dot com  2006-06-29 00:10 -------
Subject: Re:  [4.0 only] config/arm/arm.c:3140 ICE

On 28 Jun 2006 23:31:22 -0000, pinskia at gcc dot gnu dot org
<gcc-bugzilla@gcc.gnu.org> wrote:
> ------- Comment #5 from pinskia at gcc dot gnu dot org  2006-06-28 23:31 -------
> Is this a regression?
...
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28193

I haven't tested any version of GCC earlier than 4.0.3 for this bug,
so I don't know if it's a regression. I was testing svn versions after
4.0.3 and before 4.1.0 to discover when this bug was fixed. It appears
it was fixed in r103277.

Cheers,
Shaun


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28193


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug target/28193] [4.0 only] config/arm/arm.c:3140 ICE
  2006-06-28 16:23 [Bug c/28193] New: config/arm/arm.c:3140 ICE sjackman at gmail dot com
                   ` (6 preceding siblings ...)
  2006-06-29  0:30 ` sjackman at gmail dot com
@ 2007-02-03 17:48 ` gdr at gcc dot gnu dot org
  7 siblings, 0 replies; 9+ messages in thread
From: gdr at gcc dot gnu dot org @ 2007-02-03 17:48 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #8 from gdr at gcc dot gnu dot org  2007-02-03 17:47 -------
Fixed in GCC-4.1.1


-- 

gdr at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |FIXED
   Target Milestone|4.0.4                       |4.1.1


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28193


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2007-02-03 17:48 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-06-28 16:23 [Bug c/28193] New: config/arm/arm.c:3140 ICE sjackman at gmail dot com
2006-06-28 17:53 ` [Bug c/28193] " sjackman at gmail dot com
2006-06-28 20:40 ` [Bug target/28193] " sjackman at gmail dot com
2006-06-28 21:06 ` sjackman at gmail dot com
2006-06-28 23:31 ` sjackman at gmail dot com
2006-06-28 23:32 ` [Bug target/28193] [4.0 only] " pinskia at gcc dot gnu dot org
2006-06-29  0:10 ` sjackman at gmail dot com
2006-06-29  0:30 ` sjackman at gmail dot com
2007-02-03 17:48 ` gdr at gcc dot gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).