OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.dg/] [opt/] [pr30965.C] - Rev 693

Compare with Previous | Blame | View Log

/* { dg-do compile } */
/* { dg-options "-O3 -fdump-tree-optimized" } */

#include <tr1/functional>
#include <algorithm>

extern void assign( long* variable, long v )
{
        std::transform( variable, variable + 1, variable,
                std::tr1::bind( std::plus< long >(), 0L, v ) );
}
extern void assign( long& variable, long v )
{
        std::transform( &variable, &variable + 1, &variable,
                std::tr1::bind( std::plus< long >(), 0L, v ) );
}

/* { dg-final { scan-tree-dump-times ";; Function" 2 "optimized" } } */
/* { dg-final { scan-tree-dump-times "variable_..D. = v_..D." 2 "optimized" } } */
/* { dg-final { cleanup-tree-dump "optimized" } } */

Compare with Previous | Blame | View Log

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.