OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.dg/] [other/] [pr29610.C] - Blame information for rev 693

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 693 jeremybenn
/* { dg-do compile } */
2
/* { dg-options "-O2 -funswitch-loops" } */
3
 
4
struct __normal_iterator
5
{
6
  typedef int*const *_Iterator;
7
  int*const * _M_current;
8
  __normal_iterator(const _Iterator& __i) : _M_current(__i){}
9
  const _Iterator& base() const {}
10
};
11
struct string { ~string(){} };
12
struct vector
13
{
14
  int** _M_finish;
15
  __normal_iterator end() const   { return __normal_iterator (_M_finish); }
16
  int size() const   { return end().base() - end().base(); }
17
};
18
class Painter
19
{
20
  int redraw_window(void);
21
  typedef int (Painter::* SliceWindowFunc)(void);
22
  int for_each(vector&, SliceWindowFunc);
23
  void tcl_command(void);
24
};
25
inline int Painter::for_each(vector &layout, SliceWindowFunc func)
26
{
27
    for (unsigned int window = 0; window < layout.size();++window)
28
        (this->*func)();
29
}
30
int t;
31
int Painter::redraw_window(void) {t = 1;}
32
string t2(int);
33
vector *g(const string&);
34
void Painter::tcl_command(void)
35
{
36
     for_each(*g(t2(2)), &Painter::redraw_window);
37
}
38
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.