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 c++/88115] Incorrect result from alignof in templates, if also using __alignof__.
Date: Fri, 13 Nov 2020 14:23:24 +0000	[thread overview]
Message-ID: <bug-88115-4-Cc4iKdYHn7@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-88115-4@http.gcc.gnu.org/bugzilla/>

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88115

--- Comment #5 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-9 branch has been updated by Patrick Palka
<ppalka@gcc.gnu.org>:

https://gcc.gnu.org/g:9df05884b3a30d32744a070d3fc5780b7323231a

commit r9-9043-g9df05884b3a30d32744a070d3fc5780b7323231a
Author: Patrick Palka <ppalka@redhat.com>
Date:   Wed Oct 7 10:49:00 2020 -0400

    c++: Distinguish alignof and __alignof__ in cp_tree_equal [PR97273]

    cp_tree_equal currently considers alignof the same as __alignof__, but
    these operators are semantically different ever since r8-7957.  In the
    testcase below, this causes the second static_assert to fail on targets
    where alignof(double) != __alignof__(double) because the specialization
    table (which uses cp_tree_equal as its equality predicate) conflates the
    two dependent specializations integral_constant<__alignof__(T)> and
    integral_constant<alignof(T)>.

    This patch makes cp_tree_equal distinguish between these two operators
    by inspecting the ALIGNOF_EXPR_STD_P flag.

    gcc/cp/ChangeLog:

            PR c++/88115
            PR libstdc++/97273
            * tree.c (cp_tree_equal) <case ALIGNOF_EXPR>: Return false if
            ALIGNOF_EXPR_STD_P differ.

    gcc/testsuite/ChangeLog:

            PR c++/88115
            PR libstdc++/97273
            * g++.dg/template/alignof3.C: New test.

    (cherry picked from commit 592fe221735bdaa375b1834dd49ce125d0b600d8)

  parent reply	other threads:[~2020-11-13 14:23 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <bug-88115-4@http.gcc.gnu.org/bugzilla/>
2020-10-05  9:22 ` redi at gcc dot gnu.org
2020-10-07 14:52 ` cvs-commit at gcc dot gnu.org
2020-10-08 23:32 ` cvs-commit at gcc dot gnu.org
2020-11-11 20:11 ` cvs-commit at gcc dot gnu.org
2020-11-11 20:11 ` cvs-commit at gcc dot gnu.org
2020-11-13 14:23 ` cvs-commit at gcc dot gnu.org [this message]
2020-11-15  3:26 ` foom at fuhm dot net
2020-11-17  1:23 ` foom at fuhm dot net
2020-11-17 14:14 ` redi at gcc dot gnu.org
2021-01-07 23:13 ` foom at fuhm dot net
2021-01-29 17:57 ` foom at fuhm dot net
2021-02-01 14:16 ` ppalka at gcc dot gnu.org
2021-03-31  2:58 ` cvs-commit at gcc dot gnu.org
2021-04-21 12:08 ` cvs-commit at gcc dot gnu.org
2021-04-21 12:10 ` ppalka 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-88115-4-Cc4iKdYHn7@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: link
Be 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).