https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117146
Bug ID: 117146
Summary: ICE on error recovery with openscad-2021.01
Product: gcc
Version: 15.0
Status: UNCONFIRMED
Keywords: error-recovery
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: sjames at gcc dot gnu.org
Target Milestone: ---
Originally reported downstream in Gentoo at https://bugs.gentoo.org/941523.
```
$ x86_64-pc-linux-gnu-g++ -c -O3 -march=native -mtls-dialect=gnu2
-fno-semantic-interposition -pipe -fcf-protection=none
-fdiagnostics-color=always -fdiagnostics-urls=never -frecord-gcc-switches
-fdiagnostics-explain-harder -Wa,-O2 -Wa,-mtune=znver2 -Warray-bounds=2
-Wstrict-aliasing -Wfree-nonheap-object -Werror=lto-type-mismatch
-Werror=strict-aliasing -Werror=odr -Wformat -Werror=format-security
-DSTACKSIZE=8388608 -fno-strict-aliasing -std=c++1y -I/usr/include/cairo
-I/usr/include/libpng16 -I/usr/include/freetype2 -I/usr/include/harfbuzz
-I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/pixman-1
-I/usr/include -I/usr/include/hidapi -I/usr/include/libxml2
-I/usr/include/lib3mf -I/usr/include/freetype2 -I/usr/include/harfbuzz
-I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/freetype2
-I/usr/include/harfbuzz -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include
-I/usr/include/harfbuzz -I/usr/include/freetype2 -I/usr/include/glib-2.0
-I/usr/lib64/glib-2.0/include -I/usr/include/glib-2.0
-I/usr/lib64/glib-2.0/include -DEIGEN_DONT_ALIGN -frounding-math -D_REENTRANT
-Wall -Wextra -Wno-unused-local-typedefs -fPIC -DOPENSCAD_VERSION=2021.01
-DOPENSCAD_SHORTVERSION=2021.01 -DOPENSCAD_YEAR=2021.0 -DOPENSCAD_MONTH=01.0
-DOPENSCAD_DAY=.0 -DDEBUG -DSTACKSIZE=8388608 -DUSE_QOPENGLWIDGET -DENABLE_DBUS
-DENABLE_JOYSTICK -DENABLE_CAIRO -DENABLE_SPNAV -DENABLE_HIDAPI -DENABLE_LIBZIP
-DLIB3MF_API_2 -DENABLE_LIB3MF -DENABLE_OPENCSG -DENABLE_CGAL
-DCGAL_HEADER_ONLY -DUSE_SCINTILLA_EDITOR -DQSCINTILLA_DLL -DQT_NO_DEBUG
-DQT_PRINTSUPPORT_LIB -DQT_WIDGETS_LIB -DQT_MULTIMEDIA_LIB -DQT_GUI_LIB
-DQT_CONCURRENT_LIB -DQT_NETWORK_LIB -DQT_DBUS_LIB -DQT_CORE_LIB -I. -Isrc
-Isrc/ext/libtess2/Include -I/usr/include/qt5 -I/usr/include/qt5/QtPrintSupport
-I/usr/include/qt5/QtWidgets -I/usr/include/qt5/QtMultimedia
-I/usr/include/qt5/QtGui -I/usr/include/qt5/QtConcurrent
-I/usr/include/qt5/QtNetwork -I/usr/include/qt5/QtDBus
-I/usr/include/qt5/QtCore -Iobjects -I/usr/include/eigen3
-I/usr/lib64/qt5/mkspecs/linux-g++ -o objects/src/polyset-utils.o
src/polyset-utils.cc
In file included from /usr/include/CGAL/license/Nef_3.h:17,
from /usr/include/CGAL/Nef_3/SNC_iteration.h:18,
from src/ext/CGAL/CGAL_workaround_Mark_bounded_volumes.h:36,
from src/cgal.h:12,
from src/cgalutils.h:3,
from src/polyset-utils.cc:9:
/usr/include/CGAL/config.h:147:2: error: #error "CGAL requires C++ 17"
147 | #error "CGAL requires C++ 17"
| ^~~~~
In file included from /usr/include/CGAL/basic.h:27,
from /usr/include/CGAL/number_type_basic.h:23,
from /usr/include/CGAL/Gmpq.h:16,
from src/cgal.h:13:
[...]
/usr/include/CGAL/double.h:190:25: required from here
06:32:22 [22/9470]
190 | return CGAL::is_finite(d) && (std::ceil(d) == d);
| ~~~~~~~~~~~~~~~^~~
/usr/include/CGAL/number_utils.h:253:1: error: no type named ‘result_type’ in
‘class CGAL::Real_embeddable_traits<double>::Is_finite’
253 | is_finite( const Real_embeddable& x ) {
| ^~~~~~~~~
In file included from /usr/include/CGAL/Interval_nt.h:41,
from /usr/include/CGAL/long_double.h:27,
from /usr/include/CGAL/number_type_basic.h:52:
/usr/include/CGAL/Interval_traits.h: At global scope:
/usr/include/CGAL/Interval_traits.h:60:17: internal compiler error:
Segmentation fault
60 | typedef CGAL::Tag_false Is_interval;
| ^~~~~~~~~
0x5d3f319c9e1b internal_error(char const*, ...)
/usr/src/debug/sys-devel/gcc-15.0.9999/gcc-15.0.9999/gcc/diagnostic-global-context.cc:517
0x5d3f311e892d crash_signal
/usr/src/debug/sys-devel/gcc-15.0.9999/gcc-15.0.9999/gcc/toplev.cc:322
0x719fa161e3ef ???
/usr/src/debug/sys-libs/glibc-2.40-r5/glibc-2.40/signal/../sysdeps/unix/sysv/linux/x86_64/libc_sigaction.c:0
0x5d3f32621a0e contains_struct_check(tree_node*, tree_node_structure_enum, char
const*, int, char const*)
/usr/src/debug/sys-devel/gcc-15.0.9999/gcc-15.0.9999/gcc/tree.h:3778
0x5d3f32621a0e tree_decl_hash::hash(tree_node*)
/usr/src/debug/sys-devel/gcc-15.0.9999/gcc-15.0.9999/gcc/tree.h:5914
0x5d3f31af5e6f simple_hashmap_traits<tree_decl_hash, unsigned
int>::hash(tree_node* const&)
/usr/src/debug/sys-devel/gcc-15.0.9999/gcc-15.0.9999/gcc/hash-map-traits.h:50
0x5d3f31af5e6f hash_map<tree_node*, unsigned int,
simple_hashmap_traits<tree_decl_hash, unsigned int>
>::hash_entry::hash(hash_map<tree_node*, unsigned int,
simple_hashmap_traits<tree_de
cl_hash, unsigned int> >::hash_entry const&)
/usr/src/debug/sys-devel/gcc-15.0.9999/gcc-15.0.9999/gcc/hash-map.h:52
0x5d3f31af5e6f hash_table<hash_map<tree_node*, unsigned int,
simple_hashmap_traits<tree_decl_hash, unsigned int> >::hash_entry, false,
xcallocator>::verify(tree_node* const&, unsigned in
t) [clone .isra.0]
/usr/src/debug/sys-devel/gcc-15.0.9999/gcc-15.0.9999/gcc/hash-table.h:1116
0x5d3f2ff8324b hash_table<hash_map<tree_node*, unsigned int,
simple_hashmap_traits<tree_decl_hash, unsigned int> >::hash_entry, false,
xcallocator>::find_slot_with_hash(tree_node* const&
, unsigned int, insert_option)
/usr/src/debug/sys-devel/gcc-15.0.9999/gcc-15.0.9999/gcc/hash-table.h:1046
0x5d3f2ff8324b hash_map<tree_node*, unsigned int,
simple_hashmap_traits<tree_decl_hash, unsigned int> >::get_or_insert(tree_node*
const&, bool*)
/usr/src/debug/sys-devel/gcc-15.0.9999/gcc-15.0.9999/gcc/hash-map.h:201
0x5d3f2ff8324b unsigned int& hash_map_safe_get_or_insert<false, tree_node*,
unsigned int, simple_hashmap_traits<tree_decl_hash, unsigned int>
>(hash_map<tree_node*, unsigned int, simple_
hashmap_traits<tree_decl_hash, unsigned int> >*&, tree_node* const&, bool*,
unsigned long)
/usr/src/debug/sys-devel/gcc-15.0.9999/gcc-15.0.9999/gcc/hash-map.h:376
0x5d3f2ff8324b cp_adjust_diagnostic_info
/usr/src/debug/sys-devel/gcc-15.0.9999/gcc-15.0.9999/gcc/cp/error.cc:242
0x5d3f31b20c1b cp_adjust_diagnostic_info
/usr/src/debug/sys-devel/gcc-15.0.9999/gcc-15.0.9999/gcc/opts-common.cc:1861
0x5d3f31b20c1b diagnostic_context::report_diagnostic(diagnostic_info*)
/usr/src/debug/sys-devel/gcc-15.0.9999/gcc-15.0.9999/gcc/diagnostic.cc:1227
0x5d3f31b205b4 diagnostic_context::diagnostic_impl(rich_location*,
diagnostic_metadata const*, diagnostic_option_id, char const*, __va_list_tag
(*) [1], diagnostic_t)
/usr/src/debug/sys-devel/gcc-15.0.9999/gcc-15.0.9999/gcc/diagnostic.cc:1425
0x5d3f3017a875 error_at(rich_location*, char const*, ...)
/usr/src/debug/sys-devel/gcc-15.0.9999/gcc-15.0.9999/gcc/diagnostic-global-context.cc:439
0x5d3f30223fa4 cp_parser_diagnose_invalid_type_name
/usr/src/debug/sys-devel/gcc-15.0.9999/gcc-15.0.9999/gcc/cp/parser.cc:3868
0x5d3f3252d34c cp_parser_parse_and_diagnose_invalid_type_name
/usr/src/debug/sys-devel/gcc-15.0.9999/gcc-15.0.9999/gcc/cp/parser.cc:3975
0x5d3f31d3244e cp_parser_member_declaration
/usr/src/debug/sys-devel/gcc-15.0.9999/gcc-15.0.9999/gcc/cp/parser.cc:28344
0x5d3f31ce28f2 cp_parser_member_specification_opt
/usr/src/debug/sys-devel/gcc-15.0.9999/gcc-15.0.9999/gcc/cp/parser.cc:28187
Please submit a full bug report, with preprocessed source (by using
-freport-bug).
Please include the complete backtrace with any bug report.
See <https://bugs.gentoo.org/> for instructions.
```
Extracting preprocessed source for this is a pain as it doesn't ICE with that.