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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.dg/] [abi/] [arm_cxa_vec1.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
// Check that __cxa_vec_[c]ctor returns a pointer to the array
2
// { dg-do run { target arm*-*-* } }
3
 
4
#include 
5
 
6
#ifdef __ARM_EABI__
7
using namespace __cxxabiv1;
8
static __cxa_cdtor_return_type cctor (void * a, void * b)
9
{
10
  *(char *) a = *(char *) b;
11
  return a;
12
}
13
 
14
int main()
15
{
16
  char data;
17
  char data2;
18
  char *p;
19
 
20
  p = (char *) __cxa_vec_ctor (&data, 1, 1, NULL, NULL);
21
  if (p != &data)
22
    return 1;
23
  p = (char *) __cxa_vec_cctor (&data2, &data, 1, 1, cctor, NULL);
24
  if (p != &data2)
25
    return 1;
26
 
27
  return 0;
28
}
29
#else
30
int main()
31
{
32
  return 0;
33
}
34
#endif

powered by: WebSVN 2.1.0

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