https://bugs.llvm.org/show_bug.cgi?id=33414

            Bug ID: 33414
           Summary: Clang goes into infinite loop during template
                    instantiation while processing co_await expression
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: normal
          Priority: P
         Component: Frontend
          Assignee: unassignedclangb...@nondot.org
          Reporter: lewissba...@gmail.com
                CC: llvm-bugs@lists.llvm.org

Created attachment 18619
  --> https://bugs.llvm.org/attachment.cgi?id=18619&action=edit
Preprocessed output of

Compile the attached preprocessor output with:
clang -x c++ -std=c++1z -fcoroutines-ts -fms-compatibility llvm_bug.ii

Seems to get stuck in an infinite loop inside
Sema::PerformPendingInstantiations().

It pulls a pending instantiation off the queue and calls
InstantiateFunctionDefinition().
However InstantiateFunctionDefinition() decides to defer instantiation (due to
late-parsed template?) and puts it back on the queue only to be picked up
immediately next time around the loop in PerformPendingInstantiations().

The particular template it is trying to instantiate is
coroutine_handle<task_promise>::promise() during compilation of a co_await
expression.

Built against code from github llvm-mirror:
llvm: 5db707b0ff5ce707a78082219658a999b6b6eaa3
clang: ff4214ddcfab9fd92c15cc01c9c2e17a8f6217ad

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to