public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/59271] New: a.C:16:21: internal compiler error: in strip_typedefs, at cp/tree.c:1315
@ 2013-11-24  3:36 darpeer at hotmail dot com
  2013-11-24  3:38 ` [Bug c++/59271] " darpeer at hotmail dot com
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: darpeer at hotmail dot com @ 2013-11-24  3:36 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 59271
           Summary: a.C:16:21: internal compiler error: in strip_typedefs,
                    at cp/tree.c:1315
           Product: gcc
           Version: 4.9.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: darpeer at hotmail dot com

void f(int n)
{
  int  a[n];

  for (auto& i : a)
    {
      i = &i - a;
    }

  [&a] (auto m)
    {
      for (auto i : a)
    {
      cout << i << endl;
    }

      return m;
    };
}

g++ -std=c++1y -ggdb3 -o a a.C
a.C: In lambda function:
a.C:16:21: internal compiler error: in strip_typedefs, at cp/tree.c:1315
       for (auto i : a)
                     ^
0x74b642 strip_typedefs(tree_node*)
    ../../trunk/gcc/cp/tree.c:1315
0x74b221 strip_typedefs(tree_node*)
    ../../trunk/gcc/cp/tree.c:1190
0x5e1b22 canonicalize_type_argument
    ../../trunk/gcc/cp/pt.c:6231
0x6278f9 unify
    ../../trunk/gcc/cp/pt.c:17445
0x6301f8 unify_one_argument
    ../../trunk/gcc/cp/pt.c:16116
0x624fe9 type_unification_real
    ../../trunk/gcc/cp/pt.c:16188
0x638d02 do_auto_deduction(tree_node*, tree_node*, tree_node*)
    ../../trunk/gcc/cp/pt.c:21418
0x68e4b3 build_range_temp
    ../../trunk/gcc/cp/parser.c:10068
0x6c1ddb do_range_for_auto_deduction
    ../../trunk/gcc/cp/parser.c:10091
0x6c1ddb cp_parser_range_for
    ../../trunk/gcc/cp/parser.c:10046
0x6c1ddb cp_parser_for
    ../../trunk/gcc/cp/parser.c:9970
0x6c1ddb cp_parser_iteration_statement
    ../../trunk/gcc/cp/parser.c:10436
0x6a0259 cp_parser_statement
    ../../trunk/gcc/cp/parser.c:9297
0x6a1419 cp_parser_statement_seq_opt
    ../../trunk/gcc/cp/parser.c:9674
0x6a2b18 cp_parser_lambda_body
    ../../trunk/gcc/cp/parser.c:9178
0x6a2b18 cp_parser_lambda_expression
    ../../trunk/gcc/cp/parser.c:8693
0x6a2b18 cp_parser_primary_expression
    ../../trunk/gcc/cp/parser.c:4309
0x6a49e9 cp_parser_postfix_expression
    ../../trunk/gcc/cp/parser.c:5908
0x6a71c8 cp_parser_unary_expression
    ../../trunk/gcc/cp/parser.c:7109
0x6a7e5f cp_parser_binary_expression
    ../../trunk/gcc/cp/parser.c:7813
Please submit a full bug report,
with preprocessed source if appropriate.


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

* [Bug c++/59271] a.C:16:21: internal compiler error: in strip_typedefs, at cp/tree.c:1315
  2013-11-24  3:36 [Bug c++/59271] New: a.C:16:21: internal compiler error: in strip_typedefs, at cp/tree.c:1315 darpeer at hotmail dot com
@ 2013-11-24  3:38 ` darpeer at hotmail dot com
  2013-11-24 12:21 ` [Bug c++/59271] [4.9 Regression] " mpolacek at gcc dot gnu.org
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: darpeer at hotmail dot com @ 2013-11-24  3:38 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #1 from darpeer at hotmail dot com ---
#include <iostream>

using namespace std;

void f(int n)
{
  int  a[n];

  for (auto& i : a)
    {
      i = &i - a;
    }

  [&a] (auto m)
    {
      for (auto i : a)
    {
      cout << i << endl;
    }

      return m;
    };
}

main()
{
  f(12);
}


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

* [Bug c++/59271] [4.9 Regression] a.C:16:21: internal compiler error: in strip_typedefs, at cp/tree.c:1315
  2013-11-24  3:36 [Bug c++/59271] New: a.C:16:21: internal compiler error: in strip_typedefs, at cp/tree.c:1315 darpeer at hotmail dot com
  2013-11-24  3:38 ` [Bug c++/59271] " darpeer at hotmail dot com
@ 2013-11-24 12:21 ` mpolacek at gcc dot gnu.org
  2013-11-25  9:16 ` rguenth at gcc dot gnu.org
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2013-11-24 12:21 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2013-11-24
                 CC|                            |mpolacek at gcc dot gnu.org
      Known to work|                            |4.8.2
   Target Milestone|---                         |4.9.0
            Summary|a.C:16:21: internal         |[4.9 Regression] a.C:16:21:
                   |compiler error: in          |internal compiler error: in
                   |strip_typedefs, at          |strip_typedefs, at
                   |cp/tree.c:1315              |cp/tree.c:1315
     Ever confirmed|0                           |1
      Known to fail|                            |4.9.0

--- Comment #2 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
Confirmed.


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

* [Bug c++/59271] [4.9 Regression] a.C:16:21: internal compiler error: in strip_typedefs, at cp/tree.c:1315
  2013-11-24  3:36 [Bug c++/59271] New: a.C:16:21: internal compiler error: in strip_typedefs, at cp/tree.c:1315 darpeer at hotmail dot com
  2013-11-24  3:38 ` [Bug c++/59271] " darpeer at hotmail dot com
  2013-11-24 12:21 ` [Bug c++/59271] [4.9 Regression] " mpolacek at gcc dot gnu.org
@ 2013-11-25  9:16 ` rguenth at gcc dot gnu.org
  2013-11-28 12:07 ` jakub at gcc dot gnu.org
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: rguenth at gcc dot gnu.org @ 2013-11-25  9:16 UTC (permalink / raw)
  To: gcc-bugs

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

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

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


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

* [Bug c++/59271] [4.9 Regression] a.C:16:21: internal compiler error: in strip_typedefs, at cp/tree.c:1315
  2013-11-24  3:36 [Bug c++/59271] New: a.C:16:21: internal compiler error: in strip_typedefs, at cp/tree.c:1315 darpeer at hotmail dot com
                   ` (2 preceding siblings ...)
  2013-11-25  9:16 ` rguenth at gcc dot gnu.org
@ 2013-11-28 12:07 ` jakub at gcc dot gnu.org
  2013-12-24  4:22 ` jason at gcc dot gnu.org
  2013-12-27 21:53 ` jason at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: jakub at gcc dot gnu.org @ 2013-11-28 12:07 UTC (permalink / raw)
  To: gcc-bugs

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

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

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

--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Even more reduced testcase:
void
foo (int n)
{
  int a[n];
  [&a] (auto m)
    {
      for (auto i : a)
    m += i;
      return m;
    };
}


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

* [Bug c++/59271] [4.9 Regression] a.C:16:21: internal compiler error: in strip_typedefs, at cp/tree.c:1315
  2013-11-24  3:36 [Bug c++/59271] New: a.C:16:21: internal compiler error: in strip_typedefs, at cp/tree.c:1315 darpeer at hotmail dot com
                   ` (3 preceding siblings ...)
  2013-11-28 12:07 ` jakub at gcc dot gnu.org
@ 2013-12-24  4:22 ` jason at gcc dot gnu.org
  2013-12-27 21:53 ` jason at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: jason at gcc dot gnu.org @ 2013-12-24  4:22 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from Jason Merrill <jason at gcc dot gnu.org> ---
Author: jason
Date: Tue Dec 24 04:22:23 2013
New Revision: 206193

URL: http://gcc.gnu.org/viewcvs?rev=206193&root=gcc&view=rev
Log:
    PR c++/59271
    * lambda.c (build_capture_proxy): Use build_cplus_array_type.

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


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

* [Bug c++/59271] [4.9 Regression] a.C:16:21: internal compiler error: in strip_typedefs, at cp/tree.c:1315
  2013-11-24  3:36 [Bug c++/59271] New: a.C:16:21: internal compiler error: in strip_typedefs, at cp/tree.c:1315 darpeer at hotmail dot com
                   ` (4 preceding siblings ...)
  2013-12-24  4:22 ` jason at gcc dot gnu.org
@ 2013-12-27 21:53 ` jason at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: jason at gcc dot gnu.org @ 2013-12-27 21:53 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |jason at gcc dot gnu.org
         Resolution|---                         |FIXED
           Assignee|unassigned at gcc dot gnu.org      |jason at gcc dot gnu.org

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


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

end of thread, other threads:[~2013-12-27 21:53 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-11-24  3:36 [Bug c++/59271] New: a.C:16:21: internal compiler error: in strip_typedefs, at cp/tree.c:1315 darpeer at hotmail dot com
2013-11-24  3:38 ` [Bug c++/59271] " darpeer at hotmail dot com
2013-11-24 12:21 ` [Bug c++/59271] [4.9 Regression] " mpolacek at gcc dot gnu.org
2013-11-25  9:16 ` rguenth at gcc dot gnu.org
2013-11-28 12:07 ` jakub at gcc dot gnu.org
2013-12-24  4:22 ` jason at gcc dot gnu.org
2013-12-27 21:53 ` 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).