public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libstdc++/44045]  New: initialization of array of shared_ptr's with initializer list causes compiler segfault
@ 2010-05-08 23:06 lynczu at gmail dot com
  2010-05-08 23:15 ` [Bug c++/44045] " paolo dot carlini at oracle dot com
                   ` (10 more replies)
  0 siblings, 11 replies; 13+ messages in thread
From: lynczu at gmail dot com @ 2010-05-08 23:06 UTC (permalink / raw)
  To: gcc-bugs

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 3372 bytes --]

I was able to reproduce this problem with gcc-4.4.4 on x86_64 (Exherbo) and
gcc-4.5.0 on x86 (Arch Linux 2009.08). Just to be honest I'm not quite sure, if
the code used to build this testcase if valid C++, but it seems to me that
there is some issue with initializing array of shared_ptr's with initializer
list (or throwing an error if it's not valid). It works when I use std::array
instead of C-like array for storing these shared_ptr's. Here's the output from
gcc-4.4.4:

Using built-in specs.
Target: x86_64-pc-linux-gnu
Configured with:
/var/tmp/paludis/build/sys-devel-gcc-4.4.4/work/gcc-4.4.4/configure
--prefix=/usr --host=x86_64-pc-linux-gnu --build=x86_64-pc-linux-gnu
--mandir=/usr/share/man --infodir=/usr/share/info --datadir=/usr/share
--sysconfdir=/etc --localstatedir=/var/lib --disable-dependency-tracking
--disable-silent-rules --enable-fast-install --libdir=/usr/lib64
--enable-multilib --libdir=/usr/lib64 --enable-languages=c++,objc,obj-c++,java
--enable-libstdcxx-pch=yes --enable-nls --program-suffix=-4.4
--with-pkgversion='exherbo gcc-4.4.4' --with-cloog --with-ppl
--with-system-zlib --enable-libgomp --disable-libssp
Thread model: posix
gcc version 4.4.4 (exherbo gcc-4.4.4) 
COLLECT_GCC_OPTIONS='-std=c++0x' '-Wall' '-save-temps' '-v' '-o' 'gcc_bugoo'
'-shared-libgcc' '-mtune=generic'
 /usr/libexec/gcc/x86_64-pc-linux-gnu/4.4.4/cc1plus -E -quiet -v -D_GNU_SOURCE
gcc_bug.cc -mtune=generic -std=c++0x -Wall -fpch-preprocess -o gcc_bug.ii
ignoring nonexistent directory "/usr/local/include"
ignoring nonexistent directory
"/usr/lib64/gcc/x86_64-pc-linux-gnu/4.4.4/../../../../x86_64-pc-linux-gnu/include"
#include "..." search starts here:
#include <...> search starts here:
 /usr/lib64/gcc/x86_64-pc-linux-gnu/4.4.4/../../../../include/c++/4.4.4

/usr/lib64/gcc/x86_64-pc-linux-gnu/4.4.4/../../../../include/c++/4.4.4/x86_64-pc-linux-gnu

/usr/lib64/gcc/x86_64-pc-linux-gnu/4.4.4/../../../../include/c++/4.4.4/backward
 /usr/lib64/gcc/x86_64-pc-linux-gnu/4.4.4/include
 /usr/lib64/gcc/x86_64-pc-linux-gnu/4.4.4/include-fixed
 /usr/include
End of search list.
COLLECT_GCC_OPTIONS='-std=c++0x' '-Wall' '-save-temps' '-v' '-o' 'gcc_bugoo'
'-shared-libgcc' '-mtune=generic'
 /usr/libexec/gcc/x86_64-pc-linux-gnu/4.4.4/cc1plus -fpreprocessed gcc_bug.ii
-quiet -dumpbase gcc_bug.cc -mtune=generic -auxbase gcc_bug -Wall -std=c++0x
-version -o gcc_bug.s
GNU C++ (exherbo gcc-4.4.4) version 4.4.4 (x86_64-pc-linux-gnu)
        compiled by GNU C version 4.4.4, GMP version 4.3.2, MPFR version 2.4.2.
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
Compiler executable checksum: 1311f0de2e0742c3e083aaa93b5e2b4b
gcc_bug.cc: In function ‘int main()’:
gcc_bug.cc:20: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.


-- 
           Summary: initialization of array of shared_ptr's with initializer
                    list causes compiler segfault
           Product: gcc
           Version: 4.4.4
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: libstdc++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: lynczu at gmail dot com
  GCC host triplet: x86_64-pc-linux-gnu


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


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

end of thread, other threads:[~2011-03-09 16:51 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-44045-4@http.gcc.gnu.org/bugzilla/>
2010-12-08 12:34 ` [Bug c++/44045] initialization of array of shared_ptr's with initializer list causes compiler segfault redi at gcc dot gnu.org
2011-03-09 16:51 ` redi at gcc dot gnu.org
2010-05-08 23:06 [Bug libstdc++/44045] New: " lynczu at gmail dot com
2010-05-08 23:15 ` [Bug c++/44045] " paolo dot carlini at oracle dot com
2010-05-09  9:58 ` lynczu at gmail dot com
2010-05-09 16:24 ` dougsemler at gmail dot com
2010-05-09 16:47 ` paolo dot carlini at oracle dot com
2010-05-09 16:52 ` paolo dot carlini at oracle dot com
2010-05-09 20:36 ` jason at gcc dot gnu dot org
2010-05-10 15:30 ` jason at gcc dot gnu dot org
2010-05-10 17:18 ` dougsemler at gmail dot com
2010-05-10 17:33 ` redi at gcc dot gnu dot org
2010-05-10 18:38 ` jason at gcc dot gnu dot org
2010-05-10 18:41 ` jason 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).