public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "rguenth at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug middle-end/100508] ICE with '-g -O3': in expand_debug_locations, at cfgexpand.c:5618
Date: Tue, 11 May 2021 07:02:53 +0000	[thread overview]
Message-ID: <bug-100508-4-Ww2HYVB0Ie@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-100508-4@http.gcc.gnu.org/bugzilla/>

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	other threads:[~2021-05-11  7:02 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-10 19:25 [Bug c/100508] New: " cnsun at uwaterloo dot ca
2021-05-11  7:02 ` rguenth at gcc dot gnu.org [this message]
2021-05-11  8:10 ` [Bug middle-end/100508] " marxin at gcc dot gnu.org
2021-05-11  8:31 ` jakub at gcc dot gnu.org
2021-05-11  9:34 ` jakub at gcc dot gnu.org
2021-05-12  8:40 ` cvs-commit at gcc dot gnu.org
2021-05-12 13:25 ` cvs-commit at gcc dot gnu.org
2021-05-12 13:25 ` jakub at gcc dot gnu.org
2022-05-10  8:17 ` cvs-commit at gcc dot gnu.org
2022-05-11  6:19 ` cvs-commit at gcc dot gnu.org
2022-05-11  6:34 ` jakub at gcc dot gnu.org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-100508-4-Ww2HYVB0Ie@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).