public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/86002] ICE with requires in constexpr if condition
       [not found] <bug-86002-4@http.gcc.gnu.org/bugzilla/>
@ 2020-07-23 19:29 ` mpolacek at gcc dot gnu.org
  2020-09-17 20:14 ` cvs-commit at gcc dot gnu.org
  2020-09-17 20:18 ` mpolacek at gcc dot gnu.org
  2 siblings, 0 replies; 3+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2020-07-23 19:29 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |mpolacek at gcc dot gnu.org
           Assignee|unassigned at gcc dot gnu.org      |mpolacek at gcc dot gnu.org
     Ever confirmed|0                           |1
   Last reconfirmed|                            |2020-07-23
             Status|UNCONFIRMED                 |ASSIGNED

--- Comment #1 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
GCC 9 ICEs

86002.C: In instantiation of ‘int f(T) [with T = X]’:
86002.C:15:17:   required from here
86002.C:7:30: internal compiler error: in tsubst_copy, at cp/pt.c:15680
    7 |     if constexpr (requires { t.i; })
      |                              ^
0xa07611 tsubst_copy
        /home/mpolacek/src/gcc9/gcc/cp/pt.c:15680
0xa1dd78 tsubst_copy_and_build(tree_node*, tree_node*, int, tree_node*, bool,
bool)
        /home/mpolacek/src/gcc9/gcc/cp/pt.c:19676
0xa1e716 tsubst_copy_and_build(tree_node*, tree_node*, int, tree_node*, bool,
bool)
        /home/mpolacek/src/gcc9/gcc/cp/pt.c:19794
0xa16968 tsubst_non_call_postfix_expression
        /home/mpolacek/src/gcc9/gcc/cp/pt.c:18159
0xa1c97b tsubst_copy_and_build(tree_node*, tree_node*, int, tree_node*, bool,
bool)
        /home/mpolacek/src/gcc9/gcc/cp/pt.c:19455
0xa16347 tsubst_expr(tree_node*, tree_node*, int, tree_node*, bool)
        /home/mpolacek/src/gcc9/gcc/cp/pt.c:18067
0x8a018e tsubst_simple_requirement
        /home/mpolacek/src/gcc9/gcc/cp/constraint.cc:1778
0x8a018e tsubst_requirement
        /home/mpolacek/src/gcc9/gcc/cp/constraint.cc:1836
0x8a018e tsubst_requirement_body
        /home/mpolacek/src/gcc9/gcc/cp/constraint.cc:1859
0x8a018e tsubst_requires_expr(tree_node*, tree_node*, int, tree_node*)
        /home/mpolacek/src/gcc9/gcc/cp/constraint.cc:1891
0xa1e641 tsubst_copy_and_build(tree_node*, tree_node*, int, tree_node*, bool,
bool)
        /home/mpolacek/src/gcc9/gcc/cp/pt.c:19782
0xa16347 tsubst_expr(tree_node*, tree_node*, int, tree_node*, bool)
        /home/mpolacek/src/gcc9/gcc/cp/pt.c:18067
0xa11390 tsubst_expr(tree_node*, tree_node*, int, tree_node*, bool)
        /home/mpolacek/src/gcc9/gcc/cp/pt.c:17417
0xa11afb tsubst_expr(tree_node*, tree_node*, int, tree_node*, bool)
        /home/mpolacek/src/gcc9/gcc/cp/pt.c:17472
0xa34241 instantiate_decl(tree_node*, bool, bool)
        /home/mpolacek/src/gcc9/gcc/cp/pt.c:24975
0xa34c1a instantiate_pending_templates(int)
        /home/mpolacek/src/gcc9/gcc/cp/pt.c:25091
0x915c43 c_parse_final_cleanups()
        /home/mpolacek/src/gcc9/gcc/cp/decl2.c:4818

But GCC 10+ compiles it fine.

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

* [Bug c++/86002] ICE with requires in constexpr if condition
       [not found] <bug-86002-4@http.gcc.gnu.org/bugzilla/>
  2020-07-23 19:29 ` [Bug c++/86002] ICE with requires in constexpr if condition mpolacek at gcc dot gnu.org
@ 2020-09-17 20:14 ` cvs-commit at gcc dot gnu.org
  2020-09-17 20:18 ` mpolacek at gcc dot gnu.org
  2 siblings, 0 replies; 3+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2020-09-17 20:14 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 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:4f0aa5b051c0d3e81478bcb495e4e072b2d9827d

commit r11-3268-g4f0aa5b051c0d3e81478bcb495e4e072b2d9827d
Author: Marek Polacek <polacek@redhat.com>
Date:   Thu Sep 17 15:31:50 2020 -0400

    c++: Add tests for fixed PRs.

    Bugzilla inspection turned up a bunch of old(er) PRs that have been
    fixed.  Let's include them not to regress in the future.

    gcc/testsuite/ChangeLog:

            PR c++/87530
            PR c++/58156
            PR c++/68828
            PR c++/86002
            PR c++/91525
            PR c++/96223
            PR c++/87032
            PR c++/35098
            * g++.dg/cpp0x/move-return4.C: New test.
            * g++.dg/cpp0x/vt-58156.C: New test.
            * g++.dg/cpp2a/concepts-pr68828.C: New test.
            * g++.dg/cpp2a/concepts-pr86002.C: New test.
            * g++.dg/cpp2a/concepts-pr91525.C: New test.
            * g++.dg/cpp2a/constexpr-indeterminate1.C: New test.
            * g++.dg/cpp2a/desig17.C: New test.
            * g++.dg/ext/attrib62.C: New test.

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

* [Bug c++/86002] ICE with requires in constexpr if condition
       [not found] <bug-86002-4@http.gcc.gnu.org/bugzilla/>
  2020-07-23 19:29 ` [Bug c++/86002] ICE with requires in constexpr if condition mpolacek at gcc dot gnu.org
  2020-09-17 20:14 ` cvs-commit at gcc dot gnu.org
@ 2020-09-17 20:18 ` mpolacek at gcc dot gnu.org
  2 siblings, 0 replies; 3+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2020-09-17 20:18 UTC (permalink / raw)
  To: gcc-bugs

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

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

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

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

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

end of thread, other threads:[~2020-09-17 20:18 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-86002-4@http.gcc.gnu.org/bugzilla/>
2020-07-23 19:29 ` [Bug c++/86002] ICE with requires in constexpr if condition mpolacek at gcc dot gnu.org
2020-09-17 20:14 ` cvs-commit at gcc dot gnu.org
2020-09-17 20:18 ` 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).