===================================================================
RCS file: /cvs/gcc/wwwdocs/htdocs/gcc-6/porting_to.html,v
retrieving revision 1.14
@@ -324,6 +324,52 @@
<tt>-fabi-version</tt> or <tt>-Wabi</tt> option to disable or warn about.
</p>
+<h3>More aggressive optimization of <code>-flifetime-dse</code></h3>
+
+<p>
+The C++ compiler (with enabled <code>-flifetime-dse</code>)
+is more aggressive in dead-store elimination in situations where
+a memory store to a location precedes a constructor to the
+memory location. Described situation can be commonly found in programs
+which zero a memory that is eventually passed to a placement new operator:
+
+<pre><code>
+#include <stdlib.h>
+#include <string.h>
+#include <assert.h>
+
+struct A
+{
+ A () {}
+ void *operator new (size_t s)
+ {
+ void *ptr = malloc (s);
+ memset (ptr, 0, s);
+ return ptr;
+ }
+
+ int value;
+};
+
+A *
+__attribute__ ((noinline))
+build (void)
+{
+ return new A ();
+}
+
+int main()
+{
+ A *a = build ();
+ assert (a->value == 0); /* Use of uninitialized value */
+ free (a);
+}
+</code></pre>
+
+If the program cannot be fixed to remove the undefined behavior then
+the option <code>-fno-lifetime-dse</code> can be used to disable
+this optimization.
+
<h2>-Wmisleading-indentation</h2>
<p>
A new warning <code>-Wmisleading-indentation</code> was added