| 1 |
/* { dg-do compile } */ |
| 2 |
/* { dg-options "-O2 -std=gnu++11 -fopt-info-loop-missed -fno-tree-vectorize" } */ |
| 3 |
struct p |
| 4 |
{ |
| 5 |
char *ay; |
| 6 |
}; |
| 7 |
|
| 8 |
namespace a { |
| 9 |
void b () __attribute__ ((__noreturn__)); |
| 10 |
template <typename> struct d; |
| 11 |
template <typename e> struct d<e *> |
| 12 |
{ |
| 13 |
typedef e f; |
| 14 |
}; |
| 15 |
struct g |
| 16 |
{ |
| 17 |
template <typename h> using i = h *; |
| 18 |
}; |
| 19 |
} |
| 20 |
using a::d; |
| 21 |
template <typename j, typename> class k |
| 22 |
{ |
| 23 |
j l; |
| 24 |
|
| 25 |
public: |
| 26 |
typename d<j>::f operator* () { return p(); } |
| 27 |
void operator++ () { ++l; } |
| 28 |
j |
| 29 |
aa () |
| 30 |
{ |
| 31 |
return l; |
| 32 |
} |
| 33 |
}; |
| 34 |
template <typename m, typename n, typename ab> |
| 35 |
bool |
| 36 |
operator!= (k<m, ab> o, k<n, ab> p2) |
| 37 |
{ |
| 38 |
return o.aa () != p2.aa (); |
| 39 |
} |
| 40 |
namespace a { |
| 41 |
struct F |
| 42 |
{ |
| 43 |
struct q |
| 44 |
{ |
| 45 |
using ai = g::i<p>; |
| 46 |
}; |
| 47 |
using r = q::ai; |
| 48 |
}; |
| 49 |
class H |
| 50 |
{ |
| 51 |
public: |
| 52 |
k<F::r, int> begin (); |
| 53 |
k<F::r, int> end (); |
| 54 |
}; |
| 55 |
int s; |
| 56 |
class I |
| 57 |
{ |
| 58 |
public: |
| 59 |
void |
| 60 |
aq (char) |
| 61 |
{ |
| 62 |
if (s) |
| 63 |
b (); |
| 64 |
} |
| 65 |
}; |
| 66 |
class u : public I |
| 67 |
{ |
| 68 |
public: |
| 69 |
void |
| 70 |
operator<< (u o (u)) |
| 71 |
{ |
| 72 |
o (*this); |
| 73 |
} |
| 74 |
u operator<< (void *); |
| 75 |
}; |
| 76 |
template <typename at, typename au> |
| 77 |
at |
| 78 |
av (au o) |
| 79 |
{ |
| 80 |
o.aq ('\n'); |
| 81 |
return at(); |
| 82 |
} |
| 83 |
u ax; |
| 84 |
} |
| 85 |
a::H t; |
| 86 |
void |
| 87 |
ShowHelpListCommands () |
| 88 |
{ |
| 89 |
for (auto c : t) /* { dg-missed "missed loop optimization: niters analysis .*" } */ |
| 90 |
a::ax << c.ay << a::av; |
| 91 |
} |
| 92 |
|