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]

[tuples] add assertion to gimple_call_flags


I had this lying around, and had forgotten to commit it.

Committed to branch.

	* gimple.c (gimple_call_flags): Make sure this is a GIMPLE_CALL.

Index: gimple.c
===================================================================
--- gimple.c	(revision 127493)
+++ gimple.c	(working copy)
@@ -1047,9 +1047,11 @@ int
 gimple_call_flags (gimple stmt)
 {
   int flags;
-  tree decl = gimple_call_fndecl (stmt);
-  tree t;
+  tree decl, t;
 
+  gcc_assert (gimple_code (stmt) == GIMPLE_CALL);
+
+  decl = gimple_call_fndecl (stmt);
   if (decl)
     flags = flags_from_decl_or_type (decl);
   else


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