This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Make -fno-unit-a-time give up compilation when errors are present
- From: "Richard Guenther" <richard dot guenther at gmail dot com>
- To: "Jan Hubicka" <jh at suse dot cz>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Tue, 17 Jun 2008 15:20:58 -0400
- Subject: Re: Make -fno-unit-a-time give up compilation when errors are present
- References: <20080617190150.GJ7888@kam.mff.cuni.cz>
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 } */
>