[LLVMbugs] [Bug 13024] New: std::map < int, int >, int >, calling operator [] results in assert
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Mon Jun 4 17:08:11 PDT 2012
http://llvm.org/bugs/show_bug.cgi?id=13024
Bug #: 13024
Summary: std::map < int, int >, int >, calling operator []
results in assert
Product: clang
Version: trunk
Platform: PC
OS/Version: other
Status: NEW
Severity: release blocker
Priority: P
Component: C++
AssignedTo: unassignedclangbugs at nondot.org
ReportedBy: dillon.sharlet at intel.com
CC: dgregor at apple.com, llvmbugs at cs.uiuc.edu
Classification: Unclassified
Created attachment 8680
--> http://llvm.org/bugs/attachment.cgi?id=8680
Test.cpp compiled with -E to get the preprocessor output.
Here is a simple reproducer cpp file that exhibits the same issue as the
program I am trying to compile:
#include <map>
int test(int x, int y)
{
std::map < std::pair < int, int >, int > test;
return test[std::make_pair(x, y)];
}
When compiling this program with Clang 3.1/MinGW 4.6.2 on windows, the assert
in the following function fails (SemaDecl.cpp line 805):
void Sema::PushDeclContext(Scope *S, DeclContext *DC) {
assert(getContainingDC(DC) == CurContext &&
"The next DeclContext should be lexically contained in the current
one.");
CurContext = DC;
S->setEntity(DC);
}
Additionally, the program compiled successfully on Clang 3.0 with the same
environment (MinGW 4.6.2 headers on Windows).
Attached is Test.cpp compiled with -E.
--
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
More information about the llvm-bugs
mailing list