[Bug middle-end/56231] warning traces have bogus line information when using LTO

matt at use dot net gcc-bugzilla@gcc.gnu.org
Tue Feb 12 02:02:00 GMT 2013


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56231

--- Comment #12 from Matt Hargett <matt at use dot net> 2013-02-12 02:02:33 UTC ---
looking at the patch for merging elsewhere, I noticed that

 location_t
 lto_input_location (struct bitpack_d *bp, struct data_in *data_in)
 {
+  static const char *current_file;
+  static int current_line;
+  static int current_col;
   bool file_change, line_change, column_change;
   unsigned len;
-  bool prev_file = data_in->current_file != NULL;
+  bool prev_file = current_file != NULL;


current_file is potentially of unknown value on the comparison in the last
line, right? or is there some static const initialization rule that implicitly
initializes it to 0?



More information about the Gcc-bugs mailing list