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

            Bug ID: 120115
           Summary: ICE in quick_grow_cleared with
                    -fdisable-tree-switchlower1
                    -fdisable-tree-switchlower2
           Product: gcc
           Version: 16.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: middle-end
          Assignee: unassigned at gcc dot gnu.org
          Reporter: sjames at gcc dot gnu.org
  Target Milestone: ---

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

I'm not sure if this is valid to be trying or not.

To workaround PR120080, I tried -fdisable-tree-switchlower1
-fdisable-tree-switchlower2 and hit this:
```
$ g++ -m32 ./lib/Support/CMakeFiles/LLVMSupport.dir/Path.cpp.ii -c
-fdisable-tree-switchlower1 -fdisable-tree-switchlower2 -O1
cc1plus: note: disable pass tree-switchlower1 for functions in the range of [0,
4294967295]
cc1plus: note: disable pass tree-switchlower2 for functions in the range of [0,
4294967295]
during RTL pass: expand
In file included from
/var/tmp/portage.notmp/portage/llvm-core/llvm-20.1.4/work/llvm/lib/Support/Path.cpp:1199:
In function ‘bool llvm::sys::fs::is_local_impl(statfs&)’,
    inlined from ‘std::error_code llvm::sys::fs::is_local(const llvm::Twine&,
bool&)’ at
/var/tmp/portage.notmp/portage/llvm-core/llvm-20.1.4/work/llvm/lib/Support/Unix/Path.inc:563:25:
/var/tmp/portage.notmp/portage/llvm-core/llvm-20.1.4/work/llvm/lib/Support/Unix/Path.inc:488:3:
internal compiler error: in quick_grow_cleared, at vec.h:1443
  488 |   switch ((uint32_t)Vfs.f_type) {
      |   ^~~~~~
0x5c39613c2c3f internal_error(char const*, ...)
       
/usr/src/debug/sys-devel/gcc-16.0.9999/gcc-16.0.9999/gcc/diagnostic-global-context.cc:517
0x5c39613a4534 fancy_abort(char const*, int, char const*)
       
/usr/src/debug/sys-devel/gcc-16.0.9999/gcc-16.0.9999/gcc/diagnostic.cc:1748
0x5c39601c117a vec<rtx_def*, va_heap, vl_embed>::quick_grow_cleared(unsigned
int)
        /usr/src/debug/sys-devel/gcc-16.0.9999/gcc-16.0.9999/gcc/vec.h:1443
0x5c39601c117a vec<rtx_def*, va_heap, vl_ptr>::safe_grow_cleared(unsigned int,
bool)
        /usr/src/debug/sys-devel/gcc-16.0.9999/gcc-16.0.9999/gcc/vec.h:2155
0x5c39621f9de6 emit_case_dispatch_table
        /usr/src/debug/sys-devel/gcc-16.0.9999/gcc-16.0.9999/gcc/stmt.cc:802
0x5c3961e47e1b expand_case(gswitch*)
        /usr/src/debug/sys-devel/gcc-16.0.9999/gcc-16.0.9999/gcc/stmt.cc:1032
0x5c3961abbff8 expand_gimple_stmt
       
/usr/src/debug/sys-devel/gcc-16.0.9999/gcc-16.0.9999/gcc/cfgexpand.cc:4364
0x5c3961abbff8 expand_gimple_basic_block
       
/usr/src/debug/sys-devel/gcc-16.0.9999/gcc-16.0.9999/gcc/cfgexpand.cc:6427
0x5c3961a16dd7 execute
       
/usr/src/debug/sys-devel/gcc-16.0.9999/gcc-16.0.9999/gcc/cfgexpand.cc:7176
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.
```

---

```
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-pc-linux-gnu/16/lto-wrapper
OFFLOAD_TARGET_NAMES=nvptx-none
OFFLOAD_TARGET_DEFAULT=1
Target: x86_64-pc-linux-gnu
Configured with:
/var/tmp/portage/sys-devel/gcc-16.0.9999/work/gcc-16.0.9999/configure
--host=x86_64-pc-linux-gnu --build=x86_64-pc-linux-gnu --prefix=/usr
--bindir=/usr/x86_64-pc-linux-gnu/gcc-bin/16
--includedir=/usr/lib/gcc/x86_64-pc-linux-gnu/16/include
--datadir=/usr/share/gcc-data/x86_64-pc-linux-gnu/16
--mandir=/usr/share/gcc-data/x86_64-pc-linux-gnu/16/man
--infodir=/usr/share/gcc-data/x86_64-pc-linux-gnu/16/info
--with-gxx-include-dir=/usr/lib/gcc/x86_64-pc-linux-gnu/16/include/g++-v16
--disable-silent-rules --disable-dependency-tracking
--with-python-dir=/share/gcc-data/x86_64-pc-linux-gnu/16/python
--enable-libphobos --enable-objc-gc
--enable-languages=c,c++,d,objc,obj-c++,fortran,ada,cobol,m2,rust
--enable-obsolete --enable-secureplt --disable-werror --with-system-zlib
--enable-nls --without-included-gettext --disable-libunwind-exceptions
--enable-checking=yes,extra,rtl --with-bugurl=https://bugs.gentoo.org/
--with-pkgversion='Gentoo Hardened 16.0.9999 p, commit
93f36c1b921e531fd4cdc6aee7af55e1d6eb9d39' --with-gcc-major-version-only
--enable-libstdcxx-time --enable-lto --disable-libstdcxx-pch --enable-shared
--enable-threads=posix --enable-__cxa_atexit --enable-clocale=gnu
--enable-multilib --with-multilib-list=m32,m64 --disable-fixed-point
--enable-targets=all --enable-offload-defaulted
--enable-offload-targets=nvptx-none --enable-libgomp --disable-libssp
--enable-libada --disable-cet --disable-systemtap --enable-valgrind-annotations
--disable-vtable-verify --disable-libvtv --with-zstd --with-isl
--disable-isl-version-check --enable-default-pie --enable-host-pie
--enable-host-bind-now --enable-default-ssp --disable-fixincludes
--with-gxx-libcxx-include-dir=/usr/include/c++/v1 --enable-linker-build-id
--with-build-config='bootstrap-O3 bootstrap-lto'
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 16.0.0 20250504 (experimental)
064cac730f88dc71c6da578f9ae5b8e092ab6cd4 (Gentoo Hardened 16.0.9999 p, commit
93f36c1b921e531fd4cdc6aee7af55e1d6eb9d39)
```

Reply via email to