From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id AB22C3858C2C; Fri, 26 May 2023 18:22:25 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org AB22C3858C2C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1685125345; bh=Gr9g5rYUIc3b6Ug35dPzG2UBkgBAKiVaGlkijK2rybM=; h=From:To:Subject:Date:In-Reply-To:References:From; b=yY/FFsUFwbWuPH/+n4FB8ONY7VXWTXTmHDBRUYpAkv6tsIKsmsjCq3vDXaf0gxC84 f7f+vcPWz6pGzbco+0V8ahBpv6PNTvLANucOI8Vz6Y8yQG4XR5XmP8BmBpDDVLMpmr PmI/avvsziY8nfLQxNBVRpLsz1hqDSWkgEAQmqtM= From: "mpolacek at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/109997] __is_assignable(int, IncompleteType) should be rejected Date: Fri, 26 May 2023 18:22:25 +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: 13.2.1 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: mpolacek at gcc dot gnu.org X-Bugzilla-Status: NEW 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: cc cf_reconfirmed_on everconfirmed bug_status 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 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D109997 Marek Polacek changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |mpolacek at gcc dot gnu.org Last reconfirmed| |2023-05-26 Ever confirmed|0 |1 Status|UNCONFIRMED |NEW --- Comment #1 from Marek Polacek --- Same for std::is_constructible. So presumably we want something like --- a/gcc/cp/method.cc +++ b/gcc/cp/method.cc @@ -2173,7 +2173,10 @@ constructible_expr (tree to, tree from) static tree is_xible_helper (enum tree_code code, tree to, tree from, bool trivial) { - to =3D complete_type (to); + to =3D complete_type_or_else (to, NULL_TREE); + from =3D complete_type_or_else (from, NULL_TREE); + if (!from || !to) + return error_mark_node; deferring_access_check_sentinel acs (dk_no_deferred); if (VOID_TYPE_P (to) || ABSTRACT_CLASS_TYPE_P (to) || (from && FUNC_OR_METHOD_TYPE_P (from) but I'd have to test std::is_constructible with a parameter pack as well.=