aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/pr65032.C
blob: a62f50b49bf5292a45cd0c774bffc40c43089e20 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
// { dg-do compile { target i?86-*-* x86_64-*-* } }
// { dg-options "-Os -std=c++11 -fPIC -fstack-protector-strong -fomit-frame-pointer" }

#pragma GCC visibility push(hidden)
#pragma GCC visibility push(default)
extern "C" {
  typedef int int64_t __attribute__ ((__mode__ (__DI__)));
}
enum class nsresult;
#pragma GCC visibility pop
class A
{
  float mRawPtr;

 public:
  A (float *);
};
class B
{
 public:
  B (int64_t, int, int);
};
typedef struct
{
  int channels;
} vorbis_info;
template <typename _Key> class C
{
 public:
  typedef int size_type;
  size_type erase (_Key &);
};

template <typename _Key> class D
{
 public:
  typedef _Key key_type;
  typedef C<key_type> _Rep_type;
  _Rep_type _M_t;
  typename _Rep_type::size_type
    erase (key_type p1)
  {
    return _M_t.erase (p1);
  }
};

class F
{
 public:
  vorbis_info mInfo;
  D<int *> mVorbisPacketSamples;
  void ValidateVorbisPacketSamples (int *);
  int64_t Time (int64_t);
};
class G
{
  nsresult DecodeVorbis (int *);
  F *mVorbisState;
  int64_t mDecodedAudioFrames;
};
int fn1 (float ***);
void fn2 (int);
void
F::ValidateVorbisPacketSamples (int *p1)
{
  mVorbisPacketSamples.erase (p1);
}

nsresult
G::DecodeVorbis (int *p1)
{
  float **a;
  int b;
  long long c;
  while ((b = fn1 (&a)))
    {
      mVorbisState->ValidateVorbisPacketSamples (p1);
      A (new float);
      for (; mVorbisState->mInfo.channels;)
	{
	}
      int64_t d = mVorbisState->Time (c - b);
      (B (d, b, mVorbisState->mInfo.channels));
      mDecodedAudioFrames -= b;
      fn2 (b);
    }
}