public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "cvs-commit at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/108047] [13 Regression] ICE: unexpected expression of kind implicit_conv_expr since r13-4564-gd081807d8d70e3e8
Date: Mon, 09 Jan 2023 22:41:56 +0000	[thread overview]
Message-ID: <bug-108047-4-XgwQqLv5Nj@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-108047-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #11 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Jakub Jelinek <jakub@gcc.gnu.org>:

https://gcc.gnu.org/g:01ea66a6c56e53163d9430f4d87615d570848aa8

commit r13-5075-g01ea66a6c56e53163d9430f4d87615d570848aa8
Author: Jakub Jelinek <jakub@redhat.com>
Date:   Mon Jan 9 23:41:20 2023 +0100

    c++: Only do maybe_init_list_as_range optimization if
!processing_template_decl [PR108047]

    The last testcase in this patch ICEs, because
    maybe_init_list_as_range -> maybe_init_list_as_array
    calls maybe_constant_init in:
      /* Don't do this if the conversion would be constant.  */
      first = maybe_constant_init (first);
      if (TREE_CONSTANT (first))
        return NULL_TREE;
    but maybe_constant_init shouldn't be called when processing_template_decl.
    While we could replace that call with fold_non_dependent_init, my limited
    understanding is that this is an optimization and even if we don't optimize
    it when processing_template_decl, build_user_type_conversion_1 will be
    called again during instantiation with !processing_template_decl if it is
    every instantiated and we can do the optimization only then.

    2023-01-09  Jakub Jelinek  <jakub@redhat.com>

            PR c++/105838
            PR c++/108047
            PR c++/108266
            * call.cc (maybe_init_list_as_range): Always return NULL_TREE if
            processing_template_decl.

            * g++.dg/tree-ssa/initlist-opt2.C: New test.
            * g++.dg/tree-ssa/initlist-opt3.C: New test.

  parent reply	other threads:[~2023-01-09 22:41 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-10 11:38 [Bug c++/108047] New: ice: unexpected expression of kind implicit_conv_expr dcb314 at hotmail dot com
2022-12-11  8:32 ` [Bug c++/108047] " dcb314 at hotmail dot com
2022-12-11  8:57 ` dcb314 at hotmail dot com
2022-12-11  9:26 ` dcb314 at hotmail dot com
2022-12-12 12:06 ` slyfox at gcc dot gnu.org
2022-12-12 13:22 ` [Bug c++/108047] [13 Regression] ICE: unexpected expression of kind implicit_conv_expr since r13-4564-gd081807d8d70e3e8 marxin at gcc dot gnu.org
2022-12-12 16:39 ` pinskia at gcc dot gnu.org
2022-12-21 11:45 ` rguenth at gcc dot gnu.org
2022-12-21 22:19 ` slyfox at gcc dot gnu.org
2023-01-02 16:41 ` pinskia at gcc dot gnu.org
2023-01-06 11:20 ` jakub at gcc dot gnu.org
2023-01-06 18:50 ` pinskia at gcc dot gnu.org
2023-01-06 20:06 ` slyfox at gcc dot gnu.org
2023-01-09 22:41 ` cvs-commit at gcc dot gnu.org [this message]
2023-01-23 15:41 ` mpolacek at gcc dot gnu.org
2023-01-23 15:45 ` 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-108047-4-XgwQqLv5Nj@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).