https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108666
Bug ID: 108666 Summary: -Wanalyzer-use-of-uninitialized-value false positives seen in coreutils's sum.c: bsd_sum_stream Product: gcc Version: 13.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: analyzer Assignee: dmalcolm at gcc dot gnu.org Reporter: dmalcolm at gcc dot gnu.org Target Milestone: --- Created attachment 54408 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=54408&action=edit Reproducer Trunk emits false positives: https://godbolt.org/z/coeesxxP4 Similar to bug 108664, but also emits: <source>:90:3: warning: use of uninitialized value '*(unsigned int *)&checksum' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 90 | memcpy(resstream, &checksum, sizeof checksum); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ despite this initialization: int checksum = 0;