#include <stdio.h>
extern void abort(void);
void
main_test (void)
{
FILE *s_array[] = {stdout, NULL}, **s_ptr = s_array;
const char *const s1 = "hello world";
const char *const s2[] = { s1, 0 }, *const*s3;
fprintf (*s_ptr, "%s", "hello");
fprintf (*s_ptr, "%s", "\n");
fprintf (*s_ptr, "%s", *s2);
s3 = s2;
fprintf (*s_ptr, "%s", *s3++);
if (s3 != s2+1 || *s3 != 0)
abort();
s3 = s2;
fprintf (*s_ptr++, "%s", *s3++);
if (s3 != s2+1 || *s3 != 0 || s_ptr != s_array+1 || *s_ptr != 0)
abort();
s_ptr = s_array;
fprintf (*s_ptr, "%c", '\n');
fprintf (*s_ptr, "%c", **s2);
s3 = s2;
fprintf (*s_ptr, "%c", **s3++);
if (s3 != s2+1 || *s3 != 0)
abort();
s3 = s2;
fprintf (*s_ptr++, "%c", **s3++);
if (s3 != s2+1 || *s3 != 0 || s_ptr != s_array+1 || *s_ptr != 0)
abort();
s_ptr = s_array;
fprintf (*s_ptr++, "hello world");
if (s_ptr != s_array+1 || *s_ptr != 0)
abort();
s_ptr = s_array;
fprintf (*s_ptr, "\n");
__builtin_fprintf (*s_ptr, "%s", "hello world\n");
}