This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Should we compile rtl when parsing finds error?


> 	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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]