Regtested patches for high priority PRs on 3.2.2

Christian Ehrhardt ehrhardt@mathematik.uni-ulm.de
Sat Dec 21 09:47:00 GMT 2002


Hi,

these are 4 independant and very small patches that fix high priority
bug-reports in 3.2.2. I regtested them together on sparc-sun-solaris with no
regressions.

This patch fixes PR 3782 (ICE with cc1plus -quiet -fstats. It is an
issue with 3.3 and 3.4 as well.

--- gcc/timevar.c.orig	Tue Dec 10 13:01:22 2002
+++ gcc/timevar.c	Tue Dec 10 13:05:28 2002
@@ -404,7 +404,7 @@
       timevar_accumulate (elapsed, &tv->start_time, &now);
     }
   /* Or is TIMEVAR at the top of the timer stack?  */
-  else if (stack->timevar == tv)
+  else if (stack && stack->timevar == tv)
     {
       get_time (&now);
       timevar_accumulate (elapsed, &start_time, &now);

This patch fixes the ICE in PR 6794, it is already in 3.3, this is
the ChangeLog entry, that this hunk is a part of:
 revision 1.336
 date: 2002/10/15 22:03:53;  author: jason;  state: Exp;  lines: +22 -4
         * call.c (call_builtin_trap): New fn.
         (convert_arg_to_ellipsis): Use it.  Downgrade error to warning.
         (build_call): Don't set current_function_returns_abnormally outside
         a function.


--- call.c.orig	Thu Dec 19 11:42:41 2002
+++ call.c	Thu Dec 19 11:42:56 2002
@@ -408,7 +408,7 @@
   nothrow = ((decl && TREE_NOTHROW (decl))
 	     || TYPE_NOTHROW_P (TREE_TYPE (TREE_TYPE (function))));
 
-  if (decl && TREE_THIS_VOLATILE (decl))
+  if (decl && TREE_THIS_VOLATILE (decl) && cfun)
     current_function_returns_abnormally = 1;
 
   if (decl && TREE_DEPRECATED (decl))

This patch is from RTH as a response to my analysis of PR 6815, i.e.
it might well show up with RTHs next cvs commit.

--- cfganal.c.orig	Thu Dec 19 11:34:43 2002
+++ cfganal.c	Thu Dec 19 11:38:39 2002
@@ -328,10 +328,11 @@
 
 	  for (e = bb->succ; e; e = e->succ_next)
 	    if (e->dest == EXIT_BLOCK_PTR)
-	      break;
-
-	  insert_insn_on_edge (gen_rtx_USE (VOIDmode, const0_rtx), e);
-	  commit_edge_insertions ();
+	      {
+	        insert_insn_on_edge (gen_rtx_USE (VOIDmode, const0_rtx), e);
+	        commit_edge_insertions ();
+	        break;
+	      }
 	}
     }

Unfortunatly I lost the testcase for this one but it was a tree checking
failure if context was an error_mark_node.

--- gcc/cp/decl.c.orig	Wed Dec 11 19:00:48 2002
+++ gcc/cp/decl.c	Wed Dec 11 19:03:27 2002
@@ -5692,7 +5692,7 @@
 	{
           tree t;
 
-	  if (!IS_AGGR_TYPE (context))
+	  if (context == error_mark_node || !IS_AGGR_TYPE (context))
 	    {
 	      if (complain & tf_error)
 		error ("no type named `%#T' in `%#T'", name, context);


    regards   Christian Ehrhardt

-- 
THAT'S ALL FOLKS!

----- End forwarded message -----

-- 
-- 
****************************************************************************
** Christian Ehrhardt  **  e-Mail: ehrhardt@mathematik.uni-ulm.de  *********
****************************************************************************

THAT'S ALL FOLKS!



More information about the Gcc-patches mailing list