re PR libstdc++/65352 (array<T,0>::begin()/end() etc. forms a null reference and...
authorJonathan Wakely <jwakely@redhat.com>
Thu, 28 May 2015 11:53:35 +0000 (12:53 +0100)
committerJonathan Wakely <redi@gcc.gnu.org>
Thu, 28 May 2015 11:53:35 +0000 (12:53 +0100)
commit6a344b953a3e8a51808bc260f8f5f2f2f363e2c2
tree912327d569a87f082f053ae344dbfd4bcbe2f58d
parentf093f5a63ba44247d230cef6cc90b5add5415eed
re PR libstdc++/65352 (array<T,0>::begin()/end() etc. forms a null reference and breaks on clang+ubsan)

PR libstdc++/65352
* include/std/array (__array_traits::_S_ptr): New function.
(array::data): Use _S_ptr to avoid creating invalid reference.
* testsuite/23_containers/array/tuple_interface/get_neg.cc: Adjust
dg-error line numbers.
* testsuite/23_containers/array/tuple_interface/tuple_element_neg.cc:
likewise.

From-SVN: r223806
libstdc++-v3/ChangeLog
libstdc++-v3/include/std/array
libstdc++-v3/testsuite/23_containers/array/tuple_interface/get_neg.cc
libstdc++-v3/testsuite/23_containers/array/tuple_interface/tuple_element_neg.cc