diff options
author | Eric Botcazou <ebotcazou@adacore.com> | 2009-04-22 22:32:54 +0000 |
---|---|---|
committer | Eric Botcazou <ebotcazou@gcc.gnu.org> | 2009-04-22 22:32:54 +0000 |
commit | b7babd5d428f7439b7cd83077b7c3d902570e0ea (patch) | |
tree | beedd09a228d7c271f4269d3c601ccd2aa414c7e /gcc/testsuite/gnat.dg/enum2.adb | |
parent | 5225a1389d0058ac8f64153efa64c8e07ec13c9a (diff) | |
download | gcc-b7babd5d428f7439b7cd83077b7c3d902570e0ea.zip gcc-b7babd5d428f7439b7cd83077b7c3d902570e0ea.tar.gz gcc-b7babd5d428f7439b7cd83077b7c3d902570e0ea.tar.bz2 |
utils2.c (build_binary_op): If operation's type is an enumeral or a boolean type...
* gcc-interface/utils2.c (build_binary_op) <PLUS_EXPR>: If operation's
type is an enumeral or a boolean type, change it to an integer type
with the same mode and signedness.
From-SVN: r146625
Diffstat (limited to 'gcc/testsuite/gnat.dg/enum2.adb')
-rw-r--r-- | gcc/testsuite/gnat.dg/enum2.adb | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/gcc/testsuite/gnat.dg/enum2.adb b/gcc/testsuite/gnat.dg/enum2.adb new file mode 100644 index 0000000..e98252a --- /dev/null +++ b/gcc/testsuite/gnat.dg/enum2.adb @@ -0,0 +1,11 @@ +-- { dg-do run } +-- { dg-options "-gnat05 -O2" } + +with Enum2_Pkg; use Enum2_Pkg; + +procedure Enum2 is + type Enum is (A, B, C, D); + Table : array (B .. C, 1 .. 1) of F_String := (others => (others => Null_String)); +begin + Table := (others => (others => Null_String)); +end; |