This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c/57821] 'array is too large' error is missing when sizetype overflows


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=57821

--- Comment #11 from John David Anglin <danglin at gcc dot gnu.org> ---
Backtrace at ICE:

Breakpoint 1, _Z12tree_to_uhwiPK9tree_node (t=0x7ae68b58)
    at ../../gcc/gcc/tree.c:7024
7024      gcc_assert (tree_fits_uhwi_p (t));
(gdb) p debug_tree (t)
 <integer_cst 7ae68b58 type <integer_type 7adf6060 bitsizetype> constant
0x8000000000000000>
$1 = 10
(gdb) bt
#0  _Z12tree_to_uhwiPK9tree_node (t=0x7ae68b58) at ../../gcc/gcc/tree.c:7024
#1  0x000a3a20 in _Z20process_init_element6c_exprbP7obstack (value=..., 
    implicit=false, braced_init_obstack=0x7eff0b54)
    at ../../gcc/gcc/c/c-typeck.c:8829
#2  0x000bd170 in _ZL16c_parser_initvalP8c_parserP6c_exprP7obstack (
    parser=0x7ae45708, after=0x0, braced_init_obstack=0x7eff0b54)
    at ../../gcc/gcc/c/c-parser.c:4377
#3  0x000bcfc8 in _ZL16c_parser_initeltP8c_parserP7obstack (
    parser=0x7ae45708, braced_init_obstack=0x7eff0b54)
    at ../../gcc/gcc/c/c-parser.c:4351
#4  0x000bc724 in _ZL20c_parser_braced_initP8c_parserP9tree_nodeb (
    parser=0x7ae45708, type=0x0, nested_p=false)
    at ../../gcc/gcc/c/c-parser.c:4133
#5  0x000bc4ec in _ZL20c_parser_initializerP8c_parser (parser=0x7ae45708)
    at ../../gcc/gcc/c/c-parser.c:4091
#6  0x000b734c in
_ZL29c_parser_declaration_or_fndefP8c_parserbbbbbPP9tree_node3vecI7c_token7va_heap6vl_ptrE
(parser=0x7ae45708, fndef_ok=false, 
    static_assert_ok=true, empty_ok=true, nested=false, start_attr_ok=true, 
    objc_foreach_object_declaration=0x0, omp_declare_simd_clauses=...)
    at ../../gcc/gcc/c/c-parser.c:1759
#7  0x000b661c in _ZL29c_parser_external_declarationP8c_parser (
    parser=0x7ae45708) at ../../gcc/gcc/c/c-parser.c:1399
#8  0x000b5f58 in _ZL25c_parser_translation_unitP8c_parser (parser=0x7ae45708)
---Type <return> to continue, or q <return> to quit---
    at ../../gcc/gcc/c/c-parser.c:1286
#9  0x000d9228 in _Z12c_parse_filev () at ../../gcc/gcc/c/c-parser.c:14049
#10 0x00150588 in _Z19c_common_parse_filev ()
    at ../../gcc/gcc/c-family/c-opts.c:1067
#11 0x00906170 in _ZL12compile_filev () at ../../gcc/gcc/toplev.c:548
#12 0x00909be4 in _ZL10do_compilev () at ../../gcc/gcc/toplev.c:1917
#13 0x00909ef8 in _Z11toplev_mainiPPc (argc=14, argv=0x7eff057c)
    at ../../gcc/gcc/toplev.c:1993
#14 0x00d2357c in main (argc=14, argv=0x7eff057c) at ../../gcc/gcc/main.c:36


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]