From 13957435839e1dc1d3bad23510640a1d09a84772 Mon Sep 17 00:00:00 2001 From: Grigoriy Kraynov Date: Thu, 18 Apr 2013 13:54:57 +0000 Subject: [PATCH] avx2-vpop-check.h: volatility is casted away in memcmp(). * gcc.target/i386/avx2-vpop-check.h: volatility is casted away in memcmp(). From-SVN: r198055 --- gcc/testsuite/ChangeLog | 5 +++++ gcc/testsuite/gcc.target/i386/avx2-vpop-check.h | 4 +++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 64ffe8f4a7e5..7efc3f188e72 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2013-04-18 Grigoriy Kraynov + + * gcc.target/i386/avx2-vpop-check.h: volatility is casted away in + memcmp(). + 2013-04-18 Jakub Jelinek 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 143b54dae034..204b11cb3e12 100644 --- a/gcc/testsuite/gcc.target/i386/avx2-vpop-check.h +++ b/gcc/testsuite/gcc.target/i386/avx2-vpop-check.h @@ -47,7 +47,9 @@ avx2_test (void) gen_pop (); check_pop (); - if (memcmp (c, c_ref, SIZE * sizeof (TYPE))) + /* We need to cast away volatility from c_ref here in order to eliminate + warning if libc version of memcpy is used here. */ + if (memcmp (c, (void *) c_ref, SIZE * sizeof (TYPE))) abort(); } }