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] - Rev 688

Compare with Previous | Blame | View Log

extern void *malloc(__SIZE_TYPE__);
typedef struct T T;
struct T {
    void (*destroy)(void *);
};
void destroy(union { void *this; } __attribute__((transparent_union)));
static const typeof(destroy) *_destroy  = (const typeof(destroy)*)destroy;
void destroy(void *this);
static T *create_empty(void)
{
  T *this = malloc(sizeof(*this));
  *this = (typeof(*this)){ _destroy };
  return this;
}
void openssl_crl_load(void)
{
  T *this = create_empty();
  destroy(this);
}
 

Compare with Previous | Blame | View Log

powered by: WebSVN 2.1.0

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