Make -fno-unit-a-time give up compilation when errors are present

Richard Guenther richard.guenther@gmail.com
Tue Jun 17 19:23:00 GMT 2008


On Tue, Jun 17, 2008 at 3:01 PM, Jan Hubicka <jh@suse.cz> wrote:
> Hi,
> with unit-at-a-time we don't compile bodies when syntax errors are
> present, while on non-unit-at-a-time we don't.  This leads to
> interesting ICEs when SSA is used on -O0 since we don't expect error
> nodes around.
>
> This patch compensate it.
>
> Honza
>
> Bootstrapped/regtested i686-linux, OK?

Ok.

Thanks,
Richard.

>        * cgraphunit.c (cgraph_expand_pending_functions): Give up at
>        syntax errors.
>        (cgraph_analyze_function): Likewise.
>
>        * gcc.dg/asm-wide-1.c: Do not require extra errors we output
>        confused by earlier errors.
>
> Index: cgraphunit.c
> ===================================================================
> --- cgraphunit.c        (revision 136084)
> +++ cgraphunit.c        (working copy)
> @@ -496,7 +496,7 @@
>  {
>   bool output = false;
>
> -  if (flag_unit_at_a_time)
> +  if (flag_unit_at_a_time || errorcount || sorrycount)
>     return false;
>
>   cgraph_output_pending_asms ();
> @@ -845,7 +856,7 @@
>   cgraph_lower_function (node);
>   node->analyzed = true;
>
> -  if (!flag_unit_at_a_time)
> +  if (!flag_unit_at_a_time && !sorrycount && !errorcount)
>     {
>       bitmap_obstack_initialize (NULL);
>       tree_register_cfg_hooks ();
> Index: testsuite/gcc.dg/asm-wide-1.c
> ===================================================================
> --- testsuite/gcc.dg/asm-wide-1.c       (revision 136084)
> +++ testsuite/gcc.dg/asm-wide-1.c       (working copy)
> @@ -30,6 +30,3 @@
>  /* { dg-error "output" "output" { target *-*-* } 16 } */
>  /* { dg-error "output" "output" { target *-*-* } 18 } */
>  /* { dg-error "output" "output" { target *-*-* } 20 } */
> -/* { dg-warning "match" "match" { target *-*-* } 21 } */
> -/* { dg-error "register" "register" { target *-*-* } 23 } */
> -/* { dg-error "register" "register" { target *-*-* } 25 } */
>



More information about the Gcc-patches mailing list