diff options
author | Eric Botcazou <ebotcazou@adacore.com> | 2021-02-08 11:24:56 +0000 |
---|---|---|
committer | Pierre-Marie de Rodat <derodat@adacore.com> | 2021-05-07 05:29:17 -0400 |
commit | 17ba0ad5294f51c15dcf1e1a176b6f15d71e905e (patch) | |
tree | 26257f4fa781d284ca13b493395332347f0b3fd1 /gcc/ada/gcc-interface/trans.c | |
parent | d40dc31924972f90cef920a8f76b3042aefc065d (diff) | |
download | gcc-17ba0ad5294f51c15dcf1e1a176b6f15d71e905e.zip gcc-17ba0ad5294f51c15dcf1e1a176b6f15d71e905e.tar.gz gcc-17ba0ad5294f51c15dcf1e1a176b6f15d71e905e.tar.bz2 |
[Ada] Fix type mismatch warnings during LTO bootstrap #6
gcc/ada/
* gcc-interface/gigi.h (enum standard_datatype): Remove
ADT_exception_data_name_id and add ADT_not_handled_by_others_name_id.
(exception_data_name_id): Delete.
(not_handled_by_others_name_id): New macro.
* gcc-interface/decl.c (gnat_to_gnu_entity) <E_Exception>: Remove old
kludge for exceptions.
<E_Record_Type>: Likewise.
(gnat_to_gnu_field): Force character type on Not_Handled_By_Others.
* gcc-interface/misc.c (gnat_argv): Change type to char **.
(gnat_init_options): Adjust accordingly.
* gcc-interface/trans.c (gigi): Set not_handled_by_others_name_id
and use it to set not_handled_by_others_decl.
(Exception_Handler_to_gnu_fe_sjlj): Fix indentation.
Diffstat (limited to 'gcc/ada/gcc-interface/trans.c')
-rw-r--r-- | gcc/ada/gcc-interface/trans.c | 24 |
1 files changed, 11 insertions, 13 deletions
diff --git a/gcc/ada/gcc-interface/trans.c b/gcc/ada/gcc-interface/trans.c index 2a85cde..9aeaf03 100644 --- a/gcc/ada/gcc-interface/trans.c +++ b/gcc/ada/gcc-interface/trans.c @@ -461,13 +461,20 @@ gigi (Node_Id gnat_root, /* Name of the _Parent field in tagged record types. */ parent_name_id = get_identifier (Get_Name_String (Name_uParent)); - /* Name of the Exception_Data type defined in System.Standard_Library. */ - exception_data_name_id - = get_identifier ("system__standard_library__exception_data"); + /* Name of the Not_Handled_By_Others field in exception record types. */ + not_handled_by_others_name_id = get_identifier ("not_handled_by_others"); /* Make the types and functions used for exception processing. */ except_type_node = gnat_to_gnu_type (Base_Type (standard_exception_type)); + for (t = TYPE_FIELDS (except_type_node); t; t = DECL_CHAIN (t)) + if (DECL_NAME (t) == not_handled_by_others_name_id) + { + not_handled_by_others_decl = t; + break; + } + gcc_assert (DECL_P (not_handled_by_others_decl)); + jmpbuf_type = build_array_type (gnat_type_for_mode (Pmode, 0), build_index_type (size_int (5))); @@ -495,15 +502,6 @@ gigi (Node_Id gnat_root, NULL_TREE), NULL_TREE, is_default, true, true, true, false, false, NULL, Empty); - not_handled_by_others_decl = get_identifier ("not_handled_by_others"); - for (t = TYPE_FIELDS (except_type_node); t; t = DECL_CHAIN (t)) - if (DECL_NAME (t) == not_handled_by_others_decl) - { - not_handled_by_others_decl = t; - break; - } - gcc_assert (DECL_P (not_handled_by_others_decl)); - /* setjmp returns an integer and has one operand, which is a pointer to a jmpbuf. */ setjmp_decl @@ -5596,7 +5594,7 @@ Exception_Handler_to_gnu_fe_sjlj (Node_Id gnat_node) gnu_except_ptr_stack->last (), convert (TREE_TYPE (gnu_except_ptr_stack->last ()), build_unary_op (ADDR_EXPR, NULL_TREE, gnu_expr))); -} + } else gcc_unreachable (); |