This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/78408] Aggressive optimization of zeroing results in incorrect behavior
- From: "npmccallum at redhat dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 17 Nov 2016 20:22:09 +0000
- Subject: [Bug c/78408] Aggressive optimization of zeroing results in incorrect behavior
- Auto-submitted: auto-generated
- References: <bug-78408-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78408
--- Comment #2 from Nathaniel McCallum <npmccallum at redhat dot com> ---
Created attachment 40076
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=40076&action=edit
simple test case
Compile with: gcc -o test test.c
This is a simple echo server. It *should* echo whatever the client types.
However, if you type "foo" the first time and then type ctrl-d the second time,
the second reply is the same as the first reply. This is because the buffer was
not properly zeroed.