[Bug c/121101] __builtin_assoc_barrier vs function types

2025-07-16 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=121101

--- Comment #3 from Richard Biener  ---
Created attachment 61883
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=61883&action=edit
patch for the gimple verifier

I had this patch for the GIMPLE verifier but it requires more refactoring
around
reference/address verification (and general TLC would be good, we're still only
rejecting invalid stuff rather than only accepting valid things).

[Bug c/121101] __builtin_assoc_barrier vs function types

2025-07-16 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=121101

Richard Biener  changed:

   What|Removed |Added

 Status|ASSIGNED|NEW
   Keywords||accepts-invalid
   Assignee|rguenth at gcc dot gnu.org |unassigned at gcc dot 
gnu.org

[Bug c/121101] __builtin_assoc_barrier vs function types

2025-07-16 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=121101

Richard Biener  changed:

   What|Removed |Added

 Status|NEW |ASSIGNED
   Assignee|unassigned at gcc dot gnu.org  |rguenth at gcc dot 
gnu.org

--- Comment #2 from Richard Biener  ---
We have a read from a FUNCTION_DECL.  This should be invalid GIMPLE (reading
from the insn stream should be OK, but not via an [rl]value of function type).

[Bug c/121101] __builtin_assoc_barrier vs function types

2025-07-15 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=121101

Andrew Pinski  changed:

   What|Removed |Added

   Last reconfirmed||2025-07-16
  Component|tree-optimization   |c
 Status|UNCONFIRMED |NEW
 Ever confirmed|0   |1
Summary|ICE at O2: in   |__builtin_assoc_barrier vs
   |copy_reference_ops_from_ref |function types
   |, at tree-ssa-sccvn.cc:1113 |

--- Comment #1 from Andrew Pinski  ---
typedef void (*ftype)(void );
void f(void);
ftype get_free(void) { return __builtin_assoc_barrier(f); }