Merged with mainline at revision 128810.
[official-gcc.git] / gcc / testsuite / g++.dg / opt / pr30965.C
blobc41cf914749a7bea345c38f55e96e4981749218d
1 /* { dg-do compile } */
2 /* { dg-options "-O3 -fdump-tree-optimized" } */
4 #include <tr1/functional>
5 #include <algorithm>
7 extern void assign( long* variable, long v )
9         std::transform( variable, variable + 1, variable,
10                 std::tr1::bind( std::plus< long >(), 0L, v ) );
12 extern void assign( long& variable, long v )
14         std::transform( &variable, &variable + 1, &variable,
15                 std::tr1::bind( std::plus< long >(), 0L, v ) );
18 /* { dg-final { scan-tree-dump-times ";; Function" 2 "optimized" } } */
19 /* { dg-final { scan-tree-dump-times "variable = v" 2 "optimized" } } */
20 /* { dg-final { cleanup-tree-dump "optimized" } } */