diff options
author | Eric Botcazou <ebotcazou@adacore.com> | 2018-06-12 10:34:26 +0000 |
---|---|---|
committer | Eric Botcazou <ebotcazou@gcc.gnu.org> | 2018-06-12 10:34:26 +0000 |
commit | 57d0f7c6d7da4607f61478fde993b225c7214904 (patch) | |
tree | 9d410fe98ce08d5b812d1848043326a4bb760c9c /gcc/ada/gcc-interface/gigi.h | |
parent | 541bb35d87856ebb8bf768da3ded9410bdcb8310 (diff) | |
download | gcc-57d0f7c6d7da4607f61478fde993b225c7214904.zip gcc-57d0f7c6d7da4607f61478fde993b225c7214904.tar.gz gcc-57d0f7c6d7da4607f61478fde993b225c7214904.tar.bz2 |
ada-tree.h (TYPE_RETURN_BY_DIRECT_REF_P): Change from using TYPE_LANG_FLAG_4 to using TYPE_LANG_FLAG_0.
* gcc-interface/ada-tree.h (TYPE_RETURN_BY_DIRECT_REF_P): Change from
using TYPE_LANG_FLAG_4 to using TYPE_LANG_FLAG_0.
(TYPE_ALIGN_OK): Move around.
(TYPE_PADDING_FOR_COMPONENT): Remove superfluous parentheses.
* gcc-interface/decl.c (change_qualified_type): Move to...
(gnat_to_gnu_entity): Adjust comment.
* gcc-interface/gigi.h (change_qualified_type): ...here; make inline.
(ceil_pow2): Use ceil_log2.
* gcc-interface/utils.c (finish_subprog_decl): Add couple of comments
and do not set TREE_SIDE_EFFECTS.
(handle_noreturn_attribute): Use change_qualified_type.
From-SVN: r261486
Diffstat (limited to 'gcc/ada/gcc-interface/gigi.h')
-rw-r--r-- | gcc/ada/gcc-interface/gigi.h | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/gcc/ada/gcc-interface/gigi.h b/gcc/ada/gcc-interface/gigi.h index f700374..8950f8e 100644 --- a/gcc/ada/gcc-interface/gigi.h +++ b/gcc/ada/gcc-interface/gigi.h @@ -6,7 +6,7 @@ * * * C Header File * * * - * Copyright (C) 1992-2017, Free Software Foundation, Inc. * + * Copyright (C) 1992-2018, Free Software Foundation, Inc. * * * * GNAT is free software; you can redistribute it and/or modify it under * * terms of the GNU General Public License as published by the Free Soft- * @@ -1075,7 +1075,7 @@ maybe_vector_array (tree exp) static inline unsigned HOST_WIDE_INT ceil_pow2 (unsigned HOST_WIDE_INT x) { - return (unsigned HOST_WIDE_INT) 1 << (floor_log2 (x - 1) + 1); + return (unsigned HOST_WIDE_INT) 1 << ceil_log2 (x); } /* Return true if EXP, a CALL_EXPR, is an atomic load. */ @@ -1172,3 +1172,16 @@ maybe_debug_type (tree type) return type; } + +/* Like build_qualified_type, but TYPE_QUALS is added to the existing + qualifiers on TYPE. */ + +static inline tree +change_qualified_type (tree type, int type_quals) +{ + /* Qualifiers must be put on the associated array type. */ + if (TREE_CODE (type) == UNCONSTRAINED_ARRAY_TYPE) + return type; + + return build_qualified_type (type, TYPE_QUALS (type) | type_quals); +} |