Just another thought. In Fortran, we have the possibility to define KIND numbers for numeric types however we want.
So, it would be no problem to have two long double types with distinct kind numbers, let's say KIND=16 for one type and KIND=17 for the other. We can then let selected_real_kind return the KIND that people should use (in this case, the IEEE 128-bit format). We could, for example, leave the IBM long double as KIND=16 and the IEEE double as a new kind, e.g. 17. This would have one advantage: Programs which used KIND=16 would be object-compatible. There would be two drawbacks: People who use KIND=16 (or REAL*16) as a shortcut for quadruple precision would not get the speed and accuracy of the IEEE floats. Plus, KIND=16 would mean something different on POWER to the rest of the world, where it is IEEE float (via libquadmath). If you plan on making this a real ABI change, we could also choose KIND=16 for the IEEE float, and something else (KIND=15?) for the IBM float for those people who need it for some reason or other. Best regards Thomas