Clean up some minor white space issues in trans-decl.c and trans-expr.c
[official-gcc.git] / gcc / testsuite / g++.dg / pr59510.C
blobdcdf860dcf7309f937113508e898ddb21ce85b4b
1 // PR debug/59510
2 // { dg-do compile }
3 // { dg-options "-O2 -g --param=large-stack-frame-growth=1" }
5 template <typename _Iterator>
6 struct _Iter_base
8   typedef _Iterator iterator_type;
9 };
10 template <typename _CharT>
11 struct basic_ostream;
12 template <typename _CharT>
13 struct basic_ostringstream;
14 template <typename _CharT>
15 struct ostreambuf_iterator;
16 typedef basic_ostringstream <char>ostringstream;
17 template <typename _Iterator> struct _Miter_base : _Iter_base <_Iterator>
20 template <typename _Iterator>
21 typename _Miter_base <_Iterator>::iterator_type __miter_base (_Iterator);
22 template <typename _CharT>
23 ostreambuf_iterator <_CharT>
24 __copy_move_a2 (ostreambuf_iterator <_CharT>);
25 template <typename _II, typename _OI>
26 _OI copy (_II __first, _II __last, _OI __result)
28   __copy_move_a2 <false> (__first, __miter_base (__last), __result);
30 struct ios_base {
31   struct _Words {
32     int *_M_pword;
33     long _M_iword;
34   };
35   _Words _M_local_word[8];
37 template <typename _CharT>
38 struct basic_streambuf
40   typedef _CharT char_type;
41   int sputn (char_type *, int);
43 template <typename _CharT>
44 struct ostreambuf_iterator
46   typedef basic_streambuf <_CharT> streambuf_type;
47   typedef basic_ostream <_CharT> ostream_type;
48   streambuf_type *_M_sbuf;
49   bool _M_failed;
50   ostreambuf_iterator (ostream_type __s) : _M_sbuf (__s.rdbuf ()), _M_failed () {}
51   void _M_put (_CharT * __ws, int __len)
52   {
53     if (_M_failed && _M_sbuf->sputn (__ws, __len) != __len) _M_failed = true;
54   }
56 template <bool, typename _CharT>
57 void __copy_move_a2 (_CharT * __first,_CharT * __last,ostreambuf_iterator <_CharT> __result)
59   int __num = __last - __first;
60   __result._M_put (__first, __num);
62 template <typename _CharT>
63 struct basic_ios : ios_base
65   basic_streambuf <_CharT> *rdbuf ();
67 template <typename _CharT>
68 struct basic_ostream : public basic_ios <_CharT>
71 template <typename _CharT>
72 struct basic_ostringstream : public basic_ostream <_CharT>
75 void
76 test01 () {
77   char data1[] = "foo";
78   char *beg1 = data1;
79   ostringstream oss1;
80   ostreambuf_iterator <char> out1 (oss1);
81   out1 = copy (beg1, beg1, out1);