diff options
author | hainque <hainque@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-03-31 17:03:09 +0000 |
---|---|---|
committer | hainque <hainque@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-03-31 17:03:09 +0000 |
commit | b0399e1b93548f5e588f7f6f7a83d208888a2974 (patch) | |
tree | 3ffa54d3a68db4107cd0f29aba899b64d8d7f49a /gcc/testsuite/gnat.dg/assign_from_packed.adb | |
parent | 13ecee2146355ef5c516378b712e459d5ebab934 (diff) | |
download | gcc-b0399e1b93548f5e588f7f6f7a83d208888a2974.tar.gz |
2008-03-31 Olivier Hainque <hainque@adacore.com>
Eric Botcazou <botcazou@adacore.com>
ada/
* utils2.c (find_common_type): Document assumption on t1/t2 vs
lhs/rhs. Force use of lhs type if smaller, whatever the modes.
testsuite/
* gnat.dg/assign_from_packed.adb: New testcase.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@133757 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/testsuite/gnat.dg/assign_from_packed.adb')
-rw-r--r-- | gcc/testsuite/gnat.dg/assign_from_packed.adb | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/gcc/testsuite/gnat.dg/assign_from_packed.adb b/gcc/testsuite/gnat.dg/assign_from_packed.adb new file mode 100644 index 00000000000..24399a0117e --- /dev/null +++ b/gcc/testsuite/gnat.dg/assign_from_packed.adb @@ -0,0 +1,15 @@ +-- { dg-do run } + +with assign_from_packed_pixels; +use assign_from_packed_pixels; + +procedure assign_from_packed is + + A : Integer := Minus_One; + Pos : Position; +begin + Pos := Pix.Pos; + if A /= Minus_One then + raise Program_Error; + end if; +end; |