public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/67139] New: [concepts] ICE on checking concepts with void
@ 2015-08-06 18:13 eric.niebler at gmail dot com
  2015-08-06 19:14 ` [Bug c++/67139] " eric.niebler at gmail dot com
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: eric.niebler at gmail dot com @ 2015-08-06 18:13 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 67139
           Summary: [concepts] ICE on checking concepts with void
           Product: gcc
           Version: c++-concepts
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: eric.niebler at gmail dot com
  Target Milestone: ---

Created attachment 36141
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=36141&action=edit
preprocessed source archive

Compile the attached code with -std=gnu++1z. The result is:

../cmcstl2/test/concepts/object.cpp:254:50: internal compiler error:
Segmentation fault
 CONCEPT_ASSERT(!models::move_constructible<void>());
                                                  ^

../cmcstl2/test/concepts/object.cpp:254:50: internal compiler error: Aborted
g++: internal compiler error: Aborted (program cc1plus)
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.

Cursory attempts to reduce the test case caused the error to go away.


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

* [Bug c++/67139] [concepts] ICE on checking concepts with void
  2015-08-06 18:13 [Bug c++/67139] New: [concepts] ICE on checking concepts with void eric.niebler at gmail dot com
@ 2015-08-06 19:14 ` eric.niebler at gmail dot com
  2015-08-06 19:16 ` [Bug c++/67139] [concepts] ICE on checking concepts with void with variable template eric.niebler at gmail dot com
  2015-08-07  4:54 ` jason at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: eric.niebler at gmail dot com @ 2015-08-06 19:14 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from Eric Niebler <eric.niebler at gmail dot com> ---
Thanks, except that that is invalid code, and this bug is an ICE-on-valid.
Here's the equivalent valid repro case:

template <class T>
constexpr typename T::type::value_type _v = T::type::value;

template <class T> concept bool IsTrue_() { return _v<T>; }

template <class T> concept bool Unpossible() {
  return IsTrue_<T &&>();
}

template <class> constexpr bool unpossible() { return false; }
Unpossible{ T }
constexpr bool unpossible() { return true; }

static_assert((!unpossible<void>()), "");


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

* [Bug c++/67139] [concepts] ICE on checking concepts with void with variable template
  2015-08-06 18:13 [Bug c++/67139] New: [concepts] ICE on checking concepts with void eric.niebler at gmail dot com
  2015-08-06 19:14 ` [Bug c++/67139] " eric.niebler at gmail dot com
@ 2015-08-06 19:16 ` eric.niebler at gmail dot com
  2015-08-07  4:54 ` jason at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: eric.niebler at gmail dot com @ 2015-08-06 19:16 UTC (permalink / raw)
  To: gcc-bugs

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

Eric Niebler <eric.niebler at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|[concepts] ICE on checking  |[concepts] ICE on checking
                   |concepts with void          |concepts with void with
                   |                            |variable template

--- Comment #3 from Eric Niebler <eric.niebler at gmail dot com> ---
The problem goes away when _v<T> is replaced with the equivalent T::type::value
in concept IsTrue_, so that seems to be the smoking gun.


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

* [Bug c++/67139] [concepts] ICE on checking concepts with void with variable template
  2015-08-06 18:13 [Bug c++/67139] New: [concepts] ICE on checking concepts with void eric.niebler at gmail dot com
  2015-08-06 19:14 ` [Bug c++/67139] " eric.niebler at gmail dot com
  2015-08-06 19:16 ` [Bug c++/67139] [concepts] ICE on checking concepts with void with variable template eric.niebler at gmail dot com
@ 2015-08-07  4:54 ` jason at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: jason at gcc dot gnu.org @ 2015-08-07  4:54 UTC (permalink / raw)
  To: gcc-bugs

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

Jason Merrill <jason at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED
           Assignee|unassigned at gcc dot gnu.org      |jason at gcc dot gnu.org

--- Comment #4 from Jason Merrill <jason at gcc dot gnu.org> ---
This seems to be fixed now.


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

end of thread, other threads:[~2015-08-07  4:54 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-08-06 18:13 [Bug c++/67139] New: [concepts] ICE on checking concepts with void eric.niebler at gmail dot com
2015-08-06 19:14 ` [Bug c++/67139] " eric.niebler at gmail dot com
2015-08-06 19:16 ` [Bug c++/67139] [concepts] ICE on checking concepts with void with variable template eric.niebler at gmail dot com
2015-08-07  4:54 ` jason 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).