public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/59886] New: ICE in expand_expr_real_2
@ 2014-01-20 11:32 larsbj at gullik dot net
  2014-01-20 14:28 ` [Bug c++/59886] " jakub at gcc dot gnu.org
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: larsbj at gullik dot net @ 2014-01-20 11:32 UTC (permalink / raw)
  To: gcc-bugs

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="UTF-8", Size: 5915 bytes --]

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

            Bug ID: 59886
           Summary: ICE in expand_expr_real_2
           Product: gcc
           Version: 4.9.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: larsbj at gullik dot net

Created attachment 31897
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=31897&action=edit
Reduced preprocessed code.

g++ --version
g++ (GCC) 4.9.0 20140120 (experimental) as of rev 206794

When compiling the attached preprocessed code (somewhat reduced),
I get the following ICE:

g++ -std=gnu++11 DnsLocatorProfiles.ii
functional/protocols/dnslocator/DnsLocatorProfiles.cpp: In function ‘void
__static_initialization_and_destruction_0(int, int)’:
functional/protocols/dnslocator/DnsLocatorProfiles.cpp:58:5: internal compiler
error: in expand_expr_real_2, at expr.c:9201
     };
     ^
0x77c193 expand_expr_real_2(separate_ops*, rtx_def*, machine_mode,
expand_modifier)
        ../../gcc/gcc/expr.c:9201
0x6c122c expand_gimple_stmt_1
        ../../gcc/gcc/cfgexpand.c:3249
0x6c122c expand_gimple_stmt
        ../../gcc/gcc/cfgexpand.c:3309
0x6c18cb expand_gimple_basic_block
        ../../gcc/gcc/cfgexpand.c:5149
0x6c3dc6 gimple_expand_cfg
        ../../gcc/gcc/cfgexpand.c:5715
0x6c3dc6 execute
        ../../gcc/gcc/cfgexpand.c:5935
>From gcc-bugs-return-440998-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Mon Jan 20 11:37:03 2014
Return-Path: <gcc-bugs-return-440998-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 4864 invoked by alias); 20 Jan 2014 11:37:03 -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 4827 invoked by uid 48); 20 Jan 2014 11:37:00 -0000
From: "larsbj at gullik dot net" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/59886] ICE in expand_expr_real_2
Date: Mon, 20 Jan 2014 11:37: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.9.0
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: larsbj at gullik dot net
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: cc
Message-ID: <bug-59886-4-zwsQoMNXKL@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-59886-4@http.gcc.gnu.org/bugzilla/>
References: <bug-59886-4@http.gcc.gnu.org/bugzilla/>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/
Auto-Submitted: auto-generated
MIME-Version: 1.0
X-SW-Source: 2014-01/txt/msg02140.txt.bz2
Content-length: 510

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

Lars Gullik Bjønnes <larsbj at gullik dot net> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |bernd.edlinger at hotmail dot de,
                   |                            |jakub at gcc dot gnu.org

--- Comment #1 from Lars Gullik Bjønnes <larsbj at gullik dot net> ---
Add likely suspects to Cc.
>From gcc-bugs-return-440999-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Mon Jan 20 11:45:43 2014
Return-Path: <gcc-bugs-return-440999-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 13594 invoked by alias); 20 Jan 2014 11:45:42 -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 13560 invoked by uid 48); 20 Jan 2014 11:45:39 -0000
From: "gjl at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug target/59396] [avr] Wrong warning with ISR() and -flto
Date: Mon, 20 Jan 2014 11:45:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: target
X-Bugzilla-Version: 4.8.3
X-Bugzilla-Keywords: diagnostic
X-Bugzilla-Severity: minor
X-Bugzilla-Who: gjl at gcc dot gnu.org
X-Bugzilla-Status: NEW
X-Bugzilla-Priority: P4
X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org
X-Bugzilla-Target-Milestone: ---
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields: attachments.created
Message-ID: <bug-59396-4-xxBLlCYc91@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-59396-4@http.gcc.gnu.org/bugzilla/>
References: <bug-59396-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-01/txt/msg02141.txt.bz2
Content-length: 410

http://gcc.gnu.org/bugzilla/show_bug.cgi?idY396

--- Comment #1 from Georg-Johann Lay <gjl at gcc dot gnu.org> ---
Created attachment 31898
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id1898&actioníit
pr59396.diff: Tentative patch for avr.c

    PR target/59396
    * config/avr/avr.c (avr_set_current_function): If the first char
    of the function name is skipped, make sure it is actually '*'.


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

* [Bug c++/59886] ICE in expand_expr_real_2
  2014-01-20 11:32 [Bug c++/59886] New: ICE in expand_expr_real_2 larsbj at gullik dot net
@ 2014-01-20 14:28 ` jakub at gcc dot gnu.org
  2014-01-20 14:31 ` larsbj at gullik dot net
                   ` (7 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: jakub at gcc dot gnu.org @ 2014-01-20 14:28 UTC (permalink / raw)
  To: gcc-bugs

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

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

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

--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
You must be building with release checking, right, otherwise I don't see how
this could have made all the way till expansion.
Anyway, the suspect commit is actually r206639, we have a GIMPLE_ASSIGN with
RANGE_EXPR on the rhs, which is of course invalid.


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

* [Bug c++/59886] ICE in expand_expr_real_2
  2014-01-20 11:32 [Bug c++/59886] New: ICE in expand_expr_real_2 larsbj at gullik dot net
  2014-01-20 14:28 ` [Bug c++/59886] " jakub at gcc dot gnu.org
@ 2014-01-20 14:31 ` larsbj at gullik dot net
  2014-01-20 14:37 ` rguenth at gcc dot gnu.org
                   ` (6 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: larsbj at gullik dot net @ 2014-01-20 14:31 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from Lars Gullik Bjønnes <larsbj at gullik dot net> ---
Yes, the compiler is built with:

../gcc/configure --prefix=/opt/gcc/gcc-trunk --enable-checking=release
--enable-languages=c,c++,lto
>From gcc-bugs-return-441013-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Mon Jan 20 14:34:15 2014
Return-Path: <gcc-bugs-return-441013-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 12567 invoked by alias); 20 Jan 2014 14:34:15 -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 12537 invoked by uid 48); 20 Jan 2014 14:34:11 -0000
From: "rguenth at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug other/59889] gcj: internal compiler error: Killed: 9 (program jc1)
Date: Mon, 20 Jan 2014 14:34: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.6.4
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: rguenth at gcc dot gnu.org
X-Bugzilla-Status: WAITING
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: bug_status cf_reconfirmed_on everconfirmed
Message-ID: <bug-59889-4-tanLXGjpN0@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-59889-4@http.gcc.gnu.org/bugzilla/>
References: <bug-59889-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-01/txt/msg02155.txt.bz2
Content-length: 563

http://gcc.gnu.org/bugzilla/show_bug.cgi?idY889

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |WAITING
   Last reconfirmed|                            |2014-01-20
     Ever confirmed|0                           |1

--- Comment #2 from Richard Biener <rguenth at gcc dot gnu.org> ---
'Killed' means sth killed gcc, likely you simply need more memory (also check
ulimits).


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

* [Bug c++/59886] ICE in expand_expr_real_2
  2014-01-20 11:32 [Bug c++/59886] New: ICE in expand_expr_real_2 larsbj at gullik dot net
  2014-01-20 14:28 ` [Bug c++/59886] " jakub at gcc dot gnu.org
  2014-01-20 14:31 ` larsbj at gullik dot net
@ 2014-01-20 14:37 ` rguenth at gcc dot gnu.org
  2014-01-20 16:11 ` [Bug c++/59886] [4.9 Regression] " jakub at gcc dot gnu.org
                   ` (5 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: rguenth at gcc dot gnu.org @ 2014-01-20 14:37 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2014-01-20
     Ever confirmed|0                           |1

--- Comment #4 from Richard Biener <rguenth at gcc dot gnu.org> ---
Thus confirmed.


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

* [Bug c++/59886] [4.9 Regression] ICE in expand_expr_real_2
  2014-01-20 11:32 [Bug c++/59886] New: ICE in expand_expr_real_2 larsbj at gullik dot net
                   ` (2 preceding siblings ...)
  2014-01-20 14:37 ` rguenth at gcc dot gnu.org
@ 2014-01-20 16:11 ` jakub at gcc dot gnu.org
  2014-01-20 16:52 ` [Bug c++/59886] [4.9 Regression] C++ array init optimization results in RANGE_EXPRs in assignments jakub at gcc dot gnu.org
                   ` (4 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: jakub at gcc dot gnu.org @ 2014-01-20 16:11 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P3                          |P1
   Target Milestone|---                         |4.9.0
            Summary|ICE in expand_expr_real_2   |[4.9 Regression] ICE in
                   |                            |expand_expr_real_2

--- Comment #5 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Reduced testcase:
struct A { A (); ~A (); };
struct B { A b[4]; };
struct C { B c[5]; };
const C e = {};


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

* [Bug c++/59886] [4.9 Regression] C++ array init optimization results in RANGE_EXPRs in assignments
  2014-01-20 11:32 [Bug c++/59886] New: ICE in expand_expr_real_2 larsbj at gullik dot net
                   ` (3 preceding siblings ...)
  2014-01-20 16:11 ` [Bug c++/59886] [4.9 Regression] " jakub at gcc dot gnu.org
@ 2014-01-20 16:52 ` jakub at gcc dot gnu.org
  2014-01-20 17:48 ` jakub at gcc dot gnu.org
                   ` (3 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: jakub at gcc dot gnu.org @ 2014-01-20 16:52 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #6 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Even the const there isn't needed.

Anyway, the bug I think is that split_nonconstant_init_1 doesn't handle
RANGE_EXPR field_index in the if (TREE_CODE (value) == CONSTRUCTOR) case
(it handles it in the else if (!initializer_constant_valid_p (value,
inner_type))
case).


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

* [Bug c++/59886] [4.9 Regression] C++ array init optimization results in RANGE_EXPRs in assignments
  2014-01-20 11:32 [Bug c++/59886] New: ICE in expand_expr_real_2 larsbj at gullik dot net
                   ` (4 preceding siblings ...)
  2014-01-20 16:52 ` [Bug c++/59886] [4.9 Regression] C++ array init optimization results in RANGE_EXPRs in assignments jakub at gcc dot gnu.org
@ 2014-01-20 17:48 ` jakub at gcc dot gnu.org
  2014-01-22 19:22 ` jason at gcc dot gnu.org
                   ` (2 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: jakub at gcc dot gnu.org @ 2014-01-20 17:48 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #7 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Created attachment 31900
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=31900&action=edit
gcc49-pr59886.patch

Untested partial patch.  I believe we want to increment the num_split_elts for
all the elements in the range, not just the first one.  And I think we need a
loop around the inner split_nonconstant_init_1 emitted code, e.g. as done in
the attached patch (completely untested).  What the patch doesn't handle and
probably has to is a cleanup for it though, which if the construction throws in
the second or later iteration will just destruct everything the earlier
iterations constructed, right?  I think the current iteration will be already
properly destructed (or not constructed at all).  Jason, can you please have a
look and take this over?


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

* [Bug c++/59886] [4.9 Regression] C++ array init optimization results in RANGE_EXPRs in assignments
  2014-01-20 11:32 [Bug c++/59886] New: ICE in expand_expr_real_2 larsbj at gullik dot net
                   ` (5 preceding siblings ...)
  2014-01-20 17:48 ` jakub at gcc dot gnu.org
@ 2014-01-22 19:22 ` jason at gcc dot gnu.org
  2014-01-24 16:54 ` jason at gcc dot gnu.org
  2014-01-24 17:09 ` jason at gcc dot gnu.org
  8 siblings, 0 replies; 10+ messages in thread
From: jason at gcc dot gnu.org @ 2014-01-22 19:22 UTC (permalink / raw)
  To: gcc-bugs

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

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++/59886] [4.9 Regression] C++ array init optimization results in RANGE_EXPRs in assignments
  2014-01-20 11:32 [Bug c++/59886] New: ICE in expand_expr_real_2 larsbj at gullik dot net
                   ` (6 preceding siblings ...)
  2014-01-22 19:22 ` jason at gcc dot gnu.org
@ 2014-01-24 16:54 ` jason at gcc dot gnu.org
  2014-01-24 17:09 ` jason at gcc dot gnu.org
  8 siblings, 0 replies; 10+ messages in thread
From: jason at gcc dot gnu.org @ 2014-01-24 16:54 UTC (permalink / raw)
  To: gcc-bugs

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

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

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

--- Comment #9 from Jason Merrill <jason at gcc dot gnu.org> ---
Fixed by reverting the RANGE_EXPR change.


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

* [Bug c++/59886] [4.9 Regression] C++ array init optimization results in RANGE_EXPRs in assignments
  2014-01-20 11:32 [Bug c++/59886] New: ICE in expand_expr_real_2 larsbj at gullik dot net
                   ` (7 preceding siblings ...)
  2014-01-24 16:54 ` jason at gcc dot gnu.org
@ 2014-01-24 17:09 ` jason at gcc dot gnu.org
  8 siblings, 0 replies; 10+ messages in thread
From: jason at gcc dot gnu.org @ 2014-01-24 17:09 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #10 from Jason Merrill <jason at gcc dot gnu.org> ---
Author: jason
Date: Fri Jan 24 17:09:07 2014
New Revision: 207052

URL: http://gcc.gnu.org/viewcvs?rev=207052&root=gcc&view=rev
Log:
    PR c++/59886
    PR c++/59659
    * g++.dg/opt/value-init2.C: Remove.

Removed:
    trunk/gcc/testsuite/g++.dg/opt/value-init2.C


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

end of thread, other threads:[~2014-01-24 17:09 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-01-20 11:32 [Bug c++/59886] New: ICE in expand_expr_real_2 larsbj at gullik dot net
2014-01-20 14:28 ` [Bug c++/59886] " jakub at gcc dot gnu.org
2014-01-20 14:31 ` larsbj at gullik dot net
2014-01-20 14:37 ` rguenth at gcc dot gnu.org
2014-01-20 16:11 ` [Bug c++/59886] [4.9 Regression] " jakub at gcc dot gnu.org
2014-01-20 16:52 ` [Bug c++/59886] [4.9 Regression] C++ array init optimization results in RANGE_EXPRs in assignments jakub at gcc dot gnu.org
2014-01-20 17:48 ` jakub at gcc dot gnu.org
2014-01-22 19:22 ` jason at gcc dot gnu.org
2014-01-24 16:54 ` jason at gcc dot gnu.org
2014-01-24 17:09 ` 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).