145
|
1 /* { dg-do compile } */
|
|
2 /* { dg-options "-O3 -fdump-tree-lsplit-details" } */
|
|
3
|
|
4 #include <string>
|
|
5 #include <map>
|
|
6
|
|
7 using namespace std;
|
|
8
|
|
9 class A
|
|
10 {
|
|
11 public:
|
|
12 bool empty;
|
|
13 void set (string s);
|
|
14 };
|
|
15
|
|
16 class B
|
|
17 {
|
|
18 map<int, string> m;
|
|
19 void f ();
|
|
20 };
|
|
21
|
|
22 extern A *ga;
|
|
23
|
|
24 void B::f ()
|
|
25 {
|
|
26 for (map<int, string>::iterator iter = m.begin (); iter != m.end (); ++iter)
|
|
27 {
|
|
28 if (ga->empty)
|
|
29 ga->set (iter->second);
|
|
30 }
|
|
31 }
|
|
32
|
|
33 /* { dg-final { scan-tree-dump-times "loop split on semi-invariant condition at false branch" 1 "lsplit" } } */
|