[Bug c++/115159] New: internal compiler error: in nothrow_spec_p, at cp/except.cc:1206 when using modules and QCoreApplication

2024-05-19 Thread Kicer86 at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115159

Bug ID: 115159
   Summary: internal compiler error: in nothrow_spec_p, at
cp/except.cc:1206 when using modules and
QCoreApplication
   Product: gcc
   Version: 14.1.1
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: Kicer86 at gmail dot com
  Target Milestone: ---

When compiling a simple cpp file with #include  and modules
enabled gcc crashes:

FAILED: src/database/benchmarks/CMakeFiles/backends_benchmark.dir/main.cpp.o 
/usr/bin/c++ -DOS_UNIX -DQT_CORE_LIB -DQT_GUI_LIB -DQT_SQL_LIB
-DUPDATER_ENABLED
-I/home/michal/projects/sources/broom/src/third_party/nanobench/src/include
-I/home/michal/projects/sources/broom/src
-I/home/michal/projects/sources/broom/out/gcc/src/database/backends/memory_backend
-I/home/michal/projects/sources/broom/out/gcc/src/database
-I/home/michal/projects/sources/broom/out/gcc/src/core
-I/home/michal/projects/sources/broom/src/third_party/reflect-cpp/include
-I/home/michal/projects/sources/broom/out/gcc/src/database/backends/sql_backends/sqlite_backend
-I/home/michal/projects/sources/broom/out/gcc/src/database/backends/sql_backends
-isystem /usr/include/qt6/QtCore -isystem /usr/include/qt6 -isystem
/usr/lib/qt6/mkspecs/linux-g++ -isystem /usr/include/qt6/QtGui -isystem
/usr/include/qt6/QtSql -pipe -W -Wall -Wextra -Wdouble-promotion
-Wduplicated-branches -Wduplicated-cond -Wconversion -Wimplicit-fallthrough=5
-Wfloat-equal -Wformat=2 -Winit-self -Wlogical-op -Wpedantic -Wrestrict
-Wsequence-point -Wshadow -Wunused -Wundef -Wnull-dereference -Wold-style-cast
-Wuseless-cast -Wsuggest-final-types -Wsuggest-final-methods -Wsuggest-override
-g -O0 -std=c++20 -fPIE -mno-direct-extern-access -MD -MT
src/database/benchmarks/CMakeFiles/backends_benchmark.dir/main.cpp.o -MF
src/database/benchmarks/CMakeFiles/backends_benchmark.dir/main.cpp.o.d
-fmodules-ts
-fmodule-mapper=src/database/benchmarks/CMakeFiles/backends_benchmark.dir/main.cpp.o.modmap
-MD -fdeps-format=p1689r5 -x c++ -o
src/database/benchmarks/CMakeFiles/backends_benchmark.dir/main.cpp.o -c
/home/michal/projects/sources/broom/src/database/benchmarks/main.cpp
In file included from /usr/include/c++/14.1.1/variant:43,
 from /usr/include/qt6/QtCore/qtypeinfo.h:11,
 from /usr/include/qt6/QtCore/qglobal.h:47,
 from /usr/include/qt6/QtCore/qcoreapplication.h:7,
 from /usr/include/qt6/QtCore/QCoreApplication:1,
 from
/home/michal/projects/sources/broom/src/database/benchmarks/main.cpp:2:
/usr/include/c++/14.1.1/bits/functional_hash.h:246:53: internal compiler error:
in nothrow_spec_p, at cp/except.cc:1206
  246 | return __val != 0.0f ? std::_Hash_impl::hash(__val) : 0;
  |~^~~
0x217b58a internal_error(char const*, ...)
???:0
0x703de7 fancy_abort(char const*, int, char const*)
???:0
0x926cbf canonical_eh_spec(tree_node*)
???:0
0x936e78 build_cp_fntype_variant(tree_node*, cp_ref_qualifier, tree_node*,
bool)
???:0
0x834433 module_state::read_cluster(unsigned int)
???:0
0x834d3d module_state::load_section(unsigned int, binding_slot*)
???:0
0x82df3f module_state::lazy_load(unsigned int, binding_slot*)
???:0
0x834381 module_state::read_cluster(unsigned int)
???:0
0x834d3d module_state::load_section(unsigned int, binding_slot*)
???:0
0x82df3f module_state::lazy_load(unsigned int, binding_slot*)
???:0
0x836ddc lazy_load_pendings(tree_node*)
???:0
0x8c4504 instantiate_decl(tree_node*, bool, bool)
???:0
0x8ea563 instantiate_pending_templates(int)
???:0
0x7ccd41 c_parse_final_cleanups()
???:0
0x9c4df2 c_common_parse_file()
???:0
Please submit a full bug report, with preprocessed source (by using
-freport-bug).
Please include the complete backtrace with any bug report.
See 
for instructions.


Source file:
#include 

import photoDeltaFetchingBenchmarks;

int main(int argc, char** argv)
{
QCoreApplication app(argc, argv);

BM_get_photo_delta();
BM_fetch_photo_delta();
}

I have generated a preprocesed source file with -freport-bug but it is too big
to include.

Problem occurs on
$ gcc --version
gcc (GCC) 14.1.1 20240507

Arch Linux

[Bug c++/115159] internal compiler error: in nothrow_spec_p, at cp/except.cc:1206 when using modules and QCoreApplication

2024-05-19 Thread Kicer86 at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115159

--- Comment #2 from MichaƂ Walenciak  ---
Created attachment 58248
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=58248&action=edit
preprocessed project files

main.cpp compiled with -freport-bug (ccnR6WAp.out file) plus preprocessed file
with exported functions (photo_fetch_benchmarks.cpp.o.ddi.i)