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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.dg/] [tree-ssa/] [pr46228.C] - Blame information for rev 717

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 693 jeremybenn
// { dg-options "-fdump-tree-optimized -Os" }
2
#include 
3
#include 
4
 
5
int main()
6
{
7
  static const int array[] = { 1,2,3,4,5,6,7,8,9,10,6 };
8
  std::set the_set;
9
  int count = 0;
10
  for (unsigned i = 0; i < sizeof(array)/sizeof(*array); i++)
11
  {
12
    std::pair::iterator, bool> result =
13
      the_set.insert(array[i]);
14
    if (result.second)
15
      count++;
16
  }
17
  printf("%d unique items in array.\n", count);
18
  return 0;
19
}
20
 
21
// This function is small enough to be inlined even at -Os.
22
// { dg-final { scan-tree-dump-not "_ZNSt8_Rb_treeIiiSt9_IdentityIiESt4lessIiESaIiEED2Ev" "optimized" } }
23
// { dg-final { cleanup-tree-dump "optimized" } }

powered by: WebSVN 2.1.0

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