)]}'
{
  "commit": "5e7fa6dbae546cdc07857be19cf3aa2375e9edad",
  "tree": "e7192ac71616b3b30abb569c57d441503346a2a8",
  "parents": [
    "a0969384a83a5d65701934c1bb6e113a4d7e14b4"
  ],
  "author": {
    "name": "Jakub Jelinek",
    "email": "jakub@redhat.com",
    "time": "Tue Aug 18 20:15:45 2026 +0200"
  },
  "committer": {
    "name": "Jakub Jelinek",
    "email": "jakub@gcc.gnu.org",
    "time": "Tue Aug 18 20:18:31 2026 +0200"
  },
  "message": "c++: Fix ICE during explanation of failed __has_unique_object_representation [PR126867]\n\nThe following testcase ICEs since r16-5520 added explain\narguments to type_has_unique_obj_representations and\nrecord_has_unique_obj_representations.  Most of the location_t\narguments in that change look correct, either DECL_SOURCE_LOCATION\nof some FIELD_DECL or in type_has_unique_obj_representations use\nloc, which is initialized to\n  location_t loc \u003d input_location;\n  if (tree m \u003d TYPE_MAIN_DECL (t))\n    loc \u003d DECL_SOURCE_LOCATION (m);\nBut in record_has_unique_obj_representations we don\u0027t have\na variable like that and t at that point is the RECORD_TYPE\nor UNION_TYPE, so using DECL_SOURCE_LOCATION on it will surely ICE\nin a checking compiler.\nlocation_of call does the above dances, so it seems easiest to\ncall it rather than duplicate it by hand.\n\n2026-08-18  Jakub Jelinek  \u003cjakub@redhat.com\u003e\n\n\tPR c++/126867\n\t* tree.cc (record_has_unique_obj_representations): Use\n\tlocation_of (const_cast \u003ctree\u003e (t)) rather than\n\tDECL_SOURCE_LOCATION (t).\n\n\t* g++.dg/cpp1z/has-unique-obj-representations6.C: New test.\n\nReviewed-by: Jason Merrill \u003cjason@redhat.com\u003e\n(cherry picked from commit 318e6a4640420d5cc213df779bf751485fa56063)\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "f2ecc2df0d772dbc7ab7f7bf10ac5e8d034a2ba1",
      "old_mode": 33188,
      "old_path": "gcc/cp/tree.cc",
      "new_id": "084dfd70f6bd5105d0cc19593d42daa0c964cb74",
      "new_mode": 33188,
      "new_path": "gcc/cp/tree.cc"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "431b55ade5225304b4caebe98838fb23aed2e91a",
      "new_mode": 33188,
      "new_path": "gcc/testsuite/g++.dg/cpp1z/has-unique-obj-representations6.C"
    }
  ]
}
