This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[tuples] add assertion to gimple_call_flags
- From: Aldy Hernandez <aldyh at redhat dot com>
- To: gcc-patches at gcc dot gnu dot org
- Date: Tue, 14 Aug 2007 19:01:35 -0400
- Subject: [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