public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/95497] New: [11 Regression] ICE: concepts with a fully known / complete type in requires
@ 2020-06-03 12:53 gcc-bugs at marehr dot dialup.fu-berlin.de
  2020-06-03 13:39 ` [Bug c++/95497] " rguenth at gcc dot gnu.org
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: gcc-bugs at marehr dot dialup.fu-berlin.de @ 2020-06-03 12:53 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 95497
           Summary: [11 Regression] ICE: concepts with a fully known /
                    complete type in requires
           Product: gcc
           Version: 11.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: gcc-bugs at marehr dot dialup.fu-berlin.de
  Target Milestone: ---

Hello gcc-team,

the following code ICEs starting with gcc-11:

```c++
template <typename T>
struct A{};

template <typename T>
concept c =
    requires(T t, A<int> b) // note that A<int> is independent of T
    {
        { t += b };
    };
```

https://godbolt.org/z/pQI1ee

Thank you!

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

* [Bug c++/95497] [11 Regression] ICE: concepts with a fully known / complete type in requires
  2020-06-03 12:53 [Bug c++/95497] New: [11 Regression] ICE: concepts with a fully known / complete type in requires gcc-bugs at marehr dot dialup.fu-berlin.de
@ 2020-06-03 13:39 ` rguenth at gcc dot gnu.org
  2020-06-04 17:02 ` ppalka at gcc dot gnu.org
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: rguenth at gcc dot gnu.org @ 2020-06-03 13:39 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |11.0
                 CC|                            |iains at gcc dot gnu.org

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

* [Bug c++/95497] [11 Regression] ICE: concepts with a fully known / complete type in requires
  2020-06-03 12:53 [Bug c++/95497] New: [11 Regression] ICE: concepts with a fully known / complete type in requires gcc-bugs at marehr dot dialup.fu-berlin.de
  2020-06-03 13:39 ` [Bug c++/95497] " rguenth at gcc dot gnu.org
@ 2020-06-04 17:02 ` ppalka at gcc dot gnu.org
  2020-07-06 20:02 ` ppalka at gcc dot gnu.org
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: ppalka at gcc dot gnu.org @ 2020-06-04 17:02 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever confirmed|0                           |1
   Last reconfirmed|                            |2020-06-04
                 CC|                            |jason at gcc dot gnu.org,
                   |                            |ppalka at gcc dot gnu.org

--- Comment #1 from Patrick Palka <ppalka at gcc dot gnu.org> ---
Confirmed.  Started with r11-557.

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

* [Bug c++/95497] [11 Regression] ICE: concepts with a fully known / complete type in requires
  2020-06-03 12:53 [Bug c++/95497] New: [11 Regression] ICE: concepts with a fully known / complete type in requires gcc-bugs at marehr dot dialup.fu-berlin.de
  2020-06-03 13:39 ` [Bug c++/95497] " rguenth at gcc dot gnu.org
  2020-06-04 17:02 ` ppalka at gcc dot gnu.org
@ 2020-07-06 20:02 ` ppalka at gcc dot gnu.org
  2020-07-08 18:19 ` cvs-commit at gcc dot gnu.org
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: ppalka at gcc dot gnu.org @ 2020-07-06 20:02 UTC (permalink / raw)
  To: gcc-bugs

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

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

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

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

* [Bug c++/95497] [11 Regression] ICE: concepts with a fully known / complete type in requires
  2020-06-03 12:53 [Bug c++/95497] New: [11 Regression] ICE: concepts with a fully known / complete type in requires gcc-bugs at marehr dot dialup.fu-berlin.de
                   ` (2 preceding siblings ...)
  2020-07-06 20:02 ` ppalka at gcc dot gnu.org
@ 2020-07-08 18:19 ` cvs-commit at gcc dot gnu.org
  2020-07-08 18:21 ` ppalka at gcc dot gnu.org
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2020-07-08 18:19 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 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:9eb7d0d76eb652caa9186766da4fe965f113b1b8

commit r11-1947-g9eb7d0d76eb652caa9186766da4fe965f113b1b8
Author: Patrick Palka <ppalka@redhat.com>
Date:   Wed Jul 8 14:17:47 2020 -0400

    c++: ICE in is_really_empty_class [PR95497]

    We are ICEing in the testcase below because we pass the
    yet-uninstantiated class type A<int> of the PARM_DECL b to
    is_really_empty_class from is_rvalue_constant_expression when parsing
    the requirement t += b.

    This patch fixes the ICE by guarding the problematic call to
    is_really_empty_class with a COMPLETE_TYPE_P check, which should also
    subsume the existing dependent_type_p check.

    gcc/cp/ChangeLog:

            PR c++/95497
            * constexpr.c (potential_constant_expression_1) <case PARM_DECL>:
            When processing_template_decl, check COMPLETE_TYPE_P before
            calling is_really_empty_class.  Don't check dependent_type_p.

    gcc/testsuite/ChangeLog:

            PR c++/95497
            * g++.dg/cpp2a/concepts-pr95497.C: New test.

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

* [Bug c++/95497] [11 Regression] ICE: concepts with a fully known / complete type in requires
  2020-06-03 12:53 [Bug c++/95497] New: [11 Regression] ICE: concepts with a fully known / complete type in requires gcc-bugs at marehr dot dialup.fu-berlin.de
                   ` (3 preceding siblings ...)
  2020-07-08 18:19 ` cvs-commit at gcc dot gnu.org
@ 2020-07-08 18:21 ` ppalka at gcc dot gnu.org
  2020-07-08 18:21 ` gcc-bugs at marehr dot dialup.fu-berlin.de
  2020-07-09 17:51 ` cvs-commit at gcc dot gnu.org
  6 siblings, 0 replies; 8+ messages in thread
From: ppalka at gcc dot gnu.org @ 2020-07-08 18:21 UTC (permalink / raw)
  To: gcc-bugs

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

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

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

--- Comment #3 from Patrick Palka <ppalka at gcc dot gnu.org> ---
Should be fixed now, thanks for the report.

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

* [Bug c++/95497] [11 Regression] ICE: concepts with a fully known / complete type in requires
  2020-06-03 12:53 [Bug c++/95497] New: [11 Regression] ICE: concepts with a fully known / complete type in requires gcc-bugs at marehr dot dialup.fu-berlin.de
                   ` (4 preceding siblings ...)
  2020-07-08 18:21 ` ppalka at gcc dot gnu.org
@ 2020-07-08 18:21 ` gcc-bugs at marehr dot dialup.fu-berlin.de
  2020-07-09 17:51 ` cvs-commit at gcc dot gnu.org
  6 siblings, 0 replies; 8+ messages in thread
From: gcc-bugs at marehr dot dialup.fu-berlin.de @ 2020-07-08 18:21 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from gcc-bugs at marehr dot dialup.fu-berlin.de ---
Thank you for fixing!

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

* [Bug c++/95497] [11 Regression] ICE: concepts with a fully known / complete type in requires
  2020-06-03 12:53 [Bug c++/95497] New: [11 Regression] ICE: concepts with a fully known / complete type in requires gcc-bugs at marehr dot dialup.fu-berlin.de
                   ` (5 preceding siblings ...)
  2020-07-08 18:21 ` gcc-bugs at marehr dot dialup.fu-berlin.de
@ 2020-07-09 17:51 ` cvs-commit at gcc dot gnu.org
  6 siblings, 0 replies; 8+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2020-07-09 17:51 UTC (permalink / raw)
  To: gcc-bugs

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

--- 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:614662064ad4993a2aaecf190e7399ac5279e78e

commit r11-1971-g614662064ad4993a2aaecf190e7399ac5279e78e
Author: Patrick Palka <ppalka@redhat.com>
Date:   Thu Jul 9 13:47:13 2020 -0400

    c++: Partially revert fix for PR c++/95497 [PR96132]

    I was mistaken to assume that a dependent type is necessarily
    incomplete, and indeed there are multiple places in the frontend where
    we check a type for both dependency and completeness.  So this patch
    partially reverts the fix for PR95497, restoring the dependent_type_p
    check that guarded the call to is_really_empty_class below.

    gcc/cp/ChangeLog:

            PR c++/96132
            * constexpr.c (potential_constant_expression_1) <case PARM_DECL>:
            Restore dependent_type_p check that guarded the call to
            is_really_empty_class.

    gcc/testsuite/ChangeLog:

            PR c++/96132
            * g++.dg/template/incomplete12.C: New test.

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

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

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-03 12:53 [Bug c++/95497] New: [11 Regression] ICE: concepts with a fully known / complete type in requires gcc-bugs at marehr dot dialup.fu-berlin.de
2020-06-03 13:39 ` [Bug c++/95497] " rguenth at gcc dot gnu.org
2020-06-04 17:02 ` ppalka at gcc dot gnu.org
2020-07-06 20:02 ` ppalka at gcc dot gnu.org
2020-07-08 18:19 ` cvs-commit at gcc dot gnu.org
2020-07-08 18:21 ` ppalka at gcc dot gnu.org
2020-07-08 18:21 ` gcc-bugs at marehr dot dialup.fu-berlin.de
2020-07-09 17:51 ` 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).