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
This commit is contained in:
Alexandre Oliva 2000-09-11 21:00:19 +00:00 committed by Alexandre Oliva
parent 2a1da89b74
commit da88b35278
3 changed files with 60 additions and 0 deletions

View File

@ -1,3 +1,8 @@
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.

View File

@ -0,0 +1,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 ();
}

View File

@ -0,0 +1,28 @@
/* 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 ();
}