Commit 54eb90fe by Senthil Kumar Selvaraj Committed by Senthil Kumar Selvaraj

Fix failing overflow-1.c for avr

The test assumes 32 bit ints, and expects a constant in the
dump that is only valid for 32 bit ints. Fix by explicitly
specifying __UINT32_TYPE__.

gcc/testsuite/

2017-03-21  Senthil Kumar Selvaraj  <senthil_kumar.selvaraj@atmel.com>

	* gcc.dg/tree-ssa/overflow-1.c: Use __UINT32_TYPE__ for targets
	with sizeof(int) < 4.

From-SVN: r246318
parent c68dda59
2017-03-21 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
* gcc.dg/tree-ssa/overflow-1.c: Use __UINT32_TYPE__ for targets
with sizeof(int) < 4.
2017-03-21 Martin Liska <mliska@suse.cz> 2017-03-21 Martin Liska <mliska@suse.cz>
* gcc.target/i386/pr65044.c: Add '.' in order to catch * gcc.target/i386/pr65044.c: Add '.' in order to catch
......
/* { dg-do compile } */ /* { dg-do compile } */
/* { dg-options "-O -fdump-tree-optimized" } */ /* { dg-options "-O -fdump-tree-optimized" } */
int f(unsigned a){ #if __SIZEOF_INT__ < 4
unsigned b=5; __extension__ typedef __UINT32_TYPE__ uint32_t;
unsigned c=a-b; #else
typedef unsigned uint32_t;
#endif
int f(uint32_t a){
uint32_t b=5;
uint32_t c=a-b;
return c>a; return c>a;
} }
int g(unsigned a){ int g(uint32_t a){
unsigned b=32; uint32_t b=32;
unsigned c=a+b; uint32_t c=a+b;
return c<a; return c<a;
} }
......
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