public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/66387] New: [5/6 Regression] ICE in make_decl_rtl with lambda
@ 2015-06-02 22:29 jakub at gcc dot gnu.org
  2015-06-02 22:30 ` [Bug c++/66387] " jakub at gcc dot gnu.org
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: jakub at gcc dot gnu.org @ 2015-06-02 22:29 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 66387
           Summary: [5/6 Regression] ICE in make_decl_rtl with lambda
           Product: gcc
           Version: 5.1.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: jakub at gcc dot gnu.org
                CC: jason at gcc dot gnu.org
  Target Milestone: ---

template <typename T>
void
bar (T x)
{
  x ();
}

void
foo ()
{
  constexpr int a[1] = { 1 };
  bar ([&]{ return a[0]; });
}

ICEs with -std=c++11 and -std=c++14 starting with r217814.


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

* [Bug c++/66387] [5/6 Regression] ICE in make_decl_rtl with lambda
  2015-06-02 22:29 [Bug c++/66387] New: [5/6 Regression] ICE in make_decl_rtl with lambda jakub at gcc dot gnu.org
@ 2015-06-02 22:30 ` jakub at gcc dot gnu.org
  2015-06-05 20:38 ` jason at gcc dot gnu.org
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: jakub at gcc dot gnu.org @ 2015-06-02 22:30 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |5.2


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

* [Bug c++/66387] [5/6 Regression] ICE in make_decl_rtl with lambda
  2015-06-02 22:29 [Bug c++/66387] New: [5/6 Regression] ICE in make_decl_rtl with lambda jakub at gcc dot gnu.org
  2015-06-02 22:30 ` [Bug c++/66387] " jakub at gcc dot gnu.org
@ 2015-06-05 20:38 ` jason at gcc dot gnu.org
  2015-06-09 15:27 ` jason at gcc dot gnu.org
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: jason at gcc dot gnu.org @ 2015-06-05 20:38 UTC (permalink / raw)
  To: gcc-bugs

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

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] 9+ messages in thread

* [Bug c++/66387] [5/6 Regression] ICE in make_decl_rtl with lambda
  2015-06-02 22:29 [Bug c++/66387] New: [5/6 Regression] ICE in make_decl_rtl with lambda jakub at gcc dot gnu.org
  2015-06-02 22:30 ` [Bug c++/66387] " jakub at gcc dot gnu.org
  2015-06-05 20:38 ` jason at gcc dot gnu.org
@ 2015-06-09 15:27 ` jason at gcc dot gnu.org
  2015-06-09 17:19 ` jason at gcc dot gnu.org
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: jason at gcc dot gnu.org @ 2015-06-09 15:27 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from Jason Merrill <jason at gcc dot gnu.org> ---
Author: jason
Date: Tue Jun  9 15:27:01 2015
New Revision: 224287

URL: https://gcc.gnu.org/viewcvs?rev=224287&root=gcc&view=rev
Log:
        PR c++/66387
        * semantics.c (process_outer_var_ref): Make sure the value is
        actually constant before returning it.
        * typeck.c (cp_build_array_ref): Allow subscripting non-lvalue
        array.

Added:
    trunk/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-const5.C
Modified:
    trunk/gcc/cp/ChangeLog
    trunk/gcc/cp/semantics.c
    trunk/gcc/cp/typeck.c


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

* [Bug c++/66387] [5/6 Regression] ICE in make_decl_rtl with lambda
  2015-06-02 22:29 [Bug c++/66387] New: [5/6 Regression] ICE in make_decl_rtl with lambda jakub at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2015-06-09 15:27 ` jason at gcc dot gnu.org
@ 2015-06-09 17:19 ` jason at gcc dot gnu.org
  2015-06-14 17:08 ` trippels at gcc dot gnu.org
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: jason at gcc dot gnu.org @ 2015-06-09 17:19 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from Jason Merrill <jason at gcc dot gnu.org> ---
Author: jason
Date: Tue Jun  9 17:19:18 2015
New Revision: 224292

URL: https://gcc.gnu.org/viewcvs?rev=224292&root=gcc&view=rev
Log:
        PR c++/66387
        * semantics.c (process_outer_var_ref): Make sure the value is
        actually constant before returning it.
        * typeck.c (cp_build_array_ref): Allow subscripting non-lvalue
        array.

Added:
    branches/gcc-5-branch/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-const5.C
Modified:
    branches/gcc-5-branch/gcc/cp/ChangeLog
    branches/gcc-5-branch/gcc/cp/semantics.c
    branches/gcc-5-branch/gcc/cp/typeck.c


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

* [Bug c++/66387] [5/6 Regression] ICE in make_decl_rtl with lambda
  2015-06-02 22:29 [Bug c++/66387] New: [5/6 Regression] ICE in make_decl_rtl with lambda jakub at gcc dot gnu.org
                   ` (3 preceding siblings ...)
  2015-06-09 17:19 ` jason at gcc dot gnu.org
@ 2015-06-14 17:08 ` trippels at gcc dot gnu.org
  2015-06-16 14:49 ` jason at gcc dot gnu.org
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: trippels at gcc dot gnu.org @ 2015-06-14 17:08 UTC (permalink / raw)
  To: gcc-bugs

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

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

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

--- Comment #4 from Markus Trippelsdorf <trippels at gcc dot gnu.org> ---
Created attachment 35778
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=35778&action=edit
Somewhat reduced testcase

A variant that is still unfixed is attached:

trippels@gcc2-power8 example % g++ -c -std=c++14 tag_dispatching.ii
tag_dispatching.ii: In lambda function:
tag_dispatching.ii:113:38: internal compiler error: in make_decl_rtl, at
varasm.c:1313
     N.times.with_index([&](auto) { N - hana::size_t<1>; });
                                      ^
0x10a160d3 make_decl_rtl(tree_node*)
        ../../gcc/gcc/varasm.c:1309
0x104639eb expand_expr_real_1(tree_node*, rtx_def*, machine_mode,
expand_modifier, rtx_def**, bool)
        ../../gcc/gcc/expr.c:9581
0x1046d773 expand_expr
        ../../gcc/gcc/expr.h:254
0x1046d773 expand_expr_addr_expr_1
        ../../gcc/gcc/expr.c:7722
0x1046227b expand_expr_addr_expr
        ../../gcc/gcc/expr.c:7850
0x1046227b expand_expr_real_1(tree_node*, rtx_def*, machine_mode,
expand_modifier, rtx_def**, bool)
        ../../gcc/gcc/expr.c:10724
0x1046dd7f store_expr_with_bounds(tree_node*, rtx_def*, int, bool, tree_node*)
        ../../gcc/gcc/expr.c:5385
0x1047360f expand_assignment(tree_node*, tree_node*, bool)
        ../../gcc/gcc/expr.c:5154
0x10351457 expand_gimple_stmt_1
        ../../gcc/gcc/cfgexpand.c:3401
0x10351457 expand_gimple_stmt
        ../../gcc/gcc/cfgexpand.c:3497
0x10357353 expand_gimple_basic_block
        ../../gcc/gcc/cfgexpand.c:5509
0x10359207 execute
        ../../gcc/gcc/cfgexpand.c:6127
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.


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

* [Bug c++/66387] [5/6 Regression] ICE in make_decl_rtl with lambda
  2015-06-02 22:29 [Bug c++/66387] New: [5/6 Regression] ICE in make_decl_rtl with lambda jakub at gcc dot gnu.org
                   ` (4 preceding siblings ...)
  2015-06-14 17:08 ` trippels at gcc dot gnu.org
@ 2015-06-16 14:49 ` jason at gcc dot gnu.org
  2015-06-17 14:33 ` jason at gcc dot gnu.org
  2015-06-17 14:58 ` trippels at gcc dot gnu.org
  7 siblings, 0 replies; 9+ messages in thread
From: jason at gcc dot gnu.org @ 2015-06-16 14:49 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #5 from Jason Merrill <jason at gcc dot gnu.org> ---
Author: jason
Date: Tue Jun 16 14:48:56 2015
New Revision: 224521

URL: https://gcc.gnu.org/viewcvs?rev=224521&root=gcc&view=rev
Log:
        PR c++/66387
        * pt.c (tsubst_copy) [VAR_DECL]: Use process_outer_var_ref.

Added:
    trunk/gcc/testsuite/g++.dg/cpp1y/lambda-generic-ice2.C
Modified:
    trunk/gcc/cp/ChangeLog
    trunk/gcc/cp/pt.c
    trunk/gcc/cp/semantics.c


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

* [Bug c++/66387] [5/6 Regression] ICE in make_decl_rtl with lambda
  2015-06-02 22:29 [Bug c++/66387] New: [5/6 Regression] ICE in make_decl_rtl with lambda jakub at gcc dot gnu.org
                   ` (5 preceding siblings ...)
  2015-06-16 14:49 ` jason at gcc dot gnu.org
@ 2015-06-17 14:33 ` jason at gcc dot gnu.org
  2015-06-17 14:58 ` trippels at gcc dot gnu.org
  7 siblings, 0 replies; 9+ messages in thread
From: jason at gcc dot gnu.org @ 2015-06-17 14:33 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #6 from Jason Merrill <jason at gcc dot gnu.org> ---
Author: jason
Date: Wed Jun 17 14:33:08 2015
New Revision: 224558

URL: https://gcc.gnu.org/viewcvs?rev=224558&root=gcc&view=rev
Log:
        PR c++/66387
        * pt.c (tsubst_copy) [VAR_DECL]: Use process_outer_var_ref.

Added:
    branches/gcc-5-branch/gcc/testsuite/g++.dg/cpp1y/lambda-generic-ice2.C
Modified:
    branches/gcc-5-branch/gcc/cp/ChangeLog
    branches/gcc-5-branch/gcc/cp/pt.c
    branches/gcc-5-branch/gcc/cp/semantics.c


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

* [Bug c++/66387] [5/6 Regression] ICE in make_decl_rtl with lambda
  2015-06-02 22:29 [Bug c++/66387] New: [5/6 Regression] ICE in make_decl_rtl with lambda jakub at gcc dot gnu.org
                   ` (6 preceding siblings ...)
  2015-06-17 14:33 ` jason at gcc dot gnu.org
@ 2015-06-17 14:58 ` trippels at gcc dot gnu.org
  7 siblings, 0 replies; 9+ messages in thread
From: trippels at gcc dot gnu.org @ 2015-06-17 14:58 UTC (permalink / raw)
  To: gcc-bugs

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

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

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

--- Comment #7 from Markus Trippelsdorf <trippels at gcc dot gnu.org> ---
Fixed.


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

end of thread, other threads:[~2015-06-17 14:58 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-06-02 22:29 [Bug c++/66387] New: [5/6 Regression] ICE in make_decl_rtl with lambda jakub at gcc dot gnu.org
2015-06-02 22:30 ` [Bug c++/66387] " jakub at gcc dot gnu.org
2015-06-05 20:38 ` jason at gcc dot gnu.org
2015-06-09 15:27 ` jason at gcc dot gnu.org
2015-06-09 17:19 ` jason at gcc dot gnu.org
2015-06-14 17:08 ` trippels at gcc dot gnu.org
2015-06-16 14:49 ` jason at gcc dot gnu.org
2015-06-17 14:33 ` jason at gcc dot gnu.org
2015-06-17 14:58 ` 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).