Two translation units built against different copies of a header

Two translation units each define the same external-linkage inline function with genuinely different bodies, then link into one program. What is the standard's verdict, and what do real toolchains do?

shared.h
// included identically by both a.cpp and b.cpp... except a.cpp
// was actually built against an older, hand-patched copy of this header:

// a.cpp's copy of shared.h:
inline int scale(int x) { return x * 2; }

// b.cpp's copy of shared.h:
inline int scale(int x) { return x * 3; }

21 of 44 in Compilers