diff options
Diffstat (limited to 'gcc/tree-eh.c')
-rw-r--r-- | gcc/tree-eh.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/gcc/tree-eh.c b/gcc/tree-eh.c index 3a6292c1b2f..ab501d5e0a6 100644 --- a/gcc/tree-eh.c +++ b/gcc/tree-eh.c @@ -35,7 +35,7 @@ along with GCC; see the file COPYING3. If not see #include "timevar.h" #include "langhooks.h" #include "ggc.h" -#include "toplev.h" +#include "diagnostic-core.h" #include "gimple.h" #include "target.h" @@ -1877,7 +1877,7 @@ lower_eh_constructs_2 (struct leh_state *state, gimple_stmt_iterator *gsi) else { /* The user has dome something silly. Remove it. */ - rhs = build_int_cst (ptr_type_node, 0); + rhs = null_pointer_node; goto do_replace; } break; @@ -2437,8 +2437,11 @@ tree_could_trap_p (tree expr) return false; return !in_array_bounds_p (expr); + case MEM_REF: + if (TREE_CODE (TREE_OPERAND (expr, 0)) == ADDR_EXPR) + return false; + /* Fallthru. */ case INDIRECT_REF: - case ALIGN_INDIRECT_REF: case MISALIGNED_INDIRECT_REF: return !TREE_THIS_NOTRAP (expr); |