https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106820
--- Comment #1 from Mark Millard <markmigm at gmail dot com> --- (In reply to Mark Millard from comment #0) > Failing command sequence (from a FreeBSD context) for a reduced/small test > case: > > // g++12 -std=c++20 -fmodules-ts -xc++-system-header memory > // g++12 -std=c++20 -freport-bug -fmodules-ts -c > gpp12_module_dynamic_pointer_cast_failure.cpp . . . I've now tried this on fedora 36 with copies of the source code and got no failure in the fedora context. This was with: # c++ -v Using built-in specs. COLLECT_GCC=c++ COLLECT_LTO_WRAPPER=/usr/libexec/gcc/aarch64-redhat-linux/12/lto-wrapper Target: aarch64-redhat-linux Configured with: ../configure --enable-bootstrap --enable-languages=c,c++,fortran,objc,obj-c++,ada,go,lto --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-shared --enable-threads=posix --enable-checking=release --enable-multilib --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --with-gcc-major-version-only --enable-libstdcxx-backtrace --with-linker-hash-style=gnu --enable-plugin --enable-initfini-array --with-isl=/builddir/build/BUILD/gcc-12.2.1-20220819/obj-aarch64-redhat-linux/isl-install --enable-gnu-indirect-function --build=aarch64-redhat-linux --with-build-config=bootstrap-lto --enable-link-serialization=1 Thread model: posix Supported LTO compression algorithms: zlib zstd gcc version 12.2.1 20220819 (Red Hat 12.2.1-1) (GCC) # uname -ap Linux usbfedora 5.17.8-300.fc36.aarch64 #1 SMP Mon May 16 00:40:35 UTC 2022 aarch64 aarch64 aarch64 GNU/Linux