re PR c/23506 (Bad array access in DEF_GCC_BUILTIN)
authorJakub Jelinek <jakub@redhat.com>
Fri, 26 Aug 2005 16:26:50 +0000 (18:26 +0200)
committerJakub Jelinek <jakub@gcc.gnu.org>
Fri, 26 Aug 2005 16:26:50 +0000 (18:26 +0200)
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

gcc/ChangeLog
gcc/c-common.c

index 30a83691cd97fb653a30a135ffcaf65d03f87b7a..5c55b1d99db5ae15933a433c28362e7011feae3f 100644 (file)
@@ -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
index 678327779bf2242377fd8828f9cd6fa1fae58ffb..edd744893cbaf0430c028d7e223e5f9404d4bdbd 100644 (file)
@@ -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 ();