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

            Bug ID: 122906
           Summary: ice in ix86_emit_tls_call, at
                    config/i386/i386-features.cc:3956
           Product: gcc
           Version: 16.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: dcb314 at hotmail dot com
  Target Milestone: ---

For the attached C++ code, recent g++ does this:

foundBugs $ ../results/bin/g++  -c -w -march=znver3 -mshstk -O3
-ftrivial-auto-var-init=zero -fno-loop-interchange -freport-bug -fPIC
bug1152.cc
during RTL pass: x86_cse
In file included from
/usr/include/CGAL/Boolean_set_operations_2/Polygon_conversions.h:25,
                 from
/usr/include/CGAL/Boolean_set_operations_2/Bso_internal_functions.h:24,
                 from
/usr/include/CGAL/Boolean_set_operations_2/complement.h:32,
                 from /usr/include/CGAL/Boolean_set_operations_2.h:21,
                 from
/home/dcb42/rpmbuild/BUILD/SFCGAL-2.0.0-build/SFCGAL-v2.0.0/src/algorithm/Intersection2D.cpp:8:
/usr/include/CGAL/Arr_polyline_traits_2.h: In function
‘CGAL::Arr_polyline_traits_2<SegmentTraits_2>::Curve_2
CGAL::Arr_polyline_traits_2<SegmentTraits_2>::Construct_curve_2::constructor_impl(ForwardIterator,
ForwardIterator, std::true_type) const [with ForwardIterator =
boost::range_detail::join_iterator<__gnu_cxx::__normal_iterator<CGAL::Point_2<CGAL::Epeck>*,
std::vector<CGAL::Point_2<CGAL::Epeck>,
std::allocator<CGAL::Point_2<CGAL::Epeck> > > >, CGAL::Point_2<CGAL::Epeck>*,
CGAL::Point_2<CGAL::Epeck>, CGAL::Point_2<CGAL::Epeck>&,
boost::iterators::random_access_traversal_tag>; SegmentTraits_2 =
CGAL::Arr_segment_traits_2<>]’:
/usr/include/CGAL/Arr_polyline_traits_2.h:443:5: internal compiler error: in
ix86_emit_tls_call, at config/i386/i386-features.cc:3956
  443 |     }
      |     ^
0x2281417 internal_error
       
/home/dcb42/gcc/working/gcc/../../trunk/gcc/diagnostic-global-context.cc:787
0x228ac5b fancy_abort
        /home/dcb42/gcc/working/gcc/../../trunk/gcc/diagnostics/context.cc:1805
0x1522ace ix86_emit_tls_call
       
/home/dcb42/gcc/working/gcc/../../trunk/gcc/config/i386/i386-features.cc:3951

Compiler is 

foundBugs $ ../results/bin/g++ -v
Using built-in specs.
COLLECT_GCC=../results/bin/g++
COLLECT_LTO_WRAPPER=/home/dcb42/gcc/results.20251127.asan.ubsan/libexec/gcc/x86_64-pc-linux-gnu/16.0.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: ../trunk/configure
--prefix=/home/dcb42/gcc/results.20251127.asan.ubsan --disable-bootstrap
--disable-doc --disable-multilib --with-build-config='bootstrap-asan
bootstrap-ubsan' --with-pkgversion=d151a11ee04ff11f --with-isl
--enable-checking=df,extra,fold,rtl,yes
--enable-languages=c,c++,fortran,d,m2,rust
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 16.0.0 20251127 (experimental) (d151a11ee04ff11f) 
foundBugs $ 

The bug first seems to appear sometime between g:1981390aafed1b2f
and g:c47f146274588794.

I will have a go at a reduction.

Reply via email to