)]}'
{
  "commit": "f59c4d4a6a30c655afb53236eee2bda9e2d2cbb2",
  "tree": "e2e747f01822ef2f7f9f34df66687a23a4912825",
  "parents": [
    "e68026cd01d87a89d52c74238d4c1bff8764f9fc"
  ],
  "author": {
    "name": "Gary Dismukes",
    "email": "dismukes@adacore.com",
    "time": "Sat Mar 08 01:05:35 2025 +0000"
  },
  "committer": {
    "name": "Eric Botcazou",
    "email": "ebotcazou@adacore.com",
    "time": "Mon Jun 09 10:22:52 2025 +0200"
  },
  "message": "ada: Missing discriminant check on assignment of Bounded_Vector aggregate\n\nWhen a container aggregate for a Bounded_Vector type involves an iterated\nassociation that is assigned to a vector object whose capacity (as defined\nby the Capacity discriminant) is less than the number of elements of the\naggregate, Constraint_Error should be raised due to failing a discriminant\ncheck on the assignment. But the compiler fails to do proper expansion,\nplus omits the check, and instead creates a temporary whose capacity is\nbounded by that of the target vector of the assignment. It attempts to\nassign all elements of the aggregate to the temporary, resulting in\na failure on a call to the Replace_Element operation that assigns past\nthe length of the temporary vector (which can result in a Storage_Error\ndue to a segment violation).\n\nThis is fixed by ensuring that the temporary object is declared with\nan unconstrained base subtype rather than the assignment target\u0027s\nconstrained subtype.\n\ngcc/ada/ChangeLog:\n\n\t* exp_aggr.adb (Expand_Container_Aggregate): Use the Base_Type of the\n\tsubtype provided by the context as the subtype of the temporary object\n\tinitialized by the aggregate.\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "8f1869cc70916569f2a509888db62ef9c4e94663",
      "old_mode": 33188,
      "old_path": "gcc/ada/exp_aggr.adb",
      "new_id": "f4674f565e6545c46251026ffe43af14ae0723c7",
      "new_mode": 33188,
      "new_path": "gcc/ada/exp_aggr.adb"
    }
  ]
}
