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

            Bug ID: 129215
           Summary: FAIL: g++.dg/modules/hello-1_b.C -std=c++20 after
                    r17-XXXX-gdb7ef921c00
           Product: gcc
           Version: 17.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: libstdc++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: danglin at gcc dot gnu.org
                CC: jason at gcc dot gnu.org, jwakely at redhat dot com,
                    nshead at gcc dot gnu.org, tkaminsk at gcc dot gnu.org
  Target Milestone: ---
            Target: hppa64-hp-hpux11.11

After commit db7ef921c00622e868cb61fec87d85dfe4c12e7d (libstdc++: Implement
apply_result, is_applicable, and is_nothrow_applicable from P1317R2),
g++.dg/modules/hello-1_b.C fails on hppa64-hp-hpux11.11:In file included from
.../include/bits/char_traits.h:52,
                 from .../include/string_view:53,
                 from .../gcc/testsuite/g++.dg/modules/hello-1_b.C:4:
.../include/type_traits:3071:11: error: conflicting declaration of template
'template<template<class ...> class _Trait, class _Tp, class _Tuple> using
std::__unpack_tuple_like = std::remove_cv_t<decltype
(__unpack_tuple_like_impl<_Trait, _Tp, _Tuple>)>'
In file included from .../include/bits/char_traits.h:52,
                 from .../include/bits/iosfwd.h:40,
                 from .../include/bits/iosfwd_file.h:39,
                 from .../include/iosfwd:73,
                 from .../include/ios:42,
                 from .../include/iostream:42,
                 from .../gcc/testsuite/g++.dg/modules/hello-1_a.C:6,
of module hello, imported at .../gcc/testsuite/g++.dg/modules/hello-1_b.C:3:
.../include/type_traits:3071:11: note: previous declaration
'template<template<class ...> class _Trait, class _Tp, class _Tuple> using
std::__unpack_tuple_like = std::remove_cv_t<decltype
(__unpack_tuple_like_impl<_Trait, _Tp, _Tuple>)>'
hello-1_a.C brings <type_traits> into module hello's Global Module Fragment via
<iostream>, and hello-1_b.C imports hello before #include <string_view>. GCC
fails to deduplicate the alias template std::__unpack_tuple_like across the
module boundary.

Reply via email to