Re: [PATCH] middle-end/105376 - invalid REAL_CST for DFP constant

2022-04-28 Thread Joseph Myers
On Thu, 28 Apr 2022, Richard Biener via Gcc-patches wrote: > We are eventually ICEing in decimal_to_decnumber on non-decimal > REAL_VALUE_TYPE that creep in from uses of build_real (..., dconst*) > for DFP types. The following extends the decimal_to_decnumber > special-casing of dconst* to build_

[PATCH] middle-end/105376 - invalid REAL_CST for DFP constant

2022-04-28 Thread Richard Biener via Gcc-patches
We are eventually ICEing in decimal_to_decnumber on non-decimal REAL_VALUE_TYPE that creep in from uses of build_real (..., dconst*) for DFP types. The following extends the decimal_to_decnumber special-casing of dconst* to build_real, avoiding the bogus REAL_CSTs from creeping into the IL and mod

Re: [PATCH] middle-end/105376 - invalid REAL_CST for DFP constant

2022-04-27 Thread Joseph Myers
On Wed, 27 Apr 2022, Richard Biener via Gcc-patches wrote: > Is this the correct strathegy to deal with this problem? Would > it be valid to just set ->is_decimal in build_real based on Just setting ->decimal isn't correct; that signifies that ->sig stores the number in decimal128 format (host-

[PATCH] middle-end/105376 - invalid REAL_CST for DFP constant

2022-04-27 Thread Richard Biener via Gcc-patches
We are eventually ICEing in decimal_to_decnumber on non-decimal REAL_VALUE_TYPE that creep in from uses of build_real (..., dconst*) for DFP types. The following fixes the single occurance that matters for the testcase in the PR by instead using build_real_truncate. Bootstrapped and tested on x86