]> git.ipfire.org Git - thirdparty/gcc.git/blobdiff - gcc/tree-switch-conversion.c
PR c++/80560 - warn on undefined memory operations involving non-trivial types
[thirdparty/gcc.git] / gcc / tree-switch-conversion.c
index 66db20fe7bc6fa4afe25e094de522fc232faae86..72927bf0c340b691bd126c7fddfb3cc1c10e30ac 100644 (file)
@@ -268,7 +268,7 @@ static void
 emit_case_bit_tests (gswitch *swtch, tree index_expr,
                     tree minval, tree range, tree maxval)
 {
-  struct case_bit_test test[MAX_CASE_BIT_TESTS];
+  struct case_bit_test test[MAX_CASE_BIT_TESTS] = { };
   unsigned int i, j, k;
   unsigned int count;
 
@@ -293,8 +293,6 @@ emit_case_bit_tests (gswitch *swtch, tree index_expr,
   int prec = TYPE_PRECISION (word_type_node);
   wide_int wone = wi::one (prec);
 
-  memset (&test, 0, sizeof (test));
-
   /* Get the edge for the default case.  */
   tmp = gimple_switch_default_label (swtch);
   default_bb = label_to_block (CASE_LABEL (tmp));