Bug 21323 - internal compiler error: Segmentation fault
Summary: internal compiler error: Segmentation fault
Status: RESOLVED INVALID
Alias: None
Product: gcc
Classification: Unclassified
Component: target (show other bugs)
Version: 4.1.0
: P2 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords: build, ice-on-valid-code
Depends on:
Blocks: 22366
  Show dependency treegraph
 
Reported: 2005-05-01 22:16 UTC by matt
Modified: 2006-11-24 02:00 UTC (History)
2 users (show)

See Also:
Host: alpha--netbsd
Target: alpha--netbsd
Build: alpha--netbsd
Known to work:
Known to fail:
Last reconfirmed:


Attachments
precompile source (12.24 KB, text/plain)
2005-05-01 22:18 UTC, matt
Details

Note You need to log in before you can comment on or make changes to this bug.
Description matt 2005-05-01 22:16:53 UTC
GCC 4.1 segfaults using the compiler produce by stage1/gcc:

Reading specs from ./specs
Target: alpha--netbsd
Configured with: /u1/toolchain/gcc/configure --target=alpha--netbsd
--build=alpha--netbsd --host=alpha--netbsd --enable-threads=posix
--disable-checking --enable-languages=c,c++,objc
Thread model: posix
gcc version 4.1.0 20050430 (experimental)
 ./cc1 -quiet -v -I. -I. -I/u1/toolchain/gcc/gcc -I/u1/toolchain/gcc/gcc/.
-I/u1/toolchain/gcc/gcc/../include -I./../intl
-I/u1/toolchain/gcc/gcc/../libcpp/include -iprefix
/u1/toolchain/alpha/gcc/gcc/../lib/gcc/alpha--netbsd/4.1.0/ -isystem ./include
-DIN_GCC -DHAVE_GTHR_DEFAULT -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED
-DL_popcountsi2 -DHIDE_EXPORTS -isystem /usr/local/alpha--netbsd/include
-isystem /usr/local/alpha--netbsd/sys-include -isystem ./include
/u1/toolchain/gcc/gcc/libgcc2.c -quiet -dumpbase libgcc2.c -mieee -auxbase-strip
libgcc/./_popcountsi2.o -g -O2 -W -Wall -Wwrite-strings -Wstrict-prototypes
-Wmissing-prototypes -Wold-style-definition -version -fPIC -fvisibility=hidden
-o /tmp/ccLQyx5f.s
ignoring nonexistent directory "/usr/local/alpha--netbsd/include"
ignoring nonexistent directory "/usr/local/alpha--netbsd/sys-include"
ignoring duplicate directory "./include"
ignoring nonexistent directory
"/u1/toolchain/alpha/gcc/gcc/../lib/gcc/alpha--netbsd/4.1.0/include"
ignoring nonexistent directory
"/u1/toolchain/alpha/gcc/gcc/../lib/gcc/alpha--netbsd/4.1.0/../../../../alpha--netbsd/include"
ignoring nonexistent directory "NONE/include"
ignoring nonexistent directory "/usr/local/lib/gcc/alpha--netbsd/4.1.0/include"
ignoring nonexistent directory "/usr/local/lib/../alpha--netbsd/include"
ignoring duplicate directory "."
ignoring duplicate directory "/u1/toolchain/gcc/gcc/."
#include "..." search starts here:
#include <...> search starts here:
 .
 /u1/toolchain/gcc/gcc
 /u1/toolchain/gcc/gcc/../include
 ./../intl
 /u1/toolchain/gcc/gcc/../libcpp/include
 ./include
 /usr/local/include
 /usr/include
End of search list.
GNU C version 4.1.0 20050430 (experimental) (alpha--netbsd)
        compiled by GNU C version 4.1.0 20050430 (experimental).
GGC heuristics: --param ggc-min-expand=47 --param ggc-min-heapsize=65309
/u1/toolchain/gcc/gcc/libgcc2.c: In function '__popcountdi2':
/u1/toolchain/gcc/gcc/libgcc2.c:771: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.

GNU gdb 6.3.50.20050423-cvs
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "alpha--netbsd"...
Breakpoint 1 at 0x120152998: file /u1/toolchain/gcc/gcc/diagnostic.c, line 570.
Breakpoint 2 at 0x1201528f4: file /u1/toolchain/gcc/gcc/diagnostic.c, line 516.
Breakpoint 3 at 0x1204a7504
Breakpoint 4 at 0x1204a7294
(gdb) source /tmp/x.gdb
Breakpoint 3 at 0x16047bb74
Breakpoint 4 at 0x16047c450
ignoring nonexistent directory "/usr/local/alpha--netbsd/include"
ignoring nonexistent directory "/usr/local/alpha--netbsd/sys-include"
ignoring duplicate directory "./include"
ignoring nonexistent directory
"/u1/toolchain/alpha/gcc/gcc/../lib/gcc/alpha--netbsd/4.1.0/include"
ignoring nonexistent directory
"/u1/toolchain/alpha/gcc/gcc/../lib/gcc/alpha--netbsd/4.1.0/../../../../alpha--netbsd/include"
ignoring nonexistent directory "NONE/include"
ignoring nonexistent directory "/usr/local/lib/gcc/alpha--netbsd/4.1.0/include"
ignoring nonexistent directory "/usr/local/lib/../alpha--netbsd/include"
ignoring duplicate directory "."
ignoring duplicate directory "/u1/toolchain/gcc/gcc/."
#include "..." search starts here:
#include <...> search starts here:
 .
 /u1/toolchain/gcc/gcc
 /u1/toolchain/gcc/gcc/../include
 ./../intl
 /u1/toolchain/gcc/gcc/../libcpp/include
 ./include
 /usr/local/include
 /usr/include
End of search list.
GNU C version 4.1.0 20050430 (experimental) (alpha--netbsd)
        compiled by GNU C version 4.1.0 20050430 (experimental).
GGC heuristics: --param ggc-min-expand=47 --param ggc-min-heapsize=65309

Program received signal SIGSEGV, Segmentation fault.
strength_reduce (loop=
During symbol reading, incomplete CFI data; unspecified registers (e.g., v0) at
0x1203682f4.
During symbol reading, incomplete CFI data; unspecified registers (e.g., t0) at
0x1203682f4.
During symbol reading, incomplete CFI data; unspecified registers (e.g., t1) at
0x1203682f4.
During symbol reading, incomplete CFI data; unspecified registers (e.g., t2) at
0x1203682f4.
During symbol reading, incomplete CFI data; unspecified registers (e.g., t3) at
0x1203682f4.
During symbol reading, incomplete CFI data; unspecified registers (e.g., t4) at
0x1203682f4.
During symbol reading, incomplete CFI data; unspecified registers (e.g., t5) at
0x1203682f4.
During symbol reading, incomplete CFI data; unspecified registers (e.g., t6) at
0x1203682f4.
During symbol reading, incomplete CFI data; unspecified registers (e.g., t7) at
0x1203682f4.
During symbol reading, incomplete CFI data; unspecified registers (e.g., a0) at
0x1203682f4.
During symbol reading, incomplete CFI data; unspecified registers (e.g., a1) at
0x1203682f4.
During symbol reading, incomplete CFI data; unspecified registers (e.g., a2) at
0x1203682f4.
During symbol reading, incomplete CFI data; unspecified registers (e.g., a3) at
0x1203682f4.
During symbol reading, incomplete CFI data; unspecified registers (e.g., a4) at
0x1203682f4.
During symbol reading, incomplete CFI data; unspecified registers (e.g., a5) at
0x1203682f4.
During symbol reading, incomplete CFI data; unspecified registers (e.g., t8) at
0x1203682f4.
During symbol reading, incomplete CFI data; unspecified registers (e.g., t9) at
0x1203682f4.
During symbol reading, incomplete CFI data; unspecified registers (e.g., t10) at
0x1203682f4.
During symbol reading, incomplete CFI data; unspecified registers (e.g., t11) at
0x1203682f4.
0x120547b00, flags=0) at /u1/toolchain/gcc/gcc/loop.c:6344
6344      rtx test_reg = gen_rtx_REG (word_mode, LAST_VIRTUAL_REGISTER + 1);
(gdb) t
[Current thread is 0 (process 9767)]
(gdb) where
#0  strength_reduce (loop=0x120547b00, flags=0)
    at /u1/toolchain/gcc/gcc/loop.c:6344
#1  0x000000012036df34 in loop_optimize (f=<value optimized out>, 
    dumpfile=<value optimized out>, flags=0)
    at /u1/toolchain/gcc/gcc/loop.c:1565
During symbol reading, incomplete CFI data; unspecified registers (e.g., v0) at
0x12036bd9c.
#2  0x00000001202dfc2c in rest_of_handle_loop_optimize ()
    at /u1/toolchain/gcc/gcc/passes.c:1111
#3  0x00000001202e1b04 in rest_of_compilation ()
    at /u1/toolchain/gcc/gcc/passes.c:1574
#4  0x000000012007b670 in execute_pass_list (pass=0x120473e58)
    at /u1/toolchain/gcc/gcc/tree-optimize.c:578
#5  0x000000012007bacc in tree_rest_of_compilation (fndecl=0x1608d11e0)
    at /u1/toolchain/gcc/gcc/tree-optimize.c:728
#6  0x000000012001242c in c_expand_body (fndecl=0x1608d11e0)
    at /u1/toolchain/gcc/gcc/c-decl.c:6411
#7  0x0000000120307c08 in cgraph_expand_function (node=0x1608da8f0)
    at /u1/toolchain/gcc/gcc/cgraphunit.c:924
#8  0x0000000120308924 in cgraph_optimize ()
    at /u1/toolchain/gcc/gcc/cgraphunit.c:988
#9  0x0000000120014bb8 in c_write_global_declarations ()
    at /u1/toolchain/gcc/gcc/c-decl.c:7395
#10 0x00000001202bc15c in toplev_main (argc=<value optimized out>, 
    argv=<value optimized out>) at /u1/toolchain/gcc/gcc/toplev.c:1013
#11 0x0000000120066bb8 in main (argc=<value optimized out>, 
    argv=<value optimized out>) at /u1/toolchain/gcc/gcc/main.c:35
Comment 1 matt 2005-05-01 22:18:07 UTC
Created attachment 8786 [details]
precompile source
Comment 2 matt 2005-05-01 23:05:31 UTC
4.1.0 was bootstrapping properly using the 20050409 experimental so this is a
relatively recent bug.
Comment 3 Andrew Pinski 2005-05-01 23:09:54 UTC
(In reply to comment #2)
> 4.1.0 was bootstrapping properly using the 20050409 experimental so this is a
> relatively recent bug.
Or a latent bug which showed up.
Comment 4 Richard Henderson 2005-05-18 06:09:37 UTC
Do you still reproduce this?  I suppose I've not bootstrapped with anything
other than alphaev67 in a while, so this might be an ev4 bug...
Comment 5 matt 2005-05-18 21:39:52 UTC
Subject: Re:  internal compiler error: Segmentation fault

rth at gcc dot gnu dot org wrote:
> ------- Additional Comments From rth at gcc dot gnu dot org  2005-05-18 06:09 -------
> Do you still reproduce this?  I suppose I've not bootstrapped with anything
> other than alphaev67 in a while, so this might be an ev4 bug...

Yep, it still happens.  This is on an XP1000.

./xgcc -B./ -B/usr/gcc/alpha--netbsd/bin/ -isystem 
/usr/gcc/alpha--netbsd/include -isystem /usr/gcc/alpha--netbsd/sys-include 
-L/u1/toolchain/alpha/gcc/gcc/../ld -O2  -DIN_GCC    -W -Wall -Wwrite-strings 
-Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition  -isystem 
./include  -fPIC -mieee -g  -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED  -I. -I. 
-I/u1/toolchain/gcc/gcc -I/u1/toolchain/gcc/gcc/. 
-I/u1/toolchain/gcc/gcc/../include -I./../intl 
-I/u1/toolchain/gcc/gcc/../libcpp/include  -DL_popcountsi2 -fvisibility=hidden 
-DHIDE_EXPORTS -c /u1/toolchain/gcc/gcc/libgcc2.c -o libgcc/./_popcountsi2.o
/u1/toolchain/gcc/gcc/libgcc2.c: In function '__popcountdi2':
/u1/toolchain/gcc/gcc/libgcc2.c:758: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.




Comment 6 Andrew Pinski 2006-02-28 13:32:46 UTC
This should be fixed for real on the mainline now since the removal of loop.c.
Comment 7 Falk Hueffner 2006-08-25 12:07:54 UTC
Can you still reproduce this? As Andrew points out, it is probably fixed...
Comment 8 Andrew Pinski 2006-11-24 02:00:46 UTC
No feedback in over 3 months so closing.