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

--- Comment #3 from Martin Liška <marxin at gcc dot gnu.org> ---
Created attachment 46338
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=46338&action=edit
Debugging patch

So the issue started before the revision, output of the debugging patch is
following:

$ ./xgcc -B. /tmp/ice.f90 -c -O3 -ffast-math -fdump-tree-vect-details
-march=haswell
 <vector_type 0x7ffff7ac8bd0
    type <boolean_type 0x7ffff7ac8b28 SI
        size <integer_cst 0x7ffff78eedb0 constant 32>
        unit-size <integer_cst 0x7ffff78eedc8 constant 4>
        align:32 warn_if_not_align:0 symtab:0 alias-set -1 canonical-type
0x7ffff7ac8b28 precision:32 min <integer_cst 0x7ffff7aebb88 -2147483648> max
<integer_cst 0x7ffff7aebbb8 2147483647>>
    V8SI
    size <integer_cst 0x7ffff78eeed0 type <integer_type 0x7ffff79030a8
bitsizetype> constant 256>
    unit-size <integer_cst 0x7ffff78eefc0 type <integer_type 0x7ffff7903000
sizetype> constant 32>
    align:256 warn_if_not_align:0 symtab:0 alias-set -1 canonical-type
0x7ffff7ac8bd0 nunits:8>
calling dump_printf_loc with mask_vectype=0x7ffff7ac8bd0,
vectype=0x7ffff796ae70
case T=0x22d0090
during GIMPLE pass: vect
dump file: ice.f90.158t.vect
dump_generic_node node=0x7ffff7ac1150
/tmp/ice.f90:9:0:

    9 | subroutine refl10cm_hm (dBZ , kte)
      | 
internal compiler error: in decode_format, at dumpfile.c:976
0xbc6618 dump_pretty_printer::decode_format(text_info*, char const*, char
const**)
        ../../gcc/dumpfile.c:976
0xbc63fc dump_pretty_printer::format_decoder_cb(pretty_printer*, text_info*,
char const*, int, bool, bool, bool, bool*, char const**)
        ../../gcc/dumpfile.c:906
0x20d387a pp_format(pretty_printer*, text_info*)
        ../../gcc/pretty-print.c:1390
0xbc66e0 dump_context::dump_printf_va(dump_metadata_t const&, char const*,
__va_list_tag (*) [1])
        ../../gcc/dumpfile.c:1003
0xbc6790 dump_context::dump_printf_loc_va(dump_metadata_t const&,
dump_user_location_t const&, char const*, __va_list_tag (*) [1])
        ../../gcc/dumpfile.c:1024
0xbc7248 dump_printf_loc(dump_metadata_t const&, dump_user_location_t const&,
char const*, ...)
        ../../gcc/dumpfile.c:1350
0x1541755 vect_check_load_store_mask
        ../../gcc/tree-vect-stmts.c:2575
0x155446b vectorizable_load
        ../../gcc/tree-vect-stmts.c:7620
0x155b46d vect_analyze_stmt(_stmt_vec_info*, bool*, _slp_tree*, _slp_instance*,
vec<stmt_info_for_cost, va_heap, vl_ptr>*)
        ../../gcc/tree-vect-stmts.c:9695
0x156b927 vect_analyze_loop_operations
        ../../gcc/tree-vect-loop.c:1575
0x156cd0e vect_analyze_loop_2
        ../../gcc/tree-vect-loop.c:1969
0x156e1ac vect_analyze_loop(loop*, _loop_vec_info*, vec_info_shared*)
        ../../gcc/tree-vect-loop.c:2268
0x15aad71 try_vectorize_loop_1
        ../../gcc/tree-vectorizer.c:883
0x15ab506 try_vectorize_loop
        ../../gcc/tree-vectorizer.c:1029
0x15ab6d6 vectorize_loops()
        ../../gcc/tree-vectorizer.c:1111
0x141b9cd execute
        ../../gcc/tree-ssa-loop.c:414

So as seen, we call dump_printf_loc with 2 arguments, but the var_arg arguments
are smashed somehow.

I'm going to bisect that now.

Reply via email to