Occurs while compiling glibc-2.7-20080428 with gcc-4.4-20080411 while building
the shared object for malloc.c. gcc-4.2.3 works with the identical setup.
$ gcc-4.4-20080411 -v
Using built-in specs.
Target: i686-pc-linux-gnu
Configured with: ../gcc-4.4-20080411/configure --prefix=/system/devel
--program-suffix=-4.4-20080411 --enable-shared --enable-static
--with-system-zlib --enable-languages=c,c++ --enable-decimal-float --enable-tls
Thread model: posix
gcc version 4.4.0 20080411 (experimental) (GCC)
../glibc-2.7-20080428/configure --prefix=/system/libs --with-tls
--enable-shared --enable-static
$CC = /system/devel/bin/gcc-4.4-20080411 -march=pentium
-mno-tls-direct-seg-refs
$CFLAGS = -O2
Compiler output:
/system/devel/bin/gcc-4.4-20080411 -march=pentium -mno-tls-direct-seg-refs
malloc.c -c -std=gnu99 -fgnu89-inline -O2 -Wall -Winline -Wwrit
e-strings -fmerge-all-constants -Wstrict-prototypes
-mpreferred-stack-boundary=2 -fPIC -DMORECORE_CLEARS=2 -I../include
-I/usr/src/libs
/glibc/build-glibc-2.7-2008048-borken/malloc
-I/usr/src/libs/glibc/build-glibc-2.7-2008048-borken -I../sysdeps/i386/elf
-I../nptl/sysdeps/
unix/sysv/linux/i386/i686 -I../nptl/sysdeps/unix/sysv/linux/i386
-I../sysdeps/unix/sysv/linux/i386 -I../nptl/sysdeps/unix/sysv/linux -I../
nptl/sysdeps/pthread -I../sysdeps/pthread -I../sysdeps/unix/sysv/linux
-I../sysdeps/gnu -I../sysdeps/unix/common -I../sysdeps/unix/mman -I
../sysdeps/unix/inet -I../sysdeps/unix/sysv/i386 -I../nptl/sysdeps/unix/sysv
-I../sysdeps/unix/sysv -I../sysdeps/unix/i386 -I../nptl/sysde
ps/unix -I../sysdeps/unix -I../sysdeps/posix -I../sysdeps/i386/i686/fpu
-I../nptl/sysdeps/i386/i686 -I../sysdeps/i386/i686 -I../sysdeps/i3
86/i486 -I../nptl/sysdeps/i386/i486 -I../sysdeps/i386/fpu
-I../nptl/sysdeps/i386 -I../sysdeps/i386 -I../sysdeps/wordsize-32
-I../sysdeps/i
eee754/ldbl-96 -I../sysdeps/ieee754/dbl-64 -I../sysdeps/ieee754/flt-32
-I../sysdeps/ieee754 -I../sysdeps/generic/elf -I../sysdeps/generic
-I../nptl -I.. -I../libio -I. -I /lib/modules/2.6.22.6/build/include
-D_LIBC_REENTRANT -include ../include/libc-symbols.h -DPIC -DSHARED
-o /usr/src/libs/glibc/build-glibc-2.7-2008048-borken/malloc/malloc.os -MD
-MP -MF /usr/src/libs/glibc/build-glibc-2.7-2008048-borken
/malloc/malloc.os.dt -MT
/usr/src/libs/glibc/build-glibc-2.7-2008048-borken/malloc/malloc.os
malloc.c: In function 'mALLOPt':
malloc.c:5731: error: invalid rtl sharing found in the insn
(insn 131 128 136 24 malloc.c:5729 (parallel [
(set (mem/s/c:SI (plus:SI (reg:SI 3 bx)
(const:SI (unspec:SI [
(symbol_ref:SI ("main_arena") [flags 0x2]
<var_decl 0x40660d10 main_arena>)
] 1))) [3 main_arena.mutex+0 S4 A256])
(asm_operands/v:SI ("cmpl $0, %%gs:%P3
je 0f
lock
0: subl $1,%0
jne _L_unlock_%=
.subsection 1
.type _L_unlock_%=,@function
_L_unlock_%=:
1: leal %0, %%eax
2: call __lll_unlock_wake_private
3: jmp 18f
4: .size _L_unlock_%=, 4b-1b
.previous
.section .eh_frame,"a",@progbits
5: .long 7f-6f # Length of Common Information Entry
6: .long 0x0 # CIE Identifier Tag
.byte 0x1 # CIE Version
.ascii "zR\0" # CIE Augmentation
.uleb128 0x1 # CIE Code Alignment Factor
.sleb128 -4 # CIE Data Alignment Factor
.byte 0x8 # CIE RA Column
.uleb128 0x1 # Augmentation size
.byte 0x1b # FDE Encoding (pcrel sdata4)
.byte 0xc # DW_CFA_def_cfa
.uleb128 0x4
.uleb128 0x0
.align 4
7: .long 17f-8f # FDE Length
8: .long 8b-5b # FDE CIE offset
.long 1b-. # FDE initial location
.long 4b-1b # FDE address range
.uleb128 0x0 # Augmentation size
.byte 0x16 # DW_CFA_val_expression
.uleb128 0x8
.uleb128 10f-9f
9: .byte 0x78 # DW_OP_breg8
.sleb128 3b-1b
10: .byte 0x40 + (2b-1b) # DW_CFA_advance_loc
.byte 0x16 # DW_CFA_val_expression
.uleb128 0x8
.uleb128 12f-11f
11: .byte 0x78 # DW_OP_breg8
.sleb128 3b-2b
12: .byte 0x40 + (3b-2b-1) # DW_CFA_advance_loc
.byte 0x16 # DW_CFA_val_expression
.uleb128 0x8
.uleb128 16f-13f
13: .byte 0x78 # DW_OP_breg8
.sleb128 15f-14f
.byte 0x0d # DW_OP_const4s
14: .4byte 3b-.
.byte 0x1c # DW_OP_minus
.byte 0x0d # DW_OP_const4s
15: .4byte 18f-.
.byte 0x22 # DW_OP_plus
16: .align 4
17: .previous
18:") ("=m") 0 [
(mem/s/c:SI (plus:SI (reg:SI 3 bx)
(const:SI (unspec:SI [
(symbol_ref:SI ("main_arena")
[flags 0x2] <var_decl 0x40660d10 main_arena>)
] 1))) [3 main_arena.mutex+0 S4 A256])
(const_int 12 [0xc])
]
[
(asm_input:SI ("m") 0)
(asm_input:SI ("i") 0)
] 7224179))
(set (reg/v:SI 59 [ ignore ])
(asm_operands/v:SI ("cmpl $0, %%gs:%P3
je 0f
lock
0: subl $1,%0
jne _L_unlock_%=
.subsection 1
.type _L_unlock_%=,@function
_L_unlock_%=:
1: leal %0, %%eax
2: call __lll_unlock_wake_private
3: jmp 18f
4: .size _L_unlock_%=, 4b-1b
.previous
.section .eh_frame,"a",@progbits
5: .long 7f-6f # Length of Common Information Entry
6: .long 0x0 # CIE Identifier Tag
.byte 0x1 # CIE Version
.ascii "zR\0" # CIE Augmentation
.uleb128 0x1 # CIE Code Alignment Factor
.sleb128 -4 # CIE Data Alignment Factor
.byte 0x8 # CIE RA Column
.uleb128 0x1 # Augmentation size
.byte 0x1b # FDE Encoding (pcrel sdata4)
.byte 0xc # DW_CFA_def_cfa
.uleb128 0x4
.uleb128 0x0
.align 4
7: .long 17f-8f # FDE Length
8: .long 8b-5b # FDE CIE offset
.long 1b-. # FDE initial location
.long 4b-1b # FDE address range
.uleb128 0x0 # Augmentation size
.byte 0x16 # DW_CFA_val_expression
.uleb128 0x8
.uleb128 10f-9f
9: .byte 0x78 # DW_OP_breg8
.sleb128 3b-1b
10: .byte 0x40 + (2b-1b) # DW_CFA_advance_loc
.byte 0x16 # DW_CFA_val_expression
.uleb128 0x8
.uleb128 12f-11f
11: .byte 0x78 # DW_OP_breg8
.sleb128 3b-2b
12: .byte 0x40 + (3b-2b-1) # DW_CFA_advance_loc
.byte 0x16 # DW_CFA_val_expression
.uleb128 0x8
.uleb128 16f-13f
13: .byte 0x78 # DW_OP_breg8
.sleb128 15f-14f
.byte 0x0d # DW_OP_const4s
14: .4byte 3b-.
.byte 0x1c # DW_OP_minus
.byte 0x0d # DW_OP_const4s
15: .4byte 18f-.
.byte 0x22 # DW_OP_plus
16: .align 4
17: .previous
18:") ("=&a") 1 [
(mem/s/c:SI (plus:SI (reg:SI 3 bx)
(const:SI (unspec:SI [
(symbol_ref:SI ("main_arena")
[flags 0x2] <var_decl 0x40660d10 main_arena>)
] 1))) [3 main_arena.mutex+0 S4 A256])
(const_int 12 [0xc])
]
[
(asm_input:SI ("m") 0)
(asm_input:SI ("i") 0)
] 7224179))
(clobber (reg:QI 18 fpsr))
(clobber (reg:QI 17 flags))
(clobber (mem:BLK (scratch) [0 A8]))
]) -1 (expr_list:REG_UNUSED (reg/v:SI 59 [ ignore ])
(expr_list:REG_UNUSED (reg:QI 18 fpsr)
(expr_list:REG_UNUSED (reg:QI 17 flags)
(nil)))))
malloc.c:5731: error: shared rtx
(const:SI (unspec:SI [
(symbol_ref:SI ("main_arena") [flags 0x2] <var_decl 0x40660d10
main_arena>)
] 1))
malloc.c:5731: internal compiler error: internal consistency failure
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.
make[2]: ***
[/usr/src/libs/glibc/build-glibc-2.7-2008048-borken/malloc/malloc.os] Error 1
make[2]: Leaving directory `/usr/src/libs/glibc/glibc-2.7-20080428/malloc'
make[1]: *** [malloc/subdir_lib] Error 2
make[1]: Leaving directory `/usr/src/libs/glibc/glibc-2.7-20080428'
make: *** [all] Error 2
--
Summary: gcc-4.4-regression: invalid rtl sharing found in the
insn
Product: gcc
Version: 4.4.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: steve49152 at yahoo dot ca
GCC host triplet: i686-pc-linux-gnu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36092