)]}'
{
  "commit": "fcbffd54fed2543a7fe1e6cb00a985290ce4b3e0",
  "tree": "c8bf2cf46d37063f449dbdf6fbc1ff355ef012cc",
  "parents": [
    "252371f178c26bd284bd4b6162d739ec08cd64fa"
  ],
  "author": {
    "name": "lishin",
    "email": "lishin1008@gmail.com",
    "time": "Mon Apr 20 19:39:04 2026 +0100"
  },
  "committer": {
    "name": "Arthur Cohen",
    "email": "arthur.cohen@embecosm.com",
    "time": "Mon Jun 01 15:24:50 2026 +0200"
  },
  "message": "gccrs: Fix ICE cloning trait functions without return types\n\nFixes Rust-GCC/gccrs#3972.\n\nTrait functions without an explicit return type can have a null\n`return_type` in `TraitFunctionDecl`. When such declarations are copied,\nthe copy constructor and assignment operator currently try to clone the\nreturn type unconditionally, and this can lead to an ICE.\n\nHandle this case by keeping `nullptr` when there is no return type to\nclone. Also add a regression test for the example from Rust-GCC/gccrs#3972.\n\ngcc/rust/ChangeLog:\n\n\t* hir/tree/rust-hir-item.cc (TraitFunctionDecl::TraitFunctionDecl):\n\tHandle null return types in copy constructor.\n\t(TraitFunctionDecl::operator\u003d): Likewise.\n\ngcc/testsuite/ChangeLog:\n\n\t* rust/compile/issue-3972.rs: New test.\n\nSigned-off-by: lishin \u003clishin1008@gmail.com\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "5e5d9b7833acce07cb2ff0081c1a9088ba1e7d05",
      "old_mode": 33188,
      "old_path": "gcc/rust/hir/tree/rust-hir-item.cc",
      "new_id": "309118cff434ca351693ed9a47e0eeca0e6e884f",
      "new_mode": 33188,
      "new_path": "gcc/rust/hir/tree/rust-hir-item.cc"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "466efc36485390dc4ee34c80e2731eb4e50a9e52",
      "new_mode": 33188,
      "new_path": "gcc/testsuite/rust/compile/issue-3972.rs"
    }
  ]
}
