public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/99550] New: ICE (segfault) on arm with -std=c++2a
@ 2021-03-11 13:09 delleyves at gmx dot ch
  2021-03-11 15:24 ` [Bug c++/99550] " delleyves at gmx dot ch
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: delleyves at gmx dot ch @ 2021-03-11 13:09 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 99550
           Summary: ICE (segfault) on arm with -std=c++2a
           Product: gcc
           Version: 10.2.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: delleyves at gmx dot ch
  Target Milestone: ---

The following code segfaults on "arm-gcc 10.2.1 (none)" (as found on
godbolt.org) when compiled with `-std=c++2a`, but not without that flag.

So does the official ARM GCC release gcc-arm-none-eabi-10-2020-q4-major on
Ubuntu.

On my OSX however, it doesn't segfault. Neither does the x86-64 gcc 10.2 on
godbolt.

```
#include <type_traits>

template <typename value_type_>
struct JoinedRange {
  using value_type = value_type_;
  template <bool is_const>
  struct Iterator {
    template <typename T>
    using maybe_const_t = std::conditional_t<is_const, const T, T>;

    template <bool>
    friend class Iterator;

   public:
    using value_type = JoinedRange::value_type;
    using reference = maybe_const_t<value_type>;
    using pointer = maybe_const_t<value_type>*;
  };
  using iterator = Iterator<false>;
  using const_iterator = Iterator<true>;
};

template class JoinedRange<int>;
```

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

end of thread, other threads:[~2021-12-15  1:31 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-11 13:09 [Bug c++/99550] New: ICE (segfault) on arm with -std=c++2a delleyves at gmx dot ch
2021-03-11 15:24 ` [Bug c++/99550] " delleyves at gmx dot ch
2021-12-15  1:29 ` [Bug target/99550] " pinskia at gcc dot gnu.org
2021-12-15  1:31 ` 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).