This is the mail archive of the gcc-patches@gcc.gnu.org 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] except.c nothrow_function_p() walks INSN_LIST chain wrong


In the same analysis as yesterday's patch to varasm.c, we have a 
similar piece of code that
passes an INSN_LIST rtx to a function that will reject anything that 
isn't an INSN.

This is clearly wrong (and different from all other walks of the 
current_function_epilogue_delay_list)
without the patch.

I don't have a g++ compiler for my port with delay slots, but the 
SPARC does and today it
looks like a bootstrap  actually is working with the latest mainline sources.


31-May-2002  Alan Lehotsky  <apl@alum.mit.edu>
	* except.c (nothrow_function_p): Call can_throw_external witb INSN,
	not INSN_LIST RTX.


Index: except.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/except.c,v
retrieving revision 1.220
diff -u -p -d -r1.220 except.c
--- except.c    23 May 2002 15:22:05 -0000      1.220
+++ except.c    1 Jun 2002 00:02:10 -0000
@@ -3147,7 +3147,7 @@ nothrow_function_p ()
        return false;
    for (insn = current_function_epilogue_delay_list; insn;
         insn = XEXP (insn, 1))
-    if (can_throw_external (insn))
+    if (can_throw_external (XEXP (insn, 0)))
        return false;

    return true;

-- 
		    Quality Software Management
		http://home.earthlink.net/~qsmgmt
		          apl@alum.mit.edu
		          (978)287-0435 Voice
		          (978)808-6836 Cell

	Software Process Improvement / Management Consulting
	     Language Design / Compiler Implementation


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