public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libstdc++/102654] New: undefined reference to `std::variant<std::string_view >::variant<std::string_view, void, void, std::string_view, void>(std::string_view&&)'
@ 2021-10-08 15:56 hewillk at gmail dot com
  2021-10-08 17:01 ` [Bug libstdc++/102654] [11/12 Regression] " redi at gcc dot gnu.org
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: hewillk at gmail dot com @ 2021-10-08 15:56 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 102654
           Summary: undefined reference to `std::variant<std::string_view
                    >::variant<std::string_view, void, void,
                    std::string_view, void>(std::string_view&&)'
           Product: gcc
           Version: 12.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: libstdc++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: hewillk at gmail dot com
  Target Milestone: ---

The following code will generate an undefined reference error since gcc-11. I
don't know if this is a bug.

#include <variant>
#include <string_view>

struct my_variant : std::variant<std::string_view> { };
int main() {
  std::string_view s = "hello";
  my_variant v{s};
}

https://godbolt.org/z/zbjhe1hqE

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

* [Bug libstdc++/102654] [11/12 Regression] undefined reference to `std::variant<std::string_view >::variant<std::string_view, void, void, std::string_view, void>(std::string_view&&)'
  2021-10-08 15:56 [Bug libstdc++/102654] New: undefined reference to `std::variant<std::string_view >::variant<std::string_view, void, void, std::string_view, void>(std::string_view&&)' hewillk at gmail dot com
@ 2021-10-08 17:01 ` redi at gcc dot gnu.org
  2021-10-09 15:04 ` [Bug c++/102654] " ppalka at gcc dot gnu.org
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: redi at gcc dot gnu.org @ 2021-10-08 17:01 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
      Known to fail|                            |11.2.1, 12.0
            Summary|undefined reference to      |[11/12 Regression]
                   |`std::variant<std::string_v |undefined reference to
                   |iew                         |`std::variant<std::string_v
                   |>::variant<std::string_view |iew
                   |, void, void,               |>::variant<std::string_view
                   |std::string_view,           |, void, void,
                   |void>(std::string_view&&)'  |std::string_view,
                   |                            |void>(std::string_view&&)'
   Last reconfirmed|                            |2021-10-08
   Target Milestone|---                         |11.3
             Status|UNCONFIRMED                 |NEW
     Ever confirmed|0                           |1
      Known to work|                            |10.3.1

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

* [Bug c++/102654] [11/12 Regression] undefined reference to `std::variant<std::string_view >::variant<std::string_view, void, void, std::string_view, void>(std::string_view&&)'
  2021-10-08 15:56 [Bug libstdc++/102654] New: undefined reference to `std::variant<std::string_view >::variant<std::string_view, void, void, std::string_view, void>(std::string_view&&)' hewillk at gmail dot com
  2021-10-08 17:01 ` [Bug libstdc++/102654] [11/12 Regression] " redi at gcc dot gnu.org
@ 2021-10-09 15:04 ` ppalka at gcc dot gnu.org
  2021-10-11  8:36 ` rguenth at gcc dot gnu.org
  2022-03-27  3:24 ` jason at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: ppalka at gcc dot gnu.org @ 2021-10-09 15:04 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
          Component|libstdc++                   |c++
                 CC|                            |jason at gcc dot gnu.org,
                   |                            |ppalka at gcc dot gnu.org

--- Comment #1 from Patrick Palka <ppalka at gcc dot gnu.org> ---
Started with r11-6736.
Reduced valid testcase which fails to link:

struct basic_string_view {
  basic_string_view() {}
};

struct variant {
  template<class _Tp> constexpr variant(_Tp) {}
};

struct my_variant : variant {};

int main() {
  basic_string_view s;
  my_variant v{s};
}

/usr/bin/ld: /tmp/ccFVb3Nc.o: in function `main':
102654.ii:(.text+0x1c): undefined reference to
`variant::variant<basic_string_view>(basic_string_view)'

Changing component from libstdc++ to c++ since this appears to be a frontend
problem.

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

* [Bug c++/102654] [11/12 Regression] undefined reference to `std::variant<std::string_view >::variant<std::string_view, void, void, std::string_view, void>(std::string_view&&)'
  2021-10-08 15:56 [Bug libstdc++/102654] New: undefined reference to `std::variant<std::string_view >::variant<std::string_view, void, void, std::string_view, void>(std::string_view&&)' hewillk at gmail dot com
  2021-10-08 17:01 ` [Bug libstdc++/102654] [11/12 Regression] " redi at gcc dot gnu.org
  2021-10-09 15:04 ` [Bug c++/102654] " ppalka at gcc dot gnu.org
@ 2021-10-11  8:36 ` rguenth at gcc dot gnu.org
  2022-03-27  3:24 ` jason at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: rguenth at gcc dot gnu.org @ 2021-10-11  8:36 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P3                          |P2

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

* [Bug c++/102654] [11/12 Regression] undefined reference to `std::variant<std::string_view >::variant<std::string_view, void, void, std::string_view, void>(std::string_view&&)'
  2021-10-08 15:56 [Bug libstdc++/102654] New: undefined reference to `std::variant<std::string_view >::variant<std::string_view, void, void, std::string_view, void>(std::string_view&&)' hewillk at gmail dot com
                   ` (2 preceding siblings ...)
  2021-10-11  8:36 ` rguenth at gcc dot gnu.org
@ 2022-03-27  3:24 ` jason at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: jason at gcc dot gnu.org @ 2022-03-27  3:24 UTC (permalink / raw)
  To: gcc-bugs

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

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

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

--- Comment #2 from Jason Merrill <jason at gcc dot gnu.org> ---
Dup.

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

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

end of thread, other threads:[~2022-03-27  3:24 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-08 15:56 [Bug libstdc++/102654] New: undefined reference to `std::variant<std::string_view >::variant<std::string_view, void, void, std::string_view, void>(std::string_view&&)' hewillk at gmail dot com
2021-10-08 17:01 ` [Bug libstdc++/102654] [11/12 Regression] " redi at gcc dot gnu.org
2021-10-09 15:04 ` [Bug c++/102654] " ppalka at gcc dot gnu.org
2021-10-11  8:36 ` rguenth at gcc dot gnu.org
2022-03-27  3:24 ` 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).