re PR c/66415 (ice in location_column_from_byte_offset)
authorMarek Polacek <polacek@redhat.com>
Mon, 8 Jun 2015 15:16:12 +0000 (15:16 +0000)
committerMarek Polacek <mpolacek@gcc.gnu.org>
Mon, 8 Jun 2015 15:16:12 +0000 (15:16 +0000)
commita1661b90dcbaed222e647bda75540e8a87f250ed
treefe37332799f04ee9e13b2ad6fdc2167b0d47d1a8
parentad3e2ba07405b81ed2c4729f63040ce2463c8108
re PR c/66415 (ice in location_column_from_byte_offset)

PR c/66415
* c-format.c (location_from_offset): Return LOC if LINE is null.

* line-map.c (linemap_position_for_loc_and_offset): Remove
linemap_assert_fails; reverse conditions.

* gcc.dg/cpp/pr66415-1.c: New test.
* gcc.dg/cpp/pr66415-2.c: New test.

From-SVN: r224236
gcc/c-family/ChangeLog
gcc/c-family/c-format.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/cpp/pr66415-1.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/cpp/pr66415-2.c [new file with mode: 0644]
libcpp/ChangeLog
libcpp/line-map.c