<html>
    <head>
      <base href="http://llvm.org/bugs/" />
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW --- - crash instantiating ArrayRef in IRBuilder with -fdelayed-template-parsing"
   href="http://llvm.org/bugs/show_bug.cgi?id=17334">17334</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>crash instantiating ArrayRef in IRBuilder with -fdelayed-template-parsing
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>clang
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>unspecified
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Windows NT
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>C++
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>unassignedclangbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>rnk@google.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>dgregor@apple.com, llvmbugs@cs.uiuc.edu
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Created <span class=""><a href="attachment.cgi?id=11271" name="attach_11271" title="reduced test case">attachment 11271</a> <a href="attachment.cgi?id=11271&action=edit" title="reduced test case">[details]</a></span>
reduced test case

Clang asserts that DeclContexts aren't nested correctly on the attached test
case, which was reduced from a clang self-host.

$ ../build_debug/bin/clang-cl t.cpp
Assertion failed: getContainingDC(DC) == CurContext && "The next DeclContext
should be lexically contained in the current one.", file
..\tools\clang\lib\Sema\SemaDecl.cpp, line 893


Stack dump:
0.      Program arguments: D:\src\llvm\build_debug\bin\clang-cl.exe -cc1
-triple i686-pc-win32 -emit-obj -mrelax-all -disable-free -main-file-name t.cpp
-mrelocation-model static -mdisable-fp-elim -fmath-errno -masm-verbose
-mconstructor-aliases -target-cpu pentium4 -D_MT --dependent-lib=libcmt
--dependent-lib=oldnames -cxx-abi microsoft -fdiagnostics-format msvc
-resource-dir D:\src\llvm\build_debug\bin\..\lib\clang\3.4 -internal-isystem
D:\src\llvm\build_debug\bin\..\lib\clang\3.4\include -internal-isystem
C:/PROGRA~2/MICROS~1.0/VC/include -internal-isystem
C:/PROGRA~2/WI3CF2~1/8.0/Include/shared -internal-isystem
C:/PROGRA~2/WI3CF2~1/8.0/Include/um -internal-isystem
C:/PROGRA~2/WI3CF2~1/8.0/Include/winrt -internal-isystem
C:/PROGRA~2/MICROS~1.0/include -std=c++11 -fdeprecated-macro
-fdebug-compilation-dir D:\src\llvm\build_clang -ferror-limit 19
-fmessage-length 0 -mstackrealign -fms-extensions -fms-compatibility
-fmsc-version=1700 -fdelayed-template-parsing -fobjc-runtime=gcc
-fobjc-default-synthesize-properties -fcxx-exceptions -fexceptions
-fdiagnostics-show-option -vectorize-slp -fcolor-diagnostics
-fansi-escape-codes -o D:\src\tmp\t-ae5bf6.obj -x c++ t.cpp
1.      <eof> parser at end of file
2.      t.cpp:36:8: instantiating function definition
'CreateConstInBoundsGEP2_32'
_NMSG_WRITE() + 0x8A bytes(s),
f:\dd\vctools\crt_bld\self_x86\crt\src\crt0msg.c, line 226
abort() + 0x1C bytes(s), f:\dd\vctools\crt_bld\self_x86\crt\src\abort.c, line
62 + 0x7 byte(s)
_wassert() + 0xBEC bytes(s), f:\dd\vctools\crt_bld\self_x86\crt\src\assert.c,
line 355
clang::Sema::PushDeclContext() + 0x3F bytes(s),
d:\src\llvm\tools\clang\lib\sema\semadecl.cpp, line 893 + 0x31 byte(s)
clang::Parser::ParseLateTemplatedFuncDef() + 0x367 bytes(s),
d:\src\llvm\tools\clang\lib\parse\parsetemplate.cpp, line 1297
clang::Parser::LateTemplateParserCallback() + 0xF bytes(s),
d:\src\llvm\tools\clang\lib\parse\parsetemplate.cpp, line 1248
clang::Sema::InstantiateFunctionDefinition() + 0x22E bytes(s),
d:\src\llvm\tools\clang\lib\sema\sematemplateinstantiatedecl.cpp, line 3152 +
0x1B byte(s)
clang::Sema::MarkFunctionReferenced() + 0x5CF bytes(s),
d:\src\llvm\tools\clang\lib\sema\semaexpr.cpp, line 11113
clang::Sema::BuildCXXConstructExpr() + 0x2E bytes(s),
d:\src\llvm\tools\clang\lib\sema\semadeclcxx.cpp, line 10523
clang::Sema::BuildCXXConstructExpr() + 0xB8 bytes(s),
d:\src\llvm\tools\clang\lib\sema\semadeclcxx.cpp, line 10503 + 0x40 byte(s)
clang::InitializationSequence::Perform() + 0xF3B bytes(s),
d:\src\llvm\tools\clang\lib\sema\semainit.cpp, line 5814 + 0x58 byte(s)
clang::Sema::PerformCopyInitialization() + 0x129 bytes(s),
d:\src\llvm\tools\clang\lib\sema\semainit.cpp, line 7065
clang::Sema::GatherArgumentsForCall() + 0x2AF bytes(s),
d:\src\llvm\tools\clang\lib\sema\semaexpr.cpp, line 4139
clang::Sema::ConvertArgumentsForCall() + 0x9D3 bytes(s),
d:\src\llvm\tools\clang\lib\sema\semaexpr.cpp, line 4069 + 0x3E byte(s)
clang::Sema::BuildCallToMemberFunction() + 0x106E bytes(s),
d:\src\llvm\tools\clang\lib\sema\semaoverload.cpp, line 11185 + 0x4A byte(s)
clang::Sema::ActOnCallExpr() + 0x584 bytes(s),
d:\src\llvm\tools\clang\lib\sema\semaexpr.cpp, line 4383 + 0x24 byte(s)
clang::TreeTransform<`anonymous
namespace'::TemplateInstantiator>::RebuildCallExpr() + 0x3D bytes(s),
d:\src\llvm\tools\clang\lib\sema\treetransform.h, line 1598 + 0x2F byte(s)
clang::TreeTransform<`anonymous
namespace'::TemplateInstantiator>::TransformCallExpr() + 0x16F bytes(s),
d:\src\llvm\tools\clang\lib\sema\treetransform.h, line 6722 + 0x3F byte(s)
`anonymous namespace'::TemplateInstantiator::TransformCallExpr() + 0x42
bytes(s), d:\src\llvm\tools\clang\lib\sema\sematemplateinstantiate.cpp, line
904
clang::TreeTransform<`anonymous
namespace'::TemplateInstantiator>::TransformExpr() + 0x570 bytes(s),
d:\src\llvm\tools\clang\lib\sema\treetransform.h, line 299 + 0x20 byte(s)
clang::TreeTransform<`anonymous
namespace'::TemplateInstantiator>::TransformStmt() + 0x609 bytes(s),
d:\src\llvm\tools\clang\lib\sema\treetransform.h, line 2665
clang::TreeTransform<`anonymous
namespace'::TemplateInstantiator>::TransformCompoundStmt() + 0x8C bytes(s),
d:\src\llvm\tools\clang\lib\sema\treetransform.h, line 5270
clang::TreeTransform<`anonymous
namespace'::TemplateInstantiator>::TransformCompoundStmt() + 0x27 bytes(s),
d:\src\llvm\tools\clang\lib\sema\treetransform.h, line 5255 + 0x19 byte(s)
clang::TreeTransform<`anonymous
namespace'::TemplateInstantiator>::TransformStmt() + 0x1D4 bytes(s),
d:\src\llvm\tools\clang\lib\sema\treetransform.h, line 79 + 0x20 byte(s)
clang::Sema::SubstStmt() + 0x6C bytes(s),
d:\src\llvm\tools\clang\lib\sema\sematemplateinstantiate.cpp, line 2614 + 0x10
byte(s)
clang::Sema::InstantiateFunctionDefinition() + 0x665 bytes(s),
d:\src\llvm\tools\clang\lib\sema\sematemplateinstantiatedecl.cpp, line 3253
clang::Sema::PerformPendingInstantiations() + 0x1F3 bytes(s),
d:\src\llvm\tools\clang\lib\sema\sematemplateinstantiatedecl.cpp, line 4339
clang::Sema::ActOnEndOfTranslationUnit() + 0x18C bytes(s),
d:\src\llvm\tools\clang\lib\sema\sema.cpp, line 614
clang::Parser::ParseTopLevelDecl() + 0xE8 bytes(s),
d:\src\llvm\tools\clang\lib\parse\parser.cpp, line 580
clang::ParseAST() + 0x1B9 bytes(s),
d:\src\llvm\tools\clang\lib\parse\parseast.cpp, line 144 + 0xC byte(s)
clang::ASTFrontendAction::ExecuteAction() + 0x101 bytes(s),
d:\src\llvm\tools\clang\lib\frontend\frontendaction.cpp, line 476 + 0x30
byte(s)
clang::CodeGenAction::ExecuteAction() + 0x33B bytes(s),
d:\src\llvm\tools\clang\lib\codegen\codegenaction.cpp, line 441
clang::FrontendAction::Execute() + 0xAC bytes(s),
d:\src\llvm\tools\clang\lib\frontend\frontendaction.cpp, line 378 + 0xF byte(s)
clang::CompilerInstance::ExecuteAction() + 0x263 bytes(s),
d:\src\llvm\tools\clang\lib\frontend\compilerinstance.cpp, line 708
clang::ExecuteCompilerInvocation() + 0x308 bytes(s),
d:\src\llvm\tools\clang\lib\frontendtool\executecompilerinvocation.cpp, line
238 + 0x11 byte(s)
cc1_main() + 0x2F0 bytes(s), d:\src\llvm\tools\clang\tools\driver\cc1_main.cpp,
line 100 + 0xE byte(s)
main() + 0x166 bytes(s), d:\src\llvm\tools\clang\tools\driver\driver.cpp, line
306 + 0x45 byte(s)
__tmainCRTStartup() + 0x11A bytes(s),
f:\dd\vctools\crt_bld\self_x86\crt\src\crt0.c, line 241 + 0x19 byte(s)</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>