public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/101719] New: "Already defined" error in case of function specialization with concept
@ 2021-08-02  9:17 fchelnokov at gmail dot com
  2021-08-02  9:29 ` [Bug c++/101719] " redi at gcc dot gnu.org
  0 siblings, 1 reply; 2+ messages in thread
From: fchelnokov at gmail dot com @ 2021-08-02  9:17 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 101719
           Summary: "Already defined" error in case of function
                    specialization with concept
           Product: gcc
           Version: 11.1.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: fchelnokov at gmail dot com
  Target Milestone: ---

The following correct code:
```
#include <iostream>

constexpr int p(auto) { return 0; }
constexpr int q() { return p(0); }
constexpr int p(auto) requires true { return 1; }

static_assert(p(0) == 1);
static_assert(q() == 0);

int main()
{
    std::cout << q() << p(0) << '\n';
}
```
produces the error
```
Error: symbol `_Z1pIiEiT_' is already defined
```

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

* [Bug c++/101719] "Already defined" error in case of function specialization with concept
  2021-08-02  9:17 [Bug c++/101719] New: "Already defined" error in case of function specialization with concept fchelnokov at gmail dot com
@ 2021-08-02  9:29 ` redi at gcc dot gnu.org
  0 siblings, 0 replies; 2+ messages in thread
From: redi at gcc dot gnu.org @ 2021-08-02  9:29 UTC (permalink / raw)
  To: gcc-bugs

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

Jonathan Wakely <redi at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|---                         |DUPLICATE

--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> ---
The ABI doesn't specify how to mangle constraints.

*** This bug has been marked as a duplicate of bug 100825 ***

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

end of thread, other threads:[~2021-08-02  9:29 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-02  9:17 [Bug c++/101719] New: "Already defined" error in case of function specialization with concept fchelnokov at gmail dot com
2021-08-02  9:29 ` [Bug c++/101719] " redi 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).