diff --git a/gcc/testsuite/gcc.c-torture/ChangeLog b/gcc/testsuite/gcc.c-torture/ChangeLog index 9a52fd5e06a9..28832d4822eb 100644 --- a/gcc/testsuite/gcc.c-torture/ChangeLog +++ b/gcc/testsuite/gcc.c-torture/ChangeLog @@ -1,3 +1,7 @@ +Thu Jun 18 15:12:30 1998 Michael Meissner + + * execute/980618-{1,2}.c: New tests that showed up m32r bugs. + Fri Jun 5 21:54:26 1997 J"orn Rennecke * execute/980605-1.c: New test. diff --git a/gcc/testsuite/gcc.c-torture/execute/980618-1.c b/gcc/testsuite/gcc.c-torture/execute/980618-1.c new file mode 100644 index 000000000000..59db7f28b9cb --- /dev/null +++ b/gcc/testsuite/gcc.c-torture/execute/980618-1.c @@ -0,0 +1,16 @@ +void func(int, int); + +int main() +{ + int x = 7; + func(!x, !7); + exit (0); +} + +void func(int x, int y) +{ + if (x == y) + return; + else + abort (); +} diff --git a/gcc/testsuite/gcc.c-torture/execute/980618-2.c b/gcc/testsuite/gcc.c-torture/execute/980618-2.c new file mode 100644 index 000000000000..c97e19e627f7 --- /dev/null +++ b/gcc/testsuite/gcc.c-torture/execute/980618-2.c @@ -0,0 +1,66 @@ +typedef char CHAR; +typedef short SHORT; +typedef int INT; +typedef long LONG; +typedef float FLOAT; +typedef unsigned char UCHAR; +typedef unsigned short USHORT; +typedef unsigned int UINT; +typedef unsigned long ULONG; +typedef double DOUBLE; +#if __STDC__ +typedef signed char SCHAR; +typedef long double LDOUBLE; +#endif + +int +main () +{ + typedef union + { + CHAR c; + SHORT s; + INT i; + UCHAR uc; + USHORT us; + UINT ui; + LONG l; + ULONG ul; + FLOAT f; + DOUBLE d; +#if __STDC__ + SCHAR sc; + LDOUBLE ld; +#endif + } + D; + auto D D1; + D1.c = 7; + { + auto struct + { + CHAR c; + SHORT s; + INT i; + UCHAR uc; + USHORT us; + UINT ui; + LONG l; + ULONG ul; + FLOAT f; + DOUBLE d; +#if __STDC__ + SCHAR sc; + LDOUBLE ld; +#endif + } + F; + F.c = 7; + if ((D1.c && F.c) != 1) + abort (); + if ((F.c && D1.c) != 1) + abort (); + } + + exit (0); +}