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

Subversion Repositories open8_urisc

[/] [open8_urisc/] [trunk/] [gnu/] [binutils/] [gold/] [testsuite/] [odr_violation2.cc] - Diff between revs 27 and 159

Show entire file | Details | Blame | View Log

Rev 27 Rev 159
Line 10... Line 10...
// two digits, which causes gold's output to be independent of which
// two digits, which causes gold's output to be independent of which
// instruction the compiler optimizes into the front of the function.
// instruction the compiler optimizes into the front of the function.
bool Ordering::operator()(int a, int b) {
bool Ordering::operator()(int a, int b) {
  // Optimization makes this operator() a different size than the one
  // Optimization makes this operator() a different size than the one
  // in odr_violation1.cc.
  // in odr_violation1.cc.
  return a + 1 > b + 1;
  return a + 12345 > b / 67;
}
}
 
 
void SortDescending(int array[], int size) {
void SortDescending(int array[], int size) {
  std::sort(array, array + size, Ordering());
  std::sort(array, array + size, Ordering());
}
}

powered by: WebSVN 2.1.0

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