https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119864
--- Comment #20 from Nathaniel Shead <nshead at gcc dot gnu.org> ---
(In reply to Alberto from comment #18)
> Thanks so much Nathaniel!
>
> I've applied your patch and now I can build the std module with -fopenmp.
>
> Unfortunately, I couldn't test it with my use case because I'm hitting a
> couple of likely unrelated issues.
>
> I could reduce one of those to:
>
> ``` M.cpp
> module;
>
> #include <vector>
>
> export module M;
>
> import std;
>
> namespace M
> {
>
> export
> template<std::size_t d>
> struct T
> {
> static void foo(int n)
> {
> std::vector<int> u(n);
> std::vector<int> v(n);
>
> for (auto const &[a, b] : std::views::zip(u, v)) ;
> }
>
> static void bar(int n)
> {
> std::vector<int> u(n);
> std::vector<double> v(3 * n);
>
> for (auto const &[a, b] : std::views::zip(u, v | std::views::chunk(3u))) ;
> }
> };
>
> }
> ```
> ``` main.cpp
> import M;
>
> int main()
> {
> M::T<2>::foo(10);
> }
> ```
Thanks for this. I had a quick look and made PR122609 for the structured
binding issue. Reducing the comparison operator issue will take more time;
feel free to open a new bug for this (or any other issues you come across).