diff options
author | Eric Botcazou <ebotcazou@adacore.com> | 2015-05-28 15:45:08 +0000 |
---|---|---|
committer | Eric Botcazou <ebotcazou@gcc.gnu.org> | 2015-05-28 15:45:08 +0000 |
commit | 396e67d21a3194da9d036bdb67e74edfd1030d3f (patch) | |
tree | e352ee1b9a722c241fbc82e1122572bc6e8956cd /gcc/testsuite | |
parent | afd6f7023570710172c76f5afc870d7ebd32678e (diff) | |
download | gcc-396e67d21a3194da9d036bdb67e74edfd1030d3f.zip gcc-396e67d21a3194da9d036bdb67e74edfd1030d3f.tar.gz gcc-396e67d21a3194da9d036bdb67e74edfd1030d3f.tar.bz2 |
utils.c (max_size): Add special code to deal with the subtraction of a "negative" value in an...
* gcc-interface/utils.c (max_size) <tcc_binary>: Add special code to
deal with the subtraction of a "negative" value in an unsigned type.
From-SVN: r223837
Diffstat (limited to 'gcc/testsuite')
-rw-r--r-- | gcc/testsuite/ChangeLog | 4 | ||||
-rw-r--r-- | gcc/testsuite/gnat.dg/discr43.adb | 16 |
2 files changed, 20 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 282a3be..f986488 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,5 +1,9 @@ 2015-05-28 Eric Botcazou <ebotcazou@adacore.com> + * gnat.dg/discr43.adb: New test. + +2015-05-28 Eric Botcazou <ebotcazou@adacore.com> + * gnat.dg/varsize_temp.adb: Rename into... * gnat.dg/varsize1.adb: ...this. * gnat.dg/varsize_copy.ad[sb]: Rename into... diff --git a/gcc/testsuite/gnat.dg/discr43.adb b/gcc/testsuite/gnat.dg/discr43.adb new file mode 100644 index 0000000..e0d4390 --- /dev/null +++ b/gcc/testsuite/gnat.dg/discr43.adb @@ -0,0 +1,16 @@ +-- { dg-do compile } + +with Text_IO; use Text_IO; + +procedure Discr43 is + + type Arr is array (Short_Integer range <>) of Boolean; + + type Rec (LB : Short_Integer; UB : Short_Integer) is record + A : Arr (LB .. UB); + end record; + +begin + Put_Line ("Arr'Max_Size =" & Arr'Max_Size_In_Storage_Elements'Img); + Put_Line ("Rec'Max_Size =" & Rec'Max_Size_In_Storage_Elements'Img); +end; |