diff options
author | Ranjith Kumaran <ranjith@cygnus.com> | 2000-03-17 22:48:54 +0000 |
---|---|---|
committer | Ranjith Kumaran <ranjith@cygnus.com> | 2000-03-17 22:48:54 +0000 |
commit | 03261851a10dd2d6900a0a00a7515a0a46fb5d76 (patch) | |
tree | 7c22ac6cbbc99fd5cd1b5426853be8d4fd7bfcf1 /libgloss/testsuite/libgloss.all/struct.c | |
parent | fae4c299f14fc23e2829c8656992eba21f79242a (diff) | |
download | cygnal-03261851a10dd2d6900a0a00a7515a0a46fb5d76.tar.gz cygnal-03261851a10dd2d6900a0a00a7515a0a46fb5d76.tar.bz2 cygnal-03261851a10dd2d6900a0a00a7515a0a46fb5d76.zip |
20000317 sourceware import
Diffstat (limited to 'libgloss/testsuite/libgloss.all/struct.c')
-rw-r--r-- | libgloss/testsuite/libgloss.all/struct.c | 65 |
1 files changed, 65 insertions, 0 deletions
diff --git a/libgloss/testsuite/libgloss.all/struct.c b/libgloss/testsuite/libgloss.all/struct.c new file mode 100644 index 000000000..799f9a50f --- /dev/null +++ b/libgloss/testsuite/libgloss.all/struct.c @@ -0,0 +1,65 @@ +/* Oki bug report, no number. Here's the output the error generates. + + gcc -c -g -ansi oki008.c -o oki008.o -msoft-float + oki008.c: In function `Proc0': + oki008.c:50: internal error--insn does not satisfy its constraints: + (insn 37 35 24 (set (mem:DF (post_inc:DF (reg:SI 1 %r1))) + (reg:DF 48 %fr12)) 94 {reload_outdf+2} (nil) + (nil)) + gcc: Internal compiler error: program cc1 got fatal signal 6 + */ + +#include <stdio.h> + +typedef int Enumeration; +typedef int OneToFifty; +typedef char String30[31]; +struct Record +{ + struct Record *PtrComp; + Enumeration Discr; + Enumeration EnumComp; + OneToFifty IntComp; + String30 StringComp; +}; + +typedef struct Record RecordType; +typedef RecordType * RecordPtr; +typedef int boolean; + +#include <stdio.h> + +char buf[0x10000]; +char *pbuf = buf; + +char *_malloc(size) +{ + char *p; + + p = pbuf; + pbuf += size; + if (pbuf >= &buf[sizeof (buf)]) { + printf("_malloc error\n"); + return (0); + } + return (p); +} + +main() +{ + Proc0(); + pass ("struct"); + fflush (stdout); + return (0); +} + +RecordPtr PtrGlbNext; + +Proc0() +{ + extern char *_malloc(); + + register unsigned int i; + + PtrGlbNext = (RecordPtr) _malloc(sizeof(RecordType)); +} |