avx2-vpop-check.h: volatility is casted away in memcmp().
authorGrigoriy Kraynov <grigoriy.kraynov@intel.com>
Thu, 18 Apr 2013 13:54:57 +0000 (13:54 +0000)
committerKirill Yukhin <kyukhin@gcc.gnu.org>
Thu, 18 Apr 2013 13:54:57 +0000 (13:54 +0000)
* gcc.target/i386/avx2-vpop-check.h: volatility is casted away in
        memcmp().

From-SVN: r198055

gcc/testsuite/ChangeLog
gcc/testsuite/gcc.target/i386/avx2-vpop-check.h

index 64ffe8f4a7e569a2eb52d6d34fe7d1d9645f36b3..7efc3f188e72c5ff1bea55db32caf79319ae03f7 100644 (file)
@@ -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
index 143b54dae034f8157b875bc4294ec6b7ea57cc6e..204b11cb3e1266d90ef49a39a187a0d915093230 100644 (file)
@@ -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();
     }
 }