X-Git-Url: https://oss.titaniummirror.com/gitweb?p=msp430-binutils.git;a=blobdiff_plain;f=gold%2Ftestsuite%2Fodr_violation2.cc;fp=gold%2Ftestsuite%2Fodr_violation2.cc;h=d56927901ddc22220b2d85fa56670b7feb146000;hp=0000000000000000000000000000000000000000;hb=88750007d7869f178f0ba528f41efd3b74c424cf;hpb=6df9443a374e2b81278c61b8afc0a1eef7db280b diff --git a/gold/testsuite/odr_violation2.cc b/gold/testsuite/odr_violation2.cc new file mode 100644 index 0000000..d569279 --- /dev/null +++ b/gold/testsuite/odr_violation2.cc @@ -0,0 +1,14 @@ +#include + +class Ordering { + public: + bool operator()(int a, int b) { + // We need the "+ 1" here to force this operator() to be a + // different size than the one in odr_violation1.cc. + return a + 1 > b + 1; + } +}; + +void SortDescending(int array[], int size) { + std::sort(array, array + size, Ordering()); +}