]> git.ipfire.org Git - thirdparty/gcc.git/blobdiff - gcc/ipa-pure-const.c
Merger of git branch "gimple-classes-v2-option-3"
[thirdparty/gcc.git] / gcc / ipa-pure-const.c
index 50d7300cc4f4e8766f991a2f180ae1cfecbac5d8..9c016c1d5862e8474aec300573dc20f15210dca5 100644 (file)
@@ -518,7 +518,7 @@ special_builtin_state (enum pure_const_state_e *state, bool *looping,
    the entire call expression.  */
 
 static void
-check_call (funct_state local, gimple call, bool ipa)
+check_call (funct_state local, gcall *call, bool ipa)
 {
   int flags = gimple_call_flags (call);
   tree callee_t = gimple_call_fndecl (call);
@@ -745,10 +745,10 @@ check_stmt (gimple_stmt_iterator *gsip, funct_state local, bool ipa)
   switch (gimple_code (stmt))
     {
     case GIMPLE_CALL:
-      check_call (local, stmt, ipa);
+      check_call (local, as_a <gcall *> (stmt), ipa);
       break;
     case GIMPLE_LABEL:
-      if (DECL_NONLOCAL (gimple_label_label (stmt)))
+      if (DECL_NONLOCAL (gimple_label_label (as_a <glabel *> (stmt))))
        /* Target of long jump. */
        {
           if (dump_file)
@@ -757,7 +757,7 @@ check_stmt (gimple_stmt_iterator *gsip, funct_state local, bool ipa)
        }
       break;
     case GIMPLE_ASM:
-      if (gimple_asm_clobbers_memory_p (stmt))
+      if (gimple_asm_clobbers_memory_p (as_a <gasm *> (stmt)))
        {
          if (dump_file)
            fprintf (dump_file, "    memory asm clobber is not const/pure\n");
@@ -765,7 +765,7 @@ check_stmt (gimple_stmt_iterator *gsip, funct_state local, bool ipa)
          local->pure_const_state = IPA_NEITHER;
          local->can_free = true;
        }
-      if (gimple_asm_volatile_p (stmt))
+      if (gimple_asm_volatile_p (as_a <gasm *> (stmt)))
        {
          if (dump_file)
            fprintf (dump_file, "    volatile is not const/pure\n");