This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
misc testsuite fixes for stormy16
- To: gcc-patches at gcc dot gnu dot org
- Subject: misc testsuite fixes for stormy16
- From: Geoffrey Keating <geoffk at thief dot cygnus dot com>
- Date: Fri, 31 Aug 2001 09:59:05 -0700
This fixes a few tests that expected 'int' to be 32 bits, or wanted
too much stack.
Tested on stormy16-elf, where they now pass.
--
Geoff Keating <geoffk@redhat.com>
===File ~/patches/gcc-stormymisctest.patch==================
2001-08-31 Geoffrey Keating <geoffk@redhat.com>
* g++.dg/abi/empty4.C: Allow for 16-bit ints.
* g++.dg/special/initp1.C (X): Allow for 16-bit ints.
* gcc.c-torture/unsorted/bcopy.c (BYTES): Honor STACK_SIZE.
Index: gcc/gcc/testsuite/g++.dg/abi/empty4.C
===================================================================
RCS file: /cvs/gcc/gcc/gcc/testsuite/g++.dg/abi/empty4.C,v
retrieving revision 1.1
diff -p -u -p -r1.1 empty4.C
--- empty4.C 2001/08/07 13:57:06 1.1
+++ empty4.C 2001/08/31 16:56:50
@@ -10,21 +10,21 @@ struct Empty {};
struct Inter : Empty {};
-int now = 0;
+long now = 0;
struct NonPod
{
- int m;
+ long m;
NonPod () {m = 0x12345678;}
- NonPod (int m_) {m = m_;}
+ NonPod (long m_) {m = m_;}
NonPod &operator= (NonPod const &src) {now = m; m = src.m;}
NonPod (NonPod const &src) {m = src.m;}
};
struct A : Inter
{
- A (int c) {m = c;}
+ A (long c) {m = c;}
NonPod m;
};
@@ -34,19 +34,19 @@ struct B
Inter empty;
NonPod m;
- B (int c) {m = c;}
+ B (long c) {m = c;}
};
struct C : NonPod, Inter
{
- C (int c) : NonPod (c), Inter () {}
+ C (long c) : NonPod (c), Inter () {}
};
int main ()
{
A a (0x12131415);
- int was = a.m.m;
+ long was = a.m.m;
a = 0x22232425;
Index: gcc/gcc/testsuite/g++.dg/special/initp1.C
===================================================================
RCS file: /cvs/gcc/gcc/gcc/testsuite/g++.dg/special/initp1.C,v
retrieving revision 1.3
diff -p -u -p -r1.3 initp1.C
--- initp1.C 2001/08/29 22:36:26 1.3
+++ initp1.C 2001/08/31 16:56:50
@@ -51,7 +51,7 @@ int Two::count;
long x = 0;
#define X( n ) \
- do { if ( x & (1 << (n)) ) return 1; else x |= (1 << (n)); } while (0)
+ do { if ( x & (1L << (n)) ) return 1; else x |= (1L << (n)); } while (0)
int main()
{
Index: gcc/gcc/testsuite/gcc.c-torture/unsorted/bcopy.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/testsuite/gcc.c-torture/unsorted/bcopy.c,v
retrieving revision 1.2
diff -p -u -p -r1.2 bcopy.c
--- bcopy.c 1998/12/16 22:19:12 1.2
+++ bcopy.c 2001/08/31 16:56:54
@@ -51,7 +51,11 @@ bcopy3 (s, d, c)
}
}
+#if defined(STACK_SIZE) && STACK_SIZE < 16384
+#define BYTES STACK_SIZE
+#else
#define BYTES 16384
+#endif
main ()
{
============================================================