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

            Bug ID: 119138
           Summary: [15 Regression] Bootstrap failure for
                    x86_64-w64-mingw32 target since r15-7822
           Product: gcc
           Version: 15.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: jakub at gcc dot gnu.org
  Target Milestone: ---

As mentioned by Mark in
https://gcc.gnu.org/pipermail/gcc-patches/2025-March/676942.html
my r15-7822-g1853b02d8c127740055242123db2d32cf9476ea9 commit broke bootstrap on
x86_64-w64-mingw32.

Reduced testcase is:
template <typename>
void
foo (__builtin_va_list)
{
}

void
bar (__builtin_va_list ap)
{
  foo<char> (ap);
}

The ICE is because on this target __builtin_va_list is char * type with
attributes applied to it, and my change
-       if (type == TREE_TYPE (t) && domain == TYPE_DOMAIN (t))                 
+       if (type == TREE_TYPE (t)                                               
+           && domain == TYPE_DOMAIN (t)                                        
+           && TYPE_ATTRIBUTES (t) == NULL_TREE)                                
          return t;                                                             
stopped reusing the original type (it should try harder, it should do that only
if
there are late (dependent) attributes) and furthermore, I think for the
shareable types like POINTER_TYPE, REFERENCE_TYPE, INTEGER_TYPE, BOOLEAN_TYPE,
REAL_TYPE etc. we shouldn't be modifying types in place with the early
(non-dependent) attributes.

Reply via email to