public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/106675] [10/11/12/13 Regression] g++ crashes on funky operators
       [not found] <bug-106675-4@http.gcc.gnu.org/bugzilla/>
@ 2023-02-10 18:55 ` mpolacek at gcc dot gnu.org
  2023-02-15  0:05 ` cvs-commit at gcc dot gnu.org
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 5+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2023-02-10 18:55 UTC (permalink / raw)
  To: gcc-bugs

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

Marek Polacek <mpolacek at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |mpolacek at gcc dot gnu.org
             Status|NEW                         |ASSIGNED
           Assignee|unassigned at gcc dot gnu.org      |mpolacek at gcc dot gnu.org

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug c++/106675] [10/11/12/13 Regression] g++ crashes on funky operators
       [not found] <bug-106675-4@http.gcc.gnu.org/bugzilla/>
  2023-02-10 18:55 ` [Bug c++/106675] [10/11/12/13 Regression] g++ crashes on funky operators mpolacek at gcc dot gnu.org
@ 2023-02-15  0:05 ` cvs-commit at gcc dot gnu.org
  2023-02-15  0:09 ` cvs-commit at gcc dot gnu.org
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 5+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2023-02-15  0:05 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The trunk branch has been updated by Marek Polacek <mpolacek@gcc.gnu.org>:

https://gcc.gnu.org/g:cce62625025380c2ea2a220deb10f8f355f83abf

commit r13-5990-gcce62625025380c2ea2a220deb10f8f355f83abf
Author: Marek Polacek <polacek@redhat.com>
Date:   Fri Feb 10 17:26:57 2023 -0500

    c++: fix ICE in joust_maybe_elide_copy [PR106675]

    joust_maybe_elide_copy checks that the last conversion in the ICS for
    the first argument is ck_ref_bind, which is reasonable, because we've
    checked that we're dealing with a copy/move constructor.  But it can
    also happen that we couldn't figure out which conversion function is
    better to convert the argument, as in this testcase: joust couldn't
    decide if we should go with

      operator foo &()

    or

      operator foo const &()

    so we get a ck_ambig, which then upsets joust_maybe_elide_copy.  Since
    a ck_ambig can validly occur, I think we should just return early, as
    in the patch below.

            PR c++/106675

    gcc/cp/ChangeLog:

            * call.cc (joust_maybe_elide_copy): Return false for ck_ambig.

    gcc/testsuite/ChangeLog:

            * g++.dg/cpp0x/overload-conv-5.C: New test.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug c++/106675] [10/11/12/13 Regression] g++ crashes on funky operators
       [not found] <bug-106675-4@http.gcc.gnu.org/bugzilla/>
  2023-02-10 18:55 ` [Bug c++/106675] [10/11/12/13 Regression] g++ crashes on funky operators mpolacek at gcc dot gnu.org
  2023-02-15  0:05 ` cvs-commit at gcc dot gnu.org
@ 2023-02-15  0:09 ` cvs-commit at gcc dot gnu.org
  2023-02-15  0:09 ` cvs-commit at gcc dot gnu.org
  2023-02-15  0:09 ` [Bug c++/106675] [10 " mpolacek at gcc dot gnu.org
  4 siblings, 0 replies; 5+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2023-02-15  0:09 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #5 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-12 branch has been updated by Marek Polacek
<mpolacek@gcc.gnu.org>:

https://gcc.gnu.org/g:1721d85708116a1edbe5ba30f055d47e6c1e29b6

commit r12-9174-g1721d85708116a1edbe5ba30f055d47e6c1e29b6
Author: Marek Polacek <polacek@redhat.com>
Date:   Fri Feb 10 17:26:57 2023 -0500

    c++: fix ICE in joust_maybe_elide_copy [PR106675]

    joust_maybe_elide_copy checks that the last conversion in the ICS for
    the first argument is ck_ref_bind, which is reasonable, because we've
    checked that we're dealing with a copy/move constructor.  But it can
    also happen that we couldn't figure out which conversion function is
    better to convert the argument, as in this testcase: joust couldn't
    decide if we should go with

      operator foo &()

    or

      operator foo const &()

    so we get a ck_ambig, which then upsets joust_maybe_elide_copy.  Since
    a ck_ambig can validly occur, I think we should just return early, as
    in the patch below.

            PR c++/106675

    gcc/cp/ChangeLog:

            * call.cc (joust_maybe_elide_copy): Return false for ck_ambig.

    gcc/testsuite/ChangeLog:

            * g++.dg/cpp0x/overload-conv-5.C: New test.

    (cherry picked from commit cce62625025380c2ea2a220deb10f8f355f83abf)

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug c++/106675] [10/11/12/13 Regression] g++ crashes on funky operators
       [not found] <bug-106675-4@http.gcc.gnu.org/bugzilla/>
                   ` (2 preceding siblings ...)
  2023-02-15  0:09 ` cvs-commit at gcc dot gnu.org
@ 2023-02-15  0:09 ` cvs-commit at gcc dot gnu.org
  2023-02-15  0:09 ` [Bug c++/106675] [10 " mpolacek at gcc dot gnu.org
  4 siblings, 0 replies; 5+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2023-02-15  0:09 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #6 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-11 branch has been updated by Marek Polacek
<mpolacek@gcc.gnu.org>:

https://gcc.gnu.org/g:53512f0055186d5556e9859c1f8beb25d2d28530

commit r11-10525-g53512f0055186d5556e9859c1f8beb25d2d28530
Author: Marek Polacek <polacek@redhat.com>
Date:   Fri Feb 10 17:26:57 2023 -0500

    c++: fix ICE in joust_maybe_elide_copy [PR106675]

    joust_maybe_elide_copy checks that the last conversion in the ICS for
    the first argument is ck_ref_bind, which is reasonable, because we've
    checked that we're dealing with a copy/move constructor.  But it can
    also happen that we couldn't figure out which conversion function is
    better to convert the argument, as in this testcase: joust couldn't
    decide if we should go with

      operator foo &()

    or

      operator foo const &()

    so we get a ck_ambig, which then upsets joust_maybe_elide_copy.  Since
    a ck_ambig can validly occur, I think we should just return early, as
    in the patch below.

            PR c++/106675

    gcc/cp/ChangeLog:

            * call.c (joust_maybe_elide_copy): Return false for ck_ambig.

    gcc/testsuite/ChangeLog:

            * g++.dg/cpp0x/overload-conv-5.C: New test.

    (cherry picked from commit cce62625025380c2ea2a220deb10f8f355f83abf)

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug c++/106675] [10 Regression] g++ crashes on funky operators
       [not found] <bug-106675-4@http.gcc.gnu.org/bugzilla/>
                   ` (3 preceding siblings ...)
  2023-02-15  0:09 ` cvs-commit at gcc dot gnu.org
@ 2023-02-15  0:09 ` mpolacek at gcc dot gnu.org
  4 siblings, 0 replies; 5+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2023-02-15  0:09 UTC (permalink / raw)
  To: gcc-bugs

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

Marek Polacek <mpolacek at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |FIXED
            Summary|[10/11/12/13 Regression]    |[10 Regression] g++ crashes
                   |g++ crashes on funky        |on funky operators
                   |operators                   |
             Status|ASSIGNED                    |RESOLVED

--- Comment #7 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
Fixed.

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2023-02-15  0:09 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-106675-4@http.gcc.gnu.org/bugzilla/>
2023-02-10 18:55 ` [Bug c++/106675] [10/11/12/13 Regression] g++ crashes on funky operators mpolacek at gcc dot gnu.org
2023-02-15  0:05 ` cvs-commit at gcc dot gnu.org
2023-02-15  0:09 ` cvs-commit at gcc dot gnu.org
2023-02-15  0:09 ` cvs-commit at gcc dot gnu.org
2023-02-15  0:09 ` [Bug c++/106675] [10 " mpolacek at gcc dot gnu.org

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).