diff options
author | Arnaud Charlet <charlet@gcc.gnu.org> | 2014-08-01 11:22:39 +0200 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2014-08-01 11:22:39 +0200 |
commit | 2422831252036d2821984173a7a22aac5518ef5c (patch) | |
tree | 782a77c0def56618c442f8f456b1bf1a0de3729c /gcc/ada | |
parent | d77cfab2813d0921344f74c219ec3e4a173aa3f1 (diff) | |
download | gcc-2422831252036d2821984173a7a22aac5518ef5c.zip gcc-2422831252036d2821984173a7a22aac5518ef5c.tar.gz gcc-2422831252036d2821984173a7a22aac5518ef5c.tar.bz2 |
[multiple changes]
2014-08-01 Arnaud Charlet <charlet@adacore.com>
* ug_words, xgnatugn.adb, gcc-interface/Make-lang.in: Remove
xgnatugn.adb and ug_words.
2014-08-01 Eric Botcazou <ebotcazou@adacore.com>
* exp_attr.adb (Expand_N_Attribute_Reference): Check whether
expansion can be avoid for Machine, Model and Rounding.
(Is_Inline_Floating_Point_Attribute): Return true for Machine
& Model, as well as Rounding if wrapped in a conversion to an
integer type.
* sem_res.adb (Simplify_Type_Conversion): Deal with Rounding as well.
* gcc-interface/gigi.h (fp_arith_may_widen): Declare.
* gcc-interface/utils.c (fp_arith_may_widen): New global variable.
* gcc-interface/misc.c (enumerate_modes): Compute it.
* gcc-interface/trans.c (FP_ARITH_MAY_WIDEN): Delete.
(lvalue_required_for_attribute_p): Deal with Descriptor_Size,
Machine and Model.
(Attribute_to_gnu) <Attr_Model>: New case.
<Attr_Machine>): Likewise.
(convert_with_check): Test
fp_arith_may_widen variable.
2014-08-01 Pascal Obry <obry@adacore.com>
* adaint.h (GNAT_FOPEN): New definition for Windows.
(GNAT_OPEN): Likewise.
(GNAT_STAT): Likewise.
(GNAT_FSTAT): Likewise.
(GNAT_LSTAT): Likewise.
(GNAT_STRUCT_STAT): Likewise.
* adaint.c (__gnat_stat): Fix computation of file size for
Windows.
2014-08-01 Vincent Celier <celier@adacore.com>
* Makefile.rtl: Minor comment update.
2014-08-01 Vincent Celier <celier@adacore.com>
* Make-generated.in: Remove dependencies for vms-help.
From-SVN: r213429
Diffstat (limited to 'gcc/ada')
-rw-r--r-- | gcc/ada/ChangeLog | 43 | ||||
-rw-r--r-- | gcc/ada/Make-generated.in | 8 | ||||
-rw-r--r-- | gcc/ada/Makefile.rtl | 2 | ||||
-rw-r--r-- | gcc/ada/adaint.c | 3 | ||||
-rw-r--r-- | gcc/ada/adaint.h | 9 | ||||
-rw-r--r-- | gcc/ada/exp_attr.adb | 26 | ||||
-rw-r--r-- | gcc/ada/gcc-interface/Make-lang.in | 30 | ||||
-rw-r--r-- | gcc/ada/gcc-interface/gigi.h | 3 | ||||
-rw-r--r-- | gcc/ada/gcc-interface/misc.c | 12 | ||||
-rw-r--r-- | gcc/ada/gcc-interface/trans.c | 72 | ||||
-rw-r--r-- | gcc/ada/gcc-interface/utils.c | 3 | ||||
-rw-r--r-- | gcc/ada/sem_res.adb | 39 | ||||
-rw-r--r-- | gcc/ada/ug_words | 271 | ||||
-rw-r--r-- | gcc/ada/xgnatugn.adb | 55 |
14 files changed, 177 insertions, 399 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index 29fe77f..56d4e46 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,46 @@ +2014-08-01 Arnaud Charlet <charlet@adacore.com> + + * ug_words, xgnatugn.adb, gcc-interface/Make-lang.in: Remove + xgnatugn.adb and ug_words. + +2014-08-01 Eric Botcazou <ebotcazou@adacore.com> + + * exp_attr.adb (Expand_N_Attribute_Reference): Check whether + expansion can be avoid for Machine, Model and Rounding. + (Is_Inline_Floating_Point_Attribute): Return true for Machine + & Model, as well as Rounding if wrapped in a conversion to an + integer type. + * sem_res.adb (Simplify_Type_Conversion): Deal with Rounding as well. + * gcc-interface/gigi.h (fp_arith_may_widen): Declare. + * gcc-interface/utils.c (fp_arith_may_widen): New global variable. + * gcc-interface/misc.c (enumerate_modes): Compute it. + * gcc-interface/trans.c (FP_ARITH_MAY_WIDEN): Delete. + (lvalue_required_for_attribute_p): Deal with Descriptor_Size, + Machine and Model. + (Attribute_to_gnu) <Attr_Model>: New case. + <Attr_Machine>): Likewise. + (convert_with_check): Test + fp_arith_may_widen variable. + +2014-08-01 Pascal Obry <obry@adacore.com> + + * adaint.h (GNAT_FOPEN): New definition for Windows. + (GNAT_OPEN): Likewise. + (GNAT_STAT): Likewise. + (GNAT_FSTAT): Likewise. + (GNAT_LSTAT): Likewise. + (GNAT_STRUCT_STAT): Likewise. + * adaint.c (__gnat_stat): Fix computation of file size for + Windows. + +2014-08-01 Vincent Celier <celier@adacore.com> + + * Makefile.rtl: Minor comment update. + +2014-08-01 Vincent Celier <celier@adacore.com> + + * Make-generated.in: Remove dependencies for vms-help. + 2014-08-01 Gary Dismukes <dismukes@adacore.com> * makeutl.ads, opt.ads: Minor grammar fixes. diff --git a/gcc/ada/Make-generated.in b/gcc/ada/Make-generated.in index c8482876f..757eaa8 100644 --- a/gcc/ada/Make-generated.in +++ b/gcc/ada/Make-generated.in @@ -95,11 +95,3 @@ $(ADA_GEN_SUBDIR)/stamp-sdefault : $(srcdir)/version.c Makefile $(ECHO) "end Sdefault;" >> tmp-sdefault.adb $(MOVE_IF_CHANGE) tmp-sdefault.adb $(ADA_GEN_SUBDIR)/sdefault.adb touch $(ADA_GEN_SUBDIR)/stamp-sdefault - -$(ADA_GEN_SUBDIR)/gnat.hlp : $(ADA_GEN_SUBDIR)/vms_help.adb $(ADA_GEN_SUBDIR)/vms_cmds.ads $(ADA_GEN_SUBDIR)/gnat.help_in $(ADA_GEN_SUBDIR)/vms_data.ads - -$(MKDIR) $(ADA_GEN_SUBDIR)/bldtools/gnat_hlp - $(RM) $(addprefix $(ADA_GEN_SUBDIR)/bldtools/gnat_hlp/,$(notdir $^)) - $(CP) $^ $(ADA_GEN_SUBDIR)/bldtools/gnat_hlp - (cd $(ADA_GEN_SUBDIR)/bldtools/gnat_hlp; \ - gnatmake -q vms_help; \ - ./vms_help$(build_exeext) gnat.help_in vms_data.ads ../../gnat.hlp) diff --git a/gcc/ada/Makefile.rtl b/gcc/ada/Makefile.rtl index 4798864..306be0e 100644 --- a/gcc/ada/Makefile.rtl +++ b/gcc/ada/Makefile.rtl @@ -18,7 +18,7 @@ #<http://www.gnu.org/licenses/>. # This makefile fragment is included in the ada Makefile (both Unix -# and NT and VMS versions). +# and Windows). # Its purpose is to allow the separate maintainence of the list of # GNATRTL objects, which frequently changes. diff --git a/gcc/ada/adaint.c b/gcc/ada/adaint.c index e0193af..17aedae 100644 --- a/gcc/ada/adaint.c +++ b/gcc/ada/adaint.c @@ -1946,7 +1946,8 @@ __gnat_stat (char *name, GNAT_STRUCT_STAT *statbuf) f2t (&fad.ftLastWriteTime, &statbuf->st_mtime); f2t (&fad.ftLastAccessTime, &statbuf->st_atime); - statbuf->st_size = (off_t)fad.nFileSizeLow; + statbuf->st_size = + (__int64)fad.nFileSizeLow | (__int64)fad.nFileSizeHigh << 32; /* We do not have the S_IEXEC attribute, but this is not used on GNAT. */ statbuf->st_mode = S_IREAD; diff --git a/gcc/ada/adaint.h b/gcc/ada/adaint.h index 9b6bbca..1605989 100644 --- a/gcc/ada/adaint.h +++ b/gcc/ada/adaint.h @@ -58,6 +58,15 @@ extern "C" { #define GNAT_FSTAT fstat64 #define GNAT_LSTAT lstat64 #define GNAT_STRUCT_STAT struct stat64 + +#elif defined(_WIN32) +#define GNAT_FOPEN fopen64 +#define GNAT_OPEN open +#define GNAT_STAT stat64 +#define GNAT_FSTAT fstat64 +#define GNAT_LSTAT lstat +#define GNAT_STRUCT_STAT struct stat64 + #else #define GNAT_FOPEN fopen #define GNAT_OPEN open diff --git a/gcc/ada/exp_attr.adb b/gcc/ada/exp_attr.adb index a90b777..fb715ea 100644 --- a/gcc/ada/exp_attr.adb +++ b/gcc/ada/exp_attr.adb @@ -4068,10 +4068,13 @@ package body Exp_Attr is ------------- -- Transforms 'Machine into a call to the floating-point attribute - -- function Machine in Fat_xxx (where xxx is the root type) + -- function Machine in Fat_xxx (where xxx is the root type). + -- Expansion is avoided for cases the back end can handle directly. when Attribute_Machine => - Expand_Fpt_Attribute_R (N); + if not Is_Inline_Floating_Point_Attribute (N) then + Expand_Fpt_Attribute_R (N); + end if; ---------------------- -- Machine_Rounding -- @@ -4335,10 +4338,13 @@ package body Exp_Attr is ----------- -- Transforms 'Model into a call to the floating-point attribute - -- function Model in Fat_xxx (where xxx is the root type) + -- function Model in Fat_xxx (where xxx is the root type). + -- Expansion is avoided for cases the back end can handle directly. when Attribute_Model => - Expand_Fpt_Attribute_R (N); + if not Is_Inline_Floating_Point_Attribute (N) then + Expand_Fpt_Attribute_R (N); + end if; ----------------- -- Object_Size -- @@ -5411,9 +5417,12 @@ package body Exp_Attr is -- Transforms 'Rounding into a call to the floating-point attribute -- function Rounding in Fat_xxx (where xxx is the root type) + -- Expansion is avoided for cases the back end can handle directly. when Attribute_Rounding => - Expand_Fpt_Attribute_R (N); + if not Is_Inline_Floating_Point_Attribute (N) then + Expand_Fpt_Attribute_R (N); + end if; ------------- -- Scaling -- @@ -7946,7 +7955,10 @@ package body Exp_Attr is Id : constant Attribute_Id := Get_Attribute_Id (Attribute_Name (N)); begin - if Nkind (Parent (N)) /= N_Type_Conversion + if Id = Attribute_Machine or else Id = Attribute_Model then + return True; + + elsif Nkind (Parent (N)) /= N_Type_Conversion or else not Is_Integer_Type (Etype (Parent (N))) then return False; @@ -7955,7 +7967,7 @@ package body Exp_Attr is -- Should also support 'Machine_Rounding and 'Unbiased_Rounding, but -- required back end support has not been implemented yet ??? - return Id = Attribute_Truncation; + return Id = Attribute_Rounding or else Id = Attribute_Truncation; end Is_Inline_Floating_Point_Attribute; end Exp_Attr; diff --git a/gcc/ada/gcc-interface/Make-lang.in b/gcc/ada/gcc-interface/Make-lang.in index 4b87997..b2c6498 100644 --- a/gcc/ada/gcc-interface/Make-lang.in +++ b/gcc/ada/gcc-interface/Make-lang.in @@ -654,26 +654,7 @@ ada.tags: force # Generate documentation. -ada/doctools/xgnatugn$(build_exeext): ada/xgnatugn.adb - -$(MKDIR) ada/doctools - $(CP) $^ ada/doctools - cd ada/doctools && gnatmake -q xgnatugn - -# Note that doc/gnat_ugn.texi and doc/projects.texi do not depend on -# xgnatugn being built so we can distribute a pregenerated doc/gnat_ugn.info - -doc/gnat_ugn.texi: $(srcdir)/ada/gnat_ugn.texi $(srcdir)/ada/ug_words \ - doc/projects.texi $(gcc_docdir)/include/gcc-common.texi gcc-vers.texi - $(MAKE) ada/doctools/xgnatugn$(build_exeext) - ada/doctools/xgnatugn unw $(srcdir)/ada/gnat_ugn.texi \ - $(srcdir)/ada/ug_words doc/gnat_ugn.texi - -doc/projects.texi: $(srcdir)/ada/projects.texi - $(MAKE) ada/doctools/xgnatugn$(build_exeext) - ada/doctools/xgnatugn unw $(srcdir)/ada/projects.texi \ - $(srcdir)/ada/ug_words doc/projects.texi - -doc/gnat_ugn.info: doc/gnat_ugn.texi \ +doc/gnat_ugn.info: ada/gnat_ugn.texi ada/projects.texi \ $(gcc_docdir)/include/fdl.texi $(gcc_docdir)/include/gcc-common.texi \ gcc-vers.texi if [ x$(BUILD_INFO) = xinfo ]; then \ @@ -698,8 +679,7 @@ doc/gnat-style.info: ada/gnat-style.texi $(gcc_docdir)/include/fdl.texi \ -I$(srcdir)/ada -o $@ $<; \ else true; fi -ADA_INFOFILES = doc/gnat_ugn.info doc/gnat_ugn.texi \ - doc/gnat_rm.info doc/gnat-style.info +ADA_INFOFILES = doc/gnat_ugn.info doc/gnat_rm.info doc/gnat-style.info ada.info: $(ADA_INFOFILES) @@ -732,7 +712,8 @@ ada.html: ada.install-html: -doc/gnat_ugn.dvi: doc/gnat_ugn.texi $(gcc_docdir)/include/fdl.texi \ +doc/gnat_ugn.dvi: ada/gnat_ugn.texi ada/projects.texi \ + $(gcc_docdir)/include/fdl.texi \ $(gcc_docdir)/include/gcc-common.texi gcc-vers.texi $(TEXI2DVI) -c -I $(abs_docdir)/include -o $@ $< @@ -743,7 +724,8 @@ doc/gnat_rm.dvi: ada/gnat_rm.texi $(gcc_docdir)/include/fdl.texi \ doc/gnat-style.dvi: ada/gnat-style.texi $(gcc_docdir)/include/fdl.texi $(TEXI2DVI) -c -I $(abs_docdir)/include -o $@ $< -doc/gnat_ugn.pdf: doc/gnat_ugn.texi $(gcc_docdir)/include/fdl.texi \ +doc/gnat_ugn.pdf: ada/gnat_ugn.texi ada/projects.texi \ + $(gcc_docdir)/include/fdl.texi \ $(gcc_docdir)/include/gcc-common.texi gcc-vers.texi $(TEXI2PDF) -c -I $(abs_docdir)/include -o $@ $< diff --git a/gcc/ada/gcc-interface/gigi.h b/gcc/ada/gcc-interface/gigi.h index 15120d5..ff23863 100644 --- a/gcc/ada/gcc-interface/gigi.h +++ b/gcc/ada/gcc-interface/gigi.h @@ -335,6 +335,9 @@ extern int double_float_alignment; types whose size is greater or equal to 64 bits, or 0 if this alignment is not specifically capped. */ extern int double_scalar_alignment; + +/* True if floating-point arithmetics may use wider intermediate results. */ +extern bool fp_arith_may_widen; /* Data structures used to represent attributes. */ diff --git a/gcc/ada/gcc-interface/misc.c b/gcc/ada/gcc-interface/misc.c index 3d1ea17..9a07de0 100644 --- a/gcc/ada/gcc-interface/misc.c +++ b/gcc/ada/gcc-interface/misc.c @@ -717,6 +717,9 @@ enumerate_modes (void (*f) (const char *, int, int, int, int, int, int, int)) = { "float", "double", "long double" }; int iloop; + /* We are going to compute it below. */ + fp_arith_may_widen = false; + for (iloop = 0; iloop < NUM_MACHINE_MODES; iloop++) { enum machine_mode i = (enum machine_mode) iloop; @@ -766,6 +769,15 @@ enumerate_modes (void (*f) (const char *, int, int, int, int, int, int, int)) if (!fmt) continue; + /* Be conservative and consider that floating-point arithmetics may + use wider intermediate results as soon as there is an extended + Motorola or Intel mode supported by the machine. */ + if (fmt == &ieee_extended_motorola_format + || fmt == &ieee_extended_intel_96_format + || fmt == &ieee_extended_intel_96_round_53_format + || fmt == &ieee_extended_intel_128_format) + fp_arith_may_widen = true; + if (fmt->b == 2) digs = (fmt->p - 1) * 1233 / 4096; /* scale by log (2) */ diff --git a/gcc/ada/gcc-interface/trans.c b/gcc/ada/gcc-interface/trans.c index 0798a66..1c26c35 100644 --- a/gcc/ada/gcc-interface/trans.c +++ b/gcc/ada/gcc-interface/trans.c @@ -76,18 +76,6 @@ static location_t block_end_locus_sink; #define BLOCK_SOURCE_END_LOCATION(BLOCK) block_end_locus_sink #endif -/* For efficient float-to-int rounding, it is necessary to know whether - floating-point arithmetic may use wider intermediate results. When - FP_ARITH_MAY_WIDEN is not defined, be conservative and only assume - that arithmetic does not widen if double precision is emulated. */ -#ifndef FP_ARITH_MAY_WIDEN -#if defined(HAVE_extendsfdf2) -#define FP_ARITH_MAY_WIDEN HAVE_extendsfdf2 -#else -#define FP_ARITH_MAY_WIDEN 0 -#endif -#endif - /* Pointers to front-end tables accessed through macros. */ struct Node *Nodes_Ptr; struct Flags *Flags_Ptr; @@ -804,12 +792,15 @@ lvalue_required_for_attribute_p (Node_Id gnat_node) case Attr_Object_Size: case Attr_Value_Size: case Attr_Component_Size: + case Attr_Descriptor_Size: case Attr_Max_Size_In_Storage_Elements: case Attr_Min: case Attr_Max: case Attr_Null_Parameter: case Attr_Passed_By_Reference: case Attr_Mechanism_Code: + case Attr_Machine: + case Attr_Model: return 0; case Attr_Address: @@ -2334,6 +2325,54 @@ Attribute_to_gnu (Node_Id gnat_node, tree *gnu_result_type_p, int attribute) } break; + case Attr_Model: + /* We treat Model as identical to Machine. This is true for at least + IEEE and some other nice floating-point systems. */ + + /* ... fall through ... */ + + case Attr_Machine: + /* The trick is to force the compiler to store the result in memory so + that we do not have extra precision used. But do this only when this + is necessary, i.e. for a type that is not the longest floating-point + type and if FP_ARITH_MAY_WIDEN is true. */ + prefix_unused = true; + gnu_expr = gnat_to_gnu (First (Expressions (gnat_node))); + gnu_result_type = get_unpadded_type (Etype (gnat_node)); + gnu_result = convert (gnu_result_type, gnu_expr); + + if (gnu_result_type != longest_float_type_node && fp_arith_may_widen) + { + tree rec_type = make_node (RECORD_TYPE); + tree field + = create_field_decl (get_identifier ("OBJ"), gnu_result_type, + rec_type, NULL_TREE, NULL_TREE, 0, 0); + tree rec_val, asm_expr; + + finish_record_type (rec_type, field, 0, false); + + rec_val = build_constructor_single (rec_type, field, gnu_result); + rec_val = save_expr (rec_val); + + asm_expr + = build5 (ASM_EXPR, void_type_node, + build_string (0, ""), + tree_cons (build_tree_list (NULL_TREE, + build_string (2, "=m")), + rec_val, NULL_TREE), + tree_cons (build_tree_list (NULL_TREE, + build_string (1, "m")), + rec_val, NULL_TREE), + NULL_TREE, NULL_TREE); + ASM_VOLATILE_P (asm_expr) = 1; + + gnu_result + = build_compound_expr (gnu_result_type, asm_expr, + build_component_ref (rec_val, NULL_TREE, + field, false)); + } + break; + default: /* This abort means that we have an unimplemented attribute. */ gcc_unreachable (); @@ -2347,7 +2386,7 @@ Attribute_to_gnu (Node_Id gnat_node, tree *gnu_result_type_p, int attribute) && TREE_SIDE_EFFECTS (gnu_prefix) && !Is_Entity_Name (gnat_prefix)) gnu_result - = build_compound_expr (TREE_TYPE (gnu_result), gnu_prefix, gnu_result); + = build_compound_expr (TREE_TYPE (gnu_result), gnu_prefix, gnu_result); *gnu_result_type_p = gnu_result_type; return gnu_result; @@ -8675,7 +8714,8 @@ convert_with_check (Entity_Id gnat_type, tree gnu_expr, bool overflowp, /* Now convert to the result base type. If this is a non-truncating float-to-integer conversion, round. */ - if (INTEGRAL_TYPE_P (gnu_base_type) && FLOAT_TYPE_P (gnu_in_basetype) + if (INTEGRAL_TYPE_P (gnu_base_type) + && FLOAT_TYPE_P (gnu_in_basetype) && !truncatep) { REAL_VALUE_TYPE half_minus_pred_half, pred_half; @@ -8684,11 +8724,11 @@ convert_with_check (Entity_Id gnat_type, tree gnu_expr, bool overflowp, const struct real_format *fmt; /* The following calculations depend on proper rounding to even - of each arithmetic operation. In order to prevent excess + of each arithmetic operation. In order to prevent excess precision from spoiling this property, use the widest hardware floating-point type if FP_ARITH_MAY_WIDEN is true. */ calc_type - = FP_ARITH_MAY_WIDEN ? longest_float_type_node : gnu_in_basetype; + = fp_arith_may_widen ? longest_float_type_node : gnu_in_basetype; /* FIXME: Should not have padding in the first place. */ if (TYPE_IS_PADDING_P (calc_type)) diff --git a/gcc/ada/gcc-interface/utils.c b/gcc/ada/gcc-interface/utils.c index f2afc73..b26d217 100644 --- a/gcc/ada/gcc-interface/utils.c +++ b/gcc/ada/gcc-interface/utils.c @@ -76,6 +76,9 @@ int double_float_alignment; is not specifically capped. */ int double_scalar_alignment; +/* True if floating-point arithmetics may use wider intermediate results. */ +bool fp_arith_may_widen = true; + /* Tree nodes for the various types and decls we create. */ tree gnat_std_decls[(int) ADT_LAST]; diff --git a/gcc/ada/sem_res.adb b/gcc/ada/sem_res.adb index ad64786..d7097e2 100644 --- a/gcc/ada/sem_res.adb +++ b/gcc/ada/sem_res.adb @@ -259,7 +259,7 @@ package body Sem_Res is procedure Simplify_Type_Conversion (N : Node_Id); -- Called after N has been resolved and evaluated, but before range checks -- have been applied. Currently simplifies a combination of floating-point - -- to integer conversion and Truncation attribute. + -- to integer conversion and Rounding or Truncation attribute. function Unique_Fixed_Point_Type (N : Node_Id) return Entity_Id; -- A universal_fixed expression in an universal context is unambiguous if @@ -11082,29 +11082,36 @@ package body Sem_Res is Opnd_Typ : constant Entity_Id := Etype (Operand); begin - if Is_Floating_Point_Type (Opnd_Typ) - and then - (Is_Integer_Type (Target_Typ) - or else (Is_Fixed_Point_Type (Target_Typ) - and then Conversion_OK (N))) - and then Nkind (Operand) = N_Attribute_Reference - and then Attribute_Name (Operand) = Name_Truncation + -- Special processing if the conversion is the expression of a + -- Rounding or Truncation attribute reference. In this case we + -- replace: - -- Special processing required if the conversion is the expression - -- of a Truncation attribute reference. In this case we replace: - - -- ityp (ftyp'Truncation (x)) + -- ityp (ftyp'Rounding (x)) or ityp (ftyp'Truncation (x)) -- by -- ityp (x) - -- with the Float_Truncate flag set, which is more efficient. + -- with the Float_Truncate flag set to False or True respectively, + -- which is more efficient. + if Is_Floating_Point_Type (Opnd_Typ) + and then + (Is_Integer_Type (Target_Typ) + or else (Is_Fixed_Point_Type (Target_Typ) + and then Conversion_OK (N))) + and then Nkind (Operand) = N_Attribute_Reference + and then (Attribute_Name (Operand) = Name_Rounding + or else Attribute_Name (Operand) = Name_Truncation) then - Rewrite (Operand, - Relocate_Node (First (Expressions (Operand)))); - Set_Float_Truncate (N, True); + declare + Truncate : constant Boolean := + Attribute_Name (Operand) = Name_Truncation; + begin + Rewrite (Operand, + Relocate_Node (First (Expressions (Operand)))); + Set_Float_Truncate (N, Truncate); + end; end if; end; end if; diff --git a/gcc/ada/ug_words b/gcc/ada/ug_words deleted file mode 100644 index 48a36b7..0000000 --- a/gcc/ada/ug_words +++ /dev/null @@ -1,271 +0,0 @@ -b_ ^ B_ -b~ ^ B__ -cc1 ^ CC1 -Cc1 ^ CC1 -emacs ^ EMACS -Emacs ^ EMACS -gdb ^ GDB -Gdb ^ GDB -gnat1 ^ GNAT1 -Gnat1 ^ GNAT1 -gnatbind ^ GNAT BIND -Gnatbind ^ GNAT BIND -gnatcheck ^ GNAT CHECK -Gnatcheck ^ GNAT CHECK -gnatchop ^ GNAT CHOP -Gnatchop ^ GNAT CHOP -gnatclean ^ GNAT CLEAN -Gnatclean ^ GNAT CLEAN -gnatelim ^ GNAT ELIM -Gnatelim ^ GNAT ELIM -gnatf ^ GNAT XREF -Gnatf ^ GNAT XREF -gnatfind ^ GNAT FIND -Gnatfind ^ GNAT FIND -gnatkr ^ GNAT KRUNCH -Gnatkr ^ GNAT KRUNCH -gnatlink ^ GNAT LINK -Gnatlink ^ GNAT LINK -gnatls ^ GNAT LIST -Gnatls ^ GNAT LIST -gnatmake ^ GNAT MAKE -Gnatmake ^ GNAT MAKE -gnatmetric ^ GNAT METRIC -Gnatmetric ^ GNAT METRIC -gnatname ^ GNAT NAME -Gnatname ^ GNAT NAME -gnatpp ^ GNAT PRETTY -Gnatpp ^ GNAT PRETTY -gnatprep ^ GNAT PREPROCESS -Gnatprep ^ GNAT PREPROCESS -gnatstub ^ GNAT STUB -Gnatstub ^ GNAT STUB -gnatxref ^ GNAT XREF -Gnatxref ^ GNAT XREF -gcc ^ GNAT COMPILE -gcc -c ^ GNAT COMPILE --fno-inline ^ /INLINE=SUPPRESS --fstack-check ^ /CHECKS=STACK --fno-strict-aliasing ^ /OPTIMIZE=NO_STRICT_ALIASING --gnata ^ /CHECKS=ASSERTIONS --gnatA ^ /NO_GNAT_ADC --gnatb ^ /REPORT_ERRORS=BRIEF --gnatB ^ /ASSUME_VALID --gnatc ^ /NOLOAD --gnatct ^ /NOLOAD /TREE_OUTPUT --gnatdc ^ /TRACE_UNITS --gnatdO ^ /REPORT_ERRORS=IMMEDIATE --gnatC ^ /COMPRESS_NAMES --gnatDG ^ /XDEBUG /EXPAND_SOURCEA --gnatD ^ /XDEBUG --gnateA ^ /ALIASING_CHECK --gnatec ^ /CONFIGURATION_PRAGMAS_FILE --gnated ^ /DISABLE_ATOMIC_SYNCHRONIZATION --gnateD ^ /SYMBOL_PREPROCESSING --gnateE ^ /EXTRA_EXCEPTION_INFORMATION --gnatef ^ /FULL_PATH_IN_BRIEF_MESSAGES --gnateF ^ /FLOAT_OVERFLOW_CHECK --gnateG ^ /GENERATE_PROCESSED_SOURCE --gnatei ^ /MAX_INSTANTIATIONS= --gnateI ^ /MULTI_UNIT_INDEX= --gnatel ^ /ELABORATION_INFO_MESSAGES --gnateL ^ /NOELABORATION_INFO_MESSAGES --gnatem ^ /MAPPING_FILE --gnatep ^ /DATA_PREPROCESSING --gnateP ^ /CATEGORIZATION_WARNINGS --gnateS ^ /SCO_OUTPUT --gnatet ^ /WRITE_TARGET_DEPENDENT_INFO --gnateT ^ /READ_TARGET_DEPENDENT_INFO --gnateu ^ /IGNORE_UNRECOGNIZED --gnateV ^ /PARAMETER_VALIDITY_CHECK --gnateY ^ /IGNORE_STYLE_CHECKS_PRAGMAS --gnatE ^ /CHECKS=ELABORATION --gnatf ^ /REPORT_ERRORS=FULL --gnatF ^ /UPPERCASE_EXTERNALS --gnatg ^ /STYLE_CHECKS=GNAT --gnatG ^ /EXPAND_SOURCE --gnatk ^ /FILE_NAME_MAX_LENGTH --gnatl ^ /LIST --gnatL ^ /LONGJMP_SETJMP --gnatj ^ /JUSTIFY_MESSAGES --gnatj0 ^ /NO_JUSTIFY_MESSAGES --gnatjnn ^ /JUSTIFY_MESSAGES=nn --gnatL ^ /INTERSPERSE_SOURCE --gnatm ^ /ERROR_LIMIT --gnatm2 ^ /ERROR_LIMIT=2 --gnatn ^ /INLINE=PRAGMA --gnatn1 ^ /INLINE=PRAGMA_LEVEL_1 --gnatn2 ^ /INLINE=PRAGMA_LEVEL_2 --gnatN ^ /INLINE=FULL --gnato ^ /CHECKS=OVERFLOW --gnato? ^ /OVERFLOW_CHECKS=? --gnato?? ^ /OVERFLOW_CHECKS=?? --gnatp ^ /CHECKS=SUPPRESS_ALL --gnat-p ^ /CHECKS=UNSUPPRESS_ALL --gnatP ^ /POLLING --gnatR ^ /REPRESENTATION_INFO --gnatR0 ^ /REPRESENTATION_INFO=NONE --gnatR1 ^ /REPRESENTATION_INFO=ARRAYS --gnatR2 ^ /REPRESENTATION_INFO=OBJECTS --gnatR3 ^ /REPRESENTATION_INFO=SYMBOLIC --gnatq ^ /TRY_SEMANTICS --gnatQ ^ /FORCE_ALI --gnatr ^ /TREAT_RESTRICTIONS_AS_WARNINGS --gnats ^ /SYNTAX_ONLY --gnatS ^ /PRINT_STANDARD --gnatt ^ /TREE_OUTPUT --gnatu ^ /UNITS_LIST --gnatU ^ /UNIQUE_ERROR_TAG --gnatv ^ /REPORT_ERRORS=VERBOSE --gnatV ^ /VALIDITY_CHECKING --gnatVa ^ /VALIDITY_CHECKING=ALL --gnatVc ^ /VALIDITY_CHECKING=COPIES --gnatVd ^ /VALIDITY_CHECKING=DEFAULT --gnatVE ^ /VALIDITY_CHECKING=NOCOMPONENTS --gnatVe ^ /VALIDITY_CHECKING=COMPONENTS --gnatVD ^ /VALIDITY_CHECKING=NODEFAULT --gnatVf ^ /VALIDITY_CHECKING=FLOATS --gnatVi ^ /VALIDITY_CHECKING=IN_PARAMS --gnatVm ^ /VALIDITY_CHECKING=MOD_PARAMS --gnatVn ^ /VALIDITY_CHECKING=NONE --gnatVo ^ /VALIDITY_CHECKING=OPERANDS --gnatVp ^ /VALIDITY_CHECKING=PARAMETERS --gnatVr ^ /VALIDITY_CHECKING=RETURNS --gnatVs ^ /VALIDITY_CHECKING=SUBSCRIPTS --gnatVt ^ /VALIDITY_CHECKING=TESTS --gnatw ^ /WARNINGS --gnatwa ^ /WARNINGS=OPTIONAL --gnatwA ^ /WARNINGS=NOOPTIONAL --gnatw.a ^ /WARNINGS=FAILING_ASSERTIONS --gnatw.A ^ /WARNINGS=NO_FAILING_ASSERTIONS --gnatwb ^ /WARNINGS=BAD_FIXED_VALUES --gnatwB ^ /WARNINGS=NO_BAD_FIXED_VALUES --gnatw.b ^ /WARNINGS=BIASED_REPRESENTATION --gnatw.B ^ /WARNINGS=NO_BIASED_REPRESENTATION --gnatwc ^ /WARNINGS=CONDITIONALS --gnatwC ^ /WARNINGS=NOCONDITIONALS --gnatw.c ^ /WARNINGS=MISSING_COMPONENT_CLAUSES --gnatw.C ^ /WARNINGS=NOMISSING_COMPONENT_CLAUSES --gnatw.d ^ /WARNINGS=TAG_WARNINGS --gnatw.D ^ /WARNINGS=NOTAG_WARNINGS --gnatwd ^ /WARNINGS=IMPLICIT_DEREFERENCE --gnatwD ^ /WARNINGS=NOIMPLICIT_DEREFERENCE --gnatwe ^ /WARNINGS=ERRORS --gnatw.e ^ /WARNINGS=EVERY --gnatwf ^ /WARNINGS=UNREFERENCED_FORMALS --gnatwF ^ /WARNINGS=NOUNREFERENCED_FORMALS --gnatwg ^ /WARNINGS=UNRECOGNIZED_PRAGMAS --gnatwG ^ /WARNINGS=NOUNRECOGNIZED_PRAGMAS --gnatwh ^ /WARNINGS=HIDING --gnatwH ^ /WARNINGS=NOHIDING --gnatw.h ^ /WARNINGS=AVOIDGAPS --gnatw.H ^ /WARNINGS=NOAVOIDGAPS --gnatwi ^ /WARNINGS=IMPLEMENTATION --gnatwI ^ /WARNINGS=NOIMPLEMENTATION --gnatw.i ^ /WARNINGS=OVERLAPPING_ACTUALS --gnatw.I ^ /WARNINGS=NOOVERLAPPING_ACTUALS --gnatwj ^ /WARNINGS=OBSOLESCENT --gnatwJ ^ /WARNINGS=NOOBSOLESCENT --gnatwk ^ /WARNINGS=CONSTANT_VARIABLES --gnatwK ^ /WARNINGS=NOCONSTANT_VARIABLES --gnatw.k ^ /WARNINGS=STANDARD_REDEFINITION --gnatw.K ^ /WARNINGS=NOSTANDARD_REDEFINITION --gnatwl ^ /WARNINGS=ELABORATION --gnatwL ^ /WARNINGS=NOELABORATION --gnatwl ^ /WARNINGS=INHERITED_ASPECTS --gnatwL ^ /WARNINGS=NOINHERITED_ASPECTS --gnatwm ^ /WARNINGS=MODIFIED_UNREF --gnatwM ^ /WARNINGS=NOMODIFIED_UNREF --gnatw.m ^ /WARNINGS=SUSPICIOUS_MODULUES --gnatw.M ^ /WARNINGS=NOSUSPICIOUS_MODULUES --gnatwn ^ /WARNINGS=NORMAL --gnatw.n ^ /WARNINGS=ATOMIC_SYNCHRONIZATION --gnatw.N ^ /WARNINGS=NOATOMIC_SYNCHRONIZATION --gnatwo ^ /WARNINGS=OVERLAYS --gnatwO ^ /WARNINGS=NOOVERLAYS --gnatw.o ^ /WARNINGS=OUT_PARAM_UNREF --gnatw.O ^ /WARNINGS=NOOUT_PARAM_UNREF --gnatwp ^ /WARNINGS=INEFFECTIVE_INLINE --gnatwP ^ /WARNINGS=NOINEFFECTIVE_INLINE --gnatw.p ^ /WARNINGS=PARAMETER_ORDER --gnatw.P ^ /WARNINGS=NO_PARAMETER_ORDER --gnatw.h ^ /WARNINGS=OVERRIDING_SIZE --gnatw.H ^ /WARNINGS=NOOVERRIDING_SIZE --gnatw.k ^ /WARNINGS=STANDARD_REDEFINITION --gnatw.K ^ /WARNINGS=NOSTANDARD_REDEFINITION --gnatwq ^ /WARNINGS=MISSING_PARENS --gnatwQ ^ /WARNINGS=NOMISSING_PARENS --gnatwr ^ /WARNINGS=REDUNDANT --gnatwR ^ /WARNINGS=NOREDUNDANT --gnatws ^ /WARNINGS=SUPPRESS --gnatw.s ^ /WARNINGS=OVERRIDING_SIZE --gnatw.S ^ /WARNINGS=NOOVERRIDING_SIZE --gnatwt ^ /WARNINGS=DELETED_CODE --gnatwT ^ /WARNINGS=NODELETED_CODE --gnatw.t ^ /WARNINGS=SUSPICIOUS_CONTRACT --gnatw.T ^ /WARNINGS=NOSUSPICIOUS_CONTRACT --gnatwu ^ /WARNINGS=UNUSED --gnatwU ^ /WARNINGS=NOUNUSED --gnatw.u ^ /WARNINGS=UNORDERED_ENUMERATIONS --gnatw.U ^ /WARNINGS=NOUNORDERED_ENUMERATIONS --gnatwv ^ /WARNINGS=VARIABLES_UNINITIALIZED --gnatwV ^ /WARNINGS=NOVARIABLES_UNINITIALIZED --gnatw.v ^ /WARNINGS=REVERSE_BIT_ORDER --gnatw.V ^ /WARNINGS=NOREVERSE_BIT_ORDER --gnatww ^ /WARNINGS=LOWBOUND_ASSUMED --gnatwW ^ /WARNINGS=NOLOWBOUND_ASSUMED --gnatw.w ^ /WARNINGS=WARNINGS_OFF_PRAGMAS --gnatw.W ^ /WARNINGS=NOWARNINGS_OFF_PRAGMAS --gnatwx ^ /WARNINGS=IMPORT_EXPORT_PRAGMAS --gnatwX ^ /WARNINGS=NOIMPORT_EXPORT_PRAGMAS --gnatw.x ^ /WARNINGS=LOCAL_RAISE_HANDLING --gnatw.X ^ /WARNINGS=NOLOCAL_RAISE_HANDLING --gnatwy ^ /WARNINGS=ADA_COMPATIBILITY --gnatwY ^ /WARNINGS=NOADA_COMPATIBILITY --gnatw.y ^ /WARNINGS=WHY_SPEC_NEEDS_BODY --gnatw.Y ^ /WARNINGS=NOWHY_SPEC_NEEDS_BODY --gnatwz ^ /WARNINGS=UNCHECKED_CONVERSIONS --gnatwZ ^ /WARNINGS=NOUNCHECKED_CONVERSIONS --gnatw.z ^ /WARNINGS=SIZE_ALIGNMENT --gnatw.Z ^ /WARNINGS=NOSIZE_ALIGNMENT --gnatW8 ^ /WIDE_CHARACTER_ENCODING=UTF8 --gnatW? ^ /WIDE_CHARACTER_ENCODING=? --gnaty ^ /STYLE_CHECKS --gnatyO ^ /STYLE_CHECKS=OVERRIDING_INDICATORS --gnatyy ^ /STYLE_CHECKS=ALL_BUILTIN --gnatZ ^ /ZERO_COST_EXCEPTIONS --gnatzc ^ /DISTRIBUTION_STUBS=CALLER --gnatzr ^ /DISTRIBUTION_STUBS=RECEIVER --gnat83 ^ /83 --gnat95 ^ /95 --gnat05 ^ /05 --gnat2005 ^ /2005 --gnat12 ^ /12 --gnat2012 ^ /2012 --gnatx ^ /XREF=SUPPRESS --gnatX ^ /EXTENSIONS_ALLOWED ---RTS ^ /RUNTIME_SYSTEM -switch ^ qualifier -switches ^ qualifiers -Switch ^ Qualifier -Switches ^ Qualifiers -stdout ^ SYS$OUTPUT -stderr ^ SYS$ERROR --bargs ^ /BINDER_QUALIFIERS --cargs ^ /COMPILER_QUALIFIERS --largs ^ /LINKER_QUALIFIERS --margs ^ /MAKE_QUALIFIERS --aIDIR ^ /SOURCE_SEARCH=direc --aODIR ^ /OBJECT_SEARCH=direc --IDIR ^ /SEARCH=direc --nostdinc ^ /NOSTD_INCLUDES --nostdlib ^ /NOSTD_LIBRARIES --pFILE ^ /PROJECT=file --O0 ^ /OPTIMIZE=NONE --O1 ^ /OPTIMIZE=SOME --O2 ^ /OPTIMIZE=ALL --O3 ^ /OPTIMIZE=INLINING --H32 ^ /32_MALLOC --H64 ^ /64_MALLOC --Wall ^ /WARNINGS=ALL_GCC --Wuninitialized ^ /WARNINGS=UNINITIALIZED diff --git a/gcc/ada/xgnatugn.adb b/gcc/ada/xgnatugn.adb deleted file mode 100644 index 496ebb3..0000000 --- a/gcc/ada/xgnatugn.adb +++ /dev/null @@ -1,55 +0,0 @@ ------------------------------------------------------------------------------- --- -- --- GNAT SYSTEM UTILITIES -- --- -- --- X G N A T U G N -- --- -- --- B o d y -- --- -- --- Copyright (C) 2003-2014, 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- -- --- ware Foundation; either version 3, or (at your option) any later ver- -- --- sion. GNAT is distributed in the hope that it will be useful, but WITH- -- --- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -- --- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -- --- for more details. You should have received a copy of the GNU General -- --- Public License distributed with GNAT; see file COPYING3. If not, go to -- --- http://www.gnu.org/licenses for a complete copy of the license. -- --- -- ------------------------------------------------------------------------------- - --- This is a temporary version whose only purpose is to work with --- Makefile.gnat6 --- Its main previous purpose (to handle VMS-specific wording in --- gnat_ugn.texi and projects.texi) is not applicable, since there is --- no longer a VMS-specific version of the User's Guide. - --- The program is invoked as follows: - --- xgnatugn <target> <in-file> <word-list> <out-file> - --- In this temporary version, the program simply copies <in-file> --- to <out-file> and ignores the <target> and <word-list> arguments - -with Ada.Command_Line; use Ada.Command_Line; -with Ada.Text_IO; use Ada.Text_IO; - -procedure Xgnatugn is - - Max_Line_Length : constant := 5000; - Line : String (1 .. Max_Line_Length); - Last : Natural; - File1, File2 : File_Type; - -begin - - Open (File1, Mode => In_File, Name => Argument (2)); - Create (File2, Mode => Out_File, Name => Argument (4)); - - while not End_Of_File (File1) loop - Get_Line (File1, Line, Last); - Put_Line (File2, Line (1 .. Last)); - end loop; -end Xgnatugn; |