public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/114433] New: ICE: verify_ssa failed: definition in block 9 does not dominate use in block 8 with _BitInt() bitfield shift at -O1 and above
@ 2024-03-22 13:29 zsojka at seznam dot cz
  2024-03-22 16:41 ` [Bug tree-optimization/114433] " jakub at gcc dot gnu.org
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: zsojka at seznam dot cz @ 2024-03-22 13:29 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 114433
           Summary: ICE: verify_ssa failed: definition in block 9 does not
                    dominate use in block 8 with _BitInt() bitfield shift
                    at -O1 and above
           Product: gcc
           Version: 14.0
            Status: UNCONFIRMED
          Keywords: ice-on-valid-code
          Severity: normal
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: zsojka at seznam dot cz
                CC: jakub at gcc dot gnu.org
  Target Milestone: ---
              Host: x86_64-pc-linux-gnu
            Target: x86_64-pc-linux-gnu

Created attachment 57778
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=57778&action=edit
reduced testcase

Similar to PR114365

Compiler output:
$ x86_64-pc-linux-gnu-gcc -O testcase.c 
testcase.c: In function 'foo':
testcase.c:7:1: error: definition in block 9 does not dominate use in block 8
    7 | foo()
      | ^~~
for SSA_NAME: _12 in statement:
_38 = _12 >> 31;
during GIMPLE pass: bitintlower
testcase.c:7:1: internal compiler error: verify_ssa failed
0x177a70f verify_ssa(bool, bool)
        /repo/gcc-trunk/gcc/tree-ssa.cc:1203
0x13cbd45 execute_function_todo
        /repo/gcc-trunk/gcc/passes.cc:2095
0x13cc1ae execute_todo
        /repo/gcc-trunk/gcc/passes.cc:2142
Please submit a full bug report, with preprocessed source (by using
-freport-bug).
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.

$ x86_64-pc-linux-gnu-gcc -v
Using built-in specs.
COLLECT_GCC=/repo/gcc-trunk/binary-latest-amd64/bin/x86_64-pc-linux-gnu-gcc
COLLECT_LTO_WRAPPER=/repo/gcc-trunk/binary-trunk-r14-9610-20240322092442-gddd4a3ca874-checking-yes-rtl-df-extra-nobootstrap-amd64/bin/../libexec/gcc/x86_64-pc-linux-gnu/14.0.1/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: /repo/gcc-trunk//configure --enable-languages=c,c++
--enable-valgrind-annotations --disable-nls --enable-checking=yes,rtl,df,extra
--disable-bootstrap --with-cloog --with-ppl --with-isl
--build=x86_64-pc-linux-gnu --host=x86_64-pc-linux-gnu
--target=x86_64-pc-linux-gnu --with-ld=/usr/bin/x86_64-pc-linux-gnu-ld
--with-as=/usr/bin/x86_64-pc-linux-gnu-as --enable-libsanitizer
--disable-libstdcxx-pch
--prefix=/repo/gcc-trunk//binary-trunk-r14-9610-20240322092442-gddd4a3ca874-checking-yes-rtl-df-extra-nobootstrap-amd64
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 14.0.1 20240322 (experimental) (GCC)

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug tree-optimization/114433] ICE: verify_ssa failed: definition in block 9 does not dominate use in block 8 with _BitInt() bitfield shift at -O1 and above
  2024-03-22 13:29 [Bug tree-optimization/114433] New: ICE: verify_ssa failed: definition in block 9 does not dominate use in block 8 with _BitInt() bitfield shift at -O1 and above zsojka at seznam dot cz
@ 2024-03-22 16:41 ` jakub at gcc dot gnu.org
  2024-03-23  2:31 ` zsojka at seznam dot cz
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: jakub at gcc dot gnu.org @ 2024-03-22 16:41 UTC (permalink / raw)
  To: gcc-bugs

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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Last reconfirmed|                            |2024-03-22
             Status|UNCONFIRMED                 |ASSIGNED
           Assignee|unassigned at gcc dot gnu.org      |jakub at gcc dot gnu.org
     Ever confirmed|0                           |1

--- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Created attachment 57782
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=57782&action=edit
gcc14-pr114433.patch

Untested fix.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug tree-optimization/114433] ICE: verify_ssa failed: definition in block 9 does not dominate use in block 8 with _BitInt() bitfield shift at -O1 and above
  2024-03-22 13:29 [Bug tree-optimization/114433] New: ICE: verify_ssa failed: definition in block 9 does not dominate use in block 8 with _BitInt() bitfield shift at -O1 and above zsojka at seznam dot cz
  2024-03-22 16:41 ` [Bug tree-optimization/114433] " jakub at gcc dot gnu.org
@ 2024-03-23  2:31 ` zsojka at seznam dot cz
  2024-03-23 10:20 ` cvs-commit at gcc dot gnu.org
  2024-03-23 10:21 ` jakub at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: zsojka at seznam dot cz @ 2024-03-23  2:31 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from Zdenek Sojka <zsojka at seznam dot cz> ---
Created attachment 57786
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=57786&action=edit
probably related, not fully reduced testcase

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug tree-optimization/114433] ICE: verify_ssa failed: definition in block 9 does not dominate use in block 8 with _BitInt() bitfield shift at -O1 and above
  2024-03-22 13:29 [Bug tree-optimization/114433] New: ICE: verify_ssa failed: definition in block 9 does not dominate use in block 8 with _BitInt() bitfield shift at -O1 and above zsojka at seznam dot cz
  2024-03-22 16:41 ` [Bug tree-optimization/114433] " jakub at gcc dot gnu.org
  2024-03-23  2:31 ` zsojka at seznam dot cz
@ 2024-03-23 10:20 ` cvs-commit at gcc dot gnu.org
  2024-03-23 10:21 ` jakub at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2024-03-23 10:20 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Jakub Jelinek <jakub@gcc.gnu.org>:

https://gcc.gnu.org/g:4a46a48ebc7b7b3976af49f6f8dabd65c6ddf64b

commit r14-9641-g4a46a48ebc7b7b3976af49f6f8dabd65c6ddf64b
Author: Jakub Jelinek <jakub@redhat.com>
Date:   Sat Mar 23 11:20:00 2024 +0100

    bitint: Fix bitfield loads in handle_cast [PR114433]

    We ICE on the following testcase, because handle_cast was incorrectly
    testing !m_first to see whether it should use m_data[m_bitfld_load + 1]
    or fresh SSA_NAME for a PHI result.
    Now, m_first is in the routine sometimes temporarily cleared in between
    doing prepare_data_in_out and the !m_first check and only before returning
    restored from the save_first copy.
    Without this patch, we try to use the same SSA_NAME (_12 here) in 2
    different PHI results which is obviously invalid IL and ICEs very quickly.

    2024-03-23  Jakub Jelinek  <jakub@redhat.com>

            PR tree-optimization/114433
            * gimple-lower-bitint.cc (bitint_large_huge::handle_cast): For
            m_bitfld_load check save_first rather than m_first.

            * gcc.dg/torture/bitint-68.c: New test.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug tree-optimization/114433] ICE: verify_ssa failed: definition in block 9 does not dominate use in block 8 with _BitInt() bitfield shift at -O1 and above
  2024-03-22 13:29 [Bug tree-optimization/114433] New: ICE: verify_ssa failed: definition in block 9 does not dominate use in block 8 with _BitInt() bitfield shift at -O1 and above zsojka at seznam dot cz
                   ` (2 preceding siblings ...)
  2024-03-23 10:20 ` cvs-commit at gcc dot gnu.org
@ 2024-03-23 10:21 ` jakub at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: jakub at gcc dot gnu.org @ 2024-03-23 10:21 UTC (permalink / raw)
  To: gcc-bugs

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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |14.0
         Resolution|---                         |FIXED
             Status|ASSIGNED                    |RESOLVED

--- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Fixed.

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2024-03-23 10:21 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-03-22 13:29 [Bug tree-optimization/114433] New: ICE: verify_ssa failed: definition in block 9 does not dominate use in block 8 with _BitInt() bitfield shift at -O1 and above zsojka at seznam dot cz
2024-03-22 16:41 ` [Bug tree-optimization/114433] " jakub at gcc dot gnu.org
2024-03-23  2:31 ` zsojka at seznam dot cz
2024-03-23 10:20 ` cvs-commit at gcc dot gnu.org
2024-03-23 10:21 ` jakub at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).