summaryrefslogtreecommitdiffstats
path: root/binutils-2.25/gold/testsuite/odr_violation1.cc
blob: 8b37cea7e2da36ab86b262440198f4440d469756 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#include <algorithm>
#include "odr_header1.h"

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;
}

// Instantiate the Derived vtable, without optimization.
OdrBase* CreateOdrDerived1() {
  return new OdrDerived;
}