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

Adrian Herrmann <adrian.herrmann.xyz at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |adrian.herrmann.xyz at gmail 
dot c
                   |                            |om

--- Comment #1 from Adrian Herrmann <adrian.herrmann.xyz at gmail dot com> ---
Still reproduces on trunk (5a61875b0cd983e57dd44b7d6e12b9eb11985bae). The same
issue also triggers across module partitions on class template specializations
with alignas(...), [[gnu::aligned(...)]], or [[gnu::packed]] (ICE "canonical
types differ for identical types" with checking, or bogus "conflicting type for
imported declaration" with release checking).

In cp/module.cc, trees_in::decl_value merges TYPE_ATTRIBUTES onto the existing
main variant without calling fixup_attribute_variants, leaving existing
cv-qualified variants with stale attributes. Relatedly,
trees_in::read_class_def misses copying TYPE_PACKED and calling
fixup_attribute_variants, and trees_out::type_node emits redundant user
alignment on tt_variant_type even when it matches root.

I have a patch addressing these in cp/module.cc and plan to send it to
gcc-patches.
  • [Bug c++/127078] [module... adrian.herrmann.xyz at gmail dot com via Gcc-bugs

Reply via email to