Commit da88b352 by Alexandre Oliva Committed by Alexandre Oliva

20000910-1.c: New test.

* gcc.c-torture/execute/20000910-1.c: New test.
* gcc.c-torture/execute/20000910-2.c: Likewise.

From-SVN: r36328
parent 2a1da89b
2000-09-11 Alexandre Oliva <aoliva@redhat.com>
* gcc.c-torture/execute/20000910-1.c: New test.
* gcc.c-torture/execute/20000910-2.c: Likewise.
2000-09-11 Robert Lipe <robertl@sco.com>
* gcc.dg/pragma-align.c: New test.
......
/* 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 ();
}
/* Copyright (C) 2000 Free Software Foundation */
/* by Alexandre Oliva <aoliva@redhat.com> */
#include <stdlib.h>
#include <string.h>
char *list[] = { "*", "e" };
static int bar (const char *fmt) {
return (strchr (fmt, '*') != 0);
}
static void foo () {
int i;
for (i = 0; i < sizeof (list) / sizeof (*list); i++) {
const char *fmt = list[i];
if (bar (fmt))
continue;
if (i == 0)
abort ();
else
exit (0);
}
}
int main () {
foo ();
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment