)]}'
{
  "commit": "a8ba9c4fa2ae1ae80738e7848c28c19a9aa564da",
  "tree": "aa488d58663dc908865a6c672ab26aef74dfe58f",
  "parents": [
    "3874c4541a2e7fe044f02cda962657be35314deb"
  ],
  "author": {
    "name": "Peter Klausler",
    "email": "pklausler@nvidia.com",
    "time": "Mon Jan 12 15:40:44 2026 -0800"
  },
  "committer": {
    "name": "GitHub",
    "email": "noreply@github.com",
    "time": "Mon Jan 12 15:40:44 2026 -0800"
  },
  "message": "[flang] Fix spurious NaN  result from infinite Kahan summation (#175373)\n\nThere are six instances of Kahan\u0027s extended precision summation\nalgorithm in flang/flang-rt, and they share a bug: the calculation of\nthe correction value produces a Nan due to the subtraction Inf-Inf after\nthe accumulation saturates to Inf. This leads to the surprising Nan\nresult from SUM([Inf, 0.]).\n\nThis bug doesn\u0027t affect run-time calculation of SUM when optimization is\nenabled -- lowering emits an open-coded SUM that lacks Kahan summation\n-- but it does affect compilation-time folding and -O0 runtime results.\n\nFix the one instance of Kahan summation in the runtime, and consolidate\nthe other five instances in Evaluate into one new member function, also\ncorrected.\n\nFixes https://github.com/llvm/llvm-project/issues/89528.",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "a76e228f18a4efa0e22ef4dd0229ff121904f24d",
      "old_mode": 33188,
      "old_path": "flang-rt/lib/runtime/sum.cpp",
      "new_id": "0c540606f27c3c85eb35b886b96bb725f88e8ecf",
      "new_mode": 33188,
      "new_path": "flang-rt/lib/runtime/sum.cpp"
    },
    {
      "type": "modify",
      "old_id": "3701a32042c589c56306ba58a9f089980fb49967",
      "old_mode": 33188,
      "old_path": "flang-rt/unittests/Runtime/Reduction.cpp",
      "new_id": "ac6fed1e34a9c98db68fe95d328a7be9a07ad64b",
      "new_mode": 33188,
      "new_path": "flang-rt/unittests/Runtime/Reduction.cpp"
    },
    {
      "type": "modify",
      "old_id": "720ccaf512df6f68c924a1392af43639ed33f481",
      "old_mode": 33188,
      "old_path": "flang/include/flang/Evaluate/complex.h",
      "new_id": "9781db9a25a641100ed3263dcb28afbaf13f351e",
      "new_mode": 33188,
      "new_path": "flang/include/flang/Evaluate/complex.h"
    },
    {
      "type": "modify",
      "old_id": "dcd74073a4737f2d00a2fa265f1f254850e10743",
      "old_mode": 33188,
      "old_path": "flang/include/flang/Evaluate/real.h",
      "new_id": "c0a966820d13e4c55d969d19b78759f787a54188",
      "new_mode": 33188,
      "new_path": "flang/include/flang/Evaluate/real.h"
    },
    {
      "type": "modify",
      "old_id": "ab83f193e3f3e1a6a18e059f7fb8710c9d5e3ee2",
      "old_mode": 33188,
      "old_path": "flang/lib/Evaluate/complex.cpp",
      "new_id": "a245fb38c82b92ee72156f0628cdd35c90938921",
      "new_mode": 33188,
      "new_path": "flang/lib/Evaluate/complex.cpp"
    },
    {
      "type": "modify",
      "old_id": "ae9221f9ce042c4098d635661f7f5844be41fbb1",
      "old_mode": 33188,
      "old_path": "flang/lib/Evaluate/fold-matmul.h",
      "new_id": "a8a24c09774e890afe7cd3701cbf076648734072",
      "new_mode": 33188,
      "new_path": "flang/lib/Evaluate/fold-matmul.h"
    },
    {
      "type": "modify",
      "old_id": "907d01b005a041ec777b43f5c3f9698544111199",
      "old_mode": 33188,
      "old_path": "flang/lib/Evaluate/fold-real.cpp",
      "new_id": "9c591e2ef36ecd12e72807371517ccdf5ceeabff",
      "new_mode": 33188,
      "new_path": "flang/lib/Evaluate/fold-real.cpp"
    },
    {
      "type": "modify",
      "old_id": "fe897393fe13ebb48eb8326a6921fd81fdc60bbd",
      "old_mode": 33188,
      "old_path": "flang/lib/Evaluate/fold-reduction.h",
      "new_id": "a068364135295fb74255cb1b9817d48e9e7efba1",
      "new_mode": 33188,
      "new_path": "flang/lib/Evaluate/fold-reduction.h"
    },
    {
      "type": "modify",
      "old_id": "6e6b9f3ac77c2239619089bfb1de9610e04afd19",
      "old_mode": 33188,
      "old_path": "flang/lib/Evaluate/real.cpp",
      "new_id": "eb335ce328517e2ae5a31bb217b48fdfb69c4e46",
      "new_mode": 33188,
      "new_path": "flang/lib/Evaluate/real.cpp"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "281f35bf653c4aea3d567db1b9a16297b64b5eac",
      "new_mode": 33188,
      "new_path": "flang/test/Evaluate/bug89528.f90"
    }
  ]
}
