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

--- Comment #15 from David Malcolm <dmalcolm at gcc dot gnu.org> ---
A minimal reproducer:

$ cat t3.c
extern int printf (const char *__restrict __format, ...);
void test (void)
{
  printf
("%llu01233456789012334567890123345678901233456789012334567890123345678901233456789012334567890123345678901233456789012334567890123345678901233456789");
}

$ ./xgcc -B. -c t3.c -Wformat
t3.c: In function ‘test’:
t3.c:4:3: internal compiler error: in linemap_position_for_loc_and_offset, at
libcpp/line-map.c:924
   printf
("%llu01233456789012334567890123345678901233456789012334567890123345678901233456789012334567890123345678901233456789012334567890123345678901233456789");
   ^~~~~~
0x197628e linemap_position_for_loc_and_offset(line_maps*, unsigned int,
unsigned int)
        ../../src/libcpp/line-map.c:924
0x84a988 location_from_offset
        ../../src/gcc/c-family/c-format.c:139
0x850683 format_type_warning
        ../../src/gcc/c-family/c-format.c:2672
0x84fbb0 check_format_types
        ../../src/gcc/c-family/c-format.c:2474
0x84f996 check_format_info_main
        ../../src/gcc/c-family/c-format.c:2424
0x84d266 check_format_arg
        ../../src/gcc/c-family/c-format.c:1688
0x835a1c check_function_arguments_recurse(void (*)(void*, tree_node*, unsigned
long), void*, tree_node*, unsigned long)
        ../../src/gcc/c-family/c-common.c:9783
0x83573d check_function_arguments_recurse(void (*)(void*, tree_node*, unsigned
long), void*, tree_node*, unsigned long)
        ../../src/gcc/c-family/c-common.c:9716
0x84c281 check_format_info
        ../../src/gcc/c-family/c-format.c:1423
0x84b4fe check_function_format(tree_node*, int, tree_node**)
        ../../src/gcc/c-family/c-format.c:1093
0x8355c8 check_function_arguments(unsigned int, tree_node const*, int,
tree_node**)
        ../../src/gcc/c-family/c-common.c:9695
0x778701 build_function_call_vec(unsigned int, vec<unsigned int, va_heap,
vl_ptr>, tree_node*, vec<tree_node*, va_gc, vl_embed>*, vec<tree_node*, va_gc,
vl_embed>*)
        ../../src/gcc/c/c-typeck.c:3051
0x778d64 c_build_function_call_vec(unsigned int, vec<unsigned int, va_heap,
vl_ptr>, tree_node*, vec<tree_node*, va_gc, vl_embed>*, vec<tree_node*, va_gc,
vl_embed>*)
        ../../src/gcc/c/c-typeck.c:3102
0x7c10a2 c_parser_postfix_expression_after_primary
        ../../src/gcc/c/c-parser.c:8262
0x7c07c0 c_parser_postfix_expression
        ../../src/gcc/c/c-parser.c:8075
0x7bc581 c_parser_unary_expression
        ../../src/gcc/c/c-parser.c:6893
0x7bb9ae c_parser_cast_expression
        ../../src/gcc/c/c-parser.c:6722
0x7ba631 c_parser_binary_expression
        ../../src/gcc/c/c-parser.c:6531
0x7b9e80 c_parser_conditional_expression
        ../../src/gcc/c/c-parser.c:6302
0x7b9b6e c_parser_expr_no_commas
        ../../src/gcc/c/c-parser.c:6219
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <http://gcc.gnu.org/bugs.html> for instructions.

Reply via email to