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 libstdc++/97132] assume_aligned is not constexpr Date: Mon, 19 Oct 2020 21:25:57 +0000 [thread overview] Message-ID: <bug-97132-4-XpcJaQO110@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-97132-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97132 --- Comment #7 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The releases/gcc-9 branch has been updated by Jonathan Wakely <redi@gcc.gnu.org>: https://gcc.gnu.org/g:77923ad01415f6e72af844cbef5227f5b5a9fb4b commit r9-9003-g77923ad01415f6e72af844cbef5227f5b5a9fb4b Author: Jonathan Wakely <jwakely@redhat.com> Date: Mon Sep 21 14:28:58 2020 +0100 libstdc++: Make std::assume_aligned a constexpr function [PR 97132] The cast from void* to T* in std::assume_aligned is not valid in a constexpr function. The optimization hint is redundant during constant evaluation anyway (the compiler can see the object and knows its alignment). Simply return the original pointer without applying the __builtin_assume_aligned hint to it when doing constant evaluation. libstdc++-v3/ChangeLog: PR libstdc++/97132 * include/std/memory (assume_aligned): Do not use __builtin_assume_aligned during constant evaluation. * testsuite/20_util/assume_aligned/1.cc: Improve test. * testsuite/20_util/assume_aligned/97132.cc: New test. (cherry picked from commit f10ed928e2f8ecc2c859abff8f2f9296b11b8d95)
next prev parent reply other threads:[~2020-10-19 21:25 UTC|newest] Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-09-21 4:52 [Bug libstdc++/97132] New: " fsb4000 at yandex dot ru 2020-09-21 7:39 ` [Bug libstdc++/97132] " redi at gcc dot gnu.org 2020-09-21 8:01 ` jakub at gcc dot gnu.org 2020-09-21 8:34 ` redi at gcc dot gnu.org 2020-09-21 8:38 ` fsb4000 at yandex dot ru 2020-09-21 13:29 ` cvs-commit at gcc dot gnu.org 2020-10-19 21:25 ` cvs-commit at gcc dot gnu.org 2020-10-19 21:25 ` cvs-commit at gcc dot gnu.org [this message] 2020-10-19 21:34 ` redi at gcc dot gnu.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-97132-4-XpcJaQO110@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).