comparison gcc/testsuite/g++.dg/tree-ssa/pr81408.C @ 111:04ced10e8804

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