Hi Andre – I have a question for you - see below.

Hi Yuao,

Yuao Ma wrote:

email content. The newly attached patch removes the unnecessary {} and
reformats it.

LGTM. Thanks.

* * *

@Andre: Can you check whether the following code can now be removed
as unreachable?

The pointer part seems to be handled now - based on the dumps.
Admittedly, I don't understand the comment completely as the
check only checks for pointerness and not for being the same
type. [Frankly, have not tried to understand the code.]

--- a/gcc/fortran/trans-intrinsic.cc
+++ b/gcc/fortran/trans-intrinsic.cc
@@ -12561,9 +12561,2 @@ conv_intrinsic_atomic_op (gfc_code *code)
- if (!POINTER_TYPE_P (TREE_TYPE (value)))
-       {
-         tmp = gfc_create_var (TREE_TYPE (TREE_TYPE (atom)), "value");
-         gfc_add_modify (&block, tmp, fold_convert (TREE_TYPE (tmp), value));
-          value = gfc_build_addr_expr (NULL_TREE, tmp);
-       }
-
       gfc_init_se (&argse, NULL);
@@ -12721,11 +12714,2 @@ conv_intrinsic_atomic_ref (gfc_code *code)
       gfc_add_block_to_block (&block, &argse.pre);
-
-      /* Different type, need type conversion.  */
-      if (!POINTER_TYPE_P (TREE_TYPE (value)))
-       {
-         vardecl = gfc_create_var (TREE_TYPE (TREE_TYPE (atom)), "value");
-          orig_value = value;
-          value = gfc_build_addr_expr (NULL_TREE, vardecl);
-       }
-
       tmp = build_call_expr_loc (input_location, gfor_fndecl_caf_atomic_ref, 7,

Thanks,

Tobias

Reply via email to