public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "marxin at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/94288] co_await in while loop crashes g++
Date: Wed, 25 Mar 2020 09:17:24 +0000	[thread overview]
Message-ID: <bug-94288-4-iMYnWyqYdN@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-94288-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #6 from Martin Liška <marxin at gcc dot gnu.org> ---
(In reply to Iain Sandoe from comment #5)
> (In reply to Martin Liška from comment #4)
> > (In reply to Iain Sandoe from comment #3)
> > > thanks for the report.  The reduced testcase at c#2 doesn't fire for me once
> > > pending updates are applied. However, the attached case preprocessed code
> > > does; I think we will be able to make suitable test-cases, once the analysis
> > > is done.
> > 
> > If you point me to the pending patches, I can make reduction based on that?
> 
> (the reduction is not urgent, I've an idea about the problem, hopefully have
> a few cycles on it tomorrow)
> 
> unreviewed:
> https://gcc.gnu.org/pipermail/gcc-patches/2020-March/542407.html
> review-in-progress:
> https://gcc.gnu.org/pipermail/gcc-patches/2020-March/542411.html
> 
> (but thanks for the offer!)

I've just applied both patches and I can still confirm that I see the failure:

$ g++ -c pr94288-reduced.cc -fcoroutines  -std=c++20
pr94288-reduced.cc: In function ‘void _Z3foov.actor(foo()::_Z3foov.frame*)’:
pr94288-reduced.cc:34:3: internal compiler error: in fold_convert_loc, at
fold-const.c:2435
   34 | D foo() { co_await foo(); }
      |   ^~~
0x747db2 fold_convert_loc(unsigned int, tree_node*, tree_node*)
        ../../gcc/fold-const.c:2435
0xdecd37 gimple_boolify(tree_node*)
        ../../gcc/gimplify.c:3960
0xdf52c8 gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*),
int)
        ../../gcc/gimplify.c:13632
0xdf2d07 gimplify_modify_expr
        ../../gcc/gimplify.c:5766
0xdf4eb8 gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*),
int)
        ../../gcc/gimplify.c:13602
0xdf8996 gimplify_stmt(tree_node**, gimple**)
        ../../gcc/gimplify.c:6823
0xdf5f39 gimplify_cleanup_point_expr
        ../../gcc/gimplify.c:6565
0xdf5f39 gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*),
int)
        ../../gcc/gimplify.c:13994
0xdfc41d gimplify_cond_expr
        ../../gcc/gimplify.c:4177
0xdf5260 gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*),
int)
        ../../gcc/gimplify.c:13559
0xdf8996 gimplify_stmt(tree_node**, gimple**)
        ../../gcc/gimplify.c:6823
0xdf6ab3 gimplify_statement_list
        ../../gcc/gimplify.c:1869
0xdf6ab3 gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*),
int)
        ../../gcc/gimplify.c:14046
0xdf8996 gimplify_stmt(tree_node**, gimple**)
        ../../gcc/gimplify.c:6823
0xdf6ab3 gimplify_statement_list
        ../../gcc/gimplify.c:1869
0xdf6ab3 gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*),
int)
        ../../gcc/gimplify.c:14046
0xdf8996 gimplify_stmt(tree_node**, gimple**)
        ../../gcc/gimplify.c:6823
0xdf4f1c gimplify_and_add(tree_node*, gimple**)
        ../../gcc/gimplify.c:486
0xdf4f1c gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*),
int)
        ../../gcc/gimplify.c:13953
0xdf8996 gimplify_stmt(tree_node**, gimple**)
        ../../gcc/gimplify.c:6823
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.

  parent reply	other threads:[~2020-03-25  9:17 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-23 16:59 [Bug c++/94288] New: " chbugzilla at outlook dot com
2020-03-23 17:08 ` [Bug c++/94288] " marxin at gcc dot gnu.org
2020-03-23 17:21 ` marxin at gcc dot gnu.org
2020-03-24 16:33 ` iains at gcc dot gnu.org
2020-03-24 21:04 ` marxin at gcc dot gnu.org
2020-03-24 21:08 ` iains at gcc dot gnu.org
2020-03-25  9:17 ` marxin at gcc dot gnu.org [this message]
2020-04-23 19:50 ` cvs-commit at gcc dot gnu.org
2020-04-24 12:55 ` iains at gcc dot gnu.org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-94288-4-iMYnWyqYdN@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).