From 554fd8c5195424bdbcabf5de30fdc183aba391bd Mon Sep 17 00:00:00 2001 From: upstream source tree Date: Sun, 15 Mar 2015 20:14:05 -0400 Subject: obtained gcc-4.6.4.tar.bz2 from upstream website; verified gcc-4.6.4.tar.bz2.sig; imported gcc-4.6.4 source tree from verified upstream tarball. downloading a git-generated archive based on the 'upstream' tag should provide you with a source tree that is binary identical to the one extracted from the above tarball. if you have obtained the source via the command 'git clone', however, do note that line-endings of files in your working directory might differ from line-endings of the respective files in the upstream repository. --- .../requirements/explicit_instantiation.cc | 36 +++++++++++++++++ .../unordered_set/requirements/iterator_neg.cc | 36 +++++++++++++++++ .../requirements/iterator_null_neg.cc | 28 ++++++++++++++ .../requirements/iterators_default_constructor.cc | 31 +++++++++++++++ .../unordered_set/requirements/typedefs.cc | 45 ++++++++++++++++++++++ 5 files changed, 176 insertions(+) create mode 100644 libstdc++-v3/testsuite/tr1/6_containers/unordered_set/requirements/explicit_instantiation.cc create mode 100644 libstdc++-v3/testsuite/tr1/6_containers/unordered_set/requirements/iterator_neg.cc create mode 100644 libstdc++-v3/testsuite/tr1/6_containers/unordered_set/requirements/iterator_null_neg.cc create mode 100644 libstdc++-v3/testsuite/tr1/6_containers/unordered_set/requirements/iterators_default_constructor.cc create mode 100644 libstdc++-v3/testsuite/tr1/6_containers/unordered_set/requirements/typedefs.cc (limited to 'libstdc++-v3/testsuite/tr1/6_containers/unordered_set/requirements') diff --git a/libstdc++-v3/testsuite/tr1/6_containers/unordered_set/requirements/explicit_instantiation.cc b/libstdc++-v3/testsuite/tr1/6_containers/unordered_set/requirements/explicit_instantiation.cc new file mode 100644 index 000000000..6c6ec2e17 --- /dev/null +++ b/libstdc++-v3/testsuite/tr1/6_containers/unordered_set/requirements/explicit_instantiation.cc @@ -0,0 +1,36 @@ +// { dg-do compile } + +// 2005-02-17 Matt Austern +// +// Copyright (C) 2005, 2006, 2007, 2009 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 3, or (at your option) +// any later version. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING3. If not see +// . + +// 6.3.4.3 unordered_set + +#include + +using namespace std::tr1; +using std::equal_to; +using std::allocator; + +template class unordered_set; +template class unordered_set, equal_to, + allocator >; +template class unordered_set, equal_to, + allocator >; +template class __unordered_set, equal_to, + allocator, true>; diff --git a/libstdc++-v3/testsuite/tr1/6_containers/unordered_set/requirements/iterator_neg.cc b/libstdc++-v3/testsuite/tr1/6_containers/unordered_set/requirements/iterator_neg.cc new file mode 100644 index 000000000..b06ef15eb --- /dev/null +++ b/libstdc++-v3/testsuite/tr1/6_containers/unordered_set/requirements/iterator_neg.cc @@ -0,0 +1,36 @@ +// 2005-10-02 Paolo Carlini +// +// Copyright (C) 2005, 2009 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 3, or (at your option) +// any later version. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING3. If not see +// . +// + +// { dg-do compile } + +#include + +void test01() +{ + typedef std::tr1::unordered_set Set; + + Set s; + + Set::const_iterator cit = s.begin(); + *cit = 0; // { dg-error "read-only" } + + Set::const_local_iterator clit = s.begin(0); + *clit = 0; // { dg-error "read-only" } +} diff --git a/libstdc++-v3/testsuite/tr1/6_containers/unordered_set/requirements/iterator_null_neg.cc b/libstdc++-v3/testsuite/tr1/6_containers/unordered_set/requirements/iterator_null_neg.cc new file mode 100644 index 000000000..a0747ec47 --- /dev/null +++ b/libstdc++-v3/testsuite/tr1/6_containers/unordered_set/requirements/iterator_null_neg.cc @@ -0,0 +1,28 @@ +// 2005-09-10 Paolo Carlini +// +// Copyright (C) 2005, 2009, 2011 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 3, or (at your option) +// any later version. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING3. If not see +// . +// + +// { dg-do compile } + +// libstdc++/23781 +#include +#include + +std::tr1::unordered_set::iterator it4 = NULL; // { dg-error "conversion" } +std::tr1::unordered_set::const_iterator cit4 = NULL; // { dg-error "conversion" } diff --git a/libstdc++-v3/testsuite/tr1/6_containers/unordered_set/requirements/iterators_default_constructor.cc b/libstdc++-v3/testsuite/tr1/6_containers/unordered_set/requirements/iterators_default_constructor.cc new file mode 100644 index 000000000..ecada3dd2 --- /dev/null +++ b/libstdc++-v3/testsuite/tr1/6_containers/unordered_set/requirements/iterators_default_constructor.cc @@ -0,0 +1,31 @@ +// { dg-do compile } + +// Copyright (C) 2006, 2009 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 3, or (at your option) +// any later version. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING3. If not see +// . + +// 6.3 Unordered associative containers + +#include + +void +test01() +{ + std::tr1::unordered_set::iterator it; + std::tr1::unordered_set::const_iterator cit; + std::tr1::unordered_set::local_iterator lit; + std::tr1::unordered_set::const_local_iterator clit; +} diff --git a/libstdc++-v3/testsuite/tr1/6_containers/unordered_set/requirements/typedefs.cc b/libstdc++-v3/testsuite/tr1/6_containers/unordered_set/requirements/typedefs.cc new file mode 100644 index 000000000..a1f4a31f9 --- /dev/null +++ b/libstdc++-v3/testsuite/tr1/6_containers/unordered_set/requirements/typedefs.cc @@ -0,0 +1,45 @@ +// { dg-do compile } +// 2008-08-27 Paolo Carlini + +// Copyright (C) 2008, 2009 Free Software Foundation +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 3, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING3. If not see +// . + +// 6.3.4.3 unordered_set + +#include + +void test01() +{ + // Check for required typedefs + typedef std::tr1::unordered_set test_type; + + typedef test_type::key_type key_type; + typedef test_type::value_type value_type; + typedef test_type::hasher hasher; + typedef test_type::key_equal key_equal; + typedef test_type::allocator_type allocator_type; + typedef test_type::pointer pointer; + typedef test_type::const_pointer const_pointer; + typedef test_type::reference reference; + typedef test_type::const_reference const_reference; + typedef test_type::size_type size_type; + typedef test_type::difference_type difference_type; + typedef test_type::iterator iterator; + typedef test_type::const_iterator const_iterator; + typedef test_type::local_iterator local_iterator; + typedef test_type::const_local_iterator const_local_iterator; +} -- cgit v1.2.3