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

            Bug ID: 120004
           Summary: __builtin_unreachable/noreturn should not fall through
                    to another function
           Product: gcc
           Version: 16.0
            Status: UNCONFIRMED
          Severity: enhancement
          Priority: P3
         Component: rtl-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: pinskia at gcc dot gnu.org
  Target Milestone: ---

Take:
```
void g(void);
int f(int *t)
{
  g();
  __builtin_unreachable();
}
int f1(int *t)
{
  g();
  __builtin_abort();
}
```
We should emit a trap after the call to g in f and after the call to abort in
f1.

This was mentioned here:
https://gcc.gnu.org/pipermail/gcc-patches/2025-April/681973.html

Reply via email to