gcc-4.3.2 and gcc-4.5.0 20090924 (experimental) snapshot generate few vcg files
with syntax errors because of a extra '}' in the graph.
it appears in gcc/graph.c print_rtl_graph_with_bb() sometimes called end_bb()
without a start_bb() and this results in a extra '}' in the output generating
the parse error in the output graph.
to create the graphs running 'gcc -da -dv test.c' and many vcg files generated.
vcg graphs in a directory tested with a script using xvcg v1.3 like this:
#!/bin/sh
rm -v -f *.ps
pre=
rec=*.vcg
post=
for i in $pre${rec}; do
    ./xvcg -silent -psoutput $i.ps $i
done
and xvcg reports the syntax errors in the graph when using gcc-4.5 as:
Syntax error (test.c.144r.into_cfglayout.vcg: l:410 p:7): Unexpected lexem
GRAPH "graph:" (parse error) !
Syntax error (test.c.145r.jump.vcg: l:410 p:7): Unexpected lexem GRAPH "graph:"
(parse error) !
Syntax error (test.c.169r.reginfo.vcg: l:410 p:7): Unexpected lexem GRAPH
"graph:" (parse error) !
in gcc/graph.c added a check to suppress end_bb() when start_bb() is not called
and the graph output files are oke.
also noted that in some files the basic block starts with 4, not 2.
have made a patched graph.c file which works if you are interested.
system used is 32bits suse linux 11.1, uname -a:
Linux linux-ls7d.perpektiefinternet.nl 2.6.27.29-0.1-default #1 SMP 2009-08-15
17:53:59 +0200 i686 i686 i386 GNU/Linux


-- 
           Summary: gcc generates few graph files with syntax errors
           Product: gcc
           Version: 4.3.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: twlevo at gmail dot com
 GCC build triplet: i586-suse-linux
  GCC host triplet: i586-suse-linux
GCC target triplet: i586-suse-linux


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41523

Reply via email to