OSDN Git Service

* gcc-interface/decl.c (make_aligning_type): Declare the type.
authorebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 8 May 2010 11:38:26 +0000 (11:38 +0000)
committerMasaki Muranaka <monaka@monami-software.com>
Sun, 23 May 2010 05:03:24 +0000 (14:03 +0900)
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@159183 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ada/ChangeLog
gcc/ada/gcc-interface/decl.c
gcc/testsuite/ChangeLog
gcc/testsuite/gnat.dg/lto4.adb

index 2a2805a..3878ccd 100644 (file)
@@ -1,5 +1,9 @@
 2010-05-08  Eric Botcazou  <ebotcazou@adacore.com>
 
+       * gcc-interface/decl.c (make_aligning_type): Declare the type.
+
+2010-05-08  Eric Botcazou  <ebotcazou@adacore.com>
+
        * gcc-interface/decl.c (gnat_to_gnu_entity): Create variables for size
        expressions of variant part of record types declared at library level.
 
index b0334f2..6df79fb 100644 (file)
@@ -5955,8 +5955,8 @@ make_aligning_type (tree type, unsigned int align, tree size,
 
   if (TREE_CODE (name) == TYPE_DECL)
     name = DECL_NAME (name);
-
-  TYPE_NAME (record_type) = concat_name (name, "_ALIGN");
+  name = concat_name (name, "ALIGN");
+  TYPE_NAME (record_type) = name;
 
   /* Compute VOFFSET and then POS.  The next byte position multiple of some
      alignment after some address is obtained by "and"ing the alignment minus
@@ -6001,8 +6001,12 @@ make_aligning_type (tree type, unsigned int align, tree size,
                  size_int (room + align / BITS_PER_UNIT));
 
   SET_TYPE_MODE (record_type, BLKmode);
-
   relate_alias_sets (record_type, type, ALIAS_SET_COPY);
+
+  /* Declare it now since it will never be declared otherwise.  This is
+     necessary to ensure that its subtrees are properly marked.  */
+  create_type_decl (name, record_type, NULL, true, false, Empty);
+
   return record_type;
 }
 \f
index 4a18a2b..08266b1 100644 (file)
@@ -1,5 +1,9 @@
 2010-05-08  Eric Botcazou  <ebotcazou@adacore.com>
 
+       * gnat.dg/lto4.ad[sb]: New test.
+
+2010-05-08  Eric Botcazou  <ebotcazou@adacore.com>
+
        * gnat.dg/specs/lto3.ads: New test.
        * gnat.dg/specs/lto3_pkg1.ad[sb]: New helper.
        * gnat.dg/specs/lto3_pkg2.ad[sb]: Likewise.
index 8bb57b4..4e84b1d 100644 (file)
@@ -1,5 +1,5 @@
 -- { dg-do compile }
--- { dg-options "-flto" { target lto } }
+-- { dg-options "-flto" }
 
 package body Lto4 is