https://gcc.gnu.org/bugzilla/show_bug.cgi?id=125207
--- Comment #6 from XChy <xxs_chy at outlook dot com> --- A simpler testcase that may be related: https://godbolt.org/z/hqjr1vnrc #include <stdint.h> #include <stdio.h> typedef void *fp_t_2(int64_t, int16_t); _Bool g3; int16_t g4, __chk, g30; void *g8; __attribute__((noinline)) void *f1(int64_t, int16_t a1) { g4 = a1; return g8; } __attribute__((noinline)) void f2(fp_t_2 a0) { lbl_br13: a0(g30, 6); if (g3) goto lbl_br13; } int main() { f1(0, 0); f2(f1); __chk = g4; printf("checksum=0x%016llx\n", (unsigned long long)__chk); }
