public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/112734] New: ICE verify_gimple failed since r14-3751-g8c984a1c3693df - BitInt
@ 2023-11-27 19:52 mjires at suse dot cz
  2023-11-28  2:02 ` [Bug tree-optimization/112734] " pinskia at gcc dot gnu.org
                   ` (10 more replies)
  0 siblings, 11 replies; 12+ messages in thread
From: mjires at suse dot cz @ 2023-11-27 19:52 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 112734
           Summary: ICE verify_gimple failed since
                    r14-3751-g8c984a1c3693df - BitInt
           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: mjires at suse dot cz
                CC: jakub at redhat dot com
  Target Milestone: ---

Compiling reduced testcase gcc.dg/torture/bitint-3.c results in ICE.

$ cat bitint-3.c
_BitInt(128) out;
void main() {
  _BitInt(8) q[1];
  out -= 1;
}


$ gcc bitint-3.c -fnon-call-exceptions -ftrapv
bitint-3.c: In function ‘main’:
bitint-3.c:2:6: error: statement marked for throw in middle of block
    2 | void main() {
      |      ^~~~
_7 = _8 + -1;
during GIMPLE pass: bitintlower0
bitint-3.c:2:6: internal compiler error: verify_gimple failed
0x105897d verify_gimple_in_cfg(function*, bool, bool)
        /home/mjires/git/GCC/master/gcc/tree-cfg.cc:5662
0xee8ad4 execute_function_todo
        /home/mjires/git/GCC/master/gcc/passes.cc:2088
0xee902e execute_todo
        /home/mjires/git/GCC/master/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.


$ gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/home/mjires/built/master/libexec/gcc/x86_64-pc-linux-gnu/14.0.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: /home/mjires/git/GCC/master/configure
--prefix=/home/mjires/built/master --disable-bootstrap --enable-checking
--enable-languages=c,c++,fortran,lto
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 14.0.0 20231127 (experimental) (GCC)

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

* [Bug tree-optimization/112734] ICE verify_gimple failed since r14-3751-g8c984a1c3693df - BitInt
  2023-11-27 19:52 [Bug tree-optimization/112734] New: ICE verify_gimple failed since r14-3751-g8c984a1c3693df - BitInt mjires at suse dot cz
@ 2023-11-28  2:02 ` pinskia at gcc dot gnu.org
  2023-11-28  9:06 ` jakub at gcc dot gnu.org
                   ` (9 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: pinskia at gcc dot gnu.org @ 2023-11-28  2:02 UTC (permalink / raw)
  To: gcc-bugs

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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2023-11-28
     Ever confirmed|0                           |1

--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Confirmed.

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

* [Bug tree-optimization/112734] ICE verify_gimple failed since r14-3751-g8c984a1c3693df - BitInt
  2023-11-27 19:52 [Bug tree-optimization/112734] New: ICE verify_gimple failed since r14-3751-g8c984a1c3693df - BitInt mjires at suse dot cz
  2023-11-28  2:02 ` [Bug tree-optimization/112734] " pinskia at gcc dot gnu.org
@ 2023-11-28  9:06 ` jakub at gcc dot gnu.org
  2023-11-28  9:09 ` jakub at gcc dot gnu.org
                   ` (8 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: jakub at gcc dot gnu.org @ 2023-11-28  9:06 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jakub at gcc dot gnu.org

--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
We should finally rewrite -ftrapv using the overflow builtins.
If not, we need to do it at least for bitints before bitint lowering, because
obviously we don't have any libgcc support for trapv
additions/subtractions/multiplications.

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

* [Bug tree-optimization/112734] ICE verify_gimple failed since r14-3751-g8c984a1c3693df - BitInt
  2023-11-27 19:52 [Bug tree-optimization/112734] New: ICE verify_gimple failed since r14-3751-g8c984a1c3693df - BitInt mjires at suse dot cz
  2023-11-28  2:02 ` [Bug tree-optimization/112734] " pinskia at gcc dot gnu.org
  2023-11-28  9:06 ` jakub at gcc dot gnu.org
@ 2023-11-28  9:09 ` jakub at gcc dot gnu.org
  2023-11-28 11:26 ` rguenth at gcc dot gnu.org
                   ` (7 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: jakub at gcc dot gnu.org @ 2023-11-28  9:09 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
And, we need to do it actually for all bitints including the smallest ones,
because libgcc.a will handle just 32/64/128 bit cases and not 2, 16, 37, 127,
238 etc.

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

* [Bug tree-optimization/112734] ICE verify_gimple failed since r14-3751-g8c984a1c3693df - BitInt
  2023-11-27 19:52 [Bug tree-optimization/112734] New: ICE verify_gimple failed since r14-3751-g8c984a1c3693df - BitInt mjires at suse dot cz
                   ` (2 preceding siblings ...)
  2023-11-28  9:09 ` jakub at gcc dot gnu.org
@ 2023-11-28 11:26 ` rguenth at gcc dot gnu.org
  2023-11-28 11:39 ` jakub at gcc dot gnu.org
                   ` (6 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: rguenth at gcc dot gnu.org @ 2023-11-28 11:26 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from Richard Biener <rguenth at gcc dot gnu.org> ---
Or make -ftrapv not cover bit-int?

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

* [Bug tree-optimization/112734] ICE verify_gimple failed since r14-3751-g8c984a1c3693df - BitInt
  2023-11-27 19:52 [Bug tree-optimization/112734] New: ICE verify_gimple failed since r14-3751-g8c984a1c3693df - BitInt mjires at suse dot cz
                   ` (3 preceding siblings ...)
  2023-11-28 11:26 ` rguenth at gcc dot gnu.org
@ 2023-11-28 11:39 ` jakub at gcc dot gnu.org
  2023-11-29 23:23 ` [Bug tree-optimization/112734] [14 regression] " sjames at gcc dot gnu.org
                   ` (5 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: jakub at gcc dot gnu.org @ 2023-11-28 11:39 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #5 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
I think that is pretty much what is implemented (but not taking it into
account).
Ok, will try to figure out why we ICE.
I think -fnon-call-exceptions -ftrapv isn't really a good flag combination,
because none of the trapv libgcc handlers are built with -fnon-call-exceptions
nor marked as possibly throwing, so one gets a trap/abort rather than something
that could be caught anyway.

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

* [Bug tree-optimization/112734] [14 regression] ICE verify_gimple failed since r14-3751-g8c984a1c3693df - BitInt
  2023-11-27 19:52 [Bug tree-optimization/112734] New: ICE verify_gimple failed since r14-3751-g8c984a1c3693df - BitInt mjires at suse dot cz
                   ` (4 preceding siblings ...)
  2023-11-28 11:39 ` jakub at gcc dot gnu.org
@ 2023-11-29 23:23 ` sjames at gcc dot gnu.org
  2024-01-10 13:44 ` [Bug tree-optimization/112734] " rguenth at gcc dot gnu.org
                   ` (4 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: sjames at gcc dot gnu.org @ 2023-11-29 23:23 UTC (permalink / raw)
  To: gcc-bugs

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

Sam James <sjames at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |sjames at gcc dot gnu.org
   Target Milestone|---                         |14.0
            Summary|ICE verify_gimple failed    |[14 regression] ICE
                   |since                       |verify_gimple failed since
                   |r14-3751-g8c984a1c3693df -  |r14-3751-g8c984a1c3693df -
                   |BitInt                      |BitInt

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

* [Bug tree-optimization/112734] ICE verify_gimple failed since r14-3751-g8c984a1c3693df - BitInt
  2023-11-27 19:52 [Bug tree-optimization/112734] New: ICE verify_gimple failed since r14-3751-g8c984a1c3693df - BitInt mjires at suse dot cz
                   ` (5 preceding siblings ...)
  2023-11-29 23:23 ` [Bug tree-optimization/112734] [14 regression] " sjames at gcc dot gnu.org
@ 2024-01-10 13:44 ` rguenth at gcc dot gnu.org
  2024-01-10 15:51 ` jakub at gcc dot gnu.org
                   ` (3 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: rguenth at gcc dot gnu.org @ 2024-01-10 13:44 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|[14 regression] ICE         |ICE verify_gimple failed
                   |verify_gimple failed since  |since
                   |r14-3751-g8c984a1c3693df -  |r14-3751-g8c984a1c3693df -
                   |BitInt                      |BitInt
   Target Milestone|14.0                        |---

--- Comment #6 from Richard Biener <rguenth at gcc dot gnu.org> ---
Not a regression, it's a new feature.

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

* [Bug tree-optimization/112734] ICE verify_gimple failed since r14-3751-g8c984a1c3693df - BitInt
  2023-11-27 19:52 [Bug tree-optimization/112734] New: ICE verify_gimple failed since r14-3751-g8c984a1c3693df - BitInt mjires at suse dot cz
                   ` (6 preceding siblings ...)
  2024-01-10 13:44 ` [Bug tree-optimization/112734] " rguenth at gcc dot gnu.org
@ 2024-01-10 15:51 ` jakub at gcc dot gnu.org
  2024-01-10 16:19 ` cvs-commit at gcc dot gnu.org
                   ` (2 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: jakub at gcc dot gnu.org @ 2024-01-10 15:51 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #7 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
This doesn't ICE any more since
r14-6051-gb1fe98dee21773b9d908469effe2580567b903fb
aka PR112770 fix.
So guess I should include the testcase into testsuite and close.

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

* [Bug tree-optimization/112734] ICE verify_gimple failed since r14-3751-g8c984a1c3693df - BitInt
  2023-11-27 19:52 [Bug tree-optimization/112734] New: ICE verify_gimple failed since r14-3751-g8c984a1c3693df - BitInt mjires at suse dot cz
                   ` (7 preceding siblings ...)
  2024-01-10 15:51 ` jakub at gcc dot gnu.org
@ 2024-01-10 16:19 ` cvs-commit at gcc dot gnu.org
  2024-01-10 16:24 ` jakub at gcc dot gnu.org
  2024-01-20 17:25 ` pinskia at gcc dot gnu.org
  10 siblings, 0 replies; 12+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2024-01-10 16:19 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #8 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:ac6bcce1d0a364129c7e9f6cf7f75233bdd5c5f1

commit r14-7111-gac6bcce1d0a364129c7e9f6cf7f75233bdd5c5f1
Author: Jakub Jelinek <jakub@redhat.com>
Date:   Wed Jan 10 17:18:38 2024 +0100

    testsuite: Add testcase for already fixed PR [PR112734]

    This test was already fixed by r14-6051 aka PR112770 fix.

    2024-01-10  Jakub Jelinek  <jakub@redhat.com>

            PR tree-optimization/112734
            * gcc.dg/bitint-64.c: New test.

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

* [Bug tree-optimization/112734] ICE verify_gimple failed since r14-3751-g8c984a1c3693df - BitInt
  2023-11-27 19:52 [Bug tree-optimization/112734] New: ICE verify_gimple failed since r14-3751-g8c984a1c3693df - BitInt mjires at suse dot cz
                   ` (8 preceding siblings ...)
  2024-01-10 16:19 ` cvs-commit at gcc dot gnu.org
@ 2024-01-10 16:24 ` jakub at gcc dot gnu.org
  2024-01-20 17:25 ` pinskia at gcc dot gnu.org
  10 siblings, 0 replies; 12+ messages in thread
From: jakub at gcc dot gnu.org @ 2024-01-10 16:24 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED

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

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

* [Bug tree-optimization/112734] ICE verify_gimple failed since r14-3751-g8c984a1c3693df - BitInt
  2023-11-27 19:52 [Bug tree-optimization/112734] New: ICE verify_gimple failed since r14-3751-g8c984a1c3693df - BitInt mjires at suse dot cz
                   ` (9 preceding siblings ...)
  2024-01-10 16:24 ` jakub at gcc dot gnu.org
@ 2024-01-20 17:25 ` pinskia at gcc dot gnu.org
  10 siblings, 0 replies; 12+ messages in thread
From: pinskia at gcc dot gnu.org @ 2024-01-20 17:25 UTC (permalink / raw)
  To: gcc-bugs

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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |14.0

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

end of thread, other threads:[~2024-01-20 17:25 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-11-27 19:52 [Bug tree-optimization/112734] New: ICE verify_gimple failed since r14-3751-g8c984a1c3693df - BitInt mjires at suse dot cz
2023-11-28  2:02 ` [Bug tree-optimization/112734] " pinskia at gcc dot gnu.org
2023-11-28  9:06 ` jakub at gcc dot gnu.org
2023-11-28  9:09 ` jakub at gcc dot gnu.org
2023-11-28 11:26 ` rguenth at gcc dot gnu.org
2023-11-28 11:39 ` jakub at gcc dot gnu.org
2023-11-29 23:23 ` [Bug tree-optimization/112734] [14 regression] " sjames at gcc dot gnu.org
2024-01-10 13:44 ` [Bug tree-optimization/112734] " rguenth at gcc dot gnu.org
2024-01-10 15:51 ` jakub at gcc dot gnu.org
2024-01-10 16:19 ` cvs-commit at gcc dot gnu.org
2024-01-10 16:24 ` jakub at gcc dot gnu.org
2024-01-20 17:25 ` pinskia 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).