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

            Bug ID: 105286
           Summary: Struct initializers do not work with function pointers
           Product: gcc
           Version: 12.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: jit
          Assignee: dmalcolm at gcc dot gnu.org
          Reporter: m...@nieper-wisskirchen.de
  Target Milestone: ---

Created attachment 52815
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=52815&action=edit
Sample C source demonstrating the issue

Please consider the attached C file repro.c.

$ gcc -lgccjit repro.c && ./a.out
libgccjit.so: error: gcc_jit_context_new_struct_constructor: value and field
not the same unqualified type, at index 0 (struct struct.func: void (*)
())(value type: void (*) ())
libgccjit.so: error: gcc_jit_global_set_initializer_rvalue: NULL init_rvalue
gcc_jit_result_release: NULL result

The second error is caused by the first, which is the one I am reporting here.

Reply via email to