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

--- Comment #2 from Ivan R <abbyssoul at gmail dot com> ---
Also, example:

Expectation:
> g++-15 -std=c++23 -fmodules -O3 -fsearch-include-path -c bits/std.cc && \
> g++-15 -std=c++23 -fmodules -O3 -o modules.o3 -x c++ -  <<< 'import std;
> auto main()->int{std::println("Hello using C++ modules");}' && ./modules.o3
> Hello using C++ modules

Does not work:
> g++-15 -std=c++23 -fmodules -Oz -fsearch-include-path -c bits/std.cc && \
> g++-15 -std=c++23 -fmodules -Oz -o modules.oz -x c++ -  <<< 'import std;
> auto main()->int{std::println("Hello using C++ modules");}' && ./modules.oz
>...
> <stdin>:2:30:   required from here
> /usr/include/c++/15/type_traits:180:12: internal compiler error: Segmentation 
> fault
>  180 |       auto __or_fn(int) -> __first_t<false_type,
>      |            ^~~~~~~
> 0x16ab58d internal_error(char const*, ...)
>        ../../src/gcc/diagnostic-global-context.cc:517
>...

Reply via email to