diff options
author | Eric Botcazou <ebotcazou@gcc.gnu.org> | 2007-12-06 22:39:58 +0000 |
---|---|---|
committer | Eric Botcazou <ebotcazou@gcc.gnu.org> | 2007-12-06 22:39:58 +0000 |
commit | 4039fb351c2611af9db36bf80fa8ba868525768a (patch) | |
tree | 1571923bdf04a948d01ee9887380c0f17bb6f2a0 /gcc/ada/utils.c | |
parent | 4c42b3d84fb4bd1539147b3aa1834d935818b869 (diff) | |
download | gcc-4039fb351c2611af9db36bf80fa8ba868525768a.zip gcc-4039fb351c2611af9db36bf80fa8ba868525768a.tar.gz gcc-4039fb351c2611af9db36bf80fa8ba868525768a.tar.bz2 |
decl.c (make_packable_type): Revert last change.
* decl.c (make_packable_type): Revert last change.
(gnat_to_gnu_field): Avoid setting size and position multiple times.
* utils.c (finish_record_type): Retrieve the real name of the type.
From-SVN: r130665
Diffstat (limited to 'gcc/ada/utils.c')
-rw-r--r-- | gcc/ada/utils.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/gcc/ada/utils.c b/gcc/ada/utils.c index e11ce2b..33448fc 100644 --- a/gcc/ada/utils.c +++ b/gcc/ada/utils.c @@ -747,6 +747,7 @@ finish_record_type (tree record_type, tree fieldlist, int rep_level, bool do_not_finalize) { enum tree_code code = TREE_CODE (record_type); + tree name = TYPE_NAME (record_type); tree ada_size = bitsize_zero_node; tree size = bitsize_zero_node; bool var_size = false; @@ -754,9 +755,11 @@ finish_record_type (tree record_type, tree fieldlist, int rep_level, bool had_size_unit = TYPE_SIZE_UNIT (record_type) != 0; tree field; + if (name && TREE_CODE (name) == TYPE_DECL) + name = DECL_NAME (name); + TYPE_FIELDS (record_type) = fieldlist; - TYPE_STUB_DECL (record_type) - = build_decl (TYPE_DECL, TYPE_NAME (record_type), record_type); + TYPE_STUB_DECL (record_type) = build_decl (TYPE_DECL, name, record_type); /* We don't need both the typedef name and the record name output in the debugging information, since they are the same. */ |