public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/98579] New: ICE:  in output_constructor_regular_field, at varasm.c:5491
@ 2021-01-07 10:02 sguelton at redhat dot com
  2021-01-07 10:55 ` [Bug c++/98579] [11 Regression] ICE: in output_constructor_regular_field, at varasm.c:5491 since r11-2720-g91e6226f880b0482 marxin at gcc dot gnu.org
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: sguelton at redhat dot com @ 2021-01-07 10:02 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 98579
           Summary: ICE:  in output_constructor_regular_field, at
                    varasm.c:5491
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: sguelton at redhat dot com
  Target Milestone: ---

The following code 

```
#include <tuple>
struct ComplexPart;

template <typename PA, typename PB> struct FollowParser {
  constexpr FollowParser(PA pa, PB pb) : pa_{pa}, pb_{pb} {}
  const PA pa_;
  const PB pb_;
};
template <typename PA, typename PB>
inline constexpr FollowParser<PA, PB> operator/(PA pa, PB pb) {
  return FollowParser<PA, PB>{pa, pb};
}
template <typename... PARSER> struct ApplyConstructor {
  constexpr ApplyConstructor(PARSER... p) : parsers_{p...} {}
  const std::tuple<PARSER...> parsers_;
};
template <typename... PARSER>
constexpr ApplyConstructor<PARSER...> construct(PARSER... p) {
  return ApplyConstructor<PARSER...>{p...};
}
template <typename A> struct Parser {
  constexpr Parser() {}
};
auto tmp = construct(Parser<ComplexPart>{} / ",", Parser<ComplexPart>{});
```

compiled with

```
g++ -std=c++17 -c F.cpp
```

raises an ICE. Reproducer on godbolt, using trunk gcc:
https://gcc.godbolt.org/z/M3r15z

Possible duplicate: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98463
but the example look different enough.

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

end of thread, other threads:[~2021-01-19 12:52 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-07 10:02 [Bug c++/98579] New: ICE: in output_constructor_regular_field, at varasm.c:5491 sguelton at redhat dot com
2021-01-07 10:55 ` [Bug c++/98579] [11 Regression] ICE: in output_constructor_regular_field, at varasm.c:5491 since r11-2720-g91e6226f880b0482 marxin at gcc dot gnu.org
2021-01-07 13:22 ` rguenth at gcc dot gnu.org
2021-01-14 11:19 ` rguenth at gcc dot gnu.org
2021-01-19 12:52 ` rguenth 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).