Commit 3334c725 by Eric Botcazou

builtin-arith-overflow-1.c (fn2): Take signed char.

	* gcc.dg/builtin-arith-overflow-1.c (fn2): Take signed char.
	(fn3): Likewise.

From-SVN: r218641
parent 17e0fc92
2014-12-11 Eric Botcazou <ebotcazou@adacore.com>
* gcc.dg/builtin-arith-overflow-1.c (fn2): Take signed char.
(fn3): Likewise.
2014-12-11 Jan Hubicka <hubicka@ucw.cz> 2014-12-11 Jan Hubicka <hubicka@ucw.cz>
PR ipa/61324 PR ipa/61324
* testsuite/g++.dg/pr61324.C: New testcase by Trevor Saunders. * g++.dg/pr61324.C: New testcase by Trevor Saunders.
* testsuite/g++.dg/tm/pr51411-2.C: Update se the extern function is * g++.dg/tm/pr51411-2.C: Update se the extern function is
not eliminated early. not eliminated early.
* testsuite/gcc.target/i386/pr57756.c: Turn extern inline into static * gcc.target/i386/pr57756.c: Turn extern inline into static inline.
inline.
2014-12-11 Richard Biener <rguenther@suse.de> 2014-12-11 Richard Biener <rguenther@suse.de>
......
...@@ -17,7 +17,7 @@ fn1 (int x, unsigned int y) ...@@ -17,7 +17,7 @@ fn1 (int x, unsigned int y)
/* MUL_OVERFLOW should be folded into unsigned multiplication, /* MUL_OVERFLOW should be folded into unsigned multiplication,
because ovf is never used. */ because ovf is never used. */
__attribute__((noinline, noclone)) int __attribute__((noinline, noclone)) int
fn2 (char x, long int y) fn2 (signed char x, long int y)
{ {
short int res; short int res;
int ovf = __builtin_mul_overflow (x, y, &res); int ovf = __builtin_mul_overflow (x, y, &res);
...@@ -31,7 +31,7 @@ fn2 (char x, long int y) ...@@ -31,7 +31,7 @@ fn2 (char x, long int y)
/* ADD_OVERFLOW should be folded into unsigned addition, /* ADD_OVERFLOW should be folded into unsigned addition,
because it never overflows. */ because it never overflows. */
__attribute__((noinline, noclone)) int __attribute__((noinline, noclone)) int
fn3 (char x, unsigned short y, int *ovf) fn3 (signed char x, unsigned short y, int *ovf)
{ {
int res; int res;
*ovf = __builtin_add_overflow (x, y, &res); *ovf = __builtin_add_overflow (x, y, &res);
......
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