On Thu, Dec 22, 2022 at 07:48:28PM +0000, Joseph Myers wrote: > On Thu, 22 Dec 2022, Segher Boessenkool wrote: > > On Wed, Dec 21, 2022 at 09:40:24PM +0000, Joseph Myers wrote: > > > On Wed, 21 Dec 2022, Segher Boessenkool wrote: > > > > Joseph: what do you think about this patch? Is the workaround it > > > > removes still useful in any way, do we need to do that some other way if > > > > we remove this? > > > > You didn't address these questions. We don't see negative effects from > > removing this workaround, but it isn't clear (to me) what problems were > > there that caused you to do this workaround. Do you remember maybe? Or > > can we just delete it and try to forget such worries :-) > > The purpose was to ensure that _Float128's TYPE_PRECISION was at least as > large as that of long double, in the case where they both have binary128 > format. I think at that time, in GCC 7, it was possible for _Float128 to > be KFmode and long double to be TFmode, with those being different modes > with the same format.
They still are separate modes :-( It always is possible to create KFmode entities (via mode((KF)) if nothing else) and those should behave exactly the same as TFmode if TFmode is IEEE QP (just like KFmode always is). > In my view, it would be best not to have different modes with the same > format - not simply ensure types with the same format have the same mode, > but avoid multiple modes with the same format existing in the compiler at > all. That is, TFmode should be the same mode as one of KFmode and IFmode > (one name should be defined as a macro for the other name, or something > similar). Right, TFmode should be just a different *name* for either IFmode or KFmode (and both of those modes always exist if either does). > If you don't have different modes with the same format, many of > the problems go away. I used to have patches for this. A few problems remained, but this was very long ago, who knows where we stand now. I'll recreate those patches, let's see where that gets us. Thanks for the help, Segher