public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/107845] New: __builtin_init_trampoline ICEs on invalid arguments
@ 2022-11-23 17:43 gabravier at gmail dot com
  2022-11-23 18:11 ` [Bug middle-end/107845] " mpolacek at gcc dot gnu.org
  2024-01-29  1:22 ` gabravier at gmail dot com
  0 siblings, 2 replies; 3+ messages in thread
From: gabravier at gmail dot com @ 2022-11-23 17:43 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 107845
           Summary: __builtin_init_trampoline ICEs on invalid arguments
           Product: gcc
           Version: 13.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: gabravier at gmail dot com
  Target Milestone: ---

void f()
{
    __builtin_init_trampoline(0, 0, 0);
}

This crashes GCC with the following error:

during RTL pass: expand
<source>: In function 'f':
<source>:3:5: internal compiler error: in expand_builtin_init_trampoline, at
builtins.cc:5683
    3 |     __builtin_init_trampoline(0, 0, 0);
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
0x2008dee internal_error(char const*, ...)
        ???:0
0x95c468 fancy_abort(char const*, int, char const*)
        ???:0
0xac9c55 expand_builtin(tree_node*, rtx_def*, rtx_def*, machine_mode, int)
        ???:0
0xc1031c expand_expr_real_1(tree_node*, rtx_def*, machine_mode,
expand_modifier, rtx_def**, bool)
        ???:0
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.
Compiler returned: 1

It looks like `expand_builtin_init_trampoline` just uses `gcc_assert` to check
its arguments instead of the proper error handling other builtins do

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

* [Bug middle-end/107845] __builtin_init_trampoline ICEs on invalid arguments
  2022-11-23 17:43 [Bug c/107845] New: __builtin_init_trampoline ICEs on invalid arguments gabravier at gmail dot com
@ 2022-11-23 18:11 ` mpolacek at gcc dot gnu.org
  2024-01-29  1:22 ` gabravier at gmail dot com
  1 sibling, 0 replies; 3+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2022-11-23 18:11 UTC (permalink / raw)
  To: gcc-bugs

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

Marek Polacek <mpolacek at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |mpolacek at gcc dot gnu.org
   Last reconfirmed|                            |2022-11-23
           Keywords|                            |ice-on-invalid-code
             Status|UNCONFIRMED                 |NEW
     Ever confirmed|0                           |1

--- Comment #1 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
Confirmed.

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

* [Bug middle-end/107845] __builtin_init_trampoline ICEs on invalid arguments
  2022-11-23 17:43 [Bug c/107845] New: __builtin_init_trampoline ICEs on invalid arguments gabravier at gmail dot com
  2022-11-23 18:11 ` [Bug middle-end/107845] " mpolacek at gcc dot gnu.org
@ 2024-01-29  1:22 ` gabravier at gmail dot com
  1 sibling, 0 replies; 3+ messages in thread
From: gabravier at gmail dot com @ 2024-01-29  1:22 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from Gabriel Ravier <gabravier at gmail dot com> ---
I'll add that the new `__builtin_init_heap_trampoline` builtin also ICEs when
given the same arguments, presumably for the same reasons (thus, an extra bug
report doesn't seem very useful)

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

end of thread, other threads:[~2024-01-29  1:22 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-23 17:43 [Bug c/107845] New: __builtin_init_trampoline ICEs on invalid arguments gabravier at gmail dot com
2022-11-23 18:11 ` [Bug middle-end/107845] " mpolacek at gcc dot gnu.org
2024-01-29  1:22 ` gabravier at gmail dot com

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).