--- gcc/ipa-pure-const.c 2010-04-02 14:54:46.000000000 -0500 +++ gcc/ipa-pure-const.c 2011-02-24 16:10:26.000000000 -0600 @@ -416,6 +416,14 @@ check_stmt (gimple_stmt_iterator *gsip, print_gimple_stmt (dump_file, stmt, 0, 0); } + if (gimple_has_volatile_ops (stmt)) + { + local->pure_const_state = IPA_NEITHER; + if (dump_file) + fprintf (dump_file, " Volatile stmt is not const/pure\n"); + } + + /* Look for loads and stores. */ walk_stmt_load_store_ops (stmt, local, check_load, check_store);