This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [C++ PATCH] Nit fix in build_new_1


On Thu, Sep 27, 2012 at 12:44 PM, Jakub Jelinek <jakub@redhat.com> wrote:
> Hi!
>
> All INTEGER_CSTs are TREE_CONSTANT, I don't see the point
> in testing that.  Ok for trunk?

Ok.

Thanks,
Richard.

> 2012-09-27  Jakub Jelinek  <jakub@redhat.com>
>
>         * init.c (build_new_1): Don't test TREE_CONSTANT
>         of INTEGER_CST.
>
> --- gcc/cp/init.c.jj    2012-09-25 11:59:43.000000000 +0200
> +++ gcc/cp/init.c       2012-09-27 12:42:32.382457943 +0200
> @@ -2235,8 +2235,7 @@ build_new_1 (VEC(tree,gc) **placement, t
>      {
>        tree inner_nelts = array_type_nelts_top (elt_type);
>        tree inner_nelts_cst = maybe_constant_value (inner_nelts);
> -      if (TREE_CONSTANT (inner_nelts_cst)
> -         && TREE_CODE (inner_nelts_cst) == INTEGER_CST)
> +      if (TREE_CODE (inner_nelts_cst) == INTEGER_CST)
>         {
>           bool overflow;
>           double_int result = TREE_INT_CST (inner_nelts_cst)
>
>         Jakub


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]