diff options
author | bstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-02-20 10:38:10 +0000 |
---|---|---|
committer | bstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-02-20 10:38:10 +0000 |
commit | e7e5252e5c3c42a01498c3dffe013e71849562af (patch) | |
tree | 6e9302835ec9153549906710a2dc653b3fb1e0b7 /gcc/ada/exp_ch6.adb | |
parent | b2ef120cd90a0d02735b3f310274bdfad29429aa (diff) | |
download | gcc-e7e5252e5c3c42a01498c3dffe013e71849562af.tar.gz |
2012-02-20 Basile Starynkevitch <basile@starynkevitch.net>
MELT branch merged with trunk rev 184385 using svnmerge
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/melt-branch@184387 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/exp_ch6.adb')
-rw-r--r-- | gcc/ada/exp_ch6.adb | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/gcc/ada/exp_ch6.adb b/gcc/ada/exp_ch6.adb index 227dcd94ebe..b4d46b4c1aa 100644 --- a/gcc/ada/exp_ch6.adb +++ b/gcc/ada/exp_ch6.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2011, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2012, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -1417,8 +1417,18 @@ package body Exp_Ch6 is -- representation clauses give the actual a misaligned address. if Is_By_Reference_Type (Etype (Formal)) then - Error_Msg_N - ("misaligned actual cannot be passed by reference", Actual); + + -- If the front-end does not perform full type layout, the actual + -- may in fact be properly aligned but there is not enough front-end + -- information to determine this. In that case gigi will emit an + -- error if a copy is not legal, or generate the proper code. + -- For other backends we report the error now. + + if Frontend_Layout_On_Target then + Error_Msg_N + ("misaligned actual cannot be passed by reference", Actual); + end if; + return False; -- For users of Starlet, we assume that the specification of by- @@ -6120,6 +6130,7 @@ package body Exp_Ch6 is begin Set_Has_Completion (Subp, False); + -- Set_Has_Delayed_Freeze (Subp); Append_Freeze_Action (Subp, Bod); -- The body now contains raise statements, so calls to it will |