comparison gcc/testsuite/g++.dg/tree-ssa/loop-cond-split-1.C @ 145:1830386684a0

gcc-9.2.0
author anatofuz
date Thu, 13 Feb 2020 11:34:05 +0900
parents
children
comparison
equal deleted inserted replaced
131:84e7813d76e9 145:1830386684a0
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" } } */