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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.c-torture/] [compile/] [pr46866.c] - Blame information for rev 801

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

Line No. Rev Author Line
1 688 jeremybenn
extern void *malloc(__SIZE_TYPE__);
2
typedef struct T T;
3
struct T {
4
    void (*destroy)(void *);
5
};
6
void destroy(union { void *this; } __attribute__((transparent_union)));
7
static const typeof(destroy) *_destroy  = (const typeof(destroy)*)destroy;
8
void destroy(void *this);
9
static T *create_empty(void)
10
{
11
  T *this = malloc(sizeof(*this));
12
  *this = (typeof(*this)){ _destroy };
13
  return this;
14
}
15
void openssl_crl_load(void)
16
{
17
  T *this = create_empty();
18
  destroy(this);
19
}

powered by: WebSVN 2.1.0

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