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

            Bug ID: 115872
           Summary: error: missing definition with -g & -O3
           Product: gcc
           Version: 15.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: dcb314 at hotmail dot com
  Target Milestone: ---

This C code:

long set_work_pending_p;
_Bool set_work_pending() {
  _Bool __trans_tmp_1;
  long mask = 1, old = __atomic_fetch_or(&set_work_pending_p, mask, 0);
  __trans_tmp_1 = old & mask;
  return !__trans_tmp_1;
}
void __queue_work() {
  _Bool ret = set_work_pending();
  if (ret)
    __queue_work();
}

does this with recent gcc:

cvise $ ~/gcc/results/bin/gcc -c -g -O3 bug1040.c
bug1040.c: In function ‘__queue_work’:
bug1040.c:8:6: error: missing definition
    8 | void __queue_work() {
      |      ^~~~~~~~~~~~
for SSA_NAME: _6 in statement:
# DEBUG ret => (_Bool) _6
during GIMPLE pass: fab
bug1040.c:8:6: internal compiler error: verify_ssa failed

The bug first seems to appear sometime before g:66d6b1861ec57ba2,
dated 20240611.

Reply via email to