https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105739
Bug ID: 105739 Summary: [9/10 Regression] Miscompilation of Linux kernel update.c Product: gcc Version: 10.3.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: jakub at gcc dot gnu.org Target Milestone: --- Target: x86_64-linux The attached testcase with -fno-strict-aliasing -fno-common -fshort-wchar -fno-PIE -std=gnu11 -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -mno-avx -fcf-protection=none -m64 -falign-jumps=1 -falign-loops=1 -mno-80387 -mno-fp-ret-in-387 -mpreferred-stack-boundary=3 -mskip-rax-setup -mtune=generic -mno-red-zone -mcmodel=kernel -fno-asynchronous-unwind-tables -mindirect-branch=thunk-extern -mindirect-branch-register -fno-jump-tables -fno-delete-null-pointer-checks -O2 --param=allow-store-data-races=0 -fstack-protector-strong -fomit-frame-pointer -fno-stack-clash-protection -fno-strict-overflow -fno-stack-check -fconserve-stack options has a call to _printk replaced by __builtin_unreachable () and it isn't obviously clear why. One spot is in the rcu_tasks_trace_pertask function where in assembly one can see: .type rcu_tasks_trace_pertask.cold, @function rcu_tasks_trace_pertask.cold: .L1662: movl 20(%rdi), %eax .text .size rcu_tasks_trace_pertask, .-rcu_tasks_trace_pertask The problem went away with r11-5188-g32934a4f45a7214 but it is unclear if that was an actual fix or just made it latent, I don't see a compound literal on that line.