From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7373 invoked by alias); 5 Jun 2012 13:09:46 -0000 Received: (qmail 7138 invoked by uid 22791); 5 Jun 2012 13:09:45 -0000 X-SWARE-Spam-Status: No, hits=-3.5 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00,TW_CX,TW_DC X-Spam-Check-By: sourceware.org Received: from localhost (HELO gcc.gnu.org) (127.0.0.1) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 05 Jun 2012 13:09:31 +0000 From: "rggjan at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/53581] New: Segmentation fault when enabling -std=c++0x on template code Date: Tue, 05 Jun 2012 13:09:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: rggjan at gmail dot com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Message-ID: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2012-06/txt/msg00250.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D53581 Bug #: 53581 Summary: Segmentation fault when enabling -std=3Dc++0x on template code Classification: Unclassified Product: gcc Version: 4.7.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ AssignedTo: unassigned@gcc.gnu.org ReportedBy: rggjan@gmail.com Created attachment 27560 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=3D27560 The code that crashes gcc When compiling the attached code like this: g++ foo.cpp then everything works fine. As soon as I enable c++0x: g++ -std=3Dc++0x foo.cpp I get this error: ... foo.cpp:36:7: internal compiler error: Segmentation fault Please submit a full bug report, with preprocessed source if appropriate. ... ------------------------------------------------------- The full output of /usr/bin/g++ -v -std=3Dc++0x foo.cpp Using built-in specs. COLLECT_GCC=3D/usr/bin/g++ COLLECT_LTO_WRAPPER=3D/usr/lib/gcc/x86_64-unknown-linux-gnu/4.7.0/lto-wrapp= er Target: x86_64-unknown-linux-gnu Configured with: /build/src/gcc-4.7-20120505/configure --prefix=3D/usr --libdir=3D/usr/lib --libexecdir=3D/usr/lib --mandir=3D/usr/share/man --infodir=3D/usr/share/info --with-bugurl=3Dhttps://bugs.archlinux.org/ --enable-languages=3Dc,c++,ada,fortran,go,lto,objc,obj-c++ --enable-shared --enable-threads=3Dposix --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-clocale=3Dgnu --disable-libstdcxx-p= ch --enable-libstdcxx-time --enable-gnu-unique-object --enable-linker-build-id --with-ppl --enable-cloog-backend=3Disl --enable-lto --enable-gold --enable-ld=3Ddefault --enable-plugin --with-plugin-ld=3Dld.gold --with-linker-hash-style=3Dgnu --enable-multilib --disable-libssp --disable-build-with-cxx --disable-build-poststage1-with-cxx --enable-checking=3Drelease --with-fpmath=3Dsse Thread model: posix gcc version 4.7.0 20120505 (prerelease) (GCC)=20 COLLECT_GCC_OPTIONS=3D'-v' '-std=3Dc++11' '-shared-libgcc' '-mtune=3Dgeneri= c' '-march=3Dx86-64' /usr/lib/gcc/x86_64-unknown-linux-gnu/4.7.0/cc1plus -quiet -v -D_GNU_SOURCE foo.cpp -quiet -dumpbase foo.cpp -mtune=3Dgeneric -march=3Dx86-64 -auxbase = foo -std=3Dc++11 -version -o /tmp/cc8d1FHu.s GNU C++ (GCC) version 4.7.0 20120505 (prerelease) (x86_64-unknown-linux-gnu) compiled by GNU C version 4.7.0 20120505 (prerelease), GMP version 5.0.= 5, MPFR version 3.1.0-p7, MPC version 0.9 warning: MPFR header version 3.1.0-p7 differs from library version 3.1.0-p1= 0. GGC heuristics: --param ggc-min-expand=3D100 --param ggc-min-heapsize=3D131= 072 ignoring nonexistent directory "/usr/lib/gcc/x86_64-unknown-linux-gnu/4.7.0/../../../../x86_64-unknown-lin= ux-gnu/include" #include "..." search starts here: #include <...> search starts here: /usr/lib/gcc/x86_64-unknown-linux-gnu/4.7.0/../../../../include/c++/4.7.0 /usr/lib/gcc/x86_64-unknown-linux-gnu/4.7.0/../../../../include/c++/4.7.0/x= 86_64-unknown-linux-gnu /usr/lib/gcc/x86_64-unknown-linux-gnu/4.7.0/../../../../include/c++/4.7.0/b= ackward /usr/lib/gcc/x86_64-unknown-linux-gnu/4.7.0/include /usr/local/include /usr/lib/gcc/x86_64-unknown-linux-gnu/4.7.0/include-fixed /usr/include End of search list. GNU C++ (GCC) version 4.7.0 20120505 (prerelease) (x86_64-unknown-linux-gnu) compiled by GNU C version 4.7.0 20120505 (prerelease), GMP version 5.0.= 5, MPFR version 3.1.0-p7, MPC version 0.9 warning: MPFR header version 3.1.0-p7 differs from library version 3.1.0-p1= 0. GGC heuristics: --param ggc-min-expand=3D100 --param ggc-min-heapsize=3D131= 072 Compiler executable checksum: 06ee681e989ff71c2bb63d42d05c64ab foo.cpp: In instantiation of =E2=80=98Child Base::operato= r-(const Base&) const [with A =3D float; int M =3D 3; int N =3D 3]=E2=80=99: foo.cpp:30:65: required from =E2=80=98bool Ops::bar() const [with A= =3D float; int N =3D 3]=E2=80=99 foo.cpp:40:18: required from here foo.cpp:36:7: internal compiler error: Segmentation fault Please submit a full bug report, with preprocessed source if appropriate. See for instructions.