Issue |
120033
|
Summary |
Compilation Hang Issue with Deeply Nested Template Instantiation in LLVM-18 and Trunk
|
Labels |
new issue
|
Assignees |
|
Reporter |
iamanonymouscs
|
This hang can be observed in both LLVM 18 and LLVM trunk versions.[https://godbolt.org/z/dKPhr395q](https://godbolt.org/z/dKPhr395q)
# Command
`clang++ bug.C`
# Code
```cpp
template<template<int N, int M> class>
struct A;
template<class U>
struct B {
template<class T>
struct C {
template<template<auto X, auto Y> class TT>
using type = A<TT>;
};
};
template struct B<>;
template<class U>
struct C {
template<class T>
struct D : C<typename B<T>::template C<T>::type<int>::template C<T>::type<int>::type<int>::type<int>::type<int>::type<int>::type<int>::type<int>::type<int>::type<int>::type<int>::type<int>::type<int>::type<int>::type<int>::type<int>::type<int>::type<int>::type<int>::type<int>::type<int>::type<int>::type<int>::type<int>::type<int>::type<int>::type<int>::type<int>::type<int>::type<int>::type<int>::type<int>::type>::C<int>;
```
# Version
`clang++ --version`
```sh
Ubuntu clang version 18.1.8 (++20240731025011+3b5b5c1ec4a3-1~exp1~20240731145104.143)
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/bin
```
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs