aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.c-torture/unsorted
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gcc.c-torture/unsorted')
-rw-r--r--gcc/testsuite/gcc.c-torture/unsorted/call386.c6
-rw-r--r--gcc/testsuite/gcc.c-torture/unsorted/ext.c10
-rw-r--r--gcc/testsuite/gcc.c-torture/unsorted/subcc.c8
3 files changed, 18 insertions, 6 deletions
diff --git a/gcc/testsuite/gcc.c-torture/unsorted/call386.c b/gcc/testsuite/gcc.c-torture/unsorted/call386.c
index 18498932c5b..c82a3be3450 100644
--- a/gcc/testsuite/gcc.c-torture/unsorted/call386.c
+++ b/gcc/testsuite/gcc.c-torture/unsorted/call386.c
@@ -1,7 +1,6 @@
+void foo () {}
-foo () {}
-
-main ()
+int main ()
{
int i;
for (i = 100000; i >= 0; i--)
@@ -17,4 +16,5 @@ main ()
foo ();
foo ();
}
+ return 0;
}
diff --git a/gcc/testsuite/gcc.c-torture/unsorted/ext.c b/gcc/testsuite/gcc.c-torture/unsorted/ext.c
index 8fa8cd73363..9e8604ef2b2 100644
--- a/gcc/testsuite/gcc.c-torture/unsorted/ext.c
+++ b/gcc/testsuite/gcc.c-torture/unsorted/ext.c
@@ -1,3 +1,12 @@
+/* The bit-field below would have a problem if __INT_MAX__ is too
+ small. */
+#if __INT_MAX__ < 2147483647
+int
+main (void)
+{
+ exit (0);
+}
+#else
struct foo
{
unsigned b31 : 1;
@@ -11,3 +20,4 @@ foo(a)
{
return a.b30;
}
+#endif
diff --git a/gcc/testsuite/gcc.c-torture/unsorted/subcc.c b/gcc/testsuite/gcc.c-torture/unsorted/subcc.c
index d50114eee42..d89b50dbdff 100644
--- a/gcc/testsuite/gcc.c-torture/unsorted/subcc.c
+++ b/gcc/testsuite/gcc.c-torture/unsorted/subcc.c
@@ -1,4 +1,4 @@
-foo (a, c)
+int foo (a, c)
{
int b;
@@ -7,7 +7,8 @@ foo (a, c)
return 0;
}
-bar (a)
+void bar (a)
+ int a;
{
if (foo (a, 10) & 0x80000000)
printf ("y");
@@ -15,7 +16,7 @@ bar (a)
printf ("n");
}
-main ()
+int main ()
{
bar (0);
bar (1);
@@ -28,4 +29,5 @@ main ()
bar (-0x7fffffff);
puts ("");
+ return 0;
}