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

            Bug ID: 124953
           Summary: [modules] recursive lazy load / failed to load
                    pendings for ...
           Product: gcc
           Version: 15.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: marcel at laverdet dot com
  Target Milestone: ---

// one.cc
export module one;

template <class T> struct wrap { using type = T; };
template <auto V> using unwrap = decltype(V)::type;

export class Foo {
  struct Storage {};
  unwrap<wrap<Storage>{}> data_{};
};

// two.cc
export module two;
import one;

export auto fn(Foo&) -> void;

-----

+ g++ -std=c++23 -fmodules-ts -Wall -Wextra -Werror -c one.cc -o one.o
+ g++ -std=c++23 -fmodules-ts -Wall -Wextra -Werror -c two.cc -o two.o
two.cc:4:16: error: recursive lazy load
    4 | export auto fn(Foo&) -> void;
      |                ^~~
two.cc:4:16: fatal error: failed to load pendings for ‘::wrap’

Fails on gcc 15, and 16 trunk.

Reply via email to