aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorThomas Quinot <quinot@adacore.com>2005-07-04 15:30:10 +0200
committerArnaud Charlet <charlet@gcc.gnu.org>2005-07-04 15:30:10 +0200
commit16397eff06ff427844ae00e28a448a2694cbec65 (patch)
tree655ca951f7529c8fecb9f9428aa9935691fbe842 /gcc
parentc2bf339e6b769c71653b255148ae8386b19c229c (diff)
downloadgcc-16397eff06ff427844ae00e28a448a2694cbec65.zip
gcc-16397eff06ff427844ae00e28a448a2694cbec65.tar.gz
gcc-16397eff06ff427844ae00e28a448a2694cbec65.tar.bz2
sem_res.adb (Resolve_Actuals): Do not resolve the expression of an actual that is a view conversion of a bit...
2005-07-04 Thomas Quinot <quinot@adacore.com> * sem_res.adb (Resolve_Actuals): Do not resolve the expression of an actual that is a view conversion of a bit packed array reference. From-SVN: r101590
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ada/sem_res.adb20
1 files changed, 12 insertions, 8 deletions
diff --git a/gcc/ada/sem_res.adb b/gcc/ada/sem_res.adb
index 25be7c9..c8cbcf2 100644
--- a/gcc/ada/sem_res.adb
+++ b/gcc/ada/sem_res.adb
@@ -2582,12 +2582,15 @@ package body Sem_Res is
-- If the formal is Out or In_Out, do not resolve and expand the
-- conversion, because it is subsequently expanded into explicit
-- temporaries and assignments. However, the object of the
- -- conversion can be resolved. An exception is the case of
- -- a tagged type conversion with a class-wide actual. In that
- -- case we want the tag check to occur and no temporary will
- -- will be needed (no representation change can occur) and
- -- the parameter is passed by reference, so we go ahead and
- -- resolve the type conversion.
+ -- conversion can be resolved. An exception is the case of a
+ -- tagged type conversion with a class-wide actual. In that case
+ -- we want the tag check to occur and no temporary will be needed
+ -- (no representation change can occur) and the parameter is
+ -- passed by reference, so we go ahead and resolve the type
+ -- conversion. Another excpetion is the case of reference to a
+ -- component or subcomponent of a bit-packed array, in which case
+ -- we want to defer expansion to the point the in and out
+ -- assignments are performed.
if Ekind (F) /= E_In_Parameter
and then Nkind (A) = N_Type_Conversion
@@ -2628,8 +2631,9 @@ package body Sem_Res is
end if;
end if;
- if Conversion_OK (A)
- or else Valid_Conversion (A, Etype (A), Expression (A))
+ if (Conversion_OK (A)
+ or else Valid_Conversion (A, Etype (A), Expression (A)))
+ and then not Is_Ref_To_Bit_Packed_Array (Expression (A))
then
Resolve (Expression (A));
end if;