OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.dg/] [torture/] [pr50067-4.c] - Blame information for rev 754

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 689 jeremybenn
/* { dg-do run } */
2
 
3
/* Verify we do not get a bogus access function with 0B vs. 1B which
4
   disambiguates both accesses and leads to vectorization.  */
5
 
6
extern int memcmp(const void *, const void *, __SIZE_TYPE__);
7
extern void abort (void);
8
short a[33] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31 };
9
short b[33] = { 0, };
10
int main()
11
{
12
#if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
13
  int i;
14
  if (sizeof (short) == 2)
15
    {
16
      for (i = 0; i < 64; ++i)
17
        {
18
          (*((char(*)[])&a[1]))[i] = (*((char(*)[])&a[0]))[i+1];
19
        }
20
      if (memcmp (&a, &b, sizeof (a)) != 0)
21
        abort ();
22
    }
23
#endif
24
  return 0;
25
}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.