public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "msebor at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/101597] [12 Regression] ICE in pretty-printer formatting an OBJ_TYPE_REF since r12-2132-ga110855667782dac
Date: Fri, 23 Jul 2021 17:15:43 +0000	[thread overview]
Message-ID: <bug-101597-4-ruYTZdoQay@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-101597-4@http.gcc.gnu.org/bugzilla/>

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

Martin Sebor <msebor at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
          Component|tree-optimization           |c++
            Summary|[12 Regression] ICE in evrp |[12 Regression] ICE in
                   |since                       |pretty-printer formatting
                   |r12-2132-ga110855667782dac  |an OBJ_TYPE_REF since
                   |                            |r12-2132-ga110855667782dac

--- Comment #1 from Martin Sebor <msebor at gcc dot gnu.org> ---
The ICE happens in a call to inform(..., "...%qE...", allocfn) with allocfn set
to the OBJ_TYPE_REF argument below.  The pretty-printer winds up passing the
argument to resolve_virtual_fun_from_obj_type_ref() in cp/error.c which
computes a null pointer that it eventually dereferences.

The inform() call looks valid to me so the bug is most likely in the C++ frond
end's pretty-printer.

 <obj_type_ref 0x7fffea9d3630
    type <pointer_type 0x7fffea987f18
        type <method_type 0x7fffea987bd0 type <pointer_type 0x7fffea981348>
            QI
            size <integer_cst 0x7fffea7f6fd8 constant 8>
            unit-size <integer_cst 0x7fffea816000 constant 1>
            align:8 warn_if_not_align:0 symtab:0 alias-set -1 canonical-type
0x7fffea987bd0 method basetype <record_type 0x7fffea96b690 PluginViewBase>
            arg-types <tree_list 0x7fffea9881e0 value <pointer_type
0x7fffea9879d8>
                chain <tree_list 0x7fffea9881b8 value <pointer_type
0x7fffea981348>
                    chain <tree_list 0x7fffea80a8e8 value <void_type
0x7fffea814f18 void>>>>
            pointer_to_this <pointer_type 0x7fffea987f18>>
        public unsigned DI
        size <integer_cst 0x7fffea7f6ee8 constant 64>
        unit-size <integer_cst 0x7fffea7f6f00 constant 8>
        align:64 warn_if_not_align:0 symtab:0 alias-set -1 canonical-type
0x7fffea987f18>

    arg:0 <ssa_name 0x7fffea9cc630
        type <pointer_type 0x7fffea952498 __vtbl_ptr_type type <function_type
0x7fffea9523f0>
            public unsigned type_6 DI size <integer_cst 0x7fffea7f6ee8 64>
unit-size <integer_cst 0x7fffea7f6f00 8>
            align:64 warn_if_not_align:0 symtab:0 alias-set 5 canonical-type
0x7fffea952498
            pointer_to_this <pointer_type 0x7fffea952690>>
        visited
        def_stmt _12 = *_11;
        version:12
        ptr-info 0x7fffea9d5f30>
    arg:1 <ssa_name 0x7fffea9cc558
        type <pointer_type 0x7fffea98f000 type <record_type 0x7fffea981540
Widget>
            public unsigned DI size <integer_cst 0x7fffea7f6ee8 64> unit-size
<integer_cst 0x7fffea7f6f00 8>
            align:64 warn_if_not_align:0 symtab:0 alias-set 7 canonical-type
0x7fffea98f000
            pointer_to_this <pointer_type 0x7fffea9a43f0>>

        def_stmt pluginScriptObjectFromPluginViewBase_pluginWidget.2_9 =
ASSERT_EXPR <pluginScriptObjectFromPluginViewBase_pluginWidget.2_10,
pluginScriptObjectFromPluginViewBase_pluginWidget.2_10 != 0B>;
        version:9
        ptr-info 0x7fffea9d9000>
    arg:2 <integer_cst 0x7fffea816288 type <integer_type 0x7fffea8145e8 int>
constant 0>>

  parent reply	other threads:[~2021-07-23 17:15 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-23 10:52 [Bug tree-optimization/101597] New: r12-2132-ga110855667782dac[12 Regression] ICE in evrp since marxin at gcc dot gnu.org
2021-07-23 10:53 ` [Bug tree-optimization/101597] [12 Regression] ICE in evrp since r12-2132-ga110855667782dac marxin at gcc dot gnu.org
2021-07-23 17:15 ` msebor at gcc dot gnu.org [this message]
2021-09-21 14:58 ` [Bug c++/101597] [12 Regression] ICE in pretty-printer formatting an OBJ_TYPE_REF " philip.herron at embecosm dot com
2021-11-15 14:57 ` jakub at gcc dot gnu.org
2021-11-15 15:40 ` jakub at gcc dot gnu.org
2021-12-30 16:14 ` jakub at gcc dot gnu.org
2021-12-30 16:23 ` jakub at gcc dot gnu.org
2022-01-11 18:22 ` cvs-commit at gcc dot gnu.org
2022-01-11 18:23 ` 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-101597-4-ruYTZdoQay@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).