File: quick1.c

package info (click to toggle)
prelink 0.0.20061027-1
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 3,716 kB
  • ctags: 2,061
  • sloc: ansic: 24,381; sh: 11,286; makefile: 169; cpp: 103
file content (21 lines) | stat: -rw-r--r-- 471 bytes parent folder | download | duplicates (8)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#include "reloc1.h"
#include <stdlib.h>

static struct A local = { 77, &local, &bar + 4 };
extern int baz;
static char *bazp0 = (char *) &baz;
static char *bazp1 = ((char *) &baz) + 1;

int main()
{
  if (foo.a != 1 || foo.b != &foo || foo.c != &bar || bar != 26)
    abort ();
  if (f1 () != 11 || f2 () != 12)
    abort ();
  local.c -= 4;
  if (local.a != 77 || local.b != &local || local.c != &bar)
    abort ();
  if (bazp1 - bazp0 != 1)
    abort ();
  exit (0);
}