From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 30A63395A456; Tue, 10 Mar 2020 19:00:30 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 30A63395A456 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1583866830; bh=LXsKkm/lxODoN3caE/Fu9paejKENQpZjDbInrQFN0HQ=; h=From:To:Subject:Date:From; b=IVx+kEmq8hXlHwNrEmI2n728+IFposlBav/sqYKQ6amzvivp5gJkFwNslg0/EQiOr y3f1vw95xXCRcsZenJ9ogTMnT9NiiI4ms2BraK7LHZc/dcFpTbQfK4D0/NXriFsnrW LTSv4WpCWaOyHr5ycGF9ma2o14dEJ87n9LyKq/QE= From: "bisqwit at iki dot fi" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/94128] New: ICE on C++20 "requires requires" with lambda Date: Tue, 10 Mar 2020 19:00:29 +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: unknown X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: bisqwit at iki dot fi 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: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Mar 2020 19:00:30 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D94128 Bug ID: 94128 Summary: ICE on C++20 "requires requires" with lambda Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: bisqwit at iki dot fi Target Milestone: --- For this code: void test(auto param) requires requires{ { [](auto p){return p;}(param) }; }; void test2() { test(1); } On this compiler: g++-10 (Debian 10-20200222-1) 10.0.1 20200222 (experimental) [master revision 01af7e0a0c2:487fe13f218:e99b18cf7101f205bfdd9f0f29ed51caaec52779] Compiling with this commandline: g++-10 -v tmp.cc -std=3Dc++20 We get: Using built-in specs. COLLECT_GCC=3Dg++-10 COLLECT_LTO_WRAPPER=3D/usr/lib/gcc/x86_64-linux-gnu/10/lto-wrapper OFFLOAD_TARGET_NAMES=3Dnvptx-none:amdgcn-amdhsa:hsa OFFLOAD_TARGET_DEFAULT=3D1 Target: x86_64-linux-gnu Configured with: ../src/configure -v --with-pkgversion=3D'Debian 10-2020022= 2-1' --with-bugurl=3Dfile:///usr/share/doc/gcc-10/README.Bugs --enable-languages=3Dc,c++,go,brig,d,fortran,objc,obj-c++,m2 --prefix=3D/usr --with-gcc-major-version-only --program-suffix=3D-10 --program-prefix=3Dx86_64-linux-gnu- --enable-shared --enable-linker-build-= id --libexecdir=3D/usr/lib --without-included-gettext --enable-threads=3Dposix --libdir=3D/usr/lib --enable-nls --enable-clocale=3Dgnu --enable-libstdcxx-= debug --enable-libstdcxx-time=3Dyes --with-default-libstdcxx-abi=3Dnew --enable-gnu-unique-object --disable-vtable-verify --enable-plugin --enable-default-pie --with-system-zlib --with-target-system-zlib=3Dauto --enable-objc-gc=3Dauto --enable-multiarch --disable-werror --with-arch-32= =3Di686 --with-abi=3Dm64 --with-multilib-list=3Dm32,m64,mx32 --enable-multilib --with-tune=3Dgeneric --enable-offload-targets=3Dnvptx-none,amdgcn-amdhsa,h= sa --without-cuda-driver --enable-checking=3Drelease --build=3Dx86_64-linux-gnu --host=3Dx86_64-linux-gnu --target=3Dx86_64-linux-gnu Thread model: posix Supported LTO compression algorithms: zlib zstd gcc version 10.0.1 20200222 (experimental) [master revision 01af7e0a0c2:487fe13f218:e99b18cf7101f205bfdd9f0f29ed51caaec52779] (Debian 10-20200222-1)=20 COLLECT_GCC_OPTIONS=3D'-v' '-std=3Dc++2a' '-shared-libgcc' '-mtune=3Dgeneri= c' '-march=3Dx86-64' /usr/lib/gcc/x86_64-linux-gnu/10/cc1plus -quiet -v -imultiarch x86_64-linux-gnu -D_GNU_SOURCE tmp.cc -quiet -dumpbase tmp.cc -mtune=3Dgene= ric -march=3Dx86-64 -auxbase tmp -std=3Dc++2a -version -fasynchronous-unwind-ta= bles -o /tmp/cc8CWcEJ.s GNU C++17 (Debian 10-20200222-1) version 10.0.1 20200222 (experimental) [ma= ster revision 01af7e0a0c2:487fe13f218:e99b18cf7101f205bfdd9f0f29ed51caaec52779] (x86_64-linux-gnu) compiled by GNU C version 10.0.1 20200222 (experimental) [master revision 01af7e0a0c2:487fe13f218:e99b18cf7101f205bfdd9f0f29ed51caaec52779],= GMP version 6.2.0, MPFR version 4.0.2, MPC version 1.1.0, isl version isl-0.22-= GMP warning: GMP header version 6.2.0 differs from library version 6.1.2. GGC heuristics: --param ggc-min-expand=3D100 --param ggc-min-heapsize=3D131= 072 ignoring duplicate directory "/usr/include/x86_64-linux-gnu/c++/10" ignoring nonexistent directory "/usr/local/include/x86_64-linux-gnu" ignoring nonexistent directory "/usr/lib/gcc/x86_64-linux-gnu/10/../../../../x86_64-linux-gnu/include" #include "..." search starts here: #include <...> search starts here: /usr/include/c++/10 /usr/include/x86_64-linux-gnu/c++/10 /usr/include/c++/10/backward /usr/lib/gcc/x86_64-linux-gnu/10/include /usr/local/include /usr/lib/gcc/x86_64-linux-gnu/10/include-fixed /usr/include/x86_64-linux-gnu /usr/include End of search list. GNU C++17 (Debian 10-20200222-1) version 10.0.1 20200222 (experimental) [ma= ster revision 01af7e0a0c2:487fe13f218:e99b18cf7101f205bfdd9f0f29ed51caaec52779] (x86_64-linux-gnu) compiled by GNU C version 10.0.1 20200222 (experimental) [master revision 01af7e0a0c2:487fe13f218:e99b18cf7101f205bfdd9f0f29ed51caaec52779],= GMP version 6.2.0, MPFR version 4.0.2, MPC version 1.1.0, isl version isl-0.22-= GMP warning: GMP header version 6.2.0 differs from library version 6.1.2. GGC heuristics: --param ggc-min-expand=3D100 --param ggc-min-heapsize=3D131= 072 Compiler executable checksum: f533434f622c23e753fbd5b6135ebdd3 tmp.cc: In instantiation of =E2=80=98void test(auto:1) requires requires{{()(test::param)};} [with auto:1 =3D int]=E2=80=99: tmp.cc:3:22: required from here tmp.cc:2:26: internal compiler error: Segmentation fault 2 | requires requires{ { [](auto p){return p;}(param) }; }; | ^~~~~~~~~~~~~~~~~~~~~ 0xc248ef crash_signal ../../src/gcc/toplev.c:328 0x7fb53dd2d0ff ??? =20=20=20=20=20=20=20 /build/glibc-kSJANG/glibc-2.29/signal/../sysdeps/unix/sysv/linux/x86_64/sig= action.c:0 0x733be8 tsubst_template_args(tree_node*, tree_node*, int, tree_node*) ../../src/gcc/cp/pt.c:13090 0x738602 tsubst_function_decl ../../src/gcc/cp/pt.c:13501 0x738e38 tsubst_template_decl ../../src/gcc/cp/pt.c:13894 0x72a95e tsubst_lambda_expr(tree_node*, tree_node*, int, tree_node*) ../../src/gcc/cp/pt.c:18862 0x72d085 tsubst_copy_and_build(tree_node*, tree_node*, int, tree_node*, boo= l, bool) ../../src/gcc/cp/pt.c:20304 0x72be2c tsubst_copy_and_build(tree_node*, tree_node*, int, tree_node*, boo= l, bool) ../../src/gcc/cp/pt.c:18962 0x72be2c tsubst_copy_and_build(tree_node*, tree_node*, int, tree_node*, boo= l, bool) ../../src/gcc/cp/pt.c:19559 0x7250a4 tsubst_copy_and_build(tree_node*, tree_node*, int, tree_node*, boo= l, bool) ../../src/gcc/cp/pt.c:18962 0x7250a4 tsubst_expr(tree_node*, tree_node*, int, tree_node*, bool) ../../src/gcc/cp/pt.c:18597 0x648a39 tsubst_requires_expr(tree_node*, tree_node*, int, tree_node*) ../../src/gcc/cp/constraint.cc:1866 0x72c7f4 tsubst_copy_and_build(tree_node*, tree_node*, int, tree_node*, boo= l, bool) ../../src/gcc/cp/pt.c:20336 0x7250a4 tsubst_copy_and_build(tree_node*, tree_node*, int, tree_node*, boo= l, bool) ../../src/gcc/cp/pt.c:18962 0x7250a4 tsubst_expr(tree_node*, tree_node*, int, tree_node*, bool) ../../src/gcc/cp/pt.c:18597 0x648082 satisfy_constraint_r ../../src/gcc/cp/constraint.cc:2523 0x6487e8 satisfy_constraint ../../src/gcc/cp/constraint.cc:2599 0x649184 satisfy_declaration_constraints ../../src/gcc/cp/constraint.cc:2617 0x649c68 constraint_satisfaction_value ../../src/gcc/cp/constraint.cc:2733 0x649c68 constraints_satisfied_p(tree_node*) ../../src/gcc/cp/constraint.cc:2754 Please submit a full bug report, with preprocessed source if appropriate. Please include the complete backtrace with any bug report. See for instructions.=