diff options
Diffstat (limited to 'gcc/cp/semantics.c')
-rw-r--r-- | gcc/cp/semantics.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/cp/semantics.c b/gcc/cp/semantics.c index 6294e19af60..65b771f1ee2 100644 --- a/gcc/cp/semantics.c +++ b/gcc/cp/semantics.c @@ -7202,7 +7202,8 @@ cxx_fold_indirect_ref (location_t loc, tree type, tree op0, bool *empty_base) sub = op0; STRIP_NOPS (sub); subtype = TREE_TYPE (sub); - gcc_assert (POINTER_TYPE_P (subtype)); + if (!POINTER_TYPE_P (subtype)) + return NULL_TREE; if (TREE_CODE (sub) == ADDR_EXPR) { |