This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] Quash warning in final.c


This patch quashes a -Wmaybe-uninitialized warning that showed up
when running bootstrap with asan/ubsan.  Supposedly in that case
we aren't able to preinitialize label with the first element of the
label_pairs vector.

Regtested/bootstrapped on x86_64-linux, ok for trunk?

2013-11-12  Marek Polacek  <polacek@redhat.com>

	* final.c (update_alignments): Initialize label to NULL_RTX.

--- gcc/final.c.mp	2013-11-12 09:59:29.455585155 +0100
+++ gcc/final.c	2013-11-12 09:59:40.140622495 +0100
@@ -830,7 +830,7 @@ void
 update_alignments (vec<rtx> &label_pairs)
 {
   unsigned int i = 0;
-  rtx iter, label;
+  rtx iter, label = NULL_RTX;
 
   if (max_labelno != max_label_num ())
     grow_label_align ();

	Marek


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]