forked from gcc-mirror/gcc
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* fold-const.c (fold_binary_loc): Don't fold if the result
is undefined. * match.pd (A + (-B) -> A - B, A - (-B) -> A + B, -(-A) -> A): Likewise. * c-c++-common/ubsan/overflow-sub-4.c: New test. * c-c++-common/ubsan/overflow-sub-2.c: Adjust dg-output. * c-c++-common/ubsan/overflow-int128.c: Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@217427 138bc75d-0d04-0410-961f-82ee72b054a4
- Loading branch information
mpolacek
committed
Nov 12, 2014
1 parent
1d2d4c4
commit 497d1b7
Showing
7 changed files
with
53 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,10 @@ | ||
2014-11-12 Marek Polacek <[email protected]> | ||
|
||
* fold-const.c (fold_binary_loc): Don't fold if the result | ||
is undefined. | ||
* match.pd (A + (-B) -> A - B, A - (-B) -> A + B, | ||
-(-A) -> A): Likewise. | ||
|
||
2014-11-12 Richard Biener <[email protected]> | ||
|
||
Merge from match-and-simplify branch | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,9 @@ | ||
2014-11-12 Marek Polacek <[email protected]> | ||
|
||
* c-c++-common/ubsan/overflow-sub-4.c: New test. | ||
* c-c++-common/ubsan/overflow-sub-2.c: Adjust dg-output. | ||
* c-c++-common/ubsan/overflow-int128.c: Likewise. | ||
|
||
2014-11-12 Evgeny Stupachenko <[email protected]> | ||
|
||
* gcc.target/i386/pr52252-atom-1.c: Extend assembler scan on AVX2 case. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
/* { dg-do run } */ | ||
/* { dg-options "-fsanitize=signed-integer-overflow" } */ | ||
|
||
#define INT_MIN (-__INT_MAX__ - 1) | ||
|
||
int | ||
main () | ||
{ | ||
int x = INT_MIN; | ||
int y = 0; | ||
int z; | ||
asm ("" : "+g" (y)); | ||
asm ("" : "+g" (x)); | ||
z = y - (-x); | ||
asm ("" : "+g" (z)); | ||
} | ||
|
||
/* { dg-output "negation of -2147483648 cannot be represented in type 'int'\[^\n\r]*; cast to an unsigned type to negate this value to itself\[^\n\r]*(\n|\r\n|\r)" } */ | ||
/* { dg-output "\[^\n\r]*signed integer overflow: 0 - -2147483648 cannot be represented in type 'int'\[^\n\r]*(\n|\r\n|\r)" } */ |