[Bug c++/108099] [12 Regression] ICE with type alias with `signed __int128_t`
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108099 Jason Merrill changed: What|Removed |Added Status|ASSIGNED|RESOLVED Resolution|--- |FIXED --- Comment #31 from Jason Merrill --- Fixed for 12.4/13.
[Bug c++/108099] [12 Regression] ICE with type alias with `signed __int128_t`
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108099 --- Comment #30 from CVS Commits --- The releases/gcc-12 branch has been updated by Jason Merrill : https://gcc.gnu.org/g:50812881bbc1a78552682ae3a690bc0f512e762f commit r12-9810-g50812881bbc1a78552682ae3a690bc0f512e762f Author: Jason Merrill 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-7.C: New test. * g++.dg/ext/int128-8.C: New test. * g++.dg/ext/unsigned-typedef2.C: New test. * g++.dg/ext/unsigned-typedef3.C: New test.
[Bug c++/108099] [12 Regression] ICE with type alias with `signed __int128_t`
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108099 Jonathan Wakely changed: What|Removed |Added CC||13958014620 at 139 dot com --- Comment #29 from Jonathan Wakely --- *** Bug 110798 has been marked as a duplicate of this bug. ***
[Bug c++/108099] [12 Regression] ICE with type alias with `signed __int128_t`
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108099 --- Comment #22 from CVS Commits --- The releases/gcc-12 branch has been updated by Jason Merrill : https://gcc.gnu.org/g:7b30f13b904f137c77e5180357af7917a3b47af0 commit r12-9447-g7b30f13b904f137c77e5180357af7917a3b47af0 Author: Jason Merrill Date: Tue Apr 18 17:12:17 2023 -0400 c++: fix 'unsigned __int128_t' semantics [PR108099] My earlier patch for 108099 made us accept this non-standard pattern but messed up the semantics, so that e.g. unsigned __int128_t was not a 128-bit type. PR c++/108099 gcc/cp/ChangeLog: * decl.cc (grokdeclarator): Keep typedef_decl for __int128_t. gcc/testsuite/ChangeLog: * g++.dg/ext/int128-8.C: New test.
[Bug c++/108099] [12 Regression] ICE with type alias with `signed __int128_t`
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108099 --- Comment #21 from CVS Commits --- The trunk branch has been updated by Jason Merrill : https://gcc.gnu.org/g:ed32ec26697cc77492d094b31a0d2eebc0535644 commit r14-88-ged32ec26697cc77492d094b31a0d2eebc0535644 Author: Jason Merrill Date: Tue Apr 18 17:12:17 2023 -0400 c++: fix 'unsigned __int128_t' semantics [PR108099] My earlier patch for 108099 made us accept this non-standard pattern but messed up the semantics, so that e.g. unsigned __int128_t was not a 128-bit type. PR c++/108099 gcc/cp/ChangeLog: * decl.cc (grokdeclarator): Keep typedef_decl for __int128_t. gcc/testsuite/ChangeLog: * g++.dg/ext/int128-8.C: New test.
[Bug c++/108099] [12 Regression] ICE with type alias with `signed __int128_t`
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108099 --- Comment #20 from CVS Commits --- The releases/gcc-12 branch has been updated by Jason Merrill : https://gcc.gnu.org/g:32955c1c2246aa336d3fd2423c32546c39a6ca30 commit r12-9429-g32955c1c2246aa336d3fd2423c32546c39a6ca30 Author: Jason Merrill Date: Thu Mar 9 17:35:24 2023 -0500 c++: signed __int128_t [PR108099] The code for handling signed + typedef was breaking on __int128_t, because it isn't a proper typedef: it doesn't have DECL_ORIGINAL_TYPE. PR c++/108099 gcc/cp/ChangeLog: * decl.cc (grokdeclarator): Handle non-typedef typedef_decl. gcc/testsuite/ChangeLog: * g++.dg/ext/int128-7.C: New test.
[Bug c++/108099] [12 Regression] ICE with type alias with `signed __int128_t`
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108099 --- Comment #19 from Jakub Jelinek --- What about the #c9 and #c10 testcases and questions on their behavior? Defer that to GCC 14 as it isn't a regression?
[Bug c++/108099] [12 Regression] ICE with type alias with `signed __int128_t`
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108099 Jason Merrill changed: What|Removed |Added Known to work||13.0 Summary|[12/13 Regression] ICE with |[12 Regression] ICE with |type alias with `signed |type alias with `signed |__int128_t` |__int128_t` Target Milestone|11.4|12.3 --- Comment #18 from Jason Merrill --- Fixed for GCC 13 so far.