)]}'
{
  "commit": "7c459132de478dbede44e323e195073e8d2bca55",
  "tree": "2f1ef6632282362e8518f43066196308dc9015ac",
  "parents": [
    "19fbd361c496ffc75cb20e9245031a506d4f0d9a"
  ],
  "author": {
    "name": "Jakub Jelinek",
    "email": "jakub@redhat.com",
    "time": "Mon Aug 31 09:38:43 2026 +0200"
  },
  "committer": {
    "name": "Jakub Jelinek",
    "email": "jakub@gcc.gnu.org",
    "time": "Mon Aug 31 09:40:40 2026 +0200"
  },
  "message": "c++: Fix mangling of aggregates containing std::meta::info [PR126922]\n\nWe ICE during mangling on the following testcase.\nThere are two problems on it.\nOne is the use of build_zero_cst for skipped members when\nusing designated initializers.  build_zero_cst is a gcc/tree.cc\nfunction, so it doesn\u0027t know about META_TYPE and how to create a zero\nconstant for it.\nWe could call probably build_zero_init instead, but it does significantly\nmore work and apparently (from what I\u0027ve been playing with e.g. using\npointer-to-data-member types etc.) it isn\u0027t needed except for the reflection\ncase, so this patch just calls get_null_reflection () for reflections\nand keeps using build_zero_cst for everything else.\nAnother problem is that we mangle\nA { .a \u003d {}, .b \u003d {} }\nvs.\nA { .a \u003d {} }\ndifferently, although both have the same value.  If a and b fields have\npointer-to-data-member type instead (or int), the zero initialized members\nare skipped from the tl value list, and this patch changes zero_init_expr_p\nso that it handles null reflections the same way (before P4101 mangling\nis probably the only way to observe whether null reflection is all zeros or\nnot).\n\n2026-08-31  Jakub Jelinek  \u003cjakub@redhat.com\u003e\n\n\tPR c++/126922\n\t* mangle.cc (write_expression): For CONSTRUCTOR skipped\n\tmember of std::meta::info type, call write_expression on\n\tget_null_reflection rather than build_zero_cst.\n\t* tree.cc (zero_init_expr_p): If type is std::meta::info,\n\treturn true iff t is null reflection.\n\n\t* g++.dg/reflect/mangle10.C: New test.\n\nReviewed-by: Jason Merrill \u003cjason@redhat.com\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "bdd62611c5b15df3edb15948b7353661cf791b91",
      "old_mode": 33188,
      "old_path": "gcc/cp/mangle.cc",
      "new_id": "b2697f27c3296e040472baf0dfb8e69ad7d40cad",
      "new_mode": 33188,
      "new_path": "gcc/cp/mangle.cc"
    },
    {
      "type": "modify",
      "old_id": "e0f0b1901ad9a6e8b64d5e7d95f74ed4282e1915",
      "old_mode": 33188,
      "old_path": "gcc/cp/tree.cc",
      "new_id": "a4aec230a340f66f84ebe2200d8def288a1c78cb",
      "new_mode": 33188,
      "new_path": "gcc/cp/tree.cc"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "84751e3fe8f29ae71f83b2e33c8844ba19e0ab52",
      "new_mode": 33188,
      "new_path": "gcc/testsuite/g++.dg/reflect/mangle10.C"
    }
  ]
}
