File: abi.c

package info (click to toggle)
orc 1%3A0.4.22-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 5,644 kB
  • ctags: 5,588
  • sloc: ansic: 75,452; sh: 11,363; xml: 4,281; makefile: 306
file content (33 lines) | stat: -rw-r--r-- 534 bytes parent folder | download | duplicates (9)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33

#ifdef HAVE_CONFIG_H
#include "config.h"
#endif

#include <orc/orc.h>

#include <stdio.h>


int main (int argc, char *argv[])
{
  long offset;
  int expected_offset;
  int error = 0;

  offset = ORC_STRUCT_OFFSET (OrcProgram, code_exec);

  if (sizeof(void *) == 4) {
    expected_offset = 8360;
  } else {
    expected_offset = 9688;
  }

  if (offset != expected_offset) {
    printf("ABI bug: OrcProgram->code_exec should be at offset %ld instead of %d\n",
        offset, expected_offset);
    error = 1;
  }

  return error;
}