Mercurial > hg > CbC > CbC_gcc
view gcc/testsuite/gcc.target/sh/pr55160.c @ 145:1830386684a0
gcc-9.2.0
author | anatofuz |
---|---|
date | Thu, 13 Feb 2020 11:34:05 +0900 |
parents | 04ced10e8804 |
children |
line wrap: on
line source
/* Check that the decrement-and-test instruction is generated. */ /* { dg-do compile } */ /* { dg-options "-O1" } */ /* { dg-final { scan-assembler-times "dt\tr" 2 } } */ int test_00 (int* x, int c) { int s = 0; int i; for (i = 0; i < c; ++i) s += x[i]; return s; } int test_01 (int* x, int c) { int s = 0; int i; for (i = 0; i < c; ++i) s += *--x; return s; }