From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 6FF63385841B; Fri, 19 Jan 2024 18:35:24 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 6FF63385841B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1705689324; bh=70zAWOs4YXAFuLkdhuvI+v3patD+k4VCke/J6y0UlH0=; h=From:To:Subject:Date:In-Reply-To:References:From; b=EtwifdLJTmmH7VNERSGLnwwM1Y7Et9IZGrwC3Z+mlDePQ61B+DP474tJeY/PgZjbe xIYKla+Qqe7z0/EIMH2d99axCBtqosFp6gEjbn1zRx/54lxpOqo2VRfGJSBknoVl7l gJtCVoodU9e7KZ/XiWjFMTXbazLYC+M+WvaRhjpo= From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/111357] [11/12/13/14 Regression] __integer_pack fails to work with values of dependent type convertible to integers in noexcept context Date: Fri, 19 Jan 2024 18:35:19 +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.0 X-Bugzilla-Keywords: rejects-valid X-Bugzilla-Severity: normal X-Bugzilla-Who: cvs-commit at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: jason at gcc dot gnu.org X-Bugzilla-Target-Milestone: 11.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 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D111357 --- Comment #13 from GCC Commits --- The trunk branch has been updated by Jason Merrill : https://gcc.gnu.org/g:f1e5bf0d83ee4da81b6317c6d7f1278fe7eaa5a0 commit r14-8291-gf1e5bf0d83ee4da81b6317c6d7f1278fe7eaa5a0 Author: Jason Merrill Date: Wed Jan 17 17:29:33 2024 -0500 c++: alias template argument conversion [PR112632] We've had a problem with lost conversions to template parameter types f= or a while now; looking at this PR, it occurred to me that the problem is re= ally with alias (and concept) templates, since we do substitution of depende= nt arguments into them in a way that we don't for other templates. And fi= xing that specific problem is a lot simpler than adding IMPLICIT_CONV_EXPR around all dependent template arguments the way I gave up on for 111357. The other part of the fix was changing tsubst_expr to actually call convert_nontype_argument instead of assuming it will eventually happen. I waffled about stripping the forced conversion when !force_conv vs. skipping them in iterative_hash_template_arg and template_args_equal (like we already do for some other conversions) and decided to go with the former, but that isn't a strong preference if it turns out to be somehow problematic. PR c++/112632 PR c++/112594 PR c++/111357 PR c++/104594 PR c++/67898 gcc/cp/ChangeLog: * cp-tree.h (IMPLICIT_CONV_EXPR_FORCED): New. * pt.cc (expand_integer_pack): Remove 111357 workaround. (maybe_convert_nontype_argument): Add force parm. (convert_template_argument): Handle alias template args specially. (tsubst_expr): Don't ignore IMPLICIT_CONV_EXPR_NONTYPE_ARG. * error.cc (dump_expr) [CASE_CONVERT]: Handle null optype. gcc/testsuite/ChangeLog: * g++.dg/cpp0x/alias-decl-nontype1.C: New test. * g++.dg/cpp2a/concepts-narrowing1.C: New test. * g++.dg/cpp2a/nontype-class63.C: New test. * g++.dg/cpp2a/nontype-class63a.C: New test.=