public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "cvs-commit at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug d/106139] d: aggregate value used where floating point was expected Date: Mon, 04 Jul 2022 13:16:41 +0000 [thread overview] Message-ID: <bug-106139-4-W95Bi75oPx@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-106139-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106139 --- Comment #3 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The releases/gcc-12 branch has been updated by Iain Buclaw <ibuclaw@gcc.gnu.org>: https://gcc.gnu.org/g:32dfb075ad31413af9086ce546b5f5317a916d34 commit r12-8548-g32dfb075ad31413af9086ce546b5f5317a916d34 Author: Iain Buclaw <ibuclaw@gdcproject.org> Date: Wed Jun 29 21:52:39 2022 +0200 d: Fix error: aggregate value used where floating point was expected Casting from vector to static array is permitted, and the frontend generates a reinterpret cast, but casting back the other way resulted in an error. This has been fixed to be properly handled in the code generation pass of VectorExp, and the conversion for lvalue and rvalue handling done in convert_expr and convert_for_rvalue respectively. PR d/106139 gcc/d/ChangeLog: * d-convert.cc (convert_expr): Handle casting from array to vector. (convert_for_rvalue): Rewrite vector to array casts of the same element type into a constructor. (convert_for_assignment): Return calling convert_for_rvalue. * expr.cc (ExprVisitor::visit (VectorExp *)): Handle generating a vector expression from a static array. * toir.cc (IRVisitor::visit (ReturnStatement *)): Call convert_for_rvalue on return value. gcc/testsuite/ChangeLog: * gdc.dg/pr106139a.d: New test. * gdc.dg/pr106139b.d: New test. * gdc.dg/pr106139c.d: New test. * gdc.dg/pr106139d.d: New test. (cherry picked from commit 329bef49da30158d30fed1106002bb71674776bd)
next prev parent reply other threads:[~2022-07-04 13:16 UTC|newest] Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top 2022-06-29 13:31 [Bug d/106139] New: " ibuclaw at gdcproject dot org 2022-06-29 21:10 ` [Bug d/106139] " ibuclaw at gdcproject dot org 2022-06-29 21:11 ` cvs-commit at gcc dot gnu.org 2022-07-04 13:16 ` cvs-commit at gcc dot gnu.org [this message] 2022-07-04 15:54 ` cvs-commit at gcc dot gnu.org 2022-07-05 9:40 ` cvs-commit at gcc dot gnu.org 2022-07-05 9:50 ` ibuclaw at gdcproject dot org
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-106139-4-W95Bi75oPx@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).