2015-02-27 Vladimir Makarov <vmakarov@redhat.com>
[official-gcc.git] / gcc / testsuite / g++.dg / pr65032.C
bloba62f50b49bf5292a45cd0c774bffc40c43089e20
1 // { dg-do compile { target i?86-*-* x86_64-*-* } }
2 // { dg-options "-Os -std=c++11 -fPIC -fstack-protector-strong -fomit-frame-pointer" }
4 #pragma GCC visibility push(hidden)
5 #pragma GCC visibility push(default)
6 extern "C" {
7   typedef int int64_t __attribute__ ((__mode__ (__DI__)));
9 enum class nsresult;
10 #pragma GCC visibility pop
11 class A
13   float mRawPtr;
15  public:
16   A (float *);
18 class B
20  public:
21   B (int64_t, int, int);
23 typedef struct
25   int channels;
26 } vorbis_info;
27 template <typename _Key> class C
29  public:
30   typedef int size_type;
31   size_type erase (_Key &);
34 template <typename _Key> class D
36  public:
37   typedef _Key key_type;
38   typedef C<key_type> _Rep_type;
39   _Rep_type _M_t;
40   typename _Rep_type::size_type
41     erase (key_type p1)
42   {
43     return _M_t.erase (p1);
44   }
47 class F
49  public:
50   vorbis_info mInfo;
51   D<int *> mVorbisPacketSamples;
52   void ValidateVorbisPacketSamples (int *);
53   int64_t Time (int64_t);
55 class G
57   nsresult DecodeVorbis (int *);
58   F *mVorbisState;
59   int64_t mDecodedAudioFrames;
61 int fn1 (float ***);
62 void fn2 (int);
63 void
64 F::ValidateVorbisPacketSamples (int *p1)
66   mVorbisPacketSamples.erase (p1);
69 nsresult
70 G::DecodeVorbis (int *p1)
72   float **a;
73   int b;
74   long long c;
75   while ((b = fn1 (&a)))
76     {
77       mVorbisState->ValidateVorbisPacketSamples (p1);
78       A (new float);
79       for (; mVorbisState->mInfo.channels;)
80         {
81         }
82       int64_t d = mVorbisState->Time (c - b);
83       (B (d, b, mVorbisState->mInfo.channels));
84       mDecodedAudioFrames -= b;
85       fn2 (b);
86     }