[Bug c++/71885] Incorrect code generated with -01, memset() function call is missing

2016-07-15 Thread eric at baculasystems dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71885 --- Comment #9 from Eric Bollengier --- Thanks for the "behavior is undefined" explanation. I understand a bit better why the GCC team did this choice. However, here, we don't talk about such kind of objects. In my case for example, objects

[Bug c++/71885] Incorrect code generated with -01, memset() function call is missing

2016-07-14 Thread eric at baculasystems dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71885 --- Comment #4 from Eric Bollengier --- I don't know exactly when someone decided that a doing memset(buf, 0, sizeof(buf)); leads to an "undefined behavior", but it's how C and C++ work since quite long time. And it's also why the operator new()

[Bug c++/71885] Incorrect code generated with -01, function calls are missing

2016-07-14 Thread eric at baculasystems dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71885 --- Comment #2 from Eric Bollengier --- Created attachment 38907 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=38907=edit c++ file that reproduces the issue

[Bug c++/71885] Incorrect code generated with -01, function calls are missing

2016-07-14 Thread eric at baculasystems dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71885 --- Comment #1 from Eric Bollengier --- Created attachment 38906 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=38906=edit ii file generated with -O0

[Bug c++/71885] New: Incorrect code generated with -01, function calls are missing

2016-07-14 Thread eric at baculasystems dot com
Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: eric at baculasystems dot com Target Milestone: --- Created attachment 38905 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=38905=edit .ii file generated with -O1 option I overl