public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/116477] New: ICE in instantiate_decl, instead of "cannot use concept as function"
@ 2024-08-24 15:48 michael at cadilhac dot name
  2024-09-04 17:57 ` [Bug c++/116477] " ppalka at gcc dot gnu.org
  0 siblings, 1 reply; 2+ messages in thread
From: michael at cadilhac dot name @ 2024-08-24 15:48 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 116477
           Summary: ICE in instantiate_decl, instead of "cannot use
                    concept as function"
           Product: gcc
           Version: 14.2.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: michael at cadilhac dot name
  Target Milestone: ---

This appears from 10.1 to current trunk, according to Godbolt.

Source:

--- file.cc

#include <concepts>

template <typename G>
bool run () {
    return std::regular<G> (G{});
}

int main () {
  run<int> ();
}
---

Compile:

---
$ g++ --version
g++ (GCC) 14.2.1 20240805
Copyright (C) 2024 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

$ g++ file.cc -std=c++20
b.cc: In instantiation of ‘bool run() [with G = int]’:
b.cc:9:12:   required from here
    9 |   run<int> ();
      |   ~~~~~~~~~^~
b.cc:5:28: internal compiler error: in tsubst_expr, at cp/pt.cc:21118
    5 |     return std::regular<G> (G{});
      |            ~~~~~~~~~~~~~~~~^~~~~
0x21a7bea internal_error(char const*, ...)
        ???:0
0x703e99 fancy_abort(char const*, int, char const*)
        ???:0
0x8ca115 instantiate_decl(tree_node*, bool, bool)
        ???:0
0x8f0103 instantiate_pending_templates(int)
        ???:0
0x7ce561 c_parse_final_cleanups()
        ???:0
0x9cc18a c_common_parse_file()
        ???:0
Please submit a full bug report, with preprocessed source (by using
-freport-bug).
Please include the complete backtrace with any bug report.
See <https://gitlab.archlinux.org/archlinux/packaging/packages/gcc/-/issues>
for instructions.
$ 
---

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

* [Bug c++/116477] ICE in instantiate_decl, instead of "cannot use concept as function"
  2024-08-24 15:48 [Bug c++/116477] New: ICE in instantiate_decl, instead of "cannot use concept as function" michael at cadilhac dot name
@ 2024-09-04 17:57 ` ppalka at gcc dot gnu.org
  0 siblings, 0 replies; 2+ messages in thread
From: ppalka at gcc dot gnu.org @ 2024-09-04 17:57 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |easyhack
   Last reconfirmed|                            |2024-09-04
     Ever confirmed|0                           |1
             Status|UNCONFIRMED                 |NEW
                 CC|                            |ppalka at gcc dot gnu.org

--- Comment #1 from Patrick Palka <ppalka at gcc dot gnu.org> ---
Confirmed.  The "cannot use concept as function" diagnostic should probably be
moved up in finish_call_expr, to happen before the type dependence early exit.

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

end of thread, other threads:[~2024-09-04 17:57 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-08-24 15:48 [Bug c++/116477] New: ICE in instantiate_decl, instead of "cannot use concept as function" michael at cadilhac dot name
2024-09-04 17:57 ` [Bug c++/116477] " 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).