This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libstdc++/14579] New: [tree-ssa regression] miscompiles POOMA testcase
- From: "rguenth at tat dot physik dot uni-tuebingen dot de" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 15 Mar 2004 12:48:35 -0000
- Subject: [Bug libstdc++/14579] New: [tree-ssa regression] miscompiles POOMA testcase
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
The tramp3d-v2 testcase (attachment see PR14408) gets miscompiled by tree-ssa.
Compiling with
g++-ssa -O0 -o tramp3d-v2 tramp3d-v2.cpp -Dleafify=fooblah -static
the testcase segfaults on start with gdb backtrace:
(gdb) run
Starting program: /tmp/tramp3d-v2
Program received signal SIGSEGV, Segmentation fault.
0x0808e345 in __gnu_cxx::__mt_alloc<Loc<1> >::allocate(unsigned, void const*) (
this=0xbfffe978, __n=0)
at
/net/bellatrix/home/rguenth/ix86/gccssa-150304/bin/../lib/gcc/i686-pc-linux-gnu/3.5-tree-ssa/../../../../include/c++/3.5-tree-ssa/ext/mt_allocator.h:408
408 block->next = (block_record*)((char*)block +
(gdb) bt
#0 0x0808e345 in __gnu_cxx::__mt_alloc<Loc<1> >::allocate(unsigned, void const*) (
this=0xbfffe978, __n=0)
at
/net/bellatrix/home/rguenth/ix86/gccssa-150304/bin/../lib/gcc/i686-pc-linux-gnu/3.5-tree-ssa/../../../../include/c++/3.5-tree-ssa/ext/mt_allocator.h:408
#1 0x0807db6c in __gnu_norm::_Vector_base<Loc<1>, std::allocator<Loc<1> >
>::_M_allocate(unsigned) (this=0xbfffe978, __n=0)
at
/net/bellatrix/home/rguenth/ix86/gccssa-150304/bin/../lib/gcc/i686-pc-linux-gnu/3.5-tree-ssa/../../../../include/c++/3.5-tree-ssa/bits/stl_vector.h:106
#2 0x080701fc in _Vector_base (this=0xbfffe978, __n=0, __a=@0xbfffe800)
at
/net/bellatrix/home/rguenth/ix86/gccssa-150304/bin/../lib/gcc/i686-pc-linux-gnu/3.5-tree-ssa/../../../../include/c++/3.5-tree-ssa/bits/stl_vector.h:91
#3 0x0807c704 in vector (this=0xbfffe978, __n=0)
at
/net/bellatrix/home/rguenth/ix86/gccssa-150304/bin/../lib/gcc/i686-pc-linux-gnu/3.5-tree-ssa/../../../../include/c++/3.5-tree-ssa/bits/stl_vector.h:202
#4 0x0806e605 in Centering (this=0xbfffe970, cent=CellType, cont=Continuous)
at tramp3d-v2.cpp:5599
#5 0x08059cad in CanonicalCentering (this=0x8148cc1) at tramp3d-v2.cpp:5817
#6 0x0805673d in __static_initialization_and_destruction_0 (__initialize_p=1,
__priority=65535) at tramp3d-v2.cpp:6056
#7 0x08057eb4 in _GLOBAL__I__Z22findLeftCommonEndpointiiiiiiRi () at
tramp3d-v2.cpp:56688
#8 0x081421c5 in __do_global_ctors_aux ()
#9 0x08049459 in _init ()
#10 0x0814213c in __libc_csu_init () at elf-init.c:60
#11 0x4013b88f in __libc_start_main () from /lib/libc.so.6
(gdb) print block
$3 = (block_record *) 0x814affe
(gdb) print *block
Cannot access memory at address 0x814affe
This is a regression from at least (works)
g++ (GCC) 3.5-tree-ssa 20040303 (merged 20040227)
occuring no later than (fails)
g++ (GCC) 3.5-tree-ssa 20040311 (merged 20040307)
(I don't have intermediate versions to check)
and still with (fails)
g++-ssa (GCC) 3.5-tree-ssa 20040315 (merged 20040307)
I don't know if this is really libstdc++ or rather optimization (but -O0), also
I didn't check mainline, but
2004-03-08 Benjamin Kosnik <bkoz@redhat.com>
* include/bits/allocator.h: Switch defaults to mt_alloc.
2004-03-06 Benjamin Kosnik <bkoz@redhat.com>
* include/ext/mt_allocator.h (_S_initialize): If
!__GTHREAD_MUTEX_INIT, then initialize _S_thread_freelist_mutex.
2004-03-06 Benjamin Kosnik <bkoz@redhat.com>
PR libstdc++/12658
* src/locale_init.cc (locale::locale): Lock critical regions with
external mutexes.
(locale::global): Same.
* include/bits/concurrence.h (__glibcxx_mutex_define_initialized):
Add in once bits for cases without __GTHREAD_MUTEX_INIT.
(__glibcxx_mutex_lock): Same.
* config/cpu/generic/atomicity.h: Remove
_GLIBCXX_NEED_GENERIC_MUTEX, use concurrence.h.
* src/misc-inst.cc: Move all locking bits out of this file.
* config/os/hpux/os_defines.h: Remove _GLIBCXX_INST_ATOMICITY_LOCK.
* src/misc-inst.cc: Same.
* config/cpu/hppa/atomicity.h: Same.
* config/linker-map.gnu: Remove types in the signature of atomic
exports, as they may vary.
look related (so bkoz@ CCed).
--
Summary: [tree-ssa regression] miscompiles POOMA testcase
Product: gcc
Version: tree-ssa
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: libstdc++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: rguenth at tat dot physik dot uni-tuebingen dot de
CC: bkoz at redhat dot com,gcc-bugs at gcc dot gnu dot org
GCC build triplet: i686-pc-linux-gnu
GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14579