aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaolo Carlini <paolo.carlini@oracle.com>2013-07-26 10:38:40 +0000
committerPaolo Carlini <paolo@gcc.gnu.org>2013-07-26 10:38:40 +0000
commitee3bf4ae586b6bf6320336999e6e8fd778975b71 (patch)
tree0e60eb2fbe90e40b7732d21fd17b8bc62989f5e6
parent040d8a1c3739e5e6120efadf4295be39c82bd5e5 (diff)
downloadgcc-ee3bf4ae586b6bf6320336999e6e8fd778975b71.zip
gcc-ee3bf4ae586b6bf6320336999e6e8fd778975b71.tar.gz
gcc-ee3bf4ae586b6bf6320336999e6e8fd778975b71.tar.bz2
re PR c++/57101 (-fcompare-debug failure with <type error>)
2013-07-26 Paolo Carlini <paolo.carlini@oracle.com> PR c++/57101 * g++.dg/cpp0x/pr57101.C: New. From-SVN: r201262
-rw-r--r--gcc/testsuite/ChangeLog5
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/pr57101.C220
2 files changed, 225 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index ca1a227..a95bc49 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2013-07-26 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/57101
+ * g++.dg/cpp0x/pr57101.C: New.
+
2013-07-26 Ian Bolton <ian.bolton@arm.com>
* gcc.target/aarch64/neg_1.c: New test.
diff --git a/gcc/testsuite/g++.dg/cpp0x/pr57101.C b/gcc/testsuite/g++.dg/cpp0x/pr57101.C
new file mode 100644
index 0000000..a5c4a3c
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/pr57101.C
@@ -0,0 +1,220 @@
+// { dg-options "-std=c++11 -fcompare-debug" }
+
+typedef long unsigned size_t;
+namespace
+{
+ template < typename _Tp, _Tp __v > struct integral_constant
+ {
+ static const _Tp value = __v;
+ };
+ typedef integral_constant < bool, false > false_type;
+ template < typename > struct remove_cv;
+ template < typename > struct __is_void_helper:false_type
+ {
+ };
+ template
+ <
+ typename
+ _Tp
+ >
+ struct
+ is_void:integral_constant
+ < bool, (__is_void_helper < typename remove_cv < _Tp >::type >::value) >
+ {
+ };
+ template < typename > struct is_function:false_type
+ {
+ };
+ template < typename _Tp > struct remove_const
+ {
+ typedef _Tp type;
+ };
+ template < typename _Tp > struct remove_volatile
+ {
+ typedef _Tp type;
+ };
+ template < typename _Tp > struct remove_cv
+ {
+ typedef
+ typename
+ remove_const < typename remove_volatile < _Tp >::type >::type type;
+ };
+ template < typename > struct is_lvalue_reference:false_type
+ {
+ };
+ template < typename _Tp, bool = is_void < _Tp >::value > struct __add_rvalue_reference_helper
+ {
+ typedef _Tp type;
+ };
+ template
+ <
+ typename
+ _Tp > struct add_rvalue_reference:__add_rvalue_reference_helper < _Tp >
+ {
+ };
+ template
+ < typename _Tp > typename add_rvalue_reference < _Tp >::type declval ();
+ template
+ <
+ typename,
+ typename
+ _To, bool = (is_function < _To >::value) > struct __is_convertible_helper;
+ template
+ <
+ typename
+ _From, typename _To > struct __is_convertible_helper <_From, _To, false >
+ {
+ static const bool __value = sizeof ((declval < _From > ()));
+ };
+ template
+ <
+ typename
+ _From,
+ typename
+ _To
+ >
+ struct
+ is_convertible:integral_constant
+ < bool, __is_convertible_helper < _From, _To >::__value >
+ {
+ };
+ template < bool, typename _Tp = void >struct enable_if
+ {
+ typedef _Tp type;
+ };
+ template < typename _Tp > struct identity
+ {
+ typedef _Tp type;
+ };
+ template
+ <
+ typename
+ _Tp
+ >
+ typename
+ enable_if
+ <
+ is_lvalue_reference
+ < _Tp >::value, _Tp >::type forward (typename identity < _Tp >::type)
+ {
+ return 0;
+
+ }
+ template < class _T1, class > struct pair
+ {
+ _T1 first;
+ template < class _U1, class = typename enable_if < is_convertible < _U1, _T1 >::value >::type > pair (_U1 __x):
+ first
+ (forward < _U1 > (__x))
+ {
+ }
+ };
+}
+
+namespace __gnu_cxx
+{
+ template < typename > class new_allocator
+ {
+ };
+}
+
+namespace std
+{
+ template < typename _Tp > class allocator:__gnu_cxx::new_allocator < _Tp >
+ {
+ public:
+ template < typename > struct rebind
+ {
+ typedef allocator other;
+ };
+ };
+ template < typename, typename > struct unary_function;
+ template < typename, typename, typename > struct binary_function
+ {
+ };
+ template < typename _Tp > struct less:binary_function < _Tp, _Tp, bool >
+ {
+ };
+ template
+ <
+ typename
+ _Pair
+ > struct _Select1st:unary_function < _Pair, typename _Pair::first_type >
+ {
+ };
+ template < typename > struct _Rb_tree_node;
+ template
+ <
+ typename,
+ typename
+ _Val,
+ typename,
+ typename _Compare, typename _Alloc = allocator < _Val > >class _Rb_tree
+ {
+ typedef
+ typename
+ _Alloc::template
+ rebind < _Rb_tree_node < _Val > >::other _Node_allocator;
+ public:
+ typedef _Alloc allocator_type;
+ template < typename _Key_compare > struct _Rb_tree_impl
+ {
+ _Rb_tree_impl (_Key_compare, _Node_allocator);
+ };
+ _Rb_tree_impl < _Compare > _M_impl;
+ _Rb_tree (_Compare __comp, allocator_type __a):
+ _M_impl (__comp, __a)
+ {
+ }
+ };
+ template < class _E > class initializer_list
+ {
+ typedef size_t size_type;
+ typedef _E *iterator;
+ iterator _M_array;
+ size_type _M_len;
+ };
+ template
+ <
+ typename
+ _Key,
+ typename
+ _Tp,
+ typename
+ _Compare
+ =
+ less
+ <
+ _Key >, typename _Alloc = allocator < pair < _Key, _Tp > > >class multimap
+ {
+ typedef _Key key_type;
+ typedef pair < _Key, _Tp > value_type;
+ typedef _Compare key_compare;
+ typedef _Alloc allocator_type;
+ typedef
+ _Rb_tree
+ <
+ key_type,
+ value_type, _Select1st < value_type >, key_compare > _Rep_type;
+ _Rep_type _M_t;
+ public:
+ multimap (initializer_list < value_type >, _Compare __comp = _Compare (), allocator_type __a = allocator_type ()):
+ _M_t
+ (__comp, __a)
+ {
+ }
+ };
+}
+
+using namespace std;
+void
+test01 ()
+{
+ typedef multimap < int, double >Container;
+ Container (
+ {
+ {
+ 1}
+ }
+ );
+}