public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/87765] Internal compiler error: coerce_template_parms (8.2) or cxx_eval_constant_expression (trunk)
       [not found] <bug-87765-4@http.gcc.gnu.org/bugzilla/>
@ 2020-07-23 18:00 ` mpolacek at gcc dot gnu.org
  2020-11-10 20:03 ` 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 @ 2020-07-23 18:00 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |mpolacek at gcc dot gnu.org

--- Comment #5 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
Since r10-6416 the test in Comment 4 no longer ICEs:

87765.C: In function ‘constexpr void t(X)’:
87765.C:3:51: error: call to non-‘constexpr’ function ‘int X::s()’
    3 | template<int> static constexpr void t(X x) { Y<x.s()> v;}
      |                                                ~~~^~
87765.C:3:51: note: in template argument for type ‘int’

The original test, however, still ICEs.

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

* [Bug c++/87765] Internal compiler error: coerce_template_parms (8.2) or cxx_eval_constant_expression (trunk)
       [not found] <bug-87765-4@http.gcc.gnu.org/bugzilla/>
  2020-07-23 18:00 ` [Bug c++/87765] Internal compiler error: coerce_template_parms (8.2) or cxx_eval_constant_expression (trunk) mpolacek at gcc dot gnu.org
@ 2020-11-10 20:03 ` cvs-commit at gcc dot gnu.org
  2021-05-18 14:52 ` mpolacek at gcc dot gnu.org
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 5+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2020-11-10 20:03 UTC (permalink / raw)
  To: gcc-bugs

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

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

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

commit r11-4890-ga210d404d08e363af4b2e2a60986c3cb08f8ebc5
Author: Marek Polacek <polacek@redhat.com>
Date:   Tue Nov 10 14:57:19 2020 -0500

    c++: Add 5 unfixed tests.

    A couple of dg-ice tests.

    gcc/testsuite/ChangeLog:

            PR c++/52830
            PR c++/88982
            PR c++/90799
            PR c++/87765
            PR c++/89565
            * g++.dg/cpp0x/constexpr-52830.C: New test.
            * g++.dg/cpp0x/vt-88982.C: New test.
            * g++.dg/cpp1z/class-deduction76.C: New test.
            * g++.dg/cpp1z/constexpr-lambda26.C: New test.
            * g++.dg/cpp2a/nontype-class39.C: New test.

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

* [Bug c++/87765] Internal compiler error: coerce_template_parms (8.2) or cxx_eval_constant_expression (trunk)
       [not found] <bug-87765-4@http.gcc.gnu.org/bugzilla/>
  2020-07-23 18:00 ` [Bug c++/87765] Internal compiler error: coerce_template_parms (8.2) or cxx_eval_constant_expression (trunk) mpolacek at gcc dot gnu.org
  2020-11-10 20:03 ` cvs-commit at gcc dot gnu.org
@ 2021-05-18 14:52 ` mpolacek at gcc dot gnu.org
  2022-12-17 16:25 ` cvs-commit at gcc dot gnu.org
  2022-12-17 16:25 ` ppalka at gcc dot gnu.org
  4 siblings, 0 replies; 5+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2021-05-18 14:52 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |ebotcazou at gcc dot gnu.org

--- Comment #7 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
*** Bug 100649 has been marked as a duplicate of this bug. ***

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

* [Bug c++/87765] Internal compiler error: coerce_template_parms (8.2) or cxx_eval_constant_expression (trunk)
       [not found] <bug-87765-4@http.gcc.gnu.org/bugzilla/>
                   ` (2 preceding siblings ...)
  2021-05-18 14:52 ` mpolacek at gcc dot gnu.org
@ 2022-12-17 16:25 ` cvs-commit at gcc dot gnu.org
  2022-12-17 16:25 ` ppalka at gcc dot gnu.org
  4 siblings, 0 replies; 5+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2022-12-17 16:25 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #8 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Patrick Palka <ppalka@gcc.gnu.org>:

https://gcc.gnu.org/g:982629bea416df976686467f235e09cb1a5531cc

commit r13-4761-g982629bea416df976686467f235e09cb1a5531cc
Author: Patrick Palka <ppalka@redhat.com>
Date:   Sat Dec 17 11:24:44 2022 -0500

    c++: constantness of non-dependent NTTP argument [PR107437]

    Here we're rejecting the use of the lambda capture of 't' (of empty
    type) as a template argument ultimately because convert_nontype_argument
    checks constantness using is_constant_expression, which returns false
    for lambda captures since want_rval=false.  But in this case I believe
    an lvalue-to-rvalue conversion of the argument is implied, so we should
    be using is_rvalue_constant_expression instead (which would return true
    here).

    However, it doesn't seem necessary to consider constantness at all
    when deciding whether to instantiate a non-dependent argument in
    convert_nontype_argument.  So this patch gets rid of the problematic
    constantness test altogether, which incidentally also fixes the similar
    dg-ice'd testcase from PR87765.  This is in line with a similar
    change we made to finish_decltype_type in r12-7564-gec0f53a3a542e7.

            PR c++/107437
            PR c++/87765

    gcc/cp/ChangeLog:

            * pt.cc (convert_nontype_argument): Relax is_nondep_const_expr
            test to !inst_dep_expr_p.

    gcc/testsuite/ChangeLog:

            * g++.dg/cpp1y/lambda-generic-107437.C: New test.
            * g++.dg/cpp1z/constexpr-lambda26.C: Remove dg-ice.

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

* [Bug c++/87765] Internal compiler error: coerce_template_parms (8.2) or cxx_eval_constant_expression (trunk)
       [not found] <bug-87765-4@http.gcc.gnu.org/bugzilla/>
                   ` (3 preceding siblings ...)
  2022-12-17 16:25 ` cvs-commit at gcc dot gnu.org
@ 2022-12-17 16:25 ` ppalka at gcc dot gnu.org
  4 siblings, 0 replies; 5+ messages in thread
From: ppalka at gcc dot gnu.org @ 2022-12-17 16:25 UTC (permalink / raw)
  To: gcc-bugs

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

Patrick Palka <ppalka at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |13.0
         Resolution|---                         |FIXED
                 CC|                            |ppalka at gcc dot gnu.org
             Status|NEW                         |RESOLVED
           Assignee|unassigned at gcc dot gnu.org      |ppalka at gcc dot gnu.org

--- Comment #9 from Patrick Palka <ppalka at gcc dot gnu.org> ---
Fixed for GCC 13

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

end of thread, other threads:[~2022-12-17 16:25 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-87765-4@http.gcc.gnu.org/bugzilla/>
2020-07-23 18:00 ` [Bug c++/87765] Internal compiler error: coerce_template_parms (8.2) or cxx_eval_constant_expression (trunk) mpolacek at gcc dot gnu.org
2020-11-10 20:03 ` cvs-commit at gcc dot gnu.org
2021-05-18 14:52 ` mpolacek at gcc dot gnu.org
2022-12-17 16:25 ` cvs-commit at gcc dot gnu.org
2022-12-17 16:25 ` ppalka 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).