From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andreas Schwab To: Toon Moene Cc: egcs@cygnus.com Subject: Re: Current CVS'd snapshot build dies on m68k-next-nextstep3 compiling cccp.c for stage 3 Date: Mon, 21 Sep 1998 07:32:00 -0000 Message-id: References: <9809181247.AA22047@moene.indiv.nluug.nl> X-SW-Source: 1998-09/msg01192.html Toon Moene writes: |> As follows: |> |> (gdb) run cccp.i -quiet -dumpbase cccp.c -g -O2 -O2 -W -Wall |> -version -o cccp.s |> Starting program: |> /Users/toon/Unix/compilers/snapshots/obj/gcc/stage2/cc1 cccp.i |> -quiet -dumpbase cccp.c -g -O2 -O2 -W -Wall -version -o cccp.s |> GNU C version egcs-2.92.07 19980917 (gcc2 ss-980609 experimental) |> (m68k-next-nextstep3) compiled by GNU C version egcs-2.92.07 |> 19980917 (gcc2 ss-980609 experimental). |> ../../egcs/gcc/cccp.c: In function `safe_read': |> ../../egcs/gcc/cccp.c:1072: warning: implicit declaration of |> function `read' |> ../../egcs/gcc/cccp.c: In function `safe_write': |> ../../egcs/gcc/cccp.c:1107: warning: implicit declaration of |> function `write' |> ../../egcs/gcc/expr.c:1265: Internal compiler error in function |> convert_move Here is a patch, the compiler was miscompiled due to this bug: 1998-09-19 Andreas Schwab * final.c (final_scan_insn): Disable CC tracking across branches, it fails to preserve all CC flags if the output routine needs to modify them. --- egcs-2.92/gcc/final.c.~1~ Tue Sep 8 14:20:48 1998 +++ egcs-2.92/gcc/final.c Sat Sep 19 22:48:06 1998 @@ -2297,6 +2297,11 @@ } #ifdef HAVE_cc0 CC_STATUS_INIT; +#if 0 + /* This does not work. NOTICE_UPDATE_CC misses the special flags + that may be set in the output routine and that may alter the + output of the following insn. */ + /* If this label is reached from only one place, set the condition codes from the instruction just before the branch. */ if (LABEL_NUSES (insn) == 1) @@ -2318,6 +2323,7 @@ NOTICE_UPDATE_CC (PATTERN (jump), jump); } } +#endif #endif if (prescan > 0) break; -- Andreas Schwab "And now for something schwab@issan.informatik.uni-dortmund.de completely different" schwab@gnu.org