PR tree-optimization/40874
* g++.dg/tree-ssa/pr40874.C: New testcase.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@174068
138bc75d-0d04-0410-961f-
82ee72b054a4
2011-05-23 Richard Guenther <rguenther@suse.de>
+ PR tree-optimization/40874
+ * g++.dg/tree-ssa/pr40874.C: New testcase.
+
+2011-05-23 Richard Guenther <rguenther@suse.de>
+
PR tree-optimization/49115
* g++.dg/torture/pr49115.C: New testcase.
--- /dev/null
+// { dg-do compile }
+// { dg-options "-O -fdump-tree-optimized" }
+
+struct pf
+{
+ inline pf(int(*x)(int)) : x(x) {}
+
+ inline int operator()(int a) const
+ {
+ return x(a);
+ }
+
+ int (*x)(int);
+};
+
+inline int g(int x) { return x/x - 1; }
+
+int main(int argc, char* argv[])
+{
+ pf f(g);
+ return f(3);
+}
+
+// { dg-final { scan-tree-dump "return 0" "optimized" } }
+// { dg-final { cleanup-tree-dump "optimized" } }