public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/53581] New: Segmentation fault when enabling -std=c++0x on template code
@ 2012-06-05 13:09 rggjan at gmail dot com
2012-06-05 13:20 ` [Bug c++/53581] " rggjan at gmail dot com
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: rggjan at gmail dot com @ 2012-06-05 13:09 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53581
Bug #: 53581
Summary: Segmentation fault when enabling -std=c++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=27560
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=c++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=c++0x foo.cpp
Using built-in specs.
COLLECT_GCC=/usr/bin/g++
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-unknown-linux-gnu/4.7.0/lto-wrapper
Target: x86_64-unknown-linux-gnu
Configured with: /build/src/gcc-4.7-20120505/configure --prefix=/usr
--libdir=/usr/lib --libexecdir=/usr/lib --mandir=/usr/share/man
--infodir=/usr/share/info --with-bugurl=https://bugs.archlinux.org/
--enable-languages=c,c++,ada,fortran,go,lto,objc,obj-c++ --enable-shared
--enable-threads=posix --with-system-zlib --enable-__cxa_atexit
--disable-libunwind-exceptions --enable-clocale=gnu --disable-libstdcxx-pch
--enable-libstdcxx-time --enable-gnu-unique-object --enable-linker-build-id
--with-ppl --enable-cloog-backend=isl --enable-lto --enable-gold
--enable-ld=default --enable-plugin --with-plugin-ld=ld.gold
--with-linker-hash-style=gnu --enable-multilib --disable-libssp
--disable-build-with-cxx --disable-build-poststage1-with-cxx
--enable-checking=release --with-fpmath=sse
Thread model: posix
gcc version 4.7.0 20120505 (prerelease) (GCC)
COLLECT_GCC_OPTIONS='-v' '-std=c++11' '-shared-libgcc' '-mtune=generic'
'-march=x86-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=generic -march=x86-64 -auxbase foo
-std=c++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-p10.
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
ignoring nonexistent directory
"/usr/lib/gcc/x86_64-unknown-linux-gnu/4.7.0/../../../../x86_64-unknown-linux-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/x86_64-unknown-linux-gnu
/usr/lib/gcc/x86_64-unknown-linux-gnu/4.7.0/../../../../include/c++/4.7.0/backward
/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-p10.
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
Compiler executable checksum: 06ee681e989ff71c2bb63d42d05c64ab
foo.cpp: In instantiation of ‘Child<A, M, N> Base<A, M, N>::operator-(const
Base<A, M, N>&) const [with A = float; int M = 3; int N = 3]’:
foo.cpp:30:65: required from ‘bool Ops<A, N>::bar() const [with A = float;
int N = 3]’
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 <https://bugs.archlinux.org/> for instructions.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug c++/53581] Segmentation fault when enabling -std=c++0x on template code
2012-06-05 13:09 [Bug c++/53581] New: Segmentation fault when enabling -std=c++0x on template code rggjan at gmail dot com
@ 2012-06-05 13:20 ` rggjan at gmail dot com
2012-10-14 17:53 ` paolo.carlini at oracle dot com
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: rggjan at gmail dot com @ 2012-06-05 13:20 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53581
--- Comment #1 from Jan Rüegg <rggjan at gmail dot com> 2012-06-05 13:19:58 UTC ---
Might have to do something with:
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53498
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug c++/53581] Segmentation fault when enabling -std=c++0x on template code
2012-06-05 13:09 [Bug c++/53581] New: Segmentation fault when enabling -std=c++0x on template code rggjan at gmail dot com
2012-06-05 13:20 ` [Bug c++/53581] " rggjan at gmail dot com
@ 2012-10-14 17:53 ` paolo.carlini at oracle dot com
2012-10-14 18:25 ` paolo at gcc dot gnu.org
2012-10-14 18:27 ` paolo.carlini at oracle dot com
3 siblings, 0 replies; 5+ messages in thread
From: paolo.carlini at oracle dot com @ 2012-10-14 17:53 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53581
Paolo Carlini <paolo.carlini at oracle dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC|rggjan at gmail dot com |
Known to work| |4.7.2, 4.8.0
--- Comment #2 from Paolo Carlini <paolo.carlini at oracle dot com> 2012-10-14 17:52:42 UTC ---
This is fixed in 4.7.2 and mainline. I'm adding the testcase and closing the
PR.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug c++/53581] Segmentation fault when enabling -std=c++0x on template code
2012-06-05 13:09 [Bug c++/53581] New: Segmentation fault when enabling -std=c++0x on template code rggjan at gmail dot com
2012-06-05 13:20 ` [Bug c++/53581] " rggjan at gmail dot com
2012-10-14 17:53 ` paolo.carlini at oracle dot com
@ 2012-10-14 18:25 ` paolo at gcc dot gnu.org
2012-10-14 18:27 ` paolo.carlini at oracle dot com
3 siblings, 0 replies; 5+ messages in thread
From: paolo at gcc dot gnu.org @ 2012-10-14 18:25 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53581
--- Comment #3 from paolo at gcc dot gnu.org <paolo at gcc dot gnu.org> 2012-10-14 18:24:40 UTC ---
Author: paolo
Date: Sun Oct 14 18:24:32 2012
New Revision: 192438
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=192438
Log:
2012-10-14 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/53581
* g++.dg/template/crash113.C: New.
Added:
trunk/gcc/testsuite/g++.dg/template/crash113.C
Modified:
trunk/gcc/testsuite/ChangeLog
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug c++/53581] Segmentation fault when enabling -std=c++0x on template code
2012-06-05 13:09 [Bug c++/53581] New: Segmentation fault when enabling -std=c++0x on template code rggjan at gmail dot com
` (2 preceding siblings ...)
2012-10-14 18:25 ` paolo at gcc dot gnu.org
@ 2012-10-14 18:27 ` paolo.carlini at oracle dot com
3 siblings, 0 replies; 5+ messages in thread
From: paolo.carlini at oracle dot com @ 2012-10-14 18:27 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53581
Paolo Carlini <paolo.carlini at oracle dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |FIXED
Target Milestone|--- |4.7.2
--- Comment #4 from Paolo Carlini <paolo.carlini at oracle dot com> 2012-10-14 18:26:38 UTC ---
Done.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2012-10-14 18:27 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-06-05 13:09 [Bug c++/53581] New: Segmentation fault when enabling -std=c++0x on template code rggjan at gmail dot com
2012-06-05 13:20 ` [Bug c++/53581] " rggjan at gmail dot com
2012-10-14 17:53 ` paolo.carlini at oracle dot com
2012-10-14 18:25 ` paolo at gcc dot gnu.org
2012-10-14 18:27 ` paolo.carlini at oracle dot com
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).