diff --git a/gcc/ipa-modref.cc b/gcc/ipa-modref.cc
index 0d9abacf0a6..4183fed73c7 100644
--- a/gcc/ipa-modref.cc
+++ b/gcc/ipa-modref.cc
@@ -2119,7 +2119,7 @@ modref_lattice::add_escape_point (gcall *call, int arg, int min_flags,
       merge (0);
       return true;
     }
-  escape_point new_ep = {call, arg, min_flags, direct};
+  escape_point new_ep = {call, arg, static_cast<eaf_flags_t>(min_flags), direct};
   escape_points.safe_push (new_ep);
   return true;
 }
@@ -2880,7 +2880,8 @@ modref_eaf_analysis::record_escape_points (tree name, int parm_index, int flags)
 	if ((ep->min_flags & flags) != flags)
 	  {
 	    cgraph_edge *e = node->get_edge (ep->call);
-	    struct escape_entry ee = {parm_index, ep->arg,
+	    struct escape_entry ee = {parm_index,
+				      static_cast<unsigned int>(ep->arg),
 				      ep->min_flags, ep->direct};
 
 	    escape_summaries->get_create (e)->esc.safe_push (ee);
@@ -4350,8 +4351,8 @@ update_escape_summary_1 (cgraph_edge *e,
 	  if (ee->direct && !em->direct)
 	    min_flags = deref_flags (min_flags, ignore_stores);
 	  struct escape_entry entry = {em->parm_index, ee->arg,
-				       min_flags,
-				       ee->direct & em->direct};
+				       static_cast<eaf_flags_t>(min_flags),
+				       static_cast<bool>(ee->direct & em->direct)};
 	  sum->esc.safe_push (entry);
 	}
     }
diff --git a/gcc/rtl-ssa/changes.cc b/gcc/rtl-ssa/changes.cc
index 298358ed6d4..8b54714a4cc 100644
--- a/gcc/rtl-ssa/changes.cc
+++ b/gcc/rtl-ssa/changes.cc
@@ -90,7 +90,7 @@ function_info::temp_access_array (access_array accesses)
   gcc_assert (obstack_object_size (&m_temp_obstack) == 0);
   obstack_grow (&m_temp_obstack, accesses.begin (), accesses.size_bytes ());
   return { static_cast<access_info **> (obstack_finish (&m_temp_obstack)),
-	   accesses.size () };
+	   static_cast<unsigned int>(accesses.size ()) };
 }
 
 // See the comment above the declaration.
diff --git a/gcc/rtl-ssa/member-fns.inl b/gcc/rtl-ssa/member-fns.inl
index 25a8750aefa..f7b91bc3c6f 100644
--- a/gcc/rtl-ssa/member-fns.inl
+++ b/gcc/rtl-ssa/member-fns.inl
@@ -47,7 +47,7 @@ access_array_builder::finish ()
 
   auto **base = static_cast<access_info **> (obstack_finish (m_obstack));
   keep ();
-  return { base, num_accesses };
+  return { base, static_cast<unsigned int>(num_accesses) };
 }
 
 inline bool
diff --git a/gcc/tree-ssa-structalias.cc b/gcc/tree-ssa-structalias.cc
index dcf13d939bd..e85a36eda3d 100644
--- a/gcc/tree-ssa-structalias.cc
+++ b/gcc/tree-ssa-structalias.cc
@@ -5885,7 +5885,8 @@ push_fields_onto_fieldstack (tree type, vec<fieldoff_s> *fieldstack,
 		&& offset + foff != 0)
 	      {
 		fieldoff_s e
-		  = {0, offset + foff, false, false, true, false, NULL_TREE};
+		  = {0, static_cast<unsigned long long>(offset + foff), false,
+		     false, true, false, NULL_TREE};
 		pair = fieldstack->safe_push (e);
 	      }
 
diff --git a/gcc/tree-vect-slp.cc b/gcc/tree-vect-slp.cc
index e54414f6bef..9cf06aa4218 100644
--- a/gcc/tree-vect-slp.cc
+++ b/gcc/tree-vect-slp.cc
@@ -6055,7 +6055,8 @@ vect_prologue_cost_for_slp (slp_tree node,
       nelt_limit = const_nunits;
       hash_set<vect_scalar_ops_slice_hash> vector_ops;
       for (unsigned int i = 0; i < SLP_TREE_NUMBER_OF_VEC_STMTS (node); ++i)
-	if (!vector_ops.add ({ ops, i * const_nunits, const_nunits }))
+	if (!vector_ops.add ({ ops, static_cast<unsigned int>(i * const_nunits),
+	                       static_cast<unsigned int>(const_nunits) }))
 	  starts.quick_push (i * const_nunits);
     }
   else
diff --git a/gcc/tree-vect-stmts.cc b/gcc/tree-vect-stmts.cc
index 5485da58b38..31453665aa9 100644
--- a/gcc/tree-vect-stmts.cc
+++ b/gcc/tree-vect-stmts.cc
@@ -1911,7 +1911,7 @@ vect_truncate_gather_scatter_offset (stmt_vec_info stmt_info,
     count = max_iters.to_shwi ();
 
   /* Try scales of 1 and the element size.  */
-  int scales[] = { 1, vect_get_scalar_dr_size (dr_info) };
+  int scales[] = { 1, static_cast<int>(vect_get_scalar_dr_size (dr_info)) };
   wi::overflow_type overflow = wi::OVF_NONE;
   for (int i = 0; i < 2; ++i)
     {
@@ -6476,7 +6476,7 @@ vectorizable_operation (vec_info *vinfo,
 	      && VECTOR_BOOLEAN_TYPE_P (vectype))
 	    {
 	      if (loop_vinfo->scalar_cond_masked_set.contains ({ op0,
-								 ncopies}))
+								 static_cast<unsigned int>(ncopies)}))
 		{
 		  mask = vect_get_loop_mask (gsi, masks, vec_num * ncopies,
 					     vectype, i);
@@ -6486,7 +6486,7 @@ vectorizable_operation (vec_info *vinfo,
 		}
 
 	      if (loop_vinfo->scalar_cond_masked_set.contains ({ op1,
-								 ncopies }))
+								 static_cast<unsigned int>(ncopies) }))
 		{
 		  mask = vect_get_loop_mask (gsi, masks, vec_num * ncopies,
 					     vectype, i);
