[testsuite, i386] Reimplementing array comparison in avx2-vpop-check.h

Uros Bizjak ubizjak@gmail.com
Thu Apr 18 13:49:00 GMT 2013


On Thu, Apr 18, 2013 at 12:10 PM, Alexander Ivchenko <aivchenk@gmail.com> wrote:
> Yep, that also works.
>
> diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
> index 64ffe8f..7efc3f1 100644
> --- a/gcc/testsuite/ChangeLog
> +++ b/gcc/testsuite/ChangeLog
> @@ -1,3 +1,8 @@
> +2013-04-18  Grigoriy Kraynov  <grigoriy.kraynov@intel.com>
> +
> +       * gcc.target/i386/avx2-vpop-check.h: volatility is casted away in
> +       memcmp().
> +
>  2013-04-18  Jakub Jelinek  <jakub@redhat.com>
>
>         PR tree-optimization/56984
> diff --git a/gcc/testsuite/gcc.target/i386/avx2-vpop-check.h
> b/gcc/testsuite/gcc.target/i386/avx2-vpop-check.h
> index 143b54da..02c879e 100644
> --- a/gcc/testsuite/gcc.target/i386/avx2-vpop-check.h
> +++ b/gcc/testsuite/gcc.target/i386/avx2-vpop-check.h
> @@ -47,7 +47,7 @@ avx2_test (void)
>        gen_pop ();
>        check_pop ();
>
> -      if (memcmp (c, c_ref, SIZE * sizeof (TYPE)))
> +      if (memcmp (c, (void *) c_ref, SIZE * sizeof (TYPE)))
>         abort();
>      }
>  }
>
>
> The fix is pretty obvious, but still.. is it OK for trunk?

Please add a short comment on the purpose of the cast.

OK with that change.

Thanks,
Uros.



More information about the Gcc-patches mailing list