Current CVS'd snapshot build dies on m68k-next-nextstep3 compiling cccp.c for stage 3

Andreas Schwab schwab@issan.informatik.uni-dortmund.de
Mon Sep 21 07:32:00 GMT 1998


Toon Moene <toon@moene.indiv.nluug.nl> 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  <schwab@issan.informatik.uni-dortmund.de>

	* 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



More information about the Gcc mailing list