[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug default/25166] Use verify_edges in create_import_tree



https://sourceware.org/bugzilla/show_bug.cgi?id=25166

--- Comment #1 from Tom de Vries <vries at gcc dot gnu.org> ---
I added some printing of the edges before verification.

...
1.
PRINT_EDGES
PUs
idx: 0
cu: 0x0
incoming: 2
incoming: 3
incoming: 4
idx: 1
cu: 0x1
incoming: 2
incoming: 3
CUs
idx: 2
cu: 0x2e
outgoing: 0
outgoing: 1
idx: 3
cu: 0xc7
outgoing: 0
outgoing: 1
idx: 4
cu: 0x3e1
outgoing: 0

2.
PRINT_EDGES
PUs
idx: 0
cu: 0x0
incoming: 2
incoming: 3
incoming: 4
idx: 1
cu: 0x1
incoming: 2
incoming: 3
CUs
idx: 2
cu: 0x2e
outgoing: 0
outgoing: 1
idx: 3
cu: 0xc7
outgoing: 0
outgoing: 1
idx: 4
cu: 0x3e1
outgoing: 0

3.
PRINT_EDGES
PUs
idx: 0
cu: 0x0
incoming: 0
incoming: 4
idx: 1
cu: 0x1
incoming: 2
incoming: 3
outgoing: 0
CUs
idx: 2
cu: 0x2e
outgoing: 1
idx: 3
cu: 0xc7
outgoing: 1
idx: 4
cu: 0x3e1
outgoing: 0
dwz: /data/dwz/dwz.git/dwz.c:6071: verify_edges_1: Assertion `e2' failed.
...

The first two calls give identical output.

The third show a transformed import tree, which looks good apart from one
oddity:
...
PUs
idx: 0
cu: 0x0
incoming: 0
incoming: 4
...
PU 0 has an incoming edge from itself.

The verification assert trips on this, because there's no corresponding
outgoing edge.

In the code that is generated, there's no import statement in PU 0 that imports
itself, so it looks like this oddity doesn't have negative consequences in code
generation.

So, this merely looks like insufficient cleanup, which is not terribly
important.

It would be good to fix though, because it would allow us to run the edge
verification at the point where it is now asserting.

-- 
You are receiving this mail because:
You are on the CC list for the bug.