i was trying to upgrade GCC on my gentoo box:

---------- CODE ----------
localhost linux # emerge gcc -pvt

These are the packages that I would merge, in reverse order:

Calculating dependencies ...done!
[ebuild  NS   ] sys-devel/gcc-4.1.0_beta20050902  (-altivec) -bootstrap -build -
fortran -gcj -gtk -hardened -ip28 (-multilib) -multislot (-n32) (-n64) +nls -
nocxx -objc -static +vanilla 0 kB
---------- /CODE ----------

compiler segfaults:

---------- CODE ----------
(...)
gcc -c   -O -DENABLE_CHECKING -DENABLE_ASSERT_CHECKING -DIN_GCC   -W -Wall -
Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -
Wmissing-format-attribute    -DHAVE_CONFIG_H -I. -I. -I/var/tmp/portage/gcc-4.1.
0_beta20050902/work/gcc-4.1-20050902/gcc -I/var/tmp/portage/gcc-4.1.
0_beta20050902/work/gcc-4.1-20050902/gcc/. -I/var/tmp/portage/gcc-4.1.
0_beta20050902/work/gcc-4.1-20050902/gcc/../include -I/var/tmp/portage/gcc-4.1.
0_beta20050902/work/gcc-4.1-20050902/gcc/../libcpp/include     /var/tmp/portage/
gcc-4.1.0_beta20050902/work/gcc-4.1-20050902/gcc/haifa-sched.c -o haifa-sched.o
gcc -c   -O -DENABLE_CHECKING -DENABLE_ASSERT_CHECKING -DIN_GCC   -W -Wall -
Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -
Wmissing-format-attribute    -DHAVE_CONFIG_H -I. -I. -I/var/tmp/portage/gcc-4.1.
0_beta20050902/work/gcc-4.1-20050902/gcc -I/var/tmp/portage/gcc-4.1.
0_beta20050902/work/gcc-4.1-20050902/gcc/. -I/var/tmp/portage/gcc-4.1.
0_beta20050902/work/gcc-4.1-20050902/gcc/../include -I/var/tmp/portage/gcc-4.1.
0_beta20050902/work/gcc-4.1-20050902/gcc/../libcpp/include     /var/tmp/portage/
gcc-4.1.0_beta20050902/work/gcc-4.1-20050902/gcc/hooks.c -o hooks.o
gcc -c   -O -DENABLE_CHECKING -DENABLE_ASSERT_CHECKING -DIN_GCC   -W -Wall -
Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -
Wmissing-format-attribute    -DHAVE_CONFIG_H -I. -I. -I/var/tmp/portage/gcc-4.1.
0_beta20050902/work/gcc-4.1-20050902/gcc -I/var/tmp/portage/gcc-4.1.
0_beta20050902/work/gcc-4.1-20050902/gcc/. -I/var/tmp/portage/gcc-4.1.
0_beta20050902/work/gcc-4.1-20050902/gcc/../include -I/var/tmp/portage/gcc-4.1.
0_beta20050902/work/gcc-4.1-20050902/gcc/../libcpp/include     /var/tmp/portage/
gcc-4.1.0_beta20050902/work/gcc-4.1-20050902/gcc/ifcvt.c -o ifcvt.o
gcc -c   -O -DENABLE_CHECKING -DENABLE_ASSERT_CHECKING -DIN_GCC   -W -Wall -
Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -
Wmissing-format-attribute    -DHAVE_CONFIG_H -DGENERATOR_FILE -I. -Ibuild -I/
var/tmp/portage/gcc-4.1.0_beta20050902/work/gcc-4.1-20050902/gcc -I/var/tmp/
portage/gcc-4.1.0_beta20050902/work/gcc-4.1-20050902/gcc/build -I/var/tmp/
portage/gcc-4.1.0_beta20050902/work/gcc-4.1-20050902/gcc/../include -I/var/tmp/
portage/gcc-4.1.0_beta20050902/work/gcc-4.1-20050902/gcc/../libcpp/include     -
o build/genattrtab.o /var/tmp/portage/gcc-4.1.0_beta20050902/work/gcc-4.1-
20050902/gcc/genattrtab.c
gcc -c   -O -DENABLE_CHECKING -DENABLE_ASSERT_CHECKING -DIN_GCC   -W -Wall -
Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -
Wmissing-format-attribute    -DHAVE_CONFIG_H -DGENERATOR_FILE -I. -Ibuild -I/
var/tmp/portage/gcc-4.1.0_beta20050902/work/gcc-4.1-20050902/gcc -I/var/tmp/
portage/gcc-4.1.0_beta20050902/work/gcc-4.1-20050902/gcc/build -I/var/tmp/
portage/gcc-4.1.0_beta20050902/work/gcc-4.1-20050902/gcc/../include -I/var/tmp/
portage/gcc-4.1.0_beta20050902/work/gcc-4.1-20050902/gcc/../libcpp/include     -
o build/genautomata.o /var/tmp/portage/gcc-4.1.0_beta20050902/work/gcc-4.1-
20050902/gcc/genautomata.c
gcc -c   -O -DENABLE_CHECKING -DENABLE_ASSERT_CHECKING -DIN_GCC   -W -Wall -
Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -
Wmissing-format-attribute    -DHAVE_CONFIG_H -DGENERATOR_FILE -I. -Ibuild -I/
var/tmp/portage/gcc-4.1.0_beta20050902/work/gcc-4.1-20050902/gcc -I/var/tmp/
portage/gcc-4.1.0_beta20050902/work/gcc-4.1-20050902/gcc/build -I/var/tmp/
portage/gcc-4.1.0_beta20050902/work/gcc-4.1-20050902/gcc/../include -I/var/tmp/
portage/gcc-4.1.0_beta20050902/work/gcc-4.1-20050902/gcc/../libcpp/include     -
o build/varray.o /var/tmp/portage/gcc-4.1.0_beta20050902/work/gcc-4.1-20050902/
gcc/varray.c
gcc   -O -DENABLE_CHECKING -DENABLE_ASSERT_CHECKING -DIN_GCC   -W -Wall -Wwrite-
strings -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -
Wmissing-format-attribute    -DHAVE_CONFIG_H -DGENERATOR_FILE  -o build/
genattrtab \
 build/genattrtab.o build/genautomata.o \
 build/rtl.o build/read-rtl.o build/ggc-none.o build/min-insn-modes.o build/
gensupport.o build/insn-conditions.o build/print-rtl.o build/errors.o \
 build/varray.o ../build-x86_64-pc-linux-gnu/libiberty/libiberty.a -lm
build/genattrtab /var/tmp/portage/gcc-4.1.0_beta20050902/work/gcc-4.1-20050902/
gcc/config/i386/i386.md > tmp-attrtab.c

Automaton `pentium'
       48 NDFA states,            138 NDFA arcs
       48 DFA states,             138 DFA arcs
       20 minimal DFA states,      82 minimal DFA arcs
      273 all insns         17 insn equivalence classes
   88 transition comb vector els,   340 trans table els: use comb vect
   88 state alts comb vector els,   340 state alts table els: use comb vect
  340 min delay table els, compression factor 2

Automaton `pentium_fpu'
       80 NDFA states,            172 NDFA arcs
       80 DFA states,             172 DFA arcs
       75 minimal DFA states,     162 minimal DFA arcs
      273 all insns          8 insn equivalence classes
  164 transition comb vector els,   600 trans table els: use comb vect
  164 state alts comb vector els,   600 state alts table els: use comb vect
  600 min delay table els, compression factor 1

Automaton `ppro_decoder'
        4 NDFA states,             12 NDFA arcs
        4 DFA states,              12 DFA arcs
        4 minimal DFA states,      12 minimal DFA arcs
      273 all insns          4 insn equivalence classes
   13 transition comb vector els,    16 trans table els: use simple vect
   13 state alts comb vector els,    16 state alts table els: use simple vect
   16 min delay table els, compression factor 8

Automaton `ppro_core'
      105 NDFA states,            376 NDFA arcs
      105 DFA states,             376 DFA arcs
      105 minimal DFA states,     376 minimal DFA arcs
      273 all insns         13 insn equivalence classes
  481 transition comb vector els,  1365 trans table els: use comb vect
  481 state alts comb vector els,  1365 state alts table els: use comb vect
 1365 min delay table els, compression factor 1

Automaton `ppro_idiv'
       38 NDFA states,             79 NDFA arcs
       38 DFA states,              79 DFA arcs
       38 minimal DFA states,      79 minimal DFA arcs
      273 all insns          5 insn equivalence classes
   82 transition comb vector els,   190 trans table els: use simple vect
   82 state alts comb vector els,   190 state alts table els: use simple vect
  190 min delay table els, compression factor 1

Automaton `ppro_fdiv'
       38 NDFA states,             79 NDFA arcs
       38 DFA states,              79 DFA arcs
       38 minimal DFA states,      79 minimal DFA arcs
      273 all insns          5 insn equivalence classes
   82 transition comb vector els,   190 trans table els: use simple vect
   82 state alts comb vector els,   190 state alts table els: use simple vect
  190 min delay table els, compression factor 1

Automaton `ppro_load'
        3 NDFA states,              8 NDFA arcs
        3 DFA states,               8 DFA arcs
        3 minimal DFA states,       8 minimal DFA arcs
      273 all insns          4 insn equivalence classes
    9 transition comb vector els,    12 trans table els: use simple vect
    9 state alts comb vector els,    12 state alts table els: use simple vect
   12 min delay table els, compression factor 4

Automaton `ppro_store'
       16 NDFA states,             56 NDFA arcs
       16 DFA states,              56 DFA arcs
       11 minimal DFA states,      44 minimal DFA arcs
      273 all insns          7 insn equivalence classes
   51 transition comb vector els,    77 trans table els: use simple vect
   51 state alts comb vector els,    77 state alts table els: use simple vect
   77 min delay table els, compression factor 4

Automaton `k6_decoder'
        4 NDFA states,             11 NDFA arcs
        4 DFA states,              11 DFA arcs
        3 minimal DFA states,       9 minimal DFA arcs
      273 all insns          4 insn equivalence classes
   10 transition comb vector els,    12 trans table els: use simple vect
   10 state alts comb vector els,    12 state alts table els: use simple vect
   12 min delay table els, compression factor 8

Automaton `k6_load_unit'
       11 NDFA states,             24 NDFA arcs
       11 DFA states,              24 DFA arcs
       11 minimal DFA states,      24 minimal DFA arcs
      273 all insns          4 insn equivalence classes
   26 transition comb vector els,    44 trans table els: use simple vect
   26 state alts comb vector els,    44 state alts table els: use simple vect
   44 min delay table els, compression factor 2

Automaton `k6_store_unit'
       68 NDFA states,            233 NDFA arcs
       68 DFA states,             233 DFA arcs
       37 minimal DFA states,     126 minimal DFA arcs
      273 all insns          6 insn equivalence classes
  140 transition comb vector els,   222 trans table els: use simple vect
  140 state alts comb vector els,   222 state alts table els: use simple vect
  222 min delay table els, compression factor 1

Automaton `k6_integer_units'
      114 NDFA states,            396 NDFA arcs
      114 DFA states,             396 DFA arcs
      114 minimal DFA states,     396 minimal DFA arcs
      273 all insns         11 insn equivalence classes
  471 transition comb vector els,  1254 trans table els: use comb vect
  471 state alts comb vector els,  1254 state alts table els: use comb vect
 1254 min delay table els, compression factor 1

Automaton `k6_fpu_unit'
       58 NDFA states,            120 NDFA arcs
       58 DFA states,             120 DFA arcs
       57 minimal DFA states,     118 minimal DFA arcs
      273 all insns          5 insn equivalence classes
  120 transition comb vector els,   285 trans table els: use simple vect
  120 state alts comb vector els,   285 state alts table els: use simple vect
  285 min delay table els, compression factor 1

Automaton `k6_branch_unit'
        2 NDFA states,              5 NDFA arcs
        2 DFA states,               5 DFA arcs
        2 minimal DFA states,       5 minimal DFA arcs
      273 all insns          3 insn equivalence classes
    6 transition comb vector els,     6 trans table els: use simple vect
    6 state alts comb vector els,     6 state alts table els: use simple vect
    6 min delay table els, compression factor 8

Automaton `athlon'
      518 NDFA states,           1668 NDFA arcs
      518 DFA states,            1668 DFA arcs
       76 minimal DFA states,     328 minimal DFA arcs
      273 all insns         10 insn equivalence classes
  359 transition comb vector els,   760 trans table els: use simple vect
  359 state alts comb vector els,   760 state alts table els: use simple vect
  760 min delay table els, compression factor 2

Automaton `athlon_load'
      162 NDFA states,            855 NDFA arcs
      162 DFA states,             855 DFA arcs
      162 minimal DFA states,     855 minimal DFA arcs
      273 all insns         10 insn equivalence classes
 1047 transition comb vector els,  1620 trans table els: use simple vect
 1047 state alts comb vector els,  1620 state alts table els: use simple vect
 1620 min delay table els, compression factor 2

Automaton `athlon_mult'
       16 NDFA states,             48 NDFA arcs
       16 DFA states,              48 DFA arcs
       16 minimal DFA states,      48 minimal DFA arcs
      273 all insns          4 insn equivalence classes
   50 transition comb vector els,    64 trans table els: use simple vect
   50 state alts comb vector els,    64 state alts table els: use simple vect
   64 min delay table els, compression factor 2

Automaton `athlon_fp'
    15522 NDFA states,          99908 NDFA arcs
    15522 DFA states,           99908 DFA arcs
      463 minimal DFA states,    3038 minimal DFA arcs
      273 all insns         21 insn equivalence classes
 3057 transition comb vector els,  9723 trans table els: use comb vect
 3057 state alts comb vector els,  9723 state alts table els: use comb vect
 9723 min delay table els, compression factor 1

17533 all allocated states,     102661 all allocated arcs
32710 all allocated alternative states
 6256 all transition comb vector els, 16780 all trans table els
 6256 all state alts comb vector els, 16780 all state alts table els
16780 all min delay table els
    0 locked states num

  transformation: 0.007999, building DFA: 4.583302
  DFA minimization: 0.327951, making insn equivalence: 0.000000
 all automaton generation: 5.019238, output: 0.047992
/bin/sh /var/tmp/portage/gcc-4.1.0_beta20050902/work/gcc-4.1-20050902/gcc/../
move-if-change tmp-attrtab.c insn-attrtab.c
echo timestamp > s-attrtab
gcc   -O -DENABLE_CHECKING -DENABLE_ASSERT_CHECKING -DIN_GCC   -W -Wall -Wwrite-
strings -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -
Wmissing-format-attribute    -DHAVE_CONFIG_H -I. -I. -I/var/tmp/portage/gcc-4.1.
0_beta20050902/work/gcc-4.1-20050902/gcc -I/var/tmp/portage/gcc-4.1.
0_beta20050902/work/gcc-4.1-20050902/gcc/. -I/var/tmp/portage/gcc-4.1.
0_beta20050902/work/gcc-4.1-20050902/gcc/../include -I/var/tmp/portage/gcc-4.1.
0_beta20050902/work/gcc-4.1-20050902/gcc/../libcpp/include     -c 
insn-attrtab.c 
\
  -o insn-attrtab.o
/var/tmp/portage/gcc-4.1.0_beta20050902/work/gcc-4.1-20050902/gcc/config/i386/
i386.md: In function `insn_default_latency':
/var/tmp/portage/gcc-4.1.0_beta20050902/work/gcc-4.1-20050902/gcc/config/i386/
i386.md:198: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://bugs.gentoo.org/> for instructions.
Preprocessed source stored into /var/tmp/portage/gcc-4.1.0_beta20050902/temp/
ccW6iB33.out file, please attach this to your bugreport.
make[2]: *** [insn-attrtab.o] Error 1
make[2]: Leaving directory `/var/tmp/portage/gcc-4.1.0_beta20050902/work/build/
gcc'
make[1]: *** [stage1_build] Error 2
make[1]: Leaving directory `/var/tmp/portage/gcc-4.1.0_beta20050902/work/build/
gcc'
make: *** [profiledbootstrap] Error 2

!!! ERROR: sys-devel/gcc-4.1.0_beta20050902 failed.
!!! Function gcc_do_make, Line 1214, Exitcode 2
!!! emake failed with profiledbootstrap
!!! If you need support, post the topmost build error, NOT this status message.

localhost linux #                                                               
 
---------- /CODE ----------

compiling 3.4.4 gives exactly the same error.

more info:

---------- CODE ----------
localhost linux # uname -a
Linux localhost 2.6.13-gentoo #3 Mon Sep 5 03:35:39 CEST 2005 x86_64 AMD 
Athlon(tm) 64 Processor 3000+ AuthenticAMD GNU/Linux
---------- /CODE ----------

---------- CODE ----------
localhost linux # gcc-config -l
[1] x86_64-pc-linux-gnu-3.4.3 *
[2] x86_64-pc-linux-gnu-3.4.3-hardened
[3] x86_64-pc-linux-gnu-3.4.3-hardenednopie
[4] x86_64-pc-linux-gnu-3.4.3-hardenednopiessp
[5] x86_64-pc-linux-gnu-3.4.3-hardenednossp
---------- /CODE ----------

---------- CODE ----------
localhost linux # cat /proc/cpuinfo
processor       : 0
vendor_id       : AuthenticAMD
cpu family      : 15
model           : 47
model name      : AMD Athlon(tm) 64 Processor 3000+
stepping        : 0
cpu MHz         : 2792.309
cache size      : 512 KB
fpu             : yes
fpu_exception   : yes
cpuid level     : 1
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov 
pat pse36 clflush mmx fxsr sse sse2 syscall nx mmxext fxsr_opt lm 3dnowext 
3dnow 
pni lahf_lm
bogomips        : 5588.33
TLB size        : 1024 4K pages
clflush size    : 64
cache_alignment : 64
address sizes   : 40 bits physical, 48 bits virtual
power management: ts fid vid ttp tm stc
---------- /CODE ----------

---------- CODE ----------
localhost linux # cat /proc/meminfo
MemTotal:      1027716 kB
MemFree:         79972 kB
Buffers:         42140 kB
Cached:         619992 kB
SwapCached:        480 kB
Active:         486844 kB
Inactive:       363036 kB
HighTotal:           0 kB
HighFree:            0 kB
LowTotal:      1027716 kB
LowFree:         79972 kB
SwapTotal:      947752 kB
SwapFree:       947272 kB
Dirty:              40 kB
Writeback:           0 kB
Mapped:         258740 kB
Slab:            81588 kB
CommitLimit:   1461608 kB
Committed_AS:   247260 kB
PageTables:       4724 kB
VmallocTotal: 34359738367 kB
VmallocUsed:     34364 kB
VmallocChunk: 34359698427 kB
---------- /CODE ----------

CFLAGS=CXXFLAGS="-march=k8 -mtune=k8 -Os -s -pipe -fomit-frame-pointer"
i've tried every -O levels, removing -s, removing -pipe, removing -fomit-frame-
pointer, still the same error

hardware is OK. over 30 passes of the newest memtest86+ without errors. 
partitions (ext3) checked for inconsistency twice. CPU/RAM underclocked by 30% 
to be sure (overclocked to 155% of nominal power gives the same error).

moreover this SegFault can sometimes screw the whole system - almost every user 
action results in segfault after that error.

-- 
           Summary: Segfault 3.4.3->3.4.4/4.1.0-beta in insn_default_latency
           Product: gcc
           Version: 3.4.3
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: spamfuckers at wp dot pl
                CC: gcc-bugs at gcc dot gnu dot org


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

Reply via email to