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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.dg/] [torture/] [pr48165.C] - Blame information for rev 774

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

Line No. Rev Author Line
1 693 jeremybenn
/* { dg-do compile } */
2
 
3
typedef __SIZE_TYPE__ size_t;
4
 
5
extern "C" {
6
    extern __inline __attribute__ ((__always_inline__))
7
    __attribute__ ((__gnu_inline__, __artificial__)) void *
8
    memcpy (void *__restrict __dest, __const void *__restrict __src,
9
            size_t __len) throw ()
10
      {
11
        return __builtin___memcpy_chk (__dest, __src, __len,
12
                                       __builtin_object_size (__dest, 0));
13
      }
14
}
15
 
16
typedef char TCODE[20];
17
typedef TCODE TCODE_ARRAY[5];
18
typedef struct PARAM
19
{
20
  TCODE_ARRAY tcode;
21
} PARAM;
22
 
23
static void foo (void* p)
24
{
25
  char buffer[4+sizeof(PARAM)];
26
  PARAM *param = (PARAM *)(buffer + 4);
27
  int i;
28
 
29
  for (i=0; i < 5; i++)
30
    {
31
      memcpy( param->tcode[i], p, 20 );
32
    }
33
}
34
 
35
void bar (void* p)
36
{
37
  foo (p);
38
}

powered by: WebSVN 2.1.0

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