public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "hstong at ca dot ibm.com" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/96960] New: ICE in tsubst_copy_and_build, at cp/pt.c:20531 from lambda in return-type-requirement Date: Mon, 07 Sep 2020 18:11:30 +0000 [thread overview] Message-ID: <bug-96960-4@http.gcc.gnu.org/bugzilla/> (raw) https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96960 Bug ID: 96960 Summary: ICE in tsubst_copy_and_build, at cp/pt.c:20531 from lambda in return-type-requirement Product: gcc Version: 11.0 Status: UNCONFIRMED Keywords: ice-on-valid-code Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: hstong at ca dot ibm.com Target Milestone: --- The following program ICEs with GCC. The ICE appears to related to the lambda expression in the return-type-requirement ### SOURCE (<stdin>): template <typename, typename> concept C0 = true; template <typename T> concept C = requires(T t) { { 42 } -> C0<char [([] { return 42; }())]>; }; static_assert(C<int>); ### COMPILER INVOCATION: g++ -fsyntax-only -std=c++20 -xc++ - ### ACTUAL OUTPUT: <stdin>:6:23: internal compiler error: in tsubst_copy_and_build, at cp/pt.c:20531 0x5c9d7a tsubst_copy_and_build(tree_node*, tree_node*, int, tree_node*, bool, bool) ../../source/gcc/cp/pt.c:20531 0x72c6bd tsubst_copy_and_build(tree_node*, tree_node*, int, tree_node*, bool, bool) ../../source/gcc/cp/pt.c:19873 0x72c6bd tsubst_copy_and_build(tree_node*, tree_node*, int, tree_node*, bool, bool) ../../source/gcc/cp/pt.c:19873 0x73e1e4 tsubst_copy_and_build(tree_node*, tree_node*, int, tree_node*, bool, bool) ../../source/gcc/cp/pt.c:19266 0x73e1e4 tsubst_expr(tree_node*, tree_node*, int, tree_node*, bool) ../../source/gcc/cp/pt.c:18879 0x72f59b tsubst_expr(tree_node*, tree_node*, int, tree_node*, bool) ../../source/gcc/cp/pt.c:17933 0x72f59b tsubst(tree_node*, tree_node*, int, tree_node*) ../../source/gcc/cp/pt.c:15349 0x72f1e3 tsubst(tree_node*, tree_node*, int, tree_node*) ../../source/gcc/cp/pt.c:15792 0x742ec2 tsubst_template_args(tree_node*, tree_node*, int, tree_node*) ../../source/gcc/cp/pt.c:13215 0x72c209 tsubst_copy_and_build(tree_node*, tree_node*, int, tree_node*, bool, bool) ../../source/gcc/cp/pt.c:19333 0x73e1e4 tsubst_copy_and_build(tree_node*, tree_node*, int, tree_node*, bool, bool) ../../source/gcc/cp/pt.c:19266 0x73e1e4 tsubst_expr(tree_node*, tree_node*, int, tree_node*, bool) ../../source/gcc/cp/pt.c:18879 0x647cf7 tsubst_constraint(tree_node*, tree_node*, int, tree_node*) ../../source/gcc/cp/constraint.cc:2402 0x647cf7 type_deducible_p ../../source/gcc/cp/constraint.cc:1932 0x64c23a tsubst_requires_expr(tree_node*, tree_node*, int, tree_node*) ../../source/gcc/cp/constraint.cc:2013 0x72c55e tsubst_copy_and_build(tree_node*, tree_node*, int, tree_node*, bool, bool) ../../source/gcc/cp/pt.c:20566 0x73e1e4 tsubst_copy_and_build(tree_node*, tree_node*, int, tree_node*, bool, bool) ../../source/gcc/cp/pt.c:19266 0x73e1e4 tsubst_expr(tree_node*, tree_node*, int, tree_node*, bool) ../../source/gcc/cp/pt.c:18879 0x64ba61 satisfy_constraint_r ../../source/gcc/cp/constraint.cc:2610 0x64bee8 satisfy_constraint ../../source/gcc/cp/constraint.cc:2692 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. ### EXPECTED OUTPUT: (clean compile) ### COMPILER VERSION INFO (g++ -v): Using built-in specs. COLLECT_GCC=/opt/wandbox/gcc-head/bin/g++ COLLECT_LTO_WRAPPER=/opt/wandbox/gcc-head/libexec/gcc/x86_64-pc-linux-gnu/11.0.0/lto-wrapper Target: x86_64-pc-linux-gnu Configured with: ../source/configure --prefix=/opt/wandbox/gcc-head --enable-languages=c,c++ --disable-multilib --without-ppl --without-cloog-ppl --enable-checking=release --disable-nls --enable-lto LDFLAGS=-Wl,-rpath,/opt/wandbox/gcc-head/lib,-rpath,/opt/wandbox/gcc-head/lib64,-rpath,/opt/wandbox/gcc-head/lib32 Thread model: posix Supported LTO compression algorithms: zlib gcc version 11.0.0 20200906 (experimental) (GCC)
next reply other threads:[~2020-09-07 18:11 UTC|newest] Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-09-07 18:11 hstong at ca dot ibm.com [this message] 2020-09-11 13:31 ` [Bug c++/96960] " mpolacek at gcc dot gnu.org 2020-12-03 19:18 ` [Bug c++/96960] [C++20] " jason at gcc dot gnu.org 2021-02-16 15:28 ` ppalka at gcc dot gnu.org 2021-03-02 12:50 ` cvs-commit at gcc dot gnu.org 2021-03-03 23:02 ` ppalka 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-96960-4@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: linkBe 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).