summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/torture/pr42883.C
diff options
context:
space:
mode:
authorupstream source tree <ports@midipix.org>2015-03-15 20:14:05 -0400
committerupstream source tree <ports@midipix.org>2015-03-15 20:14:05 -0400
commit554fd8c5195424bdbcabf5de30fdc183aba391bd (patch)
tree976dc5ab7fddf506dadce60ae936f43f58787092 /gcc/testsuite/g++.dg/torture/pr42883.C
downloadcbb-gcc-4.6.4-554fd8c5195424bdbcabf5de30fdc183aba391bd.tar.bz2
cbb-gcc-4.6.4-554fd8c5195424bdbcabf5de30fdc183aba391bd.tar.xz
obtained gcc-4.6.4.tar.bz2 from upstream website;upstream
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.
Diffstat (limited to 'gcc/testsuite/g++.dg/torture/pr42883.C')
-rw-r--r--gcc/testsuite/g++.dg/torture/pr42883.C63
1 files changed, 63 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/torture/pr42883.C b/gcc/testsuite/g++.dg/torture/pr42883.C
new file mode 100644
index 000000000..f164c3781
--- /dev/null
+++ b/gcc/testsuite/g++.dg/torture/pr42883.C
@@ -0,0 +1,63 @@
+// { dg-do compile }
+
+typedef __SIZE_TYPE__ size_t;
+namespace __gnu_cxx __attribute__ ((__visibility__ ("default"))) {
+ template<typename _Tp> class new_allocator {
+ public:
+ typedef size_t size_type;
+ typedef _Tp* pointer;
+ typedef _Tp& reference;
+ void deallocate(pointer __p, size_type) {
+ ::operator delete(__p);
+ }
+ };
+}
+namespace std __attribute__ ((__visibility__ ("default"))) {
+ template<typename _Tp> class allocator: public __gnu_cxx::new_allocator<_Tp> {
+ public:
+ template<typename _Tp1> struct rebind {
+ typedef allocator<_Tp1> other;
+ };
+ };
+ template<typename _Tp, typename _Alloc> struct _Vector_base {
+ typedef typename _Alloc::template rebind<_Tp>::other _Tp_alloc_type;
+ struct _Vector_impl : public _Tp_alloc_type {
+ typename _Tp_alloc_type::pointer _M_start;
+ typename _Tp_alloc_type::pointer _M_end_of_storage;
+ };
+ ~_Vector_base() {
+ _M_deallocate(this->_M_impl._M_start, this->_M_impl._M_end_of_storage - this->_M_impl._M_start);
+ }
+ _Vector_impl _M_impl;
+ void _M_deallocate(typename _Tp_alloc_type::pointer __p, size_t __n) {
+ if (__p) _M_impl.deallocate(__p, __n);
+ }
+ };
+ template<typename _Tp, typename _Alloc = std::allocator<_Tp> > class vector : protected _Vector_base<_Tp, _Alloc> {
+ typedef _Vector_base<_Tp, _Alloc> _Base;
+ typedef typename _Base::_Tp_alloc_type _Tp_alloc_type;
+ public:
+ typedef typename _Tp_alloc_type::reference reference;
+ typedef size_t size_type;
+ size_type size() const {
+ }
+ reference operator[](size_type __n) {
+ }
+ };
+};
+class vtkConvexPointSet {
+public:
+ static vtkConvexPointSet *New();
+};
+void MakeInternalMesh() {
+ std::vector< int > tempFaces[2];
+ std::vector< int > firstFace;
+ int i, j, k;
+ for(i = 0; i < 1000; i++) {
+ for(int pointCount = 0; pointCount < 1000; pointCount++) {
+ for(j = 0; j < (int)tempFaces[0].size(); k++)
+ if(tempFaces[0][j] == tempFaces[1][k]) break;
+ }
+ vtkConvexPointSet::New();
+ }
+}