From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 18C093858D34; Mon, 20 Apr 2020 04:26:39 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 18C093858D34 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1587356800; bh=Tnu97DRK/eLeToGyRgBjmoQnLL8uf5qdUWEfLbSIUfM=; h=From:To:Subject:Date:In-Reply-To:References:From; b=dJOsNhJnyUccpaDXEicZRbk5KnAGrFqv88Tzzd9gqoKrz4aD3p96LdA93Ou/Gk6Qs wdGaVIFSdZtGRDP5+64V/rSsbYZJpX+Z6hK8gIgaPWQCRsNCCOD7EipqVr1BQjxI55 BGrZMh/J7zTTbxPftVkst9z83iAfn1k3ZFof6g48= From: "xerofoify at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/94628] [8/9/10 Regression] ICE in invalid_nonstatic_memfn_p at cp/typeck.c:1979 since r9-640-g1268ecc26fc1289b Date: Mon, 20 Apr 2020 04:26:39 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Version: 10.0 X-Bugzilla-Keywords: ice-on-valid-code X-Bugzilla-Severity: normal X-Bugzilla-Who: xerofoify at gmail dot com X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: ppalka at gcc dot gnu.org X-Bugzilla-Target-Milestone: 8.5 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: 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: Mon, 20 Apr 2020 04:26:40 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D94628 --- Comment #7 from Nicholas Krause --- After adding this it seems to work for me, Patrick: case TYPE_ARGUMENT_PACK: if (value_dependent_expression_p(TREE_TYPE(*tp))) return *tp; if (TEMPLATE_TYPE_PARAMETER_PACK(*tp)) return *tp; return NULL_TREE; and gives me: test.c: In function =E2=80=98std::common_type_t(f)(std::integral_constant(), (forward)(args)...)), decltype (forward(f)(int_constant(), (forward)(args)...))...> select(int, F&&, Args&& ...)=E2=80=99: test.c:14:12: warning: =E2=80=98if constexpr=E2=80=99 only available with = =E2=80=98-std=3Dc++17=E2=80=99 or =E2=80=98-std=3Dgnu++17=E2=80=99 14 | if constexpr(sizeof...(Is)>0) | ^~~~~~~~~ test.c: In function =E2=80=98std::common_type_t(f)(std::integral_constant(), (forward)(select::args)...)), decltype (forward(f)(int_constant(), (forward)(select::args)...))...> select(int, F&&, Args&& ...) [with int I =3D 1; int ...Is =3D {}; F =3D t(int)::; Args =3D {}]=E2=80=99: test.c:17:1: warning: control reaches end of non-void function [-Wreturn-ty= pe] 17 | } | ^ with no segfault. I'm not sure if this is the correct part to add this test= for TYPE_ARGUMENT_PACK or if we would prefer it to be lower in the stack.=