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]

[tree-ssa, obvious] fix tree flow verifier


Hi,

We must be pretty good. This part of the verifier is not going to work
for most GENERIC labels since they don't have a DECL_NAME, yet nobody
ever noticed before :-)

Gr.
Steven

	* tree-cfg.c (tree_verify_flow_info): Fix complaint about
	missing or wrong labels in the targets of a conditional branch.
Index: tree-cfg.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/Attic/tree-cfg.c,v
retrieving revision 1.1.4.244
diff -c -3 -p -r1.1.4.244 tree-cfg.c
*** tree-cfg.c	26 Dec 2003 22:38:27 -0000	1.1.4.244
--- tree-cfg.c	5 Jan 2004 23:21:46 -0000
*************** tree_verify_flow_info (void)
*** 3017,3028 ****
  		err = 1;
  	      }
  	    if (!has_label_p (true_edge->dest,
! 			      GOTO_DESTINATION (COND_EXPR_THEN (stmt)))
! 		|| !has_label_p (false_edge->dest,
! 				 GOTO_DESTINATION (COND_EXPR_ELSE (stmt))))
  	      {
! 		error ("Label %s does not match edge at end of bb %d\n",
! 		       IDENTIFIER_POINTER (DECL_NAME (stmt)),
  		       bb->index);
  		err = 1;
  	      }
--- 3017,3032 ----
  		err = 1;
  	      }
  	    if (!has_label_p (true_edge->dest,
! 			      GOTO_DESTINATION (COND_EXPR_THEN (stmt))))
  	      {
! 		error ("`then' label does not match edge at end of bb %d\n",
! 		       bb->index);
! 		err = 1;
! 	      }
! 	    if (!has_label_p (false_edge->dest,
! 			      GOTO_DESTINATION (COND_EXPR_ELSE (stmt))))
! 	      {
! 		error ("`else' label does not match edge at end of bb %d\n",
  		       bb->index);
  		err = 1;
  	      }


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