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

            Bug ID: 114068
           Summary: [14 regression] ICE when building darktable-4.6.1
                    (error: PHI node with wrong VUSE on edge from BB 25)
           Product: gcc
           Version: 14.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: sjames at gcc dot gnu.org
  Target Milestone: ---

Created attachment 57505
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=57505&action=edit
RawImage.cpp.ii.xz

Initially reported downstream in Gentoo by tdr.

```
# /usr/bin/x86_64-pc-linux-gnu-g++ -DGDK_DISABLE_DEPRECATED
-DGTK_DISABLE_DEPRECATED -DGTK_DISABLE_SINGLE_INCLUDES -DNDEBUG -D_RELEASE
-D_XOPEN_SOURCE=700
-I/var/tmp/portage/media-gfx/darktable-4.6.1/work/darktable-4.6.1_build/lib64/darktable/rawspeed/src/librawspeed/common
-I/var/tmp/portage/media-gfx/darktable-4.6.1/work/darktable-4.6.1/src/external/rawspeed/src/librawspeed/common
-I/var/tmp/portage/media-gfx/darktable-4.6.1/work/darktable-4.6.1_build/lib64/darktable/rawspeed/src
-I/var/tmp/portage/media-gfx/darktable-4.6.1/work/darktable-4.6.1/src/external/rawspeed/src/librawspeed/common/..
-isystem
/var/tmp/portage/media-gfx/darktable-4.6.1/work/darktable-4.6.1/src/external/rawspeed/src/external
 -march=native -O3 -pipe -mavx -msse3 -Wall -Wformat -Wformat-security -Wshadow
-Wtype-limits -Wvla -Wmaybe-uninitialized -Wno-unknown-pragmas
-Wno-error=varargs -Wno-format-truncation -Wno-error=address-of-packed-member
-w -Wall -Wextra -Wcast-qual -Wextra -Wextra-semi -Wformat=2 -Wpointer-arith
-Wvla -Wmissing-format-attribute -Wsuggest-attribute=format
-Wno-unused-parameter -Wno-maybe-uninitialized -Wno-stringop-overflow
-Wno-array-bounds -Wstack-usage=4096 -Wframe-larger-than=4096
-Wlarger-than=32768  -O3 -std=c++20 -fPIC -fvisibility=hidden
-fvisibility-inlines-hidden   -march=native -g3 -ggdb3 -fopenmp -MD -MT
lib64/darktable/rawspeed/src/librawspeed/common/CMakeFiles/rawspeed_common.dir/RawImage.cpp.o
-MF
lib64/darktable/rawspeed/src/librawspeed/common/CMakeFiles/rawspeed_common.dir/RawImage.cpp.o.d
-o
lib64/darktable/rawspeed/src/librawspeed/common/CMakeFiles/rawspeed_common.dir/RawImage.cpp.o
-c
/var/tmp/portage/media-gfx/darktable-4.6.1/work/darktable-4.6.1/src/external/rawspeed/src/librawspeed/common/RawImage.cpp
 
/var/tmp/portage/media-gfx/darktable-4.6.1/work/darktable-4.6.1/src/external/rawspeed/src/librawspeed/common/RawImage.cpp:
In member function ‘void
rawspeed::RawImageData::clearArea(rawspeed::iRectangle2D)’:
/var/tmp/portage/media-gfx/darktable-4.6.1/work/darktable-4.6.1/src/external/rawspeed/src/librawspeed/common/RawImage.cpp:325:6:
error: PHI node with wrong VUSE on edge from BB 25
  325 | void RawImageData::clearArea(iRectangle2D area) {
      |      ^~~~~~~~~~~~
.MEM_201 = PHI <.MEM_162(25)>
expected .MEM_155
during GIMPLE pass: vect
/var/tmp/portage/media-gfx/darktable-4.6.1/work/darktable-4.6.1/src/external/rawspeed/src/librawspeed/common/RawImage.cpp:325:6:
internal compiler error: verify_ssa failed
0x562cb4452725 verify_ssa(bool, bool)
       
/usr/src/debug/sys-devel/gcc-14.0.1_pre20240218/gcc-14-20240218/gcc/tree-ssa.cc:1203

/var/tmp/portage/media-gfx/darktable-4.6.1/work/darktable-4.6.1/src/external/rawspeed/src/librawspeed/common/RawImage.cpp:325:6:
internal compiler error: Segmentation fault
0x562cb4155596 crash_signal
       
/usr/src/debug/sys-devel/gcc-14.0.1_pre20240218/gcc-14-20240218/gcc/toplev.cc:317
0x7fa03922e07f ???
       
/var/tmp/portage/sys-libs/glibc-2.38-r11/work/glibc-2.38/signal/../sysdeps/unix/sysv/linux/x86_64/libc_sigaction.c:0
0x562cb5a2f12f x86_64_fallback_frame_state
        ./md-unwind-support.h:63
0x562cb5a2f12f uw_frame_state_for
       
/usr/src/debug/sys-devel/gcc-14.0.1_pre20240218/gcc-14-20240218/libgcc/unwind-dw2.c:1013
0x562cb5a300e5 _Unwind_Backtrace
       
/usr/src/debug/sys-devel/gcc-14.0.1_pre20240218/gcc-14-20240218/libgcc/unwind.inc:303
0x562cb56fe80b backtrace_full
       
/usr/src/debug/sys-devel/gcc-14.0.1_pre20240218/gcc-14-20240218/libbacktrace/backtrace.c:127
0x562cb562138b diagnostic_context::action_after_output(diagnostic_t)
       
/usr/src/debug/sys-devel/gcc-14.0.1_pre20240218/gcc-14-20240218/gcc/diagnostic.cc:781
0x562cb55feb6b diagnostic_action_after_output(diagnostic_context*,
diagnostic_t)
       
/usr/src/debug/sys-devel/gcc-14.0.1_pre20240218/gcc-14-20240218/gcc/diagnostic.h:1002
0x562cb55feb6b diagnostic_context::report_diagnostic(diagnostic_info*)
       
/usr/src/debug/sys-devel/gcc-14.0.1_pre20240218/gcc-14-20240218/gcc/diagnostic.cc:1633
0x562cb55fefb0 diagnostic_impl
       
/usr/src/debug/sys-devel/gcc-14.0.1_pre20240218/gcc-14-20240218/gcc/diagnostic.cc:1767
0x562cb55ff2b9 internal_error(char const*, ...)
       
/usr/src/debug/sys-devel/gcc-14.0.1_pre20240218/gcc-14-20240218/gcc/diagnostic.cc:2225
0x562cb4452725 verify_ssa(bool, bool)
       
/usr/src/debug/sys-devel/gcc-14.0.1_pre20240218/gcc-14-20240218/gcc/tree-ssa.cc:1203
{standard input}: Assembler messages:
{standard input}: Error: open CFI at the end of file; missing .cfi_endproc
directive
x86_64-pc-linux-gnu-g++: internal compiler error: Segmentation fault signal
terminated program cc1plus
Please submit a full bug report, with preprocessed source (by using
-freport-bug).
See <https://bugs.gentoo.org/> for instructions.
```

I can reproduce with just g++ -c RawImage.cpp.ii -std=c++20 -O3 -march=znver2,
but for the original reporter, native was -march=sapphirerapids -mabm -mno-sgx
-mrtm -mshstk --param=l1-cache-line-size=64 --param=l1-cache-size=48
--param=l2-cache-size=76800.

Reply via email to