This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Should we compile rtl when parsing finds error?
- From: Jan Hubicka <jh at suse dot cz>
- To: David Edelsohn <dje at watson dot ibm dot com>
- Cc: Jan Hubicka <jh at suse dot cz>, gcc at gcc dot gnu dot org
- Date: Tue, 12 Mar 2002 10:00:34 +0100
- Subject: Should we compile rtl when parsing finds error?
- References: <200203120258.VAA27780@makai.watson.ibm.com>
> FYI, gcc.dg/noncompile/930622-1.c also fails with the following
> errors:
>
> /gcc/dje/src/gcc/testsuite/gcc.dg/noncompile/930622-1.c: In function `f':
> /gcc/dje/src/gcc/testsuite/gcc.dg/noncompile/930622-1.c:5: label `c' used but not defined
> /gcc/dje/src/gcc/testsuite/gcc.dg/noncompile/930622-1.c:6: Wrong amount of branch edges after unconditional jump 0
> /gcc/dje/src/gcc/testsuite/gcc.dg/noncompile/930622-1.c:6: verify_flow_info failed
>
> The file is five lines; one function. It might be an easier
> testcase to debug.
>
> f ()
> {
> double b;
> b = b * 10;
> goto c; /* { dg-error "used but not defined" } */
> }
>
> gcc -O0 -S /gcc/dje/src/gcc/testsuite/gcc.dg/noncompile/930622-1.c
>
> I think these may all be the same problem, but I just wanted to
> provide another testcase that might be simpler.
Thanks, your testcase rings the bell. What happneds is unresolved label in
the insn stream. I was fixing the testcase by allowing such construct
in verify_flow_info, but what I really don't understand to is why
we continue in compilation of insn stream once we encounter error during
parsing. As rest_of_compilation should not introduce new errors, I think
we should just bail out sometime easier.
Honza
>
> Thanks, David