diff options
author | Olivier Hainque <hainque@gcc.gnu.org> | 2009-09-25 09:33:17 +0000 |
---|---|---|
committer | Olivier Hainque <hainque@gcc.gnu.org> | 2009-09-25 09:33:17 +0000 |
commit | 7948ae37a7584683ef2169153be4d72bc883f205 (patch) | |
tree | 81ee28b57d956878c8da819d095fb9043c7fcc3b /gcc/ada/gcc-interface/gigi.h | |
parent | 6e1ee24b2fcd554744a135d2b314fde2f48d674f (diff) | |
download | gcc-7948ae37a7584683ef2169153be4d72bc883f205.zip gcc-7948ae37a7584683ef2169153be4d72bc883f205.tar.gz gcc-7948ae37a7584683ef2169153be4d72bc883f205.tar.bz2 |
ada-tree.h (TYPE_REPRESENTATIVE_ARRAY): New language specific node.
ada/
* gcc-interface/ada-tree.h (TYPE_REPRESENTATIVE_ARRAY): New language
specific node. Representative array type for VECTOR_TYPE entities.
* gcc-interface/utils.c (handle_vector_type_attribute): New handler.
Turn an ARRAY_TYPE entity into a VECTOR_TYPE.
(gnat_types_compatible_p): Handle VECTOR_TYPEs.
(convert): Likewise. Arrange to produce VECTOR_CST out of constant
array aggregates for VECTOR_TYPE entities.
(unchecked_convert): Likewise.
(maybe_vector_array): New function. If EXP has VECTOR_TYPE, return EXP
converted to the associated TYPE_REPRESENTATIVE_ARRAY.
(handle_pure_attribute, handle_sentinel_attribute,
handle_noreturn_attribute, handle_malloc_attribute,
handle_vector_size_attribute): Replace uses of qE format by qs.
Remove GCC_DIAG_STYLE definition.
* gcc-interface/trans.c (gnat_to_gnu) <N_Indexed_Component>: Convert
vector input to representative array type on entry.
<N_Op_Eq, etc>: Likewise.
* gcc-interface/gigi.h (maybe_vector_array): Declare.
(VECTOR_TYPE_P): New predicate.
* gcc-interface/misc.c (gnat_print_type): Handle VECTOR_TYPE.
testsuite/
* gnat.dg/sse_nolib.adb: New testcase.
From-SVN: r152165
Diffstat (limited to 'gcc/ada/gcc-interface/gigi.h')
-rw-r--r-- | gcc/ada/gcc-interface/gigi.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/gcc/ada/gcc-interface/gigi.h b/gcc/ada/gcc-interface/gigi.h index fe91cf3..ea1a65d 100644 --- a/gcc/ada/gcc-interface/gigi.h +++ b/gcc/ada/gcc-interface/gigi.h @@ -750,6 +750,10 @@ extern tree remove_conversions (tree exp, bool true_address); likewise return an expression pointing to the underlying array. */ extern tree maybe_unconstrained_array (tree exp); +/* If EXP's type is a VECTOR_TYPE, return EXP converted to the associated + TYPE_REPRESENTATIVE_ARRAY. */ +extern tree maybe_vector_array (tree exp); + /* Return an expression that does an unchecked conversion of EXPR to TYPE. If NOTRUNC_P is true, truncation operations should be suppressed. */ extern tree unchecked_convert (tree type, tree expr, bool notrunc_p); @@ -951,3 +955,6 @@ extern Nat get_target_double_scalar_alignment (void); #ifndef TARGET_MALLOC64 #define TARGET_MALLOC64 0 #endif + +/* Convenient shortcuts. */ +#define VECTOR_TYPE_P(TYPE) (TREE_CODE (TYPE) == VECTOR_TYPE) |