public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/62129] New: internal compiler error: in output_constant, at varasm.c:4755
@ 2014-08-14  3:28 brooks at gcc dot gnu.org
  2014-08-14 12:32 ` [Bug c++/62129] [4.9/5 Regression] " mpolacek at gcc dot gnu.org
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: brooks at gcc dot gnu.org @ 2014-08-14  3:28 UTC (permalink / raw)
  To: gcc-bugs

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 .


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

* [Bug c++/62129] [4.9/5 Regression] internal compiler error: in output_constant, at varasm.c:4755
  2014-08-14  3:28 [Bug c++/62129] New: internal compiler error: in output_constant, at varasm.c:4755 brooks at gcc dot gnu.org
@ 2014-08-14 12:32 ` mpolacek at gcc dot gnu.org
  2014-08-14 12:54 ` mpolacek at gcc dot gnu.org
                   ` (7 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2014-08-14 12:32 UTC (permalink / raw)
  To: gcc-bugs

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

Marek Polacek <mpolacek at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |mpolacek at gcc dot gnu.org
   Target Milestone|---                         |4.9.2
            Summary|internal compiler error: in |[4.9/5 Regression] internal
                   |output_constant, at         |compiler error: in
                   |varasm.c:4755               |output_constant, at
                   |                            |varasm.c:4755


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

* [Bug c++/62129] [4.9/5 Regression] internal compiler error: in output_constant, at varasm.c:4755
  2014-08-14  3:28 [Bug c++/62129] New: internal compiler error: in output_constant, at varasm.c:4755 brooks at gcc dot gnu.org
  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
                   ` (6 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2014-08-14 12:54 UTC (permalink / raw)
  To: gcc-bugs

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

Marek Polacek <mpolacek at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2014-08-14
                 CC|                            |jason at gcc dot gnu.org
     Ever confirmed|0                           |1

--- Comment #1 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
Started with r212439.


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

* [Bug c++/62129] [4.9/5 Regression] internal compiler error: in output_constant, at varasm.c:4755
  2014-08-14  3:28 [Bug c++/62129] New: internal compiler error: in output_constant, at varasm.c:4755 brooks at gcc dot gnu.org
  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
                   ` (5 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: jakub at gcc dot gnu.org @ 2014-08-15 14:44 UTC (permalink / raw)
  To: gcc-bugs

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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jakub at gcc dot gnu.org

--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Yeah, and this one wasn't fixed with r213688.


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

* [Bug c++/62129] [4.9/5 Regression] internal compiler error: in output_constant, at varasm.c:4755
  2014-08-14  3:28 [Bug c++/62129] New: internal compiler error: in output_constant, at varasm.c:4755 brooks at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  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
                   ` (4 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: jakub at gcc dot gnu.org @ 2014-08-15 14:45 UTC (permalink / raw)
  To: gcc-bugs

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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P3                          |P1


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

* [Bug c++/62129] [4.9/5 Regression] internal compiler error: in output_constant, at varasm.c:4755
  2014-08-14  3:28 [Bug c++/62129] New: internal compiler error: in output_constant, at varasm.c:4755 brooks at gcc dot gnu.org
                   ` (3 preceding siblings ...)
  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
                   ` (3 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: jason at gcc dot gnu.org @ 2014-08-20  4:39 UTC (permalink / raw)
  To: gcc-bugs

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

Jason Merrill <jason at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED
           Assignee|unassigned at gcc dot gnu.org      |jason at gcc dot gnu.org


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

* [Bug c++/62129] [4.9/5 Regression] internal compiler error: in output_constant, at varasm.c:4755
  2014-08-14  3:28 [Bug c++/62129] New: internal compiler error: in output_constant, at varasm.c:4755 brooks at gcc dot gnu.org
                   ` (4 preceding siblings ...)
  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
                   ` (2 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: jason at gcc dot gnu.org @ 2014-08-22 16:59 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from Jason Merrill <jason at gcc dot gnu.org> ---
Author: jason
Date: Fri Aug 22 16:58:25 2014
New Revision: 214333

URL: https://gcc.gnu.org/viewcvs?rev=214333&root=gcc&view=rev
Log:
    PR c++/62129
    * class.c (outermost_open_class): New.
    * cp-tree.h: Declare it.
    * decl.c (maybe_register_incomplete_var): Use it.
    (complete_vars): Handle any constant variable.
    * expr.c (cplus_expand_constant): Handle CONSTRUCTOR.

Added:
    trunk/gcc/testsuite/g++.dg/cpp0x/constexpr-ptrmem3.C
Modified:
    trunk/gcc/cp/ChangeLog
    trunk/gcc/cp/class.c
    trunk/gcc/cp/cp-tree.h
    trunk/gcc/cp/decl.c
    trunk/gcc/cp/expr.c


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

* [Bug c++/62129] [4.9/5 Regression] internal compiler error: in output_constant, at varasm.c:4755
  2014-08-14  3:28 [Bug c++/62129] New: internal compiler error: in output_constant, at varasm.c:4755 brooks at gcc dot gnu.org
                   ` (5 preceding siblings ...)
  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
  8 siblings, 0 replies; 10+ messages in thread
From: jason at gcc dot gnu.org @ 2014-08-22 18:49 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from Jason Merrill <jason at gcc dot gnu.org> ---
Author: jason
Date: Fri Aug 22 18:49:18 2014
New Revision: 214353

URL: https://gcc.gnu.org/viewcvs?rev=214353&root=gcc&view=rev
Log:
    PR c++/62129
    * class.c (outermost_open_class): Fix logic.
    * decl.c (complete_vars): Fix logic.

Modified:
    trunk/gcc/cp/ChangeLog
    trunk/gcc/cp/class.c
    trunk/gcc/cp/decl.c


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

* [Bug c++/62129] [4.9/5 Regression] internal compiler error: in output_constant, at varasm.c:4755
  2014-08-14  3:28 [Bug c++/62129] New: internal compiler error: in output_constant, at varasm.c:4755 brooks at gcc dot gnu.org
                   ` (6 preceding siblings ...)
  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
  8 siblings, 0 replies; 10+ messages in thread
From: jason at gcc dot gnu.org @ 2014-08-25 13:14 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #5 from Jason Merrill <jason at gcc dot gnu.org> ---
Author: jason
Date: Mon Aug 25 13:13:41 2014
New Revision: 214424

URL: https://gcc.gnu.org/viewcvs?rev=214424&root=gcc&view=rev
Log:
    PR c++/62129
    * class.c (outermost_open_class): New.
    * cp-tree.h: Declare it.
    * decl.c (maybe_register_incomplete_var): Use it.
    (complete_vars): Handle any constant variable.
    * expr.c (cplus_expand_constant): Handle CONSTRUCTOR.

Added:
    branches/gcc-4_9-branch/gcc/testsuite/g++.dg/cpp0x/constexpr-ptrmem3.C
Modified:
    branches/gcc-4_9-branch/gcc/cp/ChangeLog
    branches/gcc-4_9-branch/gcc/cp/class.c
    branches/gcc-4_9-branch/gcc/cp/cp-tree.h
    branches/gcc-4_9-branch/gcc/cp/decl.c
    branches/gcc-4_9-branch/gcc/cp/expr.c


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

* [Bug c++/62129] [4.9/5 Regression] internal compiler error: in output_constant, at varasm.c:4755
  2014-08-14  3:28 [Bug c++/62129] New: internal compiler error: in output_constant, at varasm.c:4755 brooks at gcc dot gnu.org
                   ` (7 preceding siblings ...)
  2014-08-25 13:14 ` jason at gcc dot gnu.org
@ 2014-08-26  3:17 ` jason at gcc dot gnu.org
  8 siblings, 0 replies; 10+ messages in thread
From: jason at gcc dot gnu.org @ 2014-08-26  3:17 UTC (permalink / raw)
  To: gcc-bugs

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

Jason Merrill <jason at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|---                         |FIXED

--- Comment #6 from Jason Merrill <jason at gcc dot gnu.org> ---
Fixed for 4.9.2.


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

end of thread, other threads:[~2014-08-26  3:17 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-08-14  3:28 [Bug c++/62129] New: internal compiler error: in output_constant, at varasm.c:4755 brooks at gcc dot gnu.org
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

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).