RTEMS: Add Cortex-M33 multilib
[gcc.git] / gcc / testsuite / g++.dg / pr65032.C
blob6e348f83a8e0be808dea735990ce12ea0b32fa41
1 // { dg-do compile { target i?86-*-* x86_64-*-* } }
2 // { dg-require-effective-target fpic }
3 // { dg-options "-Os -std=c++11 -fPIC -fstack-protector-strong -fomit-frame-pointer" }
5 #pragma GCC visibility push(hidden)
6 #pragma GCC visibility push(default)
7 extern "C" {
8   typedef int int64_t __attribute__ ((__mode__ (__DI__)));
10 enum class nsresult;
11 #pragma GCC visibility pop
12 class A
14   float mRawPtr;
16  public:
17   A (float *);
19 class B
21  public:
22   B (int64_t, int, int);
24 typedef struct
26   int channels;
27 } vorbis_info;
28 template <typename _Key> class C
30  public:
31   typedef int size_type;
32   size_type erase (_Key &);
35 template <typename _Key> class D
37  public:
38   typedef _Key key_type;
39   typedef C<key_type> _Rep_type;
40   _Rep_type _M_t;
41   typename _Rep_type::size_type
42     erase (key_type p1)
43   {
44     return _M_t.erase (p1);
45   }
48 class F
50  public:
51   vorbis_info mInfo;
52   D<int *> mVorbisPacketSamples;
53   void ValidateVorbisPacketSamples (int *);
54   int64_t Time (int64_t);
56 class G
58   nsresult DecodeVorbis (int *);
59   F *mVorbisState;
60   int64_t mDecodedAudioFrames;
62 int fn1 (float ***);
63 void fn2 (int);
64 void
65 F::ValidateVorbisPacketSamples (int *p1)
67   mVorbisPacketSamples.erase (p1);
70 nsresult
71 G::DecodeVorbis (int *p1)
73   float **a;
74   int b;
75   long long c;
76   while ((b = fn1 (&a)))
77     {
78       mVorbisState->ValidateVorbisPacketSamples (p1);
79       A (new float);
80       for (; mVorbisState->mInfo.channels;)
81         {
82         }
83       int64_t d = mVorbisState->Time (c - b);
84       (B (d, b, mVorbisState->mInfo.channels));
85       mDecodedAudioFrames -= b;
86       fn2 (b);
87     }
89   return nsresult();