From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 15A5538618ED; Sun, 29 Oct 2023 19:23:49 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 15A5538618ED DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1698607429; bh=WuiffKua3MybdP84Y3YrTZz+d/K0r+geoYRGjy9sP9c=; h=From:To:Subject:Date:In-Reply-To:References:From; b=es/Oxqpt6JDjHigUDv/k/u9y91t0+v8S/MFvUDlgY7OWTgmNGxxmvvW7X7J3pHeO1 yJR7/XxLNdnjHlvNeDNdNJOphimAagMl5ub/Kl/ZOKAyI1OhiBwP/CzqhluafIDqBS eKIma8yId4zMG42AV7KA3Z3ozDZigVT2Ov2e+2io= From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug d/110712] d: ICE: verify_gimple_failed (conversion of register to a different size in 'view_convert_expr') Date: Sun, 29 Oct 2023 19:23:48 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: d X-Bugzilla-Version: 14.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: cvs-commit at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: ibuclaw at gdcproject dot org X-Bugzilla-Target-Milestone: --- 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=3D110712 --- Comment #6 from CVS Commits --- The releases/gcc-12 branch has been updated by Iain Buclaw : https://gcc.gnu.org/g:77f7d469e923f2bb1d21d3875290ce738262d42b commit r12-9951-g77f7d469e923f2bb1d21d3875290ce738262d42b Author: Iain Buclaw Date: Sun Oct 29 20:13:14 2023 +0100 d: Fix ICE: verify_gimple_failed (conversion of register to a different size in 'view_convert_expr') Static arrays in D are passed around by value, rather than decaying to a pointer. On x86_64 __builtin_va_list is an exception to this rule, but semantically it's still treated as a static array. This makes certain assignment operations fail due a mismatch in types. As all examples in the test program are rejected by C/C++ front-ends, these are now errors in D too to be consistent. PR d/110712 gcc/d/ChangeLog: * d-codegen.cc (d_build_call): Update call to convert_for_argum= ent. * d-convert.cc (is_valist_parameter_type): New function. (check_valist_conversion): New function. (convert_for_assignment): Update signature. Add check whether assigning va_list is permissible. (convert_for_argument): Likewise. * d-tree.h (convert_for_assignment): Update signature. (convert_for_argument): Likewise. * expr.cc (ExprVisitor::visit (AssignExp *)): Update call to convert_for_assignment. gcc/testsuite/ChangeLog: * gdc.dg/pr110712.d: New test. (cherry picked from commit ea8ffdcadb388b531adf4772287e7987a82a84b7)=