public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/99281] New: internal compiler error: in assign_temp, at function.c:984
@ 2021-02-26  4:34 jonathan.poelen at gmail dot com
  2021-02-26  7:38 ` [Bug c++/99281] " rguenth at gcc dot gnu.org
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: jonathan.poelen at gmail dot com @ 2021-02-26  4:34 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 99281
           Summary: internal compiler error: in assign_temp, at
                    function.c:984
           Product: gcc
           Version: 10.2.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: jonathan.poelen at gmail dot com
  Target Milestone: ---

g++ -std=c++17 test.cpp
during RTL pass: expand
test.cpp: In function ‘int main()’:
test.cpp:27:5: internal compiler error: in assign_temp, at function.c:984
   27 |     pack_type<X>{get(1)};
      |     ^~~~~~~~~~~~~~~~~~~~

Compile with -O1 or higher.

struct Data
{
    Data() {}
    ~Data() {}

    long long i;
};

struct X
{
    Data a;
    int b;
};

template<class T>
X get(T const&)
{
    return X{};
}

template<class... Ts>
struct pack_type : Ts...
{};

int main()
{
    pack_type<X>{get(1)};
}

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

end of thread, other threads:[~2024-04-05 23:01 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-26  4:34 [Bug c++/99281] New: internal compiler error: in assign_temp, at function.c:984 jonathan.poelen at gmail dot com
2021-02-26  7:38 ` [Bug c++/99281] " rguenth at gcc dot gnu.org
2021-02-26  8:51 ` rguenth at gcc dot gnu.org
2021-02-26 11:34 ` cvs-commit at gcc dot gnu.org
2021-02-26 11:38 ` rguenth at gcc dot gnu.org
2024-04-05 23:01 ` pinskia 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).