+2015-01-15  Joel Brobecker  <brobecker@adacore.com>
+
+       * ada-lang.c (ada_array_bound_from_type): Ignore array's parallel
+       ___XA type if the array has already been fixed.
+
 2015-01-14  Yao Qi  <yao@codesourcery.com>
 
        * Makefile.in (ppc-linux.o): New rule.
 
   else
     type = arr_type;
 
-  index_type_desc = ada_find_parallel_type (type, "___XA");
-  ada_fixup_array_indexes_type (index_type_desc);
+  if (TYPE_FIXED_INSTANCE (type))
+    {
+      /* The array has already been fixed, so we do not need to
+        check the parallel ___XA type again.  That encoding has
+        already been applied, so ignore it now.  */
+      index_type_desc = NULL;
+    }
+  else
+    {
+      index_type_desc = ada_find_parallel_type (type, "___XA");
+      ada_fixup_array_indexes_type (index_type_desc);
+    }
+
   if (index_type_desc != NULL)
     index_type = to_fixed_range_type (TYPE_FIELD_TYPE (index_type_desc, n - 1),
                                      NULL);
 
+2015-01-15  Joel Brobecker  <brobecker@adacore.com>
+
+       * gdb.ada/var_arr_attrs: New testcase.
+
 2015-01-14  Pedro Alves  <palves@redhat.com>
            Joel Brobecker  <brobecker@adacore.com>
 
 
--- /dev/null
+# Copyright 2015 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+load_lib "ada.exp"
+
+standard_ada_testfile foo_o115_002
+
+if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug]] != "" } {
+  return -1
+}
+
+clean_restart ${testfile}
+
+set bp_location [gdb_get_line_number "STOP" ${testdir}/foo_o115_002.adb]
+runto "foo_o115_002.adb:$bp_location"
+
+gdb_test "print my_object.data'first" " = 1"
+
+gdb_test "print my_object.data'last" " = 3"
+
+gdb_test "print my_object.data'length" " = 3"
+
+gdb_test "print my_small_object.data'first" " = 1"
+
+gdb_test "print my_small_object.data'last" " = 3"
+
+gdb_test "print my_small_object.data'length" " = 3"
 
--- /dev/null
+--  Copyright 2015 Free Software Foundation, Inc.
+--
+--  This program is free software; you can redistribute it and/or modify
+--  it under the terms of the GNU General Public License as published by
+--  the Free Software Foundation; either version 3 of the License, or
+--  (at your option) any later version.
+--
+--  This program is distributed in the hope that it will be useful,
+--  but WITHOUT ANY WARRANTY; without even the implied warranty of
+--  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+--  GNU General Public License for more details.
+--
+--  You should have received a copy of the GNU General Public License
+--  along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+with Pck; use Pck;
+
+procedure Foo_O115_002 is
+   My_Object : Object := (N => 3, Data => (3, 5, 8));
+   My_Small_Object : Small_Object := (N => 3, Data => (3, 5, 8));
+begin
+   Do_Nothing (My_Object'Address);             -- STOP
+   Do_Nothing (My_Small_Object'Address);
+end Foo_O115_002;
+
 
--- /dev/null
+--  Copyright 2015 Free Software Foundation, Inc.
+--
+--  This program is free software; you can redistribute it and/or modify
+--  it under the terms of the GNU General Public License as published by
+--  the Free Software Foundation; either version 3 of the License, or
+--  (at your option) any later version.
+--
+--  This program is distributed in the hope that it will be useful,
+--  but WITHOUT ANY WARRANTY; without even the implied warranty of
+--  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+--  GNU General Public License for more details.
+--
+--  You should have received a copy of the GNU General Public License
+--  along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+package body Pck is
+   procedure Do_Nothing (A : System.Address) is
+   begin
+      null;
+   end Do_Nothing;
+end Pck;
 
--- /dev/null
+--  Copyright 2015 Free Software Foundation, Inc.
+--
+--  This program is free software; you can redistribute it and/or modify
+--  it under the terms of the GNU General Public License as published by
+--  the Free Software Foundation; either version 3 of the License, or
+--  (at your option) any later version.
+--
+--  This program is distributed in the hope that it will be useful,
+--  but WITHOUT ANY WARRANTY; without even the implied warranty of
+--  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+--  GNU General Public License for more details.
+--
+--  You should have received a copy of the GNU General Public License
+--  along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+with System;
+package Pck is
+
+   type Table is array (Positive range <>) of Integer;
+
+   type Object (N : Integer) is record
+       Data : Table (1 .. N);
+   end record;
+
+   type Small is new Integer range 0 .. 255;
+   for Small'Size use 8;
+
+   type Small_Table is array (Positive range <>) of Small;
+   pragma Pack (Small_Table);
+
+   type Small_Object (N : Integer) is record
+       Data : Table (1 .. N);
+   end record;
+
+   procedure Do_Nothing (A : System.Address);
+end Pck;