diff options
author | ebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-01-12 19:14:43 +0000 |
---|---|---|
committer | ebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-01-12 19:14:43 +0000 |
commit | d626a092a632d834fb1a03cfc704d81616af552b (patch) | |
tree | b9bc38ea99e07f72885d6aa102a34dd0274bb1e5 /gcc/ada | |
parent | a16c1ab035b6543fedf3a5bbbfeb732b8b02381e (diff) | |
download | gcc-d626a092a632d834fb1a03cfc704d81616af552b.tar.gz |
* gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Really strip
only useless conversions around renamed objects.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@143303 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada')
-rw-r--r-- | gcc/ada/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/ada/gcc-interface/decl.c | 5 |
2 files changed, 9 insertions, 1 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index a8ef574e7f2..33eb9882392 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,8 @@ +2009-01-12 Eric Botcazou <ebotcazou@adacore.com> + + * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Really strip + only useless conversions around renamed objects. + 2009-01-11 Eric Botcazou <ebotcazou@adacore.com> * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Record_Subtype>: Put diff --git a/gcc/ada/gcc-interface/decl.c b/gcc/ada/gcc-interface/decl.c index 0c7321d07b5..25c4d816b43 100644 --- a/gcc/ada/gcc-interface/decl.c +++ b/gcc/ada/gcc-interface/decl.c @@ -843,7 +843,10 @@ gnat_to_gnu_entity (Entity_Id gnat_entity, tree gnu_expr, int definition) == RECORD_TYPE && TYPE_IS_PADDING_P (TREE_TYPE (TREE_OPERAND (gnu_expr, 0)))) /* Strip useless conversions around the object. */ - || TREE_CODE (gnu_expr) == NOP_EXPR) + || (TREE_CODE (gnu_expr) == NOP_EXPR + && gnat_types_compatible_p + (TREE_TYPE (gnu_expr), + TREE_TYPE (TREE_OPERAND (gnu_expr, 0))))) { gnu_expr = TREE_OPERAND (gnu_expr, 0); gnu_type = TREE_TYPE (gnu_expr); |