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

            Bug ID: 124002
           Summary: ice: virtual use of statement not up to date
           Product: gcc
           Version: 16.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: dcb314 at hotmail dot com
  Target Milestone: ---

Created attachment 63607
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=63607&action=edit
gzipped C++ source code

For the attached C++ code, with recent gcc trunk:

foundBugs $ /home/dcb42/gcc/results.20260131.ubsan/bin/g++ -c -w -O2
-march=znver3 bug1182.cc
foundBugs $ 

but a few days later:

foundBugs $ /home/dcb42/gcc/results.20260203.ubsan/bin/g++ -c -w -O2
-march=znver3 bug1182.cc
In file included from
/home/dcb42/rpmbuild/BUILD/mfem-4.8-build/mfem-4.8/examples/ex37.cpp:53:
/home/dcb42/rpmbuild/BUILD/mfem-4.8-build/mfem-4.8/examples/ex37.hpp: In
function ‘mfem::real_t mfem::der_sigmoid(real_t)’:
/home/dcb42/rpmbuild/BUILD/mfem-4.8-build/mfem-4.8/examples/ex37.hpp:33:8:
error: virtual use of statement not up to date
   33 | real_t der_sigmoid(real_t x)
      |        ^~~~~~~~~~~
# VUSE <_8>
return _6;
during GIMPLE pass: widening_mul
/home/dcb42/rpmbuild/BUILD/mfem-4.8-build/mfem-4.8/examples/ex37.hpp:33:8:
internal compiler error: verify_ssa failed

Git hashes are:

foundBugs $ /home/dcb42/gcc/results.20260131.ubsan/bin/g++ -v 2>&1 | grep exp
gcc version 16.0.1 20260131 (experimental) (c035985fd611dfb2) 
foundBugs $ /home/dcb42/gcc/results.20260203.ubsan/bin/g++ -v 2>&1 | grep exp
gcc version 16.0.1 20260203 (experimental) (a70bdd86984c0b6c) 
foundBugs $ 

I will have a go at a reduction. I am not sure if this is a 16 regression.

Reply via email to