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. --- gcc/testsuite/g++.dg/torture/pr47313.C | 53 ++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 gcc/testsuite/g++.dg/torture/pr47313.C (limited to 'gcc/testsuite/g++.dg/torture/pr47313.C') diff --git a/gcc/testsuite/g++.dg/torture/pr47313.C b/gcc/testsuite/g++.dg/torture/pr47313.C new file mode 100644 index 000000000..c10f558a3 --- /dev/null +++ b/gcc/testsuite/g++.dg/torture/pr47313.C @@ -0,0 +1,53 @@ +// { dg-do compile } + +namespace internal { + template < class DSC, bool Const > struct CC_iterator { + typedef CC_iterator iterator; + typedef typename DSC::value_type value_type; + typedef const value_type* pointer; + CC_iterator () ; + CC_iterator (const iterator &it) { + } + pointer p; + pointer operator->() const ; + }; +} +template < class T > struct Compact_container { + typedef Compact_container Self; + typedef T value_type; + typedef internal::CC_iterator iterator; +}; +template < typename TDS = void > struct Periodic_3_triangulation_ds_cell_base_3 { + typedef typename TDS::Vertex_handle Vertex_handle; + const Vertex_handle& vertex(int i) const { + } +}; +struct Triangulation_data_structure_3 { + typedef Triangulation_data_structure_3 Tds; + typedef Periodic_3_triangulation_ds_cell_base_3 Cell; + typedef Compact_container Cell_range; + typedef Compact_container Vertex_range; + typedef typename Cell_range::iterator Cell_handle; + typedef typename Vertex_range::iterator Vertex_handle; +}; +typedef Triangulation_data_structure_3 TDS1; +template < class > struct Periodic_3_Delaunay_triangulation_3 { + typedef TDS1::Vertex_handle Vertex_handle; + typedef TDS1::Cell_handle Cell_handle; + int compare_distance() const { + } + Vertex_handle nearest_vertex() const; +}; +template < class Tds > typename Periodic_3_Delaunay_triangulation_3::Vertex_handle Periodic_3_Delaunay_triangulation_3::nearest_vertex() const { + Cell_handle c ; + Vertex_handle nearest = c->vertex(0); + nearest = (compare_distance() == -1) ? nearest : c->vertex(0); + return nearest; +} +typedef Periodic_3_Delaunay_triangulation_3 PDT1; +struct Periodic_3_triangulation_hierarchy_3 : PDT1 { + Vertex_handle nearest_vertex() const; +}; +Periodic_3_triangulation_hierarchy_3::Vertex_handle Periodic_3_triangulation_hierarchy_3:: nearest_vertex() const { + return PDT1::nearest_vertex(); +} -- cgit v1.2.3