aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorDavid Malcolm <dmalcolm@redhat.com>2016-03-01 01:02:49 +0000
committerDavid Malcolm <dmalcolm@gcc.gnu.org>2016-03-01 01:02:49 +0000
commit7168133a372e15373f3687d9b5e01ce24a954de9 (patch)
tree24b174cddca2c8a46a928dffe42c5c6b0c8718a4 /gcc
parentf3c7a94580c1ca9d78bc246be19750ebd047124f (diff)
downloadgcc-7168133a372e15373f3687d9b5e01ce24a954de9.zip
gcc-7168133a372e15373f3687d9b5e01ce24a954de9.tar.gz
gcc-7168133a372e15373f3687d9b5e01ce24a954de9.tar.bz2
PR preprocessor/69985: fix ICE with long lines in -Wformat
gcc/testsuite/ChangeLog: PR preprocessor/69985 * gcc.dg/cpp/pr69985.c: New test case. libcpp/ChangeLog: PR preprocessor/69985 (linemap_position_for_loc_and_offset): Rename param from "offset" to "column_offset". Right-shift the column_offset by m_range_bits of the pertinent ordinary map whenever offsetting a source_location. For clarity, offset the column by the column offset, rather than the other way around. From-SVN: r233836
Diffstat (limited to 'gcc')
-rw-r--r--gcc/testsuite/ChangeLog5
-rw-r--r--gcc/testsuite/gcc.dg/cpp/pr69985.c7
2 files changed, 12 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 3743d34..50c4aa9 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2016-02-29 David Malcolm <dmalcolm@redhat.com>
+
+ PR preprocessor/69985
+ * gcc.dg/cpp/pr69985.c: New test case.
+
2016-02-29 Jeff Law <law@redhat.com>
PR tree-optimization/70005
diff --git a/gcc/testsuite/gcc.dg/cpp/pr69985.c b/gcc/testsuite/gcc.dg/cpp/pr69985.c
new file mode 100644
index 0000000..28f17e9
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/cpp/pr69985.c
@@ -0,0 +1,7 @@
+/* { dg-options "-Wformat" } */
+extern int printf (const char *__restrict __format, ...);
+void test (void)
+{
+ /* A very long line, so that we start a new line map. */
+ printf ("%llu01233456789012334567890123345678901233456789012334567890123345678901233456789012334567890123345678901233456789012334567890123345678901233456789"); /* { dg-warning "15: format .%llu. expects a matching" } */
+}