]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
elfos.h (ASM_DECLARE_OBJECT_NAME): Use decl size instead of type size.
authorIlya Enkovich <ilya.enkovich@intel.com>
Thu, 7 Aug 2014 08:04:55 +0000 (08:04 +0000)
committerKirill Yukhin <kyukhin@gcc.gnu.org>
Thu, 7 Aug 2014 08:04:55 +0000 (08:04 +0000)
gcc/
* config/elfos.h (ASM_DECLARE_OBJECT_NAME): Use decl size
instead of type size.
(ASM_FINISH_DECLARE_OBJECT): Likewise.

gcc/testsuite/
* gcc.target/i386/struct-size.c: New.

From-SVN: r213699

gcc/ChangeLog
gcc/config/elfos.h
gcc/testsuite/ChangeLog

index dc23b90d2789358c1122d5a1fcc20b834584611e..76c6d55f03c068848081ea6de0fe25d230ecf76f 100644 (file)
@@ -1,3 +1,9 @@
+2013-08-07  Ilya Enkovich  <ilya.enkovich@intel.com>
+
+       * config/elfos.h (ASM_DECLARE_OBJECT_NAME): Use decl size
+       instead of type size.
+       (ASM_FINISH_DECLARE_OBJECT): Likewise.
+
 2014-08-07  Marat Zakirov  <m.zakirov@samsung.com>
 
        * config/arm/thumb1.md (*thumb1_movhi_insn): Handle stack pointer.
index c1d5553123d393185e143c7fbb93fc4e3d0a8d5d..7929708cbefc633e9889332a54be29ee5541ae0b 100644 (file)
@@ -313,7 +313,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
          && (DECL) && DECL_SIZE (DECL))                                \
        {                                                               \
          size_directive_output = 1;                                    \
-         size = int_size_in_bytes (TREE_TYPE (DECL));                  \
+         size = tree_to_uhwi (DECL_SIZE_UNIT (DECL));                  \
          ASM_OUTPUT_SIZE_DIRECTIVE (FILE, NAME, size);                 \
        }                                                               \
                                                                        \
@@ -341,7 +341,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
          && !size_directive_output)                            \
        {                                                       \
          size_directive_output = 1;                            \
-         size = int_size_in_bytes (TREE_TYPE (DECL));          \
+         size = tree_to_uhwi (DECL_SIZE_UNIT (DECL));          \
          ASM_OUTPUT_SIZE_DIRECTIVE (FILE, name, size);         \
        }                                                       \
     }                                                          \
index 1270a35779892e7403efa7af708bd01dd049e58e..248a3cc701ee63312ccf33df8b9fc36f317b8b1b 100644 (file)
@@ -1,3 +1,7 @@
+2013-08-07  Ilya Enkovich  <ilya.enkovich@intel.com>
+
+       * gcc.target/i386/struct-size.c: New.
+
 2014-08-07  Tom de Vries  <tom@codesourcery.com>
 
        * gcc.dg/cproj-fails-with-broken-glibc.c: Remove test.