public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/60807] New: internal compiler error (basic_string.tcc)
@ 2014-04-10 10:11 tk at giga dot or.at
  2014-04-10 10:35 ` [Bug c++/60807] " trippels at gcc dot gnu.org
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: tk at giga dot or.at @ 2014-04-10 10:11 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 60807
           Summary: internal compiler error (basic_string.tcc)
           Product: gcc
           Version: 4.8.3
            Status: UNCONFIRMED
          Severity: major
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: tk at giga dot or.at

Created attachment 32578
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=32578&action=edit
Result of -save-temps

When compiling gambatte r550
(http://sourceforge.net/projects/gambatte/files/gambatte/r550/gambatte_src-r550.tar.gz)
on NetBSD-6.99.40/amd64 with the g++ coming with that version of NetBSD, a file
in libgambatte/ triggers an internal compiler error:

#  g++ -v -save-temps -o src/cpu.o -c -Wall -Wextra -O2 -fomit-frame-pointer
-fno-exceptions -fno-rtti -DHAVE_STDINT_H -Isrc -Iinclude
-I/disk/3/archive/obj/wip/gambatte-dev/work.x86_64/gambatte_src-r550/common
src/cpu.cpp
Using built-in specs.
COLLECT_GCC=g++
Target: x86_64--netbsd
Configured with: /usr/src6/tools/gcc/../../external/gpl3/gcc/dist/configure
--target=x86_64--netbsd --enable-long-long --enable-threads
--with-bugurl=http://www.NetBSD.org/Misc/send-pr.html --with-pkgversion='NetBSD
nb1 20120916' --with-system-zlib --enable-__cxa_atexit --with-tune=nocona
--with-mpc-lib=/var/obj/mknative/amd64-x86_64/usr/src6/external/lgpl3/mpc/lib/libmpc
--with-mpfr-lib=/var/obj/mknative/amd64-x86_64/usr/src6/external/lgpl3/mpfr/lib/libmpfr
--with-gmp-lib=/var/obj/mknative/amd64-x86_64/usr/src6/external/lgpl3/gmp/lib/libgmp
--with-mpc-include=/usr/src6/external/lgpl3/mpc/dist/src
--with-mpfr-include=/usr/src6/external/lgpl3/mpfr/dist/src
--with-gmp-include=/usr/src6/external/lgpl3/gmp/lib/libgmp/arch/x86_64
--enable-tls --disable-multilib --disable-symvers --disable-libstdcxx-pch
--build=x86_64-unknown-netbsd6.0. --host=x86_64--netbsd
--with-sysroot=/var/obj/mknative/amd64-x86_64/usr/src6/destdir.amd64
Thread model: posix
gcc version 4.8.3 (NetBSD nb2 20140304)
COLLECT_GCC_OPTIONS='-v' '-save-temps' '-o' 'src/cpu.o' '-c' '-Wall' '-Wextra'
'-O2' '-fomit-frame-pointer' '-fno-exceptions' '-fno-rtti' '-D' 'HAVE_STDINT_H'
'-I' 'src' '-I' 'include' '-I'
'/disk/3/archive/obj/wip/gambatte-dev/work.x86_64/gambatte_src-r550/common'
'-shared-libgcc' '-mtune=nocona' '-march=x86-64'
 /usr/libexec/cc1plus -E -quiet -v -I src -I include -I
/disk/3/archive/obj/wip/gambatte-dev/work.x86_64/gambatte_src-r550/common -D
HAVE_STDINT_H src/cpu.cpp -mtune=nocona -march=x86-64 -Wall -Wextra
-fomit-frame-pointer -fno-exceptions -fno-rtti -O2 -fpch-preprocess -o cpu.ii
#include "..." search starts here:
#include <...> search starts here:
 src
 include
 /disk/3/archive/obj/wip/gambatte-dev/work.x86_64/gambatte_src-r550/common
 /usr/include/g++
 /usr/include/g++/backward
 /usr/include/gcc-4.8
 /usr/include
End of search list.
COLLECT_GCC_OPTIONS='-v' '-save-temps' '-o' 'src/cpu.o' '-c' '-Wall' '-Wextra'
'-O2' '-fomit-frame-pointer' '-fno-exceptions' '-fno-rtti' '-D' 'HAVE_STDINT_H'
'-I' 'src' '-I' 'include' '-I'
'/disk/3/archive/obj/wip/gambatte-dev/work.x86_64/gambatte_src-r550/common'
'-shared-libgcc' '-mtune=nocona' '-march=x86-64'
 /usr/libexec/cc1plus -fpreprocessed cpu.ii -quiet -dumpbase cpu.cpp
-mtune=nocona -march=x86-64 -auxbase-strip src/cpu.o -O2 -Wall -Wextra -version
-fomit-frame-pointer -fno-exceptions -fno-rtti -o cpu.s
GNU C++ (NetBSD nb2 20140304) version 4.8.3 (x86_64--netbsd)
        compiled by GNU C version 4.2.1 Compatible Clang 3.5 (trunk 202566),
GMP version 5.1.3, MPFR version 3.1.2, MPC version 1.0.1
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
GNU C++ (NetBSD nb2 20140304) version 4.8.3 (x86_64--netbsd)
        compiled by GNU C version 4.2.1 Compatible Clang 3.5 (trunk 202566),
GMP version 5.1.3, MPFR version 3.1.2, MPC version 1.0.1
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
Compiler executable checksum: 4054f87540345d4e138a62067c6e8c30
In file included from /usr/include/g++/string:53:0,
                 from include/loadres.h:4,
                 from src/mem/cartridge.h:22,
                 from src/memory.h:22,
                 from src/cpu.h:22,
                 from src/cpu.cpp:19:
/usr/include/g++/bits/basic_string.tcc: In copy constructor
‘std::basic_string<_CharT, _Traits, _Alloc>::basic_string(const
std::basic_string<_CharT, _Traits, _Alloc>&)’:
/usr/include/g++/bits/basic_string.tcc:173:26: internal compiler error:
Segmentation fault
     __str.get_allocator())
                          ^
no stack trace because unwind library not available
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://www.NetBSD.org/Misc/send-pr.html> for instructions.


Starting cc1plus in gdb gives the following backtrace:

(gdb) r -quiet -v -I src -I include -I
/disk/3/archive/obj/wip/gambatte-dev/work.x86_64/gambatte_src-r550/common -D
HAVE_STDINT_H src/cpu.cpp -quiet -dumpbase cpu.cpp -mtune=nocona -march=x86-64
-auxbase-strip sr
c/cpu.o -O2 -Wall -Wextra -version -fomit-frame-pointer -fno-exceptions
-fno-rtti -o /var/tmp//ccfIzQKQ.s
Starting program: /usr/libexec/cc1plus -quiet -v -I src -I include -I
/disk/3/archive/obj/wip/gambatte-dev/work.x86_64/gambatte_src-r550/common -D
HAVE_STDINT_H src/cpu.cpp -quiet -dumpbase cpu.cpp -mtune=nocona 
-march=x86-64 -auxbase-strip src/cpu.o -O2 -Wall -Wextra -version
-fomit-frame-pointer -fno-exceptions -fno-rtti -o /var/tmp//ccfIzQKQ.s
GNU C++ (NetBSD nb2 20140304) version 4.8.3 (x86_64--netbsd)
        compiled by GNU C version 4.2.1 Compatible Clang 3.5 (trunk 202566),
GMP version 5.1.3, MPFR version 3.1.2, MPC version 1.0.1
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
#include "..." search starts here:
#include <...> search starts here:
 src  
 include
 /disk/3/archive/obj/wip/gambatte-dev/work.x86_64/gambatte_src-r550/common
 /usr/include/g++
 /usr/include/g++/backward
 /usr/include/gcc-4.8
 /usr/include
End of search list.
GNU C++ (NetBSD nb2 20140304) version 4.8.3 (x86_64--netbsd)
        compiled by GNU C version 4.2.1 Compatible Clang 3.5 (trunk 202566),
GMP version 5.1.3, MPFR version 3.1.2, MPC version 1.0.1
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
Compiler executable checksum: 4054f87540345d4e138a62067c6e8c30

Program received signal SIGSEGV, Segmentation fault.
0x00000000004f7670 in poplevel_class () at
/archive/foreign/src/external/gpl3/gcc/dist/gcc/cp/name-lookup.c:2860
2860              IDENTIFIER_BINDING (cb->identifier) = cb->base->previous;
(gdb) bt
#0  0x00000000004f7670 in poplevel_class () at
/archive/foreign/src/external/gpl3/gcc/dist/gcc/cp/name-lookup.c:2860
#1  0x0000000000459b9c in popclass () at
/archive/foreign/src/external/gpl3/gcc/dist/gcc/cp/class.c:6935
#2  pop_nested_class () at
/archive/foreign/src/external/gpl3/gcc/dist/gcc/cp/class.c:7081
#3  0x000000000042a934 in finish_function (flags=<optimized out>) at
/archive/foreign/src/external/gpl3/gcc/dist/gcc/cp/decl.c:13991
#4  0x000000000048d01a in cp_parser_function_definition_after_declarator
(parser=0x7f7ff6035bb0, inline_p=false) at
/archive/foreign/src/external/gpl3/gcc/dist/gcc/cp/parser.c:21837
#5  0x0000000000478f98 in
cp_parser_function_definition_from_specifiers_and_declarator (parser=<optimized
out>, decl_specifiers=<optimized out>, attributes=<optimized out>,
declarator=<optimized out>)
    at /archive/foreign/src/external/gpl3/gcc/dist/gcc/cp/parser.c:21752
#6  cp_parser_init_declarator (parser=0x7f7ff6035bb0,
decl_specifiers=<optimized out>, checks=<optimized out>,
function_definition_allowed_p=<optimized out>, member_p=<optimized out>, 
    declares_class_or_enum=<optimized out>, function_definition_p=<optimized
out>, maybe_range_for_decl=<optimized out>) at
/archive/foreign/src/external/gpl3/gcc/dist/gcc/cp/parser.c:15905
#7  0x000000000049efee in cp_parser_single_declaration (parser=0x7f7ff6035bb0,
checks=0x0, member_p=false, explicit_specialization_p=false,
friend_p=<optimized out>)
    at /archive/foreign/src/external/gpl3/gcc/dist/gcc/cp/parser.c:22127
#8  0x000000000049e573 in cp_parser_template_declaration_after_export
(parser=0x7f7ff6035bb0, member_p=false) at
/archive/foreign/src/external/gpl3/gcc/dist/gcc/cp/parser.c:21941
#9  0x0000000000472bf7 in cp_parser_template_declaration
(parser=0x7f7ff6035bb0, member_p=false) at
/archive/foreign/src/external/gpl3/gcc/dist/gcc/cp/parser.c:12226
#10 cp_parser_declaration (parser=0x7f7ff6035bb0) at
/archive/foreign/src/external/gpl3/gcc/dist/gcc/cp/parser.c:10404
#11 0x0000000000470c58 in cp_parser_declaration_seq_opt (parser=0x7f7ff6035bb0)
at /archive/foreign/src/external/gpl3/gcc/dist/gcc/cp/parser.c:10334
#12 0x00000000004738d8 in cp_parser_namespace_body (parser=0x7f7ff6035bb0) at
/archive/foreign/src/external/gpl3/gcc/dist/gcc/cp/parser.c:15136
#13 cp_parser_namespace_definition (parser=0x7f7ff6035bb0) at
/archive/foreign/src/external/gpl3/gcc/dist/gcc/cp/parser.c:15117
#14 0x0000000000472b49 in cp_parser_declaration (parser=0x7f7ff6035bb0) at
/archive/foreign/src/external/gpl3/gcc/dist/gcc/cp/parser.c:10432
#15 0x0000000000470c58 in cp_parser_declaration_seq_opt (parser=0x7f7ff6035bb0)
at /archive/foreign/src/external/gpl3/gcc/dist/gcc/cp/parser.c:10334
#16 0x000000000046fcff in cp_parser_translation_unit (parser=<optimized out>)
at /archive/foreign/src/external/gpl3/gcc/dist/gcc/cp/parser.c:3813
#17 c_parse_file () at
/archive/foreign/src/external/gpl3/gcc/dist/gcc/cp/parser.c:28334
#18 0x00000000005387a4 in c_common_parse_file () at
/archive/foreign/src/external/gpl3/gcc/dist/gcc/c-family/c-opts.c:1046
#19 0x000000000067c3aa in compile_file () at
/archive/foreign/src/external/gpl3/gcc/dist/gcc/toplev.c:543
#20 0x000000000067c207 in do_compile () at
/archive/foreign/src/external/gpl3/gcc/dist/gcc/toplev.c:1864
#21 toplev_main (argc=28, argv=0x7f7fffffd310) at
/archive/foreign/src/external/gpl3/gcc/dist/gcc/toplev.c:1940
#22 0x0000000000403059 in ___start ()
#23 0x00007f7ff7c042c0 in ?? () at
/archive/foreign/src/libexec/ld.elf_so/rtld.c:1426 from /libexec/ld.elf_so
#24 0x00007f7ff7ffa000 in ?? ()
#25 0x000000000000001c in ?? ()
(lots more ??)

The cpu.ii file is attached.
>From gcc-bugs-return-448702-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Thu Apr 10 10:13:28 2014
Return-Path: <gcc-bugs-return-448702-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 9320 invoked by alias); 10 Apr 2014 10:13:27 -0000
Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm
Precedence: bulk
List-Id: <gcc-bugs.gcc.gnu.org>
List-Archive: <http://gcc.gnu.org/ml/gcc-bugs/>
List-Post: <mailto:gcc-bugs@gcc.gnu.org>
List-Help: <mailto:gcc-bugs-help@gcc.gnu.org>
Sender: gcc-bugs-owner@gcc.gnu.org
Delivered-To: mailing list gcc-bugs@gcc.gnu.org
Received: (qmail 9291 invoked by uid 48); 10 Apr 2014 10:13:24 -0000
From: "tk at giga dot or.at" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/60807] internal compiler error (basic_string.tcc)
Date: Thu, 10 Apr 2014 10:13:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: c++
X-Bugzilla-Version: 4.8.3
X-Bugzilla-Keywords:
X-Bugzilla-Severity: major
X-Bugzilla-Who: tk at giga dot or.at
X-Bugzilla-Status: UNCONFIRMED
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org
X-Bugzilla-Target-Milestone: ---
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields:
Message-ID: <bug-60807-4-uJq3xj2hxA@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-60807-4@http.gcc.gnu.org/bugzilla/>
References: <bug-60807-4@http.gcc.gnu.org/bugzilla/>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: 7bit
X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/
Auto-Submitted: auto-generated
MIME-Version: 1.0
X-SW-Source: 2014-04/txt/msg00722.txt.bz2
Content-length: 241

http://gcc.gnu.org/bugzilla/show_bug.cgi?id`807

--- Comment #1 from Thomas Klausner <tk at giga dot or.at> ---
This was first filed in the NetBSD bug tracker at
http://gnats.netbsd.org/48731
where it was suggested to file this upstream.


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

* [Bug c++/60807] internal compiler error (basic_string.tcc)
  2014-04-10 10:11 [Bug c++/60807] New: internal compiler error (basic_string.tcc) tk at giga dot or.at
@ 2014-04-10 10:35 ` trippels at gcc dot gnu.org
  2014-04-10 10:40 ` jakub at gcc dot gnu.org
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: trippels at gcc dot gnu.org @ 2014-04-10 10:35 UTC (permalink / raw)
  To: gcc-bugs

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

Markus Trippelsdorf <trippels at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |trippels at gcc dot gnu.org
           Severity|major                       |normal

--- Comment #2 from Markus Trippelsdorf <trippels at gcc dot gnu.org> ---
I cannot reproduce this ICE.


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

* [Bug c++/60807] internal compiler error (basic_string.tcc)
  2014-04-10 10:11 [Bug c++/60807] New: internal compiler error (basic_string.tcc) tk at giga dot or.at
  2014-04-10 10:35 ` [Bug c++/60807] " trippels at gcc dot gnu.org
@ 2014-04-10 10:40 ` jakub at gcc dot gnu.org
  2014-04-10 14:54 ` martin at netbsd dot org
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: jakub at gcc dot gnu.org @ 2014-04-10 10:40 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Can't reproduce this on Linux/x86_64.


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

* [Bug c++/60807] internal compiler error (basic_string.tcc)
  2014-04-10 10:11 [Bug c++/60807] New: internal compiler error (basic_string.tcc) tk at giga dot or.at
  2014-04-10 10:35 ` [Bug c++/60807] " trippels at gcc dot gnu.org
  2014-04-10 10:40 ` jakub at gcc dot gnu.org
@ 2014-04-10 14:54 ` martin at netbsd dot org
  2014-04-11  9:09 ` rguenth at gcc dot gnu.org
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: martin at netbsd dot org @ 2014-04-10 14:54 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from Martin Husemann <martin at netbsd dot org> ---
Neither can I on NetBSD/amd64 - will check with Thomas for differences on his
system


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

* [Bug c++/60807] internal compiler error (basic_string.tcc)
  2014-04-10 10:11 [Bug c++/60807] New: internal compiler error (basic_string.tcc) tk at giga dot or.at
                   ` (2 preceding siblings ...)
  2014-04-10 14:54 ` martin at netbsd dot org
@ 2014-04-11  9:09 ` rguenth at gcc dot gnu.org
  2014-04-11 14:31 ` martin at netbsd dot org
  2014-04-11 14:35 ` trippels at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: rguenth at gcc dot gnu.org @ 2014-04-11  9:09 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |WAITING
   Last reconfirmed|                            |2014-04-11
     Ever confirmed|0                           |1


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

* [Bug c++/60807] internal compiler error (basic_string.tcc)
  2014-04-10 10:11 [Bug c++/60807] New: internal compiler error (basic_string.tcc) tk at giga dot or.at
                   ` (3 preceding siblings ...)
  2014-04-11  9:09 ` rguenth at gcc dot gnu.org
@ 2014-04-11 14:31 ` martin at netbsd dot org
  2014-04-11 14:35 ` trippels at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: martin at netbsd dot org @ 2014-04-11 14:31 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #5 from Martin Husemann <martin at netbsd dot org> ---
Thomas and I compared environments and found the difference: it is gcc compiled
by clang that misbehaves. I could reproduce and verify it - but past
bootstrapping it is something that will never happen to native FSF gcc in the
wild, I suppose.


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

* [Bug c++/60807] internal compiler error (basic_string.tcc)
  2014-04-10 10:11 [Bug c++/60807] New: internal compiler error (basic_string.tcc) tk at giga dot or.at
                   ` (4 preceding siblings ...)
  2014-04-11 14:31 ` martin at netbsd dot org
@ 2014-04-11 14:35 ` trippels at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: trippels at gcc dot gnu.org @ 2014-04-11 14:35 UTC (permalink / raw)
  To: gcc-bugs

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

Markus Trippelsdorf <trippels at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|WAITING                     |RESOLVED
         Resolution|---                         |INVALID

--- Comment #6 from Markus Trippelsdorf <trippels at gcc dot gnu.org> ---
Closing.


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

end of thread, other threads:[~2014-04-11 14:35 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-04-10 10:11 [Bug c++/60807] New: internal compiler error (basic_string.tcc) tk at giga dot or.at
2014-04-10 10:35 ` [Bug c++/60807] " trippels at gcc dot gnu.org
2014-04-10 10:40 ` jakub at gcc dot gnu.org
2014-04-10 14:54 ` martin at netbsd dot org
2014-04-11  9:09 ` rguenth at gcc dot gnu.org
2014-04-11 14:31 ` martin at netbsd dot org
2014-04-11 14:35 ` trippels at gcc dot gnu.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).