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++/108099] [12/13 Regression] ICE with type alias with `signed __int128_t` Date: Tue, 02 May 2023 20:25:52 +0000 [thread overview] Message-ID: <bug-108099-4-SZnPbiZwA3@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-108099-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108099 --- Comment #27 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The releases/gcc-13 branch has been updated by Jason Merrill <jason@gcc.gnu.org>: https://gcc.gnu.org/g:a713aa4f47ac1efbfe2338790b0b5e94a233fb99 commit r13-7277-ga713aa4f47ac1efbfe2338790b0b5e94a233fb99 Author: Jason Merrill <jason@redhat.com> Date: Tue Apr 18 21:32:07 2023 -0400 c++: fix 'unsigned typedef-name' extension [PR108099] In the comments for PR108099 Jakub provided some testcases that demonstrated that even before the regression noted in the patch we were getting the semantics of this extension wrong: in the unsigned case we weren't producing the corresponding standard unsigned type but another distinct one of the same size, and in the signed case we were just dropping it on the floor and not actually returning a signed type at all. The former issue is fixed by using c_common_signed_or_unsigned_type instead of unsigned_type_for, and the latter issue by adding a (signed_p && typedef_decl) case. This patch introduces a failure on std/ranges/iota/max_size_type.cc due to the latter issue, since the testcase expects 'signed rep_t' to do something sensible, and previously we didn't. Now that we do, it exposes a bug in the __max_diff_type::operator>>= handling of sign extension: when we evaluate -1000 >> 2 in __max_diff_type we keep the MSB set, but leave the second-most-significant bit cleared. PR c++/108099 gcc/cp/ChangeLog: * decl.cc (grokdeclarator): Don't clear typedef_decl after 'unsigned typedef' pedwarn. Use c_common_signed_or_unsigned_type. Also handle 'signed typedef'. gcc/testsuite/ChangeLog: * g++.dg/ext/int128-8.C: New test. * g++.dg/ext/unsigned-typedef2.C: New test. * g++.dg/ext/unsigned-typedef3.C: New test.
next prev parent reply other threads:[~2023-05-02 20:25 UTC|newest] Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top 2022-12-14 11:52 [Bug c++/108099] New: ICE when parsing signed __int128_t typedef moritz.klammler at cetitec dot com 2022-12-14 12:20 ` [Bug c++/108099] " redi at gcc dot gnu.org 2022-12-14 12:23 ` redi at gcc dot gnu.org 2022-12-14 12:26 ` redi at gcc dot gnu.org 2022-12-14 13:12 ` moritz.klammler at cetitec dot com 2022-12-14 17:46 ` [Bug c++/108099] ICE with type alias with `signed __int_128_t` pinskia at gcc dot gnu.org 2022-12-14 17:54 ` [Bug c++/108099] ICE with type alias with `signed __int128_t` pinskia at gcc dot gnu.org 2022-12-14 17:58 ` [Bug c++/108099] [12/13 Regression] " pinskia at gcc dot gnu.org 2022-12-14 18:18 ` jakub at gcc dot gnu.org 2022-12-14 19:05 ` jakub at gcc dot gnu.org 2022-12-14 19:20 ` jakub at gcc dot gnu.org 2022-12-21 12:37 ` rguenth at gcc dot gnu.org 2022-12-21 18:14 ` ville.voutilainen at gmail dot com 2023-01-31 16:00 ` pinskia at gcc dot gnu.org 2023-02-01 0:51 ` pinskia at gcc dot gnu.org 2023-02-01 11:59 ` redi at gcc dot gnu.org 2023-02-01 19:07 ` pinskia at gcc dot gnu.org 2023-02-01 19:17 ` jakub at gcc dot gnu.org 2023-03-09 22:25 ` jason at gcc dot gnu.org 2023-03-10 3:57 ` cvs-commit at gcc dot gnu.org 2023-03-10 3:59 ` [Bug c++/108099] [12 " jason at gcc dot gnu.org 2023-03-10 10:33 ` jakub at gcc dot gnu.org 2023-04-18 20:45 ` cvs-commit at gcc dot gnu.org 2023-04-19 15:23 ` cvs-commit at gcc dot gnu.org 2023-04-19 16:53 ` cvs-commit at gcc dot gnu.org 2023-04-19 16:59 ` [Bug c++/108099] [12/13/14 " jason at gcc dot gnu.org 2023-04-20 7:44 ` cvs-commit at gcc dot gnu.org 2023-04-20 7:48 ` cvs-commit at gcc dot gnu.org 2023-04-21 19:33 ` cvs-commit at gcc dot gnu.org 2023-05-02 20:25 ` cvs-commit at gcc dot gnu.org [this message] 2023-05-08 12:26 ` [Bug c++/108099] [12/13 " rguenth at gcc dot gnu.org 2023-07-25 10:50 ` [Bug c++/108099] [12 " redi at gcc dot gnu.org 2023-08-11 21:21 ` cvs-commit at gcc dot gnu.org 2023-12-19 21:50 ` jason 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-108099-4-SZnPbiZwA3@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).