make_location: ensure end-points are pure locations
authorDavid Malcolm <dmalcolm@redhat.com>
Mon, 29 Aug 2016 17:10:23 +0000 (17:10 +0000)
committerDavid Malcolm <dmalcolm@gcc.gnu.org>
Mon, 29 Aug 2016 17:10:23 +0000 (17:10 +0000)
commit9144eabb893bf3cb4bad4c2447e8b56c5db7f577
tree31d88147ce6530ac2c8a2b9c9137f481d64d072c
parent328eae1cb4cca4903f4b6de3bf56c4e59fdbdeae
make_location: ensure end-points are pure locations

gcc/ChangeLog:
* input.c (make_location): Call get_start and get_finish
on the endpoints to avoid storing packed ranges or ad-hoc
ranges in them.
(selftest::test_make_location_nonpure_range_endpoints): New function.
(selftest::input_c_tests): Call it.
* input.h (get_start): New inline function.

From-SVN: r239831
gcc/ChangeLog
gcc/input.c
gcc/input.h