public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "jakub at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/107295] [13 Regression] Rejected code in libreoffice with -m32 since r13-3290-g98e341130f87984a Date: Tue, 18 Oct 2022 10:03:13 +0000 [thread overview] Message-ID: <bug-107295-4-4liwx49UnN@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-107295-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107295 --- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> --- Ah, so that is a different issue then. And with slightly modified testcase quite old one, which regressed with: r8-727-g6b6ae9eb9c06b6911573bb9a13cf98b5a7c98b78 template <typename T> struct VecHelper { typedef T __attribute__((vector_size(sizeof(int)))) V; }; template <int, typename T> using Vec = typename VecHelper<T>::V; template <typename T> using V = Vec<4, T>; using F = V<float>; constexpr F F0 = F() + (float) 0.0L; The problem is that the NOP_EXPR around long double REAL_CST has TREE_CONSTANT flag and so the CONSTRUCTOR around it and thus we just fold the CONSTRUCTOR in: case CONSTRUCTOR: if (TREE_CONSTANT (t) && reduced_constant_expression_p (t)) { /* Don't re-process a constant CONSTRUCTOR, but do fold it to VECTOR_CST if applicable. */ verify_constructor_flags (t); if (TREE_CONSTANT (t)) return fold (t); } r = cxx_eval_bare_aggregate (ctx, t, lval, non_constant_p, overflow_p); break; but that handles the case where it has REAL_CST elts, but doesn't handle the case where it has NOP_EXPRs around them. I wonder if we just shouldn't call cxx_eval_bare_aggregate always for VECTOR_TYPE.
next prev parent reply other threads:[~2022-10-18 10:03 UTC|newest] Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top 2022-10-17 12:59 [Bug c++/107295] New: " marxin at gcc dot gnu.org 2022-10-17 12:59 ` [Bug c++/107295] " marxin at gcc dot gnu.org 2022-10-17 13:19 ` jakub at gcc dot gnu.org 2022-10-17 13:19 ` jakub at gcc dot gnu.org 2022-10-17 13:30 ` marxin at gcc dot gnu.org 2022-10-18 7:55 ` rguenth at gcc dot gnu.org 2022-10-18 10:03 ` jakub at gcc dot gnu.org [this message] 2022-10-18 10:55 ` jakub at gcc dot gnu.org 2022-10-21 16:07 ` cvs-commit at gcc dot gnu.org 2022-10-21 16:09 ` jakub 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-107295-4-4liwx49UnN@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).