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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [testsuite/] [g++.dg/] [abi/] [arm_cxa_vec1.C] - Blame information for rev 825

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

Line No. Rev Author Line
1 149 jeremybenn
// Check that __cxa_vec_[c]ctor returns a pointer to the array
2
// { dg-do run { target arm*-*-* xscale*-*-* } }
3
 
4
#include 
5
 
6
#ifdef ___ARM_EABI__
7
static void cctor (void * a, void * b)
8
{
9
  *(char *) a = *(char *) b
10
}
11
 
12
int main()
13
{
14
  char data;
15
  char data2;
16
  char *p;
17
 
18
  p = __cxa_vec_ctor (&data, 1, 1, NULL, NULL);
19
  if (p != &data)
20
    return 1;
21
  p = __cxa_vec_cctor (&data2, &data, 1, 1, cctor, NULL);
22
  if (p != &data2)
23
    return 1;
24
 
25
  return 0;
26
}
27
#else
28
int main()
29
{
30
  return 0;
31
}
32
#endif

powered by: WebSVN 2.1.0

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