]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
backport: re PR preprocessor/60436 (C preprocessor segfaults on assembly file)
authorJakub Jelinek <jakub@redhat.com>
Fri, 28 Nov 2014 17:05:34 +0000 (18:05 +0100)
committerJakub Jelinek <jakub@gcc.gnu.org>
Fri, 28 Nov 2014 17:05:34 +0000 (18:05 +0100)
Backported from mainline
2014-11-25  Jakub Jelinek  <jakub@redhat.com>

PR preprocessor/60436
* line-map.c (linemap_line_start): If highest is above 0x60000000
and we are still tracking columns or highest is above 0x70000000,
force add_map.

From-SVN: r218168

libcpp/ChangeLog
libcpp/line-map.c

index 42cdc5c357b802176d9b5b4373c76b948d2bc7f3..78117428e91def2cbeeaf780d1a7f67f0c2d5aeb 100644 (file)
@@ -1,3 +1,13 @@
+2014-11-28  Jakub Jelinek  <jakub@redhat.com>
+
+       Backported from mainline
+       2014-11-25  Jakub Jelinek  <jakub@redhat.com>
+
+       PR preprocessor/60436
+       * line-map.c (linemap_line_start): If highest is above 0x60000000
+       and we are still tracking columns or highest is above 0x70000000,
+       force add_map.
+
 2014-10-12  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
 
        Backport from mainline r215873
index 125f08706b4487ac4a77f9bb38fa564ebe543db9..2425f5603ae0180ca2bd60e5dbbaf92ae41880db 100644 (file)
@@ -527,10 +527,10 @@ linemap_line_start (struct line_maps *set, linenum_type to_line,
          && line_delta * ORDINARY_MAP_NUMBER_OF_COLUMN_BITS (map) > 1000)
       || (max_column_hint >= (1U << ORDINARY_MAP_NUMBER_OF_COLUMN_BITS (map)))
       || (max_column_hint <= 80
-         && ORDINARY_MAP_NUMBER_OF_COLUMN_BITS (map) >= 10))
-    {
-      add_map = true;
-    }
+         && ORDINARY_MAP_NUMBER_OF_COLUMN_BITS (map) >= 10)
+      || (highest > 0x60000000
+         && (set->max_column_hint || highest > 0x70000000)))
+    add_map = true;
   else
     max_column_hint = set->max_column_hint;
   if (add_map)
@@ -541,7 +541,7 @@ linemap_line_start (struct line_maps *set, linenum_type to_line,
          /* If the column number is ridiculous or we've allocated a huge
             number of source_locations, give up on column numbers. */
          max_column_hint = 0;
-         if (highest >0x70000000)
+         if (highest > 0x70000000)
            return 0;
          column_bits = 0;
        }