111
|
1 /* { dg-do compile } */
|
|
2 /* { dg-options "-O3 -fno-ipa-icf -fdump-tree-optimized" } */
|
|
3
|
|
4 #include <tr1/functional>
|
|
5 #include <algorithm>
|
|
6
|
|
7 extern void assign( long* variable, long v )
|
|
8 {
|
|
9 std::transform( variable, variable + 1, variable,
|
|
10 std::tr1::bind( std::plus< long >(), 0L, v ) );
|
|
11 }
|
|
12 extern void assign( long& variable, long v )
|
|
13 {
|
|
14 std::transform( &variable, &variable + 1, &variable,
|
|
15 std::tr1::bind( std::plus< long >(), 0L, v ) );
|
|
16 }
|
|
17
|
|
18 /* { dg-final { scan-tree-dump-times ";; Function" 2 "optimized" } } */
|
|
19 /* { dg-final { scan-tree-dump-times "variable_..D. = v_..D." 2 "optimized" } } */
|