| 1 |
/* CTF generation for unsized arrays. |
| 2 |
|
| 3 |
Unsized arrays are encoded with a 0 for the number of elements. The type |
| 4 |
of array index is the INT type. |
| 5 |
|
| 6 |
TBD_CTF_FORMAT_OPEN_ISSUES (1) - |
| 7 |
This testcase makes a note of the case of a probable misrepresentation. |
| 8 |
See Note 1 below. |
| 9 |
|
| 10 |
In the CTF section, these types are encoded as : |
| 11 |
|
| 12 |
Variables: |
| 13 |
b1 -> 3: int [0] (size 0x0) |
| 14 |
b2 -> 5: int [0] (size 0x0) |
| 15 |
|
| 16 |
Note 1 : There is misrepresentation in that b1 and b2 are specified |
| 17 |
differently by the user. |
| 18 |
|
| 19 |
In this testcase, two CTF array records each of type int [0] is expected. */ |
| 20 |
|
| 21 |
/* { dg-do compile } */ |
| 22 |
/* { dg-options "-O0 -gctf -dA" } */ |
| 23 |
|
| 24 |
/* { dg-final { scan-assembler-times "0x12000000\[\t \]+\[^\n\]*ctt_info" 2 } } */ |
| 25 |
|
| 26 |
/* { dg-final { scan-assembler-times "\[\t \]0\[\t \]+\[^\n\]*cta_nelems" 2 } } */ |
| 27 |
|
| 28 |
static int b1[] = {}; |
| 29 |
|
| 30 |
int b2[0]; |