Hi

> On 28/feb/2014, at 23:48, Marc Glisse <marc.gli...@inria.fr> wrote:
> 
> Hello,
> 
> this is a stage 1 patch, and I'll ping it then, but if you have comments 
> now...
> 
> Passes bootstrap+testsuite on x86_64-linux-gnu.
> 
> 2014-02-28  Marc Glisse  <marc.gli...@inria.fr>
> 
>    PR tree-optimization/57742
> gcc/
>    * tree-ssa-forwprop.c (simplify_malloc_memset): New function.
>    (simplify_builtin_call): Call it.
> gcc/testsuite/
>    * g++.dg/tree-ssa/calloc.C: New testcase.
>    * gcc.dg/tree-ssa/calloc.c: Likewise.
> 
> -- 
> Marc Glisse
> Index: gcc/testsuite/g++.dg/tree-ssa/calloc.C
> ===================================================================
> --- gcc/testsuite/g++.dg/tree-ssa/calloc.C    (revision 0)
> +++ gcc/testsuite/g++.dg/tree-ssa/calloc.C    (working copy)
> @@ -0,0 +1,35 @@
> +/* { dg-do compile } */
> +/* { dg-options "-std=gnu++11 -O3 -fdump-tree-optimized" } */
> +
> +#include <new>
> +#include <vector>
> +#include <cstdlib>
> +
> +void g(void*);
> +inline void* operator new(std::size_t sz) _GLIBCXX_THROW (std::bad_alloc)

Unless *really* necessary I would recommend not including the large <vector> 
(that also couples quite seriously the front-end testsuite to the library 
testsuite, we already discussed those topics in the past). Using the internal 
macros seems also unnecessary.

Paolo

Reply via email to