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 RFA middle-end] Fix PR target/41993


The attached patch is to solve PR target/41993 which will affect
targets using MODE_EXIT.
Without it, we can't find all return registers for __builtin_return
in mode-switching.c:create_pre_exit.  See the trail #4 by Uros in
the PR for the details.  The patch is tested with bootstrap and
regtested on i686-pc-linux-gnu with no new failures.  It's also
tested on cross sh4-unknown-linux-gnu.
OK for trunk?

2012-11-05  Uros Bizjak  <>
	    Kaz Kojima  <>

	PR target/41993
	* mode-switching.c (create_pre_exit): Set return_copy to
	last_insn when copy_start is a pseudo reg.

--- ORIG/trunk/gcc/mode-switching.c	2012-11-05 08:07:55.000000000 +0900
+++ trunk/gcc/mode-switching.c	2012-11-05 19:22:56.000000000 +0900
@@ -324,7 +324,10 @@ create_pre_exit (int n_entities, int *en
 		    if (copy_start >= FIRST_PSEUDO_REGISTER)
-		      break;
+		      {
+			last_insn = return_copy;
+			continue;
+		      }
 		      = hard_regno_nregs[copy_start][GET_MODE (copy_reg)];

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