re PR bootstrap/82939 (genmatch fills up terminal with endless printing of periods)
authorRichard Biener <rguenther@suse.de>
Fri, 16 Feb 2018 12:02:34 +0000 (12:02 +0000)
committerRichard Biener <rguenth@gcc.gnu.org>
Fri, 16 Feb 2018 12:02:34 +0000 (12:02 +0000)
2018-02-16  Richard Biener  <rguenther@suse.de>

PR bootstrap/82939
* line-map.c (linemap_init): Avoid broken value-init when compiling
with GCC 4.2.

From-SVN: r257732

libcpp/ChangeLog
libcpp/line-map.c

index 2f6e1f21a9205ba8de733046a05873b1da32bfdd..39e8895aeb1f1b1aadc8c664efa11285b3782941 100644 (file)
@@ -1,3 +1,9 @@
+2018-02-16  Richard Biener  <rguenther@suse.de>
+
+       PR bootstrap/82939
+       * line-map.c (linemap_init): Avoid broken value-init when compiling
+       with GCC 4.2.
+
 2018-02-15  Jason Merrill  <jason@redhat.com>
            Jakub Jelinek  <jakub@redhat.com>
 
index 677acd6dd925e7428c8a85d09f6726785dd1e978..a84084c99f05233eda865addc2d5a80acd44ce15 100644 (file)
@@ -344,7 +344,12 @@ void
 linemap_init (struct line_maps *set,
              source_location builtin_location)
 {
+#if __GNUC__ == 4 && __GNUC_MINOR__ == 2 && !defined (__clang__)
+  /* PR33916, needed to fix PR82939.  */
+  memset (set, 0, sizeof (struct line_maps));
+#else
   *set = line_maps ();
+#endif
   set->highest_location = RESERVED_LOCATION_COUNT - 1;
   set->highest_line = RESERVED_LOCATION_COUNT - 1;
   set->location_adhoc_data_map.htab =