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

--- Comment #1 from Matthias Klose <doko at gcc dot gnu.org> ---
$ cat thread_pool.ii
void __sigsetjmp_cancel() __attribute__((__returns_twice__));
struct basic_ostream {
  basic_ostream &operator<<(basic_ostream &__pf(basic_ostream &)) {
    return __pf(*this);
  }
} cerr;
extern "C" void _exit(int);
enum { Exit_Internal_Error };
basic_ostream &report_error(basic_ostream &) { _exit(Exit_Internal_Error); }
void thread_pool_thread_main() {
  __sigsetjmp_cancel();
  cerr << report_error;
}


$ LC_ALL=C g++ -c -O1 thread_pool.ii
thread_pool.ii: In function 'void thread_pool_thread_main()':
thread_pool.ii:13:1: error: LHS in 'noreturn' call
   13 | }
      | ^
# .MEM_8(ab) = VDEF <.MEM_4(ab)>
_7 = report_error (&cerr);
during GIMPLE pass: einline
thread_pool.ii:13:1: internal compiler error: verify_gimple failed
0x21c6cd1 internal_error(char const*, ...)
        ../../src/gcc/diagnostic-global-context.cc:787
0xa2fe9d verify_gimple_in_cfg(function*, bool, bool) [clone .constprop.0]
[clone .isra.0]
        ../../src/gcc/tree-cfg.cc:5599
0x242fef3 execute_function_todo
        ../../src/gcc/passes.cc:2100
0x23755ee do_per_function
        ../../src/gcc/passes.cc:1699
0x23755ee execute_todo
        ../../src/gcc/passes.cc:2152
/usr/libexec/gcc/x86_64-linux-gnu/16/cc1plus -fpreprocessed thread_pool.ii
-D_FORTIFY_SOURCE=3 -quiet -dumpbase thread_pool.ii -dumpbase-ext .ii
-mtune=generic -march=x86-64 -O1 -fasynchronous-unwind-tables
-fstack-protector-strong -Wformat -Wformat-security -fstack-clash-protection
-fcf-protection -fzero-init-padding-bits=all -Wbidi-chars=any -o
/tmp/ccWPzXaD.s
Please submit a full bug report, with preprocessed source (by using
-freport-bug).
Please include the complete backtrace with any bug report.

Reply via email to