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/utils.c | |
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/utils.c')
-rw-r--r-- | gcc/ada/gcc-interface/utils.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/gcc/ada/gcc-interface/utils.c b/gcc/ada/gcc-interface/utils.c index 992d568..e456cc6 100644 --- a/gcc/ada/gcc-interface/utils.c +++ b/gcc/ada/gcc-interface/utils.c @@ -3327,8 +3327,11 @@ finish_subprog_decl (tree decl, tree asm_name, tree type) DECL_BY_REFERENCE (result_decl) = TREE_ADDRESSABLE (type); DECL_RESULT (decl) = result_decl; + /* Propagate the "const" property. */ TREE_READONLY (decl) = TYPE_READONLY (type); - TREE_SIDE_EFFECTS (decl) = TREE_THIS_VOLATILE (decl) = TYPE_VOLATILE (type); + + /* Propagate the "noreturn" property. */ + TREE_THIS_VOLATILE (decl) = TYPE_VOLATILE (type); if (asm_name) { @@ -6226,8 +6229,7 @@ handle_noreturn_attribute (tree *node, tree name, tree ARG_UNUSED (args), && TREE_CODE (TREE_TYPE (type)) == FUNCTION_TYPE) TREE_TYPE (*node) = build_pointer_type - (build_type_variant (TREE_TYPE (type), - TYPE_READONLY (TREE_TYPE (type)), 1)); + (change_qualified_type (TREE_TYPE (type), TYPE_QUAL_VOLATILE)); else { warning (OPT_Wattributes, "%qs attribute ignored", |