diff options
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", |