public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "brooks at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/62129] New: internal compiler error: in output_constant, at varasm.c:4755
Date: Thu, 14 Aug 2014 03:28:00 -0000	[thread overview]
Message-ID: <bug-62129-4@http.gcc.gnu.org/bugzilla/> (raw)

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62129

            Bug ID: 62129
           Summary: internal compiler error: in output_constant, at
                    varasm.c:4755
           Product: gcc
           Version: 4.9.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: brooks at gcc dot gnu.org

Created attachment 33316
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=33316&action=edit
Small example program.

(Google ref: b/17007254)

The following program causes an ICE in output_constant, at varasm.c:4755 on the
4.9 branch at r213772, and a similar ICE on trunk:

$ cat b17007254.cc 
class Evaluator
{
    int MakeChangelist ();
    struct CreatorEntry
    {
        char *type;
        int (Evaluator::*factory) ();
    };
    static constexpr CreatorEntry kCreators[] = { "",
&Evaluator::MakeChangelist };
};

constexpr Evaluator::CreatorEntry Evaluator::kCreators[];

$ gcc-archive/4.9/213772/bin/g++ --std=c++11 -c b17007254.cc
b17007254.cc:9:82: warning: deprecated conversion from string constant to
‘char*’ [-Wwrite-strings]
     static constexpr CreatorEntry kCreators[] = { "",
&Evaluator::MakeChangelist };
                                                                               
  ^
b17007254.cc:12:57: internal compiler error: in output_constant, at
varasm.c:4755
 constexpr Evaluator::CreatorEntry Evaluator::kCreators[];
                                                         ^
0xb21e2a output_constant
        gcc/gcc-4_9-branch/gcc/varasm.c:4755
0xb26102 output_constant
        gcc/gcc-4_9-branch/gcc/varasm.c:4611
0xb26102 output_constructor_regular_field
        gcc/gcc-4_9-branch/gcc/varasm.c:4952
0xb26102 output_constructor
        gcc/gcc-4_9-branch/gcc/varasm.c:5231
0xb26102 output_constant
        gcc/gcc-4_9-branch/gcc/varasm.c:4611
0xb26102 output_constructor_regular_field
        gcc/gcc-4_9-branch/gcc/varasm.c:4952
0xb26102 output_constructor
        gcc/gcc-4_9-branch/gcc/varasm.c:5231
0xb2581e assemble_variable(tree_node*, int, int, int)
        gcc/gcc-4_9-branch/gcc/varasm.c:2139
0xb27455 varpool_assemble_decl(varpool_node*)
        gcc/gcc-4_9-branch/gcc/varpool.c:466
0x6df31d output_in_order
        gcc/gcc-4_9-branch/gcc/cgraphunit.c:2011
0x6df31d compile()
        gcc/gcc-4_9-branch/gcc/cgraphunit.c:2248
0x6df5e4 finalize_compilation_unit()
        gcc/gcc-4_9-branch/gcc/cgraphunit.c:2330
0x5946db cp_write_global_declarations()
        gcc/gcc-4_9-branch/gcc/cp/decl2.c:4611
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <http://gcc.gnu.org/bugs.html> for instructions.

$ gcc-archive/trunk/213772/bin/g++ --std=c++11 -c b17007254.cc
b17007254.cc:9:82: warning: deprecated conversion from string constant to
‘char*’ [-Wwrite-strings]
     static constexpr CreatorEntry kCreators[] = { "",
&Evaluator::MakeChangelist };
                                                                               
  ^
b17007254.cc:12:57: internal compiler error: in output_constant, at
varasm.c:4734
 constexpr Evaluator::CreatorEntry Evaluator::kCreators[];
                                                         ^
0xe19a5a output_constant
        gcc/gcc-trunk/gcc/varasm.c:4734
0xe206a3 output_constructor_regular_field
        gcc/gcc-trunk/gcc/varasm.c:4929
0xe206a3 output_constructor
        gcc/gcc-trunk/gcc/varasm.c:5195
0xe19a87 output_constant
        gcc/gcc-trunk/gcc/varasm.c:4735
0xe206a3 output_constructor_regular_field
        gcc/gcc-trunk/gcc/varasm.c:4929
0xe206a3 output_constructor
        gcc/gcc-trunk/gcc/varasm.c:5195
0xe19a87 output_constant
        gcc/gcc-trunk/gcc/varasm.c:4735
0xe22235 assemble_variable(tree_node*, int, int, int)
        gcc/gcc-trunk/gcc/varasm.c:2175
0xe23d03 varpool_node::assemble_decl()
        gcc/gcc-trunk/gcc/varpool.c:553
0x8475ae output_in_order
        gcc/gcc-trunk/gcc/cgraphunit.c:2012
0x8475ae compile()
        gcc/gcc-trunk/gcc/cgraphunit.c:2249
0x848bc4 finalize_compilation_unit()
        gcc/gcc-trunk/gcc/cgraphunit.c:2331
0x638155 cp_write_global_declarations()
        gcc/gcc-trunk/gcc/cp/decl2.c:4644
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <http://gcc.gnu.org/bugs.html> for instructions.
>From gcc-bugs-return-458407-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Thu Aug 14 03:46:49 2014
Return-Path: <gcc-bugs-return-458407-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 5988 invoked by alias); 14 Aug 2014 03:46:46 -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 5901 invoked by uid 48); 14 Aug 2014 03:46:30 -0000
From: "pinskia at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug other/60465] Compiling glibc-2.17,2.18 with gcc-4.8.2 and binutils-2.23.2,2.24 results in segfaults in _start / elf_get_dynamic_info
Date: Thu, 14 Aug 2014 03:46:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: other
X-Bugzilla-Version: 4.8.2
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: pinskia at gcc dot gnu.org
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-60465-4-kX35Lq7xaL@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-60465-4@http.gcc.gnu.org/bugzilla/>
References: <bug-60465-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-08/txt/msg00904.txt.bz2
Content-length: 251

https://gcc.gnu.org/bugzilla/show_bug.cgi?id`465

--- Comment #11 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
This sounds like the same bug which I fixed with the set of patches at
https://gcc.gnu.org/ml/gcc-patches/2014-08/msg00932.html .


             reply	other threads:[~2014-08-14  3:28 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-14  3:28 brooks at gcc dot gnu.org [this message]
2014-08-14 12:32 ` [Bug c++/62129] [4.9/5 Regression] " mpolacek at gcc dot gnu.org
2014-08-14 12:54 ` mpolacek at gcc dot gnu.org
2014-08-15 14:44 ` jakub at gcc dot gnu.org
2014-08-15 14:45 ` jakub at gcc dot gnu.org
2014-08-20  4:39 ` jason at gcc dot gnu.org
2014-08-22 16:59 ` jason at gcc dot gnu.org
2014-08-22 18:49 ` jason at gcc dot gnu.org
2014-08-25 13:14 ` jason at gcc dot gnu.org
2014-08-26  3:17 ` 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-62129-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).