https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86334
Uroš Bizjak <ubizjak at gmail dot com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |hubicka at gcc dot gnu.org --- Comment #2 from Uroš Bizjak <ubizjak at gmail dot com> --- The issue here is that g escapes as an argument to memcpy, but this is not reported form local_variable_can_escape: Breakpoint 1, local_variable_can_escape (decl=0x7fffe9ba3240) at ../../git/gcc/gcc/dse.c:910 910 if (TREE_ADDRESSABLE (decl)) Missing separate debuginfos, use: dnf debuginfo-install gmp-6.1.2-7.fc28.x86_64 isl-0.16.1-6.fc28.x86_64 libgcc-8.1.1-1.fc28.x86_64 libmpc-1.0.2-9.fc28.x86_64 libstdc++-8.1.1-1.fc28.x86_64 mpfr-3.1.6-1.fc28.x86_64 (gdb) p debug_generic_expr (decl) g $1 = void (gdb) fin Run till exit from #0 local_variable_can_escape (decl=0x7fffe9ba3240) at ../../git/gcc/gcc/dse.c:910 0x00000000013fb758 in can_escape (expr=0x7fffe9ba3240) at ../../git/gcc/gcc/dse.c:942 942 && local_variable_can_escape (base))) Value returned is $2 = false DSE just removes all stores to g as dead. CC Honza.