public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/110031] New: ICE: error reporting routines re-entered on non-type template argument
@ 2023-05-29 22:45 stevenxia990430 at gmail dot com
  2023-05-30  3:41 ` [Bug c++/110031] " pinskia at gcc dot gnu.org
                   ` (9 more replies)
  0 siblings, 10 replies; 11+ messages in thread
From: stevenxia990430 at gmail dot com @ 2023-05-29 22:45 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 110031
           Summary: ICE: error reporting routines re-entered on non-type
                    template argument
           Product: gcc
           Version: 12.1.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: stevenxia990430 at gmail dot com
  Target Milestone: ---

The following program produces internal compiler error: error reporting
routines re-entered. Checked on clang and it was rejected as invalid code.
Tested on gcc trunk. 


To quickly reproduce: https://gcc.godbolt.org/z/ex14EKeox
```
#include <type_traits>

#include <iostream>
template <typename T>
constexpr void print_type()
{
  std::cout << "Type: " << typeid(T).name();
}
template <typename T, std::enable_if_t<std::is_literal_type_v<std::decay_t<T>>,
int> = 0>
struct A {
  A(T &&)
  {
  }
};

template <typename T>
struct A<T> {
  A(T &&) = delete;
};

int main(void)
{
  A a{5.3};
  return 0;
}
```

Note, if we comment out the A a{5.3}; line in main function, gcc-trunk actually
accept this code (compiles) however it is rejected by clang. Might be related
to  this: bug109390

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

end of thread, other threads:[~2024-03-07 15:02 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-05-29 22:45 [Bug c++/110031] New: ICE: error reporting routines re-entered on non-type template argument stevenxia990430 at gmail dot com
2023-05-30  3:41 ` [Bug c++/110031] " pinskia at gcc dot gnu.org
2023-05-30  3:49 ` [Bug c++/110031] [10/11/12/13/14 Regression] ICE with deprecated attribute and NTTP and diagnostic for deprecated printed out so much pinskia at gcc dot gnu.org
2023-05-30  4:31 ` stevenxia990430 at gmail dot com
2023-07-07 10:45 ` [Bug c++/110031] [11/12/13/14 " rguenth at gcc dot gnu.org
2024-01-12 13:57 ` rguenth at gcc dot gnu.org
2024-01-12 13:58 ` rguenth at gcc dot gnu.org
2024-03-04 17:10 ` mpolacek at gcc dot gnu.org
2024-03-04 17:15 ` mpolacek at gcc dot gnu.org
2024-03-07 15:01 ` cvs-commit at gcc dot gnu.org
2024-03-07 15:02 ` [Bug c++/110031] [11/12/13 " mpolacek 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).