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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |ice-on-valid-code, openmp
             Target|                            |x86_64-*-*
     Ever confirmed|0                           |1
   Last reconfirmed|                            |2021-05-11
             Status|UNCONFIRMED                 |NEW
            Version|tree-ssa                    |12.0
                 CC|                            |jakub at gcc dot gnu.org
          Component|c                           |middle-end

--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
#1  0x0000000000bb481f in expand_debug_locations ()
    at ../../src/gcc-11-branch/gcc/cfgexpand.c:5615
5615                gcc_assert (mode == GET_MODE (val)
(gdb) l
5610              val = gen_rtx_UNKNOWN_VAR_LOC ();
5611            else
5612              {
5613                mode = GET_MODE (INSN_VAR_LOCATION (insn));
5614
5615                gcc_assert (mode == GET_MODE (val)
5616                            || (GET_MODE (val) == VOIDmode
5617                                && (CONST_SCALAR_INT_P (val)
5618                                    || GET_CODE (val) == CONST_FIXED
5619                                    || GET_CODE (val) == LABEL_REF)));
(gdb) p debug_rtx (insn)
(debug_insn 10 9 11 3 (var_location:V8SI m (pc
Program received signal SIGSEGV, Segmentation fault.
0x00007ffff68038f6 in __strlen_sse2 () from /lib64/libc.so.6
The program being debugged was signaled while in a function called from GDB.
GDB has restored the context to what it was before the call.
To change this behavior use "set unwindonsignal off".
Evaluation of the expression containing the function
(debug_rtx(rtx_def const*)) will be abandoned.

(gdb) p debug_rtx (val)
(debug_expr:BLK D#1)
(gdb) p mode
$3 = E_V8SImode

possibly some TYPE/DECL_MODE[_RAW] issue.

we have

(gdb) p debug_tree (value)
 <debug_expr_decl 0x7ffff6578b40 D.4294967295
    type <vector_type 0x7ffff669ee70 V
        type <integer_type 0x7ffff65835e8 int asm_written public SI
            size <integer_cst 0x7ffff656af18 constant 32>
            unit-size <integer_cst 0x7ffff656af30 constant 4>
            align:32 warn_if_not_align:0 symtab:-160677248 alias-set 1
canonical-type 0x7ffff65835e8 precision:32 min <integer_cst 0x7ffff656aed0
-2147483648> max <integer_cst 0x7ffff656aee8 2147483647>
            pointer_to_this <pointer_type 0x7ffff658b9d8>>
        sizes-gimplified asm_written V8SI
        size <integer_cst 0x7ffff6588048 constant 256>
        unit-size <integer_cst 0x7ffff6588138 constant 32>
        align:256 warn_if_not_align:0 symtab:-160677488 alias-set -1
canonical-type 0x7ffff668f738 nunits:8 context <translation_unit_decl
0x7ffff6578ac8 t.c>
        pointer_to_this <pointer_type 0x7ffff669e5e8>>
    visited BLK t.c:3:1
    align:1 warn_if_not_align:0
    (debug_expr:BLK D#1)>

so expand_debug_expr yields E_V8SImode from TYPE_MODE (TREE_TYPE (exp)) for
unknown reasons - targetm.vector_mode_supported_p returns true.

For some reason the debug stmt

  # DEBUG m => m_2

appears already in into-SSA and at that point SIMD lowering didn't take
effect yet?  Do we have to adjust debug temps as well there?

Reply via email to