From: David Malcolm Date: Tue, 20 Jun 2017 20:37:28 +0000 (+0000) Subject: Fix -Werror=class-memaccess failures in jit testsuite (PR jit/81144) X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=191578a57755cf7a53f1f24bbba7d9df79e63efe;p=gcc.git Fix -Werror=class-memaccess failures in jit testsuite (PR jit/81144) 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 --- diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 79c54ca993b..d5d658fcda7 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,10 @@ +2017-06-20 David Malcolm + + 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 * gcc.target/i386/pr80732.c: Include fma4-check.h. diff --git a/gcc/testsuite/jit.dg/test-operator-overloading.cc b/gcc/testsuite/jit.dg/test-operator-overloading.cc index cbb1e98e1c3..f57b3fce3c5 100644 --- a/gcc/testsuite/jit.dg/test-operator-overloading.cc +++ b/gcc/testsuite/jit.dg/test-operator-overloading.cc @@ -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); diff --git a/gcc/testsuite/jit.dg/test-quadratic.cc b/gcc/testsuite/jit.dg/test-quadratic.cc index f3476696f03..61b5cdd57b2 100644 --- a/gcc/testsuite/jit.dg/test-quadratic.cc +++ b/gcc/testsuite/jit.dg/test-quadratic.cc @@ -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);