Pick three bugfixes from next branch to trunk for inclusion in 4.5.0 RC2, as discusse...
[sdcc.git] / sdcc / support / regression / tests / gcc-torture-execute-20000910-2.c
bloba9c5ddcba7f10433e140751c413a97e905ae5024
1 /*
2 20000010-2.c from the execute part of the gcc torture tests.
3 */
5 #include <testfwk.h>
7 #ifdef __SDCC
8 #pragma std_c99
9 #endif
11 /* Copyright (C) 2000 Free Software Foundation */
12 /* by Alexandre Oliva <aoliva@redhat.com> */
14 #include <stdlib.h>
15 #include <string.h>
17 const char *list[] = { "*", "e" };
19 static int bar (const char *fmt) {
20 return (strchr (fmt, '*') != 0);
23 static void foo () {
24 int i;
25 for (i = 0; i < sizeof (list) / sizeof (*list); i++) {
26 const char *fmt = list[i];
27 if (bar (fmt))
28 continue;
29 if (i == 0)
30 ASSERT (0);
31 else
32 return;
36 void
37 testTortureExecute (void) {
38 foo ();