diff options
author | Mikael Morin <mikael@gcc.gnu.org> | 2012-08-02 19:20:43 +0000 |
---|---|---|
committer | Mikael Morin <mikael@gcc.gnu.org> | 2012-08-02 19:20:43 +0000 |
commit | 17aa6ab611c5e5ea4d7696aae0866b628fedb4b9 (patch) | |
tree | 0b14e1866a904ecdcb68e0e0bb7eff98e400e0c7 /gcc/fortran/trans-array.c | |
parent | d357d991136f44feee3c05ae8940ea3b241698fd (diff) | |
download | gcc-17aa6ab611c5e5ea4d7696aae0866b628fedb4b9.zip gcc-17aa6ab611c5e5ea4d7696aae0866b628fedb4b9.tar.gz gcc-17aa6ab611c5e5ea4d7696aae0866b628fedb4b9.tar.bz2 |
trans-array.h (gfc_conv_descriptor_rank): New prototype.
* trans-array.h (gfc_conv_descriptor_rank): New prototype.
* trans-array.c (gfc_conv_descriptor_rank): New function moved and
renamed ...
* trans-intrinsic.c (get_rank_from_desc): ... from this one.
(gfc_conv_intrinsic_rank, gfc_conv_intrinsic_bound,
gfc_conv_associated): Also rename function calls.
From-SVN: r190095
Diffstat (limited to 'gcc/fortran/trans-array.c')
-rw-r--r-- | gcc/fortran/trans-array.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/gcc/fortran/trans-array.c b/gcc/fortran/trans-array.c index 555d696..abdb9ea 100644 --- a/gcc/fortran/trans-array.c +++ b/gcc/fortran/trans-array.c @@ -249,6 +249,20 @@ gfc_conv_descriptor_dtype (tree desc) tree +gfc_conv_descriptor_rank (tree desc) +{ + tree tmp; + tree dtype; + + dtype = gfc_conv_descriptor_dtype (desc); + tmp = build_int_cst (TREE_TYPE (dtype), GFC_DTYPE_RANK_MASK); + tmp = fold_build2_loc (input_location, BIT_AND_EXPR, TREE_TYPE (dtype), + dtype, tmp); + return fold_convert (gfc_get_int_type (gfc_default_integer_kind), tmp); +} + + +tree gfc_get_descriptor_dimension (tree desc) { tree type, field; |