public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug jit/96066] New: Cannot use values from some builtins because they are of void type
@ 2020-07-05 12:43 bouanto at zoho dot com
  2020-07-09  6:37 ` [Bug jit/96066] " pinskia at gcc dot gnu.org
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: bouanto at zoho dot com @ 2020-07-05 12:43 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 96066
           Summary: Cannot use values from some builtins because they are
                    of void type
           Product: gcc
           Version: 10.1.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: jit
          Assignee: dmalcolm at gcc dot gnu.org
          Reporter: bouanto at zoho dot com
  Target Milestone: ---

Hi.
Some builtin functions, like __atomic_fetch_add, have a generic return type
which libgccjit consider to be void.
That makes it impossible to use this value.
Thanks to fix this issue.

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

* [Bug jit/96066] Cannot use values from some builtins because they are of void type
  2020-07-05 12:43 [Bug jit/96066] New: Cannot use values from some builtins because they are of void type bouanto at zoho dot com
@ 2020-07-09  6:37 ` pinskia at gcc dot gnu.org
  2020-07-10 23:57 ` bouanto at zoho dot com
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu.org @ 2020-07-09  6:37 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
I think the builtin __atomic_fetch_add should not be used directly from the JIT
front-end,  rather __atomic_fetch_add_N should be used instead.

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

* [Bug jit/96066] Cannot use values from some builtins because they are of void type
  2020-07-05 12:43 [Bug jit/96066] New: Cannot use values from some builtins because they are of void type bouanto at zoho dot com
  2020-07-09  6:37 ` [Bug jit/96066] " pinskia at gcc dot gnu.org
@ 2020-07-10 23:57 ` bouanto at zoho dot com
  2021-05-18  1:04 ` bouanto at zoho dot com
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: bouanto at zoho dot com @ 2020-07-10 23:57 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from Antoni <bouanto at zoho dot com> ---
An attempt to use, let's say, __atomic_fetch_add_4, will result in a error
like:

libgccjit.so: error: unimplemented primitive type for builtin (type: BT_I4)

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

* [Bug jit/96066] Cannot use values from some builtins because they are of void type
  2020-07-05 12:43 [Bug jit/96066] New: Cannot use values from some builtins because they are of void type bouanto at zoho dot com
  2020-07-09  6:37 ` [Bug jit/96066] " pinskia at gcc dot gnu.org
  2020-07-10 23:57 ` bouanto at zoho dot com
@ 2021-05-18  1:04 ` bouanto at zoho dot com
  2021-05-18  1:06 ` bouanto at zoho dot com
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: bouanto at zoho dot com @ 2021-05-18  1:04 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from Antoni <bouanto at zoho dot com> ---
Created attachment 50832
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=50832&action=edit
Patch to fix the issues with using atomic builtins

I implemented the missing types and fixed the type checking.

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

* [Bug jit/96066] Cannot use values from some builtins because they are of void type
  2020-07-05 12:43 [Bug jit/96066] New: Cannot use values from some builtins because they are of void type bouanto at zoho dot com
                   ` (2 preceding siblings ...)
  2021-05-18  1:04 ` bouanto at zoho dot com
@ 2021-05-18  1:06 ` bouanto at zoho dot com
  2021-12-11 22:20 ` cvs-commit at gcc dot gnu.org
  2021-12-11 22:22 ` bouanto at zoho dot com
  5 siblings, 0 replies; 7+ messages in thread
From: bouanto at zoho dot com @ 2021-05-18  1:06 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from Antoni <bouanto at zoho dot com> ---
*** Bug 96067 has been marked as a duplicate of this bug. ***

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

* [Bug jit/96066] Cannot use values from some builtins because they are of void type
  2020-07-05 12:43 [Bug jit/96066] New: Cannot use values from some builtins because they are of void type bouanto at zoho dot com
                   ` (3 preceding siblings ...)
  2021-05-18  1:06 ` bouanto at zoho dot com
@ 2021-12-11 22:20 ` cvs-commit at gcc dot gnu.org
  2021-12-11 22:22 ` bouanto at zoho dot com
  5 siblings, 0 replies; 7+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-12-11 22:20 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #5 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Antoni Boucher <antoyo@gcc.gnu.org>:

https://gcc.gnu.org/g:611fdb0fc5b95ee15215e2e3679834f311919096

commit r12-5912-g611fdb0fc5b95ee15215e2e3679834f311919096
Author: Antoni Boucher <bouanto@zoho.com>
Date:   Sat Dec 11 16:42:54 2021 -0500

    libgccjit: Add support for types used by atomic builtins [PR96066]
[PR96067]

    2021-12-11  Antoni Boucher  <bouanto@zoho.com>

    gcc/jit/
            PR target/96066
            PR target/96067
            * jit-builtins.c: Implement missing types for builtins.
            * jit-recording.c:: Allow sending a volatile const void * as
            argument.
            * jit-recording.h: New functions (is_volatile, is_const) and
            allow comparing qualified types.

    gcc/testsuite/
            PR target/96066
            PR target/96067
            * jit.dg/all-non-failing-tests.h: Add test-builtin-types.c.
            * jit.dg/test-builtin-types.c
            * jit.dg/test-error-bad-assignment.c
            * jit.dg/test-fuzzer.c: Add fuzzing for type qualifiers.

    Signed-off-by: Antoni Boucher <bouanto@zoho.com>

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

* [Bug jit/96066] Cannot use values from some builtins because they are of void type
  2020-07-05 12:43 [Bug jit/96066] New: Cannot use values from some builtins because they are of void type bouanto at zoho dot com
                   ` (4 preceding siblings ...)
  2021-12-11 22:20 ` cvs-commit at gcc dot gnu.org
@ 2021-12-11 22:22 ` bouanto at zoho dot com
  5 siblings, 0 replies; 7+ messages in thread
From: bouanto at zoho dot com @ 2021-12-11 22:22 UTC (permalink / raw)
  To: gcc-bugs

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

Antoni <bouanto at zoho dot com> changed:

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

--- Comment #6 from Antoni <bouanto at zoho dot com> ---
Fixed in master.

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

end of thread, other threads:[~2021-12-11 22:22 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-05 12:43 [Bug jit/96066] New: Cannot use values from some builtins because they are of void type bouanto at zoho dot com
2020-07-09  6:37 ` [Bug jit/96066] " pinskia at gcc dot gnu.org
2020-07-10 23:57 ` bouanto at zoho dot com
2021-05-18  1:04 ` bouanto at zoho dot com
2021-05-18  1:06 ` bouanto at zoho dot com
2021-12-11 22:20 ` cvs-commit at gcc dot gnu.org
2021-12-11 22:22 ` bouanto at zoho 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).