public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/67846] New: ICE on code with lambda expression on x86_64-linux-gnu in check_return_expr, at cp/typeck.c:8609
@ 2015-10-05  4:08 su at cs dot ucdavis.edu
  2015-10-05 10:12 ` [Bug c++/67846] " mpolacek at gcc dot gnu.org
  0 siblings, 1 reply; 2+ messages in thread
From: su at cs dot ucdavis.edu @ 2015-10-05  4:08 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 67846
           Summary: ICE on code with lambda expression on x86_64-linux-gnu
                    in check_return_expr, at cp/typeck.c:8609
           Product: gcc
           Version: 6.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: su at cs dot ucdavis.edu
  Target Milestone: ---

The following code causes an ICE when compiled with the current gcc trunk on
x86_64-linux-gnu.  


$ g++-trunk -v
Using built-in specs.
COLLECT_GCC=g++-trunk
COLLECT_LTO_WRAPPER=/usr/local/gcc-trunk/libexec/gcc/x86_64-pc-linux-gnu/6.0.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: ../gcc-trunk/configure --prefix=/usr/local/gcc-trunk
--enable-languages=c,c++ --disable-werror --enable-multilib
Thread model: posix
gcc version 6.0.0 20151004 (experimental) [trunk revision 228457] (GCC) 
$ 
$ g++-trunk -c small.cc
small.cc: In lambda function:
small.cc:5:23: error: invalid use of member function (did you forget the ‘()’
?)
     [=] { return foo; };
                       ^
small.cc:5:23: internal compiler error: in check_return_expr, at
cp/typeck.c:8609
0x723c8d check_return_expr(tree_node*, bool*)
        ../../gcc-trunk/gcc/cp/typeck.c:8609
0x7610be finish_return_stmt(tree_node*)
        ../../gcc-trunk/gcc/cp/semantics.c:873
0x705e44 cp_parser_lambda_body
        ../../gcc-trunk/gcc/cp/parser.c:9855
0x705e44 cp_parser_lambda_expression
        ../../gcc-trunk/gcc/cp/parser.c:9360
0x6d92b7 cp_parser_primary_expression
        ../../gcc-trunk/gcc/cp/parser.c:4713
0x6e410b cp_parser_postfix_expression
        ../../gcc-trunk/gcc/cp/parser.c:6404
0x6e4c99 cp_parser_unary_expression
        ../../gcc-trunk/gcc/cp/parser.c:7689
0x6e58d7 cp_parser_binary_expression
        ../../gcc-trunk/gcc/cp/parser.c:8442
0x6e5fdf cp_parser_assignment_expression
        ../../gcc-trunk/gcc/cp/parser.c:8700
0x6e89f1 cp_parser_expression
        ../../gcc-trunk/gcc/cp/parser.c:8854
0x6e9cb6 cp_parser_expression_statement
        ../../gcc-trunk/gcc/cp/parser.c:10270
0x6ff07a cp_parser_statement
        ../../gcc-trunk/gcc/cp/parser.c:10121
0x6ffee9 cp_parser_statement_seq_opt
        ../../gcc-trunk/gcc/cp/parser.c:10393
0x70004b cp_parser_compound_statement
        ../../gcc-trunk/gcc/cp/parser.c:10347
0x70025b cp_parser_function_body
        ../../gcc-trunk/gcc/cp/parser.c:20112
0x70025b cp_parser_ctor_initializer_opt_and_function_body
        ../../gcc-trunk/gcc/cp/parser.c:20148
0x7010f9 cp_parser_function_definition_after_declarator
        ../../gcc-trunk/gcc/cp/parser.c:24755
0x704cdc cp_parser_late_parsing_for_member
        ../../gcc-trunk/gcc/cp/parser.c:25559
0x6e0199 cp_parser_class_specifier_1
        ../../gcc-trunk/gcc/cp/parser.c:20972
0x6e0199 cp_parser_class_specifier
        ../../gcc-trunk/gcc/cp/parser.c:20998
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.
$ 


--------------------------


class A
{
  void foo ()
  {
    [=] { return foo; };
  }
};
>From gcc-bugs-return-498741-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Mon Oct 05 05:13:59 2015
Return-Path: <gcc-bugs-return-498741-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 96709 invoked by alias); 5 Oct 2015 05:13:58 -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 96689 invoked by uid 48); 5 Oct 2015 05:13:53 -0000
From: "su at cs dot ucdavis.edu" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/67847] New: ICE on (invalid) nested enum declaration on x86_64-linux-gnu in is_ancestor, at cp/name-lookup.c:2771
Date: Mon, 05 Oct 2015 05:13:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: new
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: c++
X-Bugzilla-Version: 6.0
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: su at cs dot ucdavis.edu
X-Bugzilla-Status: UNCONFIRMED
X-Bugzilla-Resolution:
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_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone
Message-ID: <bug-67847-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: 2015-10/txt/msg00296.txt.bz2
Content-length: 3105

https://gcc.gnu.org/bugzilla/show_bug.cgi?idg847

            Bug ID: 67847
           Summary: ICE on (invalid) nested enum declaration on
                    x86_64-linux-gnu in is_ancestor, at
                    cp/name-lookup.c:2771
           Product: gcc
           Version: 6.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: su at cs dot ucdavis.edu
  Target Milestone: ---

The following code causes an ICE when compiled with the current gcc trunk (and
earlier GCC versions) on x86_64-linux-gnu.


$ g++-trunk -v
Using built-in specs.
COLLECT_GCC=g++-trunk
COLLECT_LTO_WRAPPER=/usr/local/gcc-trunk/libexec/gcc/x86_64-pc-linux-gnu/6.0.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: ../gcc-trunk/configure --prefix=/usr/local/gcc-trunk
--enable-languages=c,c++ --disable-werror --enable-multilib
Thread model: posix
gcc version 6.0.0 20151004 (experimental) [trunk revision 228457] (GCC)
$
$ g++-trunk -c small.cc
small.cc:4:11: internal compiler error: in is_ancestor, at
cp/name-lookup.c:2771
   enum T::Color {R, G, B} c;
           ^
0x7b285c is_ancestor(tree_node*, tree_node*)
        ../../gcc-trunk/gcc/cp/name-lookup.c:2770
0x6f1b84 cp_parser_enum_specifier
        ../../gcc-trunk/gcc/cp/parser.c:16736
0x6df7e5 cp_parser_type_specifier
        ../../gcc-trunk/gcc/cp/parser.c:15330
0x6f067b cp_parser_decl_specifier_seq
        ../../gcc-trunk/gcc/cp/parser.c:12324
0x703ef9 cp_parser_member_declaration
        ../../gcc-trunk/gcc/cp/parser.c:21718
0x6dfa34 cp_parser_member_specification_opt
        ../../gcc-trunk/gcc/cp/parser.c:21570
0x6dfa34 cp_parser_class_specifier_1
        ../../gcc-trunk/gcc/cp/parser.c:20762
0x6dfa34 cp_parser_class_specifier
        ../../gcc-trunk/gcc/cp/parser.c:20998
0x6dfa34 cp_parser_type_specifier
        ../../gcc-trunk/gcc/cp/parser.c:15358
0x6f067b cp_parser_decl_specifier_seq
        ../../gcc-trunk/gcc/cp/parser.c:12324
0x702828 cp_parser_single_declaration
        ../../gcc-trunk/gcc/cp/parser.c:25124
0x702bbb cp_parser_template_declaration_after_parameters
        ../../gcc-trunk/gcc/cp/parser.c:24816
0x7037a4 cp_parser_explicit_template_declaration
        ../../gcc-trunk/gcc/cp/parser.c:25051
0x7037a4 cp_parser_template_declaration_after_export
        ../../gcc-trunk/gcc/cp/parser.c:25069
0x70c179 cp_parser_declaration
        ../../gcc-trunk/gcc/cp/parser.c:11691
0x70a53a cp_parser_declaration_seq_opt
        ../../gcc-trunk/gcc/cp/parser.c:11613
0x70a880 cp_parser_translation_unit
        ../../gcc-trunk/gcc/cp/parser.c:4169
0x70a880 c_parse_file()
        ../../gcc-trunk/gcc/cp/parser.c:34599
0x857542 c_common_parse_file()
        ../../gcc-trunk/gcc/c-family/c-opts.c:1064
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.
$


--------------------------------


template < typename T >
class D
{
  enum T::Color {R, G, B} c;
};


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

* [Bug c++/67846] ICE on code with lambda expression on x86_64-linux-gnu in check_return_expr, at cp/typeck.c:8609
  2015-10-05  4:08 [Bug c++/67846] New: ICE on code with lambda expression on x86_64-linux-gnu in check_return_expr, at cp/typeck.c:8609 su at cs dot ucdavis.edu
@ 2015-10-05 10:12 ` mpolacek at gcc dot gnu.org
  0 siblings, 0 replies; 2+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2015-10-05 10:12 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2015-10-05
                 CC|                            |mpolacek at gcc dot gnu.org
     Ever confirmed|0                           |1

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


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

end of thread, other threads:[~2015-10-05 10:12 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-10-05  4:08 [Bug c++/67846] New: ICE on code with lambda expression on x86_64-linux-gnu in check_return_expr, at cp/typeck.c:8609 su at cs dot ucdavis.edu
2015-10-05 10:12 ` [Bug c++/67846] " mpolacek 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).