[committed] store-merging: Fix up -Wnarrowing warning

Jakub Jelinek jakub@redhat.com
Mon Oct 5 07:32:51 GMT 2020


Hi!

I've noticed a -Wnarrowing warning on gimple-ssa-store-merging.c, this
change fixes that up.

Bootstrapped/regtested on x86_64-linux and i686-linux, committed to trunk as
obvious.

2020-10-05  Jakub Jelinek  <jakub@redhat.com>

	* gimple-ssa-store-merging.c
	(imm_store_chain_info::output_merged_store): Use ~0U instead of ~0 in
	unsigned int array initializer.

--- gcc/gimple-ssa-store-merging.c.jj	2020-09-16 09:35:51.273221896 +0200
+++ gcc/gimple-ssa-store-merging.c	2020-10-04 21:12:11.359915122 +0200
@@ -3804,7 +3804,7 @@ imm_store_chain_info::output_merged_stor
 	 Similarly, if there is a whole region clear first, prefer expanding
 	 it together compared to expanding clear first followed by merged
 	 further stores.  */
-      unsigned cnt[4] = { ~0, ~0, ~0, ~0 };
+      unsigned cnt[4] = { ~0U, ~0U, ~0U, ~0U };
       int pass_min = 0;
       for (int pass = 0; pass < 4; ++pass)
 	{


	Jakub



More information about the Gcc-patches mailing list