1 ; REQUIRES: x86-registered-target
3 ; dw-at-specification.cpp
5 ; 2 static const int Arr[];
7 ; 4 const int S::Arr[] = {
11 ; The above test compiled with clang++ produces both a DW_AT_type and
12 ; DW_AT_specification on the definition die for S::Arr, which previously caused
13 ; an assert in the LVELFReader:
14 ; $ clang++ -g -c dw-at-specification.cpp -o dw-at-specification.o
16 ; RUN: llvm-debuginfo-analyzer --attribute=level,format,producer \
17 ; RUN: --output-sort=name \
18 ; RUN: --print=symbols \
19 ; RUN: %p/Inputs/dw-at-specification.o 2>&1 | \
20 ; RUN: FileCheck --strict-whitespace -check-prefix=CHECK %s
22 ; CHECK: Logical View:
23 ; CHECK: [000] {File} 'dw-at-specification.o' -> elf64-x86-64
25 ; CHECK: [001] {CompileUnit} 'a.cpp'
26 ; CHECK: [002] {Producer} 'clang version 11.0.0 ({{.*}})'
27 ; CHECK: [002] {Variable} 'Arr' -> 'const int [3]'
28 ; CHECK: [002] 1 {Struct} 'S'
29 ; CHECK: [003] 2 {Member} extern public 'Arr' -> 'const int [1]'