| 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" } |
| 4 |
|
| 5 |
#pragma GCC visibility push(hidden) |
| 6 |
#pragma GCC visibility push(default) |
| 7 |
extern "C" { |
| 8 |
typedef int int64_t __attribute__ ((__mode__ (__DI__))); |
| 9 |
} |
| 10 |
enum class nsresult; |
| 11 |
#pragma GCC visibility pop |
| 12 |
class A |
| 13 |
{ |
| 14 |
float mRawPtr; |
| 15 |
|
| 16 |
public: |
| 17 |
A (float *); |
| 18 |
}; |
| 19 |
class B |
| 20 |
{ |
| 21 |
public: |
| 22 |
B (int64_t, int, int); |
| 23 |
}; |
| 24 |
typedef struct |
| 25 |
{ |
| 26 |
int channels; |
| 27 |
} vorbis_info; |
| 28 |
template <typename _Key> class C |
| 29 |
{ |
| 30 |
public: |
| 31 |
typedef int size_type; |
| 32 |
size_type erase (_Key &); |
| 33 |
}; |
| 34 |
|
| 35 |
template <typename _Key> class D |
| 36 |
{ |
| 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 |
} |
| 46 |
}; |
| 47 |
|
| 48 |
class F |
| 49 |
{ |
| 50 |
public: |
| 51 |
vorbis_info mInfo; |
| 52 |
D<int *> mVorbisPacketSamples; |
| 53 |
void ValidateVorbisPacketSamples (int *); |
| 54 |
int64_t Time (int64_t); |
| 55 |
}; |
| 56 |
class G |
| 57 |
{ |
| 58 |
nsresult DecodeVorbis (int *); |
| 59 |
F *mVorbisState; |
| 60 |
int64_t mDecodedAudioFrames; |
| 61 |
}; |
| 62 |
int fn1 (float ***); |
| 63 |
void fn2 (int); |
| 64 |
void |
| 65 |
F::ValidateVorbisPacketSamples (int *p1) |
| 66 |
{ |
| 67 |
mVorbisPacketSamples.erase (p1); |
| 68 |
} |
| 69 |
|
| 70 |
nsresult |
| 71 |
G::DecodeVorbis (int *p1) |
| 72 |
{ |
| 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 |
} |
| 88 |
|
| 89 |
return nsresult(); |
| 90 |
} |