https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87387
--- Comment #2 from David Binderman <dcb314 at hotmail dot com> --- Looks like an old implementation: https://gcc.gnu.org/ml/gcc-patches/2010-06/msg02390.html It might be worth using this as a starting point.