http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57074
Jakub Jelinek <jakub at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |aph at gcc dot gnu.org, | |tromey at gcc dot gnu.org Target Milestone|--- |4.8.1 --- Comment #8 from Jakub Jelinek <jakub at gcc dot gnu.org> 2013-05-02 18:21:24 UTC --- So, the decl in question seems to be created by: #0 build_decl_stat (loc=13046123, code=VAR_DECL, name=0xf42cd7d0, type=0xf7915840) at ../../gcc/tree.c:4166 #1 0x081bbf87 in gen_indirect_dispatch_tables (type=0xf7973f60) at ../../gcc/java/class.c:472 #2 0x08207f7b in parse_class_file () at ../../gcc/java/jcf-parse.c:1566 #3 0x082091bc in parse_zip_file_entries () at ../../gcc/java/jcf-parse.c:2101 and the DECL_INITIAL for it filled by: #0 emit_symbol_table (name=0xf42cd7a8, the_table=0xf42cf5c0, decl_table=0xf42cd938, the_syms_decl=the_syms_decl@entry=0xf42cf61c, the_array_element_type=the_array_element_type@entry=0xf790e720, element_size=element_size@entry=1) at ../../gcc/java/class.c:2965 #1 0x081c7854 in make_class_data (type=0xf7973f60) at ../../gcc/java/class.c:2066 #2 0x081d13ca in finish_class () at ../../gcc/java/class.c:2255 #3 0x082081df in parse_class_file () at ../../gcc/java/jcf-parse.c:1661 #4 0x082091bc in parse_zip_file_entries () at ../../gcc/java/jcf-parse.c:2101 One bug seems to be one_elt_array_domain_type = build_index_type (integer_one_node); That name seems to be inconsistent with what it does, build_index_type (integer_one_node); returns an index type with <min 0> <max 1>, i.e. two element array. One element array is build_index_type (integer_zero_node);. And, either the individual decls need to be created with different types, depending on how many elements they will have, or at least treated as C [] arrays and at least DECL_SIZE and DECL_SIZE_UNIT need to be updated when setting DECL_INITIAL. >From quick skimming, emit_{symbol,assertion}_table are the only callers in gcc/java/ of build_constructor that don't bother with sizing the array type appropriately.