public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/109030] New: ICE in cxx_eval_call_expression with aggregate initialization inside noexcept
@ 2023-03-05 19:34 ppalka at gcc dot gnu.org
  2023-03-05 19:36 ` [Bug c++/109030] [13 Regression] checking " ppalka at gcc dot gnu.org
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: ppalka at gcc dot gnu.org @ 2023-03-05 19:34 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 109030
           Summary: ICE in cxx_eval_call_expression with aggregate
                    initialization inside noexcept
           Product: gcc
           Version: 13.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: ppalka at gcc dot gnu.org
  Target Milestone: ---

$ cat test_execute.ii
struct foo { };

struct __as_receiver {
  foo empty_env;
};

void sched(foo __fun) noexcept(noexcept(__as_receiver{__fun})) { }

$ g++ test_execute.ii
test_execute.ii:7:60: internal compiler error: in cxx_eval_call_expression, at
cp/constexpr.cc:2871
    7 | void sched(foo __fun) noexcept(noexcept(__as_receiver{__fun})) { }
      |                                                            ^

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

* [Bug c++/109030] [13 Regression] checking ICE in cxx_eval_call_expression with aggregate initialization inside noexcept
  2023-03-05 19:34 [Bug c++/109030] New: ICE in cxx_eval_call_expression with aggregate initialization inside noexcept ppalka at gcc dot gnu.org
@ 2023-03-05 19:36 ` ppalka at gcc dot gnu.org
  2023-03-06 14:39 ` mpolacek at gcc dot gnu.org
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: ppalka at gcc dot gnu.org @ 2023-03-05 19:36 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |mpolacek at gcc dot gnu.org
           Keywords|                            |ice-checking,
                   |                            |ice-on-valid-code
            Summary|ICE in                      |[13 Regression] checking
                   |cxx_eval_call_expression    |ICE in
                   |with aggregate              |cxx_eval_call_expression
                   |initialization inside       |with aggregate
                   |noexcept                    |initialization inside
                   |                            |noexcept
           See Also|                            |https://gcc.gnu.org/bugzill
                   |                            |a/show_bug.cgi?id=101073
   Target Milestone|---                         |13.0
      Known to fail|                            |13.0
      Known to work|                            |12.2.0

--- Comment #1 from Patrick Palka <ppalka at gcc dot gnu.org> ---
Started with r13-6145-gb2287a4d9a640f

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

* [Bug c++/109030] [13 Regression] checking ICE in cxx_eval_call_expression with aggregate initialization inside noexcept
  2023-03-05 19:34 [Bug c++/109030] New: ICE in cxx_eval_call_expression with aggregate initialization inside noexcept ppalka at gcc dot gnu.org
  2023-03-05 19:36 ` [Bug c++/109030] [13 Regression] checking " ppalka at gcc dot gnu.org
@ 2023-03-06 14:39 ` mpolacek at gcc dot gnu.org
  2023-03-07 15:14 ` cvs-commit at gcc dot gnu.org
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2023-03-06 14:39 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Last reconfirmed|                            |2023-03-06
     Ever confirmed|0                           |1
           Assignee|unassigned at gcc dot gnu.org      |mpolacek at gcc dot gnu.org
           Priority|P3                          |P1
             Status|UNCONFIRMED                 |ASSIGNED

--- Comment #2 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
Mine thus.

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

* [Bug c++/109030] [13 Regression] checking ICE in cxx_eval_call_expression with aggregate initialization inside noexcept
  2023-03-05 19:34 [Bug c++/109030] New: ICE in cxx_eval_call_expression with aggregate initialization inside noexcept ppalka at gcc dot gnu.org
  2023-03-05 19:36 ` [Bug c++/109030] [13 Regression] checking " ppalka at gcc dot gnu.org
  2023-03-06 14:39 ` mpolacek at gcc dot gnu.org
@ 2023-03-07 15:14 ` cvs-commit at gcc dot gnu.org
  2023-03-07 15:15 ` mpolacek at gcc dot gnu.org
  2023-03-16 18:47 ` cvs-commit at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2023-03-07 15:14 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 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:e4692319fd5fc7d740436e8bb338f44cb8df6c58

commit r13-6526-ge4692319fd5fc7d740436e8bb338f44cb8df6c58
Author: Marek Polacek <polacek@redhat.com>
Date:   Mon Mar 6 18:06:39 2023 -0500

    c++: noexcept and copy elision [PR109030]

    When processing a noexcept, constructors aren't elided: build_over_call
    has
             /* It's unsafe to elide the constructor when handling
                a noexcept-expression, it may evaluate to the wrong
                value (c++/53025).  */
             && (force_elide || cp_noexcept_operand == 0))
    so the assert I added recently needs to be relaxed a little bit.

            PR c++/109030

    gcc/cp/ChangeLog:

            * constexpr.cc (cxx_eval_call_expression): Relax assert.

    gcc/testsuite/ChangeLog:

            * g++.dg/cpp0x/noexcept77.C: New test.

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

* [Bug c++/109030] [13 Regression] checking ICE in cxx_eval_call_expression with aggregate initialization inside noexcept
  2023-03-05 19:34 [Bug c++/109030] New: ICE in cxx_eval_call_expression with aggregate initialization inside noexcept ppalka at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2023-03-07 15:14 ` cvs-commit at gcc dot gnu.org
@ 2023-03-07 15:15 ` mpolacek at gcc dot gnu.org
  2023-03-16 18:47 ` cvs-commit at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2023-03-07 15:15 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |FIXED
             Status|ASSIGNED                    |RESOLVED

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

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

* [Bug c++/109030] [13 Regression] checking ICE in cxx_eval_call_expression with aggregate initialization inside noexcept
  2023-03-05 19:34 [Bug c++/109030] New: ICE in cxx_eval_call_expression with aggregate initialization inside noexcept ppalka at gcc dot gnu.org
                   ` (3 preceding siblings ...)
  2023-03-07 15:15 ` mpolacek at gcc dot gnu.org
@ 2023-03-16 18:47 ` cvs-commit at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2023-03-16 18:47 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #5 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:31cdfdef04701e10cffcec4578b2337684f0e4bc

commit r13-6716-g31cdfdef04701e10cffcec4578b2337684f0e4bc
Author: Patrick Palka <ppalka@redhat.com>
Date:   Thu Mar 16 14:47:43 2023 -0400

    c++: maybe_constant_init and unevaluated operands [PR109030]

    This testcase in this PR (already fixed by r13-6526-ge4692319fd5fc7)
    demonstrates that maybe_constant_init can be called on an unevaluated
    operand (e.g. from massage_init_elt) so this entry point should also
    limit constant evaluation in that case, like maybe_constant_value does.

            PR c++/109030

    gcc/cp/ChangeLog:

            * constexpr.cc (maybe_constant_init_1): For an unevaluated
            non-manifestly-constant operand, don't constant evaluate
            and instead call fold_to_constant as in maybe_constant_value.

    gcc/testsuite/ChangeLog:

            * g++.dg/cpp2a/constexpr-inst2.C: New test.

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

end of thread, other threads:[~2023-03-16 18:47 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-05 19:34 [Bug c++/109030] New: ICE in cxx_eval_call_expression with aggregate initialization inside noexcept ppalka at gcc dot gnu.org
2023-03-05 19:36 ` [Bug c++/109030] [13 Regression] checking " ppalka at gcc dot gnu.org
2023-03-06 14:39 ` mpolacek at gcc dot gnu.org
2023-03-07 15:14 ` cvs-commit at gcc dot gnu.org
2023-03-07 15:15 ` mpolacek at gcc dot gnu.org
2023-03-16 18:47 ` cvs-commit 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).