public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/60210] New: segfault when trying to use a const template using
@ 2014-02-15 10:59 florent.hivert at lri dot fr
2014-05-13 16:23 ` [Bug c++/60210] " florent.hivert at lri dot fr
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: florent.hivert at lri dot fr @ 2014-02-15 10:59 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60210
Bug ID: 60210
Summary: segfault when trying to use a const template using
Product: gcc
Version: 4.8.1
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: florent.hivert at lri dot fr
Created attachment 32143
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=32143&action=edit
preprocessed code
The following code triggers a segfault:
template <typename T> struct S {};
template <typename T> using constS = const S<T>;
template <typename T> void FOO(constS<T> a) {}
If const is removed the problem disappear. Follows the full log. I also got the
same problem with various version of g++.
g++ -v -save-temps -Wall -Wextra -std=c++11 bug3.cpp -o bug3
Using built-in specs.
COLLECT_GCC=g++
COLLECT_LTO_WRAPPER=/usr/lib64/gcc/x86_64-suse-linux/4.8/lto-wrapper
Target: x86_64-suse-linux
Configured with: ../configure --prefix=/usr --infodir=/usr/share/info
--mandir=/usr/share/man --libdir=/usr/lib64 --libexecdir=/usr/lib64
--enable-languages=c,c++,objc,fortran,obj-c++,java,ada
--enable-checking=release --with-gxx-include-dir=/usr/include/c++/4.8
--enable-ssp --disable-libssp --disable-plugin
--with-bugurl=http://bugs.opensuse.org/ --with-pkgversion='SUSE Linux'
--disable-libgcj --disable-libmudflap --with-slibdir=/lib64 --with-system-zlib
--enable-__cxa_atexit --enable-libstdcxx-allocator=new --disable-libstdcxx-pch
--enable-version-specific-runtime-libs --enable-linker-build-id
--program-suffix=-4.8 --enable-linux-futex --without-system-libunwind
--with-arch-32=i586 --with-tune=generic --build=x86_64-suse-linux
Thread model: posix
gcc version 4.8.1 20130909 [gcc-4_8-branch revision 202388] (SUSE Linux)
COLLECT_GCC_OPTIONS='-v' '-save-temps' '-Wall' '-Wextra' '-std=c++11' '-o'
'bug3' '-shared-libgcc' '-mtune=generic' '-march=x86-64'
/usr/lib64/gcc/x86_64-suse-linux/4.8/cc1plus -E -quiet -v -D_GNU_SOURCE
bug3.cpp -mtune=generic -march=x86-64 -std=c++11 -Wall -Wextra -fpch-preprocess
-o bug3.ii
#include "..." search starts here:
#include <...> search starts here:
/usr/include/c++/4.8
/usr/include/c++/4.8/x86_64-suse-linux
/usr/include/c++/4.8/backward
/usr/lib64/gcc/x86_64-suse-linux/4.8/include
/usr/local/include
/usr/lib64/gcc/x86_64-suse-linux/4.8/include-fixed
/usr/lib64/gcc/x86_64-suse-linux/4.8/../../../../x86_64-suse-linux/include
/usr/include
End of search list.
COLLECT_GCC_OPTIONS='-v' '-save-temps' '-Wall' '-Wextra' '-std=c++11' '-o'
'bug3' '-shared-libgcc' '-mtune=generic' '-march=x86-64'
/usr/lib64/gcc/x86_64-suse-linux/4.8/cc1plus -fpreprocessed bug3.ii -quiet
-dumpbase bug3.cpp -mtune=generic -march=x86-64 -auxbase bug3 -Wall -Wextra
-std=c++11 -version -o bug3.s
GNU C++ (SUSE Linux) version 4.8.1 20130909 [gcc-4_8-branch revision 202388]
(x86_64-suse-linux)
compiled by GNU C version 4.8.1 20130909 [gcc-4_8-branch revision
202388], GMP version 5.1.2, MPFR version 3.1.2, MPC version 1.0
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
GNU C++ (SUSE Linux) version 4.8.1 20130909 [gcc-4_8-branch revision 202388]
(x86_64-suse-linux)
compiled by GNU C version 4.8.1 20130909 [gcc-4_8-branch revision
202388], GMP version 5.1.2, MPFR version 3.1.2, MPC version 1.0
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
Compiler executable checksum: 8f4f3cbd488ac89b0f495172228a1742
bug3.cpp:3:40: internal compiler error: Segmentation fault
template <typename T> void FOO(constS<T> a) {}
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug c++/60210] segfault when trying to use a const template using
2014-02-15 10:59 [Bug c++/60210] New: segfault when trying to use a const template using florent.hivert at lri dot fr
@ 2014-05-13 16:23 ` florent.hivert at lri dot fr
2014-05-13 16:32 ` paolo.carlini at oracle dot com
2014-05-13 16:39 ` paolo.carlini at oracle dot com
2 siblings, 0 replies; 4+ messages in thread
From: florent.hivert at lri dot fr @ 2014-05-13 16:23 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60210
--- Comment #1 from Florent Hivert <florent.hivert at lri dot fr> ---
The bug has vanished in the recent 4.9.0 release. Should I mark the ticket as
RESOLVED and close it ?
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug c++/60210] segfault when trying to use a const template using
2014-02-15 10:59 [Bug c++/60210] New: segfault when trying to use a const template using florent.hivert at lri dot fr
2014-05-13 16:23 ` [Bug c++/60210] " florent.hivert at lri dot fr
@ 2014-05-13 16:32 ` paolo.carlini at oracle dot com
2014-05-13 16:39 ` paolo.carlini at oracle dot com
2 siblings, 0 replies; 4+ messages in thread
From: paolo.carlini at oracle dot com @ 2014-05-13 16:32 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60210
--- Comment #2 from Paolo Carlini <paolo.carlini at oracle dot com> ---
Thanks for the update. I'm pretty sure it's a Dup, thus instead of simply
closing it, let me find the other bug.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug c++/60210] segfault when trying to use a const template using
2014-02-15 10:59 [Bug c++/60210] New: segfault when trying to use a const template using florent.hivert at lri dot fr
2014-05-13 16:23 ` [Bug c++/60210] " florent.hivert at lri dot fr
2014-05-13 16:32 ` paolo.carlini at oracle dot com
@ 2014-05-13 16:39 ` paolo.carlini at oracle dot com
2 siblings, 0 replies; 4+ messages in thread
From: paolo.carlini at oracle dot com @ 2014-05-13 16:39 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60210
Paolo Carlini <paolo.carlini at oracle dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution|--- |DUPLICATE
--- Comment #3 from Paolo Carlini <paolo.carlini at oracle dot com> ---
Dup.
*** This bug has been marked as a duplicate of bug 53658 ***
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2014-05-13 16:39 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-02-15 10:59 [Bug c++/60210] New: segfault when trying to use a const template using florent.hivert at lri dot fr
2014-05-13 16:23 ` [Bug c++/60210] " florent.hivert at lri dot fr
2014-05-13 16:32 ` paolo.carlini at oracle dot com
2014-05-13 16:39 ` 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).