old-cross-binutils/gold/testsuite/odr_violation1.cc
Ian Lance Taylor 9691462bab * testsuite/debug_msg.sh: Test mixed weak/strong symbol behavior.
* gold/testsuite/debug_msg.cc: Likewise.
	* gold/testsuite/odr_violation1.cc
	* gold/testsuite/odr_violation2.cc
2010-07-27 08:22:49 +00:00

17 lines
325 B
C++

#include <algorithm>
class Ordering {
public:
bool operator()(int a, int b) {
return a < b;
}
};
void SortAscending(int array[], int size) {
std::sort(array, array + size, Ordering());
}
extern "C" int OverriddenCFunction(int i) __attribute__ ((weak));
extern "C" int OverriddenCFunction(int i) {
return i;
}