)]}'
{
  "commit": "90a272c810e9ec199c37856980e6c8bf219b9014",
  "tree": "130764ab8a8bb050eff4dd03e455e2e40c6a0548",
  "parents": [
    "303400bda9e33622ab24ff3c1f82866577fc7351"
  ],
  "author": {
    "name": "Mikael Morin",
    "email": "morin-mikael@orange.fr",
    "time": "Thu Sep 10 11:37:55 2026 +0200"
  },
  "committer": {
    "name": "Mikael Morin",
    "email": "mikael@gcc.gnu.org",
    "time": "Mon Nov 16 10:11:50 2026 +0100"
  },
  "message": "fortran: Conclude non-pointer in copy-in/copy-out cases\n\nExplicitly pass false as `formal_ptr\u0027 argument to gfc_conv_subref_array_arg.\n\nThe function gfc_conv_subref_array_arg implements copy-in/copy-out for\nargument association.  It has a `formal_ptr\u0027 argument indicating whether the\ndummy has the pointer attribute.  But copy-in/copy-out is used in contexts\nwhere we can exclude any pointer dummy, so the argument can be guessed to be\nfalse.  In this change, every hunk is independant of each other and has a\nspecific context reasoning permitting the replacement of the argument by an\nexplicit false.\n\nIn gfc_conv_gfc_desc_to_cfi_desc, if the dummy is assumed-size or explicit-\nshape array, it must not have the pointer attribute (F2023, C834).\nOtherwise, it is contiguous which for pointers requires the actual argument\nto be simply contiguous (F2023, C1550).  But the actual argument isn\u0027t in\nthe context of the call, so the dummy must not have the pointer attribute.\n\nIn the first gfc_conv_procedure_call hunk, the condition used as argument\nis explicitly used negated in the guarding condition before.\n\nIn the two next gfc_conv_procedure_call hunks, the actual argument is\npolymorphic and associated with a non-polymorphic derived type dummy.  But\nthat is explicitly disallowed for pointers, for which same declared type and\nsame polymorphicness are required (F2023, 15.5.2.6).  So the dummy must not\nhave the pointer attribute.\n\nIn the last gfc_conv_procedure_call hunk, the dummy has the contiguous\nattribute, which for pointers requires the actual argument to be simply\ncontiguous (F2023, C1550).  But the actual argument isn\u0027t, so the dummy must\nnot have the pointer attribute.\n\nIn the trans_associate_var function, the symbol is an associate name, so it\ndoesn\u0027t have the pointer attribute (F2023, 11.1.3.3).\n\ngcc/fortran/ChangeLog:\n\n\t* trans-expr.cc (gfc_conv_gfc_desc_to_cfi_desc,\n\tgfc_conv_procedure_call): Explicitly pass false as `formal_ptr\u0027\n\targument to gfc_conv_subref_array_arg.\n\t* trans-stmt.cc (trans_associate_var): Likewise.\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "118ebf612a3292ba087eb82fd4114b382e97c195",
      "old_mode": 33188,
      "old_path": "gcc/fortran/trans-expr.cc",
      "new_id": "8976c153ff8b9688640923447ed19e860d9cfd79",
      "new_mode": 33188,
      "new_path": "gcc/fortran/trans-expr.cc"
    },
    {
      "type": "modify",
      "old_id": "9ec80771a1f3154d052b98b7e9c2cde4fcf966f1",
      "old_mode": 33188,
      "old_path": "gcc/fortran/trans-stmt.cc",
      "new_id": "4a09da0cf83310ab7080bae7b023f1cc667ea35e",
      "new_mode": 33188,
      "new_path": "gcc/fortran/trans-stmt.cc"
    }
  ]
}
