[Bug c/124812] [13/14/15/16 Regression] ICE with invalid __builtin_strlen definition

2026-04-09 Thread jakub at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=124812

Jakub Jelinek  changed:

   What|Removed |Added

 CC||jakub at gcc dot gnu.org

--- Comment #4 from Jakub Jelinek  ---
I believe this has been discussed in the past.
At least at some point, glibc headers have been doing something like
typeof (__builtin_whatever) __builtin_whatever __attribute__((whatever));
or similar, adding attributes or asm redirects to builtins.
Furthermore, e.g. libatomic (but user code can as well) define __atomic_* or
__sync_*
functions which are also builtins.
So what exactly can be rejected as clearly invalid (like the above testcase)
and what needs to be accepted is fuzzy.

[Bug c/124812] [13/14/15/16 Regression] ICE with invalid __builtin_strlen definition

2026-04-07 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=124812

Richard Biener  changed:

   What|Removed |Added

   Keywords||accepts-invalid
 CC||jsm28 at gcc dot gnu.org

--- Comment #3 from Richard Biener  ---
This is a frontend issue not rejecting the invalid builtin.  Doesn't
ICE with s/__builtin_strlen/strlen/

IMO __builtin_ declarations and definitions should be rejected outright.

[Bug c/124812] [13/14/15/16 Regression] ICE with invalid __builtin_strlen definition

2026-04-07 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=124812

Andrew Pinski  changed:

   What|Removed |Added

  Known to fail||12.1.0, 15.2.0
   Last reconfirmed||2026-04-08
Summary|verify_gimple failed|[13/14/15/16 Regression]
   ||ICE with invalid
   ||__builtin_strlen definition
   Keywords|ice-on-valid-code   |ice-on-invalid-code,
   ||ice-on-invalid-fuzzy
 Status|UNCONFIRMED |NEW
  Known to work||11.1.0
  Component|tree-optimization   |c
   Target Milestone|--- |13.5
 Ever confirmed|0   |1