diff options
Diffstat (limited to 'gcc/builtins.c')
-rw-r--r-- | gcc/builtins.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/gcc/builtins.c b/gcc/builtins.c index 189aeac..9a19a75 100644 --- a/gcc/builtins.c +++ b/gcc/builtins.c @@ -5575,8 +5575,10 @@ fold_builtin_atomic_always_lock_free (tree arg0, tree arg1) end before anything else has a chance to look at it. The pointer parameter at this point is usually cast to a void *, so check for that and look past the cast. */ - if (CONVERT_EXPR_P (arg1) && POINTER_TYPE_P (ttype) - && VOID_TYPE_P (TREE_TYPE (ttype))) + if (CONVERT_EXPR_P (arg1) + && POINTER_TYPE_P (ttype) + && VOID_TYPE_P (TREE_TYPE (ttype)) + && POINTER_TYPE_P (TREE_TYPE (TREE_OPERAND (arg1, 0)))) arg1 = TREE_OPERAND (arg1, 0); ttype = TREE_TYPE (arg1); |