On 5/30/26 4:41 AM, yxj-github-437 wrote:
I try compile reflection test code with std module without
-freflection but build std module with -freflection. An ICE
accur when I do this.

Can you give us instruction to reproduce the crash?

The following is my reproduction record.

$ cat main.cc
import std;

template <typename T>
consteval auto nsdm_of() {
      const auto ctx = std::meta::access_context::current();
      return std::define_static_array(std::meta::nonstatic_data_members_of(^^T, 
ctx));
}

int main() {
      constexpr auto I = nsdm_of<std::vector<int>>();
}

$ g++ -B. -std=c++26 -fmodules -freflection -fmodule-only --compile-std-module
$ g++ -B. -std=c++26 -fmodules main.cc

Seems like we want to reject the import based on a dialect mismatch,
i.e. check flag_reflection in module.cc get_dialect.

Thanks, the new patch make the reflection in dialect with flag_reflection.

Pushed, thanks!

If you're going to continue contributing under this pseudonym, please do pursue the FSF copyright assignment process; the FSF guidance for accepting small changes as legally insignificant says "Keep in mind, however, that a series of minor changes by the same person can add up to a significant contribution. What counts is the total contribution of the person; it is irrelevant which parts of it were contributed when."

Jason

Reply via email to