1 # Check that cross
-TU chasing to a type
in a cycle works
.
2 # In particular
, there should be only one copy of
'struct A *'.
3 #
(Not entirely reliable
: only fails
if the two are emitted adjacently
.
4 # Needs a proper objdump
-CTF parser
.)
7 #source
: cross
-tu
-cyclic
-1.c
9 #ld
: -shared --ctf
-variables
10 #name
: cross
-TU
-cyclic
-nonconflicting
14 Contents of CTF section
.ctf
:
18 Version
: 4 \
(CTF_VERSION_3\
)
32 0x
[0-9a
-f
]*: \
(kind
6\
) struct A \
(size
0x
[0-9a
-f
]*\
) \
(aligned at
0x
[0-9a
-f
]*\
)
33 *\
[0x0\
] a
: ID
0x
[0-9a
-f
]*: \
(kind
1\
) long int \
(format
0x1\
) \
(size
0x
[0-9a
-f
]*\
) \
(aligned at
0x
[0-9a
-f
]*\
)
34 *\
[0x
[0-9a
-f
]*\
] foo
: ID
0x
[0-9a
-f
]*: \
(kind
3\
) struct B \
* \
(size
0x
[0-9a
-f
]*\
) \
(aligned at
0x
[0-9a
-f
]*\
)
35 0x
[0-9a
-f
]*: \
(kind
1\
) long int .*
36 0x
[0-9a
-f
]*: \
(kind
6\
) struct B \
(size
0x
[0-9a
-f
]*\
) \
(aligned at
0x
[0-9a
-f
]*\
)
37 *\
[0x0\
] foo
: ID
0x
[0-9a
-f
]*: \
(kind
1\
) int \
(format
0x1\
) \
(size
0x
[0-9a
-f
]*\
) \
(aligned at
0x
[0-9a
-f
]*\
)
38 *\
[0x
[0-9a
-f
]*\
] bar
: ID
0x
[0-9a
-f
]*: \
(kind
3\
) struct A \
* \
(size
0x
[0-9a
-f
]*\
) \
(aligned at
0x
[0-9a
-f
]*\
)
39 0x
[0-9a
-f
]*: \
(kind
3\
) struct B \
* \
(size
0x
[0-9a
-f
]*\
) \
(aligned at
0x
[0-9a
-f
]*\
) -> 0x
[0-9a
-f
]*: \
(kind
6\
) struct B \
(size
0x
[0-9a
-f
]*\
) \
(aligned at
0x
[0-9a
-f
]*\
)
40 0x
[0-9a
-f
]*: \
(kind
3\
) struct A \
* \
(size
0x
[0-9a
-f
]*\
) \
(aligned at
0x
[0-9a
-f
]*\
) -> 0x
[0-9a
-f
]*: \
(kind
6\
) struct A \
(size
0x
[0-9a
-f
]*\
) \
(aligned at
0x
[0-9a
-f
]*\
)
41 0x
[0-9a
-f
]*: \
(kind
1\
) int .*