mirror of git://gcc.gnu.org/git/gcc.git
c-common.c (shorten_compare): Do not shorten mixed DFP and non-DFP compares.
2014-11-04 Richard Biener <rguenther@suse.de> * c-common.c (shorten_compare): Do not shorten mixed DFP and non-DFP compares. From-SVN: r217101
This commit is contained in:
parent
673fade339
commit
6f45018142
|
|
@ -1,3 +1,8 @@
|
||||||
|
2014-11-04 Richard Biener <rguenther@suse.de>
|
||||||
|
|
||||||
|
* c-common.c (shorten_compare): Do not shorten mixed
|
||||||
|
DFP and non-DFP compares.
|
||||||
|
|
||||||
2014-11-01 Edward Smith-Rowland <3dw4rd@verizon.net>
|
2014-11-01 Edward Smith-Rowland <3dw4rd@verizon.net>
|
||||||
|
|
||||||
* g++.dg/cpp1y/feat-cxx11.C: Commentary and rearrangement of tests.
|
* g++.dg/cpp1y/feat-cxx11.C: Commentary and rearrangement of tests.
|
||||||
|
|
|
||||||
|
|
@ -4313,10 +4313,16 @@ shorten_compare (location_t loc, tree *op0_ptr, tree *op1_ptr,
|
||||||
|
|
||||||
/* If either arg is decimal float and the other is float, find the
|
/* If either arg is decimal float and the other is float, find the
|
||||||
proper common type to use for comparison. */
|
proper common type to use for comparison. */
|
||||||
|
else if (real1 && real2
|
||||||
|
&& DECIMAL_FLOAT_MODE_P (TYPE_MODE (TREE_TYPE (primop0)))
|
||||||
|
&& DECIMAL_FLOAT_MODE_P (TYPE_MODE (TREE_TYPE (primop1))))
|
||||||
|
type = common_type (TREE_TYPE (primop0), TREE_TYPE (primop1));
|
||||||
|
|
||||||
|
/* If either arg is decimal float and the other is float, fail. */
|
||||||
else if (real1 && real2
|
else if (real1 && real2
|
||||||
&& (DECIMAL_FLOAT_MODE_P (TYPE_MODE (TREE_TYPE (primop0)))
|
&& (DECIMAL_FLOAT_MODE_P (TYPE_MODE (TREE_TYPE (primop0)))
|
||||||
|| DECIMAL_FLOAT_MODE_P (TYPE_MODE (TREE_TYPE (primop1)))))
|
|| DECIMAL_FLOAT_MODE_P (TYPE_MODE (TREE_TYPE (primop1)))))
|
||||||
type = common_type (TREE_TYPE (primop0), TREE_TYPE (primop1));
|
return 0;
|
||||||
|
|
||||||
else if (real1 && real2
|
else if (real1 && real2
|
||||||
&& (TYPE_PRECISION (TREE_TYPE (primop0))
|
&& (TYPE_PRECISION (TREE_TYPE (primop0))
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue