[Bug c/100545] ICE with -g: in gen_typedef_die with mode attribute and aligned attribute
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100545 --- Comment #4 from CVS Commits --- The master branch has been updated by Jason Merrill : https://gcc.gnu.org/g:0aa277bf0b4b794314ab3f11bab438d17b57465d commit r13-57-g0aa277bf0b4b794314ab3f11bab438d17b57465d Author: Jason Merrill Date: Fri Apr 15 16:27:05 2022 -0400 c-family: attribute ((aligned, mode)) [PR100545] The problem here was that handle_mode_attribute clobbered the changes of any previous attribute, only copying type qualifiers to the new type. And common_handle_aligned_attribute had previously set up the typedef, so when we later called set_underlying_type it saw DECL_ORIGINAL_TYPE set and just returned, even though handle_mode_attribute had messed up the TREE_TYPE. So, let's fix handle_mode_attribute to copy attributes, alignment, and typedefness to the new type. PR c/100545 gcc/c-family/ChangeLog: * c-attribs.cc (handle_mode_attribute): Copy attributes, aligned, and typedef. * c-common.cc (set_underlying_type): Add assert. gcc/testsuite/ChangeLog: * c-c++-common/attr-mode-1.c: New test. * c-c++-common/attr-mode-2.c: New test.
[Bug c/100545] ICE with -g: in gen_typedef_die with mode attribute and aligned attribute
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100545 --- Comment #3 from Jason Merrill --- Created attachment 52829 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=52829=edit fix
[Bug c/100545] ICE with -g: in gen_typedef_die with mode attribute and aligned attribute
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100545 Jason Merrill changed: What|Removed |Added CC||jason at gcc dot gnu.org Status|NEW |ASSIGNED Assignee|unassigned at gcc dot gnu.org |jason at gcc dot gnu.org
[Bug c/100545] ICE with -g: in gen_typedef_die with mode attribute and aligned attribute
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100545 Andrew Pinski changed: What|Removed |Added Last reconfirmed||2021-12-12 See Also||https://gcc.gnu.org/bugzill ||a/show_bug.cgi?id=101533 Known to fail||4.1.2 Ever confirmed|0 |1 Status|UNCONFIRMED |NEW --- Comment #2 from Andrew Pinski --- Confirmed.
[Bug c/100545] ICE with -g: in gen_typedef_die with mode attribute and aligned attribute
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100545 Richard Biener changed: What|Removed |Added Component|debug |c --- Comment #1 from Richard Biener --- if (DECL_ORIGINAL_TYPE (decl)) { type = DECL_ORIGINAL_TYPE (decl); if (type == error_mark_node) return; gcc_assert (type != TREE_TYPE (decl)); I suspect an error in attribute processing / type setup.