diff options
author | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-03-19 15:08:45 +0000 |
---|---|---|
committer | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-03-19 15:08:45 +0000 |
commit | ea3fd778402bf80e622a06ac85f3680e4d997f6c (patch) | |
tree | e181864591b43e4b8cf43a1659ca70d4bdb4ddb8 /gcc/ada/decl.c | |
parent | 7a0fec36b5820f0913cc40edc1e311b754ce9316 (diff) | |
download | gcc-ea3fd778402bf80e622a06ac85f3680e4d997f6c.tar.gz |
2004-03-19 Arnaud Charlet <charlet@act-europe.fr>
* ada-tree.h: Update copyright notice.
Minor reformatting.
2004-03-19 Olivier Hainque <hainque@act-europe.fr>
* decl.c (gnat_to_gnu_entity, case E_Exception): Handle VMS exceptions
as regular exception objects and not as mere integers representing the
condition code. The latter approach required some dynamics to mask off
severity bits, which did not fit well into the GCC table based model.
(gnat_to_gnu_entity, objects): Don't supply an external name for VMS
exception data objects. We don't it and it would conflict with the other
external symbol we have to generate for such exceptions.
* trans.c (tree_transform, case N_Exception_Handler): Remove part of
the special code for VMS exceptions, since these are now represented
as regular exceptions objects.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@79686 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/decl.c')
-rw-r--r-- | gcc/ada/decl.c | 56 |
1 files changed, 21 insertions, 35 deletions
diff --git a/gcc/ada/decl.c b/gcc/ada/decl.c index 9e7749e63b3..fd82da9c87b 100644 --- a/gcc/ada/decl.c +++ b/gcc/ada/decl.c @@ -365,34 +365,16 @@ gnat_to_gnu_entity (Entity_Id gnat_entity, tree gnu_expr, int definition) goto object; case E_Exception: - /* If this is not a VMS exception, treat it as a normal object. - Otherwise, make an object at the specific address of character - type, point to it, and convert it to integer, and mask off - the lower 3 bits. */ - if (! Is_VMS_Exception (gnat_entity)) - goto object; - - /* Allocate the global object that we use to get the value of the - exception. */ - gnu_decl = create_var_decl (gnu_entity_id, - (Present (Interface_Name (gnat_entity)) - ? create_concat_name (gnat_entity, 0) - : NULL_TREE), - char_type_node, NULL_TREE, 0, 0, 1, 1, - 0); - - /* Now return the expression giving the desired value. */ - gnu_decl - = build_binary_op (BIT_AND_EXPR, integer_type_node, - convert (integer_type_node, - build_unary_op (ADDR_EXPR, NULL_TREE, - gnu_decl)), - build_unary_op (NEGATE_EXPR, integer_type_node, - build_int_2 (7, 0))); - - save_gnu_tree (gnat_entity, gnu_decl, 1); - saved = 1; - break; + /* We used to special case VMS exceptions here to directly map them to + their associated condition code. Since this code had to be masked + dynamically to strip off the severity bits, this caused trouble in + the GCC/ZCX case because the "type" pointers we store in the tables + have to be static. We now don't special case here anymore, and let + the regular processing take place, which leaves us with a regular + exception data object for VMS exceptions too. The condition code + mapping is taken care of by the front end and the bitmasking by the + runtime library. */ + goto object; case E_Discriminant: case E_Component: @@ -1017,13 +999,17 @@ gnat_to_gnu_entity (Entity_Id gnat_entity, tree gnu_expr, int definition) (TYPE_SIZE (TREE_TYPE (TYPE_FIELDS (gnu_type))))))) gnu_expr = convert (gnu_type, gnu_expr); - /* This name is external or there was a name specified, use it. - Don't use the Interface_Name if there is an address clause. - (see CD30005). */ - if ((Present (Interface_Name (gnat_entity)) - && No (Address_Clause (gnat_entity))) - || (Is_Public (gnat_entity) - && (! Is_Imported (gnat_entity) || Is_Exported (gnat_entity)))) + /* If this name is external or there was a name specified, use it, + unless this is a VMS exception object since this would conflict + with the symbol we need to export in addition. Don't use the + Interface_Name if there is an address clause (see CD30005). */ + if (! Is_VMS_Exception (gnat_entity) + && + ((Present (Interface_Name (gnat_entity)) + && No (Address_Clause (gnat_entity))) + || + (Is_Public (gnat_entity) + && (! Is_Imported (gnat_entity) || Is_Exported (gnat_entity))))) gnu_ext_name = create_concat_name (gnat_entity, 0); if (const_flag) |