From 1f4d93604402cbc29cd8efd44faf9f130559d7bf Mon Sep 17 00:00:00 2001 From: No Author Date: Wed, 5 Mar 2003 09:00:43 +0000 Subject: [PATCH] This commit was manufactured by cvs2svn to create branch 'gcc-3_2-branch'. From-SVN: r63834 --- gcc/fixinc/tests/base/internal/sgimacros.h | 17 +++++++++++++++++ gcc/fixinc/tests/base/internal/wchar_core.h | 15 +++++++++++++++ .../gcc.c-torture/compile/20030305-1.c | 18 ++++++++++++++++++ 3 files changed, 50 insertions(+) create mode 100644 gcc/fixinc/tests/base/internal/sgimacros.h create mode 100644 gcc/fixinc/tests/base/internal/wchar_core.h create mode 100644 gcc/testsuite/gcc.c-torture/compile/20030305-1.c diff --git a/gcc/fixinc/tests/base/internal/sgimacros.h b/gcc/fixinc/tests/base/internal/sgimacros.h new file mode 100644 index 000000000000..a491e865af7b --- /dev/null +++ b/gcc/fixinc/tests/base/internal/sgimacros.h @@ -0,0 +1,17 @@ +/* DO NOT EDIT THIS FILE. + + It has been auto-edited by fixincludes from: + + "fixinc/tests/inc/internal/sgimacros.h" + + This had to be done to correct non-standard usages in the + original, manufacturer supplied header file. */ + + + +#if defined( IRIX___RESTRICT_CHECK ) +#ifdef __c99 +# ifndef __cplusplus +# define __restrict restrict +# endif +#endif /* IRIX___RESTRICT_CHECK */ diff --git a/gcc/fixinc/tests/base/internal/wchar_core.h b/gcc/fixinc/tests/base/internal/wchar_core.h new file mode 100644 index 000000000000..5b358a322135 --- /dev/null +++ b/gcc/fixinc/tests/base/internal/wchar_core.h @@ -0,0 +1,15 @@ +/* DO NOT EDIT THIS FILE. + + It has been auto-edited by fixincludes from: + + "fixinc/tests/inc/internal/wchar_core.h" + + This had to be done to correct non-standard usages in the + original, manufacturer supplied header file. */ + + + +#if defined( IRIX_WCSFTIME_CHECK ) +#if _NO_XOPEN5 && !defined(__c99) +extern size_t wcsftime(wchar_t *, __SGI_LIBC_NAMESPACE_QUALIFIER size_t, const char *, const struct tm *); +#endif /* IRIX_WCSFTIME_CHECK */ diff --git a/gcc/testsuite/gcc.c-torture/compile/20030305-1.c b/gcc/testsuite/gcc.c-torture/compile/20030305-1.c new file mode 100644 index 000000000000..2f608196fdde --- /dev/null +++ b/gcc/testsuite/gcc.c-torture/compile/20030305-1.c @@ -0,0 +1,18 @@ +/* PR c/9799 */ +/* Verify that GCC doesn't crash on excess elements + in initializer for a flexible array member. */ + +typedef struct { + int aaa; +} s1_t; + +typedef struct { + int bbb; + s1_t s1_array[]; +} s2_t; + +static s2_t s2_array[]= { + { 1, 4 }, + { 2, 5 }, + { 3, 6 } +}; -- 2.47.2