Mercurial > hg > CbC > CbC_gcc
view gcc/testsuite/gcc.target/sh/pr50751-4.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 mov.w displacement addressing insn is generated. If the insn is generated as expected, there should be no address calculations outside the mov insns. */ /* { dg-do compile } */ /* { dg-options "-O1" } */ /* { dg-final { scan-assembler-not "add|sub" } } */ void testfunc_00 (const short* ap, short* bp, short val) { bp[0] = ap[15]; bp[2] = ap[5]; bp[9] = ap[7]; bp[0] = ap[15]; bp[4] = val; bp[14] = val; } void testfunc_01 (volatile const short* ap, volatile short* bp, short val) { bp[0] = ap[15]; bp[2] = ap[5]; bp[9] = ap[7]; bp[0] = ap[15]; bp[4] = val; bp[14] = val; }