Fix -Werror=class-memaccess failures in jit testsuite (PR jit/81144)
authorDavid Malcolm <dmalcolm@redhat.com>
Tue, 20 Jun 2017 20:37:28 +0000 (20:37 +0000)
committerDavid Malcolm <dmalcolm@gcc.gnu.org>
Tue, 20 Jun 2017 20:37:28 +0000 (20:37 +0000)
gcc/testsuite/ChangeLog:
PR jit/81144
* jit.dg/test-operator-overloading.cc (make_test_quadratic): Replace
memset call with zero-initialization.
* jit.dg/test-quadratic.cc (make_test_quadratic): Likewise.

From-SVN: r249427

gcc/testsuite/ChangeLog
gcc/testsuite/jit.dg/test-operator-overloading.cc
gcc/testsuite/jit.dg/test-quadratic.cc

index 79c54ca993b3d73f18b84a578764dffd332ac9b8..d5d658fcda716c78c2a4674b0d02382a48b0a93f 100644 (file)
@@ -1,3 +1,10 @@
+2017-06-20  David Malcolm  <dmalcolm@redhat.com>
+
+       PR jit/81144
+       * jit.dg/test-operator-overloading.cc (make_test_quadratic): Replace
+       memset call with zero-initialization.
+       * jit.dg/test-quadratic.cc (make_test_quadratic): Likewise.
+
 2017-06-20  Uros Bizjak  <ubizjak@gmail.com>
 
        * gcc.target/i386/pr80732.c: Include fma4-check.h.
index cbb1e98e1c36c24bd13c9004c5115f436820d61f..f57b3fce3c5afe9cc575017f3056902539df24ba 100644 (file)
@@ -272,8 +272,7 @@ make_test_quadratic (quadratic_test &testcase)
 void
 create_code (gcc_jit_context *ctxt, void *user_data)
 {
-  struct quadratic_test testcase;
-  memset (&testcase, 0, sizeof (testcase));
+  struct quadratic_test testcase = {};
   testcase.ctxt = ctxt;
   make_types (testcase);
   make_sqrt (testcase);
index f3476696f03d0daef0bcaa71a554085968162fec..61b5cdd57b275026fb7d65850263fa0ffcb0bfaf 100644 (file)
@@ -328,8 +328,7 @@ make_test_quadratic (quadratic_test &testcase)
 void
 create_code (gcc_jit_context *ctxt, void *user_data)
 {
-  struct quadratic_test testcase;
-  memset (&testcase, 0, sizeof (testcase));
+  struct quadratic_test testcase = {};
   testcase.ctxt = ctxt;
   make_types (testcase);
   make_sqrt (testcase);