public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/113691] New: ICE: in lower_stmt, at gimple-lower-bitint.cc:5444 with function declaration with no parameter specification
@ 2024-01-31 21:11 zsojka at seznam dot cz
  2024-01-31 22:48 ` [Bug tree-optimization/113691] " pinskia at gcc dot gnu.org
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: zsojka at seznam dot cz @ 2024-01-31 21:11 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 113691
           Summary: ICE: in lower_stmt, at gimple-lower-bitint.cc:5444
                    with function declaration with no parameter
                    specification
           Product: gcc
           Version: 14.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: zsojka at seznam dot cz
  Target Milestone: ---
              Host: x86_64-pc-linux-gnu
            Target: x86_64-pc-linux-gnu

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

I don't know if the code is valid or not, but GCC does not reject the code
unless -pedantic-errors or -std=c23 is passed.

Compiler output:
$ x86_64-pc-linux-gnu-gcc -O testcase.c
during GIMPLE pass: bitintlower
testcase.c: In function 'bar':
testcase.c:3:6: internal compiler error: in lower_stmt, at
gimple-lower-bitint.cc:5444
    3 | void bar() { foo(bar_i); }
      |      ^~~
0xd8cab5 lower_stmt
        /repo/gcc-trunk/gcc/gimple-lower-bitint.cc:5444
0x2720009 gimple_lower_bitint
        /repo/gcc-trunk/gcc/gimple-lower-bitint.cc:6564
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-8665-20240131161256-g3fed1609f61-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 --disable-libstdcxx-pch
--prefix=/repo/gcc-trunk//binary-trunk-r14-8665-20240131161256-g3fed1609f61-checking-yes-rtl-df-extra-nobootstrap-amd64
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 14.0.1 20240131 (experimental) (GCC)

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

* [Bug tree-optimization/113691] ICE: in lower_stmt, at gimple-lower-bitint.cc:5444 with function declaration with no parameter specification
  2024-01-31 21:11 [Bug tree-optimization/113691] New: ICE: in lower_stmt, at gimple-lower-bitint.cc:5444 with function declaration with no parameter specification zsojka at seznam dot cz
@ 2024-01-31 22:48 ` pinskia at gcc dot gnu.org
  2024-02-01 11:30 ` jakub at gcc dot gnu.org
  2024-02-02 10:30 ` cvs-commit at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: pinskia at gcc dot gnu.org @ 2024-01-31 22:48 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
     Ever confirmed|0                           |1
           See Also|                            |https://gcc.gnu.org/bugzill
                   |                            |a/show_bug.cgi?id=113692
   Last reconfirmed|                            |2024-01-31
             Status|UNCONFIRMED                 |NEW
           Keywords|                            |ice-on-valid-code

--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
```
  intD.6 * pD.2782;
  _BitInt(129) i.0_1;

;;   basic block 2, loop depth 0, count 1073741824 (estimated locally, freq
1.0000), maybe hot
;;    prev block 0, next block 1, flags: (NEW, REACHABLE, VISITED)
;;    pred:       ENTRY [always]  count:1073741824 (estimated locally, freq
1.0000) (FALLTHRU,EXECUTABLE)
  # VUSE <.MEM_2(D)>
  i.0_1 = iD.2768;
  # PT = nonlocal escaped null 
  p_4 = (intD.6 *) i.0_1;
```

Confirmed. The problem is the same as recorded in PR 113692. The cast between
_BitInt and a pointer is not expected ..

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

* [Bug tree-optimization/113691] ICE: in lower_stmt, at gimple-lower-bitint.cc:5444 with function declaration with no parameter specification
  2024-01-31 21:11 [Bug tree-optimization/113691] New: ICE: in lower_stmt, at gimple-lower-bitint.cc:5444 with function declaration with no parameter specification zsojka at seznam dot cz
  2024-01-31 22:48 ` [Bug tree-optimization/113691] " pinskia at gcc dot gnu.org
@ 2024-02-01 11:30 ` jakub at gcc dot gnu.org
  2024-02-02 10:30 ` cvs-commit at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: jakub at gcc dot gnu.org @ 2024-02-01 11:30 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jakub at gcc dot gnu.org
         Resolution|---                         |DUPLICATE
             Status|NEW                         |RESOLVED

--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Indeed, the PR113692 fix fixes this too.
I'll include testcase from this PR.

*** This bug has been marked as a duplicate of bug 113692 ***

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

* [Bug tree-optimization/113691] ICE: in lower_stmt, at gimple-lower-bitint.cc:5444 with function declaration with no parameter specification
  2024-01-31 21:11 [Bug tree-optimization/113691] New: ICE: in lower_stmt, at gimple-lower-bitint.cc:5444 with function declaration with no parameter specification zsojka at seznam dot cz
  2024-01-31 22:48 ` [Bug tree-optimization/113691] " pinskia at gcc dot gnu.org
  2024-02-01 11:30 ` jakub at gcc dot gnu.org
@ 2024-02-02 10:30 ` cvs-commit at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2024-02-02 10:30 UTC (permalink / raw)
  To: gcc-bugs

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

--- 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:a049acabcb11d6ae9e54c81e5835e4f3372e80fb

commit r14-8748-ga049acabcb11d6ae9e54c81e5835e4f3372e80fb
Author: Jakub Jelinek <jakub@redhat.com>
Date:   Fri Feb 2 11:29:25 2024 +0100

    testsuite: Add another bitint testcase [PR113691]

    This is fixed by the PR113692 patch.

    2024-02-02  Jakub Jelinek  <jakub@redhat.com>

            PR tree-optimization/113691
            * gcc.dg/bitint-83.c: New test.

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

end of thread, other threads:[~2024-02-02 10:30 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-01-31 21:11 [Bug tree-optimization/113691] New: ICE: in lower_stmt, at gimple-lower-bitint.cc:5444 with function declaration with no parameter specification zsojka at seznam dot cz
2024-01-31 22:48 ` [Bug tree-optimization/113691] " pinskia at gcc dot gnu.org
2024-02-01 11:30 ` jakub at gcc dot gnu.org
2024-02-02 10:30 ` cvs-commit 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).