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=d5da4f291af551c0b8b79e1d4a9b173d60e5c10e;hpb=7b5ea4fcdf2819e070665ab5610f8b48e3867c10 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()); +}