public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/96960] New: ICE in tsubst_copy_and_build, at cp/pt.c:20531 from lambda in return-type-requirement
@ 2020-09-07 18:11 hstong at ca dot ibm.com
  2020-09-11 13:31 ` [Bug c++/96960] " mpolacek at gcc dot gnu.org
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: hstong at ca dot ibm.com @ 2020-09-07 18:11 UTC (permalink / raw)
  To: gcc-bugs

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)

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

end of thread, other threads:[~2021-03-03 23:02 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-07 18:11 [Bug c++/96960] New: ICE in tsubst_copy_and_build, at cp/pt.c:20531 from lambda in return-type-requirement hstong at ca dot ibm.com
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

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).