)]}'
{
  "commit": "3ba1b0ac7ccbe7b01811302dc1d50dcdbd7dc2ac",
  "tree": "de4c415e8ecd5b0d74a27ced8818a3b821380032",
  "parents": [
    "fedf81ef7b98e5c9ac899b8641bb670746c51205"
  ],
  "author": {
    "name": "Nathaniel Shead",
    "email": "nathanieloshead@gmail.com",
    "time": "Mon May 19 23:17:16 2025 +1000"
  },
  "committer": {
    "name": "Nathaniel Shead",
    "email": "nathanieloshead@gmail.com",
    "time": "Tue May 20 12:11:27 2025 +1000"
  },
  "message": "c++/modules: Always mark tinfo vars as TREE_ADDRESSABLE [PR120350]\n\nWe need to mark type info decls as addressable if we take them by\nreference; this is done by walking the declaration during parsing and\nmarking the decl as needed.\n\nHowever, with modules we don\u0027t stream tinfo decls directly; rather we\nstream just their name and type and reconstruct them in the importer\ndirectly.  This means that any addressable flags are not propagated, and\nwe error because TREE_ADDRESSABLE is not set despite taking its address.\n\nBut tinfo decls should always have TREE_ADDRESSABLE set, as any attempt\nto use the tinfo decl will go through build_address anyway.  So this\npatch fixes the issue by eagerly marking the constructed decl as\nTREE_ADDRESSABLE so that modules gets this flag correctly set as well.\n\n\tPR c++/120350\n\ngcc/cp/ChangeLog:\n\n\t* rtti.cc (get_tinfo_decl_direct): Mark TREE_ADDRESSABLE.\n\ngcc/testsuite/ChangeLog:\n\n\t* g++.dg/modules/tinfo-3_a.H: New test.\n\t* g++.dg/modules/tinfo-3_b.C: New test.\n\nSigned-off-by: Nathaniel Shead \u003cnathanieloshead@gmail.com\u003e\nReviewed-by: Jason Merrill \u003cjason@redhat.com\u003e\n(cherry picked from commit 9a6e5a437f0416627ee516f6ef5929cb30c5e498)\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "353996206f5c5fd80c5b34a725a617228596108e",
      "old_mode": 33188,
      "old_path": "gcc/cp/rtti.cc",
      "new_id": "8393301f689748e85db5983ae2990c7510369476",
      "new_mode": 33188,
      "new_path": "gcc/cp/rtti.cc"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "8b53e9848b05d6e06d130111e0d8fe4ec165644a",
      "new_mode": 33188,
      "new_path": "gcc/testsuite/g++.dg/modules/tinfo-3_a.H"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "95e02ab5c81ea3f5ef98961b79109600bf539b5b",
      "new_mode": 33188,
      "new_path": "gcc/testsuite/g++.dg/modules/tinfo-3_b.C"
    }
  ]
}
