This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: Another bootstrap failure on vax: label referred to in addr_vec deleted when basic block is moved to the fallthru position a
>
> Enclosed is the patch that I worked out to fix the problem. However, in
Thanks. It looks correct. Can you please post it to the mailing list?
> testing, I hit new problems:
>
> 1) vax:
>
> stage1/xgcc -Bstage1/ -B/usr/local/vax-dec-ultrix4.3/bin/ -c -DIN_GCC -g -O2 -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wtraditional -pedantic -Wno-long-long -DHAVE_CONFIG_H -I. -I. -I../../gcc -I../../gcc/. -I../../gcc/config -I../../gcc/../include ../../gcc/cpplex.c -o cpplex.o
> ../../gcc/cpplex.c: In function `cpp_parse_escape':
> ../../gcc/cpplex.c:1980: Internal compiler error in fixup_var_refs_1, at function.c:1932
This happends when validate_replace_rtx fails to replace virtual register
by another register. This is possible when the pattern is not in canonical
form. Just breakpoint there, take a look what insn is offending and
fix the template to match.
>
> 2) pa:
>
> gcc -o c++filt -DIN_GCC -g -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wtraditional -pedantic -Wno-long-long -DHAVE_CONFIG_H \
> cxxmain.o underscore.o obstack.o -lintl ../libiberty/libiberty.a
> cd ../../gcc && makeinfo -I doc -I doc/include -o doc/cpp.info doc/cpp.texi
> cd ../../gcc && makeinfo -I doc -I doc/include -o doc/gcc.info doc/gcc.texi
> doc/invoke.texi:3417: No matching `@end table'.
> makeinfo: Removing output file `doc/gcc.info' due to errors; use --force to preserve.
This is fixed already.
>
> I don't think I will get any more time this weekend to work on these problems.
I will find time to build vax crosscompiler and track down the insn pattern
at tuesday, since then I am also busy by non-gcc stuff.
Honza
>
> Dave
> --
> J. David Anglin dave.anglin@nrc.ca
> National Research Council of Canada (613) 990-0752 (FAX: 952-6605)
>
> 2001-09-28 John David Anglin <dave@hiauly1.hia.nrc.ca>
>
> * cfgcleanup.c (label_mentioned_p): New function.
> (try_optimize_cfg): Use it.
>
> --- cfgcleanup.c.orig Fri Sep 21 18:29:23 2001
> +++ cfgcleanup.c Fri Sep 28 16:09:38 2001
> @@ -52,6 +52,7 @@
> rtx *, rtx *));
>
> static bool delete_unreachable_blocks PARAMS ((void));
> +static bool label_mentioned_p PARAMS ((rtx, rtx));
> static bool tail_recursion_label_p PARAMS ((rtx));
> static void merge_blocks_move_predecessor_nojumps PARAMS ((basic_block,
> basic_block));
> @@ -248,6 +249,22 @@
> return changed;
> }
>
> +/* Return true if LABEL is mentioned in any insn from INSN up to
> + but not including the label. */
> +
> +static bool
> +label_mentioned_p (label, insn)
> + rtx label, insn;
> +{
> + rtx x;
> +
> + for (x = insn; x != label; x = NEXT_INSN (x))
> + if (reg_mentioned_p (label, x))
> + return true;
> +
> + return false;
> +}
> +
> /* Return true if LABEL is used for tail recursion. */
>
> static bool
> @@ -1096,7 +1113,7 @@
> /* If previous block ends with condjump jumping to next BB,
> we can't delete the label. */
> && (b->pred->src == ENTRY_BLOCK_PTR
> - || !reg_mentioned_p (b->head, b->pred->src->end)))
> + || !label_mentioned_p (b->head, b->pred->src->end)))
> {
> rtx label = b->head;
> b->head = NEXT_INSN (b->head);