Commit f45dacba by Richard Biener Committed by Richard Biener

re PR tree-optimization/66952 (wrong code at -O2 and -O3 on x86_64-linux-gnu)

2015-07-23  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/66952
	* gcc.dg/torture/pr66952.c: Use signed char.

From-SVN: r226104
parent b5fd0440
2015-07-23 Richard Biener <rguenther@suse.de>
PR tree-optimization/66952
* gcc.dg/torture/pr66952.c: Use signed char.
2015-07-23 Yuri Rumyantsev <ysrumyan@gmail.com> 2015-07-23 Yuri Rumyantsev <ysrumyan@gmail.com>
PR tree-optimization/66926,66951 PR tree-optimization/66926,66951
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
int a = 128, b; int a = 128, b;
static int static int
fn1 (char p1, int p2) fn1 (signed char p1, int p2)
{ {
return p1 < 0 || p1 > 1 >> p2 ? 0 : p1 << 1; return p1 < 0 || p1 > 1 >> p2 ? 0 : p1 << 1;
} }
...@@ -11,7 +11,7 @@ fn1 (char p1, int p2) ...@@ -11,7 +11,7 @@ fn1 (char p1, int p2)
static int static int
fn2 () fn2 ()
{ {
char c = a; signed char c = a;
b = fn1 (c, 1); b = fn1 (c, 1);
if ((128 | c) < 0 ? 1 : 0) if ((128 | c) < 0 ? 1 : 0)
return 1; return 1;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment