diff options
author | Ian Lance Taylor <iant@golang.org> | 2021-09-13 10:37:49 -0700 |
---|---|---|
committer | Ian Lance Taylor <iant@golang.org> | 2021-09-13 10:37:49 -0700 |
commit | e252b51ccde010cbd2a146485d8045103cd99533 (patch) | |
tree | e060f101cdc32bf5e520de8e5275db9d4236b74c /gcc/ada/gcc-interface/misc.c | |
parent | f10c7c4596dda99d2ee872c995ae4aeda65adbdf (diff) | |
parent | 104c05c5284b7822d770ee51a7d91946c7e56d50 (diff) | |
download | gcc-e252b51ccde010cbd2a146485d8045103cd99533.zip gcc-e252b51ccde010cbd2a146485d8045103cd99533.tar.gz gcc-e252b51ccde010cbd2a146485d8045103cd99533.tar.bz2 |
Merge from trunk revision 104c05c5284b7822d770ee51a7d91946c7e56d50.
Diffstat (limited to 'gcc/ada/gcc-interface/misc.c')
-rw-r--r-- | gcc/ada/gcc-interface/misc.c | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/gcc/ada/gcc-interface/misc.c b/gcc/ada/gcc-interface/misc.c index d0867e0..96199bd 100644 --- a/gcc/ada/gcc-interface/misc.c +++ b/gcc/ada/gcc-interface/misc.c @@ -6,7 +6,7 @@ * * * C Implementation File * * * - * Copyright (C) 1992-2020, Free Software Foundation, Inc. * + * Copyright (C) 1992-2021, 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- * @@ -63,7 +63,7 @@ const char **save_argv; /* GNAT argc and argv generated by the binder for all Ada programs. */ extern int gnat_argc; -extern const char **gnat_argv; +extern char **gnat_argv; /* Ada code requires variables for these settings rather than elements of the global_options structure because they are imported. */ @@ -241,7 +241,7 @@ gnat_init_options (unsigned int decoded_options_count, save_argv[save_argc] = NULL; /* Pass just the name of the command through the regular channel. */ - gnat_argv = (const char **) xmalloc (sizeof (char *)); + gnat_argv = (char **) xmalloc (sizeof (char *)); gnat_argv[0] = xstrdup (save_argv[0]); gnat_argc = 1; } @@ -256,6 +256,9 @@ gnat_post_options (const char **pfilename ATTRIBUTE_UNUSED) /* Excess precision other than "fast" requires front-end support. */ if (flag_excess_precision == EXCESS_PRECISION_STANDARD) sorry ("%<-fexcess-precision=standard%> for Ada"); + else if (flag_excess_precision == EXCESS_PRECISION_FLOAT16) + sorry ("%<-fexcess-precision=16%> for Ada"); + flag_excess_precision = EXCESS_PRECISION_FAST; /* No psABI change warnings for Ada. */ @@ -370,6 +373,9 @@ gnat_init (void) sbitsize_one_node = sbitsize_int (1); sbitsize_unit_node = sbitsize_int (BITS_PER_UNIT); + /* In Ada, we do not use location ranges. */ + line_table->default_range_bits = 0; + /* Register our internal error function. */ global_dc->internal_error = &internal_error_function; @@ -749,7 +755,7 @@ gnat_type_max_size (const_tree gnu_type) type's alignment and return the result in units. */ if (tree_fits_uhwi_p (max_ada_size)) max_size_unit - = size_binop (CEIL_DIV_EXPR, + = size_binop (EXACT_DIV_EXPR, round_up (max_ada_size, TYPE_ALIGN (gnu_type)), bitsize_unit_node); } @@ -803,7 +809,7 @@ gnat_get_array_descr_info (const_tree const_type, /* As well as array types embedded in a record type with their bounds. */ else if (TREE_CODE (type) == RECORD_TYPE && TYPE_CONTAINS_TEMPLATE_P (type) - && gnat_encodings == DWARF_GNAT_ENCODINGS_MINIMAL) + && gnat_encodings != DWARF_GNAT_ENCODINGS_ALL) { /* This will be our base object address. Note that we assume that pointers to this will actually point to the array field (thin @@ -898,7 +904,7 @@ gnat_get_array_descr_info (const_tree const_type, if (TYPE_CONTEXT (first_dimen) && TREE_CODE (TYPE_CONTEXT (first_dimen)) != RECORD_TYPE && CONTAINS_PLACEHOLDER_P (TYPE_MIN_VALUE (index_type)) - && gnat_encodings != DWARF_GNAT_ENCODINGS_MINIMAL) + && gnat_encodings == DWARF_GNAT_ENCODINGS_ALL) { info->dimen[i].lower_bound = NULL_TREE; info->dimen[i].upper_bound = NULL_TREE; @@ -940,7 +946,7 @@ gnat_get_array_descr_info (const_tree const_type, info->associated = NULL_TREE; info->data_location = NULL_TREE; - if (gnat_encodings == DWARF_GNAT_ENCODINGS_MINIMAL) + if (gnat_encodings != DWARF_GNAT_ENCODINGS_ALL) { /* When arrays contain dynamically-sized elements, we usually wrap them in padding types, or we create constrained types for them. Then, if |