clangupc / clang-upc

Clang UPC Front-End
https://clangupc.github.io/
Other
16 stars 5 forks source link

ICE: CGDebugInfo .cpp - Assertion `Qc.empty() && "Unknown type qualifier for d ebug info"' failed. #13

Closed gary-funck closed 11 years ago

gary-funck commented 11 years ago

The following ICE occurred when running the following command:

$ clangupc -fupc-pts-packed -g  -I. -Wno-implicit-functi
on-declaration -Wno-deprecated -fno-caret-diagnostics -Wno-logical-op-parenthes
es -Wno-unused-comparison -Wno-unused-value -Wno-dangling-else -Wno-duplicate-d
ecl-specifier -g    -fupc-threads-4 -c dup_quals.upc
clang-3.2:clang/src/llvm/tools/clang/lib/CodeGen/CGDebugInfo
.cpp:496: llvm::DIType clang::CodeGen::CGDebugInfo::CreateQualifiedType(clang::
QualType, llvm::DIFile): Assertion `Qc.empty() && "Unknown type qualifier for d
ebug info"' failed.
0  clang-3.2       0x00000000016975a6
1  clang-3.2       0x000000000169727c
2  libpthread.so.0 0x0000003991a0f000
3  libc.so.6       0x0000003991635ba5 gsignal + 53
4  libc.so.6       0x0000003991637358 abort + 328
3  libc.so.6       0x0000003991635ba5 gsignal + 53
4  libc.so.6       0x0000003991637358 abort + 328
5  libc.so.6       0x000000399162e972
6  libc.so.6       0x000000399162ea22
7  clang-3.2       0x00000000017731d5 clang::CodeGen::CGDebugInfo::CreateQualif
iedType(clang::QualType, llvm::DIFile) + 349
8  clang-3.2       0x0000000001779319 clang::CodeGen::CGDebugInfo::CreateTypeNo
de(clang::QualType, llvm::DIFile) + 59
9  clang-3.2       0x0000000001779139 clang::CodeGen::CGDebugInfo::getOrCreateT
ype(clang::QualType, llvm::DIFile) + 181
10 clang-3.2       0x000000000177e744 clang::CodeGen::CGDebugInfo::EmitGlobalVa
riable(llvm::GlobalVariable*, clang::VarDecl const*) + 828
11 clang-3.2       0x00000000016d703e clang::CodeGen::CodeGenModule::EmitGlobal
VarDefinition(clang::VarDecl const*) + 2492
12 clang-3.2       0x00000000016d58b2 clang::CodeGen::CodeGenModule::EmitTentat
iveDefinition(clang::VarDecl const*) + 276
13 clang-3.2       0x00000000016cca31
14 clang-3.2       0x00000000016cb7c0
[...]
gary-funck commented 11 years ago

Here is the test case:

// C99 says type qualifers are idempotent.
// UPC's relaxed and strict should be the same
const const int c1;
typedef const int c_int;
const c_int c2;
c_int const c3;
volatile volatile int v1;
typedef volatile int v_int;
volatile v_int v2;
v_int volatile v3;
shared relaxed relaxed int r1;
typedef shared relaxed int r_int;
r_int relaxed r2;
relaxed r_int r3;
shared strict strict int s1;
typedef shared strict int s_int;
s_int strict s2;
strict s_int s3;