aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2005-08-26 18:26:50 +0200
committerJakub Jelinek <jakub@gcc.gnu.org>2005-08-26 18:26:50 +0200
commit39627fed8943ef5ed4ecb7e5f4e68de5ade221ad (patch)
tree8dfcaeb020b6c0a482691f535de5f70dac14f185
parent5a2ab2c36d85271443c767da162785252670d30c (diff)
downloadgcc-39627fed8943ef5ed4ecb7e5f4e68de5ade221ad.zip
gcc-39627fed8943ef5ed4ecb7e5f4e68de5ade221ad.tar.gz
gcc-39627fed8943ef5ed4ecb7e5f4e68de5ade221ad.tar.bz2
re PR c/23506 (Bad array access in DEF_GCC_BUILTIN)
PR c/23506 * c-common.c (c_common_nodes_and_builtins): Increase builtin_types array by one element, initialize the BT_LAST element with NULL. From-SVN: r103526
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/c-common.c3
2 files changed, 8 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 30a8369..5c55b1d 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,9 @@
+2005-08-26 Jakub Jelinek <jakub@redhat.com>
+
+ PR c/23506
+ * c-common.c (c_common_nodes_and_builtins): Increase builtin_types
+ array by one element, initialize the BT_LAST element with NULL.
+
2005-08-26 David Edelsohn <edelsohn@gnu.org>
* config/rs6000/rs6000.md (eq<mode>_compare): Only enable when
diff --git a/gcc/c-common.c b/gcc/c-common.c
index 67832777..edd7448 100644
--- a/gcc/c-common.c
+++ b/gcc/c-common.c
@@ -2951,7 +2951,7 @@ c_common_nodes_and_builtins (void)
typedef enum builtin_type builtin_type;
- tree builtin_types[(int) BT_LAST];
+ tree builtin_types[(int) BT_LAST + 1];
int wchar_type_size;
tree array_domain_type;
tree va_list_ref_type_node;
@@ -3311,6 +3311,7 @@ c_common_nodes_and_builtins (void)
#undef DEF_FUNCTION_TYPE_VAR_4
#undef DEF_FUNCTION_TYPE_VAR_5
#undef DEF_POINTER_TYPE
+ builtin_types[(int) BT_LAST] = NULL_TREE;
c_init_attributes ();