diff options
Diffstat (limited to 'gcc/testsuite/gcc.target/sparc/sparc-constant-1.c')
-rw-r--r-- | gcc/testsuite/gcc.target/sparc/sparc-constant-1.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.target/sparc/sparc-constant-1.c b/gcc/testsuite/gcc.target/sparc/sparc-constant-1.c new file mode 100644 index 000000000..491f9d3f8 --- /dev/null +++ b/gcc/testsuite/gcc.target/sparc/sparc-constant-1.c @@ -0,0 +1,13 @@ +/* PR optimization/10876 */ + +/* { dg-do compile } */ + +/* Verify that adding the constant 4096 is turned + into substracting the constant -4096. */ + +int foo(int a) +{ + return a+4096; +} + +/* { dg-final { scan-assembler "sub" } } */ |