This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] powerpc: fix PR 39254 in rs6000.c

This patch, suggested by Joern in the PR, fixes middle-end/39254, a
4.4 regression that causes test gcc.c-torture/execute/va-arg-trap-1.c
to ICE on powerpc64-linux.  Bootstrapped and regtested for all languages
but Ada on powerpc64-linux with -m32/-m64.  OK for trunk and 4.4?

2009-04-02  J"orn Rennecke  <>
	    Janis Johnson  <>

	* config/rs6000/rs6000.c (rs6000_emit_move): Don't emit a USE
	for the symbol ref of a constant that is the source of a move.

Index: gcc/config/rs6000/rs6000.c
--- gcc/config/rs6000/rs6000.c	(revision 145433)
+++ gcc/config/rs6000/rs6000.c	(working copy)
@@ -5206,14 +5206,6 @@ rs6000_emit_move (rtx dest, rtx source, 
 	       && ! legitimate_constant_pool_address_p (operands[1])
 	       && ! toc_relative_expr_p (operands[1]))
-	  /* Emit a USE operation so that the constant isn't deleted if
-	     expensive optimizations are turned on because nobody
-	     references it.  This should only be done for operands that
-	     contain SYMBOL_REFs with CONSTANT_POOL_ADDRESS_P set.
-	     This should not be done for operands that contain LABEL_REFs.
-	     For now, we just handle the obvious case.  */
-	  if (GET_CODE (operands[1]) != LABEL_REF)
-	    emit_use (operands[1]);
 	  /* Darwin uses a special PIC legitimizer.  */

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]