Skip to content

Commit

Permalink
2014-12-09 Richard Biener <rguenther@suse.de>
Browse files Browse the repository at this point in the history
	PR middle-end/64199
	* fold-const.c (fold_binary_loc): Use TREE_OVERFLOW_P.

	* gcc.dg/torture/pr64199.c: New testcase.


git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@218513 138bc75d-0d04-0410-961f-82ee72b054a4
  • Loading branch information
rguenth committed Dec 9, 2014
1 parent 9e68000 commit 1e25901
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 2 deletions.
5 changes: 5 additions & 0 deletions gcc/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
2014-12-09 Richard Biener <rguenther@suse.de>

PR middle-end/64199
* fold-const.c (fold_binary_loc): Use TREE_OVERFLOW_P.

2014-12-09 Richard Biener <rguenther@suse.de>

PR tree-optimization/64191
Expand Down
4 changes: 2 additions & 2 deletions gcc/fold-const.c
Original file line number Diff line number Diff line change
Expand Up @@ -10398,8 +10398,8 @@ fold_binary_loc (location_t loc,

/* Don't introduce overflows through reassociation. */
if (!any_overflows
&& ((lit0 && TREE_OVERFLOW (lit0))
|| (minus_lit0 && TREE_OVERFLOW (minus_lit0))))
&& ((lit0 && TREE_OVERFLOW_P (lit0))
|| (minus_lit0 && TREE_OVERFLOW_P (minus_lit0))))
return NULL_TREE;

if (minus_lit0)
Expand Down
5 changes: 5 additions & 0 deletions gcc/testsuite/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
2014-12-09 Richard Biener <rguenther@suse.de>

PR middle-end/64199
* gcc.dg/torture/pr64199.c: New testcase.

2014-12-09 Ilya Enkovich <ilya.enkovich@intel.com>

* gcc.dg/lto/lto.exp: Load mpx-dg.exp.
Expand Down
8 changes: 8 additions & 0 deletions gcc/testsuite/gcc.dg/torture/pr64199.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
/* { dg-do compile } */
/* { dg-additional-options "-ffast-math -frounding-math" } */

float
foo (void)
{
return 1.1f + 2.2f + 2.2f;
}

0 comments on commit 1e25901

Please sign in to comment.