make_location: ensure end-points are pure locations
commitaca2a315073c72fb7c9ab1be779c290cc91f564c
authordmalcolm <dmalcolm@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 29 Aug 2016 17:10:23 +0000 (29 17:10 +0000)
committerdmalcolm <dmalcolm@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 29 Aug 2016 17:10:23 +0000 (29 17:10 +0000)
tree31d88147ce6530ac2c8a2b9c9137f481d64d072c
parenta4a311c3b75a1a0d27e17ef26f49a4e1cbb16217
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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@239831 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/ChangeLog
gcc/input.c
gcc/input.h