summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/lto/20091219_0.C
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/g++.dg/lto/20091219_0.C')
-rw-r--r--gcc/testsuite/g++.dg/lto/20091219_0.C17
1 files changed, 17 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/lto/20091219_0.C b/gcc/testsuite/g++.dg/lto/20091219_0.C
new file mode 100644
index 000000000..b76a95a9d
--- /dev/null
+++ b/gcc/testsuite/g++.dg/lto/20091219_0.C
@@ -0,0 +1,17 @@
+// { dg-lto-do run }
+// { dg-lto-options {{-O3 -flto}} }
+
+#include <string>
+#include <map>
+
+int main ()
+{
+ typedef std::map<int, std::string> Map;
+ static Map m;
+
+ Map::const_iterator it = m.find(0);
+ if (it != m.end())
+ std::string s = it->second;
+
+ return 0;
+}