)]}'
{
  "commit": "001f9af67f1adad05abcf9b3e83ecee163fa0f13",
  "tree": "9ac7a98af472cd4a0d6557108243739619a3d0ad",
  "parents": [
    "9d55126b9c44d6373de71960f1780ee2918f1efe"
  ],
  "author": {
    "name": "Mikael Morin",
    "email": "mikael@gcc.gnu.org",
    "time": "Fri Aug 28 10:28:20 2026 +0200"
  },
  "committer": {
    "name": "Mikael Morin",
    "email": "mikael@gcc.gnu.org",
    "time": "Fri Aug 28 10:29:56 2026 +0200"
  },
  "message": "fortran: array descriptor: Move null actual creation [PR122521]\n\nThe creation of a descriptor corresponding to a null() actual argument is\nrepeated three times in conv_null_actual to handle three different cases.\nFactor that code to a common function in to trans-descriptor.cc.\n\nThe factored code consisted of calling the scalar descriptor generator,\nand then generating a modification of the descriptor rank.  This was\nproducing correct initialization code for the descriptor, but with a\nwrong type and an incorrect zero GFC_TYPE_ARRAY_RANK attached to it.  So\nthis change additionnally inlines the scalar descriptor generation,\nreplacing the hardcoded zero rank with the true rank passed as argument, so\nthat the variable has the right type and is directly generated with the\ncorrect rank.  With this, the descriptor is bigger because of a non-empty\narray of useless (and uninitialized) dimensions, but it\u0027s the type that is\nexpected from within the procedure.\n\nMore, the scalar descriptor generation, as an argument passing\nimplementation detail, was generating code copying back to the original\nvariable on return.  This is not applicable to null() actual arguments and\nthis change removes it from the inlined code.  That part actually used to\ncause a gimplification failure for copy back code that looked like this:\n    \u0026C.5048 \u003d (void * *) desc.14.data;\nHarald provided a workaround for this with his r15-6408-gd637e6d069ade7 [1]\nnull() work, that changed the intent attribute of an argument in one of the\nthree places modified here.  This change, having removed the offending code,\nremoves the workaround as well.\n\n[1]: https://gcc.gnu.org/pipermail/gcc-patches/2024-December/671673.html\n\n\tPR fortran/122521\n\ngcc/fortran/ChangeLog:\n\n\t* trans-expr.cc (conv_null_actual): Remove dummy symbol intent\n\tattribute modification.  Move the three times repeated descriptor\n\tinitialization...\n\t* trans-descriptor.cc (gfc_create_null_actual_descriptor): ...\n\there as a new function and inline the call to\n\tgfc_conv_scalar_to_descriptor.  Remove the inapplicable or\n\tredundant parts from the inlined code.  Create lower and upper\n\tbounds arrays and clear them before passing to the type creation\n\tfunction.\n\t* trans-descriptor.h (gfc_create_null_actual_descriptor): New\n\tdeclaration.\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "85a9471bcf1d99913049ffacd4ec83837a1eb78e",
      "old_mode": 33188,
      "old_path": "gcc/fortran/trans-descriptor.cc",
      "new_id": "9c273bf10ea9f9714485b1c7bb77647ee2bbf0ea",
      "new_mode": 33188,
      "new_path": "gcc/fortran/trans-descriptor.cc"
    },
    {
      "type": "modify",
      "old_id": "80f5db72d842230ab6de18c6fd74eaad2ff1ffde",
      "old_mode": 33188,
      "old_path": "gcc/fortran/trans-descriptor.h",
      "new_id": "c7f3df02def68ffc97057c7ec884f865d69f3c3e",
      "new_mode": 33188,
      "new_path": "gcc/fortran/trans-descriptor.h"
    },
    {
      "type": "modify",
      "old_id": "6a85fc535614f6782f4ef755d16ec4f1dda98d3a",
      "old_mode": 33188,
      "old_path": "gcc/fortran/trans-expr.cc",
      "new_id": "82831b22f776ebe59131d4de36a6a0a4b230f148",
      "new_mode": 33188,
      "new_path": "gcc/fortran/trans-expr.cc"
    }
  ]
}
