public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "gcc@severin-strobl.de" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/57545] New: Generation of debug symbols leads to internal compiler error
Date: Thu, 06 Jun 2013 15:58:00 -0000	[thread overview]
Message-ID: <bug-57545-4@http.gcc.gnu.org/bugzilla/> (raw)

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

            Bug ID: 57545
           Summary: Generation of debug symbols leads to internal compiler
                    error
           Product: gcc
           Version: 4.8.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: gcc@severin-strobl.de

Created attachment 30269
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=30269&action=edit
test case leading to internal compiler error

Enabling the generation of debug symbols leads to an internal compiler error
(segmentation fault). A preprocessed minimal example is attached. The problem
is reproducible in g++ versions 4.7.2, 4.7.3, 4.8.0 and 4.8.1. Version 4.7.1 is
the last version where I did not encounter any problems.

// code
template<typename T, long unsigned int N>
struct array {
    T data[N];
};

template<typename T>
struct derived {
    typedef long unsigned int size_type;
    static const size_type n = 42;

    array<int, n> a;
};

// compile
$ g++ -g -Wall -Wextra -save-temps test-case.cpp
test-case.cpp:12:2: internal compiler error: Segmentation fault
 };
  ^
0x89f8ff crash_signal
    ../../gcc-4.8.1/gcc/toplev.c:332
0x897567 bit_from_pos(tree_node*, tree_node*)
    ../../gcc-4.8.1/gcc/stor-layout.c:799
0x6ad653 field_byte_offset
    ../../gcc-4.8.1/gcc/dwarf2out.c:14351
0x6b72e9 add_data_member_location_attribute
    ../../gcc-4.8.1/gcc/dwarf2out.c:14577
0x6c3c89 gen_field_die
    ../../gcc-4.8.1/gcc/dwarf2out.c:18697
0x6bfa4f gen_decl_die
    ../../gcc-4.8.1/gcc/dwarf2out.c:20072
0x6c0d37 gen_member_die
    ../../gcc-4.8.1/gcc/dwarf2out.c:19031
0x6c0d37 gen_struct_or_union_type_die
    ../../gcc-4.8.1/gcc/dwarf2out.c:19117
0x6c0d37 gen_tagged_type_die
    ../../gcc-4.8.1/gcc/dwarf2out.c:19307
0x6c1a2e gen_type_die_with_usage
    ../../gcc-4.8.1/gcc/dwarf2out.c:19454
0x6c2142 gen_type_die
    ../../gcc-4.8.1/gcc/dwarf2out.c:19493
0x6c2142 modified_type_die
    ../../gcc-4.8.1/gcc/dwarf2out.c:10163
0x6c2f70 force_type_die
    ../../gcc-4.8.1/gcc/dwarf2out.c:19789
0x6c37f9 get_context_die
    ../../gcc-4.8.1/gcc/dwarf2out.c:19704
0x6c37f9 scope_die_for
    ../../gcc-4.8.1/gcc/dwarf2out.c:16419
0x6c15d9 gen_type_die_with_usage
    ../../gcc-4.8.1/gcc/dwarf2out.c:19349
0x6c2ebe gen_type_die
    ../../gcc-4.8.1/gcc/dwarf2out.c:19493
0x6c2ebe modified_type_die
    ../../gcc-4.8.1/gcc/dwarf2out.c:10095
0x6c3a2b add_type_attribute
    ../../gcc-4.8.1/gcc/dwarf2out.c:16497
0x6bad18 generic_parameter_die
    ../../gcc-4.8.1/gcc/dwarf2out.c:10356

$ g++ -v
Using built-in specs.
COLLECT_GCC=g++
COLLECT_LTO_WRAPPER=/apps/gcc/gcc-4.8.1/libexec/gcc/x86_64-pc-linux-gnu/4.8.1/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: ../gcc-4.8.1/configure --prefix=/apps/gcc/gcc-4.8.1
--build=x86_64-pc-linux-gnu --enable-bootstrap --enable-checking=release
--enable-__cxa_atexit --enable-languages=c,c++,fortran --enable-libgomp
--enable-libmudflap --enable-lto --enable-multilib --enable-nls --enable-shared
--enable-threads=posix --with-system-zlib --enable-cloog-backend=isl
--with-cloog=/home/hpc/severin/apps/cloog/cloog-0.18.0
--with-cloog-include=/home/hpc/severin/apps/cloog/cloog-0.18.0/include/
--with-ppl=/home/hpc/severin/apps/ppl/ppl-1.0
Thread model: posix
gcc version 4.8.1 (GCC)


             reply	other threads:[~2013-06-06 15:58 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-06 15:58 gcc@severin-strobl.de [this message]
2013-06-06 19:05 ` [Bug c++/57545] [4.7/4.8/4.9 Regression] " jakub at gcc dot gnu.org
2013-07-09  6:27 ` jason at gcc dot gnu.org
2013-07-09 18:51 ` jason at gcc dot gnu.org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-57545-4@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).