)]}'
{
  "commit": "90fe72f797828eabae2a876f7b4356ca7845123c",
  "tree": "e618c6940a77c72313ccb62ec87d3e84c52dc26b",
  "parents": [
    "297fe552edd546e4fe9f47c7a0765a55ce084f0c"
  ],
  "author": {
    "name": "Abdul Basit Ijaz",
    "email": "abdul.b.ijaz@intel.com",
    "time": "Wed Apr 08 10:03:57 2026 +0200"
  },
  "committer": {
    "name": "Abdul Basit Ijaz",
    "email": "abdul.b.ijaz@intel.com",
    "time": "Tue May 05 17:02:25 2026 +0200"
  },
  "message": "gdb/dwarf: Use the function scope for DW_TAG_imported_declaration\n\nAll Fortran imported variable aliases (`use module, alias \u003d\u003e var`)\nwere being added to \"global scope\", regardless of whether they appeared\nin:\n- Program/module scope (should be global)\n- Function scope (should be local)\n\nThis caused conflicts when different functions had the same alias name\npointing to different variables.\n\nDW_TAG_imported_declaration and DW_TAG_namespace cases are now handled\nseparately.  This patch modifies the case for DW_TAG_imported_\ndeclaration in the function new_symbol () to use cu-\u003elist_in_scope\ninstead of global symbols for all languages.  This ensures that\nfunction-scoped aliases use the current scope rather than being forced\ninto the global scope.\n\nBug Scenario:\n\n  subroutine sub1\n    use mod1, var_i_alias\u003d\u003evar_i  ! alias points to mod1::var_i\n    var_i_alias \u003d 3\n    var_i \u003d 4\n  end subroutine\n\n  subroutine sub2\n    use mod2, var_i_alias\u003d\u003evar_i  ! alias points to mod2::var_i\n    var_i_alias \u003d 23\n    var_i \u003d 25\n  end subroutine\n\nBefore: var_i_alias in sub2 incorrectly resolved to mod1::var_i\n(value 25)\nAfter: Each function\u0027s alias correctly resolves to its own imported\nvariable (value 23)\n\nNew test files verify the fix and include regression tests for global\nprogram-scope imports:\n  - gdb/testsuite/gdb.fortran/module_declarations.exp\n  - gdb/testsuite/gdb.fortran/module_declarations.f90\n\nBefore the change:\n(gdb) print var_i_alias\n$4 \u003d 25\nFAIL: gdb.fortran/module_declarations.exp: sub2_test: print var_i_alias\n\nAfter the change:\n(gdb) print var_i_alias\n$4 \u003d 23\nPASS: gdb.fortran/module_declarations.exp: sub2_test: print var_i_alias\n\nApproved-By: Tom Tromey \u003ctom@tromey.com\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "a1081da23170c1700133951e504975a6651a792c",
      "old_mode": 33188,
      "old_path": "gdb/dwarf2/read.c",
      "new_id": "efe96f6510dadafdb41ab1f1bccf6a80ec1173bb",
      "new_mode": 33188,
      "new_path": "gdb/dwarf2/read.c"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "8953841c59968f0d6f4cbf3181b5de2976f7cee0",
      "new_mode": 33188,
      "new_path": "gdb/testsuite/gdb.fortran/module_declarations.exp"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "314e2405b34b065ffded055b378afb7cd1427432",
      "new_mode": 33188,
      "new_path": "gdb/testsuite/gdb.fortran/module_declarations.f90"
    }
  ]
}
