]> gcc.gnu.org Git - gcc.git/commit
analyzer: ensure .dot output is valid for an empty BB
authorDavid Malcolm <dmalcolm@redhat.com>
Fri, 20 Dec 2019 18:29:56 +0000 (13:29 -0500)
committerDavid Malcolm <dmalcolm@redhat.com>
Wed, 15 Jan 2020 01:47:21 +0000 (20:47 -0500)
commit718930c0c8f8d25d185cb65e38c79a19458b6628
treeeb53b7615cfb8192762d2106feab3304ac17992d
parent8397af8ed0db685312e44117fd52316b57c2c129
analyzer: ensure .dot output is valid for an empty BB

This patch fixes an issue with the output of -fdump-analyzer-supergraph
on BBs with no statements, where the resulting files were unreadable by
dot e.g.:

Error: syntax error in line 1
... <TABLE BORDER="0"></TABLE> ...
in label of node node_10

gcc/analyzer/ChangeLog:
* supergraph.cc (supernode::dump_dot): Ensure that the TABLE
element has at least one TR.

gcc/testsuite/ChangeLog:
* gcc.dg/analyzer/dot-output.c: Add test coverage for a BB with
no statements.
gcc/analyzer/ChangeLog
gcc/analyzer/supergraph.cc
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/analyzer/dot-output.c
This page took 0.0681850000000001 seconds and 5 git commands to generate.