summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.c-torture/execute/20000910-1.c
blob: 0c3c602dd6d48ed25015eecd752c33bb0c24adbc (plain)
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
/* Copyright (C) 2000  Free Software Foundation  */
/* by Alexandre Oliva <aoliva@redhat.com> */

#include <stdlib.h>

void bar (int);
void foo (int *);

int main () {
  static int a[] = { 0, 1, 2 };
  int *i = &a[sizeof(a)/sizeof(*a)];
  
  while (i-- > a)
    foo (i);

  exit (0);
}

void baz (int, int);

void bar (int i) { baz (i, i); }
void foo (int *i) { bar (*i); }

void baz (int i, int j) {
  if (i != j)
    abort ();
}