This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: why are few gcc graph output files incorrect ?
- From: Ian Lance Taylor <iant at google dot com>
- To: tys lefering <twlevo at gmail dot com>
- Cc: gcc-help at gcc dot gnu dot org
- Date: Tue, 29 Sep 2009 17:19:57 -0700
- Subject: Re: why are few gcc graph output files incorrect ?
- References: <329bf6a60909291243r14c4937dq348cebe0a329066e@mail.gmail.com>
tys lefering <twlevo@gmail.com> writes:
> using gcc-4.3.2 and gcc-4.5 snapshot gcc-core-4.5-20090924.tar.bz2
> and running 'gcc -dv -da test.c' to generate graph output files
> noticed there are few files with syntax error when running checks
> using a script 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
>
> with gcc-4.5 these syntax errors appear: (unexpected graph: statement)
> 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) !
>
> with gcc-4.3.2: these syntax errors appear: (unexpected graph: statement)
> Syntax error (test.c.138r.into_cfglayout.vcg: l:410 p:7): Unexpected
> lexem GRAPH "graph:" (parse error) !
> Syntax error (test.c.139r.jump.vcg: l:410 p:7): Unexpected lexem GRAPH
> "graph:" (parse error) !
> Syntax error (test.c.159r.regclass.vcg: l:410 p:7): Unexpected lexem
> GRAPH "graph:" (parse error) !
>
> because the graph file has no indentation cannot easily see why this
> error happens, it looks like this:
>
> }
> }
> edge: { sourcename: "gcd.51" targetname: "gcd.999999" }
> node: { title: "gcd.999999" label: "END" }
> }
> graph: { title: "main" <---here syntax error happens
> folding: 1
> hidden: 2
> node: { title: "main.0" }
>
> the source in gcc/graph.c looks fine and generates for the other output files
> correct graph output.
>
> does this mean this error comes from for example unusual rtl in gcc in
> specific cases ?
> is there a easy fix for this ?
I have no idea. You can try filing a gcc bug report for this, but the
most likely way to fix this is probably going to be for you to dig
into the code and figure out what is going wrong.
Ian