[Bug libstdc++/103096] Compiling never ends (at least not in resonable time - less than 10 mins)

2021-11-05 Thread pavel.celba at ricardo dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103096

--- Comment #2 from Pavel Celba  ---
But shouldn't the compiler end in all cases with some error?
There should be a depth instantiation limit which is reached and compilation
ended.
No matter how non-sensible the input is. My input is quite sensible C++ code
bug thing any amateur can easily do.

[Bug c++/103096] New: Compiling never ends (at least not in resonable time - less than 10 mins)

2021-11-05 Thread pavel.celba at ricardo dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103096

Bug ID: 103096
   Summary: Compiling never ends (at least not in resonable time -
less than 10 mins)
   Product: gcc
   Version: 10.2.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: pavel.celba at ricardo dot com
  Target Milestone: ---

Code - file test.cpp:

#include 
#include 


using namespace std;

template  int qHash(const T& a)
{
  return qHash(std::pair(a, a));
}

int main()
{
  int a = 3;
  std::cout << qHash(a);
}

Run as normally:
gcc test.cpp