aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Liska <mliska@suse.cz>2021-06-16 14:18:45 +0200
committerMartin Liska <mliska@suse.cz>2021-06-16 14:18:45 +0200
commit78a55ff9ef07c948d7fde6d7b9a88f99b8e93112 (patch)
tree651b28be8cc3953b233fa6453b8e4f8a4667ef56
parent4d03df89bfa09e0e05afe8da6f0f883a8ae8510d (diff)
parentd7deee423f993bee8ee440f6fe0c9126c316c64b (diff)
downloadgcc-78a55ff9ef07c948d7fde6d7b9a88f99b8e93112.zip
gcc-78a55ff9ef07c948d7fde6d7b9a88f99b8e93112.tar.gz
gcc-78a55ff9ef07c948d7fde6d7b9a88f99b8e93112.tar.bz2
Merge branch 'master' into devel/sphinx
-rw-r--r--gcc/ChangeLog68
-rw-r--r--gcc/DATESTAMP2
-rw-r--r--gcc/ada/ChangeLog276
-rw-r--r--gcc/ada/checks.adb58
-rw-r--r--gcc/ada/doc/gnat_rm/implementation_advice.rst16
-rw-r--r--gcc/ada/doc/gnat_ugn/building_executable_programs_with_gnat.rst14
-rw-r--r--gcc/ada/exp_ch3.adb11
-rw-r--r--gcc/ada/exp_ch4.adb4
-rw-r--r--gcc/ada/exp_ch6.adb2
-rw-r--r--gcc/ada/exp_ch9.adb39
-rw-r--r--gcc/ada/exp_disp.adb10
-rw-r--r--gcc/ada/exp_unst.adb5
-rw-r--r--gcc/ada/freeze.adb35
-rw-r--r--gcc/ada/ghost.adb18
-rw-r--r--gcc/ada/gnat_rm.texi619
-rw-r--r--gcc/ada/gnat_ugn.texi21
-rw-r--r--gcc/ada/initialize.c70
-rw-r--r--gcc/ada/libgnarl/s-taskin.ads3
-rw-r--r--gcc/ada/libgnat/s-except.adb15
-rw-r--r--gcc/ada/libgnat/s-except.ads22
-rw-r--r--gcc/ada/libgnat/s-exponr.adb9
-rw-r--r--gcc/ada/par_sco.adb23
-rw-r--r--gcc/ada/restrict.adb2
-rw-r--r--gcc/ada/rtsfind.ads16
-rw-r--r--gcc/ada/runtime.h4
-rw-r--r--gcc/ada/sem_attr.adb9
-rw-r--r--gcc/ada/sem_ch13.adb48
-rw-r--r--gcc/ada/sem_ch3.adb13
-rw-r--r--gcc/ada/sem_ch6.adb2
-rw-r--r--gcc/ada/sem_ch8.adb2
-rw-r--r--gcc/ada/sem_res.adb134
-rw-r--r--gcc/ada/sem_util.adb192
-rw-r--r--gcc/ada/sem_util.ads17
-rw-r--r--gcc/ada/sinput.adb21
-rw-r--r--gcc/ada/types.ads2
-rw-r--r--gcc/ada/urealp.adb10
-rw-r--r--gcc/analyzer/ChangeLog90
-rw-r--r--gcc/analyzer/engine.cc48
-rw-r--r--gcc/analyzer/exploded-graph.h20
-rw-r--r--gcc/analyzer/program-state.cc13
-rw-r--r--gcc/analyzer/region-model-impl-calls.cc20
-rw-r--r--gcc/analyzer/region-model-manager.cc94
-rw-r--r--gcc/analyzer/region-model-reachability.h8
-rw-r--r--gcc/analyzer/region-model.cc240
-rw-r--r--gcc/analyzer/region-model.h81
-rw-r--r--gcc/analyzer/store.cc12
-rw-r--r--gcc/analyzer/store.h1
-rw-r--r--gcc/builtins.c6
-rw-r--r--gcc/c-family/ChangeLog5
-rw-r--r--gcc/c/ChangeLog5
-rw-r--r--gcc/compare-elim.c1
-rw-r--r--gcc/config/i386/i386.md94
-rw-r--r--gcc/config/rs6000/rs6000-builtin.def6
-rw-r--r--gcc/cp/ChangeLog4
-rw-r--r--gcc/doc/analyzer.texi7
-rw-r--r--gcc/fortran/ChangeLog19
-rw-r--r--gcc/fortran/dump-parse-tree.c38
-rw-r--r--gcc/fortran/f95-lang.c4
-rw-r--r--gcc/fortran/gfortran.h26
-rw-r--r--gcc/fortran/openmp.c84
-rw-r--r--gcc/fortran/trans-decl.c5
-rw-r--r--gcc/fortran/trans-openmp.c97
-rw-r--r--gcc/fortran/trans.h9
-rw-r--r--gcc/gimplify.c35
-rw-r--r--gcc/langhooks-def.h6
-rw-r--r--gcc/langhooks.c7
-rw-r--r--gcc/langhooks.h13
-rw-r--r--gcc/range-op.cc31
-rw-r--r--gcc/stor-layout.c26
-rw-r--r--gcc/testsuite/ChangeLog46
-rw-r--r--gcc/testsuite/gcc.dg/analyzer/analyzer-decls.h3
-rw-r--r--gcc/testsuite/gcc.dg/analyzer/capacity-1.c106
-rw-r--r--gcc/testsuite/gcc.dg/analyzer/capacity-2.c53
-rw-r--r--gcc/testsuite/gcc.dg/analyzer/capacity-3.c82
-rw-r--r--gcc/testsuite/gcc.dg/analyzer/explode-2a.c51
-rw-r--r--gcc/testsuite/gcc.dg/guality/pr49888.c2
-rw-r--r--gcc/testsuite/gcc.dg/pr101062.c29
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr101088.c45
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/pr100453.c18
-rw-r--r--gcc/testsuite/gcc.dg/vect/pr97832-4.c28
-rw-r--r--gcc/testsuite/gcc.target/i386/bt-5.c44
-rw-r--r--gcc/testsuite/gcc.target/i386/bt-6.c69
-rw-r--r--gcc/testsuite/gcc.target/i386/bt-7.c69
-rw-r--r--gcc/testsuite/gfortran.dg/gomp/defaultmap-1.f9019
-rw-r--r--gcc/testsuite/gfortran.dg/gomp/defaultmap-2.f90108
-rw-r--r--gcc/testsuite/gfortran.dg/gomp/defaultmap-3.f9060
-rw-r--r--gcc/testsuite/gfortran.dg/gomp/defaultmap-4.f90141
-rw-r--r--gcc/testsuite/gfortran.dg/gomp/defaultmap-5.f90145
-rw-r--r--gcc/testsuite/gfortran.dg/gomp/defaultmap-6.f90104
-rw-r--r--gcc/testsuite/gfortran.dg/gomp/defaultmap-7.f9024
-rw-r--r--gcc/testsuite/gfortran.dg/gomp/pr99928-1.f9022
-rw-r--r--gcc/testsuite/gfortran.dg/gomp/pr99928-2.f9018
-rw-r--r--gcc/testsuite/gfortran.dg/gomp/pr99928-3.f906
-rw-r--r--gcc/testsuite/gfortran.dg/gomp/pr99928-4.f906
-rw-r--r--gcc/testsuite/gfortran.dg/gomp/pr99928-5.f908
-rw-r--r--gcc/testsuite/gfortran.dg/gomp/pr99928-6.f908
-rw-r--r--gcc/testsuite/gfortran.dg/gomp/pr99928-8.f9022
-rw-r--r--gcc/testsuite/gnat.dg/limited4.adb13
-rw-r--r--gcc/tree-sra.c21
-rw-r--r--gcc/tree-ssa-loop-im.c21
-rw-r--r--gcc/tree-vect-slp.c5
-rw-r--r--libffi/src/x86/ffi64.c9
-rw-r--r--libffi/testsuite/libffi.call/nested_struct12.c107
-rw-r--r--libgomp/ChangeLog5
-rw-r--r--libgomp/testsuite/libgomp.fortran/defaultmap-8.f90279
-rw-r--r--libstdc++-v3/ChangeLog43
-rw-r--r--libstdc++-v3/include/bits/iterator_concepts.h18
-rw-r--r--libstdc++-v3/include/bits/ranges_base.h82
-rw-r--r--libstdc++-v3/include/bits/ranges_util.h85
-rw-r--r--libstdc++-v3/include/std/ranges18
-rw-r--r--libstdc++-v3/testsuite/std/ranges/adaptors/all.cc30
-rw-r--r--libstdc++-v3/testsuite/std/ranges/headers/ranges/synopsis.cc26
-rw-r--r--libstdc++-v3/testsuite/std/ranges/single_view.cc24
-rw-r--r--libstdc++-v3/testsuite/std/ranges/subrange/constexpr.cc26
114 files changed, 4158 insertions, 957 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 65d5710..92423fd 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,71 @@
+2021-06-15 Martin Sebor <msebor@redhat.com>
+
+ PR middle-end/100876
+ * builtins.c: (gimple_call_return_array): Account for size_t
+ mangling as either unsigned int or unsigned long
+
+2021-06-15 Jeff Law <jeffreyalaw@gmail.com>
+
+ * compare-elim.c (try_eliminate_compare): Run DCE to clean things
+ up before eliminating comparisons.
+
+2021-06-15 Aldy Hernandez <aldyh@redhat.com>
+
+ * range-op.cc (operator_bitwise_or::wi_fold): Make sure
+ nonzero|X is nonzero.
+ (range_op_bitwise_and_tests): Add tests for above.
+
+2021-06-15 Carl Love <cel@us.ibm.com>
+
+ PR target/101022
+ * config/rs6000/rs6000-builtin.def (VCMPEQUT): Fix the ICODE for the
+ enum definition.
+ (VRLQ, VSLQ, VSRQ, VSRAQ): Remove unused BU_P10_OVERLOAD_2
+ definitions.
+
+2021-06-15 Tobias Burnus <tobias@codesourcery.com>
+
+ PR fortran/92568
+ * gimplify.c (enum gimplify_defaultmap_kind): Add GDMK_SCALAR_TARGET.
+ (struct gimplify_omp_ctx): Extend defaultmap array by one.
+ (new_omp_context): Init defaultmap[GDMK_SCALAR_TARGET].
+ (omp_notice_variable): Update type classification for Fortran.
+ (gimplify_scan_omp_clauses): Update calls for new argument; handle
+ GDMK_SCALAR_TARGET; for Fortran, GDMK_POINTER avoid GOVD_MAP_0LEN_ARRAY.
+ * langhooks-def.h (lhd_omp_scalar_p): Add 'ptr_ok' argument.
+ * langhooks.c (lhd_omp_scalar_p): Likewise.
+ (LANG_HOOKS_OMP_ALLOCATABLE_P, LANG_HOOKS_OMP_SCALAR_TARGET_P): New.
+ (LANG_HOOKS_DECLS): Add them.
+ * langhooks.h (struct lang_hooks_for_decls): Add new hooks, update
+ omp_scalar_p pointer type to include the new bool argument.
+
+2021-06-15 David Malcolm <dmalcolm@redhat.com>
+
+ * doc/analyzer.texi
+ (Special Functions for Debugging the Analyzer): Add
+ __analyzer_dump_capacity.
+
+2021-06-15 Jakub Jelinek <jakub@redhat.com>
+
+ PR target/101046
+ * expr.c (expand_expr_real_2) <case VEC_PACK_FIX_TRUNC_EXPR,
+ case VEC_PACK_TRUNC_EXPR>: Clear subtarget when changing mode.
+
+2021-06-15 Richard Biener <rguenther@suse.de>
+
+ * cfgloopanal.c (mark_irreducible_loops): Use a dominance
+ check to identify loop latches.
+ * cfgloop.c (verify_loop_structure): Likewise.
+ * loop-init.c (apply_loop_flags): Allow marked irreducible
+ regions even with multiple latches.
+ * predict.c (rebuild_frequencies): Simplify.
+
+2021-06-15 Richard Biener <rguenther@suse.de>
+
+ * tree-ssa-threadupdate.c
+ (jump_thread_path_registry::mark_threaded_blocks): Assert we
+ have marked irreducible regions.
+
2021-06-14 Martin Sebor <msebor@redhat.com>
PR c++/100876
diff --git a/gcc/DATESTAMP b/gcc/DATESTAMP
index 7828728..052decd 100644
--- a/gcc/DATESTAMP
+++ b/gcc/DATESTAMP
@@ -1 +1 @@
-20210615
+20210616
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog
index 9805f18..31eca3f 100644
--- a/gcc/ada/ChangeLog
+++ b/gcc/ada/ChangeLog
@@ -1,3 +1,279 @@
+2021-06-15 Steve Baird <baird@adacore.com>
+
+ * exp_util.adb (Kill_Dead_Code): Generalize the existing
+ handling of if statements to handle case statements similarly.
+
+2021-06-15 Eric Botcazou <ebotcazou@adacore.com>
+
+ * raise.h (_gnat_builtin_longjmp): Delete.
+ (set_gnat_exit_status): Likewise.
+
+2021-06-15 Piotr Trojanek <trojanek@adacore.com>
+
+ * exp_util.adb (Possible_Side_Effect_In_SPARK): Handle component
+ declaration just like full type and subtype declarations.
+
+2021-06-15 Yannick Moy <moy@adacore.com>
+
+ * errout.adb (First_And_Last_Node): Also apply to arbitrary late
+ declarations, not only subprogram specs.
+
+2021-06-15 Bob Duff <duff@adacore.com>
+
+ * sem_ch3.adb (Make_Class_Wide_Type): Make sure all the calls to
+ Reinit_Field_To_Zero are for the correct Ekinds.
+
+2021-06-15 Bob Duff <duff@adacore.com>
+
+ * aspects.ads (No_Task_Parts): New aspect.
+ * snames.ads-tmpl: Add the aspect name.
+ * exp_ch6.adb (Might_Have_Tasks): Return False if this is a
+ class-wide type whose specific type has No_Task_Parts.
+ * freeze.adb (Check_No_Parts_Violations): This is an adaptation
+ of the procedure formerly known as
+ Check_No_Controlled_Parts_Violations, which now supports both
+ No_Controlled_Parts and No_Task_Parts. It takes a parameter
+ indicating which aspect is being checked.
+ (Freeze_Entity): Call Check_No_Parts_Violations for both
+ aspects.
+ * sem_ch13.adb (Analyze_Aspect_Specifications): The code for
+ Aspect_No_Controlled_Parts already works as is with
+ Aspect_No_Task_Parts.
+ * libgnat/a-iteint.ads: Add No_Task_Parts aspect to the two
+ iterator iterfaces.
+ * doc/gnat_rm/implementation_defined_aspects.rst: Add
+ documentation for the No_Task_Parts aspect.
+ * gnat_rm.texi: Regenerate.
+
+2021-06-15 Arnaud Charlet <charlet@adacore.com>
+
+ * exp_unst.adb (Unnest_Subprogram.Build_Table.Visit_Node): Fix
+ handling of scopes for subprogram calls.
+
+2021-06-15 Piotr Trojanek <trojanek@adacore.com>
+
+ * sem_prag.adb: Fix typos in comments related to access types.
+ * sem_util.adb (Is_Access_Variable): Stronger condition.
+
+2021-06-15 Arnaud Charlet <charlet@adacore.com>
+
+ * Make-generated.in: Add rule to copy runtime files needed
+ during stage1.
+ * raise.c: Remove obsolete symbols used during bootstrap.
+ * gcc-interface/Make-lang.in: Do not use libgnat sources during
+ stage1.
+ (GNAT_ADA_OBJS, GNATBIND_OBJS): Split in two parts, the common
+ part and the part only used outside of stage1.
+ (ADA_GENERATED_FILES): Add runtime files needed during bootstrap
+ when recent APIs are needed.
+ (ada/b_gnatb.adb): Remove prerequisite.
+ * gcc-interface/system.ads: Remove obsolete entries.
+
+2021-06-15 Eric Botcazou <ebotcazou@adacore.com>
+
+ * raise-gcc.c (__gnat_personality_seh0): Use PERSONALITY_FUNCTION.
+
+2021-06-15 Ed Schonberg <schonberg@adacore.com>
+
+ * sem_util.adb (Is_Confirming): Separate the handling of
+ Implicit_Dereference, for which no pragma is generated but which
+ is already checked for legality in Sem_Ch13, including renamed
+ discriminants in a derived type.
+ (Is_Confirming, Same_Name): For expanded names, only check
+ matching of selector, because prefix may correspond to original
+ and derived types with different names and/or scopes. Semantic
+ checks on aspect expression have already verified its legality.
+ Add comments regarding possible gaps in RM description of the
+ feature.
+
+2021-06-15 Gary Dismukes <dismukes@adacore.com>
+
+ * freeze.adb (Freeze_Subprogram): Don't propagate conventions
+ Intrinsic or Entry to anonymous access-to-subprogram types
+ associated with subprograms having those conventions. Update
+ related comment.
+ * sem_attr.adb (Resolve_Attribute, Attribute_*Access): Remove
+ special-case warning code for cases where a called subprogram
+ has convention Intrinsic as well as its formal's type (the
+ expected type for the Access attribute), since this case can no
+ longer occur.
+
+2021-06-15 Piotr Trojanek <trojanek@adacore.com>
+
+ * exp_imgv.adb (Expand_User_Defined_Enumeration_Image): Fix
+ typos.
+
+2021-06-15 Bob Duff <duff@adacore.com>
+
+ * einfo-utils.adb (Known_Component_Size,
+ Known_Static_Component_Size, Unknown_Component_Size): Use
+ Implementation_Base_Type instead of Base_Type.
+
+2021-06-15 Bob Duff <duff@adacore.com>
+
+ * gen_il-gen-gen_entities.adb (E_Loop_Parameter): Add
+ Interface_Name field.
+
+2021-06-15 Bob Duff <duff@adacore.com>
+
+ * sem_cat.adb (Check_Non_Static_Default_Expr): Allow nonstatic
+ expression in predefined unit with pragma Preelaborate.
+
+2021-06-15 Yannick Moy <moy@adacore.com>
+
+ * doc/gnat_rm/intrinsic_subprograms.rst: More details on shift
+ operations for signed types. Also add the missing Import and
+ Convention on the example.
+ * gnat_rm.texi: Regenerate.
+
+2021-06-15 Eric Botcazou <ebotcazou@adacore.com>
+
+ * raise-gcc.c: Include <cstdarg> instead of <stdarg.h> in C++.
+ Include <stdbool.h> and unconditionally <stdlib.h> in C.
+
+2021-06-15 Piotr Trojanek <trojanek@adacore.com>
+
+ * sem_util.ads (Find_Overlaid_Entity): Simplify comment for
+ spec.
+ * sem_util.adb (Find_Overlaid_Entity): Remove defensive code
+ from body.
+
+2021-06-15 Eric Botcazou <ebotcazou@adacore.com>
+
+ * argv.c: Add include of <stdlib.h> for the runtime.
+ (gnat_argv): Change type to char ** and initialize to NULL.
+ (gnat_envp): Likewise.
+ * argv-lynxos178-raven-cert.c: Add include of <stdlib.h>.
+ (gnat_argv): Change type to char ** and initialize to NULL.
+ (gnat_envp): Likewise.
+
+2021-06-15 Bob Duff <duff@adacore.com>
+
+ * gen_il-gen.adb (Setter_Needs_Parent): Add missing
+ Then_Actions. Fix self-contradictory comment.
+ * exp_util.adb (Insert_Actions): Minor comment improvments.
+
+2021-06-15 Arnaud Charlet <charlet@adacore.com>
+
+ * sem_eval.adb (Eval_Logical_Op, Test_Expression_Is_Foldable):
+ Add support for folding more "and"/"or" expressions.
+ * exp_util.adb (Side_Effect_Free): Fix handling of membership
+ tests.
+
+2021-06-15 Piotr Trojanek <trojanek@adacore.com>
+
+ * sem_res.adb (Resolve_Actual): Replace repeated calls to
+ "Etype (F)" with references to "F_Typ", which keeps the results
+ of exactly that call.
+
+2021-06-15 Bob Duff <duff@adacore.com>
+
+ * gen_il-gen.adb (To_Bit_Offset): Use 'Base to avoid overflow in
+ computations in Last_Bit when Offset = 'Last.
+ (Choose_Offset): Give a better error message when we run out of
+ fields. In particular, point out that
+ Gen_IL.Internals.Bit_Offset'Last needs to be increased.
+
+2021-06-15 Bob Duff <duff@adacore.com>
+
+ * atree.ads, einfo-utils.ads, einfo-utils.adb, fe.h, gen_il.adb,
+ gen_il.ads, gen_il-gen-gen_entities.adb,
+ gen_il-gen-gen_nodes.adb, sem_ch12.adb, sem_ch3.adb,
+ sem_util.adb, sinfo-utils.ads, treepr.adb, types.ads: Clean up
+ ??? comments and other comments.
+ * atree.adb: Clean up ??? comments and other comments.
+ (Validate_Node): Fix bug: "Off_0 (N) < Off_L (N)"
+ should be "Off_0 (N) <= Off_L (N)".
+ * gen_il-gen.adb, gen_il-gen.ads: Clean up ???
+ comments and other comments. Add support for getter-specific
+ and setter-specific preconditions. Detect the error of putting
+ a field in the wrong subrange. Misc cleanup.
+ (Node_Field vs. Entity_Field): Clean up Nmake. Improve
+ comments.
+ * gen_il-utils.ads: Misc cleanup. Move...
+ * gen_il-internals.ads: ... here.
+ * gen_il-utils.adb: Misc cleanup. Move...
+ * gen_il-internals.adb: ... here.
+ * gen_il-fields.ads: Move Was_Default_Init_Box_Association,
+ which was in the wrong subrange. Add comments. Misc cleanup.
+ * gen_il-types.ads: Add Named_Access_Kind.
+ * sinfo-cn.adb: Clean up ??? comments and other comments.
+ Remove redundant assertions.
+ * einfo.ads, sinfo.ads: Clean up ??? comments and other
+ comments. Remove all the comments indicating field offsets.
+ These are obsolete now that Gen_IL computes the offsets
+ automatically.
+
+2021-06-15 Arnaud Charlet <charlet@adacore.com>
+
+ * einfo.ads, errout.adb, errout.ads, exp_aggr.adb, exp_ch5.adb,
+ exp_ch6.adb, exp_ch8.adb, exp_ch9.adb, exp_imgv.adb,
+ exp_put_image.adb, fe.h, impunit.adb, impunit.ads,
+ libgnat/a-cobove.ads, libgnat/a-convec.ads, opt.ads,
+ par-ch12.adb, par-ch3.adb, par-ch4.adb, par-ch5.adb,
+ par-ch6.adb, par-prag.adb, par-util.adb, scans.ads, scng.adb,
+ sem_aggr.adb, sem_attr.adb, sem_ch10.adb, sem_ch12.adb,
+ sem_ch13.adb, sem_ch3.adb, sem_ch5.adb, sem_ch6.adb,
+ sem_ch8.adb, sem_elab.adb, sem_eval.adb, sem_prag.adb,
+ sem_res.adb, sem_type.adb, sem_util.adb, sem_util.ads,
+ sinfo.ads, snames.ads-tmpl, sprint.adb, switch-c.adb, usage.adb,
+ doc/gnat_ugn/building_executable_programs_with_gnat.rst,
+ doc/gnat_rm/implementation_defined_aspects.rst,
+ gcc-interface/trans.c: Update all references to Ada 2020 to Ada
+ 2022. Rename pragma Ada_2020 to Ada_2022. Update documentation
+ accordingly.
+ * gnat_ugn.texi, gnat_rm.texi: Regenerate.
+
+2021-06-15 Steve Baird <baird@adacore.com>
+
+ * sem_util.adb (Gather_Components): Factor the test that was
+ already being used to govern emitting a pre-Ada_2020 error
+ message into an expression function,
+ OK_Scope_For_Discrim_Value_Error_Messages. Call that new
+ function in two places: the point where the same test was being
+ performed previously, and in governing emission of a newer
+ Ada_2020 error message. In both cases, the out-mode parameter
+ Gather_Components.Report_Errors is set to True even if no error
+ messages are generated within Gather_Components.
+ * sem_util.ads: Correct a comment.
+
+2021-06-15 Richard Kenner <kenner@adacore.com>
+
+ * sem_ch3.adb (Array_Type_Declaration, Build_Derived_Type):
+ Reinitialize Stored_Constraint when needed.
+ (Set_Modular_Size): Likewise.
+ * atree.adb: (Check_Vanishing_Fields): Add node id to debugging
+ information.
+
+2021-06-15 Bob Duff <duff@adacore.com>
+
+ * sem_util.adb (Propagate_Invariant_Attributes): Call
+ Set_Has_Own_Invariants on the base type, because these are
+ Base_Type_Only. The problem is that the base type of a type is
+ indeed a base type when Set_Base_Type is called, but then the
+ type is mutated into a subtype in rare cases.
+ * atree.ads, atree.adb (Is_Entity): Export. Correct subtype of
+ parameter in body.
+ * gen_il-gen.adb: Improve getters so that "Pre => ..." can refer
+ to the value of the field. Put Warnings (Off) on some with
+ clauses that are not currently used, but might be used by such
+ Pre's.
+
+2021-06-15 Piotr Trojanek <trojanek@adacore.com>
+
+ * sem_ch3.adb (Access_Type_Declaration): Add comments to explain
+ the ordering of Mutate_Kind and Set_Directly_Designated_Type;
+ remove temporary setting of Ekind to E_Access_Type for building
+ _master objects, since now the Ekind is already set to its final
+ value. Move repeated code into Setup_Access_Type routine and use
+ it so that Process_Subtype is executed before mutating the kind
+ of the type entity.
+ * gen_il-gen-gen_entities.adb (Gen_Entities): Remove
+ Directly_Designated_Type from E_Void, E_Private_Record,
+ E_Limited_Private_Type and Incomplete_Kind; now it only belongs
+ to Access_Kind entities.
+ * sem_util.adb: Minor reformatting.
+
2021-06-03 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: Add PAT
diff --git a/gcc/ada/checks.adb b/gcc/ada/checks.adb
index 572f1ec..877a982 100644
--- a/gcc/ada/checks.adb
+++ b/gcc/ada/checks.adb
@@ -2306,6 +2306,11 @@ package body Checks is
is
Loc : constant Source_Ptr := Sloc (Call);
+ function Parameter_Passing_Mechanism_Specified
+ (Typ : Entity_Id)
+ return Boolean;
+ -- Returns True if parameter-passing mechanism is specified for type Typ
+
function May_Cause_Aliasing
(Formal_1 : Entity_Id;
Formal_2 : Entity_Id) return Boolean;
@@ -2332,6 +2337,19 @@ package body Checks is
-- Check contains all and-ed simple tests generated so far or remains
-- unchanged in the case of detailed exception messaged.
+ -------------------------------------------
+ -- Parameter_Passing_Mechanism_Specified --
+ -------------------------------------------
+
+ function Parameter_Passing_Mechanism_Specified
+ (Typ : Entity_Id)
+ return Boolean
+ is
+ begin
+ return Is_Elementary_Type (Typ)
+ or else Is_By_Reference_Type (Typ);
+ end Parameter_Passing_Mechanism_Specified;
+
------------------------
-- May_Cause_Aliasing --
------------------------
@@ -2493,10 +2511,7 @@ package body Checks is
-- Elementary types are always passed by value, therefore actuals of
-- such types cannot lead to aliasing. An aggregate is an object in
-- Ada 2012, but an actual that is an aggregate cannot overlap with
- -- another actual. A type that is By_Reference (such as an array of
- -- controlled types) is not subject to the check because any update
- -- will be done in place and a subsequent read will always see the
- -- correct value, see RM 6.2 (12/3).
+ -- another actual.
if Nkind (Orig_Act_1) = N_Aggregate
or else (Nkind (Orig_Act_1) = N_Qualified_Expression
@@ -2504,10 +2519,7 @@ package body Checks is
then
null;
- elsif Is_Object_Reference (Orig_Act_1)
- and then not Is_Elementary_Type (Etype (Orig_Act_1))
- and then not Is_By_Reference_Type (Etype (Orig_Act_1))
- then
+ elsif Is_Object_Reference (Orig_Act_1) then
Actual_2 := Next_Actual (Actual_1);
Formal_2 := Next_Formal (Formal_1);
while Present (Actual_2) and then Present (Formal_2) loop
@@ -2518,18 +2530,28 @@ package body Checks is
-- the mode of the two formals may lead to aliasing.
if Is_Object_Reference (Orig_Act_2)
- and then not Is_Elementary_Type (Etype (Orig_Act_2))
and then May_Cause_Aliasing (Formal_1, Formal_2)
then
- Remove_Side_Effects (Actual_1);
- Remove_Side_Effects (Actual_2);
-
- Overlap_Check
- (Actual_1 => Actual_1,
- Actual_2 => Actual_2,
- Formal_1 => Formal_1,
- Formal_2 => Formal_2,
- Check => Check);
+
+ -- The aliasing check only applies when some of the formals
+ -- have their passing mechanism unspecified; RM 6.2 (12/3).
+
+ if Parameter_Passing_Mechanism_Specified (Etype (Orig_Act_1))
+ and then
+ Parameter_Passing_Mechanism_Specified (Etype (Orig_Act_2))
+ then
+ null;
+ else
+ Remove_Side_Effects (Actual_1);
+ Remove_Side_Effects (Actual_2);
+
+ Overlap_Check
+ (Actual_1 => Actual_1,
+ Actual_2 => Actual_2,
+ Formal_1 => Formal_1,
+ Formal_2 => Formal_2,
+ Check => Check);
+ end if;
end if;
Next_Actual (Actual_2);
diff --git a/gcc/ada/doc/gnat_rm/implementation_advice.rst b/gcc/ada/doc/gnat_rm/implementation_advice.rst
index e86ad0a..e7649b0 100644
--- a/gcc/ada/doc/gnat_rm/implementation_advice.rst
+++ b/gcc/ada/doc/gnat_rm/implementation_advice.rst
@@ -799,6 +799,22 @@ flushed before the ``Get_Immediate`` call. A special unit
``Interfaces.Vxworks.IO`` is provided that contains routines to enable
this functionality.
+.. index:: Containers
+
+RM A.18: ``Containers``
+================================
+
+All implementation advice pertaining to Ada.Containers and its
+child units (that is, all implementation advice occurring within
+section A.18 and its subsections) is followed except for A.18.24(17):
+
+ "Bounded ordered set objects should be implemented without implicit pointers or dynamic allocation. "
+
+The implementations of the two Reference_Preserving_Key functions of
+the generic package Ada.Containers.Bounded_Ordered_Sets each currently make
+use of dynamic allocation; other operations on bounded ordered set objects
+follow the implementation advice.
+
.. index:: Export
RM B.1(39-41): Pragma ``Export``
diff --git a/gcc/ada/doc/gnat_ugn/building_executable_programs_with_gnat.rst b/gcc/ada/doc/gnat_ugn/building_executable_programs_with_gnat.rst
index 3da03df..63b3f17 100644
--- a/gcc/ada/doc/gnat_ugn/building_executable_programs_with_gnat.rst
+++ b/gcc/ada/doc/gnat_ugn/building_executable_programs_with_gnat.rst
@@ -4629,8 +4629,18 @@ checks to be performed. The following checks are defined:
in the string after :switch:`-gnaty`
then proper indentation is checked, with the digit indicating the
indentation level required. A value of zero turns off this style check.
- The general style of required indentation is as specified by
- the examples in the Ada Reference Manual. Full line comments must be
+ The rule checks that the following constructs start on a column that is
+ a multiple of the alignment level:
+
+ * beginnings of declarations (except record component declarations)
+ and statements;
+
+ * beginnings of the structural components of compound statements;
+
+ * ``end`` keyword that completes the declaration of a program unit declaration
+ or body or that completes a compound statement.
+
+ Full line comments must be
aligned with the ``--`` starting on a column that is a multiple of
the alignment level, or they may be aligned the same way as the following
non-blank line (this is useful when full line comments appear in the middle
diff --git a/gcc/ada/exp_ch3.adb b/gcc/ada/exp_ch3.adb
index 4de75a6..90529f1 100644
--- a/gcc/ada/exp_ch3.adb
+++ b/gcc/ada/exp_ch3.adb
@@ -1696,8 +1696,7 @@ package body Exp_Ch3 is
if Has_Task (Full_Type) then
if Restriction_Active (No_Task_Hierarchy) then
- Append_To (Args,
- New_Occurrence_Of (RTE (RE_Library_Task_Level), Loc));
+ Append_To (Args, Make_Integer_Literal (Loc, Library_Task_Level));
else
Append_To (Args, Make_Identifier (Loc, Name_uMaster));
end if;
@@ -2218,8 +2217,8 @@ package body Exp_Ch3 is
if Has_Task (Rec_Type) then
if Restriction_Active (No_Task_Hierarchy) then
- Append_To (Args,
- New_Occurrence_Of (RTE (RE_Library_Task_Level), Loc));
+ Append_To
+ (Args, Make_Integer_Literal (Loc, Library_Task_Level));
else
Append_To (Args, Make_Identifier (Loc, Name_uMaster));
end if;
@@ -4389,7 +4388,7 @@ package body Exp_Ch3 is
declare
Spec : Node_Id;
- Formals : List_Id := New_List;
+ Formals : List_Id;
begin
Formals := New_List (
@@ -9071,7 +9070,7 @@ package body Exp_Ch3 is
Defining_Identifier =>
Make_Defining_Identifier (Loc, Name_uMaster),
Parameter_Type =>
- New_Occurrence_Of (RTE (RE_Master_Id), Loc)));
+ New_Occurrence_Of (Standard_Integer, Loc)));
Set_Has_Master_Entity (Proc_Id);
diff --git a/gcc/ada/exp_ch4.adb b/gcc/ada/exp_ch4.adb
index 81f8387..5b3a116 100644
--- a/gcc/ada/exp_ch4.adb
+++ b/gcc/ada/exp_ch4.adb
@@ -5193,8 +5193,8 @@ package body Exp_Ch4 is
end if;
if Restriction_Active (No_Task_Hierarchy) then
- Append_To (Args,
- New_Occurrence_Of (RTE (RE_Library_Task_Level), Loc));
+ Append_To
+ (Args, Make_Integer_Literal (Loc, Library_Task_Level));
else
Append_To (Args,
New_Occurrence_Of
diff --git a/gcc/ada/exp_ch6.adb b/gcc/ada/exp_ch6.adb
index 919e174..b5d77bd 100644
--- a/gcc/ada/exp_ch6.adb
+++ b/gcc/ada/exp_ch6.adb
@@ -602,7 +602,7 @@ package body Exp_Ch6 is
-- Use a dummy _master actual in case of No_Task_Hierarchy
if Restriction_Active (No_Task_Hierarchy) then
- Actual := New_Occurrence_Of (RTE (RE_Library_Task_Level), Loc);
+ Actual := Make_Integer_Literal (Loc, Library_Task_Level);
-- In the case where we use the master associated with an access type,
-- the actual is an entity and requires an explicit reference.
diff --git a/gcc/ada/exp_ch9.adb b/gcc/ada/exp_ch9.adb
index fa2d84d..3948b6a 100644
--- a/gcc/ada/exp_ch9.adb
+++ b/gcc/ada/exp_ch9.adb
@@ -1756,34 +1756,21 @@ package body Exp_Ch9 is
-- Generate a dummy master if tasks or tasking hierarchies are
-- prohibited.
- -- _Master : constant Master_Id := 3;
+ -- _Master : constant Integer := Library_Task_Level;
if not Tasking_Allowed
or else Restrictions.Set (No_Task_Hierarchy)
or else not RTE_Available (RE_Current_Master)
then
- declare
- Expr : Node_Id;
-
- begin
- -- RE_Library_Task_Level is not always available in configurable
- -- RunTime
-
- if not RTE_Available (RE_Library_Task_Level) then
- Expr := Make_Integer_Literal (Loc, Uint_3);
- else
- Expr := New_Occurrence_Of (RTE (RE_Library_Task_Level), Loc);
- end if;
-
- Master_Decl :=
- Make_Object_Declaration (Loc,
- Defining_Identifier =>
- Make_Defining_Identifier (Loc, Name_uMaster),
- Constant_Present => True,
- Object_Definition =>
- New_Occurrence_Of (Standard_Integer, Loc),
- Expression => Expr);
- end;
+ Master_Decl :=
+ Make_Object_Declaration (Loc,
+ Defining_Identifier =>
+ Make_Defining_Identifier (Loc, Name_uMaster),
+ Constant_Present => True,
+ Object_Definition =>
+ New_Occurrence_Of (Standard_Integer, Loc),
+ Expression =>
+ Make_Integer_Literal (Loc, Library_Task_Level));
-- Generate:
-- _master : constant Integer := Current_Master.all;
@@ -3628,7 +3615,8 @@ package body Exp_Ch9 is
Master_Decl :=
Make_Object_Renaming_Declaration (Loc,
Defining_Identifier => Master_Id,
- Subtype_Mark => New_Occurrence_Of (RTE (RE_Master_Id), Loc),
+ Subtype_Mark =>
+ New_Occurrence_Of (Standard_Integer, Loc),
Name => Make_Identifier (Loc, Name_uMaster));
Insert_Action (Context, Master_Decl);
@@ -14710,8 +14698,7 @@ package body Exp_Ch9 is
if Restriction_Active (No_Task_Hierarchy) = False then
Append_To (Args, Make_Identifier (Loc, Name_uMaster));
else
- Append_To (Args,
- New_Occurrence_Of (RTE (RE_Library_Task_Level), Loc));
+ Append_To (Args, Make_Integer_Literal (Loc, Library_Task_Level));
end if;
end if;
diff --git a/gcc/ada/exp_disp.adb b/gcc/ada/exp_disp.adb
index 20a32cd..eb6b352 100644
--- a/gcc/ada/exp_disp.adb
+++ b/gcc/ada/exp_disp.adb
@@ -868,6 +868,7 @@ package body Exp_Disp is
Str_Loc : constant String := Build_Location_String (Loc);
+ A : Node_Id;
Cond : Node_Id;
Msg : Node_Id;
Prec : Node_Id;
@@ -900,6 +901,15 @@ package body Exp_Disp is
return;
end if;
+ -- Ensure that the evaluation of the actuals will not produce side
+ -- effects (since the check will use a copy of the actuals).
+
+ A := First_Actual (Call_Node);
+ while Present (A) loop
+ Remove_Side_Effects (A);
+ Next_Actual (A);
+ end loop;
+
-- The expression for the precondition is analyzed within the
-- generated pragma. The message text is the last parameter of
-- the generated pragma, indicating source of precondition.
diff --git a/gcc/ada/exp_unst.adb b/gcc/ada/exp_unst.adb
index 52d6142..8204fdc 100644
--- a/gcc/ada/exp_unst.adb
+++ b/gcc/ada/exp_unst.adb
@@ -883,9 +883,10 @@ package body Exp_Unst is
-- within Subp. Calls to Subp itself or to subprograms
-- outside the nested structure do not affect us.
- if Scope_Within (Ultimate_Alias (Ent), Subp)
- and then Is_Subprogram (Ent)
+ if Is_Subprogram (Ent)
+ and then not Is_Generic_Subprogram (Ent)
and then not Is_Imported (Ent)
+ and then Scope_Within (Ultimate_Alias (Ent), Subp)
then
Append_Unique_Call ((N, Current_Subprogram, Ent));
end if;
diff --git a/gcc/ada/freeze.adb b/gcc/ada/freeze.adb
index 91f1724..fd82169 100644
--- a/gcc/ada/freeze.adb
+++ b/gcc/ada/freeze.adb
@@ -2584,27 +2584,30 @@ package body Freeze is
-- Local declarations
- Types_With_Aspect : Elist_Id :=
- Get_Types_With_Aspect_In_Hierarchy (Typ);
-
- Aspect_Value : Entity_Id;
- Curr_Value : Entity_Id;
- Curr_Typ_Elmt : Elmt_Id;
- Curr_Body_Elmt : Elmt_Id;
- Curr_Formal_Elmt : Elmt_Id;
- Gen_Bodies : Elist_Id;
- Gen_Formals : Elist_Id;
- Scop : Entity_Id;
+ Aspect_Value : Entity_Id;
+ Curr_Value : Entity_Id;
+ Curr_Typ_Elmt : Elmt_Id;
+ Curr_Body_Elmt : Elmt_Id;
+ Curr_Formal_Elmt : Elmt_Id;
+ Gen_Bodies : Elist_Id;
+ Gen_Formals : Elist_Id;
+ Scop : Entity_Id;
+ Types_With_Aspect : Elist_Id;
-- Start of processing for Check_No_Parts_Violations
begin
- -- There are no types with No_Parts specified, so there
- -- is nothing to check.
+ -- Nothing to check if the type is elementary or artificial
- if Is_Empty_Elmt_List (Types_With_Aspect)
- or else not Comes_From_Source (Typ)
- then
+ if Is_Elementary_Type (Typ) or else not Comes_From_Source (Typ) then
+ return;
+ end if;
+
+ Types_With_Aspect := Get_Types_With_Aspect_In_Hierarchy (Typ);
+
+ -- Nothing to check if there are no types with No_Parts specified
+
+ if Is_Empty_Elmt_List (Types_With_Aspect) then
return;
end if;
diff --git a/gcc/ada/ghost.adb b/gcc/ada/ghost.adb
index f95bd19..42ea0f5 100644
--- a/gcc/ada/ghost.adb
+++ b/gcc/ada/ghost.adb
@@ -1245,11 +1245,21 @@ package body Ghost is
-- processing them in that mode can lead to spurious errors.
if Expander_Active then
+ -- Cases where full analysis is needed, involving array indexing
+ -- which would otherwise be missing array-bounds checks:
+
if not Analyzed (Orig_Lhs)
- and then Nkind (Orig_Lhs) = N_Indexed_Component
- and then Nkind (Prefix (Orig_Lhs)) = N_Selected_Component
- and then Nkind (Prefix (Prefix (Orig_Lhs))) =
- N_Indexed_Component
+ and then
+ ((Nkind (Orig_Lhs) = N_Indexed_Component
+ and then Nkind (Prefix (Orig_Lhs)) = N_Selected_Component
+ and then Nkind (Prefix (Prefix (Orig_Lhs))) =
+ N_Indexed_Component)
+ or else
+ (Nkind (Orig_Lhs) = N_Selected_Component
+ and then Nkind (Prefix (Orig_Lhs)) = N_Indexed_Component
+ and then Nkind (Prefix (Prefix (Orig_Lhs))) =
+ N_Selected_Component
+ and then Nkind (Parent (N)) /= N_Loop_Statement))
then
Analyze (Orig_Lhs);
end if;
diff --git a/gcc/ada/gnat_rm.texi b/gcc/ada/gnat_rm.texi
index cda0b48..7051aa6 100644
--- a/gcc/ada/gnat_rm.texi
+++ b/gcc/ada/gnat_rm.texi
@@ -585,6 +585,7 @@ Implementation Advice
* RM A.4.4(106); Bounded-Length String Handling: RM A 4 4 106 Bounded-Length String Handling.
* RM A.5.2(46-47); Random Number Generation: RM A 5 2 46-47 Random Number Generation.
* RM A.10.7(23); Get_Immediate: RM A 10 7 23 Get_Immediate.
+* RM A.18; Containers: RM A 18 Containers.
* RM B.1(39-41); Pragma Export: RM B 1 39-41 Pragma Export.
* RM B.2(12-13); Package Interfaces: RM B 2 12-13 Package Interfaces.
* RM B.3(63-71); Interfacing with C: RM B 3 63-71 Interfacing with C.
@@ -13493,6 +13494,7 @@ case the text describes what GNAT does and why.
* RM A.4.4(106); Bounded-Length String Handling: RM A 4 4 106 Bounded-Length String Handling.
* RM A.5.2(46-47); Random Number Generation: RM A 5 2 46-47 Random Number Generation.
* RM A.10.7(23); Get_Immediate: RM A 10 7 23 Get_Immediate.
+* RM A.18; Containers: RM A 18 Containers.
* RM B.1(39-41); Pragma Export: RM B 1 39-41 Pragma Export.
* RM B.2(12-13); Package Interfaces: RM B 2 12-13 Package Interfaces.
* RM B.3(63-71); Interfacing with C: RM B 3 63-71 Interfacing with C.
@@ -14613,7 +14615,7 @@ condition here to hold true.
@geindex Get_Immediate
-@node RM A 10 7 23 Get_Immediate,RM B 1 39-41 Pragma Export,RM A 5 2 46-47 Random Number Generation,Implementation Advice
+@node RM A 10 7 23 Get_Immediate,RM A 18 Containers,RM A 5 2 46-47 Random Number Generation,Implementation Advice
@anchor{gnat_rm/implementation_advice rm-a-10-7-23-get-immediate}@anchor{23e}
@section RM A.10.7(23): @code{Get_Immediate}
@@ -14635,10 +14637,31 @@ flushed before the @code{Get_Immediate} call. A special unit
@code{Interfaces.Vxworks.IO} is provided that contains routines to enable
this functionality.
+@geindex Containers
+
+@node RM A 18 Containers,RM B 1 39-41 Pragma Export,RM A 10 7 23 Get_Immediate,Implementation Advice
+@anchor{gnat_rm/implementation_advice rm-a-18-containers}@anchor{23f}
+@section RM A.18: @code{Containers}
+
+
+All implementation advice pertaining to Ada.Containers and its
+child units (that is, all implementation advice occurring within
+section A.18 and its subsections) is followed except for A.18.24(17):
+
+@quotation
+
+"Bounded ordered set objects should be implemented without implicit pointers or dynamic allocation. "
+@end quotation
+
+The implementations of the two Reference_Preserving_Key functions of
+the generic package Ada.Containers.Bounded_Ordered_Sets each currently make
+use of dynamic allocation; other operations on bounded ordered set objects
+follow the implementation advice.
+
@geindex Export
-@node RM B 1 39-41 Pragma Export,RM B 2 12-13 Package Interfaces,RM A 10 7 23 Get_Immediate,Implementation Advice
-@anchor{gnat_rm/implementation_advice rm-b-1-39-41-pragma-export}@anchor{23f}
+@node RM B 1 39-41 Pragma Export,RM B 2 12-13 Package Interfaces,RM A 18 Containers,Implementation Advice
+@anchor{gnat_rm/implementation_advice rm-b-1-39-41-pragma-export}@anchor{240}
@section RM B.1(39-41): Pragma @code{Export}
@@ -14686,7 +14709,7 @@ Followed.
@geindex Interfaces
@node RM B 2 12-13 Package Interfaces,RM B 3 63-71 Interfacing with C,RM B 1 39-41 Pragma Export,Implementation Advice
-@anchor{gnat_rm/implementation_advice rm-b-2-12-13-package-interfaces}@anchor{240}
+@anchor{gnat_rm/implementation_advice rm-b-2-12-13-package-interfaces}@anchor{241}
@section RM B.2(12-13): Package @code{Interfaces}
@@ -14716,7 +14739,7 @@ Followed. GNAT provides all the packages described in this section.
@geindex interfacing with
@node RM B 3 63-71 Interfacing with C,RM B 4 95-98 Interfacing with COBOL,RM B 2 12-13 Package Interfaces,Implementation Advice
-@anchor{gnat_rm/implementation_advice rm-b-3-63-71-interfacing-with-c}@anchor{241}
+@anchor{gnat_rm/implementation_advice rm-b-3-63-71-interfacing-with-c}@anchor{242}
@section RM B.3(63-71): Interfacing with C
@@ -14804,7 +14827,7 @@ Followed.
@geindex interfacing with
@node RM B 4 95-98 Interfacing with COBOL,RM B 5 22-26 Interfacing with Fortran,RM B 3 63-71 Interfacing with C,Implementation Advice
-@anchor{gnat_rm/implementation_advice rm-b-4-95-98-interfacing-with-cobol}@anchor{242}
+@anchor{gnat_rm/implementation_advice rm-b-4-95-98-interfacing-with-cobol}@anchor{243}
@section RM B.4(95-98): Interfacing with COBOL
@@ -14845,7 +14868,7 @@ Followed.
@geindex interfacing with
@node RM B 5 22-26 Interfacing with Fortran,RM C 1 3-5 Access to Machine Operations,RM B 4 95-98 Interfacing with COBOL,Implementation Advice
-@anchor{gnat_rm/implementation_advice rm-b-5-22-26-interfacing-with-fortran}@anchor{243}
+@anchor{gnat_rm/implementation_advice rm-b-5-22-26-interfacing-with-fortran}@anchor{244}
@section RM B.5(22-26): Interfacing with Fortran
@@ -14896,7 +14919,7 @@ Followed.
@geindex Machine operations
@node RM C 1 3-5 Access to Machine Operations,RM C 1 10-16 Access to Machine Operations,RM B 5 22-26 Interfacing with Fortran,Implementation Advice
-@anchor{gnat_rm/implementation_advice rm-c-1-3-5-access-to-machine-operations}@anchor{244}
+@anchor{gnat_rm/implementation_advice rm-c-1-3-5-access-to-machine-operations}@anchor{245}
@section RM C.1(3-5): Access to Machine Operations
@@ -14931,7 +14954,7 @@ object that is specified as exported."
Followed.
@node RM C 1 10-16 Access to Machine Operations,RM C 3 28 Interrupt Support,RM C 1 3-5 Access to Machine Operations,Implementation Advice
-@anchor{gnat_rm/implementation_advice rm-c-1-10-16-access-to-machine-operations}@anchor{245}
+@anchor{gnat_rm/implementation_advice rm-c-1-10-16-access-to-machine-operations}@anchor{246}
@section RM C.1(10-16): Access to Machine Operations
@@ -14992,7 +15015,7 @@ Followed on any target supporting such operations.
@geindex Interrupt support
@node RM C 3 28 Interrupt Support,RM C 3 1 20-21 Protected Procedure Handlers,RM C 1 10-16 Access to Machine Operations,Implementation Advice
-@anchor{gnat_rm/implementation_advice rm-c-3-28-interrupt-support}@anchor{246}
+@anchor{gnat_rm/implementation_advice rm-c-3-28-interrupt-support}@anchor{247}
@section RM C.3(28): Interrupt Support
@@ -15010,7 +15033,7 @@ of interrupt blocking.
@geindex Protected procedure handlers
@node RM C 3 1 20-21 Protected Procedure Handlers,RM C 3 2 25 Package Interrupts,RM C 3 28 Interrupt Support,Implementation Advice
-@anchor{gnat_rm/implementation_advice rm-c-3-1-20-21-protected-procedure-handlers}@anchor{247}
+@anchor{gnat_rm/implementation_advice rm-c-3-1-20-21-protected-procedure-handlers}@anchor{248}
@section RM C.3.1(20-21): Protected Procedure Handlers
@@ -15036,7 +15059,7 @@ Followed. Compile time warnings are given when possible.
@geindex Interrupts
@node RM C 3 2 25 Package Interrupts,RM C 4 14 Pre-elaboration Requirements,RM C 3 1 20-21 Protected Procedure Handlers,Implementation Advice
-@anchor{gnat_rm/implementation_advice rm-c-3-2-25-package-interrupts}@anchor{248}
+@anchor{gnat_rm/implementation_advice rm-c-3-2-25-package-interrupts}@anchor{249}
@section RM C.3.2(25): Package @code{Interrupts}
@@ -15054,7 +15077,7 @@ Followed.
@geindex Pre-elaboration requirements
@node RM C 4 14 Pre-elaboration Requirements,RM C 5 8 Pragma Discard_Names,RM C 3 2 25 Package Interrupts,Implementation Advice
-@anchor{gnat_rm/implementation_advice rm-c-4-14-pre-elaboration-requirements}@anchor{249}
+@anchor{gnat_rm/implementation_advice rm-c-4-14-pre-elaboration-requirements}@anchor{24a}
@section RM C.4(14): Pre-elaboration Requirements
@@ -15070,7 +15093,7 @@ Followed. Executable code is generated in some cases, e.g., loops
to initialize large arrays.
@node RM C 5 8 Pragma Discard_Names,RM C 7 2 30 The Package Task_Attributes,RM C 4 14 Pre-elaboration Requirements,Implementation Advice
-@anchor{gnat_rm/implementation_advice rm-c-5-8-pragma-discard-names}@anchor{24a}
+@anchor{gnat_rm/implementation_advice rm-c-5-8-pragma-discard-names}@anchor{24b}
@section RM C.5(8): Pragma @code{Discard_Names}
@@ -15088,7 +15111,7 @@ Followed.
@geindex Task_Attributes
@node RM C 7 2 30 The Package Task_Attributes,RM D 3 17 Locking Policies,RM C 5 8 Pragma Discard_Names,Implementation Advice
-@anchor{gnat_rm/implementation_advice rm-c-7-2-30-the-package-task-attributes}@anchor{24b}
+@anchor{gnat_rm/implementation_advice rm-c-7-2-30-the-package-task-attributes}@anchor{24c}
@section RM C.7.2(30): The Package Task_Attributes
@@ -15109,7 +15132,7 @@ Not followed. This implementation is not targeted to such a domain.
@geindex Locking Policies
@node RM D 3 17 Locking Policies,RM D 4 16 Entry Queuing Policies,RM C 7 2 30 The Package Task_Attributes,Implementation Advice
-@anchor{gnat_rm/implementation_advice rm-d-3-17-locking-policies}@anchor{24c}
+@anchor{gnat_rm/implementation_advice rm-d-3-17-locking-policies}@anchor{24d}
@section RM D.3(17): Locking Policies
@@ -15126,7 +15149,7 @@ whose names (@code{Inheritance_Locking} and
@geindex Entry queuing policies
@node RM D 4 16 Entry Queuing Policies,RM D 6 9-10 Preemptive Abort,RM D 3 17 Locking Policies,Implementation Advice
-@anchor{gnat_rm/implementation_advice rm-d-4-16-entry-queuing-policies}@anchor{24d}
+@anchor{gnat_rm/implementation_advice rm-d-4-16-entry-queuing-policies}@anchor{24e}
@section RM D.4(16): Entry Queuing Policies
@@ -15141,7 +15164,7 @@ Followed. No such implementation-defined queuing policies exist.
@geindex Preemptive abort
@node RM D 6 9-10 Preemptive Abort,RM D 7 21 Tasking Restrictions,RM D 4 16 Entry Queuing Policies,Implementation Advice
-@anchor{gnat_rm/implementation_advice rm-d-6-9-10-preemptive-abort}@anchor{24e}
+@anchor{gnat_rm/implementation_advice rm-d-6-9-10-preemptive-abort}@anchor{24f}
@section RM D.6(9-10): Preemptive Abort
@@ -15167,7 +15190,7 @@ Followed.
@geindex Tasking restrictions
@node RM D 7 21 Tasking Restrictions,RM D 8 47-49 Monotonic Time,RM D 6 9-10 Preemptive Abort,Implementation Advice
-@anchor{gnat_rm/implementation_advice rm-d-7-21-tasking-restrictions}@anchor{24f}
+@anchor{gnat_rm/implementation_advice rm-d-7-21-tasking-restrictions}@anchor{250}
@section RM D.7(21): Tasking Restrictions
@@ -15186,7 +15209,7 @@ pragma @code{Profile (Restricted)} for more details.
@geindex monotonic
@node RM D 8 47-49 Monotonic Time,RM E 5 28-29 Partition Communication Subsystem,RM D 7 21 Tasking Restrictions,Implementation Advice
-@anchor{gnat_rm/implementation_advice rm-d-8-47-49-monotonic-time}@anchor{250}
+@anchor{gnat_rm/implementation_advice rm-d-8-47-49-monotonic-time}@anchor{251}
@section RM D.8(47-49): Monotonic Time
@@ -15221,7 +15244,7 @@ Followed.
@geindex PCS
@node RM E 5 28-29 Partition Communication Subsystem,RM F 7 COBOL Support,RM D 8 47-49 Monotonic Time,Implementation Advice
-@anchor{gnat_rm/implementation_advice rm-e-5-28-29-partition-communication-subsystem}@anchor{251}
+@anchor{gnat_rm/implementation_advice rm-e-5-28-29-partition-communication-subsystem}@anchor{252}
@section RM E.5(28-29): Partition Communication Subsystem
@@ -15249,7 +15272,7 @@ GNAT.
@geindex COBOL support
@node RM F 7 COBOL Support,RM F 1 2 Decimal Radix Support,RM E 5 28-29 Partition Communication Subsystem,Implementation Advice
-@anchor{gnat_rm/implementation_advice rm-f-7-cobol-support}@anchor{252}
+@anchor{gnat_rm/implementation_advice rm-f-7-cobol-support}@anchor{253}
@section RM F(7): COBOL Support
@@ -15269,7 +15292,7 @@ Followed.
@geindex Decimal radix support
@node RM F 1 2 Decimal Radix Support,RM G Numerics,RM F 7 COBOL Support,Implementation Advice
-@anchor{gnat_rm/implementation_advice rm-f-1-2-decimal-radix-support}@anchor{253}
+@anchor{gnat_rm/implementation_advice rm-f-1-2-decimal-radix-support}@anchor{254}
@section RM F.1(2): Decimal Radix Support
@@ -15285,7 +15308,7 @@ representations.
@geindex Numerics
@node RM G Numerics,RM G 1 1 56-58 Complex Types,RM F 1 2 Decimal Radix Support,Implementation Advice
-@anchor{gnat_rm/implementation_advice rm-g-numerics}@anchor{254}
+@anchor{gnat_rm/implementation_advice rm-g-numerics}@anchor{255}
@section RM G: Numerics
@@ -15305,7 +15328,7 @@ Followed.
@geindex Complex types
@node RM G 1 1 56-58 Complex Types,RM G 1 2 49 Complex Elementary Functions,RM G Numerics,Implementation Advice
-@anchor{gnat_rm/implementation_advice rm-g-1-1-56-58-complex-types}@anchor{255}
+@anchor{gnat_rm/implementation_advice rm-g-1-1-56-58-complex-types}@anchor{256}
@section RM G.1.1(56-58): Complex Types
@@ -15367,7 +15390,7 @@ Followed.
@geindex Complex elementary functions
@node RM G 1 2 49 Complex Elementary Functions,RM G 2 4 19 Accuracy Requirements,RM G 1 1 56-58 Complex Types,Implementation Advice
-@anchor{gnat_rm/implementation_advice rm-g-1-2-49-complex-elementary-functions}@anchor{256}
+@anchor{gnat_rm/implementation_advice rm-g-1-2-49-complex-elementary-functions}@anchor{257}
@section RM G.1.2(49): Complex Elementary Functions
@@ -15389,7 +15412,7 @@ Followed.
@geindex Accuracy requirements
@node RM G 2 4 19 Accuracy Requirements,RM G 2 6 15 Complex Arithmetic Accuracy,RM G 1 2 49 Complex Elementary Functions,Implementation Advice
-@anchor{gnat_rm/implementation_advice rm-g-2-4-19-accuracy-requirements}@anchor{257}
+@anchor{gnat_rm/implementation_advice rm-g-2-4-19-accuracy-requirements}@anchor{258}
@section RM G.2.4(19): Accuracy Requirements
@@ -15413,7 +15436,7 @@ Followed.
@geindex complex arithmetic
@node RM G 2 6 15 Complex Arithmetic Accuracy,RM H 6 15/2 Pragma Partition_Elaboration_Policy,RM G 2 4 19 Accuracy Requirements,Implementation Advice
-@anchor{gnat_rm/implementation_advice rm-g-2-6-15-complex-arithmetic-accuracy}@anchor{258}
+@anchor{gnat_rm/implementation_advice rm-g-2-6-15-complex-arithmetic-accuracy}@anchor{259}
@section RM G.2.6(15): Complex Arithmetic Accuracy
@@ -15431,7 +15454,7 @@ Followed.
@geindex Sequential elaboration policy
@node RM H 6 15/2 Pragma Partition_Elaboration_Policy,,RM G 2 6 15 Complex Arithmetic Accuracy,Implementation Advice
-@anchor{gnat_rm/implementation_advice rm-h-6-15-2-pragma-partition-elaboration-policy}@anchor{259}
+@anchor{gnat_rm/implementation_advice rm-h-6-15-2-pragma-partition-elaboration-policy}@anchor{25a}
@section RM H.6(15/2): Pragma Partition_Elaboration_Policy
@@ -15446,7 +15469,7 @@ immediately terminated."
Not followed.
@node Implementation Defined Characteristics,Intrinsic Subprograms,Implementation Advice,Top
-@anchor{gnat_rm/implementation_defined_characteristics implementation-defined-characteristics}@anchor{b}@anchor{gnat_rm/implementation_defined_characteristics doc}@anchor{25a}@anchor{gnat_rm/implementation_defined_characteristics id1}@anchor{25b}
+@anchor{gnat_rm/implementation_defined_characteristics implementation-defined-characteristics}@anchor{b}@anchor{gnat_rm/implementation_defined_characteristics doc}@anchor{25b}@anchor{gnat_rm/implementation_defined_characteristics id1}@anchor{25c}
@chapter Implementation Defined Characteristics
@@ -16674,7 +16697,7 @@ When the @code{Pattern} parameter is not the null string, it is interpreted
according to the syntax of regular expressions as defined in the
@code{GNAT.Regexp} package.
-See @ref{25c,,GNAT.Regexp (g-regexp.ads)}.
+See @ref{25d,,GNAT.Regexp (g-regexp.ads)}.
@itemize *
@@ -17722,7 +17745,7 @@ H.4(27)."
There are no restrictions on pragma @code{Restrictions}.
@node Intrinsic Subprograms,Representation Clauses and Pragmas,Implementation Defined Characteristics,Top
-@anchor{gnat_rm/intrinsic_subprograms doc}@anchor{25d}@anchor{gnat_rm/intrinsic_subprograms intrinsic-subprograms}@anchor{c}@anchor{gnat_rm/intrinsic_subprograms id1}@anchor{25e}
+@anchor{gnat_rm/intrinsic_subprograms doc}@anchor{25e}@anchor{gnat_rm/intrinsic_subprograms intrinsic-subprograms}@anchor{c}@anchor{gnat_rm/intrinsic_subprograms id1}@anchor{25f}
@chapter Intrinsic Subprograms
@@ -17760,7 +17783,7 @@ Ada standard does not require Ada compilers to implement this feature.
@end menu
@node Intrinsic Operators,Compilation_ISO_Date,,Intrinsic Subprograms
-@anchor{gnat_rm/intrinsic_subprograms id2}@anchor{25f}@anchor{gnat_rm/intrinsic_subprograms intrinsic-operators}@anchor{260}
+@anchor{gnat_rm/intrinsic_subprograms id2}@anchor{260}@anchor{gnat_rm/intrinsic_subprograms intrinsic-operators}@anchor{261}
@section Intrinsic Operators
@@ -17791,7 +17814,7 @@ It is also possible to specify such operators for private types, if the
full views are appropriate arithmetic types.
@node Compilation_ISO_Date,Compilation_Date,Intrinsic Operators,Intrinsic Subprograms
-@anchor{gnat_rm/intrinsic_subprograms id3}@anchor{261}@anchor{gnat_rm/intrinsic_subprograms compilation-iso-date}@anchor{262}
+@anchor{gnat_rm/intrinsic_subprograms id3}@anchor{262}@anchor{gnat_rm/intrinsic_subprograms compilation-iso-date}@anchor{263}
@section Compilation_ISO_Date
@@ -17805,7 +17828,7 @@ application program should simply call the function
the current compilation (in local time format YYYY-MM-DD).
@node Compilation_Date,Compilation_Time,Compilation_ISO_Date,Intrinsic Subprograms
-@anchor{gnat_rm/intrinsic_subprograms compilation-date}@anchor{263}@anchor{gnat_rm/intrinsic_subprograms id4}@anchor{264}
+@anchor{gnat_rm/intrinsic_subprograms compilation-date}@anchor{264}@anchor{gnat_rm/intrinsic_subprograms id4}@anchor{265}
@section Compilation_Date
@@ -17815,7 +17838,7 @@ Same as Compilation_ISO_Date, except the string is in the form
MMM DD YYYY.
@node Compilation_Time,Enclosing_Entity,Compilation_Date,Intrinsic Subprograms
-@anchor{gnat_rm/intrinsic_subprograms compilation-time}@anchor{265}@anchor{gnat_rm/intrinsic_subprograms id5}@anchor{266}
+@anchor{gnat_rm/intrinsic_subprograms compilation-time}@anchor{266}@anchor{gnat_rm/intrinsic_subprograms id5}@anchor{267}
@section Compilation_Time
@@ -17829,7 +17852,7 @@ application program should simply call the function
the current compilation (in local time format HH:MM:SS).
@node Enclosing_Entity,Exception_Information,Compilation_Time,Intrinsic Subprograms
-@anchor{gnat_rm/intrinsic_subprograms id6}@anchor{267}@anchor{gnat_rm/intrinsic_subprograms enclosing-entity}@anchor{268}
+@anchor{gnat_rm/intrinsic_subprograms id6}@anchor{268}@anchor{gnat_rm/intrinsic_subprograms enclosing-entity}@anchor{269}
@section Enclosing_Entity
@@ -17843,7 +17866,7 @@ application program should simply call the function
the current subprogram, package, task, entry, or protected subprogram.
@node Exception_Information,Exception_Message,Enclosing_Entity,Intrinsic Subprograms
-@anchor{gnat_rm/intrinsic_subprograms id7}@anchor{269}@anchor{gnat_rm/intrinsic_subprograms exception-information}@anchor{26a}
+@anchor{gnat_rm/intrinsic_subprograms id7}@anchor{26a}@anchor{gnat_rm/intrinsic_subprograms exception-information}@anchor{26b}
@section Exception_Information
@@ -17857,7 +17880,7 @@ so an application program should simply call the function
the exception information associated with the current exception.
@node Exception_Message,Exception_Name,Exception_Information,Intrinsic Subprograms
-@anchor{gnat_rm/intrinsic_subprograms exception-message}@anchor{26b}@anchor{gnat_rm/intrinsic_subprograms id8}@anchor{26c}
+@anchor{gnat_rm/intrinsic_subprograms exception-message}@anchor{26c}@anchor{gnat_rm/intrinsic_subprograms id8}@anchor{26d}
@section Exception_Message
@@ -17871,7 +17894,7 @@ so an application program should simply call the function
the message associated with the current exception.
@node Exception_Name,File,Exception_Message,Intrinsic Subprograms
-@anchor{gnat_rm/intrinsic_subprograms exception-name}@anchor{26d}@anchor{gnat_rm/intrinsic_subprograms id9}@anchor{26e}
+@anchor{gnat_rm/intrinsic_subprograms exception-name}@anchor{26e}@anchor{gnat_rm/intrinsic_subprograms id9}@anchor{26f}
@section Exception_Name
@@ -17885,7 +17908,7 @@ so an application program should simply call the function
the name of the current exception.
@node File,Line,Exception_Name,Intrinsic Subprograms
-@anchor{gnat_rm/intrinsic_subprograms id10}@anchor{26f}@anchor{gnat_rm/intrinsic_subprograms file}@anchor{270}
+@anchor{gnat_rm/intrinsic_subprograms id10}@anchor{270}@anchor{gnat_rm/intrinsic_subprograms file}@anchor{271}
@section File
@@ -17899,7 +17922,7 @@ application program should simply call the function
file.
@node Line,Shifts and Rotates,File,Intrinsic Subprograms
-@anchor{gnat_rm/intrinsic_subprograms id11}@anchor{271}@anchor{gnat_rm/intrinsic_subprograms line}@anchor{272}
+@anchor{gnat_rm/intrinsic_subprograms id11}@anchor{272}@anchor{gnat_rm/intrinsic_subprograms line}@anchor{273}
@section Line
@@ -17913,7 +17936,7 @@ application program should simply call the function
source line.
@node Shifts and Rotates,Source_Location,Line,Intrinsic Subprograms
-@anchor{gnat_rm/intrinsic_subprograms shifts-and-rotates}@anchor{273}@anchor{gnat_rm/intrinsic_subprograms id12}@anchor{274}
+@anchor{gnat_rm/intrinsic_subprograms shifts-and-rotates}@anchor{274}@anchor{gnat_rm/intrinsic_subprograms id12}@anchor{275}
@section Shifts and Rotates
@@ -17956,7 +17979,7 @@ corresponding operator for modular type. In particular, shifting a negative
number may change its sign bit to positive.
@node Source_Location,,Shifts and Rotates,Intrinsic Subprograms
-@anchor{gnat_rm/intrinsic_subprograms source-location}@anchor{275}@anchor{gnat_rm/intrinsic_subprograms id13}@anchor{276}
+@anchor{gnat_rm/intrinsic_subprograms source-location}@anchor{276}@anchor{gnat_rm/intrinsic_subprograms id13}@anchor{277}
@section Source_Location
@@ -17970,7 +17993,7 @@ application program should simply call the function
source file location.
@node Representation Clauses and Pragmas,Standard Library Routines,Intrinsic Subprograms,Top
-@anchor{gnat_rm/representation_clauses_and_pragmas representation-clauses-and-pragmas}@anchor{d}@anchor{gnat_rm/representation_clauses_and_pragmas doc}@anchor{277}@anchor{gnat_rm/representation_clauses_and_pragmas id1}@anchor{278}
+@anchor{gnat_rm/representation_clauses_and_pragmas representation-clauses-and-pragmas}@anchor{d}@anchor{gnat_rm/representation_clauses_and_pragmas doc}@anchor{278}@anchor{gnat_rm/representation_clauses_and_pragmas id1}@anchor{279}
@chapter Representation Clauses and Pragmas
@@ -18016,7 +18039,7 @@ and this section describes the additional capabilities provided.
@end menu
@node Alignment Clauses,Size Clauses,,Representation Clauses and Pragmas
-@anchor{gnat_rm/representation_clauses_and_pragmas id2}@anchor{279}@anchor{gnat_rm/representation_clauses_and_pragmas alignment-clauses}@anchor{27a}
+@anchor{gnat_rm/representation_clauses_and_pragmas id2}@anchor{27a}@anchor{gnat_rm/representation_clauses_and_pragmas alignment-clauses}@anchor{27b}
@section Alignment Clauses
@@ -18147,7 +18170,7 @@ assumption is non-portable, and other compilers may choose different
alignments for the subtype @code{RS}.
@node Size Clauses,Storage_Size Clauses,Alignment Clauses,Representation Clauses and Pragmas
-@anchor{gnat_rm/representation_clauses_and_pragmas id3}@anchor{27b}@anchor{gnat_rm/representation_clauses_and_pragmas size-clauses}@anchor{27c}
+@anchor{gnat_rm/representation_clauses_and_pragmas id3}@anchor{27c}@anchor{gnat_rm/representation_clauses_and_pragmas size-clauses}@anchor{27d}
@section Size Clauses
@@ -18224,7 +18247,7 @@ if it is known that a Size value can be accommodated in an object of
type Integer.
@node Storage_Size Clauses,Size of Variant Record Objects,Size Clauses,Representation Clauses and Pragmas
-@anchor{gnat_rm/representation_clauses_and_pragmas storage-size-clauses}@anchor{27d}@anchor{gnat_rm/representation_clauses_and_pragmas id4}@anchor{27e}
+@anchor{gnat_rm/representation_clauses_and_pragmas storage-size-clauses}@anchor{27e}@anchor{gnat_rm/representation_clauses_and_pragmas id4}@anchor{27f}
@section Storage_Size Clauses
@@ -18297,7 +18320,7 @@ Of course in practice, there will not be any explicit allocators in the
case of such an access declaration.
@node Size of Variant Record Objects,Biased Representation,Storage_Size Clauses,Representation Clauses and Pragmas
-@anchor{gnat_rm/representation_clauses_and_pragmas id5}@anchor{27f}@anchor{gnat_rm/representation_clauses_and_pragmas size-of-variant-record-objects}@anchor{280}
+@anchor{gnat_rm/representation_clauses_and_pragmas id5}@anchor{280}@anchor{gnat_rm/representation_clauses_and_pragmas size-of-variant-record-objects}@anchor{281}
@section Size of Variant Record Objects
@@ -18407,7 +18430,7 @@ the maximum size, regardless of the current variant value, the
variant value.
@node Biased Representation,Value_Size and Object_Size Clauses,Size of Variant Record Objects,Representation Clauses and Pragmas
-@anchor{gnat_rm/representation_clauses_and_pragmas id6}@anchor{281}@anchor{gnat_rm/representation_clauses_and_pragmas biased-representation}@anchor{282}
+@anchor{gnat_rm/representation_clauses_and_pragmas id6}@anchor{282}@anchor{gnat_rm/representation_clauses_and_pragmas biased-representation}@anchor{283}
@section Biased Representation
@@ -18445,7 +18468,7 @@ biased representation can be used for all discrete types except for
enumeration types for which a representation clause is given.
@node Value_Size and Object_Size Clauses,Component_Size Clauses,Biased Representation,Representation Clauses and Pragmas
-@anchor{gnat_rm/representation_clauses_and_pragmas id7}@anchor{283}@anchor{gnat_rm/representation_clauses_and_pragmas value-size-and-object-size-clauses}@anchor{284}
+@anchor{gnat_rm/representation_clauses_and_pragmas id7}@anchor{284}@anchor{gnat_rm/representation_clauses_and_pragmas value-size-and-object-size-clauses}@anchor{285}
@section Value_Size and Object_Size Clauses
@@ -18761,7 +18784,7 @@ definition clause forces biased representation. This
warning can be turned off using @code{-gnatw.B}.
@node Component_Size Clauses,Bit_Order Clauses,Value_Size and Object_Size Clauses,Representation Clauses and Pragmas
-@anchor{gnat_rm/representation_clauses_and_pragmas id8}@anchor{285}@anchor{gnat_rm/representation_clauses_and_pragmas component-size-clauses}@anchor{286}
+@anchor{gnat_rm/representation_clauses_and_pragmas id8}@anchor{286}@anchor{gnat_rm/representation_clauses_and_pragmas component-size-clauses}@anchor{287}
@section Component_Size Clauses
@@ -18809,7 +18832,7 @@ and a pragma Pack for the same array type. if such duplicate
clauses are given, the pragma Pack will be ignored.
@node Bit_Order Clauses,Effect of Bit_Order on Byte Ordering,Component_Size Clauses,Representation Clauses and Pragmas
-@anchor{gnat_rm/representation_clauses_and_pragmas bit-order-clauses}@anchor{287}@anchor{gnat_rm/representation_clauses_and_pragmas id9}@anchor{288}
+@anchor{gnat_rm/representation_clauses_and_pragmas bit-order-clauses}@anchor{288}@anchor{gnat_rm/representation_clauses_and_pragmas id9}@anchor{289}
@section Bit_Order Clauses
@@ -18915,7 +18938,7 @@ if desired. The following section contains additional
details regarding the issue of byte ordering.
@node Effect of Bit_Order on Byte Ordering,Pragma Pack for Arrays,Bit_Order Clauses,Representation Clauses and Pragmas
-@anchor{gnat_rm/representation_clauses_and_pragmas id10}@anchor{289}@anchor{gnat_rm/representation_clauses_and_pragmas effect-of-bit-order-on-byte-ordering}@anchor{28a}
+@anchor{gnat_rm/representation_clauses_and_pragmas id10}@anchor{28a}@anchor{gnat_rm/representation_clauses_and_pragmas effect-of-bit-order-on-byte-ordering}@anchor{28b}
@section Effect of Bit_Order on Byte Ordering
@@ -19172,7 +19195,7 @@ to set the boolean constant @code{Master_Byte_First} in
an appropriate manner.
@node Pragma Pack for Arrays,Pragma Pack for Records,Effect of Bit_Order on Byte Ordering,Representation Clauses and Pragmas
-@anchor{gnat_rm/representation_clauses_and_pragmas pragma-pack-for-arrays}@anchor{28b}@anchor{gnat_rm/representation_clauses_and_pragmas id11}@anchor{28c}
+@anchor{gnat_rm/representation_clauses_and_pragmas pragma-pack-for-arrays}@anchor{28c}@anchor{gnat_rm/representation_clauses_and_pragmas id11}@anchor{28d}
@section Pragma Pack for Arrays
@@ -19292,7 +19315,7 @@ Here 31-bit packing is achieved as required, and no warning is generated,
since in this case the programmer intention is clear.
@node Pragma Pack for Records,Record Representation Clauses,Pragma Pack for Arrays,Representation Clauses and Pragmas
-@anchor{gnat_rm/representation_clauses_and_pragmas pragma-pack-for-records}@anchor{28d}@anchor{gnat_rm/representation_clauses_and_pragmas id12}@anchor{28e}
+@anchor{gnat_rm/representation_clauses_and_pragmas pragma-pack-for-records}@anchor{28e}@anchor{gnat_rm/representation_clauses_and_pragmas id12}@anchor{28f}
@section Pragma Pack for Records
@@ -19376,7 +19399,7 @@ array that is longer than 64 bits, so it is itself non-packable on
boundary, and takes an integral number of bytes, i.e., 72 bits.
@node Record Representation Clauses,Handling of Records with Holes,Pragma Pack for Records,Representation Clauses and Pragmas
-@anchor{gnat_rm/representation_clauses_and_pragmas id13}@anchor{28f}@anchor{gnat_rm/representation_clauses_and_pragmas record-representation-clauses}@anchor{290}
+@anchor{gnat_rm/representation_clauses_and_pragmas id13}@anchor{290}@anchor{gnat_rm/representation_clauses_and_pragmas record-representation-clauses}@anchor{291}
@section Record Representation Clauses
@@ -19455,7 +19478,7 @@ end record;
@end example
@node Handling of Records with Holes,Enumeration Clauses,Record Representation Clauses,Representation Clauses and Pragmas
-@anchor{gnat_rm/representation_clauses_and_pragmas handling-of-records-with-holes}@anchor{291}@anchor{gnat_rm/representation_clauses_and_pragmas id14}@anchor{292}
+@anchor{gnat_rm/representation_clauses_and_pragmas handling-of-records-with-holes}@anchor{292}@anchor{gnat_rm/representation_clauses_and_pragmas id14}@anchor{293}
@section Handling of Records with Holes
@@ -19531,7 +19554,7 @@ for Hrec'Size use 64;
@end example
@node Enumeration Clauses,Address Clauses,Handling of Records with Holes,Representation Clauses and Pragmas
-@anchor{gnat_rm/representation_clauses_and_pragmas enumeration-clauses}@anchor{293}@anchor{gnat_rm/representation_clauses_and_pragmas id15}@anchor{294}
+@anchor{gnat_rm/representation_clauses_and_pragmas enumeration-clauses}@anchor{294}@anchor{gnat_rm/representation_clauses_and_pragmas id15}@anchor{295}
@section Enumeration Clauses
@@ -19574,7 +19597,7 @@ the overhead of converting representation values to the corresponding
positional values, (i.e., the value delivered by the @code{Pos} attribute).
@node Address Clauses,Use of Address Clauses for Memory-Mapped I/O,Enumeration Clauses,Representation Clauses and Pragmas
-@anchor{gnat_rm/representation_clauses_and_pragmas id16}@anchor{295}@anchor{gnat_rm/representation_clauses_and_pragmas address-clauses}@anchor{296}
+@anchor{gnat_rm/representation_clauses_and_pragmas id16}@anchor{296}@anchor{gnat_rm/representation_clauses_and_pragmas address-clauses}@anchor{297}
@section Address Clauses
@@ -19903,7 +19926,7 @@ then the program compiles without the warning and when run will generate
the output @code{X was not clobbered}.
@node Use of Address Clauses for Memory-Mapped I/O,Effect of Convention on Representation,Address Clauses,Representation Clauses and Pragmas
-@anchor{gnat_rm/representation_clauses_and_pragmas id17}@anchor{297}@anchor{gnat_rm/representation_clauses_and_pragmas use-of-address-clauses-for-memory-mapped-i-o}@anchor{298}
+@anchor{gnat_rm/representation_clauses_and_pragmas id17}@anchor{298}@anchor{gnat_rm/representation_clauses_and_pragmas use-of-address-clauses-for-memory-mapped-i-o}@anchor{299}
@section Use of Address Clauses for Memory-Mapped I/O
@@ -19961,7 +19984,7 @@ provides the pragma @code{Volatile_Full_Access} which can be used in lieu of
pragma @code{Atomic} and will give the additional guarantee.
@node Effect of Convention on Representation,Conventions and Anonymous Access Types,Use of Address Clauses for Memory-Mapped I/O,Representation Clauses and Pragmas
-@anchor{gnat_rm/representation_clauses_and_pragmas id18}@anchor{299}@anchor{gnat_rm/representation_clauses_and_pragmas effect-of-convention-on-representation}@anchor{29a}
+@anchor{gnat_rm/representation_clauses_and_pragmas id18}@anchor{29a}@anchor{gnat_rm/representation_clauses_and_pragmas effect-of-convention-on-representation}@anchor{29b}
@section Effect of Convention on Representation
@@ -20039,7 +20062,7 @@ when one of these values is read, any nonzero value is treated as True.
@end itemize
@node Conventions and Anonymous Access Types,Determining the Representations chosen by GNAT,Effect of Convention on Representation,Representation Clauses and Pragmas
-@anchor{gnat_rm/representation_clauses_and_pragmas conventions-and-anonymous-access-types}@anchor{29b}@anchor{gnat_rm/representation_clauses_and_pragmas id19}@anchor{29c}
+@anchor{gnat_rm/representation_clauses_and_pragmas conventions-and-anonymous-access-types}@anchor{29c}@anchor{gnat_rm/representation_clauses_and_pragmas id19}@anchor{29d}
@section Conventions and Anonymous Access Types
@@ -20115,7 +20138,7 @@ package ConvComp is
@end example
@node Determining the Representations chosen by GNAT,,Conventions and Anonymous Access Types,Representation Clauses and Pragmas
-@anchor{gnat_rm/representation_clauses_and_pragmas id20}@anchor{29d}@anchor{gnat_rm/representation_clauses_and_pragmas determining-the-representations-chosen-by-gnat}@anchor{29e}
+@anchor{gnat_rm/representation_clauses_and_pragmas id20}@anchor{29e}@anchor{gnat_rm/representation_clauses_and_pragmas determining-the-representations-chosen-by-gnat}@anchor{29f}
@section Determining the Representations chosen by GNAT
@@ -20267,7 +20290,7 @@ generated by the compiler into the original source to fix and guarantee
the actual representation to be used.
@node Standard Library Routines,The Implementation of Standard I/O,Representation Clauses and Pragmas,Top
-@anchor{gnat_rm/standard_library_routines standard-library-routines}@anchor{e}@anchor{gnat_rm/standard_library_routines doc}@anchor{29f}@anchor{gnat_rm/standard_library_routines id1}@anchor{2a0}
+@anchor{gnat_rm/standard_library_routines standard-library-routines}@anchor{e}@anchor{gnat_rm/standard_library_routines doc}@anchor{2a0}@anchor{gnat_rm/standard_library_routines id1}@anchor{2a1}
@chapter Standard Library Routines
@@ -21091,7 +21114,7 @@ For packages in Interfaces and System, all the RM defined packages are
available in GNAT, see the Ada 2012 RM for full details.
@node The Implementation of Standard I/O,The GNAT Library,Standard Library Routines,Top
-@anchor{gnat_rm/the_implementation_of_standard_i_o the-implementation-of-standard-i-o}@anchor{f}@anchor{gnat_rm/the_implementation_of_standard_i_o doc}@anchor{2a1}@anchor{gnat_rm/the_implementation_of_standard_i_o id1}@anchor{2a2}
+@anchor{gnat_rm/the_implementation_of_standard_i_o the-implementation-of-standard-i-o}@anchor{f}@anchor{gnat_rm/the_implementation_of_standard_i_o doc}@anchor{2a2}@anchor{gnat_rm/the_implementation_of_standard_i_o id1}@anchor{2a3}
@chapter The Implementation of Standard I/O
@@ -21143,7 +21166,7 @@ these additional facilities are also described in this chapter.
@end menu
@node Standard I/O Packages,FORM Strings,,The Implementation of Standard I/O
-@anchor{gnat_rm/the_implementation_of_standard_i_o standard-i-o-packages}@anchor{2a3}@anchor{gnat_rm/the_implementation_of_standard_i_o id2}@anchor{2a4}
+@anchor{gnat_rm/the_implementation_of_standard_i_o standard-i-o-packages}@anchor{2a4}@anchor{gnat_rm/the_implementation_of_standard_i_o id2}@anchor{2a5}
@section Standard I/O Packages
@@ -21214,7 +21237,7 @@ flush the common I/O streams and in particular Standard_Output before
elaborating the Ada code.
@node FORM Strings,Direct_IO,Standard I/O Packages,The Implementation of Standard I/O
-@anchor{gnat_rm/the_implementation_of_standard_i_o form-strings}@anchor{2a5}@anchor{gnat_rm/the_implementation_of_standard_i_o id3}@anchor{2a6}
+@anchor{gnat_rm/the_implementation_of_standard_i_o form-strings}@anchor{2a6}@anchor{gnat_rm/the_implementation_of_standard_i_o id3}@anchor{2a7}
@section FORM Strings
@@ -21240,7 +21263,7 @@ unrecognized keyword appears in a form string, it is silently ignored
and not considered invalid.
@node Direct_IO,Sequential_IO,FORM Strings,The Implementation of Standard I/O
-@anchor{gnat_rm/the_implementation_of_standard_i_o direct-io}@anchor{2a7}@anchor{gnat_rm/the_implementation_of_standard_i_o id4}@anchor{2a8}
+@anchor{gnat_rm/the_implementation_of_standard_i_o direct-io}@anchor{2a8}@anchor{gnat_rm/the_implementation_of_standard_i_o id4}@anchor{2a9}
@section Direct_IO
@@ -21260,7 +21283,7 @@ There is no limit on the size of Direct_IO files, they are expanded as
necessary to accommodate whatever records are written to the file.
@node Sequential_IO,Text_IO,Direct_IO,The Implementation of Standard I/O
-@anchor{gnat_rm/the_implementation_of_standard_i_o sequential-io}@anchor{2a9}@anchor{gnat_rm/the_implementation_of_standard_i_o id5}@anchor{2aa}
+@anchor{gnat_rm/the_implementation_of_standard_i_o sequential-io}@anchor{2aa}@anchor{gnat_rm/the_implementation_of_standard_i_o id5}@anchor{2ab}
@section Sequential_IO
@@ -21307,7 +21330,7 @@ using Stream_IO, and this is the preferred mechanism. In particular, the
above program fragment rewritten to use Stream_IO will work correctly.
@node Text_IO,Wide_Text_IO,Sequential_IO,The Implementation of Standard I/O
-@anchor{gnat_rm/the_implementation_of_standard_i_o id6}@anchor{2ab}@anchor{gnat_rm/the_implementation_of_standard_i_o text-io}@anchor{2ac}
+@anchor{gnat_rm/the_implementation_of_standard_i_o id6}@anchor{2ac}@anchor{gnat_rm/the_implementation_of_standard_i_o text-io}@anchor{2ad}
@section Text_IO
@@ -21390,7 +21413,7 @@ the file.
@end menu
@node Stream Pointer Positioning,Reading and Writing Non-Regular Files,,Text_IO
-@anchor{gnat_rm/the_implementation_of_standard_i_o id7}@anchor{2ad}@anchor{gnat_rm/the_implementation_of_standard_i_o stream-pointer-positioning}@anchor{2ae}
+@anchor{gnat_rm/the_implementation_of_standard_i_o id7}@anchor{2ae}@anchor{gnat_rm/the_implementation_of_standard_i_o stream-pointer-positioning}@anchor{2af}
@subsection Stream Pointer Positioning
@@ -21426,7 +21449,7 @@ between two Ada files, then the difference may be observable in some
situations.
@node Reading and Writing Non-Regular Files,Get_Immediate,Stream Pointer Positioning,Text_IO
-@anchor{gnat_rm/the_implementation_of_standard_i_o reading-and-writing-non-regular-files}@anchor{2af}@anchor{gnat_rm/the_implementation_of_standard_i_o id8}@anchor{2b0}
+@anchor{gnat_rm/the_implementation_of_standard_i_o reading-and-writing-non-regular-files}@anchor{2b0}@anchor{gnat_rm/the_implementation_of_standard_i_o id8}@anchor{2b1}
@subsection Reading and Writing Non-Regular Files
@@ -21477,7 +21500,7 @@ to read data past that end of
file indication, until another end of file indication is entered.
@node Get_Immediate,Treating Text_IO Files as Streams,Reading and Writing Non-Regular Files,Text_IO
-@anchor{gnat_rm/the_implementation_of_standard_i_o get-immediate}@anchor{2b1}@anchor{gnat_rm/the_implementation_of_standard_i_o id9}@anchor{2b2}
+@anchor{gnat_rm/the_implementation_of_standard_i_o get-immediate}@anchor{2b2}@anchor{gnat_rm/the_implementation_of_standard_i_o id9}@anchor{2b3}
@subsection Get_Immediate
@@ -21495,7 +21518,7 @@ possible), it is undefined whether the FF character will be treated as a
page mark.
@node Treating Text_IO Files as Streams,Text_IO Extensions,Get_Immediate,Text_IO
-@anchor{gnat_rm/the_implementation_of_standard_i_o id10}@anchor{2b3}@anchor{gnat_rm/the_implementation_of_standard_i_o treating-text-io-files-as-streams}@anchor{2b4}
+@anchor{gnat_rm/the_implementation_of_standard_i_o id10}@anchor{2b4}@anchor{gnat_rm/the_implementation_of_standard_i_o treating-text-io-files-as-streams}@anchor{2b5}
@subsection Treating Text_IO Files as Streams
@@ -21511,7 +21534,7 @@ skipped and the effect is similar to that described above for
@code{Get_Immediate}.
@node Text_IO Extensions,Text_IO Facilities for Unbounded Strings,Treating Text_IO Files as Streams,Text_IO
-@anchor{gnat_rm/the_implementation_of_standard_i_o id11}@anchor{2b5}@anchor{gnat_rm/the_implementation_of_standard_i_o text-io-extensions}@anchor{2b6}
+@anchor{gnat_rm/the_implementation_of_standard_i_o id11}@anchor{2b6}@anchor{gnat_rm/the_implementation_of_standard_i_o text-io-extensions}@anchor{2b7}
@subsection Text_IO Extensions
@@ -21539,7 +21562,7 @@ the string is to be read.
@end itemize
@node Text_IO Facilities for Unbounded Strings,,Text_IO Extensions,Text_IO
-@anchor{gnat_rm/the_implementation_of_standard_i_o text-io-facilities-for-unbounded-strings}@anchor{2b7}@anchor{gnat_rm/the_implementation_of_standard_i_o id12}@anchor{2b8}
+@anchor{gnat_rm/the_implementation_of_standard_i_o text-io-facilities-for-unbounded-strings}@anchor{2b8}@anchor{gnat_rm/the_implementation_of_standard_i_o id12}@anchor{2b9}
@subsection Text_IO Facilities for Unbounded Strings
@@ -21587,7 +21610,7 @@ files @code{a-szuzti.ads} and @code{a-szuzti.adb} provides similar extended
@code{Wide_Wide_Text_IO} functionality for unbounded wide wide strings.
@node Wide_Text_IO,Wide_Wide_Text_IO,Text_IO,The Implementation of Standard I/O
-@anchor{gnat_rm/the_implementation_of_standard_i_o wide-text-io}@anchor{2b9}@anchor{gnat_rm/the_implementation_of_standard_i_o id13}@anchor{2ba}
+@anchor{gnat_rm/the_implementation_of_standard_i_o wide-text-io}@anchor{2ba}@anchor{gnat_rm/the_implementation_of_standard_i_o id13}@anchor{2bb}
@section Wide_Text_IO
@@ -21834,12 +21857,12 @@ input also causes Constraint_Error to be raised.
@end menu
@node Stream Pointer Positioning<2>,Reading and Writing Non-Regular Files<2>,,Wide_Text_IO
-@anchor{gnat_rm/the_implementation_of_standard_i_o stream-pointer-positioning-1}@anchor{2bb}@anchor{gnat_rm/the_implementation_of_standard_i_o id14}@anchor{2bc}
+@anchor{gnat_rm/the_implementation_of_standard_i_o stream-pointer-positioning-1}@anchor{2bc}@anchor{gnat_rm/the_implementation_of_standard_i_o id14}@anchor{2bd}
@subsection Stream Pointer Positioning
@code{Ada.Wide_Text_IO} is similar to @code{Ada.Text_IO} in its handling
-of stream pointer positioning (@ref{2ac,,Text_IO}). There is one additional
+of stream pointer positioning (@ref{2ad,,Text_IO}). There is one additional
case:
If @code{Ada.Wide_Text_IO.Look_Ahead} reads a character outside the
@@ -21858,7 +21881,7 @@ to a normal program using @code{Wide_Text_IO}. However, this discrepancy
can be observed if the wide text file shares a stream with another file.
@node Reading and Writing Non-Regular Files<2>,,Stream Pointer Positioning<2>,Wide_Text_IO
-@anchor{gnat_rm/the_implementation_of_standard_i_o reading-and-writing-non-regular-files-1}@anchor{2bd}@anchor{gnat_rm/the_implementation_of_standard_i_o id15}@anchor{2be}
+@anchor{gnat_rm/the_implementation_of_standard_i_o reading-and-writing-non-regular-files-1}@anchor{2be}@anchor{gnat_rm/the_implementation_of_standard_i_o id15}@anchor{2bf}
@subsection Reading and Writing Non-Regular Files
@@ -21869,7 +21892,7 @@ treated as data characters), and @code{End_Of_Page} always returns
it is possible to read beyond an end of file.
@node Wide_Wide_Text_IO,Stream_IO,Wide_Text_IO,The Implementation of Standard I/O
-@anchor{gnat_rm/the_implementation_of_standard_i_o id16}@anchor{2bf}@anchor{gnat_rm/the_implementation_of_standard_i_o wide-wide-text-io}@anchor{2c0}
+@anchor{gnat_rm/the_implementation_of_standard_i_o id16}@anchor{2c0}@anchor{gnat_rm/the_implementation_of_standard_i_o wide-wide-text-io}@anchor{2c1}
@section Wide_Wide_Text_IO
@@ -22038,12 +22061,12 @@ input also causes Constraint_Error to be raised.
@end menu
@node Stream Pointer Positioning<3>,Reading and Writing Non-Regular Files<3>,,Wide_Wide_Text_IO
-@anchor{gnat_rm/the_implementation_of_standard_i_o stream-pointer-positioning-2}@anchor{2c1}@anchor{gnat_rm/the_implementation_of_standard_i_o id17}@anchor{2c2}
+@anchor{gnat_rm/the_implementation_of_standard_i_o stream-pointer-positioning-2}@anchor{2c2}@anchor{gnat_rm/the_implementation_of_standard_i_o id17}@anchor{2c3}
@subsection Stream Pointer Positioning
@code{Ada.Wide_Wide_Text_IO} is similar to @code{Ada.Text_IO} in its handling
-of stream pointer positioning (@ref{2ac,,Text_IO}). There is one additional
+of stream pointer positioning (@ref{2ad,,Text_IO}). There is one additional
case:
If @code{Ada.Wide_Wide_Text_IO.Look_Ahead} reads a character outside the
@@ -22062,7 +22085,7 @@ to a normal program using @code{Wide_Wide_Text_IO}. However, this discrepancy
can be observed if the wide text file shares a stream with another file.
@node Reading and Writing Non-Regular Files<3>,,Stream Pointer Positioning<3>,Wide_Wide_Text_IO
-@anchor{gnat_rm/the_implementation_of_standard_i_o id18}@anchor{2c3}@anchor{gnat_rm/the_implementation_of_standard_i_o reading-and-writing-non-regular-files-2}@anchor{2c4}
+@anchor{gnat_rm/the_implementation_of_standard_i_o id18}@anchor{2c4}@anchor{gnat_rm/the_implementation_of_standard_i_o reading-and-writing-non-regular-files-2}@anchor{2c5}
@subsection Reading and Writing Non-Regular Files
@@ -22073,7 +22096,7 @@ treated as data characters), and @code{End_Of_Page} always returns
it is possible to read beyond an end of file.
@node Stream_IO,Text Translation,Wide_Wide_Text_IO,The Implementation of Standard I/O
-@anchor{gnat_rm/the_implementation_of_standard_i_o id19}@anchor{2c5}@anchor{gnat_rm/the_implementation_of_standard_i_o stream-io}@anchor{2c6}
+@anchor{gnat_rm/the_implementation_of_standard_i_o id19}@anchor{2c6}@anchor{gnat_rm/the_implementation_of_standard_i_o stream-io}@anchor{2c7}
@section Stream_IO
@@ -22095,7 +22118,7 @@ manner described for stream attributes.
@end itemize
@node Text Translation,Shared Files,Stream_IO,The Implementation of Standard I/O
-@anchor{gnat_rm/the_implementation_of_standard_i_o id20}@anchor{2c7}@anchor{gnat_rm/the_implementation_of_standard_i_o text-translation}@anchor{2c8}
+@anchor{gnat_rm/the_implementation_of_standard_i_o id20}@anchor{2c8}@anchor{gnat_rm/the_implementation_of_standard_i_o text-translation}@anchor{2c9}
@section Text Translation
@@ -22129,7 +22152,7 @@ mode. (corresponds to_O_U16TEXT).
@end itemize
@node Shared Files,Filenames encoding,Text Translation,The Implementation of Standard I/O
-@anchor{gnat_rm/the_implementation_of_standard_i_o id21}@anchor{2c9}@anchor{gnat_rm/the_implementation_of_standard_i_o shared-files}@anchor{2ca}
+@anchor{gnat_rm/the_implementation_of_standard_i_o id21}@anchor{2ca}@anchor{gnat_rm/the_implementation_of_standard_i_o shared-files}@anchor{2cb}
@section Shared Files
@@ -22192,7 +22215,7 @@ heterogeneous input-output. Although this approach will work in GNAT if
for this purpose (using the stream attributes)
@node Filenames encoding,File content encoding,Shared Files,The Implementation of Standard I/O
-@anchor{gnat_rm/the_implementation_of_standard_i_o filenames-encoding}@anchor{2cb}@anchor{gnat_rm/the_implementation_of_standard_i_o id22}@anchor{2cc}
+@anchor{gnat_rm/the_implementation_of_standard_i_o filenames-encoding}@anchor{2cc}@anchor{gnat_rm/the_implementation_of_standard_i_o id22}@anchor{2cd}
@section Filenames encoding
@@ -22232,7 +22255,7 @@ platform. On the other Operating Systems the run-time is supporting
UTF-8 natively.
@node File content encoding,Open Modes,Filenames encoding,The Implementation of Standard I/O
-@anchor{gnat_rm/the_implementation_of_standard_i_o file-content-encoding}@anchor{2cd}@anchor{gnat_rm/the_implementation_of_standard_i_o id23}@anchor{2ce}
+@anchor{gnat_rm/the_implementation_of_standard_i_o file-content-encoding}@anchor{2ce}@anchor{gnat_rm/the_implementation_of_standard_i_o id23}@anchor{2cf}
@section File content encoding
@@ -22265,7 +22288,7 @@ Unicode 8-bit encoding
This encoding is only supported on the Windows platform.
@node Open Modes,Operations on C Streams,File content encoding,The Implementation of Standard I/O
-@anchor{gnat_rm/the_implementation_of_standard_i_o open-modes}@anchor{2cf}@anchor{gnat_rm/the_implementation_of_standard_i_o id24}@anchor{2d0}
+@anchor{gnat_rm/the_implementation_of_standard_i_o open-modes}@anchor{2d0}@anchor{gnat_rm/the_implementation_of_standard_i_o id24}@anchor{2d1}
@section Open Modes
@@ -22368,7 +22391,7 @@ subsequently requires switching from reading to writing or vice-versa,
then the file is reopened in @code{r+} mode to permit the required operation.
@node Operations on C Streams,Interfacing to C Streams,Open Modes,The Implementation of Standard I/O
-@anchor{gnat_rm/the_implementation_of_standard_i_o operations-on-c-streams}@anchor{2d1}@anchor{gnat_rm/the_implementation_of_standard_i_o id25}@anchor{2d2}
+@anchor{gnat_rm/the_implementation_of_standard_i_o operations-on-c-streams}@anchor{2d2}@anchor{gnat_rm/the_implementation_of_standard_i_o id25}@anchor{2d3}
@section Operations on C Streams
@@ -22528,7 +22551,7 @@ end Interfaces.C_Streams;
@end example
@node Interfacing to C Streams,,Operations on C Streams,The Implementation of Standard I/O
-@anchor{gnat_rm/the_implementation_of_standard_i_o interfacing-to-c-streams}@anchor{2d3}@anchor{gnat_rm/the_implementation_of_standard_i_o id26}@anchor{2d4}
+@anchor{gnat_rm/the_implementation_of_standard_i_o interfacing-to-c-streams}@anchor{2d4}@anchor{gnat_rm/the_implementation_of_standard_i_o id26}@anchor{2d5}
@section Interfacing to C Streams
@@ -22621,7 +22644,7 @@ imported from a C program, allowing an Ada file to operate on an
existing C file.
@node The GNAT Library,Interfacing to Other Languages,The Implementation of Standard I/O,Top
-@anchor{gnat_rm/the_gnat_library the-gnat-library}@anchor{10}@anchor{gnat_rm/the_gnat_library doc}@anchor{2d5}@anchor{gnat_rm/the_gnat_library id1}@anchor{2d6}
+@anchor{gnat_rm/the_gnat_library the-gnat-library}@anchor{10}@anchor{gnat_rm/the_gnat_library doc}@anchor{2d6}@anchor{gnat_rm/the_gnat_library id1}@anchor{2d7}
@chapter The GNAT Library
@@ -22815,7 +22838,7 @@ of GNAT, and will generate a warning message.
@end menu
@node Ada Characters Latin_9 a-chlat9 ads,Ada Characters Wide_Latin_1 a-cwila1 ads,,The GNAT Library
-@anchor{gnat_rm/the_gnat_library id2}@anchor{2d7}@anchor{gnat_rm/the_gnat_library ada-characters-latin-9-a-chlat9-ads}@anchor{2d8}
+@anchor{gnat_rm/the_gnat_library id2}@anchor{2d8}@anchor{gnat_rm/the_gnat_library ada-characters-latin-9-a-chlat9-ads}@anchor{2d9}
@section @code{Ada.Characters.Latin_9} (@code{a-chlat9.ads})
@@ -22832,7 +22855,7 @@ is specifically authorized by the Ada Reference Manual
(RM A.3.3(27)).
@node Ada Characters Wide_Latin_1 a-cwila1 ads,Ada Characters Wide_Latin_9 a-cwila1 ads,Ada Characters Latin_9 a-chlat9 ads,The GNAT Library
-@anchor{gnat_rm/the_gnat_library ada-characters-wide-latin-1-a-cwila1-ads}@anchor{2d9}@anchor{gnat_rm/the_gnat_library id3}@anchor{2da}
+@anchor{gnat_rm/the_gnat_library ada-characters-wide-latin-1-a-cwila1-ads}@anchor{2da}@anchor{gnat_rm/the_gnat_library id3}@anchor{2db}
@section @code{Ada.Characters.Wide_Latin_1} (@code{a-cwila1.ads})
@@ -22849,7 +22872,7 @@ is specifically authorized by the Ada Reference Manual
(RM A.3.3(27)).
@node Ada Characters Wide_Latin_9 a-cwila1 ads,Ada Characters Wide_Wide_Latin_1 a-chzla1 ads,Ada Characters Wide_Latin_1 a-cwila1 ads,The GNAT Library
-@anchor{gnat_rm/the_gnat_library id4}@anchor{2db}@anchor{gnat_rm/the_gnat_library ada-characters-wide-latin-9-a-cwila1-ads}@anchor{2dc}
+@anchor{gnat_rm/the_gnat_library id4}@anchor{2dc}@anchor{gnat_rm/the_gnat_library ada-characters-wide-latin-9-a-cwila1-ads}@anchor{2dd}
@section @code{Ada.Characters.Wide_Latin_9} (@code{a-cwila1.ads})
@@ -22866,7 +22889,7 @@ is specifically authorized by the Ada Reference Manual
(RM A.3.3(27)).
@node Ada Characters Wide_Wide_Latin_1 a-chzla1 ads,Ada Characters Wide_Wide_Latin_9 a-chzla9 ads,Ada Characters Wide_Latin_9 a-cwila1 ads,The GNAT Library
-@anchor{gnat_rm/the_gnat_library ada-characters-wide-wide-latin-1-a-chzla1-ads}@anchor{2dd}@anchor{gnat_rm/the_gnat_library id5}@anchor{2de}
+@anchor{gnat_rm/the_gnat_library ada-characters-wide-wide-latin-1-a-chzla1-ads}@anchor{2de}@anchor{gnat_rm/the_gnat_library id5}@anchor{2df}
@section @code{Ada.Characters.Wide_Wide_Latin_1} (@code{a-chzla1.ads})
@@ -22883,7 +22906,7 @@ is specifically authorized by the Ada Reference Manual
(RM A.3.3(27)).
@node Ada Characters Wide_Wide_Latin_9 a-chzla9 ads,Ada Containers Formal_Doubly_Linked_Lists a-cfdlli ads,Ada Characters Wide_Wide_Latin_1 a-chzla1 ads,The GNAT Library
-@anchor{gnat_rm/the_gnat_library ada-characters-wide-wide-latin-9-a-chzla9-ads}@anchor{2df}@anchor{gnat_rm/the_gnat_library id6}@anchor{2e0}
+@anchor{gnat_rm/the_gnat_library ada-characters-wide-wide-latin-9-a-chzla9-ads}@anchor{2e0}@anchor{gnat_rm/the_gnat_library id6}@anchor{2e1}
@section @code{Ada.Characters.Wide_Wide_Latin_9} (@code{a-chzla9.ads})
@@ -22900,7 +22923,7 @@ is specifically authorized by the Ada Reference Manual
(RM A.3.3(27)).
@node Ada Containers Formal_Doubly_Linked_Lists a-cfdlli ads,Ada Containers Formal_Hashed_Maps a-cfhama ads,Ada Characters Wide_Wide_Latin_9 a-chzla9 ads,The GNAT Library
-@anchor{gnat_rm/the_gnat_library id7}@anchor{2e1}@anchor{gnat_rm/the_gnat_library ada-containers-formal-doubly-linked-lists-a-cfdlli-ads}@anchor{2e2}
+@anchor{gnat_rm/the_gnat_library id7}@anchor{2e2}@anchor{gnat_rm/the_gnat_library ada-containers-formal-doubly-linked-lists-a-cfdlli-ads}@anchor{2e3}
@section @code{Ada.Containers.Formal_Doubly_Linked_Lists} (@code{a-cfdlli.ads})
@@ -22919,7 +22942,7 @@ efficient version than the one defined in the standard. In particular it
does not have the complex overhead required to detect cursor tampering.
@node Ada Containers Formal_Hashed_Maps a-cfhama ads,Ada Containers Formal_Hashed_Sets a-cfhase ads,Ada Containers Formal_Doubly_Linked_Lists a-cfdlli ads,The GNAT Library
-@anchor{gnat_rm/the_gnat_library id8}@anchor{2e3}@anchor{gnat_rm/the_gnat_library ada-containers-formal-hashed-maps-a-cfhama-ads}@anchor{2e4}
+@anchor{gnat_rm/the_gnat_library id8}@anchor{2e4}@anchor{gnat_rm/the_gnat_library ada-containers-formal-hashed-maps-a-cfhama-ads}@anchor{2e5}
@section @code{Ada.Containers.Formal_Hashed_Maps} (@code{a-cfhama.ads})
@@ -22938,7 +22961,7 @@ efficient version than the one defined in the standard. In particular it
does not have the complex overhead required to detect cursor tampering.
@node Ada Containers Formal_Hashed_Sets a-cfhase ads,Ada Containers Formal_Ordered_Maps a-cforma ads,Ada Containers Formal_Hashed_Maps a-cfhama ads,The GNAT Library
-@anchor{gnat_rm/the_gnat_library id9}@anchor{2e5}@anchor{gnat_rm/the_gnat_library ada-containers-formal-hashed-sets-a-cfhase-ads}@anchor{2e6}
+@anchor{gnat_rm/the_gnat_library id9}@anchor{2e6}@anchor{gnat_rm/the_gnat_library ada-containers-formal-hashed-sets-a-cfhase-ads}@anchor{2e7}
@section @code{Ada.Containers.Formal_Hashed_Sets} (@code{a-cfhase.ads})
@@ -22957,7 +22980,7 @@ efficient version than the one defined in the standard. In particular it
does not have the complex overhead required to detect cursor tampering.
@node Ada Containers Formal_Ordered_Maps a-cforma ads,Ada Containers Formal_Ordered_Sets a-cforse ads,Ada Containers Formal_Hashed_Sets a-cfhase ads,The GNAT Library
-@anchor{gnat_rm/the_gnat_library id10}@anchor{2e7}@anchor{gnat_rm/the_gnat_library ada-containers-formal-ordered-maps-a-cforma-ads}@anchor{2e8}
+@anchor{gnat_rm/the_gnat_library id10}@anchor{2e8}@anchor{gnat_rm/the_gnat_library ada-containers-formal-ordered-maps-a-cforma-ads}@anchor{2e9}
@section @code{Ada.Containers.Formal_Ordered_Maps} (@code{a-cforma.ads})
@@ -22976,7 +22999,7 @@ efficient version than the one defined in the standard. In particular it
does not have the complex overhead required to detect cursor tampering.
@node Ada Containers Formal_Ordered_Sets a-cforse ads,Ada Containers Formal_Vectors a-cofove ads,Ada Containers Formal_Ordered_Maps a-cforma ads,The GNAT Library
-@anchor{gnat_rm/the_gnat_library ada-containers-formal-ordered-sets-a-cforse-ads}@anchor{2e9}@anchor{gnat_rm/the_gnat_library id11}@anchor{2ea}
+@anchor{gnat_rm/the_gnat_library ada-containers-formal-ordered-sets-a-cforse-ads}@anchor{2ea}@anchor{gnat_rm/the_gnat_library id11}@anchor{2eb}
@section @code{Ada.Containers.Formal_Ordered_Sets} (@code{a-cforse.ads})
@@ -22995,7 +23018,7 @@ efficient version than the one defined in the standard. In particular it
does not have the complex overhead required to detect cursor tampering.
@node Ada Containers Formal_Vectors a-cofove ads,Ada Containers Formal_Indefinite_Vectors a-cfinve ads,Ada Containers Formal_Ordered_Sets a-cforse ads,The GNAT Library
-@anchor{gnat_rm/the_gnat_library id12}@anchor{2eb}@anchor{gnat_rm/the_gnat_library ada-containers-formal-vectors-a-cofove-ads}@anchor{2ec}
+@anchor{gnat_rm/the_gnat_library id12}@anchor{2ec}@anchor{gnat_rm/the_gnat_library ada-containers-formal-vectors-a-cofove-ads}@anchor{2ed}
@section @code{Ada.Containers.Formal_Vectors} (@code{a-cofove.ads})
@@ -23014,7 +23037,7 @@ efficient version than the one defined in the standard. In particular it
does not have the complex overhead required to detect cursor tampering.
@node Ada Containers Formal_Indefinite_Vectors a-cfinve ads,Ada Containers Functional_Vectors a-cofuve ads,Ada Containers Formal_Vectors a-cofove ads,The GNAT Library
-@anchor{gnat_rm/the_gnat_library id13}@anchor{2ed}@anchor{gnat_rm/the_gnat_library ada-containers-formal-indefinite-vectors-a-cfinve-ads}@anchor{2ee}
+@anchor{gnat_rm/the_gnat_library id13}@anchor{2ee}@anchor{gnat_rm/the_gnat_library ada-containers-formal-indefinite-vectors-a-cfinve-ads}@anchor{2ef}
@section @code{Ada.Containers.Formal_Indefinite_Vectors} (@code{a-cfinve.ads})
@@ -23033,7 +23056,7 @@ efficient version than the one defined in the standard. In particular it
does not have the complex overhead required to detect cursor tampering.
@node Ada Containers Functional_Vectors a-cofuve ads,Ada Containers Functional_Sets a-cofuse ads,Ada Containers Formal_Indefinite_Vectors a-cfinve ads,The GNAT Library
-@anchor{gnat_rm/the_gnat_library id14}@anchor{2ef}@anchor{gnat_rm/the_gnat_library ada-containers-functional-vectors-a-cofuve-ads}@anchor{2f0}
+@anchor{gnat_rm/the_gnat_library id14}@anchor{2f0}@anchor{gnat_rm/the_gnat_library ada-containers-functional-vectors-a-cofuve-ads}@anchor{2f1}
@section @code{Ada.Containers.Functional_Vectors} (@code{a-cofuve.ads})
@@ -23055,7 +23078,7 @@ and annotations, so that they can be removed from the final executable. The
specification of this unit is compatible with SPARK 2014.
@node Ada Containers Functional_Sets a-cofuse ads,Ada Containers Functional_Maps a-cofuma ads,Ada Containers Functional_Vectors a-cofuve ads,The GNAT Library
-@anchor{gnat_rm/the_gnat_library ada-containers-functional-sets-a-cofuse-ads}@anchor{2f1}@anchor{gnat_rm/the_gnat_library id15}@anchor{2f2}
+@anchor{gnat_rm/the_gnat_library ada-containers-functional-sets-a-cofuse-ads}@anchor{2f2}@anchor{gnat_rm/the_gnat_library id15}@anchor{2f3}
@section @code{Ada.Containers.Functional_Sets} (@code{a-cofuse.ads})
@@ -23077,7 +23100,7 @@ and annotations, so that they can be removed from the final executable. The
specification of this unit is compatible with SPARK 2014.
@node Ada Containers Functional_Maps a-cofuma ads,Ada Containers Bounded_Holders a-coboho ads,Ada Containers Functional_Sets a-cofuse ads,The GNAT Library
-@anchor{gnat_rm/the_gnat_library id16}@anchor{2f3}@anchor{gnat_rm/the_gnat_library ada-containers-functional-maps-a-cofuma-ads}@anchor{2f4}
+@anchor{gnat_rm/the_gnat_library id16}@anchor{2f4}@anchor{gnat_rm/the_gnat_library ada-containers-functional-maps-a-cofuma-ads}@anchor{2f5}
@section @code{Ada.Containers.Functional_Maps} (@code{a-cofuma.ads})
@@ -23099,7 +23122,7 @@ and annotations, so that they can be removed from the final executable. The
specification of this unit is compatible with SPARK 2014.
@node Ada Containers Bounded_Holders a-coboho ads,Ada Command_Line Environment a-colien ads,Ada Containers Functional_Maps a-cofuma ads,The GNAT Library
-@anchor{gnat_rm/the_gnat_library ada-containers-bounded-holders-a-coboho-ads}@anchor{2f5}@anchor{gnat_rm/the_gnat_library id17}@anchor{2f6}
+@anchor{gnat_rm/the_gnat_library ada-containers-bounded-holders-a-coboho-ads}@anchor{2f6}@anchor{gnat_rm/the_gnat_library id17}@anchor{2f7}
@section @code{Ada.Containers.Bounded_Holders} (@code{a-coboho.ads})
@@ -23111,7 +23134,7 @@ This child of @code{Ada.Containers} defines a modified version of
Indefinite_Holders that avoids heap allocation.
@node Ada Command_Line Environment a-colien ads,Ada Command_Line Remove a-colire ads,Ada Containers Bounded_Holders a-coboho ads,The GNAT Library
-@anchor{gnat_rm/the_gnat_library ada-command-line-environment-a-colien-ads}@anchor{2f7}@anchor{gnat_rm/the_gnat_library id18}@anchor{2f8}
+@anchor{gnat_rm/the_gnat_library ada-command-line-environment-a-colien-ads}@anchor{2f8}@anchor{gnat_rm/the_gnat_library id18}@anchor{2f9}
@section @code{Ada.Command_Line.Environment} (@code{a-colien.ads})
@@ -23124,7 +23147,7 @@ provides a mechanism for obtaining environment values on systems
where this concept makes sense.
@node Ada Command_Line Remove a-colire ads,Ada Command_Line Response_File a-clrefi ads,Ada Command_Line Environment a-colien ads,The GNAT Library
-@anchor{gnat_rm/the_gnat_library id19}@anchor{2f9}@anchor{gnat_rm/the_gnat_library ada-command-line-remove-a-colire-ads}@anchor{2fa}
+@anchor{gnat_rm/the_gnat_library id19}@anchor{2fa}@anchor{gnat_rm/the_gnat_library ada-command-line-remove-a-colire-ads}@anchor{2fb}
@section @code{Ada.Command_Line.Remove} (@code{a-colire.ads})
@@ -23142,7 +23165,7 @@ to further calls on the subprograms in @code{Ada.Command_Line} will not
see the removed argument.
@node Ada Command_Line Response_File a-clrefi ads,Ada Direct_IO C_Streams a-diocst ads,Ada Command_Line Remove a-colire ads,The GNAT Library
-@anchor{gnat_rm/the_gnat_library id20}@anchor{2fb}@anchor{gnat_rm/the_gnat_library ada-command-line-response-file-a-clrefi-ads}@anchor{2fc}
+@anchor{gnat_rm/the_gnat_library id20}@anchor{2fc}@anchor{gnat_rm/the_gnat_library ada-command-line-response-file-a-clrefi-ads}@anchor{2fd}
@section @code{Ada.Command_Line.Response_File} (@code{a-clrefi.ads})
@@ -23162,7 +23185,7 @@ Using a response file allow passing a set of arguments to an executable longer
than the maximum allowed by the system on the command line.
@node Ada Direct_IO C_Streams a-diocst ads,Ada Exceptions Is_Null_Occurrence a-einuoc ads,Ada Command_Line Response_File a-clrefi ads,The GNAT Library
-@anchor{gnat_rm/the_gnat_library id21}@anchor{2fd}@anchor{gnat_rm/the_gnat_library ada-direct-io-c-streams-a-diocst-ads}@anchor{2fe}
+@anchor{gnat_rm/the_gnat_library id21}@anchor{2fe}@anchor{gnat_rm/the_gnat_library ada-direct-io-c-streams-a-diocst-ads}@anchor{2ff}
@section @code{Ada.Direct_IO.C_Streams} (@code{a-diocst.ads})
@@ -23177,7 +23200,7 @@ extracted from a file opened on the Ada side, and an Ada file
can be constructed from a stream opened on the C side.
@node Ada Exceptions Is_Null_Occurrence a-einuoc ads,Ada Exceptions Last_Chance_Handler a-elchha ads,Ada Direct_IO C_Streams a-diocst ads,The GNAT Library
-@anchor{gnat_rm/the_gnat_library id22}@anchor{2ff}@anchor{gnat_rm/the_gnat_library ada-exceptions-is-null-occurrence-a-einuoc-ads}@anchor{300}
+@anchor{gnat_rm/the_gnat_library id22}@anchor{300}@anchor{gnat_rm/the_gnat_library ada-exceptions-is-null-occurrence-a-einuoc-ads}@anchor{301}
@section @code{Ada.Exceptions.Is_Null_Occurrence} (@code{a-einuoc.ads})
@@ -23191,7 +23214,7 @@ exception occurrence (@code{Null_Occurrence}) without raising
an exception.
@node Ada Exceptions Last_Chance_Handler a-elchha ads,Ada Exceptions Traceback a-exctra ads,Ada Exceptions Is_Null_Occurrence a-einuoc ads,The GNAT Library
-@anchor{gnat_rm/the_gnat_library id23}@anchor{301}@anchor{gnat_rm/the_gnat_library ada-exceptions-last-chance-handler-a-elchha-ads}@anchor{302}
+@anchor{gnat_rm/the_gnat_library id23}@anchor{302}@anchor{gnat_rm/the_gnat_library ada-exceptions-last-chance-handler-a-elchha-ads}@anchor{303}
@section @code{Ada.Exceptions.Last_Chance_Handler} (@code{a-elchha.ads})
@@ -23205,7 +23228,7 @@ exceptions (hence the name last chance), and perform clean ups before
terminating the program. Note that this subprogram never returns.
@node Ada Exceptions Traceback a-exctra ads,Ada Sequential_IO C_Streams a-siocst ads,Ada Exceptions Last_Chance_Handler a-elchha ads,The GNAT Library
-@anchor{gnat_rm/the_gnat_library ada-exceptions-traceback-a-exctra-ads}@anchor{303}@anchor{gnat_rm/the_gnat_library id24}@anchor{304}
+@anchor{gnat_rm/the_gnat_library ada-exceptions-traceback-a-exctra-ads}@anchor{304}@anchor{gnat_rm/the_gnat_library id24}@anchor{305}
@section @code{Ada.Exceptions.Traceback} (@code{a-exctra.ads})
@@ -23218,7 +23241,7 @@ give a traceback array of addresses based on an exception
occurrence.
@node Ada Sequential_IO C_Streams a-siocst ads,Ada Streams Stream_IO C_Streams a-ssicst ads,Ada Exceptions Traceback a-exctra ads,The GNAT Library
-@anchor{gnat_rm/the_gnat_library ada-sequential-io-c-streams-a-siocst-ads}@anchor{305}@anchor{gnat_rm/the_gnat_library id25}@anchor{306}
+@anchor{gnat_rm/the_gnat_library ada-sequential-io-c-streams-a-siocst-ads}@anchor{306}@anchor{gnat_rm/the_gnat_library id25}@anchor{307}
@section @code{Ada.Sequential_IO.C_Streams} (@code{a-siocst.ads})
@@ -23233,7 +23256,7 @@ extracted from a file opened on the Ada side, and an Ada file
can be constructed from a stream opened on the C side.
@node Ada Streams Stream_IO C_Streams a-ssicst ads,Ada Strings Unbounded Text_IO a-suteio ads,Ada Sequential_IO C_Streams a-siocst ads,The GNAT Library
-@anchor{gnat_rm/the_gnat_library id26}@anchor{307}@anchor{gnat_rm/the_gnat_library ada-streams-stream-io-c-streams-a-ssicst-ads}@anchor{308}
+@anchor{gnat_rm/the_gnat_library id26}@anchor{308}@anchor{gnat_rm/the_gnat_library ada-streams-stream-io-c-streams-a-ssicst-ads}@anchor{309}
@section @code{Ada.Streams.Stream_IO.C_Streams} (@code{a-ssicst.ads})
@@ -23248,7 +23271,7 @@ extracted from a file opened on the Ada side, and an Ada file
can be constructed from a stream opened on the C side.
@node Ada Strings Unbounded Text_IO a-suteio ads,Ada Strings Wide_Unbounded Wide_Text_IO a-swuwti ads,Ada Streams Stream_IO C_Streams a-ssicst ads,The GNAT Library
-@anchor{gnat_rm/the_gnat_library ada-strings-unbounded-text-io-a-suteio-ads}@anchor{309}@anchor{gnat_rm/the_gnat_library id27}@anchor{30a}
+@anchor{gnat_rm/the_gnat_library ada-strings-unbounded-text-io-a-suteio-ads}@anchor{30a}@anchor{gnat_rm/the_gnat_library id27}@anchor{30b}
@section @code{Ada.Strings.Unbounded.Text_IO} (@code{a-suteio.ads})
@@ -23265,7 +23288,7 @@ strings, avoiding the necessity for an intermediate operation
with ordinary strings.
@node Ada Strings Wide_Unbounded Wide_Text_IO a-swuwti ads,Ada Strings Wide_Wide_Unbounded Wide_Wide_Text_IO a-szuzti ads,Ada Strings Unbounded Text_IO a-suteio ads,The GNAT Library
-@anchor{gnat_rm/the_gnat_library id28}@anchor{30b}@anchor{gnat_rm/the_gnat_library ada-strings-wide-unbounded-wide-text-io-a-swuwti-ads}@anchor{30c}
+@anchor{gnat_rm/the_gnat_library id28}@anchor{30c}@anchor{gnat_rm/the_gnat_library ada-strings-wide-unbounded-wide-text-io-a-swuwti-ads}@anchor{30d}
@section @code{Ada.Strings.Wide_Unbounded.Wide_Text_IO} (@code{a-swuwti.ads})
@@ -23282,7 +23305,7 @@ wide strings, avoiding the necessity for an intermediate operation
with ordinary wide strings.
@node Ada Strings Wide_Wide_Unbounded Wide_Wide_Text_IO a-szuzti ads,Ada Task_Initialization a-tasini ads,Ada Strings Wide_Unbounded Wide_Text_IO a-swuwti ads,The GNAT Library
-@anchor{gnat_rm/the_gnat_library id29}@anchor{30d}@anchor{gnat_rm/the_gnat_library ada-strings-wide-wide-unbounded-wide-wide-text-io-a-szuzti-ads}@anchor{30e}
+@anchor{gnat_rm/the_gnat_library id29}@anchor{30e}@anchor{gnat_rm/the_gnat_library ada-strings-wide-wide-unbounded-wide-wide-text-io-a-szuzti-ads}@anchor{30f}
@section @code{Ada.Strings.Wide_Wide_Unbounded.Wide_Wide_Text_IO} (@code{a-szuzti.ads})
@@ -23299,7 +23322,7 @@ wide wide strings, avoiding the necessity for an intermediate operation
with ordinary wide wide strings.
@node Ada Task_Initialization a-tasini ads,Ada Text_IO C_Streams a-tiocst ads,Ada Strings Wide_Wide_Unbounded Wide_Wide_Text_IO a-szuzti ads,The GNAT Library
-@anchor{gnat_rm/the_gnat_library ada-task-initialization-a-tasini-ads}@anchor{30f}@anchor{gnat_rm/the_gnat_library id30}@anchor{310}
+@anchor{gnat_rm/the_gnat_library ada-task-initialization-a-tasini-ads}@anchor{310}@anchor{gnat_rm/the_gnat_library id30}@anchor{311}
@section @code{Ada.Task_Initialization} (@code{a-tasini.ads})
@@ -23311,7 +23334,7 @@ parameterless procedures. Note that such a handler is only invoked for
those tasks activated after the handler is set.
@node Ada Text_IO C_Streams a-tiocst ads,Ada Text_IO Reset_Standard_Files a-tirsfi ads,Ada Task_Initialization a-tasini ads,The GNAT Library
-@anchor{gnat_rm/the_gnat_library ada-text-io-c-streams-a-tiocst-ads}@anchor{311}@anchor{gnat_rm/the_gnat_library id31}@anchor{312}
+@anchor{gnat_rm/the_gnat_library ada-text-io-c-streams-a-tiocst-ads}@anchor{312}@anchor{gnat_rm/the_gnat_library id31}@anchor{313}
@section @code{Ada.Text_IO.C_Streams} (@code{a-tiocst.ads})
@@ -23326,7 +23349,7 @@ extracted from a file opened on the Ada side, and an Ada file
can be constructed from a stream opened on the C side.
@node Ada Text_IO Reset_Standard_Files a-tirsfi ads,Ada Wide_Characters Unicode a-wichun ads,Ada Text_IO C_Streams a-tiocst ads,The GNAT Library
-@anchor{gnat_rm/the_gnat_library ada-text-io-reset-standard-files-a-tirsfi-ads}@anchor{313}@anchor{gnat_rm/the_gnat_library id32}@anchor{314}
+@anchor{gnat_rm/the_gnat_library ada-text-io-reset-standard-files-a-tirsfi-ads}@anchor{314}@anchor{gnat_rm/the_gnat_library id32}@anchor{315}
@section @code{Ada.Text_IO.Reset_Standard_Files} (@code{a-tirsfi.ads})
@@ -23341,7 +23364,7 @@ execution (for example a standard input file may be redefined to be
interactive).
@node Ada Wide_Characters Unicode a-wichun ads,Ada Wide_Text_IO C_Streams a-wtcstr ads,Ada Text_IO Reset_Standard_Files a-tirsfi ads,The GNAT Library
-@anchor{gnat_rm/the_gnat_library id33}@anchor{315}@anchor{gnat_rm/the_gnat_library ada-wide-characters-unicode-a-wichun-ads}@anchor{316}
+@anchor{gnat_rm/the_gnat_library id33}@anchor{316}@anchor{gnat_rm/the_gnat_library ada-wide-characters-unicode-a-wichun-ads}@anchor{317}
@section @code{Ada.Wide_Characters.Unicode} (@code{a-wichun.ads})
@@ -23354,7 +23377,7 @@ This package provides subprograms that allow categorization of
Wide_Character values according to Unicode categories.
@node Ada Wide_Text_IO C_Streams a-wtcstr ads,Ada Wide_Text_IO Reset_Standard_Files a-wrstfi ads,Ada Wide_Characters Unicode a-wichun ads,The GNAT Library
-@anchor{gnat_rm/the_gnat_library id34}@anchor{317}@anchor{gnat_rm/the_gnat_library ada-wide-text-io-c-streams-a-wtcstr-ads}@anchor{318}
+@anchor{gnat_rm/the_gnat_library id34}@anchor{318}@anchor{gnat_rm/the_gnat_library ada-wide-text-io-c-streams-a-wtcstr-ads}@anchor{319}
@section @code{Ada.Wide_Text_IO.C_Streams} (@code{a-wtcstr.ads})
@@ -23369,7 +23392,7 @@ extracted from a file opened on the Ada side, and an Ada file
can be constructed from a stream opened on the C side.
@node Ada Wide_Text_IO Reset_Standard_Files a-wrstfi ads,Ada Wide_Wide_Characters Unicode a-zchuni ads,Ada Wide_Text_IO C_Streams a-wtcstr ads,The GNAT Library
-@anchor{gnat_rm/the_gnat_library ada-wide-text-io-reset-standard-files-a-wrstfi-ads}@anchor{319}@anchor{gnat_rm/the_gnat_library id35}@anchor{31a}
+@anchor{gnat_rm/the_gnat_library ada-wide-text-io-reset-standard-files-a-wrstfi-ads}@anchor{31a}@anchor{gnat_rm/the_gnat_library id35}@anchor{31b}
@section @code{Ada.Wide_Text_IO.Reset_Standard_Files} (@code{a-wrstfi.ads})
@@ -23384,7 +23407,7 @@ execution (for example a standard input file may be redefined to be
interactive).
@node Ada Wide_Wide_Characters Unicode a-zchuni ads,Ada Wide_Wide_Text_IO C_Streams a-ztcstr ads,Ada Wide_Text_IO Reset_Standard_Files a-wrstfi ads,The GNAT Library
-@anchor{gnat_rm/the_gnat_library id36}@anchor{31b}@anchor{gnat_rm/the_gnat_library ada-wide-wide-characters-unicode-a-zchuni-ads}@anchor{31c}
+@anchor{gnat_rm/the_gnat_library id36}@anchor{31c}@anchor{gnat_rm/the_gnat_library ada-wide-wide-characters-unicode-a-zchuni-ads}@anchor{31d}
@section @code{Ada.Wide_Wide_Characters.Unicode} (@code{a-zchuni.ads})
@@ -23397,7 +23420,7 @@ This package provides subprograms that allow categorization of
Wide_Wide_Character values according to Unicode categories.
@node Ada Wide_Wide_Text_IO C_Streams a-ztcstr ads,Ada Wide_Wide_Text_IO Reset_Standard_Files a-zrstfi ads,Ada Wide_Wide_Characters Unicode a-zchuni ads,The GNAT Library
-@anchor{gnat_rm/the_gnat_library id37}@anchor{31d}@anchor{gnat_rm/the_gnat_library ada-wide-wide-text-io-c-streams-a-ztcstr-ads}@anchor{31e}
+@anchor{gnat_rm/the_gnat_library id37}@anchor{31e}@anchor{gnat_rm/the_gnat_library ada-wide-wide-text-io-c-streams-a-ztcstr-ads}@anchor{31f}
@section @code{Ada.Wide_Wide_Text_IO.C_Streams} (@code{a-ztcstr.ads})
@@ -23412,7 +23435,7 @@ extracted from a file opened on the Ada side, and an Ada file
can be constructed from a stream opened on the C side.
@node Ada Wide_Wide_Text_IO Reset_Standard_Files a-zrstfi ads,GNAT Altivec g-altive ads,Ada Wide_Wide_Text_IO C_Streams a-ztcstr ads,The GNAT Library
-@anchor{gnat_rm/the_gnat_library ada-wide-wide-text-io-reset-standard-files-a-zrstfi-ads}@anchor{31f}@anchor{gnat_rm/the_gnat_library id38}@anchor{320}
+@anchor{gnat_rm/the_gnat_library ada-wide-wide-text-io-reset-standard-files-a-zrstfi-ads}@anchor{320}@anchor{gnat_rm/the_gnat_library id38}@anchor{321}
@section @code{Ada.Wide_Wide_Text_IO.Reset_Standard_Files} (@code{a-zrstfi.ads})
@@ -23427,7 +23450,7 @@ change during execution (for example a standard input file may be
redefined to be interactive).
@node GNAT Altivec g-altive ads,GNAT Altivec Conversions g-altcon ads,Ada Wide_Wide_Text_IO Reset_Standard_Files a-zrstfi ads,The GNAT Library
-@anchor{gnat_rm/the_gnat_library gnat-altivec-g-altive-ads}@anchor{321}@anchor{gnat_rm/the_gnat_library id39}@anchor{322}
+@anchor{gnat_rm/the_gnat_library gnat-altivec-g-altive-ads}@anchor{322}@anchor{gnat_rm/the_gnat_library id39}@anchor{323}
@section @code{GNAT.Altivec} (@code{g-altive.ads})
@@ -23440,7 +23463,7 @@ definitions of constants and types common to all the versions of the
binding.
@node GNAT Altivec Conversions g-altcon ads,GNAT Altivec Vector_Operations g-alveop ads,GNAT Altivec g-altive ads,The GNAT Library
-@anchor{gnat_rm/the_gnat_library gnat-altivec-conversions-g-altcon-ads}@anchor{323}@anchor{gnat_rm/the_gnat_library id40}@anchor{324}
+@anchor{gnat_rm/the_gnat_library gnat-altivec-conversions-g-altcon-ads}@anchor{324}@anchor{gnat_rm/the_gnat_library id40}@anchor{325}
@section @code{GNAT.Altivec.Conversions} (@code{g-altcon.ads})
@@ -23451,7 +23474,7 @@ binding.
This package provides the Vector/View conversion routines.
@node GNAT Altivec Vector_Operations g-alveop ads,GNAT Altivec Vector_Types g-alvety ads,GNAT Altivec Conversions g-altcon ads,The GNAT Library
-@anchor{gnat_rm/the_gnat_library id41}@anchor{325}@anchor{gnat_rm/the_gnat_library gnat-altivec-vector-operations-g-alveop-ads}@anchor{326}
+@anchor{gnat_rm/the_gnat_library id41}@anchor{326}@anchor{gnat_rm/the_gnat_library gnat-altivec-vector-operations-g-alveop-ads}@anchor{327}
@section @code{GNAT.Altivec.Vector_Operations} (@code{g-alveop.ads})
@@ -23465,7 +23488,7 @@ library. The hard binding is provided as a separate package. This unit
is common to both bindings.
@node GNAT Altivec Vector_Types g-alvety ads,GNAT Altivec Vector_Views g-alvevi ads,GNAT Altivec Vector_Operations g-alveop ads,The GNAT Library
-@anchor{gnat_rm/the_gnat_library gnat-altivec-vector-types-g-alvety-ads}@anchor{327}@anchor{gnat_rm/the_gnat_library id42}@anchor{328}
+@anchor{gnat_rm/the_gnat_library gnat-altivec-vector-types-g-alvety-ads}@anchor{328}@anchor{gnat_rm/the_gnat_library id42}@anchor{329}
@section @code{GNAT.Altivec.Vector_Types} (@code{g-alvety.ads})
@@ -23477,7 +23500,7 @@ This package exposes the various vector types part of the Ada binding
to AltiVec facilities.
@node GNAT Altivec Vector_Views g-alvevi ads,GNAT Array_Split g-arrspl ads,GNAT Altivec Vector_Types g-alvety ads,The GNAT Library
-@anchor{gnat_rm/the_gnat_library gnat-altivec-vector-views-g-alvevi-ads}@anchor{329}@anchor{gnat_rm/the_gnat_library id43}@anchor{32a}
+@anchor{gnat_rm/the_gnat_library gnat-altivec-vector-views-g-alvevi-ads}@anchor{32a}@anchor{gnat_rm/the_gnat_library id43}@anchor{32b}
@section @code{GNAT.Altivec.Vector_Views} (@code{g-alvevi.ads})
@@ -23492,7 +23515,7 @@ vector elements and provides a simple way to initialize vector
objects.
@node GNAT Array_Split g-arrspl ads,GNAT AWK g-awk ads,GNAT Altivec Vector_Views g-alvevi ads,The GNAT Library
-@anchor{gnat_rm/the_gnat_library gnat-array-split-g-arrspl-ads}@anchor{32b}@anchor{gnat_rm/the_gnat_library id44}@anchor{32c}
+@anchor{gnat_rm/the_gnat_library gnat-array-split-g-arrspl-ads}@anchor{32c}@anchor{gnat_rm/the_gnat_library id44}@anchor{32d}
@section @code{GNAT.Array_Split} (@code{g-arrspl.ads})
@@ -23505,7 +23528,7 @@ an array wherever the separators appear, and provide direct access
to the resulting slices.
@node GNAT AWK g-awk ads,GNAT Bind_Environment g-binenv ads,GNAT Array_Split g-arrspl ads,The GNAT Library
-@anchor{gnat_rm/the_gnat_library id45}@anchor{32d}@anchor{gnat_rm/the_gnat_library gnat-awk-g-awk-ads}@anchor{32e}
+@anchor{gnat_rm/the_gnat_library id45}@anchor{32e}@anchor{gnat_rm/the_gnat_library gnat-awk-g-awk-ads}@anchor{32f}
@section @code{GNAT.AWK} (@code{g-awk.ads})
@@ -23520,7 +23543,7 @@ or more files containing formatted data. The file is viewed as a database
where each record is a line and a field is a data element in this line.
@node GNAT Bind_Environment g-binenv ads,GNAT Branch_Prediction g-brapre ads,GNAT AWK g-awk ads,The GNAT Library
-@anchor{gnat_rm/the_gnat_library id46}@anchor{32f}@anchor{gnat_rm/the_gnat_library gnat-bind-environment-g-binenv-ads}@anchor{330}
+@anchor{gnat_rm/the_gnat_library id46}@anchor{330}@anchor{gnat_rm/the_gnat_library gnat-bind-environment-g-binenv-ads}@anchor{331}
@section @code{GNAT.Bind_Environment} (@code{g-binenv.ads})
@@ -23533,7 +23556,7 @@ These associations can be specified using the @code{-V} binder command
line switch.
@node GNAT Branch_Prediction g-brapre ads,GNAT Bounded_Buffers g-boubuf ads,GNAT Bind_Environment g-binenv ads,The GNAT Library
-@anchor{gnat_rm/the_gnat_library id47}@anchor{331}@anchor{gnat_rm/the_gnat_library gnat-branch-prediction-g-brapre-ads}@anchor{332}
+@anchor{gnat_rm/the_gnat_library id47}@anchor{332}@anchor{gnat_rm/the_gnat_library gnat-branch-prediction-g-brapre-ads}@anchor{333}
@section @code{GNAT.Branch_Prediction} (@code{g-brapre.ads})
@@ -23544,7 +23567,7 @@ line switch.
Provides routines giving hints to the branch predictor of the code generator.
@node GNAT Bounded_Buffers g-boubuf ads,GNAT Bounded_Mailboxes g-boumai ads,GNAT Branch_Prediction g-brapre ads,The GNAT Library
-@anchor{gnat_rm/the_gnat_library gnat-bounded-buffers-g-boubuf-ads}@anchor{333}@anchor{gnat_rm/the_gnat_library id48}@anchor{334}
+@anchor{gnat_rm/the_gnat_library gnat-bounded-buffers-g-boubuf-ads}@anchor{334}@anchor{gnat_rm/the_gnat_library id48}@anchor{335}
@section @code{GNAT.Bounded_Buffers} (@code{g-boubuf.ads})
@@ -23559,7 +23582,7 @@ useful directly or as parts of the implementations of other abstractions,
such as mailboxes.
@node GNAT Bounded_Mailboxes g-boumai ads,GNAT Bubble_Sort g-bubsor ads,GNAT Bounded_Buffers g-boubuf ads,The GNAT Library
-@anchor{gnat_rm/the_gnat_library gnat-bounded-mailboxes-g-boumai-ads}@anchor{335}@anchor{gnat_rm/the_gnat_library id49}@anchor{336}
+@anchor{gnat_rm/the_gnat_library gnat-bounded-mailboxes-g-boumai-ads}@anchor{336}@anchor{gnat_rm/the_gnat_library id49}@anchor{337}
@section @code{GNAT.Bounded_Mailboxes} (@code{g-boumai.ads})
@@ -23572,7 +23595,7 @@ such as mailboxes.
Provides a thread-safe asynchronous intertask mailbox communication facility.
@node GNAT Bubble_Sort g-bubsor ads,GNAT Bubble_Sort_A g-busora ads,GNAT Bounded_Mailboxes g-boumai ads,The GNAT Library
-@anchor{gnat_rm/the_gnat_library gnat-bubble-sort-g-bubsor-ads}@anchor{337}@anchor{gnat_rm/the_gnat_library id50}@anchor{338}
+@anchor{gnat_rm/the_gnat_library gnat-bubble-sort-g-bubsor-ads}@anchor{338}@anchor{gnat_rm/the_gnat_library id50}@anchor{339}
@section @code{GNAT.Bubble_Sort} (@code{g-bubsor.ads})
@@ -23587,7 +23610,7 @@ data items. Exchange and comparison procedures are provided by passing
access-to-procedure values.
@node GNAT Bubble_Sort_A g-busora ads,GNAT Bubble_Sort_G g-busorg ads,GNAT Bubble_Sort g-bubsor ads,The GNAT Library
-@anchor{gnat_rm/the_gnat_library id51}@anchor{339}@anchor{gnat_rm/the_gnat_library gnat-bubble-sort-a-g-busora-ads}@anchor{33a}
+@anchor{gnat_rm/the_gnat_library id51}@anchor{33a}@anchor{gnat_rm/the_gnat_library gnat-bubble-sort-a-g-busora-ads}@anchor{33b}
@section @code{GNAT.Bubble_Sort_A} (@code{g-busora.ads})
@@ -23603,7 +23626,7 @@ access-to-procedure values. This is an older version, retained for
compatibility. Usually @code{GNAT.Bubble_Sort} will be preferable.
@node GNAT Bubble_Sort_G g-busorg ads,GNAT Byte_Order_Mark g-byorma ads,GNAT Bubble_Sort_A g-busora ads,The GNAT Library
-@anchor{gnat_rm/the_gnat_library gnat-bubble-sort-g-g-busorg-ads}@anchor{33b}@anchor{gnat_rm/the_gnat_library id52}@anchor{33c}
+@anchor{gnat_rm/the_gnat_library gnat-bubble-sort-g-g-busorg-ads}@anchor{33c}@anchor{gnat_rm/the_gnat_library id52}@anchor{33d}
@section @code{GNAT.Bubble_Sort_G} (@code{g-busorg.ads})
@@ -23619,7 +23642,7 @@ if the procedures can be inlined, at the expense of duplicating code for
multiple instantiations.
@node GNAT Byte_Order_Mark g-byorma ads,GNAT Byte_Swapping g-bytswa ads,GNAT Bubble_Sort_G g-busorg ads,The GNAT Library
-@anchor{gnat_rm/the_gnat_library gnat-byte-order-mark-g-byorma-ads}@anchor{33d}@anchor{gnat_rm/the_gnat_library id53}@anchor{33e}
+@anchor{gnat_rm/the_gnat_library gnat-byte-order-mark-g-byorma-ads}@anchor{33e}@anchor{gnat_rm/the_gnat_library id53}@anchor{33f}
@section @code{GNAT.Byte_Order_Mark} (@code{g-byorma.ads})
@@ -23635,7 +23658,7 @@ the encoding of the string. The routine includes detection of special XML
sequences for various UCS input formats.
@node GNAT Byte_Swapping g-bytswa ads,GNAT Calendar g-calend ads,GNAT Byte_Order_Mark g-byorma ads,The GNAT Library
-@anchor{gnat_rm/the_gnat_library gnat-byte-swapping-g-bytswa-ads}@anchor{33f}@anchor{gnat_rm/the_gnat_library id54}@anchor{340}
+@anchor{gnat_rm/the_gnat_library gnat-byte-swapping-g-bytswa-ads}@anchor{340}@anchor{gnat_rm/the_gnat_library id54}@anchor{341}
@section @code{GNAT.Byte_Swapping} (@code{g-bytswa.ads})
@@ -23649,7 +23672,7 @@ General routines for swapping the bytes in 2-, 4-, and 8-byte quantities.
Machine-specific implementations are available in some cases.
@node GNAT Calendar g-calend ads,GNAT Calendar Time_IO g-catiio ads,GNAT Byte_Swapping g-bytswa ads,The GNAT Library
-@anchor{gnat_rm/the_gnat_library id55}@anchor{341}@anchor{gnat_rm/the_gnat_library gnat-calendar-g-calend-ads}@anchor{342}
+@anchor{gnat_rm/the_gnat_library id55}@anchor{342}@anchor{gnat_rm/the_gnat_library gnat-calendar-g-calend-ads}@anchor{343}
@section @code{GNAT.Calendar} (@code{g-calend.ads})
@@ -23663,7 +23686,7 @@ Also provides conversion of @code{Ada.Calendar.Time} values to and from the
C @code{timeval} format.
@node GNAT Calendar Time_IO g-catiio ads,GNAT CRC32 g-crc32 ads,GNAT Calendar g-calend ads,The GNAT Library
-@anchor{gnat_rm/the_gnat_library id56}@anchor{343}@anchor{gnat_rm/the_gnat_library gnat-calendar-time-io-g-catiio-ads}@anchor{344}
+@anchor{gnat_rm/the_gnat_library id56}@anchor{344}@anchor{gnat_rm/the_gnat_library gnat-calendar-time-io-g-catiio-ads}@anchor{345}
@section @code{GNAT.Calendar.Time_IO} (@code{g-catiio.ads})
@@ -23674,7 +23697,7 @@ C @code{timeval} format.
@geindex GNAT.Calendar.Time_IO (g-catiio.ads)
@node GNAT CRC32 g-crc32 ads,GNAT Case_Util g-casuti ads,GNAT Calendar Time_IO g-catiio ads,The GNAT Library
-@anchor{gnat_rm/the_gnat_library id57}@anchor{345}@anchor{gnat_rm/the_gnat_library gnat-crc32-g-crc32-ads}@anchor{346}
+@anchor{gnat_rm/the_gnat_library id57}@anchor{346}@anchor{gnat_rm/the_gnat_library gnat-crc32-g-crc32-ads}@anchor{347}
@section @code{GNAT.CRC32} (@code{g-crc32.ads})
@@ -23691,7 +23714,7 @@ of this algorithm see
Aug. 1988. Sarwate, D.V.
@node GNAT Case_Util g-casuti ads,GNAT CGI g-cgi ads,GNAT CRC32 g-crc32 ads,The GNAT Library
-@anchor{gnat_rm/the_gnat_library id58}@anchor{347}@anchor{gnat_rm/the_gnat_library gnat-case-util-g-casuti-ads}@anchor{348}
+@anchor{gnat_rm/the_gnat_library id58}@anchor{348}@anchor{gnat_rm/the_gnat_library gnat-case-util-g-casuti-ads}@anchor{349}
@section @code{GNAT.Case_Util} (@code{g-casuti.ads})
@@ -23706,7 +23729,7 @@ without the overhead of the full casing tables
in @code{Ada.Characters.Handling}.
@node GNAT CGI g-cgi ads,GNAT CGI Cookie g-cgicoo ads,GNAT Case_Util g-casuti ads,The GNAT Library
-@anchor{gnat_rm/the_gnat_library id59}@anchor{349}@anchor{gnat_rm/the_gnat_library gnat-cgi-g-cgi-ads}@anchor{34a}
+@anchor{gnat_rm/the_gnat_library id59}@anchor{34a}@anchor{gnat_rm/the_gnat_library gnat-cgi-g-cgi-ads}@anchor{34b}
@section @code{GNAT.CGI} (@code{g-cgi.ads})
@@ -23721,7 +23744,7 @@ builds a table whose index is the key and provides some services to deal
with this table.
@node GNAT CGI Cookie g-cgicoo ads,GNAT CGI Debug g-cgideb ads,GNAT CGI g-cgi ads,The GNAT Library
-@anchor{gnat_rm/the_gnat_library gnat-cgi-cookie-g-cgicoo-ads}@anchor{34b}@anchor{gnat_rm/the_gnat_library id60}@anchor{34c}
+@anchor{gnat_rm/the_gnat_library gnat-cgi-cookie-g-cgicoo-ads}@anchor{34c}@anchor{gnat_rm/the_gnat_library id60}@anchor{34d}
@section @code{GNAT.CGI.Cookie} (@code{g-cgicoo.ads})
@@ -23736,7 +23759,7 @@ Common Gateway Interface (CGI). It exports services to deal with Web
cookies (piece of information kept in the Web client software).
@node GNAT CGI Debug g-cgideb ads,GNAT Command_Line g-comlin ads,GNAT CGI Cookie g-cgicoo ads,The GNAT Library
-@anchor{gnat_rm/the_gnat_library gnat-cgi-debug-g-cgideb-ads}@anchor{34d}@anchor{gnat_rm/the_gnat_library id61}@anchor{34e}
+@anchor{gnat_rm/the_gnat_library gnat-cgi-debug-g-cgideb-ads}@anchor{34e}@anchor{gnat_rm/the_gnat_library id61}@anchor{34f}
@section @code{GNAT.CGI.Debug} (@code{g-cgideb.ads})
@@ -23748,7 +23771,7 @@ This is a package to help debugging CGI (Common Gateway Interface)
programs written in Ada.
@node GNAT Command_Line g-comlin ads,GNAT Compiler_Version g-comver ads,GNAT CGI Debug g-cgideb ads,The GNAT Library
-@anchor{gnat_rm/the_gnat_library id62}@anchor{34f}@anchor{gnat_rm/the_gnat_library gnat-command-line-g-comlin-ads}@anchor{350}
+@anchor{gnat_rm/the_gnat_library id62}@anchor{350}@anchor{gnat_rm/the_gnat_library gnat-command-line-g-comlin-ads}@anchor{351}
@section @code{GNAT.Command_Line} (@code{g-comlin.ads})
@@ -23761,7 +23784,7 @@ including the ability to scan for named switches with optional parameters
and expand file names using wildcard notations.
@node GNAT Compiler_Version g-comver ads,GNAT Ctrl_C g-ctrl_c ads,GNAT Command_Line g-comlin ads,The GNAT Library
-@anchor{gnat_rm/the_gnat_library gnat-compiler-version-g-comver-ads}@anchor{351}@anchor{gnat_rm/the_gnat_library id63}@anchor{352}
+@anchor{gnat_rm/the_gnat_library gnat-compiler-version-g-comver-ads}@anchor{352}@anchor{gnat_rm/the_gnat_library id63}@anchor{353}
@section @code{GNAT.Compiler_Version} (@code{g-comver.ads})
@@ -23779,7 +23802,7 @@ of the compiler if a consistent tool set is used to compile all units
of a partition).
@node GNAT Ctrl_C g-ctrl_c ads,GNAT Current_Exception g-curexc ads,GNAT Compiler_Version g-comver ads,The GNAT Library
-@anchor{gnat_rm/the_gnat_library id64}@anchor{353}@anchor{gnat_rm/the_gnat_library gnat-ctrl-c-g-ctrl-c-ads}@anchor{354}
+@anchor{gnat_rm/the_gnat_library id64}@anchor{354}@anchor{gnat_rm/the_gnat_library gnat-ctrl-c-g-ctrl-c-ads}@anchor{355}
@section @code{GNAT.Ctrl_C} (@code{g-ctrl_c.ads})
@@ -23790,7 +23813,7 @@ of a partition).
Provides a simple interface to handle Ctrl-C keyboard events.
@node GNAT Current_Exception g-curexc ads,GNAT Debug_Pools g-debpoo ads,GNAT Ctrl_C g-ctrl_c ads,The GNAT Library
-@anchor{gnat_rm/the_gnat_library id65}@anchor{355}@anchor{gnat_rm/the_gnat_library gnat-current-exception-g-curexc-ads}@anchor{356}
+@anchor{gnat_rm/the_gnat_library id65}@anchor{356}@anchor{gnat_rm/the_gnat_library gnat-current-exception-g-curexc-ads}@anchor{357}
@section @code{GNAT.Current_Exception} (@code{g-curexc.ads})
@@ -23807,7 +23830,7 @@ This is particularly useful in simulating typical facilities for
obtaining information about exceptions provided by Ada 83 compilers.
@node GNAT Debug_Pools g-debpoo ads,GNAT Debug_Utilities g-debuti ads,GNAT Current_Exception g-curexc ads,The GNAT Library
-@anchor{gnat_rm/the_gnat_library gnat-debug-pools-g-debpoo-ads}@anchor{357}@anchor{gnat_rm/the_gnat_library id66}@anchor{358}
+@anchor{gnat_rm/the_gnat_library gnat-debug-pools-g-debpoo-ads}@anchor{358}@anchor{gnat_rm/the_gnat_library id66}@anchor{359}
@section @code{GNAT.Debug_Pools} (@code{g-debpoo.ads})
@@ -23824,7 +23847,7 @@ problems.
See @code{The GNAT Debug_Pool Facility} section in the @cite{GNAT User's Guide}.
@node GNAT Debug_Utilities g-debuti ads,GNAT Decode_String g-decstr ads,GNAT Debug_Pools g-debpoo ads,The GNAT Library
-@anchor{gnat_rm/the_gnat_library gnat-debug-utilities-g-debuti-ads}@anchor{359}@anchor{gnat_rm/the_gnat_library id67}@anchor{35a}
+@anchor{gnat_rm/the_gnat_library gnat-debug-utilities-g-debuti-ads}@anchor{35a}@anchor{gnat_rm/the_gnat_library id67}@anchor{35b}
@section @code{GNAT.Debug_Utilities} (@code{g-debuti.ads})
@@ -23837,7 +23860,7 @@ to and from string images of address values. Supports both C and Ada formats
for hexadecimal literals.
@node GNAT Decode_String g-decstr ads,GNAT Decode_UTF8_String g-deutst ads,GNAT Debug_Utilities g-debuti ads,The GNAT Library
-@anchor{gnat_rm/the_gnat_library gnat-decode-string-g-decstr-ads}@anchor{35b}@anchor{gnat_rm/the_gnat_library id68}@anchor{35c}
+@anchor{gnat_rm/the_gnat_library gnat-decode-string-g-decstr-ads}@anchor{35c}@anchor{gnat_rm/the_gnat_library id68}@anchor{35d}
@section @code{GNAT.Decode_String} (@code{g-decstr.ads})
@@ -23861,7 +23884,7 @@ Useful in conjunction with Unicode character coding. Note there is a
preinstantiation for UTF-8. See next entry.
@node GNAT Decode_UTF8_String g-deutst ads,GNAT Directory_Operations g-dirope ads,GNAT Decode_String g-decstr ads,The GNAT Library
-@anchor{gnat_rm/the_gnat_library gnat-decode-utf8-string-g-deutst-ads}@anchor{35d}@anchor{gnat_rm/the_gnat_library id69}@anchor{35e}
+@anchor{gnat_rm/the_gnat_library gnat-decode-utf8-string-g-deutst-ads}@anchor{35e}@anchor{gnat_rm/the_gnat_library id69}@anchor{35f}
@section @code{GNAT.Decode_UTF8_String} (@code{g-deutst.ads})
@@ -23882,7 +23905,7 @@ preinstantiation for UTF-8. See next entry.
A preinstantiation of GNAT.Decode_Strings for UTF-8 encoding.
@node GNAT Directory_Operations g-dirope ads,GNAT Directory_Operations Iteration g-diopit ads,GNAT Decode_UTF8_String g-deutst ads,The GNAT Library
-@anchor{gnat_rm/the_gnat_library id70}@anchor{35f}@anchor{gnat_rm/the_gnat_library gnat-directory-operations-g-dirope-ads}@anchor{360}
+@anchor{gnat_rm/the_gnat_library id70}@anchor{360}@anchor{gnat_rm/the_gnat_library gnat-directory-operations-g-dirope-ads}@anchor{361}
@section @code{GNAT.Directory_Operations} (@code{g-dirope.ads})
@@ -23895,7 +23918,7 @@ the current directory, making new directories, and scanning the files in a
directory.
@node GNAT Directory_Operations Iteration g-diopit ads,GNAT Dynamic_HTables g-dynhta ads,GNAT Directory_Operations g-dirope ads,The GNAT Library
-@anchor{gnat_rm/the_gnat_library id71}@anchor{361}@anchor{gnat_rm/the_gnat_library gnat-directory-operations-iteration-g-diopit-ads}@anchor{362}
+@anchor{gnat_rm/the_gnat_library id71}@anchor{362}@anchor{gnat_rm/the_gnat_library gnat-directory-operations-iteration-g-diopit-ads}@anchor{363}
@section @code{GNAT.Directory_Operations.Iteration} (@code{g-diopit.ads})
@@ -23907,7 +23930,7 @@ A child unit of GNAT.Directory_Operations providing additional operations
for iterating through directories.
@node GNAT Dynamic_HTables g-dynhta ads,GNAT Dynamic_Tables g-dyntab ads,GNAT Directory_Operations Iteration g-diopit ads,The GNAT Library
-@anchor{gnat_rm/the_gnat_library id72}@anchor{363}@anchor{gnat_rm/the_gnat_library gnat-dynamic-htables-g-dynhta-ads}@anchor{364}
+@anchor{gnat_rm/the_gnat_library id72}@anchor{364}@anchor{gnat_rm/the_gnat_library gnat-dynamic-htables-g-dynhta-ads}@anchor{365}
@section @code{GNAT.Dynamic_HTables} (@code{g-dynhta.ads})
@@ -23925,7 +23948,7 @@ dynamic instances of the hash table, while an instantiation of
@code{GNAT.HTable} creates a single instance of the hash table.
@node GNAT Dynamic_Tables g-dyntab ads,GNAT Encode_String g-encstr ads,GNAT Dynamic_HTables g-dynhta ads,The GNAT Library
-@anchor{gnat_rm/the_gnat_library gnat-dynamic-tables-g-dyntab-ads}@anchor{365}@anchor{gnat_rm/the_gnat_library id73}@anchor{366}
+@anchor{gnat_rm/the_gnat_library gnat-dynamic-tables-g-dyntab-ads}@anchor{366}@anchor{gnat_rm/the_gnat_library id73}@anchor{367}
@section @code{GNAT.Dynamic_Tables} (@code{g-dyntab.ads})
@@ -23945,7 +23968,7 @@ dynamic instances of the table, while an instantiation of
@code{GNAT.Table} creates a single instance of the table type.
@node GNAT Encode_String g-encstr ads,GNAT Encode_UTF8_String g-enutst ads,GNAT Dynamic_Tables g-dyntab ads,The GNAT Library
-@anchor{gnat_rm/the_gnat_library id74}@anchor{367}@anchor{gnat_rm/the_gnat_library gnat-encode-string-g-encstr-ads}@anchor{368}
+@anchor{gnat_rm/the_gnat_library id74}@anchor{368}@anchor{gnat_rm/the_gnat_library gnat-encode-string-g-encstr-ads}@anchor{369}
@section @code{GNAT.Encode_String} (@code{g-encstr.ads})
@@ -23967,7 +23990,7 @@ encoding method. Useful in conjunction with Unicode character coding.
Note there is a preinstantiation for UTF-8. See next entry.
@node GNAT Encode_UTF8_String g-enutst ads,GNAT Exception_Actions g-excact ads,GNAT Encode_String g-encstr ads,The GNAT Library
-@anchor{gnat_rm/the_gnat_library gnat-encode-utf8-string-g-enutst-ads}@anchor{369}@anchor{gnat_rm/the_gnat_library id75}@anchor{36a}
+@anchor{gnat_rm/the_gnat_library gnat-encode-utf8-string-g-enutst-ads}@anchor{36a}@anchor{gnat_rm/the_gnat_library id75}@anchor{36b}
@section @code{GNAT.Encode_UTF8_String} (@code{g-enutst.ads})
@@ -23988,7 +24011,7 @@ Note there is a preinstantiation for UTF-8. See next entry.
A preinstantiation of GNAT.Encode_Strings for UTF-8 encoding.
@node GNAT Exception_Actions g-excact ads,GNAT Exception_Traces g-exctra ads,GNAT Encode_UTF8_String g-enutst ads,The GNAT Library
-@anchor{gnat_rm/the_gnat_library gnat-exception-actions-g-excact-ads}@anchor{36b}@anchor{gnat_rm/the_gnat_library id76}@anchor{36c}
+@anchor{gnat_rm/the_gnat_library gnat-exception-actions-g-excact-ads}@anchor{36c}@anchor{gnat_rm/the_gnat_library id76}@anchor{36d}
@section @code{GNAT.Exception_Actions} (@code{g-excact.ads})
@@ -24001,7 +24024,7 @@ for specific exceptions, or when any exception is raised. This
can be used for instance to force a core dump to ease debugging.
@node GNAT Exception_Traces g-exctra ads,GNAT Exceptions g-except ads,GNAT Exception_Actions g-excact ads,The GNAT Library
-@anchor{gnat_rm/the_gnat_library gnat-exception-traces-g-exctra-ads}@anchor{36d}@anchor{gnat_rm/the_gnat_library id77}@anchor{36e}
+@anchor{gnat_rm/the_gnat_library gnat-exception-traces-g-exctra-ads}@anchor{36e}@anchor{gnat_rm/the_gnat_library id77}@anchor{36f}
@section @code{GNAT.Exception_Traces} (@code{g-exctra.ads})
@@ -24015,7 +24038,7 @@ Provides an interface allowing to control automatic output upon exception
occurrences.
@node GNAT Exceptions g-except ads,GNAT Expect g-expect ads,GNAT Exception_Traces g-exctra ads,The GNAT Library
-@anchor{gnat_rm/the_gnat_library id78}@anchor{36f}@anchor{gnat_rm/the_gnat_library gnat-exceptions-g-except-ads}@anchor{370}
+@anchor{gnat_rm/the_gnat_library id78}@anchor{370}@anchor{gnat_rm/the_gnat_library gnat-exceptions-g-except-ads}@anchor{371}
@section @code{GNAT.Exceptions} (@code{g-except.ads})
@@ -24036,7 +24059,7 @@ predefined exceptions, and for example allow raising
@code{Constraint_Error} with a message from a pure subprogram.
@node GNAT Expect g-expect ads,GNAT Expect TTY g-exptty ads,GNAT Exceptions g-except ads,The GNAT Library
-@anchor{gnat_rm/the_gnat_library id79}@anchor{371}@anchor{gnat_rm/the_gnat_library gnat-expect-g-expect-ads}@anchor{372}
+@anchor{gnat_rm/the_gnat_library id79}@anchor{372}@anchor{gnat_rm/the_gnat_library gnat-expect-g-expect-ads}@anchor{373}
@section @code{GNAT.Expect} (@code{g-expect.ads})
@@ -24052,7 +24075,7 @@ It is not implemented for cross ports, and in particular is not
implemented for VxWorks or LynxOS.
@node GNAT Expect TTY g-exptty ads,GNAT Float_Control g-flocon ads,GNAT Expect g-expect ads,The GNAT Library
-@anchor{gnat_rm/the_gnat_library id80}@anchor{373}@anchor{gnat_rm/the_gnat_library gnat-expect-tty-g-exptty-ads}@anchor{374}
+@anchor{gnat_rm/the_gnat_library id80}@anchor{374}@anchor{gnat_rm/the_gnat_library gnat-expect-tty-g-exptty-ads}@anchor{375}
@section @code{GNAT.Expect.TTY} (@code{g-exptty.ads})
@@ -24064,7 +24087,7 @@ ports. It is not implemented for cross ports, and
in particular is not implemented for VxWorks or LynxOS.
@node GNAT Float_Control g-flocon ads,GNAT Formatted_String g-forstr ads,GNAT Expect TTY g-exptty ads,The GNAT Library
-@anchor{gnat_rm/the_gnat_library id81}@anchor{375}@anchor{gnat_rm/the_gnat_library gnat-float-control-g-flocon-ads}@anchor{376}
+@anchor{gnat_rm/the_gnat_library id81}@anchor{376}@anchor{gnat_rm/the_gnat_library gnat-float-control-g-flocon-ads}@anchor{377}
@section @code{GNAT.Float_Control} (@code{g-flocon.ads})
@@ -24078,7 +24101,7 @@ library calls may cause this mode to be modified, and the Reset procedure
in this package can be used to reestablish the required mode.
@node GNAT Formatted_String g-forstr ads,GNAT Heap_Sort g-heasor ads,GNAT Float_Control g-flocon ads,The GNAT Library
-@anchor{gnat_rm/the_gnat_library id82}@anchor{377}@anchor{gnat_rm/the_gnat_library gnat-formatted-string-g-forstr-ads}@anchor{378}
+@anchor{gnat_rm/the_gnat_library id82}@anchor{378}@anchor{gnat_rm/the_gnat_library gnat-formatted-string-g-forstr-ads}@anchor{379}
@section @code{GNAT.Formatted_String} (@code{g-forstr.ads})
@@ -24093,7 +24116,7 @@ derived from Integer, Float or enumerations as values for the
formatted string.
@node GNAT Heap_Sort g-heasor ads,GNAT Heap_Sort_A g-hesora ads,GNAT Formatted_String g-forstr ads,The GNAT Library
-@anchor{gnat_rm/the_gnat_library id83}@anchor{379}@anchor{gnat_rm/the_gnat_library gnat-heap-sort-g-heasor-ads}@anchor{37a}
+@anchor{gnat_rm/the_gnat_library id83}@anchor{37a}@anchor{gnat_rm/the_gnat_library gnat-heap-sort-g-heasor-ads}@anchor{37b}
@section @code{GNAT.Heap_Sort} (@code{g-heasor.ads})
@@ -24107,7 +24130,7 @@ access-to-procedure values. The algorithm used is a modified heap sort
that performs approximately N*log(N) comparisons in the worst case.
@node GNAT Heap_Sort_A g-hesora ads,GNAT Heap_Sort_G g-hesorg ads,GNAT Heap_Sort g-heasor ads,The GNAT Library
-@anchor{gnat_rm/the_gnat_library gnat-heap-sort-a-g-hesora-ads}@anchor{37b}@anchor{gnat_rm/the_gnat_library id84}@anchor{37c}
+@anchor{gnat_rm/the_gnat_library gnat-heap-sort-a-g-hesora-ads}@anchor{37c}@anchor{gnat_rm/the_gnat_library id84}@anchor{37d}
@section @code{GNAT.Heap_Sort_A} (@code{g-hesora.ads})
@@ -24123,7 +24146,7 @@ This differs from @code{GNAT.Heap_Sort} in having a less convenient
interface, but may be slightly more efficient.
@node GNAT Heap_Sort_G g-hesorg ads,GNAT HTable g-htable ads,GNAT Heap_Sort_A g-hesora ads,The GNAT Library
-@anchor{gnat_rm/the_gnat_library id85}@anchor{37d}@anchor{gnat_rm/the_gnat_library gnat-heap-sort-g-g-hesorg-ads}@anchor{37e}
+@anchor{gnat_rm/the_gnat_library id85}@anchor{37e}@anchor{gnat_rm/the_gnat_library gnat-heap-sort-g-g-hesorg-ads}@anchor{37f}
@section @code{GNAT.Heap_Sort_G} (@code{g-hesorg.ads})
@@ -24137,7 +24160,7 @@ if the procedures can be inlined, at the expense of duplicating code for
multiple instantiations.
@node GNAT HTable g-htable ads,GNAT IO g-io ads,GNAT Heap_Sort_G g-hesorg ads,The GNAT Library
-@anchor{gnat_rm/the_gnat_library id86}@anchor{37f}@anchor{gnat_rm/the_gnat_library gnat-htable-g-htable-ads}@anchor{380}
+@anchor{gnat_rm/the_gnat_library id86}@anchor{380}@anchor{gnat_rm/the_gnat_library gnat-htable-g-htable-ads}@anchor{381}
@section @code{GNAT.HTable} (@code{g-htable.ads})
@@ -24150,7 +24173,7 @@ data. Provides two approaches, one a simple static approach, and the other
allowing arbitrary dynamic hash tables.
@node GNAT IO g-io ads,GNAT IO_Aux g-io_aux ads,GNAT HTable g-htable ads,The GNAT Library
-@anchor{gnat_rm/the_gnat_library id87}@anchor{381}@anchor{gnat_rm/the_gnat_library gnat-io-g-io-ads}@anchor{382}
+@anchor{gnat_rm/the_gnat_library id87}@anchor{382}@anchor{gnat_rm/the_gnat_library gnat-io-g-io-ads}@anchor{383}
@section @code{GNAT.IO} (@code{g-io.ads})
@@ -24166,7 +24189,7 @@ Standard_Input, and writing characters, strings and integers to either
Standard_Output or Standard_Error.
@node GNAT IO_Aux g-io_aux ads,GNAT Lock_Files g-locfil ads,GNAT IO g-io ads,The GNAT Library
-@anchor{gnat_rm/the_gnat_library id88}@anchor{383}@anchor{gnat_rm/the_gnat_library gnat-io-aux-g-io-aux-ads}@anchor{384}
+@anchor{gnat_rm/the_gnat_library id88}@anchor{384}@anchor{gnat_rm/the_gnat_library gnat-io-aux-g-io-aux-ads}@anchor{385}
@section @code{GNAT.IO_Aux} (@code{g-io_aux.ads})
@@ -24180,7 +24203,7 @@ Provides some auxiliary functions for use with Text_IO, including a test
for whether a file exists, and functions for reading a line of text.
@node GNAT Lock_Files g-locfil ads,GNAT MBBS_Discrete_Random g-mbdira ads,GNAT IO_Aux g-io_aux ads,The GNAT Library
-@anchor{gnat_rm/the_gnat_library id89}@anchor{385}@anchor{gnat_rm/the_gnat_library gnat-lock-files-g-locfil-ads}@anchor{386}
+@anchor{gnat_rm/the_gnat_library id89}@anchor{386}@anchor{gnat_rm/the_gnat_library gnat-lock-files-g-locfil-ads}@anchor{387}
@section @code{GNAT.Lock_Files} (@code{g-locfil.ads})
@@ -24194,7 +24217,7 @@ Provides a general interface for using files as locks. Can be used for
providing program level synchronization.
@node GNAT MBBS_Discrete_Random g-mbdira ads,GNAT MBBS_Float_Random g-mbflra ads,GNAT Lock_Files g-locfil ads,The GNAT Library
-@anchor{gnat_rm/the_gnat_library id90}@anchor{387}@anchor{gnat_rm/the_gnat_library gnat-mbbs-discrete-random-g-mbdira-ads}@anchor{388}
+@anchor{gnat_rm/the_gnat_library id90}@anchor{388}@anchor{gnat_rm/the_gnat_library gnat-mbbs-discrete-random-g-mbdira-ads}@anchor{389}
@section @code{GNAT.MBBS_Discrete_Random} (@code{g-mbdira.ads})
@@ -24206,7 +24229,7 @@ The original implementation of @code{Ada.Numerics.Discrete_Random}. Uses
a modified version of the Blum-Blum-Shub generator.
@node GNAT MBBS_Float_Random g-mbflra ads,GNAT MD5 g-md5 ads,GNAT MBBS_Discrete_Random g-mbdira ads,The GNAT Library
-@anchor{gnat_rm/the_gnat_library id91}@anchor{389}@anchor{gnat_rm/the_gnat_library gnat-mbbs-float-random-g-mbflra-ads}@anchor{38a}
+@anchor{gnat_rm/the_gnat_library id91}@anchor{38a}@anchor{gnat_rm/the_gnat_library gnat-mbbs-float-random-g-mbflra-ads}@anchor{38b}
@section @code{GNAT.MBBS_Float_Random} (@code{g-mbflra.ads})
@@ -24218,7 +24241,7 @@ The original implementation of @code{Ada.Numerics.Float_Random}. Uses
a modified version of the Blum-Blum-Shub generator.
@node GNAT MD5 g-md5 ads,GNAT Memory_Dump g-memdum ads,GNAT MBBS_Float_Random g-mbflra ads,The GNAT Library
-@anchor{gnat_rm/the_gnat_library id92}@anchor{38b}@anchor{gnat_rm/the_gnat_library gnat-md5-g-md5-ads}@anchor{38c}
+@anchor{gnat_rm/the_gnat_library id92}@anchor{38c}@anchor{gnat_rm/the_gnat_library gnat-md5-g-md5-ads}@anchor{38d}
@section @code{GNAT.MD5} (@code{g-md5.ads})
@@ -24231,7 +24254,7 @@ the HMAC-MD5 message authentication function as described in RFC 2104 and
FIPS PUB 198.
@node GNAT Memory_Dump g-memdum ads,GNAT Most_Recent_Exception g-moreex ads,GNAT MD5 g-md5 ads,The GNAT Library
-@anchor{gnat_rm/the_gnat_library id93}@anchor{38d}@anchor{gnat_rm/the_gnat_library gnat-memory-dump-g-memdum-ads}@anchor{38e}
+@anchor{gnat_rm/the_gnat_library id93}@anchor{38e}@anchor{gnat_rm/the_gnat_library gnat-memory-dump-g-memdum-ads}@anchor{38f}
@section @code{GNAT.Memory_Dump} (@code{g-memdum.ads})
@@ -24244,7 +24267,7 @@ standard output or standard error files. Uses GNAT.IO for actual
output.
@node GNAT Most_Recent_Exception g-moreex ads,GNAT OS_Lib g-os_lib ads,GNAT Memory_Dump g-memdum ads,The GNAT Library
-@anchor{gnat_rm/the_gnat_library gnat-most-recent-exception-g-moreex-ads}@anchor{38f}@anchor{gnat_rm/the_gnat_library id94}@anchor{390}
+@anchor{gnat_rm/the_gnat_library gnat-most-recent-exception-g-moreex-ads}@anchor{390}@anchor{gnat_rm/the_gnat_library id94}@anchor{391}
@section @code{GNAT.Most_Recent_Exception} (@code{g-moreex.ads})
@@ -24258,7 +24281,7 @@ various logging purposes, including duplicating functionality of some
Ada 83 implementation dependent extensions.
@node GNAT OS_Lib g-os_lib ads,GNAT Perfect_Hash_Generators g-pehage ads,GNAT Most_Recent_Exception g-moreex ads,The GNAT Library
-@anchor{gnat_rm/the_gnat_library gnat-os-lib-g-os-lib-ads}@anchor{391}@anchor{gnat_rm/the_gnat_library id95}@anchor{392}
+@anchor{gnat_rm/the_gnat_library gnat-os-lib-g-os-lib-ads}@anchor{392}@anchor{gnat_rm/the_gnat_library id95}@anchor{393}
@section @code{GNAT.OS_Lib} (@code{g-os_lib.ads})
@@ -24274,7 +24297,7 @@ including a portable spawn procedure, and access to environment variables
and error return codes.
@node GNAT Perfect_Hash_Generators g-pehage ads,GNAT Random_Numbers g-rannum ads,GNAT OS_Lib g-os_lib ads,The GNAT Library
-@anchor{gnat_rm/the_gnat_library gnat-perfect-hash-generators-g-pehage-ads}@anchor{393}@anchor{gnat_rm/the_gnat_library id96}@anchor{394}
+@anchor{gnat_rm/the_gnat_library gnat-perfect-hash-generators-g-pehage-ads}@anchor{394}@anchor{gnat_rm/the_gnat_library id96}@anchor{395}
@section @code{GNAT.Perfect_Hash_Generators} (@code{g-pehage.ads})
@@ -24292,7 +24315,7 @@ hashcode are in the same order. These hashing functions are very
convenient for use with realtime applications.
@node GNAT Random_Numbers g-rannum ads,GNAT Regexp g-regexp ads,GNAT Perfect_Hash_Generators g-pehage ads,The GNAT Library
-@anchor{gnat_rm/the_gnat_library gnat-random-numbers-g-rannum-ads}@anchor{395}@anchor{gnat_rm/the_gnat_library id97}@anchor{396}
+@anchor{gnat_rm/the_gnat_library gnat-random-numbers-g-rannum-ads}@anchor{396}@anchor{gnat_rm/the_gnat_library id97}@anchor{397}
@section @code{GNAT.Random_Numbers} (@code{g-rannum.ads})
@@ -24304,7 +24327,7 @@ Provides random number capabilities which extend those available in the
standard Ada library and are more convenient to use.
@node GNAT Regexp g-regexp ads,GNAT Registry g-regist ads,GNAT Random_Numbers g-rannum ads,The GNAT Library
-@anchor{gnat_rm/the_gnat_library id98}@anchor{397}@anchor{gnat_rm/the_gnat_library gnat-regexp-g-regexp-ads}@anchor{25c}
+@anchor{gnat_rm/the_gnat_library id98}@anchor{398}@anchor{gnat_rm/the_gnat_library gnat-regexp-g-regexp-ads}@anchor{25d}
@section @code{GNAT.Regexp} (@code{g-regexp.ads})
@@ -24320,7 +24343,7 @@ simplest of the three pattern matching packages provided, and is particularly
suitable for 'file globbing' applications.
@node GNAT Registry g-regist ads,GNAT Regpat g-regpat ads,GNAT Regexp g-regexp ads,The GNAT Library
-@anchor{gnat_rm/the_gnat_library id99}@anchor{398}@anchor{gnat_rm/the_gnat_library gnat-registry-g-regist-ads}@anchor{399}
+@anchor{gnat_rm/the_gnat_library id99}@anchor{399}@anchor{gnat_rm/the_gnat_library gnat-registry-g-regist-ads}@anchor{39a}
@section @code{GNAT.Registry} (@code{g-regist.ads})
@@ -24334,7 +24357,7 @@ registry API, but at a lower level of abstraction, refer to the Win32.Winreg
package provided with the Win32Ada binding
@node GNAT Regpat g-regpat ads,GNAT Rewrite_Data g-rewdat ads,GNAT Registry g-regist ads,The GNAT Library
-@anchor{gnat_rm/the_gnat_library id100}@anchor{39a}@anchor{gnat_rm/the_gnat_library gnat-regpat-g-regpat-ads}@anchor{39b}
+@anchor{gnat_rm/the_gnat_library id100}@anchor{39b}@anchor{gnat_rm/the_gnat_library gnat-regpat-g-regpat-ads}@anchor{39c}
@section @code{GNAT.Regpat} (@code{g-regpat.ads})
@@ -24349,7 +24372,7 @@ from the original V7 style regular expression library written in C by
Henry Spencer (and binary compatible with this C library).
@node GNAT Rewrite_Data g-rewdat ads,GNAT Secondary_Stack_Info g-sestin ads,GNAT Regpat g-regpat ads,The GNAT Library
-@anchor{gnat_rm/the_gnat_library id101}@anchor{39c}@anchor{gnat_rm/the_gnat_library gnat-rewrite-data-g-rewdat-ads}@anchor{39d}
+@anchor{gnat_rm/the_gnat_library id101}@anchor{39d}@anchor{gnat_rm/the_gnat_library gnat-rewrite-data-g-rewdat-ads}@anchor{39e}
@section @code{GNAT.Rewrite_Data} (@code{g-rewdat.ads})
@@ -24363,7 +24386,7 @@ full content to be processed is not loaded into memory all at once. This makes
this interface usable for large files or socket streams.
@node GNAT Secondary_Stack_Info g-sestin ads,GNAT Semaphores g-semaph ads,GNAT Rewrite_Data g-rewdat ads,The GNAT Library
-@anchor{gnat_rm/the_gnat_library gnat-secondary-stack-info-g-sestin-ads}@anchor{39e}@anchor{gnat_rm/the_gnat_library id102}@anchor{39f}
+@anchor{gnat_rm/the_gnat_library gnat-secondary-stack-info-g-sestin-ads}@anchor{39f}@anchor{gnat_rm/the_gnat_library id102}@anchor{3a0}
@section @code{GNAT.Secondary_Stack_Info} (@code{g-sestin.ads})
@@ -24375,7 +24398,7 @@ Provide the capability to query the high water mark of the current task's
secondary stack.
@node GNAT Semaphores g-semaph ads,GNAT Serial_Communications g-sercom ads,GNAT Secondary_Stack_Info g-sestin ads,The GNAT Library
-@anchor{gnat_rm/the_gnat_library id103}@anchor{3a0}@anchor{gnat_rm/the_gnat_library gnat-semaphores-g-semaph-ads}@anchor{3a1}
+@anchor{gnat_rm/the_gnat_library id103}@anchor{3a1}@anchor{gnat_rm/the_gnat_library gnat-semaphores-g-semaph-ads}@anchor{3a2}
@section @code{GNAT.Semaphores} (@code{g-semaph.ads})
@@ -24386,7 +24409,7 @@ secondary stack.
Provides classic counting and binary semaphores using protected types.
@node GNAT Serial_Communications g-sercom ads,GNAT SHA1 g-sha1 ads,GNAT Semaphores g-semaph ads,The GNAT Library
-@anchor{gnat_rm/the_gnat_library gnat-serial-communications-g-sercom-ads}@anchor{3a2}@anchor{gnat_rm/the_gnat_library id104}@anchor{3a3}
+@anchor{gnat_rm/the_gnat_library gnat-serial-communications-g-sercom-ads}@anchor{3a3}@anchor{gnat_rm/the_gnat_library id104}@anchor{3a4}
@section @code{GNAT.Serial_Communications} (@code{g-sercom.ads})
@@ -24398,7 +24421,7 @@ Provides a simple interface to send and receive data over a serial
port. This is only supported on GNU/Linux and Windows.
@node GNAT SHA1 g-sha1 ads,GNAT SHA224 g-sha224 ads,GNAT Serial_Communications g-sercom ads,The GNAT Library
-@anchor{gnat_rm/the_gnat_library gnat-sha1-g-sha1-ads}@anchor{3a4}@anchor{gnat_rm/the_gnat_library id105}@anchor{3a5}
+@anchor{gnat_rm/the_gnat_library gnat-sha1-g-sha1-ads}@anchor{3a5}@anchor{gnat_rm/the_gnat_library id105}@anchor{3a6}
@section @code{GNAT.SHA1} (@code{g-sha1.ads})
@@ -24411,7 +24434,7 @@ and RFC 3174, and the HMAC-SHA1 message authentication function as described
in RFC 2104 and FIPS PUB 198.
@node GNAT SHA224 g-sha224 ads,GNAT SHA256 g-sha256 ads,GNAT SHA1 g-sha1 ads,The GNAT Library
-@anchor{gnat_rm/the_gnat_library gnat-sha224-g-sha224-ads}@anchor{3a6}@anchor{gnat_rm/the_gnat_library id106}@anchor{3a7}
+@anchor{gnat_rm/the_gnat_library gnat-sha224-g-sha224-ads}@anchor{3a7}@anchor{gnat_rm/the_gnat_library id106}@anchor{3a8}
@section @code{GNAT.SHA224} (@code{g-sha224.ads})
@@ -24424,7 +24447,7 @@ and the HMAC-SHA224 message authentication function as described
in RFC 2104 and FIPS PUB 198.
@node GNAT SHA256 g-sha256 ads,GNAT SHA384 g-sha384 ads,GNAT SHA224 g-sha224 ads,The GNAT Library
-@anchor{gnat_rm/the_gnat_library gnat-sha256-g-sha256-ads}@anchor{3a8}@anchor{gnat_rm/the_gnat_library id107}@anchor{3a9}
+@anchor{gnat_rm/the_gnat_library gnat-sha256-g-sha256-ads}@anchor{3a9}@anchor{gnat_rm/the_gnat_library id107}@anchor{3aa}
@section @code{GNAT.SHA256} (@code{g-sha256.ads})
@@ -24437,7 +24460,7 @@ and the HMAC-SHA256 message authentication function as described
in RFC 2104 and FIPS PUB 198.
@node GNAT SHA384 g-sha384 ads,GNAT SHA512 g-sha512 ads,GNAT SHA256 g-sha256 ads,The GNAT Library
-@anchor{gnat_rm/the_gnat_library id108}@anchor{3aa}@anchor{gnat_rm/the_gnat_library gnat-sha384-g-sha384-ads}@anchor{3ab}
+@anchor{gnat_rm/the_gnat_library id108}@anchor{3ab}@anchor{gnat_rm/the_gnat_library gnat-sha384-g-sha384-ads}@anchor{3ac}
@section @code{GNAT.SHA384} (@code{g-sha384.ads})
@@ -24450,7 +24473,7 @@ and the HMAC-SHA384 message authentication function as described
in RFC 2104 and FIPS PUB 198.
@node GNAT SHA512 g-sha512 ads,GNAT Signals g-signal ads,GNAT SHA384 g-sha384 ads,The GNAT Library
-@anchor{gnat_rm/the_gnat_library id109}@anchor{3ac}@anchor{gnat_rm/the_gnat_library gnat-sha512-g-sha512-ads}@anchor{3ad}
+@anchor{gnat_rm/the_gnat_library id109}@anchor{3ad}@anchor{gnat_rm/the_gnat_library gnat-sha512-g-sha512-ads}@anchor{3ae}
@section @code{GNAT.SHA512} (@code{g-sha512.ads})
@@ -24463,7 +24486,7 @@ and the HMAC-SHA512 message authentication function as described
in RFC 2104 and FIPS PUB 198.
@node GNAT Signals g-signal ads,GNAT Sockets g-socket ads,GNAT SHA512 g-sha512 ads,The GNAT Library
-@anchor{gnat_rm/the_gnat_library gnat-signals-g-signal-ads}@anchor{3ae}@anchor{gnat_rm/the_gnat_library id110}@anchor{3af}
+@anchor{gnat_rm/the_gnat_library gnat-signals-g-signal-ads}@anchor{3af}@anchor{gnat_rm/the_gnat_library id110}@anchor{3b0}
@section @code{GNAT.Signals} (@code{g-signal.ads})
@@ -24475,7 +24498,7 @@ Provides the ability to manipulate the blocked status of signals on supported
targets.
@node GNAT Sockets g-socket ads,GNAT Source_Info g-souinf ads,GNAT Signals g-signal ads,The GNAT Library
-@anchor{gnat_rm/the_gnat_library gnat-sockets-g-socket-ads}@anchor{3b0}@anchor{gnat_rm/the_gnat_library id111}@anchor{3b1}
+@anchor{gnat_rm/the_gnat_library gnat-sockets-g-socket-ads}@anchor{3b1}@anchor{gnat_rm/the_gnat_library id111}@anchor{3b2}
@section @code{GNAT.Sockets} (@code{g-socket.ads})
@@ -24490,7 +24513,7 @@ on all native GNAT ports and on VxWorks cross prots. It is not implemented for
the LynxOS cross port.
@node GNAT Source_Info g-souinf ads,GNAT Spelling_Checker g-speche ads,GNAT Sockets g-socket ads,The GNAT Library
-@anchor{gnat_rm/the_gnat_library gnat-source-info-g-souinf-ads}@anchor{3b2}@anchor{gnat_rm/the_gnat_library id112}@anchor{3b3}
+@anchor{gnat_rm/the_gnat_library gnat-source-info-g-souinf-ads}@anchor{3b3}@anchor{gnat_rm/the_gnat_library id112}@anchor{3b4}
@section @code{GNAT.Source_Info} (@code{g-souinf.ads})
@@ -24504,7 +24527,7 @@ subprograms yielding the date and time of the current compilation (like the
C macros @code{__DATE__} and @code{__TIME__})
@node GNAT Spelling_Checker g-speche ads,GNAT Spelling_Checker_Generic g-spchge ads,GNAT Source_Info g-souinf ads,The GNAT Library
-@anchor{gnat_rm/the_gnat_library gnat-spelling-checker-g-speche-ads}@anchor{3b4}@anchor{gnat_rm/the_gnat_library id113}@anchor{3b5}
+@anchor{gnat_rm/the_gnat_library gnat-spelling-checker-g-speche-ads}@anchor{3b5}@anchor{gnat_rm/the_gnat_library id113}@anchor{3b6}
@section @code{GNAT.Spelling_Checker} (@code{g-speche.ads})
@@ -24516,7 +24539,7 @@ Provides a function for determining whether one string is a plausible
near misspelling of another string.
@node GNAT Spelling_Checker_Generic g-spchge ads,GNAT Spitbol Patterns g-spipat ads,GNAT Spelling_Checker g-speche ads,The GNAT Library
-@anchor{gnat_rm/the_gnat_library gnat-spelling-checker-generic-g-spchge-ads}@anchor{3b6}@anchor{gnat_rm/the_gnat_library id114}@anchor{3b7}
+@anchor{gnat_rm/the_gnat_library gnat-spelling-checker-generic-g-spchge-ads}@anchor{3b7}@anchor{gnat_rm/the_gnat_library id114}@anchor{3b8}
@section @code{GNAT.Spelling_Checker_Generic} (@code{g-spchge.ads})
@@ -24529,7 +24552,7 @@ determining whether one string is a plausible near misspelling of another
string.
@node GNAT Spitbol Patterns g-spipat ads,GNAT Spitbol g-spitbo ads,GNAT Spelling_Checker_Generic g-spchge ads,The GNAT Library
-@anchor{gnat_rm/the_gnat_library gnat-spitbol-patterns-g-spipat-ads}@anchor{3b8}@anchor{gnat_rm/the_gnat_library id115}@anchor{3b9}
+@anchor{gnat_rm/the_gnat_library gnat-spitbol-patterns-g-spipat-ads}@anchor{3b9}@anchor{gnat_rm/the_gnat_library id115}@anchor{3ba}
@section @code{GNAT.Spitbol.Patterns} (@code{g-spipat.ads})
@@ -24545,7 +24568,7 @@ the SNOBOL4 dynamic pattern construction and matching capabilities, using the
efficient algorithm developed by Robert Dewar for the SPITBOL system.
@node GNAT Spitbol g-spitbo ads,GNAT Spitbol Table_Boolean g-sptabo ads,GNAT Spitbol Patterns g-spipat ads,The GNAT Library
-@anchor{gnat_rm/the_gnat_library id116}@anchor{3ba}@anchor{gnat_rm/the_gnat_library gnat-spitbol-g-spitbo-ads}@anchor{3bb}
+@anchor{gnat_rm/the_gnat_library id116}@anchor{3bb}@anchor{gnat_rm/the_gnat_library gnat-spitbol-g-spitbo-ads}@anchor{3bc}
@section @code{GNAT.Spitbol} (@code{g-spitbo.ads})
@@ -24560,7 +24583,7 @@ useful for constructing arbitrary mappings from strings in the style of
the SNOBOL4 TABLE function.
@node GNAT Spitbol Table_Boolean g-sptabo ads,GNAT Spitbol Table_Integer g-sptain ads,GNAT Spitbol g-spitbo ads,The GNAT Library
-@anchor{gnat_rm/the_gnat_library gnat-spitbol-table-boolean-g-sptabo-ads}@anchor{3bc}@anchor{gnat_rm/the_gnat_library id117}@anchor{3bd}
+@anchor{gnat_rm/the_gnat_library gnat-spitbol-table-boolean-g-sptabo-ads}@anchor{3bd}@anchor{gnat_rm/the_gnat_library id117}@anchor{3be}
@section @code{GNAT.Spitbol.Table_Boolean} (@code{g-sptabo.ads})
@@ -24575,7 +24598,7 @@ for type @code{Standard.Boolean}, giving an implementation of sets of
string values.
@node GNAT Spitbol Table_Integer g-sptain ads,GNAT Spitbol Table_VString g-sptavs ads,GNAT Spitbol Table_Boolean g-sptabo ads,The GNAT Library
-@anchor{gnat_rm/the_gnat_library gnat-spitbol-table-integer-g-sptain-ads}@anchor{3be}@anchor{gnat_rm/the_gnat_library id118}@anchor{3bf}
+@anchor{gnat_rm/the_gnat_library gnat-spitbol-table-integer-g-sptain-ads}@anchor{3bf}@anchor{gnat_rm/the_gnat_library id118}@anchor{3c0}
@section @code{GNAT.Spitbol.Table_Integer} (@code{g-sptain.ads})
@@ -24592,7 +24615,7 @@ for type @code{Standard.Integer}, giving an implementation of maps
from string to integer values.
@node GNAT Spitbol Table_VString g-sptavs ads,GNAT SSE g-sse ads,GNAT Spitbol Table_Integer g-sptain ads,The GNAT Library
-@anchor{gnat_rm/the_gnat_library id119}@anchor{3c0}@anchor{gnat_rm/the_gnat_library gnat-spitbol-table-vstring-g-sptavs-ads}@anchor{3c1}
+@anchor{gnat_rm/the_gnat_library id119}@anchor{3c1}@anchor{gnat_rm/the_gnat_library gnat-spitbol-table-vstring-g-sptavs-ads}@anchor{3c2}
@section @code{GNAT.Spitbol.Table_VString} (@code{g-sptavs.ads})
@@ -24609,7 +24632,7 @@ a variable length string type, giving an implementation of general
maps from strings to strings.
@node GNAT SSE g-sse ads,GNAT SSE Vector_Types g-ssvety ads,GNAT Spitbol Table_VString g-sptavs ads,The GNAT Library
-@anchor{gnat_rm/the_gnat_library id120}@anchor{3c2}@anchor{gnat_rm/the_gnat_library gnat-sse-g-sse-ads}@anchor{3c3}
+@anchor{gnat_rm/the_gnat_library id120}@anchor{3c3}@anchor{gnat_rm/the_gnat_library gnat-sse-g-sse-ads}@anchor{3c4}
@section @code{GNAT.SSE} (@code{g-sse.ads})
@@ -24621,7 +24644,7 @@ targets. It exposes vector component types together with a general
introduction to the binding contents and use.
@node GNAT SSE Vector_Types g-ssvety ads,GNAT String_Hash g-strhas ads,GNAT SSE g-sse ads,The GNAT Library
-@anchor{gnat_rm/the_gnat_library gnat-sse-vector-types-g-ssvety-ads}@anchor{3c4}@anchor{gnat_rm/the_gnat_library id121}@anchor{3c5}
+@anchor{gnat_rm/the_gnat_library gnat-sse-vector-types-g-ssvety-ads}@anchor{3c5}@anchor{gnat_rm/the_gnat_library id121}@anchor{3c6}
@section @code{GNAT.SSE.Vector_Types} (@code{g-ssvety.ads})
@@ -24630,7 +24653,7 @@ introduction to the binding contents and use.
SSE vector types for use with SSE related intrinsics.
@node GNAT String_Hash g-strhas ads,GNAT Strings g-string ads,GNAT SSE Vector_Types g-ssvety ads,The GNAT Library
-@anchor{gnat_rm/the_gnat_library gnat-string-hash-g-strhas-ads}@anchor{3c6}@anchor{gnat_rm/the_gnat_library id122}@anchor{3c7}
+@anchor{gnat_rm/the_gnat_library gnat-string-hash-g-strhas-ads}@anchor{3c7}@anchor{gnat_rm/the_gnat_library id122}@anchor{3c8}
@section @code{GNAT.String_Hash} (@code{g-strhas.ads})
@@ -24642,7 +24665,7 @@ Provides a generic hash function working on arrays of scalars. Both the scalar
type and the hash result type are parameters.
@node GNAT Strings g-string ads,GNAT String_Split g-strspl ads,GNAT String_Hash g-strhas ads,The GNAT Library
-@anchor{gnat_rm/the_gnat_library id123}@anchor{3c8}@anchor{gnat_rm/the_gnat_library gnat-strings-g-string-ads}@anchor{3c9}
+@anchor{gnat_rm/the_gnat_library id123}@anchor{3c9}@anchor{gnat_rm/the_gnat_library gnat-strings-g-string-ads}@anchor{3ca}
@section @code{GNAT.Strings} (@code{g-string.ads})
@@ -24652,7 +24675,7 @@ Common String access types and related subprograms. Basically it
defines a string access and an array of string access types.
@node GNAT String_Split g-strspl ads,GNAT Table g-table ads,GNAT Strings g-string ads,The GNAT Library
-@anchor{gnat_rm/the_gnat_library gnat-string-split-g-strspl-ads}@anchor{3ca}@anchor{gnat_rm/the_gnat_library id124}@anchor{3cb}
+@anchor{gnat_rm/the_gnat_library gnat-string-split-g-strspl-ads}@anchor{3cb}@anchor{gnat_rm/the_gnat_library id124}@anchor{3cc}
@section @code{GNAT.String_Split} (@code{g-strspl.ads})
@@ -24666,7 +24689,7 @@ to the resulting slices. This package is instantiated from
@code{GNAT.Array_Split}.
@node GNAT Table g-table ads,GNAT Task_Lock g-tasloc ads,GNAT String_Split g-strspl ads,The GNAT Library
-@anchor{gnat_rm/the_gnat_library id125}@anchor{3cc}@anchor{gnat_rm/the_gnat_library gnat-table-g-table-ads}@anchor{3cd}
+@anchor{gnat_rm/the_gnat_library id125}@anchor{3cd}@anchor{gnat_rm/the_gnat_library gnat-table-g-table-ads}@anchor{3ce}
@section @code{GNAT.Table} (@code{g-table.ads})
@@ -24686,7 +24709,7 @@ while an instantiation of @code{GNAT.Dynamic_Tables} creates a type that can be
used to define dynamic instances of the table.
@node GNAT Task_Lock g-tasloc ads,GNAT Time_Stamp g-timsta ads,GNAT Table g-table ads,The GNAT Library
-@anchor{gnat_rm/the_gnat_library id126}@anchor{3ce}@anchor{gnat_rm/the_gnat_library gnat-task-lock-g-tasloc-ads}@anchor{3cf}
+@anchor{gnat_rm/the_gnat_library id126}@anchor{3cf}@anchor{gnat_rm/the_gnat_library gnat-task-lock-g-tasloc-ads}@anchor{3d0}
@section @code{GNAT.Task_Lock} (@code{g-tasloc.ads})
@@ -24703,7 +24726,7 @@ single global task lock. Appropriate for use in situations where contention
between tasks is very rarely expected.
@node GNAT Time_Stamp g-timsta ads,GNAT Threads g-thread ads,GNAT Task_Lock g-tasloc ads,The GNAT Library
-@anchor{gnat_rm/the_gnat_library id127}@anchor{3d0}@anchor{gnat_rm/the_gnat_library gnat-time-stamp-g-timsta-ads}@anchor{3d1}
+@anchor{gnat_rm/the_gnat_library id127}@anchor{3d1}@anchor{gnat_rm/the_gnat_library gnat-time-stamp-g-timsta-ads}@anchor{3d2}
@section @code{GNAT.Time_Stamp} (@code{g-timsta.ads})
@@ -24718,7 +24741,7 @@ represents the current date and time in ISO 8601 format. This is a very simple
routine with minimal code and there are no dependencies on any other unit.
@node GNAT Threads g-thread ads,GNAT Traceback g-traceb ads,GNAT Time_Stamp g-timsta ads,The GNAT Library
-@anchor{gnat_rm/the_gnat_library gnat-threads-g-thread-ads}@anchor{3d2}@anchor{gnat_rm/the_gnat_library id128}@anchor{3d3}
+@anchor{gnat_rm/the_gnat_library gnat-threads-g-thread-ads}@anchor{3d3}@anchor{gnat_rm/the_gnat_library id128}@anchor{3d4}
@section @code{GNAT.Threads} (@code{g-thread.ads})
@@ -24735,7 +24758,7 @@ further details if your program has threads that are created by a non-Ada
environment which then accesses Ada code.
@node GNAT Traceback g-traceb ads,GNAT Traceback Symbolic g-trasym ads,GNAT Threads g-thread ads,The GNAT Library
-@anchor{gnat_rm/the_gnat_library id129}@anchor{3d4}@anchor{gnat_rm/the_gnat_library gnat-traceback-g-traceb-ads}@anchor{3d5}
+@anchor{gnat_rm/the_gnat_library id129}@anchor{3d5}@anchor{gnat_rm/the_gnat_library gnat-traceback-g-traceb-ads}@anchor{3d6}
@section @code{GNAT.Traceback} (@code{g-traceb.ads})
@@ -24747,7 +24770,7 @@ Provides a facility for obtaining non-symbolic traceback information, useful
in various debugging situations.
@node GNAT Traceback Symbolic g-trasym ads,GNAT UTF_32 g-table ads,GNAT Traceback g-traceb ads,The GNAT Library
-@anchor{gnat_rm/the_gnat_library id130}@anchor{3d6}@anchor{gnat_rm/the_gnat_library gnat-traceback-symbolic-g-trasym-ads}@anchor{3d7}
+@anchor{gnat_rm/the_gnat_library id130}@anchor{3d7}@anchor{gnat_rm/the_gnat_library gnat-traceback-symbolic-g-trasym-ads}@anchor{3d8}
@section @code{GNAT.Traceback.Symbolic} (@code{g-trasym.ads})
@@ -24756,7 +24779,7 @@ in various debugging situations.
@geindex Trace back facilities
@node GNAT UTF_32 g-table ads,GNAT Wide_Spelling_Checker g-u3spch ads,GNAT Traceback Symbolic g-trasym ads,The GNAT Library
-@anchor{gnat_rm/the_gnat_library id131}@anchor{3d8}@anchor{gnat_rm/the_gnat_library gnat-utf-32-g-table-ads}@anchor{3d9}
+@anchor{gnat_rm/the_gnat_library id131}@anchor{3d9}@anchor{gnat_rm/the_gnat_library gnat-utf-32-g-table-ads}@anchor{3da}
@section @code{GNAT.UTF_32} (@code{g-table.ads})
@@ -24775,7 +24798,7 @@ lower case to upper case fold routine corresponding to
the Ada 2005 rules for identifier equivalence.
@node GNAT Wide_Spelling_Checker g-u3spch ads,GNAT Wide_Spelling_Checker g-wispch ads,GNAT UTF_32 g-table ads,The GNAT Library
-@anchor{gnat_rm/the_gnat_library gnat-wide-spelling-checker-g-u3spch-ads}@anchor{3da}@anchor{gnat_rm/the_gnat_library id132}@anchor{3db}
+@anchor{gnat_rm/the_gnat_library gnat-wide-spelling-checker-g-u3spch-ads}@anchor{3db}@anchor{gnat_rm/the_gnat_library id132}@anchor{3dc}
@section @code{GNAT.Wide_Spelling_Checker} (@code{g-u3spch.ads})
@@ -24788,7 +24811,7 @@ near misspelling of another wide wide string, where the strings are represented
using the UTF_32_String type defined in System.Wch_Cnv.
@node GNAT Wide_Spelling_Checker g-wispch ads,GNAT Wide_String_Split g-wistsp ads,GNAT Wide_Spelling_Checker g-u3spch ads,The GNAT Library
-@anchor{gnat_rm/the_gnat_library gnat-wide-spelling-checker-g-wispch-ads}@anchor{3dc}@anchor{gnat_rm/the_gnat_library id133}@anchor{3dd}
+@anchor{gnat_rm/the_gnat_library gnat-wide-spelling-checker-g-wispch-ads}@anchor{3dd}@anchor{gnat_rm/the_gnat_library id133}@anchor{3de}
@section @code{GNAT.Wide_Spelling_Checker} (@code{g-wispch.ads})
@@ -24800,7 +24823,7 @@ Provides a function for determining whether one wide string is a plausible
near misspelling of another wide string.
@node GNAT Wide_String_Split g-wistsp ads,GNAT Wide_Wide_Spelling_Checker g-zspche ads,GNAT Wide_Spelling_Checker g-wispch ads,The GNAT Library
-@anchor{gnat_rm/the_gnat_library id134}@anchor{3de}@anchor{gnat_rm/the_gnat_library gnat-wide-string-split-g-wistsp-ads}@anchor{3df}
+@anchor{gnat_rm/the_gnat_library id134}@anchor{3df}@anchor{gnat_rm/the_gnat_library gnat-wide-string-split-g-wistsp-ads}@anchor{3e0}
@section @code{GNAT.Wide_String_Split} (@code{g-wistsp.ads})
@@ -24814,7 +24837,7 @@ to the resulting slices. This package is instantiated from
@code{GNAT.Array_Split}.
@node GNAT Wide_Wide_Spelling_Checker g-zspche ads,GNAT Wide_Wide_String_Split g-zistsp ads,GNAT Wide_String_Split g-wistsp ads,The GNAT Library
-@anchor{gnat_rm/the_gnat_library gnat-wide-wide-spelling-checker-g-zspche-ads}@anchor{3e0}@anchor{gnat_rm/the_gnat_library id135}@anchor{3e1}
+@anchor{gnat_rm/the_gnat_library gnat-wide-wide-spelling-checker-g-zspche-ads}@anchor{3e1}@anchor{gnat_rm/the_gnat_library id135}@anchor{3e2}
@section @code{GNAT.Wide_Wide_Spelling_Checker} (@code{g-zspche.ads})
@@ -24826,7 +24849,7 @@ Provides a function for determining whether one wide wide string is a plausible
near misspelling of another wide wide string.
@node GNAT Wide_Wide_String_Split g-zistsp ads,Interfaces C Extensions i-cexten ads,GNAT Wide_Wide_Spelling_Checker g-zspche ads,The GNAT Library
-@anchor{gnat_rm/the_gnat_library gnat-wide-wide-string-split-g-zistsp-ads}@anchor{3e2}@anchor{gnat_rm/the_gnat_library id136}@anchor{3e3}
+@anchor{gnat_rm/the_gnat_library gnat-wide-wide-string-split-g-zistsp-ads}@anchor{3e3}@anchor{gnat_rm/the_gnat_library id136}@anchor{3e4}
@section @code{GNAT.Wide_Wide_String_Split} (@code{g-zistsp.ads})
@@ -24840,7 +24863,7 @@ to the resulting slices. This package is instantiated from
@code{GNAT.Array_Split}.
@node Interfaces C Extensions i-cexten ads,Interfaces C Streams i-cstrea ads,GNAT Wide_Wide_String_Split g-zistsp ads,The GNAT Library
-@anchor{gnat_rm/the_gnat_library interfaces-c-extensions-i-cexten-ads}@anchor{3e4}@anchor{gnat_rm/the_gnat_library id137}@anchor{3e5}
+@anchor{gnat_rm/the_gnat_library interfaces-c-extensions-i-cexten-ads}@anchor{3e5}@anchor{gnat_rm/the_gnat_library id137}@anchor{3e6}
@section @code{Interfaces.C.Extensions} (@code{i-cexten.ads})
@@ -24851,7 +24874,7 @@ for use with either manually or automatically generated bindings
to C libraries.
@node Interfaces C Streams i-cstrea ads,Interfaces Packed_Decimal i-pacdec ads,Interfaces C Extensions i-cexten ads,The GNAT Library
-@anchor{gnat_rm/the_gnat_library id138}@anchor{3e6}@anchor{gnat_rm/the_gnat_library interfaces-c-streams-i-cstrea-ads}@anchor{3e7}
+@anchor{gnat_rm/the_gnat_library id138}@anchor{3e7}@anchor{gnat_rm/the_gnat_library interfaces-c-streams-i-cstrea-ads}@anchor{3e8}
@section @code{Interfaces.C.Streams} (@code{i-cstrea.ads})
@@ -24864,7 +24887,7 @@ This package is a binding for the most commonly used operations
on C streams.
@node Interfaces Packed_Decimal i-pacdec ads,Interfaces VxWorks i-vxwork ads,Interfaces C Streams i-cstrea ads,The GNAT Library
-@anchor{gnat_rm/the_gnat_library interfaces-packed-decimal-i-pacdec-ads}@anchor{3e8}@anchor{gnat_rm/the_gnat_library id139}@anchor{3e9}
+@anchor{gnat_rm/the_gnat_library interfaces-packed-decimal-i-pacdec-ads}@anchor{3e9}@anchor{gnat_rm/the_gnat_library id139}@anchor{3ea}
@section @code{Interfaces.Packed_Decimal} (@code{i-pacdec.ads})
@@ -24879,7 +24902,7 @@ from a packed decimal format compatible with that used on IBM
mainframes.
@node Interfaces VxWorks i-vxwork ads,Interfaces VxWorks Int_Connection i-vxinco ads,Interfaces Packed_Decimal i-pacdec ads,The GNAT Library
-@anchor{gnat_rm/the_gnat_library interfaces-vxworks-i-vxwork-ads}@anchor{3ea}@anchor{gnat_rm/the_gnat_library id140}@anchor{3eb}
+@anchor{gnat_rm/the_gnat_library interfaces-vxworks-i-vxwork-ads}@anchor{3eb}@anchor{gnat_rm/the_gnat_library id140}@anchor{3ec}
@section @code{Interfaces.VxWorks} (@code{i-vxwork.ads})
@@ -24895,7 +24918,7 @@ In particular, it interfaces with the
VxWorks hardware interrupt facilities.
@node Interfaces VxWorks Int_Connection i-vxinco ads,Interfaces VxWorks IO i-vxwoio ads,Interfaces VxWorks i-vxwork ads,The GNAT Library
-@anchor{gnat_rm/the_gnat_library interfaces-vxworks-int-connection-i-vxinco-ads}@anchor{3ec}@anchor{gnat_rm/the_gnat_library id141}@anchor{3ed}
+@anchor{gnat_rm/the_gnat_library interfaces-vxworks-int-connection-i-vxinco-ads}@anchor{3ed}@anchor{gnat_rm/the_gnat_library id141}@anchor{3ee}
@section @code{Interfaces.VxWorks.Int_Connection} (@code{i-vxinco.ads})
@@ -24911,7 +24934,7 @@ intConnect() with a custom routine for installing interrupt
handlers.
@node Interfaces VxWorks IO i-vxwoio ads,System Address_Image s-addima ads,Interfaces VxWorks Int_Connection i-vxinco ads,The GNAT Library
-@anchor{gnat_rm/the_gnat_library interfaces-vxworks-io-i-vxwoio-ads}@anchor{3ee}@anchor{gnat_rm/the_gnat_library id142}@anchor{3ef}
+@anchor{gnat_rm/the_gnat_library interfaces-vxworks-io-i-vxwoio-ads}@anchor{3ef}@anchor{gnat_rm/the_gnat_library id142}@anchor{3f0}
@section @code{Interfaces.VxWorks.IO} (@code{i-vxwoio.ads})
@@ -24934,7 +24957,7 @@ function codes. A particular use of this package is
to enable the use of Get_Immediate under VxWorks.
@node System Address_Image s-addima ads,System Assertions s-assert ads,Interfaces VxWorks IO i-vxwoio ads,The GNAT Library
-@anchor{gnat_rm/the_gnat_library system-address-image-s-addima-ads}@anchor{3f0}@anchor{gnat_rm/the_gnat_library id143}@anchor{3f1}
+@anchor{gnat_rm/the_gnat_library system-address-image-s-addima-ads}@anchor{3f1}@anchor{gnat_rm/the_gnat_library id143}@anchor{3f2}
@section @code{System.Address_Image} (@code{s-addima.ads})
@@ -24950,7 +24973,7 @@ function that gives an (implementation dependent)
string which identifies an address.
@node System Assertions s-assert ads,System Atomic_Counters s-atocou ads,System Address_Image s-addima ads,The GNAT Library
-@anchor{gnat_rm/the_gnat_library id144}@anchor{3f2}@anchor{gnat_rm/the_gnat_library system-assertions-s-assert-ads}@anchor{3f3}
+@anchor{gnat_rm/the_gnat_library id144}@anchor{3f3}@anchor{gnat_rm/the_gnat_library system-assertions-s-assert-ads}@anchor{3f4}
@section @code{System.Assertions} (@code{s-assert.ads})
@@ -24966,7 +24989,7 @@ by an run-time assertion failure, as well as the routine that
is used internally to raise this assertion.
@node System Atomic_Counters s-atocou ads,System Memory s-memory ads,System Assertions s-assert ads,The GNAT Library
-@anchor{gnat_rm/the_gnat_library id145}@anchor{3f4}@anchor{gnat_rm/the_gnat_library system-atomic-counters-s-atocou-ads}@anchor{3f5}
+@anchor{gnat_rm/the_gnat_library id145}@anchor{3f5}@anchor{gnat_rm/the_gnat_library system-atomic-counters-s-atocou-ads}@anchor{3f6}
@section @code{System.Atomic_Counters} (@code{s-atocou.ads})
@@ -24980,7 +25003,7 @@ on most targets, including all Alpha, ia64, PowerPC, SPARC V9,
x86, and x86_64 platforms.
@node System Memory s-memory ads,System Multiprocessors s-multip ads,System Atomic_Counters s-atocou ads,The GNAT Library
-@anchor{gnat_rm/the_gnat_library system-memory-s-memory-ads}@anchor{3f6}@anchor{gnat_rm/the_gnat_library id146}@anchor{3f7}
+@anchor{gnat_rm/the_gnat_library system-memory-s-memory-ads}@anchor{3f7}@anchor{gnat_rm/the_gnat_library id146}@anchor{3f8}
@section @code{System.Memory} (@code{s-memory.ads})
@@ -24998,7 +25021,7 @@ calls to this unit may be made for low level allocation uses (for
example see the body of @code{GNAT.Tables}).
@node System Multiprocessors s-multip ads,System Multiprocessors Dispatching_Domains s-mudido ads,System Memory s-memory ads,The GNAT Library
-@anchor{gnat_rm/the_gnat_library id147}@anchor{3f8}@anchor{gnat_rm/the_gnat_library system-multiprocessors-s-multip-ads}@anchor{3f9}
+@anchor{gnat_rm/the_gnat_library id147}@anchor{3f9}@anchor{gnat_rm/the_gnat_library system-multiprocessors-s-multip-ads}@anchor{3fa}
@section @code{System.Multiprocessors} (@code{s-multip.ads})
@@ -25011,7 +25034,7 @@ in GNAT we also make it available in Ada 95 and Ada 2005 (where it is
technically an implementation-defined addition).
@node System Multiprocessors Dispatching_Domains s-mudido ads,System Partition_Interface s-parint ads,System Multiprocessors s-multip ads,The GNAT Library
-@anchor{gnat_rm/the_gnat_library system-multiprocessors-dispatching-domains-s-mudido-ads}@anchor{3fa}@anchor{gnat_rm/the_gnat_library id148}@anchor{3fb}
+@anchor{gnat_rm/the_gnat_library system-multiprocessors-dispatching-domains-s-mudido-ads}@anchor{3fb}@anchor{gnat_rm/the_gnat_library id148}@anchor{3fc}
@section @code{System.Multiprocessors.Dispatching_Domains} (@code{s-mudido.ads})
@@ -25024,7 +25047,7 @@ in GNAT we also make it available in Ada 95 and Ada 2005 (where it is
technically an implementation-defined addition).
@node System Partition_Interface s-parint ads,System Pool_Global s-pooglo ads,System Multiprocessors Dispatching_Domains s-mudido ads,The GNAT Library
-@anchor{gnat_rm/the_gnat_library id149}@anchor{3fc}@anchor{gnat_rm/the_gnat_library system-partition-interface-s-parint-ads}@anchor{3fd}
+@anchor{gnat_rm/the_gnat_library id149}@anchor{3fd}@anchor{gnat_rm/the_gnat_library system-partition-interface-s-parint-ads}@anchor{3fe}
@section @code{System.Partition_Interface} (@code{s-parint.ads})
@@ -25037,7 +25060,7 @@ is used primarily in a distribution context when using Annex E
with @code{GLADE}.
@node System Pool_Global s-pooglo ads,System Pool_Local s-pooloc ads,System Partition_Interface s-parint ads,The GNAT Library
-@anchor{gnat_rm/the_gnat_library id150}@anchor{3fe}@anchor{gnat_rm/the_gnat_library system-pool-global-s-pooglo-ads}@anchor{3ff}
+@anchor{gnat_rm/the_gnat_library id150}@anchor{3ff}@anchor{gnat_rm/the_gnat_library system-pool-global-s-pooglo-ads}@anchor{400}
@section @code{System.Pool_Global} (@code{s-pooglo.ads})
@@ -25054,7 +25077,7 @@ declared. It uses malloc/free to allocate/free and does not attempt to
do any automatic reclamation.
@node System Pool_Local s-pooloc ads,System Restrictions s-restri ads,System Pool_Global s-pooglo ads,The GNAT Library
-@anchor{gnat_rm/the_gnat_library system-pool-local-s-pooloc-ads}@anchor{400}@anchor{gnat_rm/the_gnat_library id151}@anchor{401}
+@anchor{gnat_rm/the_gnat_library system-pool-local-s-pooloc-ads}@anchor{401}@anchor{gnat_rm/the_gnat_library id151}@anchor{402}
@section @code{System.Pool_Local} (@code{s-pooloc.ads})
@@ -25071,7 +25094,7 @@ a list of allocated blocks, so that all storage allocated for the pool can
be freed automatically when the pool is finalized.
@node System Restrictions s-restri ads,System Rident s-rident ads,System Pool_Local s-pooloc ads,The GNAT Library
-@anchor{gnat_rm/the_gnat_library id152}@anchor{402}@anchor{gnat_rm/the_gnat_library system-restrictions-s-restri-ads}@anchor{403}
+@anchor{gnat_rm/the_gnat_library id152}@anchor{403}@anchor{gnat_rm/the_gnat_library system-restrictions-s-restri-ads}@anchor{404}
@section @code{System.Restrictions} (@code{s-restri.ads})
@@ -25087,7 +25110,7 @@ compiler determined information on which restrictions
are violated by one or more packages in the partition.
@node System Rident s-rident ads,System Strings Stream_Ops s-ststop ads,System Restrictions s-restri ads,The GNAT Library
-@anchor{gnat_rm/the_gnat_library system-rident-s-rident-ads}@anchor{404}@anchor{gnat_rm/the_gnat_library id153}@anchor{405}
+@anchor{gnat_rm/the_gnat_library system-rident-s-rident-ads}@anchor{405}@anchor{gnat_rm/the_gnat_library id153}@anchor{406}
@section @code{System.Rident} (@code{s-rident.ads})
@@ -25103,7 +25126,7 @@ since the necessary instantiation is included in
package System.Restrictions.
@node System Strings Stream_Ops s-ststop ads,System Unsigned_Types s-unstyp ads,System Rident s-rident ads,The GNAT Library
-@anchor{gnat_rm/the_gnat_library id154}@anchor{406}@anchor{gnat_rm/the_gnat_library system-strings-stream-ops-s-ststop-ads}@anchor{407}
+@anchor{gnat_rm/the_gnat_library id154}@anchor{407}@anchor{gnat_rm/the_gnat_library system-strings-stream-ops-s-ststop-ads}@anchor{408}
@section @code{System.Strings.Stream_Ops} (@code{s-ststop.ads})
@@ -25119,7 +25142,7 @@ stream attributes are applied to string types, but the subprograms in this
package can be used directly by application programs.
@node System Unsigned_Types s-unstyp ads,System Wch_Cnv s-wchcnv ads,System Strings Stream_Ops s-ststop ads,The GNAT Library
-@anchor{gnat_rm/the_gnat_library system-unsigned-types-s-unstyp-ads}@anchor{408}@anchor{gnat_rm/the_gnat_library id155}@anchor{409}
+@anchor{gnat_rm/the_gnat_library system-unsigned-types-s-unstyp-ads}@anchor{409}@anchor{gnat_rm/the_gnat_library id155}@anchor{40a}
@section @code{System.Unsigned_Types} (@code{s-unstyp.ads})
@@ -25132,7 +25155,7 @@ also contains some related definitions for other specialized types
used by the compiler in connection with packed array types.
@node System Wch_Cnv s-wchcnv ads,System Wch_Con s-wchcon ads,System Unsigned_Types s-unstyp ads,The GNAT Library
-@anchor{gnat_rm/the_gnat_library system-wch-cnv-s-wchcnv-ads}@anchor{40a}@anchor{gnat_rm/the_gnat_library id156}@anchor{40b}
+@anchor{gnat_rm/the_gnat_library system-wch-cnv-s-wchcnv-ads}@anchor{40b}@anchor{gnat_rm/the_gnat_library id156}@anchor{40c}
@section @code{System.Wch_Cnv} (@code{s-wchcnv.ads})
@@ -25153,7 +25176,7 @@ encoding method. It uses definitions in
package @code{System.Wch_Con}.
@node System Wch_Con s-wchcon ads,,System Wch_Cnv s-wchcnv ads,The GNAT Library
-@anchor{gnat_rm/the_gnat_library id157}@anchor{40c}@anchor{gnat_rm/the_gnat_library system-wch-con-s-wchcon-ads}@anchor{40d}
+@anchor{gnat_rm/the_gnat_library id157}@anchor{40d}@anchor{gnat_rm/the_gnat_library system-wch-con-s-wchcon-ads}@anchor{40e}
@section @code{System.Wch_Con} (@code{s-wchcon.ads})
@@ -25165,7 +25188,7 @@ in ordinary strings. These definitions are used by
the package @code{System.Wch_Cnv}.
@node Interfacing to Other Languages,Specialized Needs Annexes,The GNAT Library,Top
-@anchor{gnat_rm/interfacing_to_other_languages interfacing-to-other-languages}@anchor{11}@anchor{gnat_rm/interfacing_to_other_languages doc}@anchor{40e}@anchor{gnat_rm/interfacing_to_other_languages id1}@anchor{40f}
+@anchor{gnat_rm/interfacing_to_other_languages interfacing-to-other-languages}@anchor{11}@anchor{gnat_rm/interfacing_to_other_languages doc}@anchor{40f}@anchor{gnat_rm/interfacing_to_other_languages id1}@anchor{410}
@chapter Interfacing to Other Languages
@@ -25183,7 +25206,7 @@ provided.
@end menu
@node Interfacing to C,Interfacing to C++,,Interfacing to Other Languages
-@anchor{gnat_rm/interfacing_to_other_languages interfacing-to-c}@anchor{410}@anchor{gnat_rm/interfacing_to_other_languages id2}@anchor{411}
+@anchor{gnat_rm/interfacing_to_other_languages interfacing-to-c}@anchor{411}@anchor{gnat_rm/interfacing_to_other_languages id2}@anchor{412}
@section Interfacing to C
@@ -25323,7 +25346,7 @@ of the length corresponding to the @code{type'Size} value in Ada.
@end itemize
@node Interfacing to C++,Interfacing to COBOL,Interfacing to C,Interfacing to Other Languages
-@anchor{gnat_rm/interfacing_to_other_languages id4}@anchor{412}@anchor{gnat_rm/interfacing_to_other_languages id3}@anchor{47}
+@anchor{gnat_rm/interfacing_to_other_languages id4}@anchor{413}@anchor{gnat_rm/interfacing_to_other_languages id3}@anchor{47}
@section Interfacing to C++
@@ -25380,7 +25403,7 @@ The @code{External_Name} is the name of the C++ RTTI symbol. You can then
cover a specific C++ exception in an exception handler.
@node Interfacing to COBOL,Interfacing to Fortran,Interfacing to C++,Interfacing to Other Languages
-@anchor{gnat_rm/interfacing_to_other_languages id5}@anchor{413}@anchor{gnat_rm/interfacing_to_other_languages interfacing-to-cobol}@anchor{414}
+@anchor{gnat_rm/interfacing_to_other_languages id5}@anchor{414}@anchor{gnat_rm/interfacing_to_other_languages interfacing-to-cobol}@anchor{415}
@section Interfacing to COBOL
@@ -25388,7 +25411,7 @@ Interfacing to COBOL is achieved as described in section B.4 of
the Ada Reference Manual.
@node Interfacing to Fortran,Interfacing to non-GNAT Ada code,Interfacing to COBOL,Interfacing to Other Languages
-@anchor{gnat_rm/interfacing_to_other_languages id6}@anchor{415}@anchor{gnat_rm/interfacing_to_other_languages interfacing-to-fortran}@anchor{416}
+@anchor{gnat_rm/interfacing_to_other_languages id6}@anchor{416}@anchor{gnat_rm/interfacing_to_other_languages interfacing-to-fortran}@anchor{417}
@section Interfacing to Fortran
@@ -25398,7 +25421,7 @@ multi-dimensional array causes the array to be stored in column-major
order as required for convenient interface to Fortran.
@node Interfacing to non-GNAT Ada code,,Interfacing to Fortran,Interfacing to Other Languages
-@anchor{gnat_rm/interfacing_to_other_languages interfacing-to-non-gnat-ada-code}@anchor{417}@anchor{gnat_rm/interfacing_to_other_languages id7}@anchor{418}
+@anchor{gnat_rm/interfacing_to_other_languages interfacing-to-non-gnat-ada-code}@anchor{418}@anchor{gnat_rm/interfacing_to_other_languages id7}@anchor{419}
@section Interfacing to non-GNAT Ada code
@@ -25422,7 +25445,7 @@ values or simple record types without variants, or simple array
types with fixed bounds.
@node Specialized Needs Annexes,Implementation of Specific Ada Features,Interfacing to Other Languages,Top
-@anchor{gnat_rm/specialized_needs_annexes specialized-needs-annexes}@anchor{12}@anchor{gnat_rm/specialized_needs_annexes doc}@anchor{419}@anchor{gnat_rm/specialized_needs_annexes id1}@anchor{41a}
+@anchor{gnat_rm/specialized_needs_annexes specialized-needs-annexes}@anchor{12}@anchor{gnat_rm/specialized_needs_annexes doc}@anchor{41a}@anchor{gnat_rm/specialized_needs_annexes id1}@anchor{41b}
@chapter Specialized Needs Annexes
@@ -25463,7 +25486,7 @@ in Ada 2005) is fully implemented.
@end table
@node Implementation of Specific Ada Features,Implementation of Ada 2012 Features,Specialized Needs Annexes,Top
-@anchor{gnat_rm/implementation_of_specific_ada_features implementation-of-specific-ada-features}@anchor{13}@anchor{gnat_rm/implementation_of_specific_ada_features doc}@anchor{41b}@anchor{gnat_rm/implementation_of_specific_ada_features id1}@anchor{41c}
+@anchor{gnat_rm/implementation_of_specific_ada_features implementation-of-specific-ada-features}@anchor{13}@anchor{gnat_rm/implementation_of_specific_ada_features doc}@anchor{41c}@anchor{gnat_rm/implementation_of_specific_ada_features id1}@anchor{41d}
@chapter Implementation of Specific Ada Features
@@ -25481,7 +25504,7 @@ facilities.
@end menu
@node Machine Code Insertions,GNAT Implementation of Tasking,,Implementation of Specific Ada Features
-@anchor{gnat_rm/implementation_of_specific_ada_features machine-code-insertions}@anchor{16a}@anchor{gnat_rm/implementation_of_specific_ada_features id2}@anchor{41d}
+@anchor{gnat_rm/implementation_of_specific_ada_features machine-code-insertions}@anchor{16a}@anchor{gnat_rm/implementation_of_specific_ada_features id2}@anchor{41e}
@section Machine Code Insertions
@@ -25649,7 +25672,7 @@ according to normal visibility rules. In particular if there is no
qualification is required.
@node GNAT Implementation of Tasking,GNAT Implementation of Shared Passive Packages,Machine Code Insertions,Implementation of Specific Ada Features
-@anchor{gnat_rm/implementation_of_specific_ada_features id3}@anchor{41e}@anchor{gnat_rm/implementation_of_specific_ada_features gnat-implementation-of-tasking}@anchor{41f}
+@anchor{gnat_rm/implementation_of_specific_ada_features id3}@anchor{41f}@anchor{gnat_rm/implementation_of_specific_ada_features gnat-implementation-of-tasking}@anchor{420}
@section GNAT Implementation of Tasking
@@ -25665,7 +25688,7 @@ to compliance with the Real-Time Systems Annex.
@end menu
@node Mapping Ada Tasks onto the Underlying Kernel Threads,Ensuring Compliance with the Real-Time Annex,,GNAT Implementation of Tasking
-@anchor{gnat_rm/implementation_of_specific_ada_features mapping-ada-tasks-onto-the-underlying-kernel-threads}@anchor{420}@anchor{gnat_rm/implementation_of_specific_ada_features id4}@anchor{421}
+@anchor{gnat_rm/implementation_of_specific_ada_features mapping-ada-tasks-onto-the-underlying-kernel-threads}@anchor{421}@anchor{gnat_rm/implementation_of_specific_ada_features id4}@anchor{422}
@subsection Mapping Ada Tasks onto the Underlying Kernel Threads
@@ -25734,7 +25757,7 @@ support this functionality when the parent contains more than one task.
@geindex Forking a new process
@node Ensuring Compliance with the Real-Time Annex,Support for Locking Policies,Mapping Ada Tasks onto the Underlying Kernel Threads,GNAT Implementation of Tasking
-@anchor{gnat_rm/implementation_of_specific_ada_features id5}@anchor{422}@anchor{gnat_rm/implementation_of_specific_ada_features ensuring-compliance-with-the-real-time-annex}@anchor{423}
+@anchor{gnat_rm/implementation_of_specific_ada_features id5}@anchor{423}@anchor{gnat_rm/implementation_of_specific_ada_features ensuring-compliance-with-the-real-time-annex}@anchor{424}
@subsection Ensuring Compliance with the Real-Time Annex
@@ -25785,7 +25808,7 @@ placed at the end.
@c Support_for_Locking_Policies
@node Support for Locking Policies,,Ensuring Compliance with the Real-Time Annex,GNAT Implementation of Tasking
-@anchor{gnat_rm/implementation_of_specific_ada_features support-for-locking-policies}@anchor{424}
+@anchor{gnat_rm/implementation_of_specific_ada_features support-for-locking-policies}@anchor{425}
@subsection Support for Locking Policies
@@ -25819,7 +25842,7 @@ then ceiling locking is used.
Otherwise, the @code{Ceiling_Locking} policy is ignored.
@node GNAT Implementation of Shared Passive Packages,Code Generation for Array Aggregates,GNAT Implementation of Tasking,Implementation of Specific Ada Features
-@anchor{gnat_rm/implementation_of_specific_ada_features id6}@anchor{425}@anchor{gnat_rm/implementation_of_specific_ada_features gnat-implementation-of-shared-passive-packages}@anchor{426}
+@anchor{gnat_rm/implementation_of_specific_ada_features id6}@anchor{426}@anchor{gnat_rm/implementation_of_specific_ada_features gnat-implementation-of-shared-passive-packages}@anchor{427}
@section GNAT Implementation of Shared Passive Packages
@@ -25917,7 +25940,7 @@ This is used to provide the required locking
semantics for proper protected object synchronization.
@node Code Generation for Array Aggregates,The Size of Discriminated Records with Default Discriminants,GNAT Implementation of Shared Passive Packages,Implementation of Specific Ada Features
-@anchor{gnat_rm/implementation_of_specific_ada_features code-generation-for-array-aggregates}@anchor{427}@anchor{gnat_rm/implementation_of_specific_ada_features id7}@anchor{428}
+@anchor{gnat_rm/implementation_of_specific_ada_features code-generation-for-array-aggregates}@anchor{428}@anchor{gnat_rm/implementation_of_specific_ada_features id7}@anchor{429}
@section Code Generation for Array Aggregates
@@ -25948,7 +25971,7 @@ component values and static subtypes also lead to simpler code.
@end menu
@node Static constant aggregates with static bounds,Constant aggregates with unconstrained nominal types,,Code Generation for Array Aggregates
-@anchor{gnat_rm/implementation_of_specific_ada_features static-constant-aggregates-with-static-bounds}@anchor{429}@anchor{gnat_rm/implementation_of_specific_ada_features id8}@anchor{42a}
+@anchor{gnat_rm/implementation_of_specific_ada_features static-constant-aggregates-with-static-bounds}@anchor{42a}@anchor{gnat_rm/implementation_of_specific_ada_features id8}@anchor{42b}
@subsection Static constant aggregates with static bounds
@@ -25995,7 +26018,7 @@ Zero2: constant two_dim := (others => (others => 0));
@end example
@node Constant aggregates with unconstrained nominal types,Aggregates with static bounds,Static constant aggregates with static bounds,Code Generation for Array Aggregates
-@anchor{gnat_rm/implementation_of_specific_ada_features constant-aggregates-with-unconstrained-nominal-types}@anchor{42b}@anchor{gnat_rm/implementation_of_specific_ada_features id9}@anchor{42c}
+@anchor{gnat_rm/implementation_of_specific_ada_features constant-aggregates-with-unconstrained-nominal-types}@anchor{42c}@anchor{gnat_rm/implementation_of_specific_ada_features id9}@anchor{42d}
@subsection Constant aggregates with unconstrained nominal types
@@ -26010,7 +26033,7 @@ Cr_Unc : constant One_Unc := (12,24,36);
@end example
@node Aggregates with static bounds,Aggregates with nonstatic bounds,Constant aggregates with unconstrained nominal types,Code Generation for Array Aggregates
-@anchor{gnat_rm/implementation_of_specific_ada_features id10}@anchor{42d}@anchor{gnat_rm/implementation_of_specific_ada_features aggregates-with-static-bounds}@anchor{42e}
+@anchor{gnat_rm/implementation_of_specific_ada_features id10}@anchor{42e}@anchor{gnat_rm/implementation_of_specific_ada_features aggregates-with-static-bounds}@anchor{42f}
@subsection Aggregates with static bounds
@@ -26038,7 +26061,7 @@ end loop;
@end example
@node Aggregates with nonstatic bounds,Aggregates in assignment statements,Aggregates with static bounds,Code Generation for Array Aggregates
-@anchor{gnat_rm/implementation_of_specific_ada_features id11}@anchor{42f}@anchor{gnat_rm/implementation_of_specific_ada_features aggregates-with-nonstatic-bounds}@anchor{430}
+@anchor{gnat_rm/implementation_of_specific_ada_features id11}@anchor{430}@anchor{gnat_rm/implementation_of_specific_ada_features aggregates-with-nonstatic-bounds}@anchor{431}
@subsection Aggregates with nonstatic bounds
@@ -26049,7 +26072,7 @@ have to be applied to sub-arrays individually, if they do not have statically
compatible subtypes.
@node Aggregates in assignment statements,,Aggregates with nonstatic bounds,Code Generation for Array Aggregates
-@anchor{gnat_rm/implementation_of_specific_ada_features id12}@anchor{431}@anchor{gnat_rm/implementation_of_specific_ada_features aggregates-in-assignment-statements}@anchor{432}
+@anchor{gnat_rm/implementation_of_specific_ada_features id12}@anchor{432}@anchor{gnat_rm/implementation_of_specific_ada_features aggregates-in-assignment-statements}@anchor{433}
@subsection Aggregates in assignment statements
@@ -26091,7 +26114,7 @@ a temporary (created either by the front-end or the code generator) and then
that temporary will be copied onto the target.
@node The Size of Discriminated Records with Default Discriminants,Strict Conformance to the Ada Reference Manual,Code Generation for Array Aggregates,Implementation of Specific Ada Features
-@anchor{gnat_rm/implementation_of_specific_ada_features id13}@anchor{433}@anchor{gnat_rm/implementation_of_specific_ada_features the-size-of-discriminated-records-with-default-discriminants}@anchor{434}
+@anchor{gnat_rm/implementation_of_specific_ada_features id13}@anchor{434}@anchor{gnat_rm/implementation_of_specific_ada_features the-size-of-discriminated-records-with-default-discriminants}@anchor{435}
@section The Size of Discriminated Records with Default Discriminants
@@ -26171,7 +26194,7 @@ say) must be consistent, so it is imperative that the object, once created,
remain invariant.
@node Strict Conformance to the Ada Reference Manual,,The Size of Discriminated Records with Default Discriminants,Implementation of Specific Ada Features
-@anchor{gnat_rm/implementation_of_specific_ada_features strict-conformance-to-the-ada-reference-manual}@anchor{435}@anchor{gnat_rm/implementation_of_specific_ada_features id14}@anchor{436}
+@anchor{gnat_rm/implementation_of_specific_ada_features strict-conformance-to-the-ada-reference-manual}@anchor{436}@anchor{gnat_rm/implementation_of_specific_ada_features id14}@anchor{437}
@section Strict Conformance to the Ada Reference Manual
@@ -26198,7 +26221,7 @@ behavior (although at the cost of a significant performance penalty), so
infinite and NaN values are properly generated.
@node Implementation of Ada 2012 Features,Obsolescent Features,Implementation of Specific Ada Features,Top
-@anchor{gnat_rm/implementation_of_ada_2012_features doc}@anchor{437}@anchor{gnat_rm/implementation_of_ada_2012_features implementation-of-ada-2012-features}@anchor{14}@anchor{gnat_rm/implementation_of_ada_2012_features id1}@anchor{438}
+@anchor{gnat_rm/implementation_of_ada_2012_features doc}@anchor{438}@anchor{gnat_rm/implementation_of_ada_2012_features implementation-of-ada-2012-features}@anchor{14}@anchor{gnat_rm/implementation_of_ada_2012_features id1}@anchor{439}
@chapter Implementation of Ada 2012 Features
@@ -28364,7 +28387,7 @@ RM References: H.04 (8/1)
@end itemize
@node Obsolescent Features,Compatibility and Porting Guide,Implementation of Ada 2012 Features,Top
-@anchor{gnat_rm/obsolescent_features id1}@anchor{439}@anchor{gnat_rm/obsolescent_features doc}@anchor{43a}@anchor{gnat_rm/obsolescent_features obsolescent-features}@anchor{15}
+@anchor{gnat_rm/obsolescent_features id1}@anchor{43a}@anchor{gnat_rm/obsolescent_features doc}@anchor{43b}@anchor{gnat_rm/obsolescent_features obsolescent-features}@anchor{15}
@chapter Obsolescent Features
@@ -28383,7 +28406,7 @@ compatibility purposes.
@end menu
@node pragma No_Run_Time,pragma Ravenscar,,Obsolescent Features
-@anchor{gnat_rm/obsolescent_features id2}@anchor{43b}@anchor{gnat_rm/obsolescent_features pragma-no-run-time}@anchor{43c}
+@anchor{gnat_rm/obsolescent_features id2}@anchor{43c}@anchor{gnat_rm/obsolescent_features pragma-no-run-time}@anchor{43d}
@section pragma No_Run_Time
@@ -28396,7 +28419,7 @@ preferred usage is to use an appropriately configured run-time that
includes just those features that are to be made accessible.
@node pragma Ravenscar,pragma Restricted_Run_Time,pragma No_Run_Time,Obsolescent Features
-@anchor{gnat_rm/obsolescent_features id3}@anchor{43d}@anchor{gnat_rm/obsolescent_features pragma-ravenscar}@anchor{43e}
+@anchor{gnat_rm/obsolescent_features id3}@anchor{43e}@anchor{gnat_rm/obsolescent_features pragma-ravenscar}@anchor{43f}
@section pragma Ravenscar
@@ -28405,7 +28428,7 @@ The pragma @code{Ravenscar} has exactly the same effect as pragma
is part of the new Ada 2005 standard.
@node pragma Restricted_Run_Time,pragma Task_Info,pragma Ravenscar,Obsolescent Features
-@anchor{gnat_rm/obsolescent_features pragma-restricted-run-time}@anchor{43f}@anchor{gnat_rm/obsolescent_features id4}@anchor{440}
+@anchor{gnat_rm/obsolescent_features pragma-restricted-run-time}@anchor{440}@anchor{gnat_rm/obsolescent_features id4}@anchor{441}
@section pragma Restricted_Run_Time
@@ -28415,7 +28438,7 @@ preferred since the Ada 2005 pragma @code{Profile} is intended for
this kind of implementation dependent addition.
@node pragma Task_Info,package System Task_Info s-tasinf ads,pragma Restricted_Run_Time,Obsolescent Features
-@anchor{gnat_rm/obsolescent_features pragma-task-info}@anchor{441}@anchor{gnat_rm/obsolescent_features id5}@anchor{442}
+@anchor{gnat_rm/obsolescent_features pragma-task-info}@anchor{442}@anchor{gnat_rm/obsolescent_features id5}@anchor{443}
@section pragma Task_Info
@@ -28441,7 +28464,7 @@ in the spec of package System.Task_Info in the runtime
library.
@node package System Task_Info s-tasinf ads,,pragma Task_Info,Obsolescent Features
-@anchor{gnat_rm/obsolescent_features package-system-task-info}@anchor{443}@anchor{gnat_rm/obsolescent_features package-system-task-info-s-tasinf-ads}@anchor{444}
+@anchor{gnat_rm/obsolescent_features package-system-task-info}@anchor{444}@anchor{gnat_rm/obsolescent_features package-system-task-info-s-tasinf-ads}@anchor{445}
@section package System.Task_Info (@code{s-tasinf.ads})
@@ -28451,7 +28474,7 @@ to support the @code{Task_Info} pragma. The predefined Ada package
standard replacement for GNAT's @code{Task_Info} functionality.
@node Compatibility and Porting Guide,GNU Free Documentation License,Obsolescent Features,Top
-@anchor{gnat_rm/compatibility_and_porting_guide compatibility-and-porting-guide}@anchor{16}@anchor{gnat_rm/compatibility_and_porting_guide doc}@anchor{445}@anchor{gnat_rm/compatibility_and_porting_guide id1}@anchor{446}
+@anchor{gnat_rm/compatibility_and_porting_guide compatibility-and-porting-guide}@anchor{16}@anchor{gnat_rm/compatibility_and_porting_guide doc}@anchor{446}@anchor{gnat_rm/compatibility_and_porting_guide id1}@anchor{447}
@chapter Compatibility and Porting Guide
@@ -28473,7 +28496,7 @@ applications developed in other Ada environments.
@end menu
@node Writing Portable Fixed-Point Declarations,Compatibility with Ada 83,,Compatibility and Porting Guide
-@anchor{gnat_rm/compatibility_and_porting_guide id2}@anchor{447}@anchor{gnat_rm/compatibility_and_porting_guide writing-portable-fixed-point-declarations}@anchor{448}
+@anchor{gnat_rm/compatibility_and_porting_guide id2}@anchor{448}@anchor{gnat_rm/compatibility_and_porting_guide writing-portable-fixed-point-declarations}@anchor{449}
@section Writing Portable Fixed-Point Declarations
@@ -28595,7 +28618,7 @@ If you follow this scheme you will be guaranteed that your fixed-point
types will be portable.
@node Compatibility with Ada 83,Compatibility between Ada 95 and Ada 2005,Writing Portable Fixed-Point Declarations,Compatibility and Porting Guide
-@anchor{gnat_rm/compatibility_and_porting_guide compatibility-with-ada-83}@anchor{449}@anchor{gnat_rm/compatibility_and_porting_guide id3}@anchor{44a}
+@anchor{gnat_rm/compatibility_and_porting_guide compatibility-with-ada-83}@anchor{44a}@anchor{gnat_rm/compatibility_and_porting_guide id3}@anchor{44b}
@section Compatibility with Ada 83
@@ -28623,7 +28646,7 @@ following subsections treat the most likely issues to be encountered.
@end menu
@node Legal Ada 83 programs that are illegal in Ada 95,More deterministic semantics,,Compatibility with Ada 83
-@anchor{gnat_rm/compatibility_and_porting_guide id4}@anchor{44b}@anchor{gnat_rm/compatibility_and_porting_guide legal-ada-83-programs-that-are-illegal-in-ada-95}@anchor{44c}
+@anchor{gnat_rm/compatibility_and_porting_guide id4}@anchor{44c}@anchor{gnat_rm/compatibility_and_porting_guide legal-ada-83-programs-that-are-illegal-in-ada-95}@anchor{44d}
@subsection Legal Ada 83 programs that are illegal in Ada 95
@@ -28723,7 +28746,7 @@ the fix is usually simply to add the @code{(<>)} to the generic declaration.
@end itemize
@node More deterministic semantics,Changed semantics,Legal Ada 83 programs that are illegal in Ada 95,Compatibility with Ada 83
-@anchor{gnat_rm/compatibility_and_porting_guide more-deterministic-semantics}@anchor{44d}@anchor{gnat_rm/compatibility_and_porting_guide id5}@anchor{44e}
+@anchor{gnat_rm/compatibility_and_porting_guide more-deterministic-semantics}@anchor{44e}@anchor{gnat_rm/compatibility_and_porting_guide id5}@anchor{44f}
@subsection More deterministic semantics
@@ -28751,7 +28774,7 @@ which open select branches are executed.
@end itemize
@node Changed semantics,Other language compatibility issues,More deterministic semantics,Compatibility with Ada 83
-@anchor{gnat_rm/compatibility_and_porting_guide id6}@anchor{44f}@anchor{gnat_rm/compatibility_and_porting_guide changed-semantics}@anchor{450}
+@anchor{gnat_rm/compatibility_and_porting_guide id6}@anchor{450}@anchor{gnat_rm/compatibility_and_porting_guide changed-semantics}@anchor{451}
@subsection Changed semantics
@@ -28793,7 +28816,7 @@ covers only the restricted range.
@end itemize
@node Other language compatibility issues,,Changed semantics,Compatibility with Ada 83
-@anchor{gnat_rm/compatibility_and_porting_guide other-language-compatibility-issues}@anchor{451}@anchor{gnat_rm/compatibility_and_porting_guide id7}@anchor{452}
+@anchor{gnat_rm/compatibility_and_porting_guide other-language-compatibility-issues}@anchor{452}@anchor{gnat_rm/compatibility_and_porting_guide id7}@anchor{453}
@subsection Other language compatibility issues
@@ -28826,7 +28849,7 @@ include @code{pragma Interface} and the floating point type attributes
@end itemize
@node Compatibility between Ada 95 and Ada 2005,Implementation-dependent characteristics,Compatibility with Ada 83,Compatibility and Porting Guide
-@anchor{gnat_rm/compatibility_and_porting_guide compatibility-between-ada-95-and-ada-2005}@anchor{453}@anchor{gnat_rm/compatibility_and_porting_guide id8}@anchor{454}
+@anchor{gnat_rm/compatibility_and_porting_guide compatibility-between-ada-95-and-ada-2005}@anchor{454}@anchor{gnat_rm/compatibility_and_porting_guide id8}@anchor{455}
@section Compatibility between Ada 95 and Ada 2005
@@ -28898,7 +28921,7 @@ can declare a function returning a value from an anonymous access type.
@end itemize
@node Implementation-dependent characteristics,Compatibility with Other Ada Systems,Compatibility between Ada 95 and Ada 2005,Compatibility and Porting Guide
-@anchor{gnat_rm/compatibility_and_porting_guide implementation-dependent-characteristics}@anchor{455}@anchor{gnat_rm/compatibility_and_porting_guide id9}@anchor{456}
+@anchor{gnat_rm/compatibility_and_porting_guide implementation-dependent-characteristics}@anchor{456}@anchor{gnat_rm/compatibility_and_porting_guide id9}@anchor{457}
@section Implementation-dependent characteristics
@@ -28921,7 +28944,7 @@ transition from certain Ada 83 compilers.
@end menu
@node Implementation-defined pragmas,Implementation-defined attributes,,Implementation-dependent characteristics
-@anchor{gnat_rm/compatibility_and_porting_guide implementation-defined-pragmas}@anchor{457}@anchor{gnat_rm/compatibility_and_porting_guide id10}@anchor{458}
+@anchor{gnat_rm/compatibility_and_porting_guide implementation-defined-pragmas}@anchor{458}@anchor{gnat_rm/compatibility_and_porting_guide id10}@anchor{459}
@subsection Implementation-defined pragmas
@@ -28943,7 +28966,7 @@ avoiding compiler rejection of units that contain such pragmas; they are not
relevant in a GNAT context and hence are not otherwise implemented.
@node Implementation-defined attributes,Libraries,Implementation-defined pragmas,Implementation-dependent characteristics
-@anchor{gnat_rm/compatibility_and_porting_guide id11}@anchor{459}@anchor{gnat_rm/compatibility_and_porting_guide implementation-defined-attributes}@anchor{45a}
+@anchor{gnat_rm/compatibility_and_porting_guide id11}@anchor{45a}@anchor{gnat_rm/compatibility_and_porting_guide implementation-defined-attributes}@anchor{45b}
@subsection Implementation-defined attributes
@@ -28957,7 +28980,7 @@ Ada 83, GNAT supplies the attributes @code{Bit}, @code{Machine_Size} and
@code{Type_Class}.
@node Libraries,Elaboration order,Implementation-defined attributes,Implementation-dependent characteristics
-@anchor{gnat_rm/compatibility_and_porting_guide libraries}@anchor{45b}@anchor{gnat_rm/compatibility_and_porting_guide id12}@anchor{45c}
+@anchor{gnat_rm/compatibility_and_porting_guide libraries}@anchor{45c}@anchor{gnat_rm/compatibility_and_porting_guide id12}@anchor{45d}
@subsection Libraries
@@ -28986,7 +29009,7 @@ be preferable to retrofit the application using modular types.
@end itemize
@node Elaboration order,Target-specific aspects,Libraries,Implementation-dependent characteristics
-@anchor{gnat_rm/compatibility_and_porting_guide elaboration-order}@anchor{45d}@anchor{gnat_rm/compatibility_and_porting_guide id13}@anchor{45e}
+@anchor{gnat_rm/compatibility_and_porting_guide elaboration-order}@anchor{45e}@anchor{gnat_rm/compatibility_and_porting_guide id13}@anchor{45f}
@subsection Elaboration order
@@ -29022,7 +29045,7 @@ pragmas either globally (as an effect of the @emph{-gnatE} switch) or locally
@end itemize
@node Target-specific aspects,,Elaboration order,Implementation-dependent characteristics
-@anchor{gnat_rm/compatibility_and_porting_guide target-specific-aspects}@anchor{45f}@anchor{gnat_rm/compatibility_and_porting_guide id14}@anchor{460}
+@anchor{gnat_rm/compatibility_and_porting_guide target-specific-aspects}@anchor{460}@anchor{gnat_rm/compatibility_and_porting_guide id14}@anchor{461}
@subsection Target-specific aspects
@@ -29035,10 +29058,10 @@ on the robustness of the original design. Moreover, Ada 95 (and thus
Ada 2005 and Ada 2012) are sometimes
incompatible with typical Ada 83 compiler practices regarding implicit
packing, the meaning of the Size attribute, and the size of access values.
-GNAT's approach to these issues is described in @ref{461,,Representation Clauses}.
+GNAT's approach to these issues is described in @ref{462,,Representation Clauses}.
@node Compatibility with Other Ada Systems,Representation Clauses,Implementation-dependent characteristics,Compatibility and Porting Guide
-@anchor{gnat_rm/compatibility_and_porting_guide id15}@anchor{462}@anchor{gnat_rm/compatibility_and_porting_guide compatibility-with-other-ada-systems}@anchor{463}
+@anchor{gnat_rm/compatibility_and_porting_guide id15}@anchor{463}@anchor{gnat_rm/compatibility_and_porting_guide compatibility-with-other-ada-systems}@anchor{464}
@section Compatibility with Other Ada Systems
@@ -29081,7 +29104,7 @@ far beyond this minimal set, as described in the next section.
@end itemize
@node Representation Clauses,Compatibility with HP Ada 83,Compatibility with Other Ada Systems,Compatibility and Porting Guide
-@anchor{gnat_rm/compatibility_and_porting_guide representation-clauses}@anchor{461}@anchor{gnat_rm/compatibility_and_porting_guide id16}@anchor{464}
+@anchor{gnat_rm/compatibility_and_porting_guide representation-clauses}@anchor{462}@anchor{gnat_rm/compatibility_and_porting_guide id16}@anchor{465}
@section Representation Clauses
@@ -29174,7 +29197,7 @@ with thin pointers.
@end itemize
@node Compatibility with HP Ada 83,,Representation Clauses,Compatibility and Porting Guide
-@anchor{gnat_rm/compatibility_and_porting_guide compatibility-with-hp-ada-83}@anchor{465}@anchor{gnat_rm/compatibility_and_porting_guide id17}@anchor{466}
+@anchor{gnat_rm/compatibility_and_porting_guide compatibility-with-hp-ada-83}@anchor{466}@anchor{gnat_rm/compatibility_and_porting_guide id17}@anchor{467}
@section Compatibility with HP Ada 83
@@ -29204,7 +29227,7 @@ extension of package System.
@end itemize
@node GNU Free Documentation License,Index,Compatibility and Porting Guide,Top
-@anchor{share/gnu_free_documentation_license gnu-fdl}@anchor{1}@anchor{share/gnu_free_documentation_license doc}@anchor{467}@anchor{share/gnu_free_documentation_license gnu-free-documentation-license}@anchor{468}
+@anchor{share/gnu_free_documentation_license gnu-fdl}@anchor{1}@anchor{share/gnu_free_documentation_license doc}@anchor{468}@anchor{share/gnu_free_documentation_license gnu-free-documentation-license}@anchor{469}
@chapter GNU Free Documentation License
diff --git a/gcc/ada/gnat_ugn.texi b/gcc/ada/gnat_ugn.texi
index e6078e6..78814c3 100644
--- a/gcc/ada/gnat_ugn.texi
+++ b/gcc/ada/gnat_ugn.texi
@@ -13227,8 +13227,25 @@ If a digit from 1-9 appears
in the string after @code{-gnaty}
then proper indentation is checked, with the digit indicating the
indentation level required. A value of zero turns off this style check.
-The general style of required indentation is as specified by
-the examples in the Ada Reference Manual. Full line comments must be
+The rule checks that the following constructs start on a column that is
+a multiple of the alignment level:
+
+
+@itemize *
+
+@item
+beginnings of declarations (except record component declarations)
+and statements;
+
+@item
+beginnings of the structural components of compound statements;
+
+@item
+@code{end} keyword that completes the declaration of a program unit declaration
+or body or that completes a compound statement.
+@end itemize
+
+Full line comments must be
aligned with the @code{--} starting on a column that is a multiple of
the alignment level, or they may be aligned the same way as the following
non-blank line (this is useful when full line comments appear in the middle
diff --git a/gcc/ada/initialize.c b/gcc/ada/initialize.c
index 22fd988..6bed668 100644
--- a/gcc/ada/initialize.c
+++ b/gcc/ada/initialize.c
@@ -29,29 +29,19 @@
* *
****************************************************************************/
-/* This unit provides default implementation for __gnat_initialize ()
- which is called before the elaboration of the partition. It is provided
- in a separate file/object so that users can replace it easily.
- The default implementation should be null on most targets. */
-
-/* The following include is here to meet the published VxWorks requirement
- that the __vxworks header appear before any other include. */
-#ifdef __vxworks
-#include "vxWorks.h"
-#endif
+/* This unit provides the default implementation of __gnat_initialize, which
+ is called before the elaboration of the partition. It is provided in a
+ separate file so that users can replace it easily. But the implementation
+ should be empty on most targets. */
#ifdef IN_RTS
#include "runtime.h"
-/* We don't have libiberty, so use malloc. */
-#define xmalloc(S) malloc (S)
-#define xrealloc(V,S) realloc (V,S)
#else
#include "config.h"
#include "system.h"
#endif
#include "raise.h"
-#include <fcntl.h>
#ifdef __cplusplus
extern "C" {
@@ -63,65 +53,16 @@ extern "C" {
#if defined (__MINGW32__)
-extern void __gnat_install_SEH_handler (void *);
-
void
-__gnat_initialize (void *eh ATTRIBUTE_UNUSED)
+__gnat_initialize (void *eh)
{
- /* Note that we do not activate this for the compiler itself to avoid a
- bootstrap path problem. Older version of gnatbind will generate a call
- to __gnat_initialize() without argument. Therefore we cannot use eh in
- this case. It will be possible to remove the following #ifdef at some
- point. */
-#ifdef IN_RTS
/* Install the Structured Exception handler. */
if (eh)
__gnat_install_SEH_handler (eh);
-#endif
-}
-
-/******************************************/
-/* __gnat_initialize (init_float version) */
-/******************************************/
-
-#elif defined (__Lynx__) || defined (__FreeBSD__) || defined(__NetBSD__) \
- || defined (__OpenBSD__) || defined (__DragonFly__)
-
-void
-__gnat_initialize (void *eh ATTRIBUTE_UNUSED)
-{
-}
-
-/***************************************/
-/* __gnat_initialize (VxWorks Version) */
-/***************************************/
-
-#elif defined(__vxworks)
-
-void
-__gnat_initialize (void *eh)
-{
-}
-
-#elif defined(_T_HPUX10) || (!defined(IN_RTS) && defined(_X_HPUX10))
-
-/************************************************/
-/* __gnat_initialize (PA-RISC HP-UX 10 Version) */
-/************************************************/
-
-extern void __main (void);
-
-void
-__gnat_initialize (void *eh ATTRIBUTE_UNUSED)
-{
- __main ();
}
#else
-/* For all other versions of GNAT, the initialize routine and handler
- installation do nothing */
-
/***************************************/
/* __gnat_initialize (Default Version) */
/***************************************/
@@ -130,6 +71,7 @@ void
__gnat_initialize (void *eh ATTRIBUTE_UNUSED)
{
}
+
#endif
#ifdef __cplusplus
diff --git a/gcc/ada/libgnarl/s-taskin.ads b/gcc/ada/libgnarl/s-taskin.ads
index f095c66..5c03829 100644
--- a/gcc/ada/libgnarl/s-taskin.ads
+++ b/gcc/ada/libgnarl/s-taskin.ads
@@ -773,6 +773,9 @@ package System.Tasking is
Environment_Task_Level : constant Master_Level := 1;
Independent_Task_Level : constant Master_Level := 2;
Library_Task_Level : constant Master_Level := 3;
+ -- Note that the value of Library_Task_Level is also hard coded in the
+ -- compiler, see Rtsfind.Library_Task_Level. The two should be kept in
+ -- sync.
-------------------
-- Priority info --
diff --git a/gcc/ada/libgnat/s-except.adb b/gcc/ada/libgnat/s-except.adb
index 4b874ca..fa220b3 100644
--- a/gcc/ada/libgnat/s-except.adb
+++ b/gcc/ada/libgnat/s-except.adb
@@ -29,17 +29,4 @@
-- --
------------------------------------------------------------------------------
--- This package does not require a body, since it is a package renaming. We
--- provide a dummy file containing a No_Body pragma so that previous versions
--- of the body (which did exist) will not interfere.
-
--- pragma No_Body;
-
--- The above pragma is commented out, since for now we can't use No_Body in
--- a unit marked as a Compiler_Unit, since this requires GNAT 6.1, and we
--- do not yet require this for bootstrapping. So instead we use a dummy Taft
--- amendment type to require the body:
-
-package body System.Exceptions is
- type Require_Body is new Integer;
-end System.Exceptions;
+pragma No_Body;
diff --git a/gcc/ada/libgnat/s-except.ads b/gcc/ada/libgnat/s-except.ads
index ae037ba..10448bc 100644
--- a/gcc/ada/libgnat/s-except.ads
+++ b/gcc/ada/libgnat/s-except.ads
@@ -34,30 +34,10 @@ pragma Compiler_Unit_Warning;
package System.Exceptions is
pragma Preelaborate;
- -- To let Ada.Exceptions "with" us and let us "with" Standard_Library
-
- ZCX_By_Default : constant Boolean;
- -- Visible copy to allow Ada.Exceptions to know the exception model
+ -- To let Ada.Exceptions "with" us
private
- type Require_Body;
- -- Dummy Taft-amendment type to make it legal (and required) to provide
- -- a body for this package.
- --
- -- We do this because this unit used to have a body in earlier versions
- -- of GNAT, and it causes various bootstrap path problems etc if we remove
- -- a body, since we may pick up old unwanted bodies.
- --
- -- Note: we use this standard Ada method of requiring a body rather
- -- than the cleaner pragma No_Body because System.Exceptions is a compiler
- -- unit, and older bootstrap compilers do not support pragma No_Body. This
- -- type can be removed, and s-except.adb can be replaced by a source
- -- containing just that pragma, when we decide to move to a 2008 compiler
- -- as the minimal bootstrap compiler version. ???
-
- ZCX_By_Default : constant Boolean := System.ZCX_By_Default;
-
Foreign_Exception : exception;
pragma Unreferenced (Foreign_Exception);
-- This hidden exception is used to represent non-Ada exception to
diff --git a/gcc/ada/libgnat/s-exponr.adb b/gcc/ada/libgnat/s-exponr.adb
index ece53b5..ad7f401 100644
--- a/gcc/ada/libgnat/s-exponr.adb
+++ b/gcc/ada/libgnat/s-exponr.adb
@@ -57,8 +57,8 @@ function System.Exponr (Left : Num; Right : Integer) return Num is
subtype Double_T is Double_Real.Double_T;
-- The double floating-point type
- subtype Negative is Integer range Integer'First .. -1;
- -- The range of negative exponents
+ subtype Safe_Negative is Integer range Integer'First + 1 .. -1;
+ -- The range of safe negative exponents
function Expon (Left : Num; Right : Natural) return Num;
-- Routine used if Right is greater than 4
@@ -113,9 +113,12 @@ begin
return Num'Machine (Sqr * Sqr);
end;
- when Negative =>
+ when Safe_Negative =>
return Num'Machine (1.0 / Exponr (Left, -Right));
+ when Integer'First =>
+ return Num'Machine (1.0 / (Exponr (Left, Integer'Last) * Left));
+
when others =>
return Num'Machine (Expon (Left, Right));
end case;
diff --git a/gcc/ada/par_sco.adb b/gcc/ada/par_sco.adb
index 638cb35..b4f7609 100644
--- a/gcc/ada/par_sco.adb
+++ b/gcc/ada/par_sco.adb
@@ -683,9 +683,12 @@ package body Par_SCO is
-- two levels (through the pragma argument association) to
-- get to the pragma node itself. For the guard on a select
-- alternative, we do not have access to the token location for
- -- the WHEN, so we use the first sloc of the condition itself
- -- (note: we use First_Sloc, not Sloc, because this is what is
- -- referenced by dominance markers).
+ -- the WHEN, so we use the first sloc of the condition itself.
+ -- First_Sloc gives the most sensible result, but we have to
+ -- beware of also using it when computing the dominance marker
+ -- sloc (in the Set_Statement_Entry procedure), as this is not
+ -- fully equivalent to the "To" sloc computed by
+ -- Sloc_Range (Guard, To, From).
-- Doesn't this requirement of using First_Sloc need to be
-- documented in the spec ???
@@ -1579,6 +1582,18 @@ package body Par_SCO is
To := No_Location;
end if;
+ -- Be consistent with the location determined in
+ -- Output_Header.
+
+ if Current_Dominant.K = 'T'
+ and then Nkind (Parent (Current_Dominant.N))
+ in N_Accept_Alternative
+ | N_Delay_Alternative
+ | N_Terminate_Alternative
+ then
+ From := First_Sloc (Current_Dominant.N);
+ end if;
+
Set_Raw_Table_Entry
(C1 => '>',
C2 => Current_Dominant.K,
@@ -1867,7 +1882,7 @@ package body Par_SCO is
Process_Decisions_Defer (Cond, 'G');
-- For an entry body with a barrier, the entry body
- -- is dominanted by a True evaluation of the barrier.
+ -- is dominated by a True evaluation of the barrier.
Inner_Dominant := ('T', N);
end if;
diff --git a/gcc/ada/restrict.adb b/gcc/ada/restrict.adb
index 60faa2a..3592230 100644
--- a/gcc/ada/restrict.adb
+++ b/gcc/ada/restrict.adb
@@ -66,7 +66,7 @@ package body Restrict is
No_Specification_Of_Aspects : array (Aspect_Id) of Source_Ptr :=
(others => No_Location);
- -- Entries in this array are set to point to a previously occuring pragma
+ -- Entries in this array are set to point to a previously occurring pragma
-- that activates a No_Specification_Of_Aspect check.
No_Specification_Of_Aspect_Warning : array (Aspect_Id) of Boolean :=
diff --git a/gcc/ada/rtsfind.ads b/gcc/ada/rtsfind.ads
index 39e4fb2..ef17cf2 100644
--- a/gcc/ada/rtsfind.ads
+++ b/gcc/ada/rtsfind.ads
@@ -29,6 +29,7 @@
-- not been explicitly With'ed.
with Types; use Types;
+with Uintp; use Uintp;
package Rtsfind is
@@ -1975,11 +1976,6 @@ package Rtsfind is
RE_Conditional_Call, -- System.Tasking
RE_Asynchronous_Call, -- System.Tasking
- RE_Foreign_Task_Level, -- System.Tasking
- RE_Environment_Task_Level, -- System.Tasking
- RE_Independent_Task_Level, -- System.Tasking
- RE_Library_Task_Level, -- System.Tasking
-
RE_Ada_Task_Control_Block, -- System.Tasking
RE_Task_List, -- System.Tasking
@@ -1996,7 +1992,6 @@ package Rtsfind is
RE_Task_Entry_Index, -- System.Tasking
RE_Self, -- System.Tasking
- RE_Master_Id, -- System.Tasking
RE_Unspecified_Priority, -- System.Tasking
RE_Activation_Chain, -- System.Tasking
@@ -3665,11 +3660,6 @@ package Rtsfind is
RE_Conditional_Call => System_Tasking,
RE_Asynchronous_Call => System_Tasking,
- RE_Foreign_Task_Level => System_Tasking,
- RE_Environment_Task_Level => System_Tasking,
- RE_Independent_Task_Level => System_Tasking,
- RE_Library_Task_Level => System_Tasking,
-
RE_Ada_Task_Control_Block => System_Tasking,
RE_Task_List => System_Tasking,
@@ -3686,7 +3676,6 @@ package Rtsfind is
RE_Task_Entry_Index => System_Tasking,
RE_Self => System_Tasking,
- RE_Master_Id => System_Tasking,
RE_Unspecified_Priority => System_Tasking,
RE_Activation_Chain => System_Tasking,
@@ -3994,6 +3983,9 @@ package Rtsfind is
System_Unsigned_Types => True,
others => False);
+ Library_Task_Level : constant Uint := Uint_3;
+ -- Corresponds to System.Tasking.Library_Task_Level
+
-----------------
-- Subprograms --
-----------------
diff --git a/gcc/ada/runtime.h b/gcc/ada/runtime.h
index 9bc091f..7721947 100644
--- a/gcc/ada/runtime.h
+++ b/gcc/ada/runtime.h
@@ -31,9 +31,11 @@
/* This file provides common definitions used by GNAT C runtime files. */
+/* The following include is here to meet the published VxWorks requirement
+ that the vxWorks.h header appear before any other header. */
#ifdef __vxworks
#include "vxWorks.h"
-#endif /* __vxworks */
+#endif
#ifndef ATTRIBUTE_UNUSED
#define ATTRIBUTE_UNUSED __attribute__((unused))
diff --git a/gcc/ada/sem_attr.adb b/gcc/ada/sem_attr.adb
index 83f53cd..63b0f09 100644
--- a/gcc/ada/sem_attr.adb
+++ b/gcc/ada/sem_attr.adb
@@ -10751,10 +10751,11 @@ package body Sem_Attr is
Nm : Node_Id;
Note : Boolean := True;
- -- Skip this for the case of Unrestricted_Access occuring in
- -- the context of a Valid check, since this otherwise leads
- -- to a missed warning (the Valid check does not really
- -- modify!) If this case, Note will be reset to False.
+ -- Skip this for the case of Unrestricted_Access occurring
+ -- in the context of a Valid check, since this otherwise
+ -- leads to a missed warning (the Valid check does not
+ -- really modify!) If this case, Note will be reset to
+ -- False.
-- Skip it as well if the type is an Access_To_Constant,
-- given that no use of the value can modify the prefix.
diff --git a/gcc/ada/sem_ch13.adb b/gcc/ada/sem_ch13.adb
index a9770db..3c3e351 100644
--- a/gcc/ada/sem_ch13.adb
+++ b/gcc/ada/sem_ch13.adb
@@ -3382,6 +3382,13 @@ package body Sem_Ch13 is
| Aspect_Interrupt_Priority
| Aspect_Priority
=>
+ -- Verify the expression is static when Static_Priorities is
+ -- enabled.
+
+ if not Is_OK_Static_Expression (Expr) then
+ Check_Restriction (Static_Priorities, Expr);
+ end if;
+
if Nkind (N) in N_Subprogram_Body | N_Subprogram_Declaration
then
-- Analyze the aspect expression
@@ -7992,6 +7999,15 @@ package body Sem_Ch13 is
("extra parentheses surrounding aggregate not allowed", Aggr);
return;
+ -- Reject the mixing of named and positional entries in the aggregate
+
+ elsif Present (Expressions (Aggr))
+ and then Present (Component_Associations (Aggr))
+ then
+ Error_Msg_N ("cannot mix positional and named entries in "
+ & "enumeration rep clause", N);
+ return;
+
-- All tests passed, so set rep clause in place
else
@@ -8006,7 +8022,7 @@ package body Sem_Ch13 is
Elit := First_Literal (Enumtype);
- -- First the positional entries if any
+ -- Process positional entries
if Present (Expressions (Aggr)) then
Expr := First (Expressions (Aggr));
@@ -8035,11 +8051,10 @@ package body Sem_Ch13 is
Next (Expr);
Next (Elit);
end loop;
- end if;
- -- Now process the named entries if present
+ -- Process named entries
- if Present (Component_Associations (Aggr)) then
+ elsif Present (Component_Associations (Aggr)) then
Assoc := First (Component_Associations (Aggr));
while Present (Assoc) loop
Choice := First (Choices (Assoc));
@@ -16578,18 +16593,7 @@ package body Sem_Ch13 is
-- here because the processing for generic instantiation always makes
-- subtypes, and we want the original frozen actual types.
- -- If we are dealing with private types, then do the check on their
- -- fully declared counterparts if the full declarations have been
- -- encountered (they don't have to be visible, but they must exist).
-
Source := Ancestor_Subtype (Etype (First_Formal (Act_Unit)));
-
- if Is_Private_Type (Source)
- and then Present (Underlying_Type (Source))
- then
- Source := Underlying_Type (Source);
- end if;
-
Target := Ancestor_Subtype (Etype (Act_Unit));
-- If either type is generic, the instantiation happens within a generic
@@ -16600,6 +16604,16 @@ package body Sem_Ch13 is
return;
end if;
+ -- If we are dealing with private types, then do the check on their
+ -- fully declared counterparts if the full declarations have been
+ -- encountered (they don't have to be visible, but they must exist).
+
+ if Is_Private_Type (Source)
+ and then Present (Underlying_Type (Source))
+ then
+ Source := Underlying_Type (Source);
+ end if;
+
if Is_Private_Type (Target)
and then Present (Underlying_Type (Target))
then
@@ -16692,8 +16706,8 @@ package body Sem_Ch13 is
-- in the same unit as the unchecked conversion, then set the flag
-- No_Strict_Aliasing (no strict aliasing is implicit here)
- if Is_Access_Type (Target) and then
- In_Same_Source_Unit (Target, N)
+ if Is_Access_Type (Target)
+ and then In_Same_Source_Unit (Target, N)
then
Set_No_Strict_Aliasing (Implementation_Base_Type (Target));
end if;
diff --git a/gcc/ada/sem_ch3.adb b/gcc/ada/sem_ch3.adb
index 03280e5..c6687b5 100644
--- a/gcc/ada/sem_ch3.adb
+++ b/gcc/ada/sem_ch3.adb
@@ -2083,21 +2083,10 @@ package body Sem_Ch3 is
end if;
end if;
- -- Avoid reporting spurious errors if the component is initialized with
- -- a raise expression (which is legal in any expression context)
-
- if Present (E)
- and then
- (Nkind (E) = N_Raise_Expression
- or else (Nkind (E) = N_Qualified_Expression
- and then Nkind (Expression (E)) = N_Raise_Expression))
- then
- null;
-
-- The parent type may be a private view with unknown discriminants,
-- and thus unconstrained. Regular components must be constrained.
- elsif not Is_Definite_Subtype (T)
+ if not Is_Definite_Subtype (T)
and then Chars (Id) /= Name_uParent
then
if Is_Class_Wide_Type (T) then
diff --git a/gcc/ada/sem_ch6.adb b/gcc/ada/sem_ch6.adb
index ed6b09a..d707b0e 100644
--- a/gcc/ada/sem_ch6.adb
+++ b/gcc/ada/sem_ch6.adb
@@ -9042,7 +9042,7 @@ package body Sem_Ch6 is
if Needs_BIP_Task_Actuals (E) then
Discard :=
Add_Extra_Formal
- (E, RTE (RE_Master_Id),
+ (E, Standard_Integer,
E, BIP_Formal_Suffix (BIP_Task_Master));
Set_Has_Master_Entity (E);
diff --git a/gcc/ada/sem_ch8.adb b/gcc/ada/sem_ch8.adb
index 8a1a13ca..26fc45f 100644
--- a/gcc/ada/sem_ch8.adb
+++ b/gcc/ada/sem_ch8.adb
@@ -4862,7 +4862,7 @@ package body Sem_Ch8 is
Pop_Scope;
- while not (Is_List_Member (Decl))
+ while not Is_List_Member (Decl)
or else Nkind (Parent (Decl)) in N_Protected_Definition
| N_Task_Definition
loop
diff --git a/gcc/ada/sem_res.adb b/gcc/ada/sem_res.adb
index a570385..3ca4569 100644
--- a/gcc/ada/sem_res.adb
+++ b/gcc/ada/sem_res.adb
@@ -3755,19 +3755,18 @@ package body Sem_Res is
begin
case Nkind (N) is
-
- -- Do not consider object name appearing in the prefix of
- -- attribute Address as a read.
-
- when N_Attribute_Reference =>
-
- -- Prefix of attribute Address denotes an object, program
- -- unit, or label; none of them needs to be flagged here.
-
- if Attribute_Name (N) = Name_Address then
- return Skip;
+ when N_Allocator =>
+ if not Is_OK_Volatile_Context (Context => Parent (N),
+ Obj_Ref => N,
+ Check_Actuals => True)
+ then
+ Error_Msg_N
+ ("allocator cannot appear in this context"
+ & " (SPARK RM 7.1.3(10))", N);
end if;
+ return Skip;
+
-- Do not consider nested function calls because they have
-- already been processed during their own resolution.
@@ -3780,6 +3779,10 @@ package body Sem_Res is
if Present (Id)
and then Is_Object (Id)
and then Is_Effectively_Volatile_For_Reading (Id)
+ and then
+ not Is_OK_Volatile_Context (Context => Parent (N),
+ Obj_Ref => N,
+ Check_Actuals => True)
then
Error_Msg_N
("volatile object cannot appear in this context"
@@ -3789,10 +3792,8 @@ package body Sem_Res is
return Skip;
when others =>
- null;
+ return OK;
end case;
-
- return OK;
end Flag_Object;
procedure Flag_Objects is new Traverse_Proc (Flag_Object);
@@ -4962,40 +4963,14 @@ package body Sem_Res is
if SPARK_Mode = On and then Comes_From_Source (A) then
- -- An effectively volatile object for reading may act as an
- -- actual when the corresponding formal is of a non-scalar
- -- effectively volatile type for reading (SPARK RM 7.1.3(10)).
-
- if not Is_Scalar_Type (F_Typ)
- and then Is_Effectively_Volatile_For_Reading (F_Typ)
- then
- null;
+ -- Inspect the expression and flag each effectively volatile
+ -- object for reading as illegal because it appears within
+ -- an interfering context. Note that this is usually done
+ -- in Resolve_Entity_Name, but when the effectively volatile
+ -- object for reading appears as an actual in a call, the call
+ -- must be resolved first.
- -- An effectively volatile object for reading may act as an
- -- actual in a call to an instance of Unchecked_Conversion.
- -- (SPARK RM 7.1.3(10)).
-
- elsif Is_Unchecked_Conversion_Instance (Nam) then
- null;
-
- -- The actual denotes an object
-
- elsif Is_Effectively_Volatile_Object_For_Reading (A) then
- Error_Msg_N
- ("volatile object cannot act as actual in a call (SPARK "
- & "RM 7.1.3(10))", A);
-
- -- Otherwise the actual denotes an expression. Inspect the
- -- expression and flag each effectively volatile object
- -- for reading as illegal because it apprears within an
- -- interfering context. Note that this is usually done in
- -- Resolve_Entity_Name, but when the effectively volatile
- -- object for reading appears as an actual in a call, the
- -- call must be resolved first.
-
- else
- Flag_Effectively_Volatile_Objects (A);
- end if;
+ Flag_Effectively_Volatile_Objects (A);
-- An effectively volatile variable cannot act as an actual
-- parameter in a procedure call when the variable has enabled
@@ -7701,8 +7676,7 @@ package body Sem_Res is
Expr : Node_Id) return Boolean
is
begin
- if Nkind (Context) in
- N_Assignment_Statement | N_Object_Declaration
+ if Nkind (Context) in N_Assignment_Statement | N_Object_Declaration
and then Expression (Context) = Expr
then
return True;
@@ -7744,6 +7718,11 @@ package body Sem_Res is
while Present (N) loop
if Nkind (N) = N_Attribute_Reference then
return True;
+
+ -- Prevent the search from going too far
+
+ elsif Is_Body_Or_Package_Declaration (N) then
+ return False;
end if;
N := Parent (N);
@@ -7886,7 +7865,8 @@ package body Sem_Res is
if Is_Object (E)
and then Is_Effectively_Volatile_For_Reading (E)
- and then not Is_OK_Volatile_Context (Par, N)
+ and then
+ not Is_OK_Volatile_Context (Par, N, Check_Actuals => False)
then
SPARK_Msg_N
("volatile object cannot appear in this context "
@@ -10532,8 +10512,57 @@ package body Sem_Res is
if Typ = Raise_Type then
Error_Msg_N ("cannot find unique type for raise expression", N);
Set_Etype (N, Any_Type);
+
else
Set_Etype (N, Typ);
+
+ -- Apply check for required parentheses in the enclosing
+ -- context of raise_expressions (RM 11.3 (2)), including default
+ -- expressions in contexts that can include aspect specifications,
+ -- and ancestor parts of extension aggregates.
+
+ declare
+ Par : Node_Id := Parent (N);
+ Parentheses_Found : Boolean := Paren_Count (N) > 0;
+
+ begin
+ while Present (Par)
+ and then Nkind (Par) in N_Has_Etype
+ loop
+ if Paren_Count (Par) > 0 then
+ Parentheses_Found := True;
+ end if;
+
+ if Nkind (Par) = N_Extension_Aggregate
+ and then N = Ancestor_Part (Par)
+ then
+ exit;
+ end if;
+
+ Par := Parent (Par);
+ end loop;
+
+ if not Parentheses_Found
+ and then Comes_From_Source (Par)
+ and then
+ ((Nkind (Par) in N_Modular_Type_Definition
+ | N_Floating_Point_Definition
+ | N_Ordinary_Fixed_Point_Definition
+ | N_Decimal_Fixed_Point_Definition
+ | N_Extension_Aggregate
+ | N_Discriminant_Specification
+ | N_Parameter_Specification
+ | N_Formal_Object_Declaration)
+
+ or else (Nkind (Par) = N_Object_Declaration
+ and then
+ Nkind (Parent (Par)) /= N_Extended_Return_Statement))
+ then
+ Error_Msg_N
+ ("raise_expression must be parenthesized in this context",
+ N);
+ end if;
+ end;
end if;
end Resolve_Raise_Expression;
@@ -12578,10 +12607,9 @@ package body Sem_Res is
-- the point where actions for the slice are analyzed). Note that this
-- is different from freezing the itype immediately, which might be
-- premature (e.g. if the slice is within a transient scope). This needs
- -- to be done only if expansion is enabled, or in GNATprove mode to
- -- capture the associated run-time exceptions if any.
+ -- to be done only if expansion is enabled.
- elsif Expander_Active or GNATprove_Mode then
+ elsif Expander_Active then
Ensure_Defined (Typ => Slice_Subtype, N => N);
end if;
end Set_Slice_Subtype;
diff --git a/gcc/ada/sem_util.adb b/gcc/ada/sem_util.adb
index c9a2c9f..6481d86 100644
--- a/gcc/ada/sem_util.adb
+++ b/gcc/ada/sem_util.adb
@@ -664,6 +664,15 @@ package body Sem_Util is
return Make_Level_Literal
(Scope_Depth (Enclosing_Dynamic_Scope (E)) + 1);
+ -- Check if E is an expansion-generated renaming of an iterator
+ -- by examining Related_Expression. If so, determine the
+ -- accessibility level based on the original expression.
+
+ elsif Ekind (E) in E_Constant | E_Variable
+ and then Present (Related_Expression (E))
+ then
+ return Accessibility_Level (Related_Expression (E));
+
-- Normal object - get the level of the enclosing scope
else
@@ -6955,19 +6964,30 @@ package body Sem_Util is
-----------------------------
function Current_Entity_In_Scope (N : Name_Id) return Entity_Id is
- E : Entity_Id;
CS : constant Entity_Id := Current_Scope;
- Transient_Case : constant Boolean := Scope_Is_Transient;
+ E : Entity_Id;
begin
E := Get_Name_Entity_Id (N);
- while Present (E)
- and then Scope (E) /= CS
- and then (not Transient_Case or else Scope (E) /= Scope (CS))
- loop
- E := Homonym (E);
- end loop;
+
+ if No (E) then
+ null;
+
+ elsif Scope_Is_Transient then
+ while Present (E) loop
+ exit when Scope (E) = CS or else Scope (E) = Scope (CS);
+
+ E := Homonym (E);
+ end loop;
+
+ else
+ while Present (E) loop
+ exit when Scope (E) = CS;
+
+ E := Homonym (E);
+ end loop;
+ end if;
return E;
end Current_Entity_In_Scope;
@@ -14614,6 +14634,8 @@ package body Sem_Util is
--------------------------------
function Incomplete_Or_Partial_View (Id : Entity_Id) return Entity_Id is
+ S : constant Entity_Id := Scope (Id);
+
function Inspect_Decls
(Decls : List_Id;
Taft : Boolean := False) return Entity_Id;
@@ -14682,7 +14704,13 @@ package body Sem_Util is
begin
-- Deferred constant or incomplete type case
- Prev := Current_Entity_In_Scope (Id);
+ Prev := Current_Entity (Id);
+
+ while Present (Prev) loop
+ exit when Scope (Prev) = S;
+
+ Prev := Homonym (Prev);
+ end loop;
if Present (Prev)
and then (Is_Incomplete_Type (Prev) or else Ekind (Prev) = E_Constant)
@@ -14695,13 +14723,12 @@ package body Sem_Util is
-- Private or Taft amendment type case
declare
- Pkg : constant Entity_Id := Scope (Id);
- Pkg_Decl : Node_Id := Pkg;
+ Pkg_Decl : Node_Id;
begin
- if Present (Pkg)
- and then Is_Package_Or_Generic_Package (Pkg)
- then
+ if Present (S) and then Is_Package_Or_Generic_Package (S) then
+ Pkg_Decl := S;
+
while Nkind (Pkg_Decl) /= N_Package_Specification loop
Pkg_Decl := Parent (Pkg_Decl);
end loop;
@@ -14726,7 +14753,7 @@ package body Sem_Util is
-- Taft amendment type. The incomplete view should be located in
-- the private declarations of the enclosing scope.
- elsif In_Package_Body (Pkg) then
+ elsif In_Package_Body (S) then
return Inspect_Decls (Private_Declarations (Pkg_Decl), True);
end if;
end if;
@@ -15440,7 +15467,9 @@ package body Sem_Util is
when N_Parameter_Association =>
return N = Explicit_Actual_Parameter (Parent (N));
- when N_Subprogram_Call =>
+ when N_Entry_Call_Statement
+ | N_Subprogram_Call
+ =>
return Is_List_Member (N)
and then
List_Containing (N) = Parameter_Associations (Parent (N));
@@ -18765,8 +18794,9 @@ package body Sem_Util is
----------------------------
function Is_OK_Volatile_Context
- (Context : Node_Id;
- Obj_Ref : Node_Id) return Boolean
+ (Context : Node_Id;
+ Obj_Ref : Node_Id;
+ Check_Actuals : Boolean) return Boolean
is
function Is_Protected_Operation_Call (Nod : Node_Id) return Boolean;
-- Determine whether an arbitrary node denotes a call to a protected
@@ -18841,21 +18871,14 @@ package body Sem_Util is
------------------------------
function Within_Volatile_Function (Id : Entity_Id) return Boolean is
- Func_Id : Entity_Id;
-
- begin
- -- Traverse the scope stack looking for a [generic] function
+ pragma Assert (Ekind (Id) = E_Return_Statement);
- Func_Id := Id;
- while Present (Func_Id) and then Func_Id /= Standard_Standard loop
- if Ekind (Func_Id) in E_Function | E_Generic_Function then
- return Is_Volatile_Function (Func_Id);
- end if;
+ Func_Id : constant Entity_Id := Return_Applies_To (Id);
- Func_Id := Scope (Func_Id);
- end loop;
+ begin
+ pragma Assert (Ekind (Func_Id) in E_Function | E_Generic_Function);
- return False;
+ return Is_Volatile_Function (Func_Id);
end Within_Volatile_Function;
-- Local variables
@@ -18865,9 +18888,26 @@ package body Sem_Util is
-- Start of processing for Is_OK_Volatile_Context
begin
+ -- Ignore context restriction when doing preanalysis, e.g. on a copy of
+ -- an expression function, because this copy is not fully decorated and
+ -- it is not possible to reliably decide the legality of the context.
+ -- Any violations will be reported anyway when doing the full analysis.
+
+ if not Full_Analysis then
+ return True;
+ end if;
+
+ -- For actual parameters within explicit parameter associations switch
+ -- the context to the corresponding subprogram call.
+
+ if Nkind (Context) = N_Parameter_Association then
+ return Is_OK_Volatile_Context (Context => Parent (Context),
+ Obj_Ref => Obj_Ref,
+ Check_Actuals => Check_Actuals);
+
-- The volatile object appears on either side of an assignment
- if Nkind (Context) = N_Assignment_Statement then
+ elsif Nkind (Context) = N_Assignment_Statement then
return True;
-- The volatile object is part of the initialization expression of
@@ -18885,7 +18925,7 @@ package body Sem_Util is
-- function is volatile.
if Is_Return_Object (Obj_Id) then
- return Within_Volatile_Function (Obj_Id);
+ return Within_Volatile_Function (Scope (Obj_Id));
-- Otherwise this is a normal object initialization
@@ -18936,8 +18976,9 @@ package body Sem_Util is
N_Slice
and then Prefix (Context) = Obj_Ref
and then Is_OK_Volatile_Context
- (Context => Parent (Context),
- Obj_Ref => Context)
+ (Context => Parent (Context),
+ Obj_Ref => Context,
+ Check_Actuals => Check_Actuals)
then
return True;
@@ -18969,8 +19010,9 @@ package body Sem_Util is
| N_Unchecked_Type_Conversion
and then Expression (Context) = Obj_Ref
and then Is_OK_Volatile_Context
- (Context => Parent (Context),
- Obj_Ref => Context)
+ (Context => Parent (Context),
+ Obj_Ref => Context,
+ Check_Actuals => Check_Actuals)
then
return True;
@@ -18985,17 +19027,43 @@ package body Sem_Util is
elsif Within_Check (Context) then
return True;
- -- Assume that references to effectively volatile objects that appear
- -- as actual parameters in a subprogram call are always legal. A full
- -- legality check is done when the actuals are resolved (see routine
- -- Resolve_Actuals).
+ -- References to effectively volatile objects that appear as actual
+ -- parameters in subprogram calls can be examined only after call itself
+ -- has been resolved. Before that, assume such references to be legal.
- elsif Within_Subprogram_Call (Context) then
- return True;
+ elsif Nkind (Context) in N_Subprogram_Call | N_Entry_Call_Statement then
+ if Check_Actuals then
+ declare
+ Call : Node_Id;
+ Formal : Entity_Id;
+ Subp : constant Entity_Id := Get_Called_Entity (Context);
+ begin
+ Find_Actual (Obj_Ref, Formal, Call);
+ pragma Assert (Call = Context);
- -- Otherwise the context is not suitable for an effectively volatile
- -- object.
+ -- An effectively volatile object may act as an actual when the
+ -- corresponding formal is of a non-scalar effectively volatile
+ -- type (SPARK RM 7.1.3(10)).
+ if not Is_Scalar_Type (Etype (Formal))
+ and then Is_Effectively_Volatile_For_Reading (Etype (Formal))
+ then
+ return True;
+
+ -- An effectively volatile object may act as an actual in a
+ -- call to an instance of Unchecked_Conversion. (SPARK RM
+ -- 7.1.3(10)).
+
+ elsif Is_Unchecked_Conversion_Instance (Subp) then
+ return True;
+
+ else
+ return False;
+ end if;
+ end;
+ else
+ return True;
+ end if;
else
return False;
end if;
@@ -21037,9 +21105,11 @@ package body Sem_Util is
begin
pragma Assert (Ekind (Func_Id) in E_Function | E_Generic_Function);
- -- A function declared within a protected type is volatile
+ -- A protected function is volatile
- if Is_Protected_Type (Scope (Func_Id)) then
+ if Nkind (Parent (Unit_Declaration_Node (Func_Id))) =
+ N_Protected_Definition
+ then
return True;
-- An instance of Ada.Unchecked_Conversion is a volatile function if
@@ -29509,36 +29579,6 @@ package body Sem_Util is
return Scope_Within_Or_Same (Scope (E), S);
end Within_Scope;
- ----------------------------
- -- Within_Subprogram_Call --
- ----------------------------
-
- function Within_Subprogram_Call (N : Node_Id) return Boolean is
- Par : Node_Id;
-
- begin
- -- Climb the parent chain looking for a function or procedure call
-
- Par := N;
- while Present (Par) loop
- if Nkind (Par) in N_Entry_Call_Statement
- | N_Function_Call
- | N_Procedure_Call_Statement
- then
- return True;
-
- -- Prevent the search from going too far
-
- elsif Is_Body_Or_Package_Declaration (Par) then
- exit;
- end if;
-
- Par := Parent (Par);
- end loop;
-
- return False;
- end Within_Subprogram_Call;
-
----------------
-- Wrong_Type --
----------------
diff --git a/gcc/ada/sem_util.ads b/gcc/ada/sem_util.ads
index a986ae6..b8ad382 100644
--- a/gcc/ada/sem_util.ads
+++ b/gcc/ada/sem_util.ads
@@ -1726,7 +1726,7 @@ package Sem_Util is
-- subprogram call.
function Is_Actual_Parameter (N : Node_Id) return Boolean;
- -- Determines if N is an actual parameter in a subprogram call
+ -- Determines if N is an actual parameter in a subprogram or entry call
function Is_Actual_Tagged_Parameter (N : Node_Id) return Boolean;
-- Determines if N is an actual parameter of a formal of tagged type in a
@@ -2117,11 +2117,16 @@ package Sem_Util is
-- conversions and hence variables.
function Is_OK_Volatile_Context
- (Context : Node_Id;
- Obj_Ref : Node_Id) return Boolean;
+ (Context : Node_Id;
+ Obj_Ref : Node_Id;
+ Check_Actuals : Boolean) return Boolean;
-- Determine whether node Context denotes a "non-interfering context" (as
-- defined in SPARK RM 7.1.3(10)) where volatile reference Obj_Ref can
- -- safely reside.
+ -- safely reside. When examining references that might be located within
+ -- actual parameters of a subprogram call that has not been resolved yet,
+ -- Check_Actuals should be False; such references will be assumed to be
+ -- legal. They will need to be checked again after subprogram call has
+ -- been resolved.
function Is_Package_Contract_Annotation (Item : Node_Id) return Boolean;
-- Determine whether aspect specification or pragma Item is one of the
@@ -3285,10 +3290,6 @@ package Sem_Util is
function Within_Scope (E : Entity_Id; S : Entity_Id) return Boolean;
-- Returns True if entity E is declared within scope S
- function Within_Subprogram_Call (N : Node_Id) return Boolean;
- -- Determine whether arbitrary node N appears in an entry, function, or
- -- procedure call.
-
procedure Wrong_Type (Expr : Node_Id; Expected_Type : Entity_Id);
-- Output error message for incorrectly typed expression. Expr is the node
-- for the incorrectly typed construct (Etype (Expr) is the type found),
diff --git a/gcc/ada/sinput.adb b/gcc/ada/sinput.adb
index df61856..e62bf45 100644
--- a/gcc/ada/sinput.adb
+++ b/gcc/ada/sinput.adb
@@ -933,7 +933,7 @@ package body Sinput is
procedure Sloc_Range (N : Node_Id; Min, Max : out Source_Ptr) is
- Indx : constant Source_File_Index := Get_Source_File_Index (Sloc (N));
+ Indx : constant Source_File_Index := Get_Source_File_Index (Sloc (N));
function Process (N : Node_Id) return Traverse_Result;
-- Process function for traversing the node tree
@@ -945,25 +945,22 @@ package body Sinput is
-------------
function Process (N : Node_Id) return Traverse_Result is
- Orig : constant Node_Id := Original_Node (N);
+ Loc : constant Source_Ptr := Sloc (Original_Node (N));
begin
-- Skip nodes that may have been added during expansion and
-- that originate in other units, such as code for contracts
-- in subprogram bodies.
- if Get_Source_File_Index (Sloc (Orig)) /= Indx then
+ if Get_Source_File_Index (Loc) /= Indx then
return Skip;
end if;
- if Sloc (Orig) < Min then
- if Sloc (Orig) > No_Location then
- Min := Sloc (Orig);
- end if;
-
- elsif Sloc (Orig) > Max then
- if Sloc (Orig) > No_Location then
- Max := Sloc (Orig);
+ if Loc > No_Location then
+ if Loc < Min then
+ Min := Loc;
+ elsif Loc > Max then
+ Max := Loc;
end if;
end if;
@@ -974,7 +971,7 @@ package body Sinput is
begin
Min := Sloc (N);
- Max := Sloc (N);
+ Max := Min;
Traverse (N);
end Sloc_Range;
diff --git a/gcc/ada/types.ads b/gcc/ada/types.ads
index 27c50ef..ef87a5a 100644
--- a/gcc/ada/types.ads
+++ b/gcc/ada/types.ads
@@ -773,7 +773,7 @@ package Types is
Overflow_Mode_Assertions : Overflow_Mode_Type;
-- This field indicates the mode for handling code generation and
-- overflow checking (if enabled) for intermediate expression values.
- -- This applies to any expression occuring inside assertions.
+ -- This applies to any expression occurring inside assertions.
end record;
-----------------------------------
diff --git a/gcc/ada/urealp.adb b/gcc/ada/urealp.adb
index 59d5c08..0f57043 100644
--- a/gcc/ada/urealp.adb
+++ b/gcc/ada/urealp.adb
@@ -270,23 +270,21 @@ package body Urealp is
15 => (Num => 53_385_559, Den => 45_392_361), -- 1.176091259055681
16 => (Num => 78_897_839, Den => 65_523_237)); -- 1.204119982655924
- function Scale (X : Int; R : Ratio) return Int;
+ function Scale (X : Uint; R : Ratio) return Int;
-- Compute the value of X scaled by R
-----------
-- Scale --
-----------
- function Scale (X : Int; R : Ratio) return Int is
- type Wide_Int is range -2**63 .. 2**63 - 1;
-
+ function Scale (X : Uint; R : Ratio) return Int is
begin
- return Int (Wide_Int (X) * Wide_Int (R.Num) / Wide_Int (R.Den));
+ return UI_To_Int (X * R.Num / R.Den);
end Scale;
begin
pragma Assert (U.Rbase /= 0);
- return Scale (UI_To_Int (U.Den), Logs (U.Rbase));
+ return Scale (U.Den, Logs (U.Rbase));
end Equivalent_Decimal_Exponent;
----------------
diff --git a/gcc/analyzer/ChangeLog b/gcc/analyzer/ChangeLog
index 400175a..b8f7a2b 100644
--- a/gcc/analyzer/ChangeLog
+++ b/gcc/analyzer/ChangeLog
@@ -1,3 +1,93 @@
+2021-06-15 David Malcolm <dmalcolm@redhat.com>
+
+ PR analyzer/99212
+ PR analyzer/101082
+ * engine.cc: Include "target.h".
+ (impl_run_checkers): Log BITS_BIG_ENDIAN, BYTES_BIG_ENDIAN, and
+ WORDS_BIG_ENDIAN.
+ * region-model-manager.cc
+ (region_model_manager::maybe_fold_binop): Move support for masking
+ via ARG0 & CST into...
+ (region_model_manager::maybe_undo_optimize_bit_field_compare):
+ ...this new function. Flatten by converting from nested
+ conditionals to a series of early return statements to reject
+ failures. Reject if type is not unsigned_char_type_node.
+ Handle BYTES_BIG_ENDIAN when determining which bits are bound
+ in the binding_map.
+ * region-model.h
+ (region_model_manager::maybe_undo_optimize_bit_field_compare):
+ New decl.
+ * store.cc (bit_range::dump): New function.
+ * store.h (bit_range::dump): New decl.
+
+2021-06-15 David Malcolm <dmalcolm@redhat.com>
+
+ * engine.cc (exploded_node::on_stmt): Handle __analyzer_dump_capacity.
+ (exploded_node::on_stmt): Drop m_sm_changes from on_stmt_flags.
+ (state_change_requires_new_enode_p): New function...
+ (exploded_graph::process_node): Call it, rather than querying
+ flags.m_sm_changes, so that dynamic-extent differences can also
+ trigger the splitting of nodes.
+ * exploded-graph.h (struct on_stmt_flags): Drop field m_sm_changes.
+ * program-state.cc (program_state::detect_leaks): Purge dead
+ heap-allocated regions from dynamic extents.
+ (selftest::test_program_state_1): Fix type of "size_in_bytes".
+ (selftest::test_program_state_merging): Likewise.
+ * region-model-impl-calls.cc
+ (region_model::impl_call_analyzer_dump_capacity): New.
+ (region_model::impl_call_free): Remove dynamic extents from the
+ freed region.
+ * region-model-reachability.h
+ (reachable_regions::begin_mutable_base_regs): New.
+ (reachable_regions::end_mutable_base_regs): New.
+ * region-model.cc: Include "tree-object-size.h".
+ (region_model::region_model): Support new field m_dynamic_extents.
+ (region_model::operator=): Likewise.
+ (region_model::operator==): Likewise.
+ (region_model::dump_to_pp): Dump sizes of dynamic regions.
+ (region_model::handle_unrecognized_call): Purge dynamic extents
+ from any regions that have escaped mutably:.
+ (region_model::get_capacity): New function.
+ (region_model::add_constraint): Unset dynamic extents when a
+ heap-allocated region's address is NULL.
+ (region_model::unbind_region_and_descendents): Purge dynamic
+ extents of unbound regions.
+ (region_model::can_merge_with_p): Call
+ m_dynamic_extents.can_merge_with_p.
+ (region_model::create_region_for_heap_alloc): Assert that
+ size_in_bytes's type is compatible with size_type_node. Update
+ for renaming of record_dynamic_extents to set_dynamic_extents.
+ (region_model::create_region_for_alloca): Likewise.
+ (region_model::record_dynamic_extents): Rename to...
+ (region_model::set_dynamic_extents): ...this. Assert that
+ size_in_bytes's type is compatible with size_type_node. Add it
+ to the m_dynamic_extents map.
+ (region_model::get_dynamic_extents): New.
+ (region_model::unset_dynamic_extents): New.
+ (selftest::test_state_merging): Fix type of "size".
+ (selftest::test_malloc_constraints): Likewise.
+ (selftest::test_malloc): Verify dynamic extents.
+ (selftest::test_alloca): Likewise.
+ * region-model.h (region_to_value_map::is_empty): New.
+ (region_model::dynamic_extents_t): New typedef.
+ (region_model::impl_call_analyzer_dump_capacity): New decl.
+ (region_model::get_dynamic_extents): New function.
+ (region_model::get_dynamic_extents): New decl.
+ (region_model::set_dynamic_extents): New decl.
+ (region_model::unset_dynamic_extents): New decl.
+ (region_model::get_capacity): New decl.
+ (region_model::record_dynamic_extents): Rename to set_dynamic_extents.
+ (region_model::m_dynamic_extents): New field.
+
+2021-06-15 David Malcolm <dmalcolm@redhat.com>
+
+ * region-model.cc (region_to_value_map::operator=): New.
+ (region_to_value_map::operator==): New.
+ (region_to_value_map::dump_to_pp): New.
+ (region_to_value_map::dump): New.
+ (region_to_value_map::can_merge_with_p): New.
+ * region-model.h (class region_to_value_map): New class.
+
2021-06-13 Trevor Saunders <tbsaunde@tbsaunde.org>
* call-string.cc (call_string::call_string): Use range based for
diff --git a/gcc/analyzer/engine.cc b/gcc/analyzer/engine.cc
index 50652b2..529965a 100644
--- a/gcc/analyzer/engine.cc
+++ b/gcc/analyzer/engine.cc
@@ -64,6 +64,7 @@ along with GCC; see the file COPYING3. If not see
#include "analyzer/bar-chart.h"
#include <zlib.h>
#include "plugin.h"
+#include "target.h"
/* For an overview, see gcc/doc/analyzer.texi. */
@@ -1185,6 +1186,8 @@ exploded_node::on_stmt (exploded_graph &eg,
to stderr. */
state->dump (eg.get_ext_state (), true);
}
+ else if (is_special_named_call_p (call, "__analyzer_dump_capacity", 1))
+ state->m_region_model->impl_call_analyzer_dump_capacity (call, &ctxt);
else if (is_special_named_call_p (call, "__analyzer_dump_path", 0))
{
/* Handle the builtin "__analyzer_dump_path" by queuing a
@@ -1237,7 +1240,6 @@ exploded_node::on_stmt (exploded_graph &eg,
if (terminate_path)
return on_stmt_flags::terminate_path ();
- bool any_sm_changes = false;
int sm_idx;
sm_state_map *smap;
FOR_EACH_VEC_ELT (old_state.m_checker_states, sm_idx, smap)
@@ -1276,14 +1278,12 @@ exploded_node::on_stmt (exploded_graph &eg,
/* Allow the state_machine to handle the stmt. */
if (sm.on_stmt (&sm_ctxt, snode, stmt))
unknown_side_effects = false;
- if (*old_smap != *new_smap)
- any_sm_changes = true;
}
if (const gcall *call = dyn_cast <const gcall *> (stmt))
state->m_region_model->on_call_post (call, unknown_side_effects, &ctxt);
- return on_stmt_flags (any_sm_changes);
+ return on_stmt_flags ();
}
/* Consider the effect of following superedge SUCC from this node.
@@ -2925,6 +2925,36 @@ stmt_requires_new_enode_p (const gimple *stmt,
return false;
}
+/* Return true if OLD_STATE and NEW_STATE are sufficiently different that
+ we should split enodes and create an exploded_edge separating them
+ (which makes it easier to identify state changes of intereset when
+ constructing checker_paths). */
+
+static bool
+state_change_requires_new_enode_p (const program_state &old_state,
+ const program_state &new_state)
+{
+ /* Changes in dynamic extents signify creations of heap/alloca regions
+ and resizings of heap regions; likely to be of interest in
+ diagnostic paths. */
+ if (old_state.m_region_model->get_dynamic_extents ()
+ != new_state.m_region_model->get_dynamic_extents ())
+ return true;
+
+ /* Changes in sm-state are of interest. */
+ int sm_idx;
+ sm_state_map *smap;
+ FOR_EACH_VEC_ELT (old_state.m_checker_states, sm_idx, smap)
+ {
+ const sm_state_map *old_smap = old_state.m_checker_states[sm_idx];
+ const sm_state_map *new_smap = new_state.m_checker_states[sm_idx];
+ if (*old_smap != *new_smap)
+ return true;
+ }
+
+ return false;
+}
+
/* The core of exploded_graph::process_worklist (the main analysis loop),
handling one node in the worklist.
@@ -3067,7 +3097,8 @@ exploded_graph::process_node (exploded_node *node)
next_state = next_state.prune_for_point (*this, next_point, node,
&uncertainty);
- if (flags.m_sm_changes || flag_analyzer_fine_grained)
+ if (flag_analyzer_fine_grained
+ || state_change_requires_new_enode_p (old_state, next_state))
{
program_point split_point
= program_point::before_stmt (point.get_supernode (),
@@ -4815,6 +4846,13 @@ impl_run_checkers (logger *logger)
{
LOG_SCOPE (logger);
+ if (logger)
+ {
+ logger->log ("BITS_BIG_ENDIAN: %i", BITS_BIG_ENDIAN ? 1 : 0);
+ logger->log ("BYTES_BIG_ENDIAN: %i", BYTES_BIG_ENDIAN ? 1 : 0);
+ logger->log ("WORDS_BIG_ENDIAN: %i", WORDS_BIG_ENDIAN ? 1 : 0);
+ }
+
/* If using LTO, ensure that the cgraph nodes have function bodies. */
cgraph_node *node;
FOR_EACH_FUNCTION_WITH_GIMPLE_BODY (node)
diff --git a/gcc/analyzer/exploded-graph.h b/gcc/analyzer/exploded-graph.h
index c67f7b7..eb1baef 100644
--- a/gcc/analyzer/exploded-graph.h
+++ b/gcc/analyzer/exploded-graph.h
@@ -198,33 +198,21 @@ class exploded_node : public dnode<eg_traits>
/* The result of on_stmt. */
struct on_stmt_flags
{
- on_stmt_flags (bool sm_changes)
- : m_sm_changes (sm_changes),
- m_terminate_path (false)
+ on_stmt_flags () : m_terminate_path (false)
{}
static on_stmt_flags terminate_path ()
{
- return on_stmt_flags (true, true);
+ return on_stmt_flags (true);
}
- static on_stmt_flags state_change (bool any_sm_changes)
- {
- return on_stmt_flags (any_sm_changes, false);
- }
-
- /* Did any sm-changes occur handling the stmt. */
- bool m_sm_changes : 1;
-
/* Should we stop analyzing this path (on_stmt may have already
added nodes/edges, e.g. when handling longjmp). */
bool m_terminate_path : 1;
private:
- on_stmt_flags (bool sm_changes,
- bool terminate_path)
- : m_sm_changes (sm_changes),
- m_terminate_path (terminate_path)
+ on_stmt_flags (bool terminate_path)
+ : m_terminate_path (terminate_path)
{}
};
diff --git a/gcc/analyzer/program-state.cc b/gcc/analyzer/program-state.cc
index 76959c1..67dd785 100644
--- a/gcc/analyzer/program-state.cc
+++ b/gcc/analyzer/program-state.cc
@@ -1270,6 +1270,15 @@ program_state::detect_leaks (const program_state &src_state,
/* Purge dead svals from constraints. */
dest_state.m_region_model->get_constraints ()->on_liveness_change
(maybe_dest_svalues, dest_state.m_region_model);
+
+ /* Purge dead heap-allocated regions from dynamic extents. */
+ for (const svalue *sval : dead_svals)
+ if (const region_svalue *region_sval = sval->dyn_cast_region_svalue ())
+ {
+ const region *reg = region_sval->get_pointee ();
+ if (reg->get_kind () == RK_HEAP_ALLOCATED)
+ dest_state.m_region_model->unset_dynamic_extents (reg);
+ }
}
#if CHECKING_P
@@ -1426,7 +1435,7 @@ test_program_state_1 ()
program_state s (ext_state);
region_model *model = s.m_region_model;
const svalue *size_in_bytes
- = mgr->get_or_create_unknown_svalue (integer_type_node);
+ = mgr->get_or_create_unknown_svalue (size_type_node);
const region *new_reg = model->create_region_for_heap_alloc (size_in_bytes);
const svalue *ptr_sval = mgr->get_ptr_svalue (ptr_type_node, new_reg);
model->set_value (model->get_lvalue (p, NULL),
@@ -1482,7 +1491,7 @@ test_program_state_merging ()
region_model *model0 = s0.m_region_model;
const svalue *size_in_bytes
- = mgr->get_or_create_unknown_svalue (integer_type_node);
+ = mgr->get_or_create_unknown_svalue (size_type_node);
const region *new_reg = model0->create_region_for_heap_alloc (size_in_bytes);
const svalue *ptr_sval = mgr->get_ptr_svalue (ptr_type_node, new_reg);
model0->set_value (model0->get_lvalue (p, &ctxt),
diff --git a/gcc/analyzer/region-model-impl-calls.cc b/gcc/analyzer/region-model-impl-calls.cc
index 4052bb39..099520a 100644
--- a/gcc/analyzer/region-model-impl-calls.cc
+++ b/gcc/analyzer/region-model-impl-calls.cc
@@ -206,6 +206,25 @@ region_model::impl_call_analyzer_describe (const gcall *call,
warning_at (call->location, 0, "svalue: %qs", desc.m_buffer);
}
+/* Handle a call to "__analyzer_dump_capacity".
+
+ Emit a warning describing the capacity of the base region of
+ the region pointed to by the 1st argument.
+ This is for use when debugging, and may be of use in DejaGnu tests. */
+
+void
+region_model::impl_call_analyzer_dump_capacity (const gcall *call,
+ region_model_context *ctxt)
+{
+ tree t_ptr = gimple_call_arg (call, 0);
+ const svalue *sval_ptr = get_rvalue (t_ptr, ctxt);
+ const region *reg = deref_rvalue (sval_ptr, t_ptr, ctxt);
+ const region *base_reg = reg->get_base_region ();
+ const svalue *capacity = get_capacity (base_reg);
+ label_text desc = capacity->get_desc (true);
+ warning_at (call->location, 0, "capacity: %qs", desc.m_buffer);
+}
+
/* Handle a call to "__analyzer_eval" by evaluating the input
and dumping as a dummy warning, so that test cases can use
dg-warning to validate the result (and so unexpected warnings will
@@ -312,6 +331,7 @@ region_model::impl_call_free (const call_details &cd)
poisoning pointers. */
const region *freed_reg = ptr_to_region_sval->get_pointee ();
unbind_region_and_descendents (freed_reg, POISON_KIND_FREED);
+ m_dynamic_extents.remove (freed_reg);
}
}
diff --git a/gcc/analyzer/region-model-manager.cc b/gcc/analyzer/region-model-manager.cc
index 0ca0c8a..621eff0 100644
--- a/gcc/analyzer/region-model-manager.cc
+++ b/gcc/analyzer/region-model-manager.cc
@@ -431,6 +431,60 @@ region_model_manager::get_or_create_cast (tree type, const svalue *arg)
return get_or_create_unaryop (type, op, arg);
}
+/* Subroutine of region_model_manager::maybe_fold_binop for handling
+ (TYPE)(COMPOUND_SVAL BIT_AND_EXPR CST) that may have been generated by
+ optimize_bit_field_compare, where CST is from ARG1.
+
+ Support masking out bits from a compound_svalue for comparing a bitfield
+ against a value, as generated by optimize_bit_field_compare for
+ BITFIELD == VALUE.
+
+ If COMPOUND_SVAL has a value for the appropriate bits, return it,
+ shifted accordingly.
+ Otherwise return NULL. */
+
+const svalue *
+region_model_manager::
+maybe_undo_optimize_bit_field_compare (tree type,
+ const compound_svalue *compound_sval,
+ tree cst,
+ const svalue *arg1)
+{
+ if (type != unsigned_char_type_node)
+ return NULL;
+
+ const binding_map &map = compound_sval->get_map ();
+ unsigned HOST_WIDE_INT mask = TREE_INT_CST_LOW (cst);
+ /* If "mask" is a contiguous range of set bits, see if the
+ compound_sval has a value for those bits. */
+ bit_range bits (0, 0);
+ if (!bit_range::from_mask (mask, &bits))
+ return NULL;
+
+ bit_range bound_bits (bits);
+ if (BYTES_BIG_ENDIAN)
+ bound_bits = bit_range (BITS_PER_UNIT - bits.get_next_bit_offset (),
+ bits.m_size_in_bits);
+ const concrete_binding *conc
+ = get_store_manager ()->get_concrete_binding (bound_bits, BK_direct);
+ const svalue *sval = map.get (conc);
+ if (!sval)
+ return NULL;
+
+ /* We have a value;
+ shift it by the correct number of bits. */
+ const svalue *lhs = get_or_create_cast (type, sval);
+ HOST_WIDE_INT bit_offset = bits.get_start_bit_offset ().to_shwi ();
+ tree shift_amt = build_int_cst (type, bit_offset);
+ const svalue *shift_sval = get_or_create_constant_svalue (shift_amt);
+ const svalue *shifted_sval = get_or_create_binop (type, LSHIFT_EXPR,
+ lhs, shift_sval);
+ /* Reapply the mask (needed for negative
+ signed bitfields). */
+ return get_or_create_binop (type, BIT_AND_EXPR,
+ shifted_sval, arg1);
+}
+
/* Subroutine of region_model_manager::get_or_create_binop.
Attempt to fold the inputs and return a simpler svalue *.
Otherwise, return NULL. */
@@ -485,43 +539,13 @@ region_model_manager::maybe_fold_binop (tree type, enum tree_code op,
/* "(ARG0 & 0)" -> "0". */
return get_or_create_constant_svalue (build_int_cst (type, 0));
- /* Support masking out bits from a compound_svalue, as this
- is generated when accessing bitfields. */
if (const compound_svalue *compound_sval
= arg0->dyn_cast_compound_svalue ())
- {
- const binding_map &map = compound_sval->get_map ();
- unsigned HOST_WIDE_INT mask = TREE_INT_CST_LOW (cst1);
- /* If "mask" is a contiguous range of set bits, see if the
- compound_sval has a value for those bits. */
- bit_range bits (0, 0);
- if (bit_range::from_mask (mask, &bits))
- {
- const concrete_binding *conc
- = get_store_manager ()->get_concrete_binding (bits,
- BK_direct);
- if (const svalue *sval = map.get (conc))
- {
- /* We have a value;
- shift it by the correct number of bits. */
- const svalue *lhs = get_or_create_cast (type, sval);
- HOST_WIDE_INT bit_offset
- = bits.get_start_bit_offset ().to_shwi ();
- tree shift_amt = build_int_cst (type, bit_offset);
- const svalue *shift_sval
- = get_or_create_constant_svalue (shift_amt);
- const svalue *shifted_sval
- = get_or_create_binop (type,
- LSHIFT_EXPR,
- lhs, shift_sval);
- /* Reapply the mask (needed for negative
- signed bitfields). */
- return get_or_create_binop (type,
- BIT_AND_EXPR,
- shifted_sval, arg1);
- }
- }
- }
+ if (const svalue *sval
+ = maybe_undo_optimize_bit_field_compare (type,
+ compound_sval,
+ cst1, arg1))
+ return sval;
}
break;
case TRUTH_ANDIF_EXPR:
diff --git a/gcc/analyzer/region-model-reachability.h b/gcc/analyzer/region-model-reachability.h
index c6a21e9..57daf72 100644
--- a/gcc/analyzer/region-model-reachability.h
+++ b/gcc/analyzer/region-model-reachability.h
@@ -89,6 +89,14 @@ public:
{
return m_mutable_svals.end ();
}
+ hash_set<const region *>::iterator begin_mutable_base_regs ()
+ {
+ return m_mutable_base_regs.begin ();
+ }
+ hash_set<const region *>::iterator end_mutable_base_regs ()
+ {
+ return m_mutable_base_regs.end ();
+ }
void dump_to_pp (pretty_printer *pp) const;
diff --git a/gcc/analyzer/region-model.cc b/gcc/analyzer/region-model.cc
index 4b9620d..e02a897 100644
--- a/gcc/analyzer/region-model.cc
+++ b/gcc/analyzer/region-model.cc
@@ -66,6 +66,7 @@ along with GCC; see the file COPYING3. If not see
#include "analyzer/analyzer-selftests.h"
#include "stor-layout.h"
#include "attribs.h"
+#include "tree-object-size.h"
#if ENABLE_ANALYZER
@@ -110,12 +111,123 @@ print_quoted_type (pretty_printer *pp, tree t)
pp_end_quote (pp, pp_show_color (pp));
}
+/* class region_to_value_map. */
+
+/* Assignment operator for region_to_value_map. */
+
+region_to_value_map &
+region_to_value_map::operator= (const region_to_value_map &other)
+{
+ m_hash_map.empty ();
+ for (auto iter : other.m_hash_map)
+ {
+ const region *reg = iter.first;
+ const svalue *sval = iter.second;
+ m_hash_map.put (reg, sval);
+ }
+ return *this;
+}
+
+/* Equality operator for region_to_value_map. */
+
+bool
+region_to_value_map::operator== (const region_to_value_map &other) const
+{
+ if (m_hash_map.elements () != other.m_hash_map.elements ())
+ return false;
+
+ for (auto iter : *this)
+ {
+ const region *reg = iter.first;
+ const svalue *sval = iter.second;
+ const svalue * const *other_slot = other.get (reg);
+ if (other_slot == NULL)
+ return false;
+ if (sval != *other_slot)
+ return false;
+ }
+
+ return true;
+}
+
+/* Dump this object to PP. */
+
+void
+region_to_value_map::dump_to_pp (pretty_printer *pp, bool simple,
+ bool multiline) const
+{
+ auto_vec<const region *> regs;
+ for (iterator iter = begin (); iter != end (); ++iter)
+ regs.safe_push ((*iter).first);
+ regs.qsort (region::cmp_ptr_ptr);
+ if (multiline)
+ pp_newline (pp);
+ else
+ pp_string (pp, " {");
+ unsigned i;
+ const region *reg;
+ FOR_EACH_VEC_ELT (regs, i, reg)
+ {
+ if (multiline)
+ pp_string (pp, " ");
+ else if (i > 0)
+ pp_string (pp, ", ");
+ reg->dump_to_pp (pp, simple);
+ pp_string (pp, ": ");
+ const svalue *sval = *get (reg);
+ sval->dump_to_pp (pp, true);
+ if (multiline)
+ pp_newline (pp);
+ }
+ if (!multiline)
+ pp_string (pp, "}");
+}
+
+/* Dump this object to stderr. */
+
+DEBUG_FUNCTION void
+region_to_value_map::dump (bool simple) const
+{
+ pretty_printer pp;
+ pp_format_decoder (&pp) = default_tree_printer;
+ pp_show_color (&pp) = pp_show_color (global_dc->printer);
+ pp.buffer->stream = stderr;
+ dump_to_pp (&pp, simple, true);
+ pp_newline (&pp);
+ pp_flush (&pp);
+}
+
+
+/* Attempt to merge THIS with OTHER, writing the result
+ to OUT.
+
+ For now, write (region, value) mappings that are in common between THIS
+ and OTHER to OUT, effectively taking the intersection, rather than
+ rejecting differences. */
+
+bool
+region_to_value_map::can_merge_with_p (const region_to_value_map &other,
+ region_to_value_map *out) const
+{
+ for (auto iter : *this)
+ {
+ const region *iter_reg = iter.first;
+ const svalue *iter_sval = iter.second;
+ const svalue * const * other_slot = other.get (iter_reg);
+ if (other_slot)
+ if (iter_sval == *other_slot)
+ out->put (iter_reg, iter_sval);
+ }
+ return true;
+}
+
/* class region_model. */
/* Ctor for region_model: construct an "empty" model. */
region_model::region_model (region_model_manager *mgr)
-: m_mgr (mgr), m_store (), m_current_frame (NULL)
+: m_mgr (mgr), m_store (), m_current_frame (NULL),
+ m_dynamic_extents ()
{
m_constraints = new constraint_manager (mgr);
}
@@ -125,7 +237,8 @@ region_model::region_model (region_model_manager *mgr)
region_model::region_model (const region_model &other)
: m_mgr (other.m_mgr), m_store (other.m_store),
m_constraints (new constraint_manager (*other.m_constraints)),
- m_current_frame (other.m_current_frame)
+ m_current_frame (other.m_current_frame),
+ m_dynamic_extents (other.m_dynamic_extents)
{
}
@@ -151,6 +264,8 @@ region_model::operator= (const region_model &other)
m_current_frame = other.m_current_frame;
+ m_dynamic_extents = other.m_dynamic_extents;
+
return *this;
}
@@ -175,6 +290,9 @@ region_model::operator== (const region_model &other) const
if (m_current_frame != other.m_current_frame)
return false;
+ if (m_dynamic_extents != other.m_dynamic_extents)
+ return false;
+
gcc_checking_assert (hash () == other.hash ());
return true;
@@ -236,6 +354,13 @@ region_model::dump_to_pp (pretty_printer *pp, bool simple,
m_constraints->dump_to_pp (pp, multiline);
if (!multiline)
pp_string (pp, "}");
+
+ /* Dump sizes of dynamic regions, if any are known. */
+ if (!m_dynamic_extents.is_empty ())
+ {
+ pp_string (pp, "dynamic_extents:");
+ m_dynamic_extents.dump_to_pp (pp, simple, multiline);
+ }
}
/* Dump a representation of this model to FILE. */
@@ -1030,6 +1155,17 @@ region_model::handle_unrecognized_call (const gcall *call,
/* Update bindings for all clusters that have escaped, whether above,
or previously. */
m_store.on_unknown_fncall (call, m_mgr->get_store_manager ());
+
+ /* Purge dynamic extents from any regions that have escaped mutably:
+ realloc could have been called on them. */
+ for (hash_set<const region *>::iterator
+ iter = reachable_regs.begin_mutable_base_regs ();
+ iter != reachable_regs.end_mutable_base_regs ();
+ ++iter)
+ {
+ const region *base_reg = (*iter);
+ unset_dynamic_extents (base_reg);
+ }
}
/* Traverse the regions in this model, determining what regions are
@@ -1862,6 +1998,41 @@ region_model::check_for_writable_region (const region* dest_reg,
}
}
+/* Get the capacity of REG in bytes. */
+
+const svalue *
+region_model::get_capacity (const region *reg) const
+{
+ switch (reg->get_kind ())
+ {
+ default:
+ break;
+ case RK_DECL:
+ {
+ const decl_region *decl_reg = as_a <const decl_region *> (reg);
+ tree decl = decl_reg->get_decl ();
+ if (TREE_CODE (decl) == SSA_NAME)
+ {
+ tree type = TREE_TYPE (decl);
+ tree size = TYPE_SIZE (type);
+ return get_rvalue (size, NULL);
+ }
+ else
+ {
+ tree size = decl_init_size (decl, false);
+ if (size)
+ return get_rvalue (size, NULL);
+ }
+ }
+ break;
+ }
+
+ if (const svalue *recorded = get_dynamic_extents (reg))
+ return recorded;
+
+ return m_mgr->get_or_create_unknown_svalue (sizetype);
+}
+
/* Set the value of the region given by LHS_REG to the value given
by RHS_SVAL. */
@@ -2131,6 +2302,12 @@ region_model::add_constraint (tree lhs, enum tree_code op, tree rhs,
if (ctxt)
ctxt->on_condition (lhs, op, rhs);
+ /* If we have &REGION == NULL, then drop dynamic extents for REGION (for
+ the case where REGION is heap-allocated and thus could be NULL). */
+ if (op == EQ_EXPR && zerop (rhs))
+ if (const region_svalue *region_sval = lhs_sval->dyn_cast_region_svalue ())
+ unset_dynamic_extents (region_sval->get_pointee ());
+
return true;
}
@@ -3036,7 +3213,8 @@ region_model::get_frame_at_index (int index) const
/* Unbind svalues for any regions in REG and below.
Find any pointers to such regions; convert them to
- poisoned values of kind PKIND. */
+ poisoned values of kind PKIND.
+ Also purge any dynamic extents. */
void
region_model::unbind_region_and_descendents (const region *reg,
@@ -3057,6 +3235,15 @@ region_model::unbind_region_and_descendents (const region *reg,
/* Find any pointers to REG or its descendents; convert to poisoned. */
poison_any_pointers_to_descendents (reg, pkind);
+
+ /* Purge dynamic extents of any base regions in REG and below
+ (e.g. VLAs and alloca stack regions). */
+ for (auto iter : m_dynamic_extents)
+ {
+ const region *iter_reg = iter.first;
+ if (iter_reg->descendent_of_p (reg))
+ unset_dynamic_extents (iter_reg);
+ }
}
/* Implementation of BindingVisitor.
@@ -3131,6 +3318,10 @@ region_model::can_merge_with_p (const region_model &other_model,
&m))
return false;
+ if (!m_dynamic_extents.can_merge_with_p (other_model.m_dynamic_extents,
+ &out_model->m_dynamic_extents))
+ return false;
+
/* Merge constraints. */
constraint_manager::merge (*m_constraints,
*other_model.m_constraints,
@@ -3212,7 +3403,8 @@ const region *
region_model::create_region_for_heap_alloc (const svalue *size_in_bytes)
{
const region *reg = m_mgr->create_region_for_heap_alloc ();
- record_dynamic_extents (reg, size_in_bytes);
+ assert_compat_types (size_in_bytes->get_type (), size_type_node);
+ set_dynamic_extents (reg, size_in_bytes);
return reg;
}
@@ -3223,18 +3415,38 @@ const region *
region_model::create_region_for_alloca (const svalue *size_in_bytes)
{
const region *reg = m_mgr->create_region_for_alloca (m_current_frame);
- record_dynamic_extents (reg, size_in_bytes);
+ assert_compat_types (size_in_bytes->get_type (), size_type_node);
+ set_dynamic_extents (reg, size_in_bytes);
return reg;
}
-/* Placeholder hook for recording that the size of REG is SIZE_IN_BYTES.
- Currently does nothing. */
+/* Record that the size of REG is SIZE_IN_BYTES. */
void
-region_model::
-record_dynamic_extents (const region *reg ATTRIBUTE_UNUSED,
- const svalue *size_in_bytes ATTRIBUTE_UNUSED)
+region_model::set_dynamic_extents (const region *reg,
+ const svalue *size_in_bytes)
+{
+ assert_compat_types (size_in_bytes->get_type (), size_type_node);
+ m_dynamic_extents.put (reg, size_in_bytes);
+}
+
+/* Get the recording of REG in bytes, or NULL if no dynamic size was
+ recorded. */
+
+const svalue *
+region_model::get_dynamic_extents (const region *reg) const
{
+ if (const svalue * const *slot = m_dynamic_extents.get (reg))
+ return *slot;
+ return NULL;
+}
+
+/* Unset any recorded dynamic size of REG. */
+
+void
+region_model::unset_dynamic_extents (const region *reg)
+{
+ m_dynamic_extents.remove (reg);
}
/* struct model_merger. */
@@ -4534,7 +4746,7 @@ test_state_merging ()
{
test_region_model_context ctxt;
region_model model0 (&mgr);
- tree size = build_int_cst (integer_type_node, 1024);
+ tree size = build_int_cst (size_type_node, 1024);
const svalue *size_sval = mgr.get_or_create_constant_svalue (size);
const region *new_reg = model0.create_region_for_heap_alloc (size_sval);
const svalue *ptr_sval = mgr.get_ptr_svalue (ptr_type_node, new_reg);
@@ -4924,7 +5136,7 @@ test_malloc_constraints ()
tree null_ptr = build_int_cst (ptr_type_node, 0);
const svalue *size_in_bytes
- = mgr.get_or_create_unknown_svalue (integer_type_node);
+ = mgr.get_or_create_unknown_svalue (size_type_node);
const region *reg = model.create_region_for_heap_alloc (size_in_bytes);
const svalue *sval = mgr.get_ptr_svalue (ptr_type_node, reg);
model.set_value (model.get_lvalue (p, NULL), sval, NULL);
@@ -5149,7 +5361,7 @@ test_malloc ()
const region *reg = model.create_region_for_heap_alloc (size_sval);
const svalue *ptr = mgr.get_ptr_svalue (int_star, reg);
model.set_value (model.get_lvalue (p, &ctxt), ptr, &ctxt);
- // TODO: verify dynamic extents
+ ASSERT_EQ (model.get_capacity (reg), size_sval);
}
/* Verify that alloca works. */
@@ -5184,7 +5396,7 @@ test_alloca ()
ASSERT_EQ (reg->get_parent_region (), frame_reg);
const svalue *ptr = mgr.get_ptr_svalue (int_star, reg);
model.set_value (model.get_lvalue (p, &ctxt), ptr, &ctxt);
- // TODO: verify dynamic extents
+ ASSERT_EQ (model.get_capacity (reg), size_sval);
/* Verify that the pointers to the alloca region are replaced by
poisoned values when the frame is popped. */
diff --git a/gcc/analyzer/region-model.h b/gcc/analyzer/region-model.h
index e251a5b..7b12d35 100644
--- a/gcc/analyzer/region-model.h
+++ b/gcc/analyzer/region-model.h
@@ -128,6 +128,53 @@ one_way_id_map<T>::update (T *id) const
*id = get_dst_for_src (*id);
}
+/* A mapping from region to svalue for use when tracking state. */
+
+class region_to_value_map
+{
+public:
+ typedef hash_map<const region *, const svalue *> hash_map_t;
+ typedef hash_map_t::iterator iterator;
+
+ region_to_value_map () : m_hash_map () {}
+ region_to_value_map (const region_to_value_map &other)
+ : m_hash_map (other.m_hash_map) {}
+ region_to_value_map &operator= (const region_to_value_map &other);
+
+ bool operator== (const region_to_value_map &other) const;
+ bool operator!= (const region_to_value_map &other) const
+ {
+ return !(*this == other);
+ }
+
+ iterator begin () const { return m_hash_map.begin (); }
+ iterator end () const { return m_hash_map.end (); }
+
+ const svalue * const *get (const region *reg) const
+ {
+ return const_cast <hash_map_t &> (m_hash_map).get (reg);
+ }
+ void put (const region *reg, const svalue *sval)
+ {
+ m_hash_map.put (reg, sval);
+ }
+ void remove (const region *reg)
+ {
+ m_hash_map.remove (reg);
+ }
+
+ bool is_empty () const { return m_hash_map.is_empty (); }
+
+ void dump_to_pp (pretty_printer *pp, bool simple, bool multiline) const;
+ void dump (bool simple) const;
+
+ bool can_merge_with_p (const region_to_value_map &other,
+ region_to_value_map *out) const;
+
+private:
+ hash_map_t m_hash_map;
+};
+
/* Various operations delete information from a region_model.
This struct tracks how many of each kind of entity were purged (e.g.
@@ -273,6 +320,9 @@ private:
const svalue *maybe_fold_sub_svalue (tree type,
const svalue *parent_svalue,
const region *subregion);
+ const svalue *maybe_undo_optimize_bit_field_compare (tree type,
+ const compound_svalue *compound_sval,
+ tree cst, const svalue *arg1);
unsigned m_next_region_id;
root_region m_root_region;
@@ -405,12 +455,16 @@ private:
a tree of regions, along with their associated values.
The representation is graph-like because values can be pointers to
regions.
- It also stores a constraint_manager, capturing relationships between
- the values. */
+ It also stores:
+ - a constraint_manager, capturing relationships between the values, and
+ - dynamic extents, mapping dynamically-allocated regions to svalues (their
+ capacities). */
class region_model
{
public:
+ typedef region_to_value_map dynamic_extents_t;
+
region_model (region_model_manager *mgr);
region_model (const region_model &other);
~region_model ();
@@ -450,6 +504,8 @@ class region_model
bool impl_call_alloca (const call_details &cd);
void impl_call_analyzer_describe (const gcall *call,
region_model_context *ctxt);
+ void impl_call_analyzer_dump_capacity (const gcall *call,
+ region_model_context *ctxt);
void impl_call_analyzer_eval (const gcall *call,
region_model_context *ctxt);
bool impl_call_builtin_expect (const call_details &cd);
@@ -561,6 +617,16 @@ class region_model
store *get_store () { return &m_store; }
const store *get_store () const { return &m_store; }
+ const dynamic_extents_t &
+ get_dynamic_extents () const
+ {
+ return m_dynamic_extents;
+ }
+ const svalue *get_dynamic_extents (const region *reg) const;
+ void set_dynamic_extents (const region *reg,
+ const svalue *size_in_bytes);
+ void unset_dynamic_extents (const region *reg);
+
region_model_manager *get_manager () const { return m_mgr; }
void unbind_region_and_descendents (const region *reg,
@@ -584,6 +650,8 @@ class region_model
void loop_replay_fixup (const region_model *dst_state);
+ const svalue *get_capacity (const region *reg) const;
+
private:
const region *get_lvalue_1 (path_var pv, region_model_context *ctxt) const;
const svalue *get_rvalue_1 (path_var pv, region_model_context *ctxt) const;
@@ -631,9 +699,6 @@ class region_model
void on_top_level_param (tree param, region_model_context *ctxt);
- void record_dynamic_extents (const region *reg,
- const svalue *size_in_bytes);
-
bool called_from_main_p () const;
const svalue *get_initial_value_for_global (const region *reg) const;
@@ -648,6 +713,12 @@ class region_model
constraint_manager *m_constraints; // TODO: embed, rather than dynalloc?
const frame_region *m_current_frame;
+
+ /* Map from base region to size in bytes, for tracking the sizes of
+ dynamically-allocated regions.
+ This is part of the region_model rather than the region to allow for
+ memory regions to be resized (e.g. by realloc). */
+ dynamic_extents_t m_dynamic_extents;
};
/* Some region_model activity could lead to warnings (e.g. attempts to use an
diff --git a/gcc/analyzer/store.cc b/gcc/analyzer/store.cc
index 699de94..d75fb2c 100644
--- a/gcc/analyzer/store.cc
+++ b/gcc/analyzer/store.cc
@@ -249,6 +249,18 @@ bit_range::dump_to_pp (pretty_printer *pp) const
pp_wide_int (pp, get_next_bit_offset (), SIGNED);
}
+/* Dump this object to stderr. */
+
+DEBUG_FUNCTION void
+bit_range::dump () const
+{
+ pretty_printer pp;
+ pp.buffer->stream = stderr;
+ dump_to_pp (&pp);
+ pp_newline (&pp);
+ pp_flush (&pp);
+}
+
int
bit_range::cmp (const bit_range &br1, const bit_range &br2)
{
diff --git a/gcc/analyzer/store.h b/gcc/analyzer/store.h
index 7bd2824..ca9ff69 100644
--- a/gcc/analyzer/store.h
+++ b/gcc/analyzer/store.h
@@ -275,6 +275,7 @@ struct bit_range
{}
void dump_to_pp (pretty_printer *pp) const;
+ void dump () const;
bit_offset_t get_start_bit_offset () const
{
diff --git a/gcc/builtins.c b/gcc/builtins.c
index 75419cc..855ad1e 100644
--- a/gcc/builtins.c
+++ b/gcc/builtins.c
@@ -5183,8 +5183,12 @@ gimple_call_return_array (gimple *stmt, offset_int offrng[2],
|| DECL_IS_REPLACEABLE_OPERATOR_NEW_P (fn))
return NULL_TREE;
+ /* Check the mangling, keeping in mind that operator new takes
+ a size_t which could be unsigned int or unsigned long. */
tree fname = DECL_ASSEMBLER_NAME (fn);
- if (!id_equal (fname, "_ZnwmPv") // ordinary form
+ if (!id_equal (fname, "_ZnwjPv") // ordinary form
+ && !id_equal (fname, "_ZnwmPv") // ordinary form
+ && !id_equal (fname, "_ZnajPv") // array form
&& !id_equal (fname, "_ZnamPv")) // array form
return NULL_TREE;
diff --git a/gcc/c-family/ChangeLog b/gcc/c-family/ChangeLog
index 39fae4e..ba218e6 100644
--- a/gcc/c-family/ChangeLog
+++ b/gcc/c-family/ChangeLog
@@ -1,3 +1,8 @@
+2021-06-15 Robin Dapp <rdapp@linux.ibm.com>
+
+ * c-attribs.c (common_handle_aligned_attribute): Remove short
+ circuit and dead code.
+
2021-06-14 Jonathan Wakely <jwakely@redhat.com>
PR c++/101052
diff --git a/gcc/c/ChangeLog b/gcc/c/ChangeLog
index 665fcd8..2deedba 100644
--- a/gcc/c/ChangeLog
+++ b/gcc/c/ChangeLog
@@ -1,3 +1,8 @@
+2021-06-15 Robin Dapp <rdapp@linux.ibm.com>
+
+ * c-decl.c (merge_decls): Copy DECL_USER_ALIGN if DECL_ALIGN is
+ similar.
+
2021-06-14 Tobias Burnus <tobias@codesourcery.com>
PR c/100913
diff --git a/gcc/compare-elim.c b/gcc/compare-elim.c
index 85085cd..607eadc 100644
--- a/gcc/compare-elim.c
+++ b/gcc/compare-elim.c
@@ -906,6 +906,7 @@ try_eliminate_compare (struct comparison *cmp)
static unsigned int
execute_compare_elim_after_reload (void)
{
+ df_set_flags (DF_LR_RUN_DCE);
df_analyze ();
gcc_checking_assert (!all_compares.exists ());
diff --git a/gcc/config/i386/i386.md b/gcc/config/i386/i386.md
index 6e4abf3..48532eb 100644
--- a/gcc/config/i386/i386.md
+++ b/gcc/config/i386/i386.md
@@ -12794,6 +12794,100 @@
operands[0] = shallow_copy_rtx (operands[0]);
PUT_CODE (operands[0], reverse_condition (GET_CODE (operands[0])));
})
+
+;; Help combine recognize bt followed by cmov
+(define_split
+ [(set (match_operand:SWI248 0 "register_operand")
+ (if_then_else:SWI248
+ (ne
+ (zero_extract:SWI48
+ (match_operand:SWI48 1 "register_operand")
+ (const_int 1)
+ (zero_extend:SI (match_operand:QI 2 "register_operand")))
+ (const_int 0))
+ (match_operand:SWI248 3 "nonimmediate_operand")
+ (match_operand:SWI248 4 "nonimmediate_operand")))]
+ "TARGET_USE_BT && TARGET_CMOVE
+ && !(MEM_P (operands[3]) && MEM_P (operands[4]))
+ && ix86_pre_reload_split ()"
+ [(set (reg:CCC FLAGS_REG)
+ (compare:CCC
+ (zero_extract:SWI48 (match_dup 1) (const_int 1) (match_dup 2))
+ (const_int 0)))
+ (set (match_dup 0)
+ (if_then_else:SWI248 (eq (reg:CCC FLAGS_REG) (const_int 0))
+ (match_dup 3)
+ (match_dup 4)))]
+{
+ operands[2] = lowpart_subreg (SImode, operands[2], QImode);
+})
+
+;; Help combine recognize bt followed by setc
+(define_insn_and_split "*bt<mode>_setcqi"
+ [(set (subreg:SWI48 (match_operand:QI 0 "register_operand") 0)
+ (zero_extract:SWI48
+ (match_operand:SWI48 1 "register_operand")
+ (const_int 1)
+ (zero_extend:SI (match_operand:QI 2 "register_operand"))))
+ (clobber (reg:CC FLAGS_REG))]
+ "TARGET_USE_BT && ix86_pre_reload_split ()"
+ "#"
+ "&& 1"
+ [(set (reg:CCC FLAGS_REG)
+ (compare:CCC
+ (zero_extract:SWI48 (match_dup 1) (const_int 1) (match_dup 2))
+ (const_int 0)))
+ (set (match_dup 0)
+ (eq:QI (reg:CCC FLAGS_REG) (const_int 0)))]
+{
+ operands[2] = lowpart_subreg (SImode, operands[2], QImode);
+})
+
+;; Help combine recognize bt followed by setnc
+(define_insn_and_split "*bt<mode>_setncqi"
+ [(set (match_operand:QI 0 "register_operand")
+ (and:QI
+ (not:QI
+ (subreg:QI
+ (lshiftrt:SWI48 (match_operand:SWI48 1 "register_operand")
+ (match_operand:QI 2 "register_operand")) 0))
+ (const_int 1)))
+ (clobber (reg:CC FLAGS_REG))]
+ "TARGET_USE_BT && ix86_pre_reload_split ()"
+ "#"
+ "&& 1"
+ [(set (reg:CCC FLAGS_REG)
+ (compare:CCC
+ (zero_extract:SWI48 (match_dup 1) (const_int 1) (match_dup 2))
+ (const_int 0)))
+ (set (match_dup 0)
+ (ne:QI (reg:CCC FLAGS_REG) (const_int 0)))]
+{
+ operands[2] = lowpart_subreg (SImode, operands[2], QImode);
+})
+
+(define_insn_and_split "*bt<mode>_setnc<mode>"
+ [(set (match_operand:SWI48 0 "register_operand")
+ (and:SWI48
+ (not:SWI48
+ (lshiftrt:SWI48 (match_operand:SWI48 1 "register_operand")
+ (match_operand:QI 2 "register_operand")))
+ (const_int 1)))
+ (clobber (reg:CC FLAGS_REG))]
+ "TARGET_USE_BT && ix86_pre_reload_split ()"
+ "#"
+ "&& 1"
+ [(set (reg:CCC FLAGS_REG)
+ (compare:CCC
+ (zero_extract:SWI48 (match_dup 1) (const_int 1) (match_dup 2))
+ (const_int 0)))
+ (set (match_dup 3)
+ (ne:QI (reg:CCC FLAGS_REG) (const_int 0)))
+ (set (match_dup 0) (zero_extend:SWI48 (match_dup 3)))]
+{
+ operands[2] = lowpart_subreg (SImode, operands[2], QImode);
+ operands[3] = gen_reg_rtx (QImode);
+})
;; Store-flag instructions.
diff --git a/gcc/config/rs6000/rs6000-builtin.def b/gcc/config/rs6000/rs6000-builtin.def
index 231e7c9..d7ce4de 100644
--- a/gcc/config/rs6000/rs6000-builtin.def
+++ b/gcc/config/rs6000/rs6000-builtin.def
@@ -2924,7 +2924,7 @@ BU_P10V_VSX_2 (XXGENPCVM_V4SI, "xxgenpcvm_v4si", CONST, xxgenpcvm_v4si)
BU_P10V_VSX_2 (XXGENPCVM_V2DI, "xxgenpcvm_v2di", CONST, xxgenpcvm_v2di)
BU_P10V_AV_2 (VCMPGTUT, "vcmpgtut", CONST, vector_gtuv1ti)
BU_P10V_AV_2 (VCMPGTST, "vcmpgtst", CONST, vector_gtv1ti)
-BU_P10V_AV_2 (VCMPEQUT, "vcmpequt", CONST, eqvv1ti3)
+BU_P10V_AV_2 (VCMPEQUT, "vcmpequt", CONST, vector_eqv1ti)
BU_P10V_AV_2 (CMPNET, "vcmpnet", CONST, vcmpnet)
BU_P10V_AV_2 (CMPGE_1TI, "cmpge_1ti", CONST, vector_nltv1ti)
BU_P10V_AV_2 (CMPGE_U1TI, "cmpge_u1ti", CONST, vector_nltuv1ti)
@@ -3078,10 +3078,6 @@ BU_P10_OVERLOAD_2 (CLRR, "clrr")
BU_P10_OVERLOAD_2 (GNB, "gnb")
BU_P10_OVERLOAD_4 (XXEVAL, "xxeval")
BU_P10_OVERLOAD_2 (XXGENPCVM, "xxgenpcvm")
-BU_P10_OVERLOAD_2 (VRLQ, "vrlq")
-BU_P10_OVERLOAD_2 (VSLQ, "vslq")
-BU_P10_OVERLOAD_2 (VSRQ, "vsrq")
-BU_P10_OVERLOAD_2 (VSRAQ, "vsraq")
BU_P10_OVERLOAD_3 (EXTRACTL, "extractl")
BU_P10_OVERLOAD_3 (EXTRACTH, "extracth")
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index f5659cf..3016da8 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,7 @@
+2021-06-15 Robin Dapp <rdapp@linux.ibm.com>
+
+ * decl.c (duplicate_decls): Likewise.
+
2021-06-14 Tobias Burnus <tobias@codesourcery.com>
PR c/100913
diff --git a/gcc/doc/analyzer.texi b/gcc/doc/analyzer.texi
index 26808ff..2ca4bf6 100644
--- a/gcc/doc/analyzer.texi
+++ b/gcc/doc/analyzer.texi
@@ -480,6 +480,13 @@ will dump the copious information about the analyzer's state each time it
reaches the call in its traversal of the source.
@smallexample
+extern void __analyzer_dump_capacity (const void *ptr);
+@end smallexample
+
+will emit a warning describing the capacity of the base region of
+the region pointed to by the 1st argument.
+
+@smallexample
__analyzer_dump_path ();
@end smallexample
diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog
index a0ee6eb..3c71933 100644
--- a/gcc/fortran/ChangeLog
+++ b/gcc/fortran/ChangeLog
@@ -1,3 +1,22 @@
+2021-06-15 Tobias Burnus <tobias@codesourcery.com>
+
+ PR fortran/92568
+ * dump-parse-tree.c (show_omp_clauses): Update for defaultmap.
+ * f95-lang.c (LANG_HOOKS_OMP_ALLOCATABLE_P,
+ LANG_HOOKS_OMP_SCALAR_TARGET_P): New.
+ * gfortran.h (enum gfc_omp_defaultmap,
+ enum gfc_omp_defaultmap_category): New.
+ * openmp.c (gfc_match_omp_clauses): Update defaultmap matching.
+ * trans-decl.c (gfc_finish_decl_attrs): Set GFC_DECL_SCALAR_TARGET.
+ * trans-openmp.c (gfc_omp_allocatable_p, gfc_omp_scalar_target_p): New.
+ (gfc_omp_scalar_p): Take 'ptr_alloc_ok' argument.
+ (gfc_trans_omp_clauses, gfc_split_omp_clauses): Update for
+ defaultmap changes.
+ * trans.h (gfc_omp_scalar_p): Update prototype.
+ (gfc_omp_allocatable_p, gfc_omp_scalar_target_p): New.
+ (struct lang_decl): Add scalar_target.
+ (GFC_DECL_SCALAR_TARGET, GFC_DECL_GET_SCALAR_TARGET): New.
+
2021-06-14 Tobias Burnus <tobias@codesourcery.com>
* resolve.c (resolve_variable): Remove *XCNEW used to
diff --git a/gcc/fortran/dump-parse-tree.c b/gcc/fortran/dump-parse-tree.c
index 141101e..07e98b7 100644
--- a/gcc/fortran/dump-parse-tree.c
+++ b/gcc/fortran/dump-parse-tree.c
@@ -1751,7 +1751,7 @@ show_omp_clauses (gfc_omp_clauses *omp_clauses)
}
if (omp_clauses->dist_sched_kind != OMP_SCHED_NONE)
{
- fprintf (dumpfile, " DIST_SCHEDULE (STATIC");
+ fputs (" DIST_SCHEDULE (STATIC", dumpfile);
if (omp_clauses->dist_chunk_size)
{
fputc (',', dumpfile);
@@ -1759,8 +1759,40 @@ show_omp_clauses (gfc_omp_clauses *omp_clauses)
}
fputc (')', dumpfile);
}
- if (omp_clauses->defaultmap)
- fputs (" DEFALTMAP (TOFROM: SCALAR)", dumpfile);
+ for (int i = 0; i < OMP_DEFAULTMAP_CAT_NUM; i++)
+ {
+ const char *dfltmap;
+ if (omp_clauses->defaultmap[i] == OMP_DEFAULTMAP_UNSET)
+ continue;
+ fputs (" DEFAULTMAP (", dumpfile);
+ switch (omp_clauses->defaultmap[i])
+ {
+ case OMP_DEFAULTMAP_ALLOC: dfltmap = "ALLOC"; break;
+ case OMP_DEFAULTMAP_TO: dfltmap = "TO"; break;
+ case OMP_DEFAULTMAP_FROM: dfltmap = "FROM"; break;
+ case OMP_DEFAULTMAP_TOFROM: dfltmap = "TOFROM"; break;
+ case OMP_DEFAULTMAP_FIRSTPRIVATE: dfltmap = "FIRSTPRIVATE"; break;
+ case OMP_DEFAULTMAP_NONE: dfltmap = "NONE"; break;
+ case OMP_DEFAULTMAP_DEFAULT: dfltmap = "DEFAULT"; break;
+ case OMP_DEFAULTMAP_PRESENT: dfltmap = "PRESENT"; break;
+ default: gcc_unreachable ();
+ }
+ fputs (dfltmap, dumpfile);
+ if (i != OMP_DEFAULTMAP_CAT_UNCATEGORIZED)
+ {
+ fputc (':', dumpfile);
+ switch ((enum gfc_omp_defaultmap) i)
+ {
+ case OMP_DEFAULTMAP_CAT_SCALAR: dfltmap = "SCALAR"; break;
+ case OMP_DEFAULTMAP_CAT_AGGREGATE: dfltmap = "AGGREGATE"; break;
+ case OMP_DEFAULTMAP_CAT_ALLOCATABLE: dfltmap = "ALLOCATABLE"; break;
+ case OMP_DEFAULTMAP_CAT_POINTER: dfltmap = "POINTER"; break;
+ default: gcc_unreachable ();
+ }
+ fputs (dfltmap, dumpfile);
+ }
+ fputc (')', dumpfile);
+ }
if (omp_clauses->nogroup)
fputs (" NOGROUP", dumpfile);
if (omp_clauses->simd)
diff --git a/gcc/fortran/f95-lang.c b/gcc/fortran/f95-lang.c
index a346457..5fc8481 100644
--- a/gcc/fortran/f95-lang.c
+++ b/gcc/fortran/f95-lang.c
@@ -126,6 +126,8 @@ static const struct attribute_spec gfc_attribute_table[] =
#undef LANG_HOOKS_OMP_CLAUSE_LINEAR_CTOR
#undef LANG_HOOKS_OMP_CLAUSE_DTOR
#undef LANG_HOOKS_OMP_FINISH_CLAUSE
+#undef LANG_HOOKS_OMP_ALLOCATABLE_P
+#undef LANG_HOOKS_OMP_SCALAR_TARGET_P
#undef LANG_HOOKS_OMP_SCALAR_P
#undef LANG_HOOKS_OMP_DISREGARD_VALUE_EXPR
#undef LANG_HOOKS_OMP_PRIVATE_DEBUG_CLAUSE
@@ -162,7 +164,9 @@ static const struct attribute_spec gfc_attribute_table[] =
#define LANG_HOOKS_OMP_CLAUSE_LINEAR_CTOR gfc_omp_clause_linear_ctor
#define LANG_HOOKS_OMP_CLAUSE_DTOR gfc_omp_clause_dtor
#define LANG_HOOKS_OMP_FINISH_CLAUSE gfc_omp_finish_clause
+#define LANG_HOOKS_OMP_ALLOCATABLE_P gfc_omp_allocatable_p
#define LANG_HOOKS_OMP_SCALAR_P gfc_omp_scalar_p
+#define LANG_HOOKS_OMP_SCALAR_TARGET_P gfc_omp_scalar_target_p
#define LANG_HOOKS_OMP_DISREGARD_VALUE_EXPR gfc_omp_disregard_value_expr
#define LANG_HOOKS_OMP_PRIVATE_DEBUG_CLAUSE gfc_omp_private_debug_clause
#define LANG_HOOKS_OMP_PRIVATE_OUTER_REF gfc_omp_private_outer_ref
diff --git a/gcc/fortran/gfortran.h b/gcc/fortran/gfortran.h
index cbc95d3..f4a50d7 100644
--- a/gcc/fortran/gfortran.h
+++ b/gcc/fortran/gfortran.h
@@ -1241,6 +1241,29 @@ enum gfc_omp_map_op
OMP_MAP_ALWAYS_TOFROM
};
+enum gfc_omp_defaultmap
+{
+ OMP_DEFAULTMAP_UNSET,
+ OMP_DEFAULTMAP_ALLOC,
+ OMP_DEFAULTMAP_TO,
+ OMP_DEFAULTMAP_FROM,
+ OMP_DEFAULTMAP_TOFROM,
+ OMP_DEFAULTMAP_FIRSTPRIVATE,
+ OMP_DEFAULTMAP_NONE,
+ OMP_DEFAULTMAP_DEFAULT,
+ OMP_DEFAULTMAP_PRESENT
+};
+
+enum gfc_omp_defaultmap_category
+{
+ OMP_DEFAULTMAP_CAT_UNCATEGORIZED,
+ OMP_DEFAULTMAP_CAT_SCALAR,
+ OMP_DEFAULTMAP_CAT_AGGREGATE,
+ OMP_DEFAULTMAP_CAT_ALLOCATABLE,
+ OMP_DEFAULTMAP_CAT_POINTER,
+ OMP_DEFAULTMAP_CAT_NUM
+};
+
enum gfc_omp_linear_op
{
OMP_LINEAR_DEFAULT,
@@ -1423,9 +1446,10 @@ typedef struct gfc_omp_clauses
enum gfc_omp_device_type device_type;
struct gfc_expr *chunk_size;
enum gfc_omp_default_sharing default_sharing;
+ enum gfc_omp_defaultmap defaultmap[OMP_DEFAULTMAP_CAT_NUM];
int collapse, orderedc;
bool nowait, ordered, untied, mergeable;
- bool inbranch, notinbranch, defaultmap, nogroup;
+ bool inbranch, notinbranch, nogroup;
bool sched_simd, sched_monotonic, sched_nonmonotonic;
bool simd, threads, depend_source, destroy, order_concurrent, capture;
enum gfc_omp_atomic_op atomic_op;
diff --git a/gcc/fortran/openmp.c b/gcc/fortran/openmp.c
index 638a823..357a1e1 100644
--- a/gcc/fortran/openmp.c
+++ b/gcc/fortran/openmp.c
@@ -1539,10 +1539,87 @@ gfc_match_omp_clauses (gfc_omp_clauses **cp, const omp_mask mask,
continue;
}
if ((mask & OMP_CLAUSE_DEFAULTMAP)
- && !c->defaultmap
- && gfc_match ("defaultmap ( tofrom : scalar )") == MATCH_YES)
+ && gfc_match ("defaultmap ( ") == MATCH_YES)
{
- c->defaultmap = true;
+ enum gfc_omp_defaultmap behavior;
+ gfc_omp_defaultmap_category category
+ = OMP_DEFAULTMAP_CAT_UNCATEGORIZED;
+ if (gfc_match ("alloc ") == MATCH_YES)
+ behavior = OMP_DEFAULTMAP_ALLOC;
+ else if (gfc_match ("tofrom ") == MATCH_YES)
+ behavior = OMP_DEFAULTMAP_TOFROM;
+ else if (gfc_match ("to ") == MATCH_YES)
+ behavior = OMP_DEFAULTMAP_TO;
+ else if (gfc_match ("from ") == MATCH_YES)
+ behavior = OMP_DEFAULTMAP_FROM;
+ else if (gfc_match ("firstprivate ") == MATCH_YES)
+ behavior = OMP_DEFAULTMAP_FIRSTPRIVATE;
+ else if (gfc_match ("none ") == MATCH_YES)
+ behavior = OMP_DEFAULTMAP_NONE;
+ else if (gfc_match ("default ") == MATCH_YES)
+ behavior = OMP_DEFAULTMAP_DEFAULT;
+ else
+ {
+ gfc_error ("Expected ALLOC, TO, FROM, TOFROM, FIRSTPRIVATE, "
+ "NONE or DEFAULT at %C");
+ break;
+ }
+ if (')' == gfc_peek_ascii_char ())
+ ;
+ else if (gfc_match (": ") != MATCH_YES)
+ break;
+ else
+ {
+ if (gfc_match ("scalar ") == MATCH_YES)
+ category = OMP_DEFAULTMAP_CAT_SCALAR;
+ else if (gfc_match ("aggregate ") == MATCH_YES)
+ category = OMP_DEFAULTMAP_CAT_AGGREGATE;
+ else if (gfc_match ("allocatable ") == MATCH_YES)
+ category = OMP_DEFAULTMAP_CAT_ALLOCATABLE;
+ else if (gfc_match ("pointer ") == MATCH_YES)
+ category = OMP_DEFAULTMAP_CAT_POINTER;
+ else
+ {
+ gfc_error ("Expected SCALAR, AGGREGATE, ALLOCATABLE or "
+ "POINTER at %C");
+ break;
+ }
+ }
+ for (int i = 0; i < OMP_DEFAULTMAP_CAT_NUM; ++i)
+ {
+ if (i != category
+ && category != OMP_DEFAULTMAP_CAT_UNCATEGORIZED)
+ continue;
+ if (c->defaultmap[i] != OMP_DEFAULTMAP_UNSET)
+ {
+ const char *pcategory = NULL;
+ switch (i)
+ {
+ case OMP_DEFAULTMAP_CAT_UNCATEGORIZED: break;
+ case OMP_DEFAULTMAP_CAT_SCALAR: pcategory = "SCALAR"; break;
+ case OMP_DEFAULTMAP_CAT_AGGREGATE:
+ pcategory = "AGGREGATE";
+ break;
+ case OMP_DEFAULTMAP_CAT_ALLOCATABLE:
+ pcategory = "ALLOCATABLE";
+ break;
+ case OMP_DEFAULTMAP_CAT_POINTER:
+ pcategory = "POINTER";
+ break;
+ default: gcc_unreachable ();
+ }
+ if (i == OMP_DEFAULTMAP_CAT_UNCATEGORIZED)
+ gfc_error ("DEFAULTMAP at %C but prior DEFAULTMAP with "
+ "unspecified category");
+ else
+ gfc_error ("DEFAULTMAP at %C but prior DEFAULTMAP for "
+ "category %s", pcategory);
+ goto end;
+ }
+ }
+ c->defaultmap[category] = behavior;
+ if (gfc_match (")") != MATCH_YES)
+ break;
continue;
}
if ((mask & OMP_CLAUSE_DELETE)
@@ -2459,6 +2536,7 @@ gfc_match_omp_clauses (gfc_omp_clauses **cp, const omp_mask mask,
break;
}
+end:
if (gfc_match_omp_eos () != MATCH_YES)
{
if (!gfc_error_flag_test ())
diff --git a/gcc/fortran/trans-decl.c b/gcc/fortran/trans-decl.c
index c32bd05..479ba6f 100644
--- a/gcc/fortran/trans-decl.c
+++ b/gcc/fortran/trans-decl.c
@@ -605,6 +605,11 @@ gfc_finish_decl_attrs (tree decl, symbol_attribute *attr)
gfc_allocate_lang_decl (decl);
GFC_DECL_SCALAR_POINTER (decl) = 1;
}
+ if (attr->target)
+ {
+ gfc_allocate_lang_decl (decl);
+ GFC_DECL_SCALAR_TARGET (decl) = 1;
+ }
}
}
diff --git a/gcc/fortran/trans-openmp.c b/gcc/fortran/trans-openmp.c
index f466ab6..ce1991e 100644
--- a/gcc/fortran/trans-openmp.c
+++ b/gcc/fortran/trans-openmp.c
@@ -393,6 +393,28 @@ gfc_is_unlimited_polymorphic_nonptr (tree type)
return true;
}
+/* Return true if the DECL is for an allocatable array or scalar. */
+
+bool
+gfc_omp_allocatable_p (tree decl)
+{
+ if (!DECL_P (decl))
+ return false;
+
+ if (GFC_DECL_GET_SCALAR_ALLOCATABLE (decl))
+ return true;
+
+ tree type = TREE_TYPE (decl);
+ if (gfc_omp_privatize_by_reference (decl))
+ type = TREE_TYPE (type);
+
+ if (GFC_DESCRIPTOR_TYPE_P (type)
+ && GFC_TYPE_ARRAY_AKIND (type) == GFC_ARRAY_ALLOCATABLE)
+ return true;
+
+ return false;
+}
+
/* Return true if DECL in private clause needs
OMP_CLAUSE_PRIVATE_OUTER_REF on the private clause. */
@@ -1663,10 +1685,11 @@ gfc_omp_finish_clause (tree c, gimple_seq *pre_p, bool openacc)
/* Return true if DECL is a scalar variable (for the purpose of
- implicit firstprivatization). */
+ implicit firstprivatization/mapping). Only if 'ptr_alloc_ok.'
+ is true, allocatables and pointers are permitted. */
bool
-gfc_omp_scalar_p (tree decl)
+gfc_omp_scalar_p (tree decl, bool ptr_alloc_ok)
{
tree type = TREE_TYPE (decl);
if (TREE_CODE (type) == REFERENCE_TYPE)
@@ -1675,7 +1698,11 @@ gfc_omp_scalar_p (tree decl)
{
if (GFC_DECL_GET_SCALAR_ALLOCATABLE (decl)
|| GFC_DECL_GET_SCALAR_POINTER (decl))
- type = TREE_TYPE (type);
+ {
+ if (!ptr_alloc_ok)
+ return false;
+ type = TREE_TYPE (type);
+ }
if (GFC_ARRAY_TYPE_P (type)
|| GFC_CLASS_TYPE_P (type))
return false;
@@ -1691,6 +1718,17 @@ gfc_omp_scalar_p (tree decl)
}
+/* Return true if DECL is a scalar with target attribute but does not have the
+ allocatable (or pointer) attribute (for the purpose of implicit mapping). */
+
+bool
+gfc_omp_scalar_target_p (tree decl)
+{
+ return (DECL_P (decl) && GFC_DECL_GET_SCALAR_TARGET (decl)
+ && gfc_omp_scalar_p (decl, false));
+}
+
+
/* Return true if DECL's DECL_VALUE_EXPR (if any) should be
disregarded in OpenMP construct, because it is going to be
remapped during OpenMP lowering. SHARED is true if DECL
@@ -4036,13 +4074,55 @@ gfc_trans_omp_clauses (stmtblock_t *block, gfc_omp_clauses *clauses,
c = build_omp_clause (gfc_get_location (&where), OMP_CLAUSE_NOGROUP);
omp_clauses = gfc_trans_add_clause (c, omp_clauses);
}
- if (clauses->defaultmap)
+
+ for (int i = 0; i < OMP_DEFAULTMAP_CAT_NUM; i++)
{
+ if (clauses->defaultmap[i] == OMP_DEFAULTMAP_UNSET)
+ continue;
+ enum omp_clause_defaultmap_kind behavior, category;
+ switch ((gfc_omp_defaultmap_category) i)
+ {
+ case OMP_DEFAULTMAP_CAT_UNCATEGORIZED:
+ category = OMP_CLAUSE_DEFAULTMAP_CATEGORY_UNSPECIFIED;
+ break;
+ case OMP_DEFAULTMAP_CAT_SCALAR:
+ category = OMP_CLAUSE_DEFAULTMAP_CATEGORY_SCALAR;
+ break;
+ case OMP_DEFAULTMAP_CAT_AGGREGATE:
+ category = OMP_CLAUSE_DEFAULTMAP_CATEGORY_AGGREGATE;
+ break;
+ case OMP_DEFAULTMAP_CAT_ALLOCATABLE:
+ category = OMP_CLAUSE_DEFAULTMAP_CATEGORY_ALLOCATABLE;
+ break;
+ case OMP_DEFAULTMAP_CAT_POINTER:
+ category = OMP_CLAUSE_DEFAULTMAP_CATEGORY_POINTER;
+ break;
+ default: gcc_unreachable ();
+ }
+ switch (clauses->defaultmap[i])
+ {
+ case OMP_DEFAULTMAP_ALLOC:
+ behavior = OMP_CLAUSE_DEFAULTMAP_ALLOC;
+ break;
+ case OMP_DEFAULTMAP_TO: behavior = OMP_CLAUSE_DEFAULTMAP_TO; break;
+ case OMP_DEFAULTMAP_FROM: behavior = OMP_CLAUSE_DEFAULTMAP_FROM; break;
+ case OMP_DEFAULTMAP_TOFROM:
+ behavior = OMP_CLAUSE_DEFAULTMAP_TOFROM;
+ break;
+ case OMP_DEFAULTMAP_FIRSTPRIVATE:
+ behavior = OMP_CLAUSE_DEFAULTMAP_FIRSTPRIVATE;
+ break;
+ case OMP_DEFAULTMAP_NONE: behavior = OMP_CLAUSE_DEFAULTMAP_NONE; break;
+ case OMP_DEFAULTMAP_DEFAULT:
+ behavior = OMP_CLAUSE_DEFAULTMAP_DEFAULT;
+ break;
+ default: gcc_unreachable ();
+ }
c = build_omp_clause (gfc_get_location (&where), OMP_CLAUSE_DEFAULTMAP);
- OMP_CLAUSE_DEFAULTMAP_SET_KIND (c, OMP_CLAUSE_DEFAULTMAP_TOFROM,
- OMP_CLAUSE_DEFAULTMAP_CATEGORY_SCALAR);
+ OMP_CLAUSE_DEFAULTMAP_SET_KIND (c, behavior, category);
omp_clauses = gfc_trans_add_clause (c, omp_clauses);
}
+
if (clauses->depend_source)
{
c = build_omp_clause (gfc_get_location (&where), OMP_CLAUSE_DEPEND);
@@ -5672,8 +5752,9 @@ gfc_split_omp_clauses (gfc_code *code,
= code->ext.omp_clauses->lists[OMP_LIST_IS_DEVICE_PTR];
clausesa[GFC_OMP_SPLIT_TARGET].device
= code->ext.omp_clauses->device;
- clausesa[GFC_OMP_SPLIT_TARGET].defaultmap
- = code->ext.omp_clauses->defaultmap;
+ for (int i = 0; i < OMP_DEFAULTMAP_CAT_NUM; i++)
+ clausesa[GFC_OMP_SPLIT_TARGET].defaultmap[i]
+ = code->ext.omp_clauses->defaultmap[i];
clausesa[GFC_OMP_SPLIT_TARGET].if_exprs[OMP_IF_TARGET]
= code->ext.omp_clauses->if_exprs[OMP_IF_TARGET];
/* And this is copied to all. */
diff --git a/gcc/fortran/trans.h b/gcc/fortran/trans.h
index d1d4a1d..78578cf 100644
--- a/gcc/fortran/trans.h
+++ b/gcc/fortran/trans.h
@@ -823,7 +823,9 @@ tree gfc_omp_clause_assign_op (tree, tree, tree);
tree gfc_omp_clause_linear_ctor (tree, tree, tree, tree);
tree gfc_omp_clause_dtor (tree, tree);
void gfc_omp_finish_clause (tree, gimple_seq *, bool);
-bool gfc_omp_scalar_p (tree);
+bool gfc_omp_allocatable_p (tree);
+bool gfc_omp_scalar_p (tree, bool);
+bool gfc_omp_scalar_target_p (tree);
bool gfc_omp_disregard_value_expr (tree, bool);
bool gfc_omp_private_debug_clause (tree, bool);
bool gfc_omp_private_outer_ref (tree);
@@ -1030,6 +1032,7 @@ struct GTY(()) lang_decl {
tree token, caf_offset;
unsigned int scalar_allocatable : 1;
unsigned int scalar_pointer : 1;
+ unsigned int scalar_target : 1;
unsigned int optional_arg : 1;
};
@@ -1044,12 +1047,16 @@ struct GTY(()) lang_decl {
(DECL_LANG_SPECIFIC (node)->scalar_allocatable)
#define GFC_DECL_SCALAR_POINTER(node) \
(DECL_LANG_SPECIFIC (node)->scalar_pointer)
+#define GFC_DECL_SCALAR_TARGET(node) \
+ (DECL_LANG_SPECIFIC (node)->scalar_target)
#define GFC_DECL_OPTIONAL_ARGUMENT(node) \
(DECL_LANG_SPECIFIC (node)->optional_arg)
#define GFC_DECL_GET_SCALAR_ALLOCATABLE(node) \
(DECL_LANG_SPECIFIC (node) ? GFC_DECL_SCALAR_ALLOCATABLE (node) : 0)
#define GFC_DECL_GET_SCALAR_POINTER(node) \
(DECL_LANG_SPECIFIC (node) ? GFC_DECL_SCALAR_POINTER (node) : 0)
+#define GFC_DECL_GET_SCALAR_TARGET(node) \
+ (DECL_LANG_SPECIFIC (node) ? GFC_DECL_SCALAR_TARGET (node) : 0)
#define GFC_DECL_PACKED_ARRAY(node) DECL_LANG_FLAG_0(node)
#define GFC_DECL_PARTIAL_PACKED_ARRAY(node) DECL_LANG_FLAG_1(node)
#define GFC_DECL_ASSIGN(node) DECL_LANG_FLAG_2(node)
diff --git a/gcc/gimplify.c b/gcc/gimplify.c
index c96d611..2606998 100644
--- a/gcc/gimplify.c
+++ b/gcc/gimplify.c
@@ -212,6 +212,7 @@ struct gimplify_ctx
enum gimplify_defaultmap_kind
{
GDMK_SCALAR,
+ GDMK_SCALAR_TARGET, /* w/ Fortran's target attr, implicit mapping, only. */
GDMK_AGGREGATE,
GDMK_ALLOCATABLE,
GDMK_POINTER
@@ -236,7 +237,7 @@ struct gimplify_omp_ctx
bool order_concurrent;
bool has_depend;
bool in_for_exprs;
- int defaultmap[4];
+ int defaultmap[5];
};
static struct gimplify_ctx *gimplify_ctxp;
@@ -461,6 +462,7 @@ new_omp_context (enum omp_region_type region_type)
else
c->default_kind = OMP_CLAUSE_DEFAULT_UNSPECIFIED;
c->defaultmap[GDMK_SCALAR] = GOVD_MAP;
+ c->defaultmap[GDMK_SCALAR_TARGET] = GOVD_MAP;
c->defaultmap[GDMK_AGGREGATE] = GOVD_MAP;
c->defaultmap[GDMK_ALLOCATABLE] = GOVD_MAP;
c->defaultmap[GDMK_POINTER] = GOVD_MAP;
@@ -7503,13 +7505,17 @@ omp_notice_variable (struct gimplify_omp_ctx *ctx, tree decl, bool in_code)
{
int gdmk;
enum omp_clause_defaultmap_kind kind;
- if (TREE_CODE (TREE_TYPE (decl)) == POINTER_TYPE
- || (TREE_CODE (TREE_TYPE (decl)) == REFERENCE_TYPE
- && (TREE_CODE (TREE_TYPE (TREE_TYPE (decl)))
- == POINTER_TYPE)))
- gdmk = GDMK_POINTER;
- else if (lang_hooks.decls.omp_scalar_p (decl))
+ if (lang_hooks.decls.omp_allocatable_p (decl))
+ gdmk = GDMK_ALLOCATABLE;
+ else if (lang_hooks.decls.omp_scalar_target_p (decl))
+ gdmk = GDMK_SCALAR_TARGET;
+ else if (lang_hooks.decls.omp_scalar_p (decl, false))
gdmk = GDMK_SCALAR;
+ else if (TREE_CODE (TREE_TYPE (decl)) == POINTER_TYPE
+ || (TREE_CODE (TREE_TYPE (decl)) == REFERENCE_TYPE
+ && (TREE_CODE (TREE_TYPE (TREE_TYPE (decl)))
+ == POINTER_TYPE)))
+ gdmk = GDMK_POINTER;
else
gdmk = GDMK_AGGREGATE;
kind = lang_hooks.decls.omp_predetermined_mapping (decl);
@@ -8746,6 +8752,8 @@ gimplify_scan_omp_clauses (tree *list_p, gimple_seq *pre_p,
if (!lang_GNU_Fortran ())
ctx->defaultmap[GDMK_POINTER] = GOVD_MAP | GOVD_MAP_0LEN_ARRAY;
ctx->defaultmap[GDMK_SCALAR] = GOVD_FIRSTPRIVATE;
+ ctx->defaultmap[GDMK_SCALAR_TARGET] = (lang_GNU_Fortran ()
+ ? GOVD_MAP : GOVD_FIRSTPRIVATE);
}
if (!lang_GNU_Fortran ())
switch (code)
@@ -8827,7 +8835,7 @@ gimplify_scan_omp_clauses (tree *list_p, gimple_seq *pre_p,
if (error_operand_p (decl))
goto do_add;
if (OMP_CLAUSE_LASTPRIVATE_CONDITIONAL (c)
- && !lang_hooks.decls.omp_scalar_p (decl))
+ && !lang_hooks.decls.omp_scalar_p (decl, true))
{
error_at (OMP_CLAUSE_LOCATION (c),
"non-scalar variable %qD in conditional "
@@ -10025,7 +10033,8 @@ gimplify_scan_omp_clauses (tree *list_p, gimple_seq *pre_p,
gdmkmax = GDMK_POINTER;
break;
case OMP_CLAUSE_DEFAULTMAP_CATEGORY_SCALAR:
- gdmkmin = gdmkmax = GDMK_SCALAR;
+ gdmkmin = GDMK_SCALAR;
+ gdmkmax = GDMK_SCALAR_TARGET;
break;
case OMP_CLAUSE_DEFAULTMAP_CATEGORY_AGGREGATE:
gdmkmin = gdmkmax = GDMK_AGGREGATE;
@@ -10066,12 +10075,18 @@ gimplify_scan_omp_clauses (tree *list_p, gimple_seq *pre_p,
case GDMK_SCALAR:
ctx->defaultmap[gdmk] = GOVD_FIRSTPRIVATE;
break;
+ case GDMK_SCALAR_TARGET:
+ ctx->defaultmap[gdmk] = (lang_GNU_Fortran ()
+ ? GOVD_MAP : GOVD_FIRSTPRIVATE);
+ break;
case GDMK_AGGREGATE:
case GDMK_ALLOCATABLE:
ctx->defaultmap[gdmk] = GOVD_MAP;
break;
case GDMK_POINTER:
- ctx->defaultmap[gdmk] = GOVD_MAP | GOVD_MAP_0LEN_ARRAY;
+ ctx->defaultmap[gdmk] = GOVD_MAP;
+ if (!lang_GNU_Fortran ())
+ ctx->defaultmap[gdmk] |= GOVD_MAP_0LEN_ARRAY;
break;
default:
gcc_unreachable ();
diff --git a/gcc/langhooks-def.h b/gcc/langhooks-def.h
index ae3991c..8b744d9 100644
--- a/gcc/langhooks-def.h
+++ b/gcc/langhooks-def.h
@@ -86,7 +86,7 @@ struct gimplify_omp_ctx;
extern void lhd_omp_firstprivatize_type_sizes (struct gimplify_omp_ctx *,
tree);
extern bool lhd_omp_mappable_type (tree);
-extern bool lhd_omp_scalar_p (tree);
+extern bool lhd_omp_scalar_p (tree, bool);
extern tree *lhd_omp_get_decl_init (tree);
extern void lhd_omp_finish_decl_inits ();
@@ -266,7 +266,9 @@ extern tree lhd_unit_size_without_reusable_padding (tree);
#define LANG_HOOKS_OMP_CLAUSE_LINEAR_CTOR NULL
#define LANG_HOOKS_OMP_CLAUSE_DTOR hook_tree_tree_tree_null
#define LANG_HOOKS_OMP_FINISH_CLAUSE lhd_omp_finish_clause
+#define LANG_HOOKS_OMP_ALLOCATABLE_P hook_bool_tree_false
#define LANG_HOOKS_OMP_SCALAR_P lhd_omp_scalar_p
+#define LANG_HOOKS_OMP_SCALAR_TARGET_P hook_bool_tree_false
#define LANG_HOOKS_OMP_GET_DECL_INIT lhd_omp_get_decl_init
#define LANG_HOOKS_OMP_FINISH_DECL_INITS lhd_omp_finish_decl_inits
@@ -297,7 +299,9 @@ extern tree lhd_unit_size_without_reusable_padding (tree);
LANG_HOOKS_OMP_CLAUSE_LINEAR_CTOR, \
LANG_HOOKS_OMP_CLAUSE_DTOR, \
LANG_HOOKS_OMP_FINISH_CLAUSE, \
+ LANG_HOOKS_OMP_ALLOCATABLE_P, \
LANG_HOOKS_OMP_SCALAR_P, \
+ LANG_HOOKS_OMP_SCALAR_TARGET_P, \
LANG_HOOKS_OMP_GET_DECL_INIT, \
LANG_HOOKS_OMP_FINISH_DECL_INITS \
}
diff --git a/gcc/langhooks.c b/gcc/langhooks.c
index 12c9988..d753199 100644
--- a/gcc/langhooks.c
+++ b/gcc/langhooks.c
@@ -615,10 +615,11 @@ lhd_omp_finish_clause (tree, gimple_seq *, bool)
}
/* Return true if DECL is a scalar variable (for the purpose of
- implicit firstprivatization). */
+ implicit firstprivatization & mapping). Only if alloc_ptr_ok
+ are allocatables and pointers accepted. */
bool
-lhd_omp_scalar_p (tree decl)
+lhd_omp_scalar_p (tree decl, bool ptr_ok)
{
tree type = TREE_TYPE (decl);
if (TREE_CODE (type) == REFERENCE_TYPE)
@@ -627,7 +628,7 @@ lhd_omp_scalar_p (tree decl)
type = TREE_TYPE (type);
if (INTEGRAL_TYPE_P (type)
|| SCALAR_FLOAT_TYPE_P (type)
- || TREE_CODE (type) == POINTER_TYPE)
+ || (ptr_ok && TREE_CODE (type) == POINTER_TYPE))
return true;
return false;
}
diff --git a/gcc/langhooks.h b/gcc/langhooks.h
index 842e605..1b417a0 100644
--- a/gcc/langhooks.h
+++ b/gcc/langhooks.h
@@ -296,9 +296,18 @@ struct lang_hooks_for_decls
/* Do language specific checking on an implicitly determined clause. */
void (*omp_finish_clause) (tree clause, gimple_seq *pre_p, bool);
+ /* Return true if DECL is an allocatable variable (for the purpose of
+ implicit mapping). */
+ bool (*omp_allocatable_p) (tree decl);
+
/* Return true if DECL is a scalar variable (for the purpose of
- implicit firstprivatization). */
- bool (*omp_scalar_p) (tree decl);
+ implicit firstprivatization). If 'ptr_or', pointers and
+ allocatables are also permitted. */
+ bool (*omp_scalar_p) (tree decl, bool ptr_ok);
+
+ /* Return true if DECL is a scalar variable with Fortran target but not
+ allocatable or pointer attribute (for the purpose of implicit mapping). */
+ bool (*omp_scalar_target_p) (tree decl);
/* Return a pointer to the tree representing the initializer
expression for the non-local variable DECL. Return NULL if
diff --git a/gcc/range-op.cc b/gcc/range-op.cc
index 742e546..e805f26 100644
--- a/gcc/range-op.cc
+++ b/gcc/range-op.cc
@@ -2534,11 +2534,20 @@ operator_bitwise_or::wi_fold (irange &r, tree type,
new_lb = wi::max (new_lb, lh_lb, sign);
if (wi::lt_p (rh_ub, 0, sign))
new_lb = wi::max (new_lb, rh_lb, sign);
- // If the limits got swapped around, return varying.
- if (wi::gt_p (new_lb, new_ub,sign))
- r.set_varying (type);
- else
- value_range_with_overflow (r, type, new_lb, new_ub);
+ // If the limits got swapped around, return a conservative range.
+ if (wi::gt_p (new_lb, new_ub, sign))
+ {
+ // Make sure that nonzero|X is nonzero.
+ if (wi::gt_p (lh_lb, 0, sign)
+ || wi::gt_p (rh_lb, 0, sign)
+ || wi::lt_p (lh_ub, 0, sign)
+ || wi::lt_p (rh_ub, 0, sign))
+ r.set_nonzero (type);
+ else
+ r.set_varying (type);
+ return;
+ }
+ value_range_with_overflow (r, type, new_lb, new_ub);
}
bool
@@ -3744,6 +3753,18 @@ range_op_bitwise_and_tests ()
i1 = int_range<1> (integer_type_node);
op_bitwise_and.op1_range (res, integer_type_node, i1, i2);
ASSERT_TRUE (res == int_range<1> (integer_type_node));
+
+ // (NONZERO | X) is nonzero.
+ i1.set_nonzero (integer_type_node);
+ i2.set_varying (integer_type_node);
+ op_bitwise_or.fold_range (res, integer_type_node, i1, i2);
+ ASSERT_TRUE (res.nonzero_p ());
+
+ // (NEGATIVE | X) is nonzero.
+ i1 = int_range<1> (INT (-5), INT (-3));
+ i2.set_varying (integer_type_node);
+ op_bitwise_or.fold_range (res, integer_type_node, i1, i2);
+ ASSERT_FALSE (res.contains_p (INT (0)));
}
void
diff --git a/gcc/stor-layout.c b/gcc/stor-layout.c
index 94b8b21..4e3a41b 100644
--- a/gcc/stor-layout.c
+++ b/gcc/stor-layout.c
@@ -2072,9 +2072,14 @@ finish_bitfield_representative (tree repr, tree field)
bitsize = (bitsize + BITS_PER_UNIT - 1) & ~(BITS_PER_UNIT - 1);
/* Now nothing tells us how to pad out bitsize ... */
- nextf = DECL_CHAIN (field);
- while (nextf && TREE_CODE (nextf) != FIELD_DECL)
- nextf = DECL_CHAIN (nextf);
+ if (TREE_CODE (DECL_CONTEXT (field)) == RECORD_TYPE)
+ {
+ nextf = DECL_CHAIN (field);
+ while (nextf && TREE_CODE (nextf) != FIELD_DECL)
+ nextf = DECL_CHAIN (nextf);
+ }
+ else
+ nextf = NULL_TREE;
if (nextf)
{
tree maxsize;
@@ -2167,13 +2172,6 @@ finish_bitfield_layout (tree t)
tree field, prev;
tree repr = NULL_TREE;
- /* Unions would be special, for the ease of type-punning optimizations
- we could use the underlying type as hint for the representative
- if the bitfield would fit and the representative would not exceed
- the union in size. */
- if (TREE_CODE (t) != RECORD_TYPE)
- return;
-
for (prev = NULL_TREE, field = TYPE_FIELDS (t);
field; field = DECL_CHAIN (field))
{
@@ -2233,7 +2231,13 @@ finish_bitfield_layout (tree t)
if (repr)
DECL_BIT_FIELD_REPRESENTATIVE (field) = repr;
- prev = field;
+ if (TREE_CODE (t) == RECORD_TYPE)
+ prev = field;
+ else if (repr)
+ {
+ finish_bitfield_representative (repr, field);
+ repr = NULL_TREE;
+ }
}
if (repr)
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index fb84198..8b27352 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,49 @@
+2021-06-15 Tobias Burnus <tobias@codesourcery.com>
+
+ PR fortran/92568
+ * gfortran.dg/gomp/pr99928-1.f90: Uncomment 'defaultmap(none)'.
+ * gfortran.dg/gomp/pr99928-2.f90: Uncomment 'defaultmap(none)'.
+ * gfortran.dg/gomp/pr99928-3.f90: Uncomment 'defaultmap(none)'.
+ * gfortran.dg/gomp/pr99928-4.f90: Uncomment 'defaultmap(none)'.
+ * gfortran.dg/gomp/pr99928-5.f90: Uncomment 'defaultmap(none)'.
+ * gfortran.dg/gomp/pr99928-6.f90: Uncomment 'defaultmap(none)'.
+ * gfortran.dg/gomp/pr99928-8.f90: Uncomment 'defaultmap(none)'.
+ * gfortran.dg/gomp/defaultmap-1.f90: New test.
+ * gfortran.dg/gomp/defaultmap-2.f90: New test.
+ * gfortran.dg/gomp/defaultmap-3.f90: New test.
+ * gfortran.dg/gomp/defaultmap-4.f90: New test.
+ * gfortran.dg/gomp/defaultmap-5.f90: New test.
+ * gfortran.dg/gomp/defaultmap-6.f90: New test.
+ * gfortran.dg/gomp/defaultmap-7.f90: New test.
+
+2021-06-15 David Malcolm <dmalcolm@redhat.com>
+
+ * gcc.dg/analyzer/analyzer-decls.h (__analyzer_dump_capacity): New decl.
+ * gcc.dg/analyzer/capacity-1.c: New test.
+ * gcc.dg/analyzer/capacity-2.c: New test.
+ * gcc.dg/analyzer/capacity-3.c: New test.
+
+2021-06-15 David Malcolm <dmalcolm@redhat.com>
+
+ PR analyzer/101068
+ * gcc.dg/analyzer/explode-2a.c: New test.
+
+2021-06-15 Jakub Jelinek <jakub@redhat.com>
+
+ PR target/101046
+ * gcc.target/i386/pr101046.c: New test.
+
+2021-06-15 Robin Dapp <rdapp@linux.ibm.com>
+
+ * c-c++-common/Wattributes.c: Remove s390-specific check and add
+ new tests.
+ * gcc.dg/Wattributes-6.c: Likewise.
+
+2021-06-15 Xionghu Luo <luoxhu@linux.ibm.com>
+
+ PR target/101020
+ * gcc.target/powerpc/float128-call.c: Adjust counts for be and le.
+
2021-06-14 Martin Sebor <msebor@redhat.com>
PR c++/100876
diff --git a/gcc/testsuite/gcc.dg/analyzer/analyzer-decls.h b/gcc/testsuite/gcc.dg/analyzer/analyzer-decls.h
index d96b3f2..2446693 100644
--- a/gcc/testsuite/gcc.dg/analyzer/analyzer-decls.h
+++ b/gcc/testsuite/gcc.dg/analyzer/analyzer-decls.h
@@ -15,6 +15,9 @@ extern void __analyzer_describe (int verbosity, ...);
/* Dump copious information about the analyzer’s state when reached. */
extern void __analyzer_dump (void);
+/* Emit a warning describing the size of the base region of (*ptr). */
+extern void __analyzer_dump_capacity (const void *ptr);
+
/* Dump information after analysis on all of the exploded nodes at this
program point.
diff --git a/gcc/testsuite/gcc.dg/analyzer/capacity-1.c b/gcc/testsuite/gcc.dg/analyzer/capacity-1.c
new file mode 100644
index 0000000..9ea41f7
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/analyzer/capacity-1.c
@@ -0,0 +1,106 @@
+#include <stdlib.h>
+#include "analyzer-decls.h"
+
+typedef unsigned __INT32_TYPE__ u32;
+
+void
+test_1 (void)
+{
+ char buf[16];
+ __analyzer_dump_capacity (buf); /* { dg-warning "capacity: '\\(sizetype\\)16'" } */
+}
+
+void
+test_2 (void)
+{
+ char ch;
+ __analyzer_dump_capacity (&ch); /* { dg-warning "capacity: '\\(sizetype\\)1'" } */
+}
+
+struct s3 { char buf[100]; };
+
+void
+test_3 (void)
+{
+ struct s3 s;
+ __analyzer_dump_capacity (&s); /* { dg-warning "capacity: '\\(sizetype\\)100'" } */
+}
+
+/* Capacity refers to the base region, not any offset within it. */
+
+void
+test_4 (void)
+{
+ char buf[1024];
+ __analyzer_dump_capacity (buf + 100); /* { dg-warning "capacity: '\\(sizetype\\)1024'" } */
+}
+
+void
+test_5 (void *p)
+{
+ __analyzer_dump_capacity (p); /* { dg-warning "capacity: 'UNKNOWN\\(sizetype\\)'" } */
+}
+
+void
+test_malloc (void)
+{
+ void *p = malloc (1024);
+
+ __analyzer_dump_capacity (p); /* { dg-warning "capacity: '\\(size_t\\)1024'" } */
+ free (p);
+}
+
+void
+test_alloca (size_t sz)
+{
+ void *p = alloca (sz);
+ __analyzer_dump_capacity (p); /* { dg-warning "capacity: 'INIT_VAL\\(sz_\[^\n\r\]*\\)'" } */
+}
+
+void
+test_vla (size_t sz)
+{
+ char buf[sz];
+ __analyzer_dump_capacity (buf); /* { dg-warning "capacity: 'INIT_VAL\\(sz_\[^\n\r\]*\\)'" } */
+}
+
+static void * __attribute__((noinline))
+called_by_test_interproc_malloc (size_t a)
+{
+ return malloc (a);
+}
+
+void *
+test_interproc_malloc (size_t sz)
+{
+ void *p = called_by_test_interproc_malloc (sz);
+ __analyzer_dump_capacity (p); /* { dg-warning "capacity: 'INIT_VAL\\(sz_\[^\n\r\]*\\)'" } */
+ return p;
+}
+
+struct s
+{
+ u32 f1;
+ char arr[];
+};
+
+static struct s * __attribute__((noinline))
+alloc_s (size_t num)
+{
+ struct s *p = malloc (sizeof(struct s) + num);
+ return p;
+}
+
+struct s *
+test_trailing_array (void)
+{
+ struct s *p = alloc_s (5);
+ __analyzer_dump_capacity (p); /* { dg-warning "capacity: '\\(\[^\n\r\]*\\)9'" } */
+ return p;
+}
+
+void
+test_unknown_arr (int p[])
+{
+ __analyzer_dump_capacity (p); /* { dg-warning "capacity: 'UNKNOWN\\(sizetype\\)'" } */
+}
diff --git a/gcc/testsuite/gcc.dg/analyzer/capacity-2.c b/gcc/testsuite/gcc.dg/analyzer/capacity-2.c
new file mode 100644
index 0000000..9f92bcf
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/analyzer/capacity-2.c
@@ -0,0 +1,53 @@
+#include <stdlib.h>
+#include "analyzer-decls.h"
+
+extern void might_realloc (void *);
+extern void cant_realloc (const void *);
+
+void *
+test_realloc_1 (void *p, size_t new_sz)
+{
+ void *q = realloc (p, new_sz);
+ __analyzer_dump_capacity (q); /* { dg-warning "capacity: 'UNKNOWN\\(sizetype\\)'" } */
+ return q;
+}
+
+void *
+test_realloc_2 (size_t sz_a, size_t sz_b)
+{
+ void *p = malloc (sz_a);
+ __analyzer_dump_capacity (p); /* { dg-warning "capacity: 'INIT_VAL\\(sz_a_\[^\n\r\]*\\)'" } */
+ void *q = realloc (p, sz_b);
+ __analyzer_dump_capacity (q); /* { dg-warning "capacity: 'UNKNOWN\\(sizetype\\)'" } */
+ return p;
+}
+
+void *
+test_might_realloc (void)
+{
+ void *p = malloc (1024);
+
+ __analyzer_dump_capacity (p); /* { dg-warning "capacity: '\\(size_t\\)1024'" } */
+
+ might_realloc (p);
+
+ __analyzer_dump_capacity (p); /* { dg-warning "capacity: 'UNKNOWN\\(sizetype\\)'" } */
+
+ return p;
+}
+
+void *
+test_cant_realloc (void)
+{
+ void *p = malloc (1024);
+
+ __analyzer_dump_capacity (p); /* { dg-warning "capacity: '\\(size_t\\)1024'" } */
+
+ cant_realloc (p);
+
+ __analyzer_dump_capacity (p); /* { dg-warning "capacity: '\\(size_t\\)1024'" } */
+
+ return p;
+}
+
+
diff --git a/gcc/testsuite/gcc.dg/analyzer/capacity-3.c b/gcc/testsuite/gcc.dg/analyzer/capacity-3.c
new file mode 100644
index 0000000..41e282c
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/analyzer/capacity-3.c
@@ -0,0 +1,82 @@
+#include <stdlib.h>
+#include "analyzer-decls.h"
+
+static void __attribute__((noinline))
+__analyzer_callee_1 (size_t inner_sz)
+{
+ void *p = alloca (inner_sz);
+ __analyzer_dump_capacity (p); /* { dg-warning "capacity: 'INIT_VAL\\(outer_sz_\[^\n\r\]*\\)'" } */
+}
+
+void
+test_1 (int flag, size_t outer_sz)
+{
+ if (flag)
+ __analyzer_callee_1 (outer_sz);
+
+ /* Verify that we merge state; in particular, the dynamic size of "p"
+ in the called frame should have been purged. */
+ __analyzer_dump_exploded_nodes (0); /* { dg-warning "1 processed enode" } */
+}
+
+void
+test_2 (int flag, size_t sz)
+{
+ if (flag)
+ {
+ void *p = malloc (sz);
+ __analyzer_dump_capacity (p); /* { dg-warning "capacity: 'INIT_VAL\\(sz_\[^\n\r\]*\\)'" } */
+ free (p);
+ /* The dynamic size of "p" should have been purged. */
+ __analyzer_dump_capacity (p); /* { dg-warning "capacity: 'UNKNOWN\\(sizetype\\)'" } */
+ }
+
+ /* Verify that we merge state. */
+ __analyzer_dump_exploded_nodes (0); /* { dg-warning "1 processed enode" } */
+}
+/* Verify that we purge state on the NULL branch when a malloc result is
+ tested against NULL. */
+
+void
+test_3 (size_t sz)
+{
+ void *p = malloc (sz);
+
+ if (p)
+ {
+ __analyzer_dump_capacity (p); /* { dg-warning "capacity: 'INIT_VAL\\(sz_\[^\n\r\]*\\)'" } */
+ }
+ else
+ {
+ /* The dynamic size of "p" should have been purged
+ due to "p" being equal to NULL. */
+ __analyzer_dump_capacity (p); /* { dg-warning "capacity: 'UNKNOWN\\(sizetype\\)'" } */
+ }
+
+ free (p);
+
+ /* The dynamic size of "p" should have been purged. */
+ __analyzer_dump_capacity (p); /* { dg-warning "capacity: 'UNKNOWN\\(sizetype\\)'" } */
+
+ /* Verify that we merge state. */
+ __analyzer_dump_exploded_nodes (0); /* { dg-warning "1 processed enode" } */
+}
+
+/* Verify that we purge dynamic extent of a pointer when it leaks. */
+
+static void __attribute__((noinline))
+__analyzer_callee_4 (size_t inner_sz)
+{
+ void *p = malloc (inner_sz);
+ __analyzer_dump_capacity (p); /* { dg-warning "capacity: 'INIT_VAL\\(outer_sz_\[^\n\r\]*\\)'" } */
+} /* { dg-warning "leak of 'p'" } */
+
+void
+test_4 (int flag, size_t outer_sz)
+{
+ if (flag)
+ __analyzer_callee_4 (outer_sz);
+
+ /* Verify that we merge state. */
+ __analyzer_dump_exploded_nodes (0); /* { dg-warning "1 processed enode" } */
+}
diff --git a/gcc/testsuite/gcc.dg/analyzer/explode-2a.c b/gcc/testsuite/gcc.dg/analyzer/explode-2a.c
new file mode 100644
index 0000000..126407f
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/analyzer/explode-2a.c
@@ -0,0 +1,51 @@
+/* PR analyzer/101068. */
+
+/* { dg-additional-options "--param analyzer-max-enodes-per-program-point=200 --param analyzer-bb-explosion-factor=50" } */
+
+#include <stdlib.h>
+
+extern int get (void);
+
+void test (void)
+{
+ void *p0, *p1, *p2, *p3;
+ /* Due to not purging constraints on SSA names within loops
+ (PR analyzer/101068), the analyzer effectively treats the original
+ explode-2.c as this code. */
+ int a = get ();
+ int b = get ();
+ while (a)
+ {
+ switch (b)
+ {
+ default:
+ case 0:
+ p0 = malloc (16); /* { dg-warning "leak" } */
+ break;
+ case 1:
+ free (p0); /* { dg-warning "double-'free' of 'p0'" "" { xfail *-*-* } } */
+ break;
+
+ case 2:
+ p1 = malloc (16); /* { dg-warning "leak" } */
+ break;
+ case 3:
+ free (p1); /* { dg-warning "double-'free' of 'p1'" "" { xfail *-*-* } } */
+ break;
+
+ case 4:
+ p2 = malloc (16); /* { dg-warning "leak" } */
+ break;
+ case 5:
+ free (p2); /* { dg-warning "double-'free' of 'p2'" "" { xfail *-*-* } } */
+ break;
+
+ case 6:
+ p3 = malloc (16); /* { dg-warning "leak" } */
+ break;
+ case 7:
+ free (p3); /* { dg-warning "double-'free' of 'p3'" "" { xfail *-*-* } } */
+ break;
+ }
+ }
+}
diff --git a/gcc/testsuite/gcc.dg/guality/pr49888.c b/gcc/testsuite/gcc.dg/guality/pr49888.c
index 4f3a250..919cfc9 100644
--- a/gcc/testsuite/gcc.dg/guality/pr49888.c
+++ b/gcc/testsuite/gcc.dg/guality/pr49888.c
@@ -4,7 +4,7 @@
static int v __attribute__((used));
-static void __attribute__((noinline, noclone))
+static void __attribute__((noipa))
f (int *p)
{
int c = *p;
diff --git a/gcc/testsuite/gcc.dg/pr101062.c b/gcc/testsuite/gcc.dg/pr101062.c
new file mode 100644
index 0000000..6c37ed8
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr101062.c
@@ -0,0 +1,29 @@
+/* PR middle-end/101062 */
+/* { dg-do run } */
+/* { dg-options "-O2 -fno-toplevel-reorder -frename-registers" } */
+
+union U { signed b : 5; };
+int c;
+volatile union U d[7] = { { 8 } };
+short e = 1;
+
+__attribute__((noipa)) void
+foo ()
+{
+ d[6].b = 0;
+ d[6].b = 0;
+ d[6].b = 0;
+ d[6].b = 0;
+ d[6].b = 0;
+ e = 0;
+ c = 0;
+}
+
+int
+main ()
+{
+ foo ();
+ if (e != 0)
+ __builtin_abort ();
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/torture/pr101088.c b/gcc/testsuite/gcc.dg/torture/pr101088.c
new file mode 100644
index 0000000..00fce39
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/pr101088.c
@@ -0,0 +1,45 @@
+/* { dg-do compile } */
+
+int bh, on, h0;
+
+void
+qw (int n2)
+{
+ int *e5;
+
+ if (n2 == 0)
+ {
+ n2 = 1;
+ while (n2 != 0)
+ for (n2 = 0; n2 < 1; ++n2)
+ {
+ }
+
+ e5 = &n2;
+ }
+ else
+ e5 = &on;
+
+ while (h0 < 1)
+ {
+ if (on == 0)
+ {
+ ++*e5;
+ bh = 0;
+ }
+ else
+ {
+ bh = 0;
+ ++on;
+ *e5 = on;
+ h0 = *e5;
+ if (h0 == 0)
+ {
+ *e5 = 0;
+ ++h0;
+ }
+ }
+
+ ++h0;
+ }
+}
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/pr100453.c b/gcc/testsuite/gcc.dg/tree-ssa/pr100453.c
new file mode 100644
index 0000000..0cf0ad2
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/pr100453.c
@@ -0,0 +1,18 @@
+/* { dg-do run } */
+/* { dg-options "-O1" } */
+
+struct a {
+ int b : 4;
+} d;
+static int c, e;
+static const struct a f;
+static void g(const struct a h) {
+ for (; c < 1; c++)
+ d = h;
+ e = h.b;
+ c = h.b;
+}
+int main() {
+ g(f);
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/vect/pr97832-4.c b/gcc/testsuite/gcc.dg/vect/pr97832-4.c
new file mode 100644
index 0000000..74ae27f
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/pr97832-4.c
@@ -0,0 +1,28 @@
+/* { dg-do compile } */
+/* { dg-additional-options "-Ofast" } */
+/* { dg-require-effective-target vect_double } */
+
+void foo1x1(double* restrict y, const double* restrict x, int clen)
+{
+ int xi = clen & 2;
+ double f_re = x[0+xi+0];
+ double f_im = x[4+xi+0];
+ int clen2 = (clen+xi) * 2;
+#pragma GCC unroll 0
+ for (int c = 0; c < clen2; c += 8) {
+#pragma GCC unroll 4
+ for (int k = 0; k < 4; ++k) {
+ double x_re = x[k];
+ double x_im = x[c+4+k];
+ double y_re = y[c+0+k];
+ double y_im = y[c+4+k];
+ y_re = y_re - x_re * f_re - x_im * f_im;;
+ y_im = y_im + x_re * f_im - x_im * f_re;
+ y[c+0+k] = y_re;
+ y[c+4+k] = y_im;
+ }
+ }
+}
+
+/* { dg-final { scan-tree-dump "vectorizing stmts using SLP" "vect" } } */
+/* { dg-final { scan-tree-dump "Loop contains only SLP stmts" "vect" } } */
diff --git a/gcc/testsuite/gcc.target/i386/bt-5.c b/gcc/testsuite/gcc.target/i386/bt-5.c
new file mode 100644
index 0000000..73e7ed2
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/bt-5.c
@@ -0,0 +1,44 @@
+/* PR rtl-optimization/46235 */
+/* { dg-do compile { target lp64 } } */
+/* { dg-options "-O2 -mtune=core2" } */
+
+int foo (int a, int x, int y)
+{
+ if (a & (1<<x))
+ return a;
+ return 1;
+}
+
+int bar_ww (int a, int x, int y, int z)
+{
+ return (a & (1<<x)) ? y : z;
+}
+
+int bar_lw (long long a, int x, int y, int z)
+{
+ return (a & (1LL<<x)) ? y : z;
+}
+
+long long bar_wl (int a, int x, long long y, long long z)
+{
+ return (a & (1<<x)) ? y : z;
+}
+
+long long bar_ll (long long a, int x, long long y, long long z)
+{
+ return (a & (1LL<<x)) ? y : z;
+}
+
+short bar_ws (int a, int x, short y, short z)
+{
+ return (a & (1<<x)) ? y : z;
+}
+
+short bar_ls (long long a, int x, short y, short z)
+{
+ return (a & (1LL<<x)) ? y : z;
+}
+
+/* { dg-final { scan-assembler-times "bt\[lq\]\[ \t\]" 7 } } */
+/* { dg-final { scan-assembler-not "sar\[lq\]\[ \t\]" } } */
+
diff --git a/gcc/testsuite/gcc.target/i386/bt-6.c b/gcc/testsuite/gcc.target/i386/bt-6.c
new file mode 100644
index 0000000..d4ef805
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/bt-6.c
@@ -0,0 +1,69 @@
+/* PR rtl-optimization/46235 */
+/* { dg-do compile } */
+/* { dg-options "-O2 -mtune=core2" } */
+
+unsigned char set1_bb (unsigned char x, int y)
+{
+ return (x & (1<<y)) != 0;
+}
+
+unsigned char set2_bb (unsigned char x, int y)
+{
+ return (x >> y) & 1;
+}
+
+unsigned char set1_wb (int x, int y)
+{
+ return (x & (1<<y)) != 0;
+}
+
+unsigned char set2_wb (int x, int y)
+{
+ return (x >> y) & 1;
+}
+
+unsigned char clr1_bb (unsigned char x, int y)
+{
+ return (x & (1<<y)) == 0;
+}
+
+unsigned char clr2_bb (unsigned char x, int y)
+{
+ return !((x >> y) & 1);
+}
+
+unsigned char clr1_wb (int x, int y)
+{
+ return (x & (1<<y)) == 0;
+}
+
+unsigned char clr2_wb (int x, int y)
+{
+ return !((x >> y) & 1);
+}
+
+int clr1_bw (unsigned char x, int y)
+{
+ return (x & (1<<y)) == 0;
+}
+
+int clr2_bw (unsigned char x, int y)
+{
+ return !((x >> y) & 1);
+}
+
+int clr1_ww (int x, int y)
+{
+ return (x & (1<<y)) == 0;
+}
+
+int clr2_ww (int x, int y)
+{
+ return !((x >> y) & 1);
+}
+
+/* { dg-final { scan-assembler-times "bt\[lq\]\[ \t\]" 12 } } */
+/* { dg-final { scan-assembler-not "sar\[lq\]\[ \t\]" } } */
+/* { dg-final { scan-assembler-not "and\[lq\]\[ \t\]" } } */
+/* { dg-final { scan-assembler-not "not\[lq\]\[ \t\]" } } */
+
diff --git a/gcc/testsuite/gcc.target/i386/bt-7.c b/gcc/testsuite/gcc.target/i386/bt-7.c
new file mode 100644
index 0000000..292d741
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/bt-7.c
@@ -0,0 +1,69 @@
+/* PR rtl-optimization/46235 */
+/* { dg-do compile { target lp64 } } */
+/* { dg-options "-O2 -mtune=core2" } */
+
+unsigned char set1_lb (long long x, int y)
+{
+ return (x & (1LL<<y)) != 0;
+}
+
+unsigned char set2_lb (long long x, int y)
+{
+ return (x >> y) & 1;
+}
+
+unsigned char clr1_lb (long long x, int y)
+{
+ return (x & (1LL<<y)) == 0;
+}
+
+unsigned char clr2_lb (long long x, int y)
+{
+ return !((x >> y) & 1);
+}
+
+int clr1_lw (long long x, int y)
+{
+ return (x & (1LL<<y)) == 0;
+}
+
+int clr2_lw (long long x, int y)
+{
+ return !((x >> y) & 1);
+}
+
+long long clr1_bl (unsigned char x, int y)
+{
+ return (x & (1<<y)) == 0;
+}
+
+long long clr2_bl (unsigned char x, int y)
+{
+ return !((x >> y) & 1);
+}
+
+long long clr1_wl (int x, int y)
+{
+ return (x & (1<<y)) == 0;
+}
+
+long long clr2_wl (int x, int y)
+{
+ return !((x >> y) & 1);
+}
+
+long long clr1_ll (long long x, int y)
+{
+ return (x & (1LL<<y)) == 0;
+}
+
+long long clr2_ll (long long x, int y)
+{
+ return !((x >> y) & 1);
+}
+
+/* { dg-final { scan-assembler-times "bt\[lq\]\[ \t\]" 12 } } */
+/* { dg-final { scan-assembler-not "sar\[lq\]\[ \t\]" } } */
+/* { dg-final { scan-assembler-not "and\[lq\]\[ \t\]" } } */
+/* { dg-final { scan-assembler-not "not\[lq\]\[ \t\]" } } */
+
diff --git a/gcc/testsuite/gfortran.dg/gomp/defaultmap-1.f90 b/gcc/testsuite/gfortran.dg/gomp/defaultmap-1.f90
new file mode 100644
index 0000000..299d971
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/gomp/defaultmap-1.f90
@@ -0,0 +1,19 @@
+! PR fortran/92568
+
+implicit none
+
+!$omp target defaultmap(bar) ! { dg-error "25: Expected ALLOC, TO, FROM, TOFROM, FIRSTPRIVATE, NONE or DEFAULT" }
+
+!$omp target defaultmap ( alloc: foo) ! { dg-error "34: Expected SCALAR, AGGREGATE, ALLOCATABLE or POINTER" }
+
+!$omp target defaultmap(alloc:scalar) defaultmap(none:Scalar) ! { dg-error "DEFAULTMAP at .1. but prior DEFAULTMAP for category SCALAR" }
+
+!$omp target defaultmap(default:aggregate) defaultmap(tofrom) ! { dg-error "DEFAULTMAP at .1. but prior DEFAULTMAP for category AGGREGATE" }
+
+!$omp target defaultmap(from:pointer) defaultmap(tofrom:pointer) ! { dg-error "DEFAULTMAP at .1. but prior DEFAULTMAP for category POINTER" }
+
+!$omp target defaultmap(from:scalar) defaultmap(to:allocatable) defaultmap(tofrom:allocatable) ! { dg-error "DEFAULTMAP at .1. but prior DEFAULTMAP for category ALLOCATABLE" }
+
+!$omp target defaultmap(from) defaultmap(to) ! { dg-error "DEFAULTMAP at .1. but prior DEFAULTMAP with unspecified category" }
+
+end
diff --git a/gcc/testsuite/gfortran.dg/gomp/defaultmap-2.f90 b/gcc/testsuite/gfortran.dg/gomp/defaultmap-2.f90
new file mode 100644
index 0000000..1658424
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/gomp/defaultmap-2.f90
@@ -0,0 +1,108 @@
+! PR fortran/92568
+!
+implicit none
+ type t
+ end type t
+
+ integer :: ii
+ integer :: arr(5)
+ integer, allocatable :: aii, aarr(:)
+ integer, pointer :: pii, parr(:)
+
+ character :: str1, str1arr(5), str1a, str1aarr(:), str1p, str1parr(:)
+ character(len=5) :: str5, str5arr(5), str5a, str5aarr(:), str5p, str5parr(:)
+ character(len=:) :: strXa, strXaarr(:), strXp, strXparr(:)
+ allocatable :: str1a, str1aarr, str5a, str5aarr, strXa, strXaarr
+ pointer :: str1p, str1parr, str5p, str5parr, strXp, strXparr
+
+ type(t) :: dt, dtarr(5), dta, dtaarr(:), dtp, dtparr(:)
+ allocatable :: dta, dtaarr
+ pointer :: dtp, dtparr
+
+ allocate(aii, aarr(5), str1a, str1aarr(5), dta, dtparr(5))
+ allocate(pii, parr(5), str1p, str1parr(5), dtp, dtparr(5))
+ allocate(character(len=7) :: strXa, strXaarr(5), strXp, strXparr(5))
+
+
+ !$omp target defaultmap ( none ) ! { dg-note "enclosing 'target'" }
+ ii = 42; arr = 42; aii = 42; aarr = 42; pii = 42; parr = 42
+ ! { dg-error "'ii' not specified in enclosing 'target'" "" { target *-*-* } .-1 }
+ ! { dg-error "'arr' not specified in enclosing 'target'" "" { target *-*-* } .-2 }
+ ! { dg-error "'aii' not specified in enclosing 'target'" "" { target *-*-* } .-3 }
+ ! { dg-error "'aarr' not specified in enclosing 'target'" "" { target *-*-* } .-4 }
+ ! { dg-error "'pii' not specified in enclosing 'target'" "" { target *-*-* } .-5 }
+ ! { dg-error "'parr' not specified in enclosing 'target'" "" { target *-*-* } .-6 }
+
+ str1 = ""; str1arr = ""; str1a = ""; str1aarr = ""; str1p = ""; str1parr = ""
+ ! { dg-error "'str1' not specified in enclosing 'target'" "" { target *-*-* } .-1 }
+ ! { dg-error "'str1arr' not specified in enclosing 'target'" "" { target *-*-* } .-2 }
+ ! { dg-error "'str1a' not specified in enclosing 'target'" "" { target *-*-* } .-3 }
+ ! { dg-error "'str1aarr' not specified in enclosing 'target'" "" { target *-*-* } .-4 }
+ ! { dg-error "'str1p' not specified in enclosing 'target'" "" { target *-*-* } .-5 }
+ ! { dg-error "'str1parr' not specified in enclosing 'target'" "" { target *-*-* } .-6 }
+
+ str5 = ""; str5arr = ""; str5a = ""; str5aarr = ""; str5p = ""; str5parr = ""
+ ! { dg-error "'str5' not specified in enclosing 'target'" "" { target *-*-* } .-1 }
+ ! { dg-error "'str5arr' not specified in enclosing 'target'" "" { target *-*-* } .-2 }
+ ! { dg-error "'str5a' not specified in enclosing 'target'" "" { target *-*-* } .-3 }
+ ! { dg-error "'str5aarr' not specified in enclosing 'target'" "" { target *-*-* } .-4 }
+ ! { dg-error "'str5p' not specified in enclosing 'target'" "" { target *-*-* } .-5 }
+ ! { dg-error "'str5parr' not specified in enclosing 'target'" "" { target *-*-* } .-6 }
+
+ strXa = ""; strXaarr = ""; strXp = ""; strXparr = ""
+ ! { dg-error "'strxa' not specified in enclosing 'target'" "" { target *-*-* } .-1 }
+ ! { dg-error "'strxaarr' not specified in enclosing 'target'" "" { target *-*-* } .-2 }
+ ! { dg-error "'strxp' not specified in enclosing 'target'" "" { target *-*-* } .-3 }
+ ! { dg-error "'strxparr' not specified in enclosing 'target'" "" { target *-*-* } .-4 }
+
+ dt = t(); dtarr = t(); dta = t(); dtaarr = t(); dtp = t(); dtparr = t()
+ ! { dg-error "'dt' not specified in enclosing 'target'" "" { target *-*-* } .-1 }
+ ! { dg-error "'dtarr' not specified in enclosing 'target'" "" { target *-*-* } .-2 }
+ ! { dg-error "'dta' not specified in enclosing 'target'" "" { target *-*-* } .-3 }
+ ! { dg-error "'dtaarr' not specified in enclosing 'target'" "" { target *-*-* } .-4 }
+ ! { dg-error "'dtp' not specified in enclosing 'target'" "" { target *-*-* } .-5 }
+ ! { dg-error "'dtparr' not specified in enclosing 'target'" "" { target *-*-* } .-6 }
+ !$omp end target
+
+
+ !$omp target defaultmap(none : scalar) defaultmap(none : aggregate) &
+ !$omp& defaultmap(none : allocatable) defaultmap(none : pointer) ! { dg-note "enclosing 'target'" }
+ ii = 42; arr = 42; aii = 42; aarr = 42; pii = 42; parr = 42
+ ! { dg-error "'ii' not specified in enclosing 'target'" "" { target *-*-* } .-1 }
+ ! { dg-error "'arr' not specified in enclosing 'target'" "" { target *-*-* } .-2 }
+ ! { dg-error "'aii' not specified in enclosing 'target'" "" { target *-*-* } .-3 }
+ ! { dg-error "'aarr' not specified in enclosing 'target'" "" { target *-*-* } .-4 }
+ ! { dg-error "'pii' not specified in enclosing 'target'" "" { target *-*-* } .-5 }
+ ! { dg-error "'parr' not specified in enclosing 'target'" "" { target *-*-* } .-6 }
+
+ str1 = ""; str1arr = ""; str1a = ""; str1aarr = ""; str1p = ""; str1parr = ""
+ ! { dg-error "'str1' not specified in enclosing 'target'" "" { target *-*-* } .-1 }
+ ! { dg-error "'str1arr' not specified in enclosing 'target'" "" { target *-*-* } .-2 }
+ ! { dg-error "'str1a' not specified in enclosing 'target'" "" { target *-*-* } .-3 }
+ ! { dg-error "'str1aarr' not specified in enclosing 'target'" "" { target *-*-* } .-4 }
+ ! { dg-error "'str1p' not specified in enclosing 'target'" "" { target *-*-* } .-5 }
+ ! { dg-error "'str1parr' not specified in enclosing 'target'" "" { target *-*-* } .-6 }
+
+ str5 = ""; str5arr = ""; str5a = ""; str5aarr = ""; str5p = ""; str5parr = ""
+ ! { dg-error "'str5' not specified in enclosing 'target'" "" { target *-*-* } .-1 }
+ ! { dg-error "'str5arr' not specified in enclosing 'target'" "" { target *-*-* } .-2 }
+ ! { dg-error "'str5a' not specified in enclosing 'target'" "" { target *-*-* } .-3 }
+ ! { dg-error "'str5aarr' not specified in enclosing 'target'" "" { target *-*-* } .-4 }
+ ! { dg-error "'str5p' not specified in enclosing 'target'" "" { target *-*-* } .-5 }
+ ! { dg-error "'str5parr' not specified in enclosing 'target'" "" { target *-*-* } .-6 }
+
+ strXa = ""; strXaarr = ""; strXp = ""; strXparr = ""
+ ! { dg-error "'strxa' not specified in enclosing 'target'" "" { target *-*-* } .-1 }
+ ! { dg-error "'strxaarr' not specified in enclosing 'target'" "" { target *-*-* } .-2 }
+ ! { dg-error "'strxp' not specified in enclosing 'target'" "" { target *-*-* } .-3 }
+ ! { dg-error "'strxparr' not specified in enclosing 'target'" "" { target *-*-* } .-4 }
+
+ dt = t(); dtarr = t(); dta = t(); dtaarr = t(); dtp = t(); dtparr = t()
+ ! { dg-error "'dt' not specified in enclosing 'target'" "" { target *-*-* } .-1 }
+ ! { dg-error "'dtarr' not specified in enclosing 'target'" "" { target *-*-* } .-2 }
+ ! { dg-error "'dta' not specified in enclosing 'target'" "" { target *-*-* } .-3 }
+ ! { dg-error "'dtaarr' not specified in enclosing 'target'" "" { target *-*-* } .-4 }
+ ! { dg-error "'dtp' not specified in enclosing 'target'" "" { target *-*-* } .-5 }
+ ! { dg-error "'dtparr' not specified in enclosing 'target'" "" { target *-*-* } .-6 }
+ !$omp end target
+end
diff --git a/gcc/testsuite/gfortran.dg/gomp/defaultmap-3.f90 b/gcc/testsuite/gfortran.dg/gomp/defaultmap-3.f90
new file mode 100644
index 0000000..cfe40e8
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/gomp/defaultmap-3.f90
@@ -0,0 +1,60 @@
+! { dg-additional-options "-fdump-tree-original" }
+! { dg-additional-options "-fdump-tree-gimple" }
+!
+! PR fortran/92568
+!
+implicit none
+ type t
+ end type t
+
+ integer :: ii
+ integer :: arr(5)
+ integer, allocatable :: aii, aarr(:)
+ integer, pointer :: pii, parr(:)
+
+ character :: str1, str1arr(5), str1a, str1aarr(:), str1p, str1parr(:)
+ character(len=5) :: str5, str5arr(5), str5a, str5aarr(:), str5p, str5parr(:)
+ character(len=:) :: strXa, strXaarr(:), strXp, strXparr(:)
+ allocatable :: str1a, str1aarr, str5a, str5aarr, strXa, strXaarr
+ pointer :: str1p, str1parr, str5p, str5parr, strXp, strXparr
+
+ type(t) :: dt, dtarr(5), dta, dtaarr(:), dtp, dtparr(:)
+ allocatable :: dta, dtaarr
+ pointer :: dtp, dtparr
+
+ allocate(aii, aarr(5), str1a, str1aarr(5), dta, dtparr(5))
+ allocate(pii, parr(5), str1p, str1parr(5), dtp, dtparr(5))
+ allocate(character(len=7) :: strXa, strXaarr(5), strXp, strXparr(5))
+
+
+ !$omp target defaultmap ( none ) &
+ !$omp& map(tofrom: ii, arr, aii, aarr, pii, parr) &
+ !$omp& map(tofrom: str1, str1arr, str1a, str1aarr, str1p, str1parr) &
+ !$omp& map(tofrom: str5, str5arr, str5a, str5aarr, str5p, str5parr) &
+ !$omp& map(tofrom: strXa, strXaarr, strXp, strXparr) &
+ !$omp& map(tofrom: dt, dtarr, dta, dtaarr, dtp, dtparr)
+ ii = 42; arr = 42; aii = 42; aarr = 42; pii = 42; parr = 42
+ str1 = ""; str1arr = ""; str1a = ""; str1aarr = ""; str1p = ""; str1parr = ""
+ str5 = ""; str5arr = ""; str5a = ""; str5aarr = ""; str5p = ""; str5parr = ""
+ strXa = ""; strXaarr = ""; strXp = ""; strXparr = ""
+ dt = t(); dtarr = t(); dta = t(); dtaarr = t(); dtp = t(); dtparr = t()
+ !$omp end target
+
+
+ !$omp target defaultmap(none : scalar) defaultmap(none : aggregate) &
+ !$omp& defaultmap(none : allocatable) defaultmap(none : pointer) &
+ !$omp& map(alloc: ii, arr, aii, aarr, pii, parr) &
+ !$omp& map(alloc: str1, str1arr, str1a, str1aarr, str1p, str1parr) &
+ !$omp& map(alloc: str5, str5arr, str5a, str5aarr, str5p, str5parr) &
+ !$omp& map(alloc: strXa, strXaarr, strXp, strXparr) &
+ !$omp& map(alloc: dt, dtarr, dta, dtaarr, dtp, dtparr)
+ ii = 42; arr = 42; aii = 42; aarr = 42; pii = 42; parr = 42
+ str1 = ""; str1arr = ""; str1a = ""; str1aarr = ""; str1p = ""; str1parr = ""
+ str5 = ""; str5arr = ""; str5a = ""; str5aarr = ""; str5p = ""; str5parr = ""
+ strXa = ""; strXaarr = ""; strXp = ""; strXparr = ""
+ dt = t(); dtarr = t(); dta = t(); dtaarr = t(); dtp = t(); dtparr = t()
+ !$omp end target
+end
+
+! { dg-final { scan-tree-dump-times "#pragma omp target map\\(tofrom:.* defaultmap\\(none\\)" 1 "original" } }
+! { dg-final { scan-tree-dump-times "#pragma omp target map\\(alloc:.* defaultmap\\(none:scalar\\) defaultmap\\(none:aggregate\\) defaultmap\\(none:allocatable\\) defaultmap\\(none:pointer\\)" 1 "original" } }
diff --git a/gcc/testsuite/gfortran.dg/gomp/defaultmap-4.f90 b/gcc/testsuite/gfortran.dg/gomp/defaultmap-4.f90
new file mode 100644
index 0000000..89bbe87
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/gomp/defaultmap-4.f90
@@ -0,0 +1,141 @@
+! { dg-additional-options "-fdump-tree-original" }
+! { dg-additional-options "-fdump-tree-gimple" }
+!
+! PR fortran/92568
+!
+implicit none
+ type t
+ end type t
+
+ integer :: ii
+ integer :: arr(5)
+ integer, allocatable :: aii, aarr(:)
+ integer, pointer :: pii, parr(:)
+
+ character :: str1, str1arr(5), str1a, str1aarr(:), str1p, str1parr(:)
+ character(len=5) :: str5, str5arr(5), str5a, str5aarr(:), str5p, str5parr(:)
+ character(len=:) :: strXa, strXaarr(:), strXp, strXparr(:)
+ allocatable :: str1a, str1aarr, str5a, str5aarr, strXa, strXaarr
+ pointer :: str1p, str1parr, str5p, str5parr, strXp, strXparr
+
+ type(t) :: dt, dtarr(5), dta, dtaarr(:), dtp, dtparr(:)
+ allocatable :: dta, dtaarr
+ pointer :: dtp, dtparr
+
+ allocate(aii, aarr(5), str1a, str1aarr(5), dta, dtparr(5))
+ allocate(pii, parr(5), str1p, str1parr(5), dtp, dtparr(5))
+ allocate(character(len=7) :: strXa, strXaarr(5), strXp, strXparr(5))
+
+
+ !$omp target defaultmap ( alloc )
+ ii = 42; arr = 42; aii = 42; aarr = 42; pii = 42; parr = 42
+ str1 = ""; str1arr = ""; str1a = ""; str1aarr = ""; str1p = ""; str1parr = ""
+ str5 = ""; str5arr = ""; str5a = ""; str5aarr = ""; str5p = ""; str5parr = ""
+ strXa = ""; strXaarr = ""; strXp = ""; strXparr = ""
+ dt = t(); dtarr = t(); dta = t(); dtaarr = t(); dtp = t(); dtparr = t()
+ !$omp end target
+
+ !$omp target defaultmap(alloc : scalar) defaultmap(to : aggregate) &
+ !$omp& defaultmap(tofrom : allocatable) defaultmap(firstprivate : pointer)
+ ii = 42; arr = 42; aii = 42; aarr = 42; pii = 42; parr = 42
+ str1 = ""; str1arr = ""; str1a = ""; str1aarr = ""; str1p = ""; str1parr = ""
+ str5 = ""; str5arr = ""; str5a = ""; str5aarr = ""; str5p = ""; str5parr = ""
+ strXa = ""; strXaarr = ""; strXp = ""; strXparr = ""
+ dt = t(); dtarr = t(); dta = t(); dtaarr = t(); dtp = t(); dtparr = t()
+ !$omp end target
+end
+
+! { dg-final { scan-tree-dump-times "#pragma omp target defaultmap\\(alloc:scalar\\) defaultmap\\(to:aggregate\\) defaultmap\\(tofrom:allocatable\\) defaultmap\\(firstprivate:pointer\\)" 1 "original" } }
+! { dg-final { scan-tree-dump-times "#pragma omp target defaultmap\\(alloc\\)" 1 "original" } }
+
+! { dg-final { scan-tree-dump-times "firstprivate\\(dtp\\)" 1 "gimple" } }
+! { dg-final { scan-tree-dump-times "firstprivate\\(pii\\)" 1 "gimple" } }
+! { dg-final { scan-tree-dump-times "firstprivate\\(str1p\\)" 1 "gimple" } }
+! { dg-final { scan-tree-dump-times "firstprivate\\(str5p\\)" 1 "gimple" } }
+! { dg-final { scan-tree-dump-times "firstprivate\\(strxp\\)" 1 "gimple" } }
+! { dg-final { scan-tree-dump-times "map\\(alloc:\\*aii \\\[len:" 1 "gimple" } }
+! { dg-final { scan-tree-dump-times "map\\(alloc:aii \\\[pointer assign, bias: 0\\\]\\)" 2 "gimple" } }
+! { dg-final { scan-tree-dump-times "map\\(alloc:arr \\\[len:" 1 "gimple" } }
+! { dg-final { scan-tree-dump-times "map\\(alloc:\\*\\(c_char \\*\\) aarr\\.data \\\[len:" 1 "gimple" } }
+! { dg-final { scan-tree-dump-times "map\\(alloc:\\*\\(c_char \\*\\) dtaarr\\.data \\\[len:" 1 "gimple" } }
+! { dg-final { scan-tree-dump-times "map\\(alloc:\\*\\(c_char \\*\\) dtparr\\.data \\\[len:" 1 "gimple" } }
+! { dg-final { scan-tree-dump-times "map\\(alloc:\\*\\(c_char \\*\\) parr\\.data \\\[len:" 1 "gimple" } }
+! { dg-final { scan-tree-dump-times "map\\(alloc:\\*\\(c_char \\*\\) str1aarr\\.data \\\[len:" 1 "gimple" } }
+! { dg-final { scan-tree-dump-times "map\\(alloc:\\*\\(c_char \\*\\) str1parr\\.data \\\[len:" 1 "gimple" } }
+! { dg-final { scan-tree-dump-times "map\\(alloc:\\*\\(c_char \\*\\) str5aarr\\.data \\\[len:" 1 "gimple" } }
+! { dg-final { scan-tree-dump-times "map\\(alloc:\\*\\(c_char \\*\\) str5parr\\.data \\\[len:" 1 "gimple" } }
+! { dg-final { scan-tree-dump-times "map\\(alloc:\\*\\(c_char \\*\\) strxaarr\\.data \\\[len:" 1 "gimple" } }
+! { dg-final { scan-tree-dump-times "map\\(alloc:\\*\\(c_char \\*\\) strxparr\\.data \\\[len:" 1 "gimple" } }
+! { dg-final { scan-tree-dump-times "map\\(alloc:\\(character\\(kind=1\\)\\\[0:\\\]\\\[1:1\\\] \\* restrict\\) str1aarr\\.data \\\[pointer assign, bias: 0\\\]\\)" 2 "gimple" } }
+! { dg-final { scan-tree-dump-times "map\\(alloc:\\(character\\(kind=1\\)\\\[0:\\\]\\\[1:5\\\] \\* restrict\\) str5aarr\\.data \\\[pointer assign, bias: 0\\\]\\)" 2 "gimple" } }
+! { dg-final { scan-tree-dump-times "map\\(alloc:\\(character\\(kind=1\\)\\\[0:\\\]\\\[1:\\.strxaarr\\\] \\* restrict\\) strxaarr\\.data \\\[pointer assign, bias: 0\\\]\\)" 2 "gimple" } }
+! { dg-final { scan-tree-dump-times "map\\(alloc:\\*dta \\\[len:" 1 "gimple" } }
+! { dg-final { scan-tree-dump-times "map\\(alloc:dta \\\[pointer assign, bias: 0\\\]\\)" 2 "gimple" } }
+! { dg-final { scan-tree-dump-times "map\\(alloc:dtarr \\\[len:" 1 "gimple" } }
+! { dg-final { scan-tree-dump-times "map\\(alloc:dt \\\[len:" 1 "gimple" } }
+! { dg-final { scan-tree-dump-times "map\\(alloc:\\*dtp \\\[len:" 1 "gimple" } }
+! { dg-final { scan-tree-dump-times "map\\(alloc:dtp \\\[pointer assign, bias: 0\\\]\\)" 1 "gimple" } }
+! { dg-final { scan-tree-dump-times "map\\(alloc:ii \\\[len:" 2 "gimple" } }
+! { dg-final { scan-tree-dump-times "map\\(alloc:\\(integer\\(kind=4\\)\\\[0:\\\] \\* restrict\\) aarr\\.data \\\[pointer assign, bias: 0\\\]\\)" 2 "gimple" } }
+! { dg-final { scan-tree-dump-times "map\\(alloc:\\*pii \\\[len:" 1 "gimple" } }
+! { dg-final { scan-tree-dump-times "map\\(alloc:pii \\\[pointer assign, bias: 0\\\]\\)" 1 "gimple" } }
+! { dg-final { scan-tree-dump-times "map\\(alloc:\\*str1a \\\[len:" 1 "gimple" } }
+! { dg-final { scan-tree-dump-times "map\\(alloc:str1a \\\[pointer assign, bias: 0\\\]\\)" 2 "gimple" } }
+! { dg-final { scan-tree-dump-times "map\\(alloc:str1arr \\\[len:" 1 "gimple" } }
+! { dg-final { scan-tree-dump-times "map\\(alloc:str1 \\\[len:" 1 "gimple" } }
+! { dg-final { scan-tree-dump-times "map\\(alloc:\\*str1p \\\[len:" 1 "gimple" } }
+! { dg-final { scan-tree-dump-times "map\\(alloc:str1p \\\[pointer assign, bias: 0\\\]\\)" 1 "gimple" } }
+! { dg-final { scan-tree-dump-times "map\\(alloc:\\*str5a \\\[len:" 1 "gimple" } }
+! { dg-final { scan-tree-dump-times "map\\(alloc:str5a \\\[pointer assign, bias: 0\\\]\\)" 2 "gimple" } }
+! { dg-final { scan-tree-dump-times "map\\(alloc:str5arr \\\[len:" 1 "gimple" } }
+! { dg-final { scan-tree-dump-times "map\\(alloc:str5 \\\[len:" 1 "gimple" } }
+! { dg-final { scan-tree-dump-times "map\\(alloc:\\*str5p \\\[len:" 1 "gimple" } }
+! { dg-final { scan-tree-dump-times "map\\(alloc:str5p \\\[pointer assign, bias: 0\\\]\\)" 1 "gimple" } }
+! { dg-final { scan-tree-dump-times "map\\(alloc:\\(struct t\\\[0:\\\] \\* restrict\\) dtaarr\\.data \\\[pointer assign, bias: 0\\\]\\)" 2 "gimple" } }
+! { dg-final { scan-tree-dump-times "map\\(alloc:\\*strxa \\\[len:" 1 "gimple" } }
+! { dg-final { scan-tree-dump-times "map\\(alloc:strxa \\\[pointer assign, bias: 0\\\]\\)" 2 "gimple" } }
+! { dg-final { scan-tree-dump-times "map\\(alloc:\\*strxp \\\[len:" 1 "gimple" } }
+! { dg-final { scan-tree-dump-times "map\\(alloc:strxp \\\[pointer assign, bias: 0\\\]\\)" 1 "gimple" } }
+! { dg-final { scan-tree-dump-times "map\\(always_pointer:\\(character\\(kind=1\\)\\\[0:\\\]\\\[1:1\\\] \\*\\) str1parr\\.data \\\[pointer assign, bias: 0\\\]\\)" 2 "gimple" } }
+! { dg-final { scan-tree-dump-times "map\\(always_pointer:\\(character\\(kind=1\\)\\\[0:\\\]\\\[1:5\\\] \\*\\) str5parr\\.data \\\[pointer assign, bias: 0\\\]\\)" 2 "gimple" } }
+! { dg-final { scan-tree-dump-times "map\\(always_pointer:\\(character\\(kind=1\\)\\\[0:\\\]\\\[1:\\.strxparr\\\] \\*\\) strxparr\\.data \\\[pointer assign, bias: 0\\\]\\)" 2 "gimple" } }
+! { dg-final { scan-tree-dump-times "map\\(always_pointer:\\(integer\\(kind=4\\)\\\[0:\\\] \\*\\) parr\\.data \\\[pointer assign, bias: 0\\\]\\)" 2 "gimple" } }
+! { dg-final { scan-tree-dump-times "map\\(always_pointer:\\(struct t\\\[0:\\\] \\*\\) dtparr\\.data \\\[pointer assign, bias: 0\\\]\\)" 2 "gimple" } }
+! { dg-final { scan-tree-dump-times "map\\(to:aarr \\\[pointer set, len:" 2 "gimple" } }
+! { dg-final { scan-tree-dump-times "map\\(to:arr \\\[len:" 1 "gimple" } }
+! { dg-final { scan-tree-dump-times "map\\(to:\\*\\(c_char \\*\\) dtparr\\.data \\\[len:" 1 "gimple" } }
+! { dg-final { scan-tree-dump-times "map\\(to:\\*\\(c_char \\*\\) parr\\.data \\\[len:" 1 "gimple" } }
+! { dg-final { scan-tree-dump-times "map\\(to:\\*\\(c_char \\*\\) str1parr\\.data \\\[len:" 1 "gimple" } }
+! { dg-final { scan-tree-dump-times "map\\(to:\\*\\(c_char \\*\\) str5parr\\.data \\\[len:" 1 "gimple" } }
+! { dg-final { scan-tree-dump-times "map\\(to:\\*\\(c_char \\*\\) strxparr\\.data \\\[len:" 1 "gimple" } }
+! { dg-final { scan-tree-dump-times "map\\(to:dtaarr \\\[pointer set, len:" 2 "gimple" } }
+! { dg-final { scan-tree-dump-times "map\\(to:dtarr \\\[len:" 1 "gimple" } }
+! { dg-final { scan-tree-dump-times "map\\(to:dt \\\[len:" 1 "gimple" } }
+! { dg-final { scan-tree-dump-times "map\\(to:dtparr \\\[pointer set, len:" 2 "gimple" } }
+! { dg-final { scan-tree-dump-times "map\\(tofrom:\\*aii \\\[len:" 1 "gimple" } }
+! { dg-final { scan-tree-dump-times "map\\(tofrom:\\*\\(c_char \\*\\) aarr\\.data \\\[len:" 1 "gimple" } }
+! { dg-final { scan-tree-dump-times "map\\(tofrom:\\*\\(c_char \\*\\) dtaarr\\.data \\\[len:" 1 "gimple" } }
+! { dg-final { scan-tree-dump-times "map\\(tofrom:\\*\\(c_char \\*\\) str1aarr\\.data \\\[len:" 1 "gimple" } }
+! { dg-final { scan-tree-dump-times "map\\(tofrom:\\*\\(c_char \\*\\) str5aarr\\.data \\\[len:" 1 "gimple" } }
+! { dg-final { scan-tree-dump-times "map\\(tofrom:\\*\\(c_char \\*\\) strxaarr\\.data \\\[len:" 1 "gimple" } }
+! { dg-final { scan-tree-dump-times "map\\(tofrom:\\*dta \\\[len:" 1 "gimple" } }
+! { dg-final { scan-tree-dump-times "map\\(tofrom:\\*str1a \\\[len:" 1 "gimple" } }
+! { dg-final { scan-tree-dump-times "map\\(tofrom:\\*str5a \\\[len:" 1 "gimple" } }
+! { dg-final { scan-tree-dump-times "map\\(tofrom:\\*strxa \\\[len:" 1 "gimple" } }
+! { dg-final { scan-tree-dump-times "map\\(to:parr \\\[pointer set, len:" 2 "gimple" } }
+! { dg-final { scan-tree-dump-times "map\\(to:str1aarr \\\[pointer set, len:" 2 "gimple" } }
+! { dg-final { scan-tree-dump-times "map\\(to:str1arr \\\[len:" 1 "gimple" } }
+! { dg-final { scan-tree-dump-times "map\\(to:str1 \\\[len:" 1 "gimple" } }
+! { dg-final { scan-tree-dump-times "map\\(to:str1parr \\\[pointer set, len:" 2 "gimple" } }
+! { dg-final { scan-tree-dump-times "map\\(to:str5aarr \\\[pointer set, len:" 2 "gimple" } }
+! { dg-final { scan-tree-dump-times "map\\(to:str5arr \\\[len:" 1 "gimple" } }
+! { dg-final { scan-tree-dump-times "map\\(to:str5 \\\[len:" 1 "gimple" } }
+! { dg-final { scan-tree-dump-times "map\\(to:str5parr \\\[pointer set, len:" 2 "gimple" } }
+! { dg-final { scan-tree-dump-times "map\\(to:\\.strxaarr \\\[len:" 2 "gimple" } }
+! { dg-final { scan-tree-dump-times "map\\(to:strxaarr \\\[pointer set, len:" 2 "gimple" } }
+! { dg-final { scan-tree-dump-times "map\\(to:\\.strxa \\\[len:" 2 "gimple" } }
+! { dg-final { scan-tree-dump-times "map\\(to:\\.strxparr \\\[len:" 2 "gimple" } }
+! { dg-final { scan-tree-dump-times "map\\(to:strxparr \\\[pointer set, len:" 2 "gimple" } }
+! { dg-final { scan-tree-dump-times "map\\(to:\\.strxp \\\[len:" 2 "gimple" } }
+! { dg-final { scan-tree-dump-times "#pragma omp target num_teams\\(1\\) thread_limit\\(0\\) defaultmap\\(alloc\\)" 1 "gimple" } }
+! { dg-final { scan-tree-dump-times "#pragma omp target num_teams\\(1\\) thread_limit\\(0\\) defaultmap\\(alloc:scalar\\) defaultmap\\(to:aggregate\\) defaultmap\\(tofrom:allocatable\\) defaultmap\\(firstprivate:pointer\\)" 1 "gimple" } }
diff --git a/gcc/testsuite/gfortran.dg/gomp/defaultmap-5.f90 b/gcc/testsuite/gfortran.dg/gomp/defaultmap-5.f90
new file mode 100644
index 0000000..d6b32dc
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/gomp/defaultmap-5.f90
@@ -0,0 +1,145 @@
+! { dg-additional-options "-fdump-tree-original" }
+! { dg-additional-options "-fdump-tree-gimple" }
+!
+! PR fortran/92568
+!
+implicit none
+ type t
+ end type t
+
+ integer :: ii
+ integer :: arr(5)
+ integer, allocatable :: aii, aarr(:)
+ integer, pointer :: pii, parr(:)
+
+ character :: str1, str1arr(5), str1a, str1aarr(:), str1p, str1parr(:)
+ character(len=5) :: str5, str5arr(5), str5a, str5aarr(:), str5p, str5parr(:)
+ character(len=:) :: strXa, strXaarr(:), strXp, strXparr(:)
+ allocatable :: str1a, str1aarr, str5a, str5aarr, strXa, strXaarr
+ pointer :: str1p, str1parr, str5p, str5parr, strXp, strXparr
+
+ type(t) :: dt, dtarr(5), dta, dtaarr(:), dtp, dtparr(:)
+ allocatable :: dta, dtaarr
+ pointer :: dtp, dtparr
+
+ allocate(aii, aarr(5), str1a, str1aarr(5), dta, dtparr(5))
+ allocate(pii, parr(5), str1p, str1parr(5), dtp, dtparr(5))
+ allocate(character(len=7) :: strXa, strXaarr(5), strXp, strXparr(5))
+
+
+ !$omp target defaultmap ( to )
+ ii = 42; arr = 42; aii = 42; aarr = 42; pii = 42; parr = 42
+ str1 = ""; str1arr = ""; str1a = ""; str1aarr = ""; str1p = ""; str1parr = ""
+ str5 = ""; str5arr = ""; str5a = ""; str5aarr = ""; str5p = ""; str5parr = ""
+ strXa = ""; strXaarr = ""; strXp = ""; strXparr = ""
+ dt = t(); dtarr = t(); dta = t(); dtaarr = t(); dtp = t(); dtparr = t()
+ !$omp end target
+
+
+ ! FIXME: strXp disabled because of PR fortran/100965
+
+ !$omp target defaultmap(to : scalar) defaultmap(tofrom : aggregate) &
+ !$omp& defaultmap(firstprivate : allocatable) defaultmap(default : pointer)
+ ii = 42; arr = 42; aii = 42; aarr = 42; pii = 42; parr = 42
+ str1 = ""; str1arr = ""; str1a = ""; str1aarr = ""; str1p = ""; str1parr = ""
+ str5 = ""; str5arr = ""; str5a = ""; str5aarr = ""; str5p = ""; str5parr = ""
+ !strXa = "";
+ strXaarr = "";
+ ! strXp = ""
+ strXparr = ""
+ dt = t(); dtarr = t(); dta = t(); dtaarr = t(); dtp = t(); dtparr = t()
+ !$omp end target
+end
+
+! { dg-final { scan-tree-dump-times "#pragma omp target defaultmap\\(to\\)" 1 "original" } }
+! { dg-final { scan-tree-dump-times "#pragma omp target defaultmap\\(to:scalar\\) defaultmap\\(tofrom:aggregate\\) defaultmap\\(firstprivate:allocatable\\) defaultmap\\(default:pointer\\)" 1 "original" } }
+
+! { dg-final { scan-tree-dump-times "firstprivate\\(aarr\\)" 1 "gimple" } }
+! { dg-final { scan-tree-dump-times "firstprivate\\(aii\\)" 1 "gimple" } }
+! { dg-final { scan-tree-dump-times "firstprivate\\(dta\\)" 1 "gimple" } }
+! { dg-final { scan-tree-dump-times "firstprivate\\(dtaarr\\)" 1 "gimple" } }
+! { dg-final { scan-tree-dump-times "firstprivate\\(str1a\\)" 1 "gimple" } }
+! { dg-final { scan-tree-dump-times "firstprivate\\(str1aarr\\)" 1 "gimple" } }
+! { dg-final { scan-tree-dump-times "firstprivate\\(str5a\\)" 1 "gimple" } }
+! { dg-final { scan-tree-dump-times "firstprivate\\(str5aarr\\)" 1 "gimple" } }
+! { dg-final { scan-tree-dump-times "firstprivate\\(strxaarr\\)" 1 "gimple" } }
+! { dg-final { scan-tree-dump-times "map\\(alloc:aii \\\[pointer assign, bias: 0\\\]\\)" 1 "gimple" } }
+! { dg-final { scan-tree-dump-times "map\\(alloc:\\(character\\(kind=1\\)\\\[0:\\\]\\\[1:1\\\] \\* restrict\\) str1aarr\\.data \\\[pointer assign, bias: 0\\\]\\)" 1 "gimple" } }
+! { dg-final { scan-tree-dump-times "map\\(alloc:\\(character\\(kind=1\\)\\\[0:\\\]\\\[1:5\\\] \\* restrict\\) str5aarr\\.data \\\[pointer assign, bias: 0\\\]\\)" 1 "gimple" } }
+! { dg-final { scan-tree-dump-times "map\\(alloc:\\(character\\(kind=1\\)\\\[0:\\\]\\\[1:\\.strxaarr\\\] \\* restrict\\) strxaarr\\.data \\\[pointer assign, bias: 0\\\]\\)" 1 "gimple" } }
+! { dg-final { scan-tree-dump-times "map\\(alloc:dta \\\[pointer assign, bias: 0\\\]\\)" 1 "gimple" } }
+! { dg-final { scan-tree-dump-times "map\\(alloc:dtp \\\[pointer assign, bias: 0\\\]\\)" 2 "gimple" } }
+! { dg-final { scan-tree-dump-times "map\\(alloc:\\(integer\\(kind=4\\)\\\[0:\\\] \\* restrict\\) aarr\\.data \\\[pointer assign, bias: 0\\\]\\)" 1 "gimple" } }
+! { dg-final { scan-tree-dump-times "map\\(alloc:pii \\\[pointer assign, bias: 0\\\]\\)" 2 "gimple" } }
+! { dg-final { scan-tree-dump-times "map\\(alloc:str1a \\\[pointer assign, bias: 0\\\]\\)" 1 "gimple" } }
+! { dg-final { scan-tree-dump-times "map\\(alloc:str1p \\\[pointer assign, bias: 0\\\]\\)" 2 "gimple" } }
+! { dg-final { scan-tree-dump-times "map\\(alloc:str5a \\\[pointer assign, bias: 0\\\]\\)" 1 "gimple" } }
+! { dg-final { scan-tree-dump-times "map\\(alloc:str5p \\\[pointer assign, bias: 0\\\]\\)" 2 "gimple" } }
+! { dg-final { scan-tree-dump-times "map\\(alloc:\\(struct t\\\[0:\\\] \\* restrict\\) dtaarr\\.data \\\[pointer assign, bias: 0\\\]\\)" 1 "gimple" } }
+! { dg-final { scan-tree-dump-times "map\\(alloc:strxa \\\[pointer assign, bias: 0\\\]\\)" 1 "gimple" } }
+! { dg-final { scan-tree-dump-times "map\\(alloc:strxp \\\[pointer assign, bias: 0\\\]\\)" 1 "gimple" } }
+! { dg-final { scan-tree-dump-times "map\\(always_pointer:\\(character\\(kind=1\\)\\\[0:\\\]\\\[1:1\\\] \\*\\) str1parr\\.data \\\[pointer assign, bias: 0\\\]\\)" 2 "gimple" } }
+! { dg-final { scan-tree-dump-times "map\\(always_pointer:\\(character\\(kind=1\\)\\\[0:\\\]\\\[1:5\\\] \\*\\) str5parr\\.data \\\[pointer assign, bias: 0\\\]\\)" 2 "gimple" } }
+! { dg-final { scan-tree-dump-times "map\\(always_pointer:\\(character\\(kind=1\\)\\\[0:\\\]\\\[1:\\.strxparr\\\] \\*\\) strxparr\\.data \\\[pointer assign, bias: 0\\\]\\)" 2 "gimple" } }
+! { dg-final { scan-tree-dump-times "map\\(always_pointer:\\(integer\\(kind=4\\)\\\[0:\\\] \\*\\) parr\\.data \\\[pointer assign, bias: 0\\\]\\)" 2 "gimple" } }
+! { dg-final { scan-tree-dump-times "map\\(always_pointer:\\(struct t\\\[0:\\\] \\*\\) dtparr\\.data \\\[pointer assign, bias: 0\\\]\\)" 2 "gimple" } }
+! { dg-final { scan-tree-dump-times "map\\(to:aarr \\\[pointer set, len:" 1 "gimple" } }
+! { dg-final { scan-tree-dump-times "map\\(to:\\*aii \\\[len:" 1 "gimple" } }
+! { dg-final { scan-tree-dump-times "map\\(to:arr \\\[len:" 1 "gimple" } }
+! { dg-final { scan-tree-dump-times "map\\(to:\\*\\(c_char \\*\\) aarr\\.data \\\[len:" 1 "gimple" } }
+! { dg-final { scan-tree-dump-times "map\\(to:\\*\\(c_char \\*\\) dtaarr\\.data \\\[len:" 1 "gimple" } }
+! { dg-final { scan-tree-dump-times "map\\(to:\\*\\(c_char \\*\\) dtparr\\.data \\\[len:" 1 "gimple" } }
+! { dg-final { scan-tree-dump-times "map\\(to:\\*\\(c_char \\*\\) parr\\.data \\\[len:" 1 "gimple" } }
+! { dg-final { scan-tree-dump-times "map\\(to:\\*\\(c_char \\*\\) str1aarr\\.data \\\[len:" 1 "gimple" } }
+! { dg-final { scan-tree-dump-times "map\\(to:\\*\\(c_char \\*\\) str1parr\\.data \\\[len:" 1 "gimple" } }
+! { dg-final { scan-tree-dump-times "map\\(to:\\*\\(c_char \\*\\) str5aarr\\.data \\\[len:" 1 "gimple" } }
+! { dg-final { scan-tree-dump-times "map\\(to:\\*\\(c_char \\*\\) str5parr\\.data \\\[len:" 1 "gimple" } }
+! { dg-final { scan-tree-dump-times "map\\(to:\\*\\(c_char \\*\\) strxaarr\\.data \\\[len:" 1 "gimple" } }
+! { dg-final { scan-tree-dump-times "map\\(to:\\*\\(c_char \\*\\) strxparr\\.data \\\[len:" 1 "gimple" } }
+! { dg-final { scan-tree-dump-times "map\\(to:dtaarr \\\[pointer set, len:" 1 "gimple" } }
+! { dg-final { scan-tree-dump-times "map\\(to:\\*dta \\\[len:" 1 "gimple" } }
+! { dg-final { scan-tree-dump-times "map\\(to:dtarr \\\[len:" 1 "gimple" } }
+! { dg-final { scan-tree-dump-times "map\\(to:dt \\\[len:" 1 "gimple" } }
+! { dg-final { scan-tree-dump-times "map\\(to:dtparr \\\[pointer set, len:" 2 "gimple" } }
+! { dg-final { scan-tree-dump-times "map\\(to:\\*dtp \\\[len:" 1 "gimple" } }
+! { dg-final { scan-tree-dump-times "map\\(tofrom:arr \\\[len:" 1 "gimple" } }
+! { dg-final { scan-tree-dump-times "map\\(tofrom:\\*\\(c_char \\*\\) dtparr\\.data \\\[len:" 1 "gimple" } }
+! { dg-final { scan-tree-dump-times "map\\(tofrom:\\*\\(c_char \\*\\) parr\\.data \\\[len:" 1 "gimple" } }
+! { dg-final { scan-tree-dump-times "map\\(tofrom:\\*\\(c_char \\*\\) str1parr\\.data \\\[len:" 1 "gimple" } }
+! { dg-final { scan-tree-dump-times "map\\(tofrom:\\*\\(c_char \\*\\) str5parr\\.data \\\[len:" 1 "gimple" } }
+! { dg-final { scan-tree-dump-times "map\\(tofrom:\\*\\(c_char \\*\\) strxparr\\.data \\\[len:" 1 "gimple" } }
+! { dg-final { scan-tree-dump-times "map\\(tofrom:dtarr \\\[len:" 1 "gimple" } }
+! { dg-final { scan-tree-dump-times "map\\(tofrom:dt \\\[len:" 1 "gimple" } }
+! { dg-final { scan-tree-dump-times "map\\(tofrom:\\*dtp \\\[len:" 1 "gimple" } }
+! { dg-final { scan-tree-dump-times "map\\(tofrom:\\*pii \\\[len:" 1 "gimple" } }
+! { dg-final { scan-tree-dump-times "map\\(tofrom:str1arr \\\[len:" 1 "gimple" } }
+! { dg-final { scan-tree-dump-times "map\\(tofrom:str1 \\\[len:" 1 "gimple" } }
+! { dg-final { scan-tree-dump-times "map\\(tofrom:\\*str1p \\\[len:" 1 "gimple" } }
+! { dg-final { scan-tree-dump-times "map\\(tofrom:str5arr \\\[len:" 1 "gimple" } }
+! { dg-final { scan-tree-dump-times "map\\(tofrom:str5 \\\[len:" 1 "gimple" } }
+! { dg-final { scan-tree-dump-times "map\\(tofrom:\\*str5p \\\[len:" 1 "gimple" } }
+! { dg-final { scan-tree-dump-times "map\\(to:ii \\\[len:" 2 "gimple" } }
+! { dg-final { scan-tree-dump-times "map\\(to:parr \\\[pointer set, len:" 2 "gimple" } }
+! { dg-final { scan-tree-dump-times "map\\(to:\\*pii \\\[len:" 1 "gimple" } }
+! { dg-final { scan-tree-dump-times "map\\(to:str1aarr \\\[pointer set, len:" 1 "gimple" } }
+! { dg-final { scan-tree-dump-times "map\\(to:\\*str1a \\\[len:" 1 "gimple" } }
+! { dg-final { scan-tree-dump-times "map\\(to:str1arr \\\[len:" 1 "gimple" } }
+! { dg-final { scan-tree-dump-times "map\\(to:str1 \\\[len:" 1 "gimple" } }
+! { dg-final { scan-tree-dump-times "map\\(to:str1parr \\\[pointer set, len:" 2 "gimple" } }
+! { dg-final { scan-tree-dump-times "map\\(to:\\*str1p \\\[len:" 1 "gimple" } }
+! { dg-final { scan-tree-dump-times "map\\(to:str5aarr \\\[pointer set, len:" 1 "gimple" } }
+! { dg-final { scan-tree-dump-times "map\\(to:\\*str5a \\\[len:" 1 "gimple" } }
+! { dg-final { scan-tree-dump-times "map\\(to:str5arr \\\[len:" 1 "gimple" } }
+! { dg-final { scan-tree-dump-times "map\\(to:str5 \\\[len:" 1 "gimple" } }
+! { dg-final { scan-tree-dump-times "map\\(to:str5parr \\\[pointer set, len:" 2 "gimple" } }
+! { dg-final { scan-tree-dump-times "map\\(to:\\*str5p \\\[len:" 1 "gimple" } }
+! { dg-final { scan-tree-dump-times "map\\(to:\\.strxaarr \\\[len:" 2 "gimple" } }
+! { dg-final { scan-tree-dump-times "map\\(to:strxaarr \\\[pointer set, len:" 1 "gimple" } }
+! { dg-final { scan-tree-dump-times "map\\(to:\\*strxa \\\[len:" 1 "gimple" } }
+! { dg-final { scan-tree-dump-times "map\\(to:\\.strxa \\\[len:" 1 "gimple" } }
+! { dg-final { scan-tree-dump-times "map\\(to:\\.strxparr \\\[len:" 2 "gimple" } }
+! { dg-final { scan-tree-dump-times "map\\(to:strxparr \\\[pointer set, len:" 2 "gimple" } }
+! { dg-final { scan-tree-dump-times "map\\(to:\\*strxp \\\[len:" 1 "gimple" } }
+! { dg-final { scan-tree-dump-times "map\\(to:\\.strxp \\\[len:" 1 "gimple" } }
+! { dg-final { scan-tree-dump-times "#pragma omp target num_teams\\(1\\) thread_limit\\(0\\) defaultmap\\(to\\)" 1 "gimple" } }
+! { dg-final { scan-tree-dump-times "#pragma omp target num_teams\\(1\\) thread_limit\\(0\\) defaultmap\\(to:scalar\\) defaultmap\\(tofrom:aggregate\\) defaultmap\\(firstprivate:allocatable\\) defaultmap\\(default:pointer\\)" 1 "gimple" } }
diff --git a/gcc/testsuite/gfortran.dg/gomp/defaultmap-6.f90 b/gcc/testsuite/gfortran.dg/gomp/defaultmap-6.f90
new file mode 100644
index 0000000..fabf771
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/gomp/defaultmap-6.f90
@@ -0,0 +1,104 @@
+! { dg-additional-options "-fdump-tree-original" }
+! { dg-additional-options "-fdump-tree-gimple" }
+!
+! PR fortran/92568
+!
+implicit none
+ type t
+ end type t
+
+ integer :: ii
+ integer :: arr(5)
+ integer, allocatable :: aii, aarr(:)
+ integer, pointer :: pii, parr(:)
+
+ character :: str1, str1arr(5), str1a, str1aarr(:), str1p, str1parr(:)
+ character(len=5) :: str5, str5arr(5), str5a, str5aarr(:), str5p, str5parr(:)
+ character(len=:) :: strXa, strXaarr(:), strXp, strXparr(:)
+ allocatable :: str1a, str1aarr, str5a, str5aarr, strXa, strXaarr
+ pointer :: str1p, str1parr, str5p, str5parr, strXp, strXparr
+
+ type(t) :: dt, dtarr(5), dta, dtaarr(:), dtp, dtparr(:)
+ allocatable :: dta, dtaarr
+ pointer :: dtp, dtparr
+
+ allocate(aii, aarr(5), str1a, str1aarr(5), dta, dtparr(5))
+ allocate(pii, parr(5), str1p, str1parr(5), dtp, dtparr(5))
+ allocate(character(len=7) :: strXa, strXaarr(5), strXp, strXparr(5))
+
+
+ !$omp target defaultmap ( default )
+ ii = 42; arr = 42; aii = 42; aarr = 42; pii = 42; parr = 42
+ str1 = ""; str1arr = ""; str1a = ""; str1aarr = ""; str1p = ""; str1parr = ""
+ str5 = ""; str5arr = ""; str5a = ""; str5aarr = ""; str5p = ""; str5parr = ""
+ strXa = ""; strXaarr = ""; strXp = ""; strXparr = ""
+ dt = t(); dtarr = t(); dta = t(); dtaarr = t(); dtp = t(); dtparr = t()
+ !$omp end target
+
+end
+
+! { dg-final { scan-tree-dump-times "#pragma omp target defaultmap\\(default\\)" 1 "original" } }
+
+! { dg-final { scan-tree-dump-times "firstprivate\\(ii\\)" 1 "gimple" } }
+! { dg-final { scan-tree-dump-times "map\\(alloc:aii \\\[pointer assign, bias: 0\\\]\\)" 1 "gimple" } }
+! { dg-final { scan-tree-dump-times "map\\(alloc:\\(character\\(kind=1\\)\\\[0:\\\]\\\[1:1\\\] \\* restrict\\) str1aarr\\.data \\\[pointer assign, bias: 0\\\]\\)" 1 "gimple" } }
+! { dg-final { scan-tree-dump-times "map\\(alloc:\\(character\\(kind=1\\)\\\[0:\\\]\\\[1:5\\\] \\* restrict\\) str5aarr\\.data \\\[pointer assign, bias: 0\\\]\\)" 1 "gimple" } }
+! { dg-final { scan-tree-dump-times "map\\(alloc:\\(character\\(kind=1\\)\\\[0:\\\]\\\[1:\\.strxaarr\\\] \\* restrict\\) strxaarr\\.data \\\[pointer assign, bias: 0\\\]\\)" 1 "gimple" } }
+! { dg-final { scan-tree-dump-times "map\\(alloc:dta \\\[pointer assign, bias: 0\\\]\\)" 1 "gimple" } }
+! { dg-final { scan-tree-dump-times "map\\(alloc:dtp \\\[pointer assign, bias: 0\\\]\\)" 1 "gimple" } }
+! { dg-final { scan-tree-dump-times "map\\(alloc:\\(integer\\(kind=4\\)\\\[0:\\\] \\* restrict\\) aarr\\.data \\\[pointer assign, bias: 0\\\]\\)" 1 "gimple" } }
+! { dg-final { scan-tree-dump-times "map\\(alloc:pii \\\[pointer assign, bias: 0\\\]\\)" 1 "gimple" } }
+! { dg-final { scan-tree-dump-times "map\\(alloc:str1a \\\[pointer assign, bias: 0\\\]\\)" 1 "gimple" } }
+! { dg-final { scan-tree-dump-times "map\\(alloc:str1p \\\[pointer assign, bias: 0\\\]\\)" 1 "gimple" } }
+! { dg-final { scan-tree-dump-times "map\\(alloc:str5a \\\[pointer assign, bias: 0\\\]\\)" 1 "gimple" } }
+! { dg-final { scan-tree-dump-times "map\\(alloc:str5p \\\[pointer assign, bias: 0\\\]\\)" 1 "gimple" } }
+! { dg-final { scan-tree-dump-times "map\\(alloc:\\(struct t\\\[0:\\\] \\* restrict\\) dtaarr\\.data \\\[pointer assign, bias: 0\\\]\\)" 1 "gimple" } }
+! { dg-final { scan-tree-dump-times "map\\(alloc:strxa \\\[pointer assign, bias: 0\\\]\\)" 1 "gimple" } }
+! { dg-final { scan-tree-dump-times "map\\(alloc:strxp \\\[pointer assign, bias: 0\\\]\\)" 1 "gimple" } }
+! { dg-final { scan-tree-dump-times "map\\(always_pointer:\\(character\\(kind=1\\)\\\[0:\\\]\\\[1:1\\\] \\*\\) str1parr\\.data \\\[pointer assign, bias: 0\\\]\\)" 1 "gimple" } }
+! { dg-final { scan-tree-dump-times "map\\(always_pointer:\\(character\\(kind=1\\)\\\[0:\\\]\\\[1:5\\\] \\*\\) str5parr\\.data \\\[pointer assign, bias: 0\\\]\\)" 1 "gimple" } }
+! { dg-final { scan-tree-dump-times "map\\(always_pointer:\\(character\\(kind=1\\)\\\[0:\\\]\\\[1:\\.strxparr\\\] \\*\\) strxparr\\.data \\\[pointer assign, bias: 0\\\]\\)" 1 "gimple" } }
+! { dg-final { scan-tree-dump-times "map\\(always_pointer:\\(integer\\(kind=4\\)\\\[0:\\\] \\*\\) parr\\.data \\\[pointer assign, bias: 0\\\]\\)" 1 "gimple" } }
+! { dg-final { scan-tree-dump-times "map\\(always_pointer:\\(struct t\\\[0:\\\] \\*\\) dtparr\\.data \\\[pointer assign, bias: 0\\\]\\)" 1 "gimple" } }
+! { dg-final { scan-tree-dump-times "map\\(to:aarr \\\[pointer set, len:" 1 "gimple" } }
+! { dg-final { scan-tree-dump-times "map\\(to:dtaarr \\\[pointer set, len:" 1 "gimple" } }
+! { dg-final { scan-tree-dump-times "map\\(to:dtparr \\\[pointer set, len:" 1 "gimple" } }
+! { dg-final { scan-tree-dump-times "map\\(tofrom:\\*aii \\\[len:" 1 "gimple" } }
+! { dg-final { scan-tree-dump-times "map\\(tofrom:arr \\\[len:" 1 "gimple" } }
+! { dg-final { scan-tree-dump-times "map\\(tofrom:\\*\\(c_char \\*\\) aarr\\.data \\\[len:" 1 "gimple" } }
+! { dg-final { scan-tree-dump-times "map\\(tofrom:\\*\\(c_char \\*\\) dtaarr\\.data \\\[len:" 1 "gimple" } }
+! { dg-final { scan-tree-dump-times "map\\(tofrom:\\*\\(c_char \\*\\) dtparr\\.data \\\[len:" 1 "gimple" } }
+! { dg-final { scan-tree-dump-times "map\\(tofrom:\\*\\(c_char \\*\\) parr\\.data \\\[len:" 1 "gimple" } }
+! { dg-final { scan-tree-dump-times "map\\(tofrom:\\*\\(c_char \\*\\) str1aarr\\.data \\\[len:" 1 "gimple" } }
+! { dg-final { scan-tree-dump-times "map\\(tofrom:\\*\\(c_char \\*\\) str1parr\\.data \\\[len:" 1 "gimple" } }
+! { dg-final { scan-tree-dump-times "map\\(tofrom:\\*\\(c_char \\*\\) str5aarr\\.data \\\[len:" 1 "gimple" } }
+! { dg-final { scan-tree-dump-times "map\\(tofrom:\\*\\(c_char \\*\\) str5parr\\.data \\\[len:" 1 "gimple" } }
+! { dg-final { scan-tree-dump-times "map\\(tofrom:\\*\\(c_char \\*\\) strxaarr\\.data \\\[len:" 1 "gimple" } }
+! { dg-final { scan-tree-dump-times "map\\(tofrom:\\*\\(c_char \\*\\) strxparr\\.data \\\[len:" 1 "gimple" } }
+! { dg-final { scan-tree-dump-times "map\\(tofrom:\\*dta \\\[len:" 1 "gimple" } }
+! { dg-final { scan-tree-dump-times "map\\(tofrom:dtarr \\\[len:" 1 "gimple" } }
+! { dg-final { scan-tree-dump-times "map\\(tofrom:dt \\\[len:" 1 "gimple" } }
+! { dg-final { scan-tree-dump-times "map\\(tofrom:\\*dtp \\\[len:" 1 "gimple" } }
+! { dg-final { scan-tree-dump-times "map\\(tofrom:\\*pii \\\[len:" 1 "gimple" } }
+! { dg-final { scan-tree-dump-times "map\\(tofrom:\\*str1a \\\[len:" 1 "gimple" } }
+! { dg-final { scan-tree-dump-times "map\\(tofrom:str1arr \\\[len:" 1 "gimple" } }
+! { dg-final { scan-tree-dump-times "map\\(tofrom:str1 \\\[len:" 1 "gimple" } }
+! { dg-final { scan-tree-dump-times "map\\(tofrom:\\*str1p \\\[len:" 1 "gimple" } }
+! { dg-final { scan-tree-dump-times "map\\(tofrom:\\*str5a \\\[len:" 1 "gimple" } }
+! { dg-final { scan-tree-dump-times "map\\(tofrom:str5arr \\\[len:" 1 "gimple" } }
+! { dg-final { scan-tree-dump-times "map\\(tofrom:str5 \\\[len:" 1 "gimple" } }
+! { dg-final { scan-tree-dump-times "map\\(tofrom:\\*str5p \\\[len:" 1 "gimple" } }
+! { dg-final { scan-tree-dump-times "map\\(tofrom:\\*strxa \\\[len:" 1 "gimple" } }
+! { dg-final { scan-tree-dump-times "map\\(tofrom:\\*strxp \\\[len:" 1 "gimple" } }
+! { dg-final { scan-tree-dump-times "map\\(to:parr \\\[pointer set, len:" 1 "gimple" } }
+! { dg-final { scan-tree-dump-times "map\\(to:str1aarr \\\[pointer set, len:" 1 "gimple" } }
+! { dg-final { scan-tree-dump-times "map\\(to:str1parr \\\[pointer set, len:" 1 "gimple" } }
+! { dg-final { scan-tree-dump-times "map\\(to:str5aarr \\\[pointer set, len:" 1 "gimple" } }
+! { dg-final { scan-tree-dump-times "map\\(to:str5parr \\\[pointer set, len:" 1 "gimple" } }
+! { dg-final { scan-tree-dump-times "map\\(to:\\.strxaarr \\\[len:" 1 "gimple" } }
+! { dg-final { scan-tree-dump-times "map\\(to:strxaarr \\\[pointer set, len:" 1 "gimple" } }
+! { dg-final { scan-tree-dump-times "map\\(to:\\.strxa \\\[len:" 1 "gimple" } }
+! { dg-final { scan-tree-dump-times "map\\(to:\\.strxparr \\\[len:" 1 "gimple" } }
+! { dg-final { scan-tree-dump-times "map\\(to:strxparr \\\[pointer set, len:" 1 "gimple" } }
+! { dg-final { scan-tree-dump-times "map\\(to:\\.strxp \\\[len:" 1 "gimple" } }
+! { dg-final { scan-tree-dump-times "#pragma omp target num_teams\\(1\\) thread_limit\\(0\\) defaultmap\\(default\\)" 1 "gimple" } }
diff --git a/gcc/testsuite/gfortran.dg/gomp/defaultmap-7.f90 b/gcc/testsuite/gfortran.dg/gomp/defaultmap-7.f90
new file mode 100644
index 0000000..e1b4fc2
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/gomp/defaultmap-7.f90
@@ -0,0 +1,24 @@
+! PR fortran/92568
+!
+! { dg-additional-options "-fdump-tree-original" }
+! { dg-additional-options "-fdump-tree-gimple" }
+implicit none
+ integer :: ii, aa, pp
+ allocatable :: aa
+ pointer :: pp
+ character :: str
+ character(len=2) :: str2
+
+!$omp target
+ ii = 1
+ aa = 5
+ pp = 7
+ str = '1'
+ str2 = '12'
+!$omp end target
+end
+! { dg-final { scan-tree-dump-times "firstprivate\\(ii\\)" 1 "gimple" } }
+! { dg-final { scan-tree-dump-times "map\\(tofrom:\\*aa" 1 "gimple" } }
+! { dg-final { scan-tree-dump-times "map\\(tofrom:\\*pp" 1 "gimple" } }
+! { dg-final { scan-tree-dump-times "map\\(tofrom:str2 \\\[len:" 1 "gimple" } }
+! { dg-final { scan-tree-dump-times "map\\(tofrom:str \\\[len:" 1 "gimple" } }
diff --git a/gcc/testsuite/gfortran.dg/gomp/pr99928-1.f90 b/gcc/testsuite/gfortran.dg/gomp/pr99928-1.f90
index 9a59065..b61b2fc3 100644
--- a/gcc/testsuite/gfortran.dg/gomp/pr99928-1.f90
+++ b/gcc/testsuite/gfortran.dg/gomp/pr99928-1.f90
@@ -108,13 +108,13 @@ subroutine bar ()
!$omp end parallel sections
! { dg-final { scan-tree-dump "omp target\[^\n\r]*firstprivate\\(f13\\)" "gimple" } }
! { dg-final { scan-tree-dump "omp parallel\[^\n\r]*firstprivate\\(f13\\)" "gimple" } }
- !$omp target parallel firstprivate (f13) default(none) ! defaultmap(none)
+ !$omp target parallel firstprivate (f13) default(none) defaultmap(none)
f13 = f13 + 1
!$omp end target parallel
! { dg-final { scan-tree-dump "omp target\[^\n\r]*firstprivate\\(f14\\)" "gimple" } }
! { dg-final { scan-tree-dump "omp parallel\[^\n\r]*firstprivate\\(f14\\)" "gimple" } } ! FIXME: This should be on for instead.
! { dg-final { scan-tree-dump-not "omp for\[^\n\r]*firstprivate\\(f14\\)" "gimple" } } ! FIXME.
- !$omp target parallel do firstprivate (f14) default(none) ! defaultmap(none)
+ !$omp target parallel do firstprivate (f14) default(none) defaultmap(none)
do i = 1, 64
f14 = f14 + 1
end do
@@ -122,7 +122,7 @@ subroutine bar ()
! { dg-final { scan-tree-dump "omp parallel\[^\n\r]*firstprivate\\(f15\\)" "gimple" } } ! FIXME: This should be on for instead.
! { dg-final { scan-tree-dump-not "omp for\[^\n\r]*firstprivate\\(f15\\)" "gimple" } } ! FIXME.
! { dg-final { scan-tree-dump-not "omp simd\[^\n\r]*firstprivate\\(f15\\)" "gimple" } }
- !$omp target parallel do simd firstprivate (f15) default(none) ! defaultmap(none)
+ !$omp target parallel do simd firstprivate (f15) default(none) defaultmap(none)
do i = 1, 64
f15 = f15 + 1
end do
@@ -130,19 +130,19 @@ subroutine bar ()
! { dg-final { scan-tree-dump "omp parallel\[^\n\r]*firstprivate\\(f16\\)" "gimple" } }
! { dg-final { scan-tree-dump-not "omp for\[^\n\r]*firstprivate\\(f16\\)" "gimple" } }
! { dg-final { scan-tree-dump-not "omp simd\[^\n\r]*firstprivate\\(f16\\)" "gimple" } }
- !$omp target parallel loop firstprivate (f16) default(none) ! defaultmap(none)
+ !$omp target parallel loop firstprivate (f16) default(none) defaultmap(none)
do i = 1, 64
f16 = f16 + 1
end do
! { dg-final { scan-tree-dump "omp target\[^\n\r]*firstprivate\\(f17\\)" "gimple" } }
! { dg-final { scan-tree-dump "omp teams\[^\n\r]*firstprivate\\(f17\\)" "gimple" } }
- !$omp target teams firstprivate (f17) default(none) ! defaultmap(none)
+ !$omp target teams firstprivate (f17) default(none) defaultmap(none)
f17 = f17 + 1
!$omp end target teams
! { dg-final { scan-tree-dump "omp target\[^\n\r]*firstprivate\\(f18\\)" "gimple" } }
! { dg-final { scan-tree-dump "omp teams\[^\n\r]*firstprivate\\(f18\\)" "gimple" } } ! FIXME: This should be on distribute instead.
! { dg-final { scan-tree-dump-not "omp distribute\[^\n\r]*firstprivate\\(f18\\)" "gimple" } } ! FIXME.
- !$omp target teams distribute firstprivate (f18) default(none) ! defaultmap(none)
+ !$omp target teams distribute firstprivate (f18) default(none) defaultmap(none)
do i = 1, 64
f18 = f18 + 1
end do
@@ -151,7 +151,7 @@ subroutine bar ()
! { dg-final { scan-tree-dump-not "omp distribute\[^\n\r]*firstprivate\\(f19\\)" "gimple" } } ! FIXME.
! { dg-final { scan-tree-dump "omp parallel\[^\n\r]*firstprivate\\(f19\\)" "gimple" } } ! FIXME: This should be on for instead.
! { dg-final { scan-tree-dump-not "omp for\[^\n\r]*firstprivate\\(f19\\)" "gimple" } } ! FIXME.
- !$omp target teams distribute parallel do firstprivate (f19) default(none) ! defaultmap(none)
+ !$omp target teams distribute parallel do firstprivate (f19) default(none) defaultmap(none)
do i = 1, 64
f19 = f19 + 1
end do
@@ -161,7 +161,7 @@ subroutine bar ()
! { dg-final { scan-tree-dump "omp parallel\[^\n\r]*firstprivate\\(f20\\)" "gimple" } } ! FIXME: This should be on for instead.
! { dg-final { scan-tree-dump-not "omp for\[^\n\r]*firstprivate\\(f20\\)" "gimple" } } ! FIXME.
! { dg-final { scan-tree-dump-not "omp simd\[^\n\r]*firstprivate\\(f20\\)" "gimple" } }
- !$omp target teams distribute parallel do simd firstprivate (f20) default(none) ! defaultmap(none)
+ !$omp target teams distribute parallel do simd firstprivate (f20) default(none) defaultmap(none)
do i = 1, 64
f20 = f20 + 1
end do
@@ -169,7 +169,7 @@ subroutine bar ()
! { dg-final { scan-tree-dump "omp teams\[^\n\r]*firstprivate\\(f21\\)" "gimple" } } ! FIXME: This should be on for instead.
! { dg-final { scan-tree-dump-not "omp distribute\[^\n\r]*firstprivate\\(f21\\)" "gimple" } } ! FIXME.
! { dg-final { scan-tree-dump-not "omp simd\[^\n\r]*firstprivate\\(f21\\)" "gimple" } }
- !$omp target teams distribute simd firstprivate (f21) default(none) ! defaultmap(none)
+ !$omp target teams distribute simd firstprivate (f21) default(none) defaultmap(none)
do i = 1, 64
f21 = f21 + 1
end do
@@ -179,13 +179,13 @@ subroutine bar ()
! { dg-final { scan-tree-dump "omp parallel\[^\n\r]*shared\\(f22\\)" "gimple" } } ! NOTE: This is an implementation detail.
! { dg-final { scan-tree-dump-not "omp for\[^\n\r]*firstprivate\\(f22\\)" "gimple" } }
! { dg-final { scan-tree-dump-not "omp simd\[^\n\r]*firstprivate\\(f22\\)" "gimple" } }
- !$omp target teams loop firstprivate (f22) default(none) ! defaultmap(none)
+ !$omp target teams loop firstprivate (f22) default(none) defaultmap(none)
do i = 1, 64
f22 = f22 + 1
end do
! { dg-final { scan-tree-dump "omp target\[^\n\r]*firstprivate\\(f23\\)" "gimple" } }
! { dg-final { scan-tree-dump-not "omp simd\[^\n\r]*firstprivate\\(f23\\)" "gimple" } }
- !$omp target simd firstprivate (f23) ! defaultmap(none)
+ !$omp target simd firstprivate (f23) defaultmap(none)
do i = 1, 64
f23 = f23 + 1
end do
diff --git a/gcc/testsuite/gfortran.dg/gomp/pr99928-2.f90 b/gcc/testsuite/gfortran.dg/gomp/pr99928-2.f90
index 4a5b549..7a98248 100644
--- a/gcc/testsuite/gfortran.dg/gomp/pr99928-2.f90
+++ b/gcc/testsuite/gfortran.dg/gomp/pr99928-2.f90
@@ -108,7 +108,7 @@ subroutine bar ()
! { dg-final { scan-tree-dump-not "omp target\[^\n\r]*firstprivate\\(l11\\)" "gimple" } }
! { dg-final { scan-tree-dump "omp parallel\[^\n\r]*lastprivate\\(l11\\)" "gimple" } } ! FIXME: This should be on for instead.
! { dg-final { scan-tree-dump-not "omp for\[^\n\r]*lastprivate\\(l11\\)" "gimple" } } ! FIXME.
- !$omp target parallel do lastprivate (l11) default(none) ! defaultmap(none)
+ !$omp target parallel do lastprivate (l11) default(none) defaultmap(none)
do i = 1, 64
l11 = i
end do
@@ -117,7 +117,7 @@ subroutine bar ()
! { dg-final { scan-tree-dump "omp parallel\[^\n\r]*lastprivate\\(l12\\)" "gimple" } } ! FIXME: This should be on for instead.
! { dg-final { scan-tree-dump-not "omp for\[^\n\r]*lastprivate\\(l12\\)" "gimple" } } ! FIXME.
! { dg-final { scan-tree-dump "omp simd\[^\n\r]*lastprivate\\(l12\\)" "gimple" } }
- !$omp target parallel do simd lastprivate (l12) default(none) ! defaultmap(none)
+ !$omp target parallel do simd lastprivate (l12) default(none) defaultmap(none)
do i = 1, 64
l12 = i
end do
@@ -126,14 +126,14 @@ subroutine bar ()
! { dg-final { scan-tree-dump "omp parallel\[^\n\r]*shared\\(j01\\)" "gimple" } }
! { dg-final { scan-tree-dump "omp for\[^\n\r]*lastprivate\\(j01\\)" "gimple" } } ! NOTE: This is implementation detail.
! { dg-final { scan-tree-dump "omp simd\[^\n\r]*lastprivate\\(j01\\)" "gimple" } } ! NOTE: This is implementation detail.
- !$omp target parallel loop lastprivate (j01) default(none) ! defaultmap(none)
+ !$omp target parallel loop lastprivate (j01) default(none) defaultmap(none)
do j01 = 0, 64
end do
! { dg-final { scan-tree-dump "omp target\[^\n\r]*map\\(tofrom:l13" "gimple" } }
! { dg-final { scan-tree-dump-not "omp target\[^\n\r]*firstprivate\\(l13\\)" "gimple" } }
! { dg-final { scan-tree-dump "omp teams\[^\n\r]*shared\\(l13\\)" "gimple" } }
! { dg-final { scan-tree-dump "omp distribute\[^\n\r]*lastprivate\\(l13\\)" "gimple" } }
- !$omp target teams distribute lastprivate (l13) default(none) ! defaultmap(none)
+ !$omp target teams distribute lastprivate (l13) default(none) defaultmap(none)
do i = 1, 64
l13 = i
end do
@@ -143,7 +143,7 @@ subroutine bar ()
! { dg-final { scan-tree-dump "omp distribute\[^\n\r]*lastprivate\\(l14\\)" "gimple" } }
! { dg-final { scan-tree-dump "omp parallel\[^\n\r]*lastprivate\\(l14\\)" "gimple" } } ! FIXME: This should be on for instead.
! { dg-final { scan-tree-dump-not "omp for\[^\n\r]*lastprivate\\(l14\\)" "gimple" } } ! FIXME.
- !$omp target teams distribute parallel do lastprivate (l14) default(none) ! defaultmap(none)
+ !$omp target teams distribute parallel do lastprivate (l14) default(none) defaultmap(none)
do i = 1, 64
l14 = i
end do
@@ -154,7 +154,7 @@ subroutine bar ()
! { dg-final { scan-tree-dump "omp parallel\[^\n\r]*lastprivate\\(l15\\)" "gimple" } } ! FIXME: This should be on for instead.
! { dg-final { scan-tree-dump-not "omp for\[^\n\r]*lastprivate\\(l15\\)" "gimple" } } ! FIXME.
! { dg-final { scan-tree-dump "omp simd\[^\n\r]*lastprivate\\(l15\\)" "gimple" } }
- !$omp target teams distribute parallel do simd lastprivate (l15) default(none) ! defaultmap(none)
+ !$omp target teams distribute parallel do simd lastprivate (l15) default(none) defaultmap(none)
do i = 1, 64
l15 = i
end do
@@ -163,7 +163,7 @@ subroutine bar ()
! { dg-final { scan-tree-dump "omp teams\[^\n\r]*shared\\(l16\\)" "gimple" } }
! { dg-final { scan-tree-dump "omp distribute\[^\n\r]*lastprivate\\(l16\\)" "gimple" } }
! { dg-final { scan-tree-dump "omp simd\[^\n\r]*lastprivate\\(l16\\)" "gimple" } }
- !$omp target teams distribute simd lastprivate (l16) default(none) ! defaultmap(none)
+ !$omp target teams distribute simd lastprivate (l16) default(none) defaultmap(none)
do i = 1, 64
l16 = i
end do
@@ -174,13 +174,13 @@ subroutine bar ()
! { dg-final { scan-tree-dump "omp parallel\[^\n\r]*shared\\(j02\\)" "gimple" } } ! NOTE: This is implementation detail.
! { dg-final { scan-tree-dump "omp for\[^\n\r]*lastprivate\\(j02\\)" "gimple" } } ! NOTE: This is implementation detail.
! { dg-final { scan-tree-dump "omp simd\[^\n\r]*lastprivate\\(j02\\)" "gimple" } } ! NOTE: This is implementation detail.
- !$omp target teams loop lastprivate (j02) default(none) ! defaultmap(none)
+ !$omp target teams loop lastprivate (j02) default(none) defaultmap(none)
do j02 = 0, 64
end do
! { dg-final { scan-tree-dump "omp target\[^\n\r]*map\\(tofrom:l17" "gimple" } }
! { dg-final { scan-tree-dump-not "omp target\[^\n\r]*firstprivate\\(l17\\)" "gimple" } }
! { dg-final { scan-tree-dump "omp simd\[^\n\r]*lastprivate\\(l17\\)" "gimple" } }
- !$omp target simd lastprivate (l17) ! defaultmap(none)
+ !$omp target simd lastprivate (l17) defaultmap(none)
do i = 1, 64
l17 = i
end do
diff --git a/gcc/testsuite/gfortran.dg/gomp/pr99928-3.f90 b/gcc/testsuite/gfortran.dg/gomp/pr99928-3.f90
index 82bb893..3c02c88 100644
--- a/gcc/testsuite/gfortran.dg/gomp/pr99928-3.f90
+++ b/gcc/testsuite/gfortran.dg/gomp/pr99928-3.f90
@@ -101,7 +101,7 @@ subroutine bar ()
! { dg-final { scan-tree-dump "omp parallel\[^\n\r]*lastprivate\\(l08\\)" "gimple" } } ! FIXME: This should be on for instead.
! { dg-final { scan-tree-dump-not "omp for\[^\n\r]*firstprivate\\(l08\\)" "gimple" } } ! FIXME.
! { dg-final { scan-tree-dump-not "omp for\[^\n\r]*lastprivate\\(l08\\)" "gimple" } } ! FIXME.
- !$omp target parallel do firstprivate (l08) lastprivate (l08) default(none) ! defaultmap(none)
+ !$omp target parallel do firstprivate (l08) lastprivate (l08) default(none) defaultmap(none)
do i = 1, 64
l08 = i
end do
@@ -114,7 +114,7 @@ subroutine bar ()
! { dg-final { scan-tree-dump-not "omp for\[^\n\r]*lastprivate\\(l09\\)" "gimple" } } ! FIXME.
! { dg-final { scan-tree-dump-not "omp simd\[^\n\r]*firstprivate\\(l09\\)" "gimple" } }
! { dg-final { scan-tree-dump "omp simd\[^\n\r]*lastprivate\\(l09\\)" "gimple" } }
- !$omp target parallel do simd firstprivate (l09) lastprivate (l09) default(none) ! defaultmap(none)
+ !$omp target parallel do simd firstprivate (l09) lastprivate (l09) default(none) defaultmap(none)
do i = 1, 64
l09 = i
end do
@@ -122,7 +122,7 @@ subroutine bar ()
! { dg-final { scan-tree-dump-not "omp target\[^\n\r]*firstprivate\\(l10\\)" "gimple" } }
! { dg-final { scan-tree-dump-not "omp simd\[^\n\r]*firstprivate\\(l10\\)" "gimple" } }
! { dg-final { scan-tree-dump "omp simd\[^\n\r]*lastprivate\\(l10\\)" "gimple" } }
- !$omp target simd firstprivate (l10) lastprivate (l10) ! defaultmap(none)
+ !$omp target simd firstprivate (l10) lastprivate (l10) defaultmap(none)
do i = 1, 64
l10 = i
end do
diff --git a/gcc/testsuite/gfortran.dg/gomp/pr99928-4.f90 b/gcc/testsuite/gfortran.dg/gomp/pr99928-4.f90
index ead8f03..1563c4f 100644
--- a/gcc/testsuite/gfortran.dg/gomp/pr99928-4.f90
+++ b/gcc/testsuite/gfortran.dg/gomp/pr99928-4.f90
@@ -57,7 +57,7 @@ subroutine bar ()
! { dg-final { scan-tree-dump-not "omp target\[^\n\r]*firstprivate\\(l05\\)" "gimple" } }
! { dg-final { scan-tree-dump "omp parallel\[^\n\r]*shared\\(l05\\)" "gimple" } }
! { dg-final { scan-tree-dump "omp for\[^\n\r]*linear\\(l05:1\\)" "gimple" } }
- !$omp target parallel do linear (l05) default(none) ! defaultmap(none)
+ !$omp target parallel do linear (l05) default(none) defaultmap(none)
do i = 1, 64
l05 = l05 + 1
end do
@@ -68,14 +68,14 @@ subroutine bar ()
! { dg-final { scan-tree-dump-not "omp for\[^\n\r]*firstprivate\\(l06\\)" "gimple" } } ! FIXME.
! { dg-final { scan-tree-dump-not "omp for\[^\n\r]*lastprivate\\(l06\\)" "gimple" } } ! FIXME.
! { dg-final { scan-tree-dump "omp simd\[^\n\r]*linear\\(l06:1\\)" "gimple" } }
- !$omp target parallel do simd linear (l06) default(none) ! defaultmap(none)
+ !$omp target parallel do simd linear (l06) default(none) defaultmap(none)
do i = 1, 64
l06 = l06 + 1
end do
! { dg-final { scan-tree-dump "omp target\[^\n\r]*map\\(tofrom:l07" "gimple" } }
! { dg-final { scan-tree-dump-not "omp target\[^\n\r]*firstprivate\\(l07\\)" "gimple" } }
! { dg-final { scan-tree-dump "omp simd\[^\n\r]*linear\\(l07:1\\)" "gimple" } }
- !$omp target simd linear (l07) ! defaultmap(none)
+ !$omp target simd linear (l07) defaultmap(none)
do i = 1, 64
l07 = l07 + 1
end do
diff --git a/gcc/testsuite/gfortran.dg/gomp/pr99928-5.f90 b/gcc/testsuite/gfortran.dg/gomp/pr99928-5.f90
index 49cbf1e..259f6cc 100644
--- a/gcc/testsuite/gfortran.dg/gomp/pr99928-5.f90
+++ b/gcc/testsuite/gfortran.dg/gomp/pr99928-5.f90
@@ -57,13 +57,13 @@ subroutine bar ()
! { dg-final { scan-tree-dump "omp parallel\[^\n\r]*lastprivate\\(j06\\)" "gimple" } } ! FIXME: This should be on for instead.
! { dg-final { scan-tree-dump-not "omp for\[^\n\r]*lastprivate\\(j06\\)" "gimple" } } ! FIXME.
! { dg-final { scan-tree-dump "omp simd\[^\n\r]*linear\\(j06:1\\)" "gimple" } }
- !$omp target parallel do simd linear (j06) default(none) ! defaultmap(none)
+ !$omp target parallel do simd linear (j06) default(none) defaultmap(none)
do j06 = 1, 64
end do
! { dg-final { scan-tree-dump "omp target\[^\n\r]*map\\(tofrom:j07" "gimple" } }
! { dg-final { scan-tree-dump-not "omp target\[^\n\r]*firstprivate\\(j07\\)" "gimple" } }
! { dg-final { scan-tree-dump "omp simd\[^\n\r]*linear\\(j07:1\\)" "gimple" } }
- !$omp target simd linear (j07) ! defaultmap(none)
+ !$omp target simd linear (j07) defaultmap(none)
do j07 = 1, 64
end do
! { dg-final { scan-tree-dump "omp target\[^\n\r]*map\\(tofrom:j08" "gimple" } }
@@ -73,7 +73,7 @@ subroutine bar ()
! { dg-final { scan-tree-dump "omp parallel\[^\n\r]*lastprivate\\(j08\\)" "gimple" } } ! FIXME: This should be on for instead.
! { dg-final { scan-tree-dump-not "omp for\[^\n\r]*lastprivate\\(j08\\)" "gimple" } } ! FIXME.
! { dg-final { scan-tree-dump "omp simd\[^\n\r]*linear\\(j08:1\\)" "gimple" } }
- !$omp target teams distribute parallel do simd linear (j08) default(none) ! defaultmap(none)
+ !$omp target teams distribute parallel do simd linear (j08) default(none) defaultmap(none)
do j08 = 1, 64
end do
! { dg-final { scan-tree-dump "omp target\[^\n\r]*map\\(tofrom:j09" "gimple" } }
@@ -81,7 +81,7 @@ subroutine bar ()
! { dg-final { scan-tree-dump "omp teams\[^\n\r]*shared\\(j09\\)" "gimple" } }
! { dg-final { scan-tree-dump "omp distribute\[^\n\r]*lastprivate\\(j09\\)" "gimple" } }
! { dg-final { scan-tree-dump "omp simd\[^\n\r]*linear\\(j09:1\\)" "gimple" } }
- !$omp target teams distribute simd linear (j09) default(none) ! defaultmap(none)
+ !$omp target teams distribute simd linear (j09) default(none) defaultmap(none)
do j09 = 1, 64
end do
! { dg-final { scan-tree-dump "omp taskloop\[^\n\r]*shared\\(j10\\)" "gimple" } } ! NOTE: This is implementation detail.
diff --git a/gcc/testsuite/gfortran.dg/gomp/pr99928-6.f90 b/gcc/testsuite/gfortran.dg/gomp/pr99928-6.f90
index 0e60199..a9ad226 100644
--- a/gcc/testsuite/gfortran.dg/gomp/pr99928-6.f90
+++ b/gcc/testsuite/gfortran.dg/gomp/pr99928-6.f90
@@ -57,13 +57,13 @@ subroutine bar ()
! { dg-final { scan-tree-dump "omp parallel\[^\n\r]*lastprivate\\(j06\\)" "gimple" } } ! FIXME: This should be on for instead.
! { dg-final { scan-tree-dump-not "omp for\[^\n\r]*lastprivate\\(j06\\)" "gimple" } } ! FIXME.
! { dg-final { scan-tree-dump "omp simd\[^\n\r]*linear\\(j06:1\\)" "gimple" } }
- !$omp target parallel do simd default(none) ! defaultmap(none)
+ !$omp target parallel do simd default(none) defaultmap(none)
do j06 = 1, 64
end do
! { dg-final { scan-tree-dump "omp target\[^\n\r]*map\\(tofrom:j07" "gimple" } }
! { dg-final { scan-tree-dump-not "omp target\[^\n\r]*firstprivate\\(j07\\)" "gimple" } }
! { dg-final { scan-tree-dump "omp simd\[^\n\r]*linear\\(j07:1\\)" "gimple" } }
- !$omp target simd ! defaultmap(none)
+ !$omp target simd defaultmap(none)
do j07 = 1, 64
end do
! { dg-final { scan-tree-dump "omp target\[^\n\r]*map\\(tofrom:j08" "gimple" } }
@@ -73,7 +73,7 @@ subroutine bar ()
! { dg-final { scan-tree-dump "omp parallel\[^\n\r]*lastprivate\\(j08\\)" "gimple" } } ! FIXME: This should be on for instead.
! { dg-final { scan-tree-dump-not "omp for\[^\n\r]*lastprivate\\(j08\\)" "gimple" } } ! FIXME.
! { dg-final { scan-tree-dump "omp simd\[^\n\r]*linear\\(j08:1\\)" "gimple" } }
- !$omp target teams distribute parallel do simd default(none) ! defaultmap(none)
+ !$omp target teams distribute parallel do simd default(none) defaultmap(none)
do j08 = 1, 64
end do
! { dg-final { scan-tree-dump "omp target\[^\n\r]*map\\(tofrom:j09" "gimple" } }
@@ -81,7 +81,7 @@ subroutine bar ()
! { dg-final { scan-tree-dump "omp teams\[^\n\r]*shared\\(j09\\)" "gimple" } }
! { dg-final { scan-tree-dump "omp distribute\[^\n\r]*lastprivate\\(j09\\)" "gimple" } }
! { dg-final { scan-tree-dump "omp simd\[^\n\r]*linear\\(j09:1\\)" "gimple" } }
- !$omp target teams distribute simd default(none) ! defaultmap(none)
+ !$omp target teams distribute simd default(none) defaultmap(none)
do j09 = 1, 64
end do
! { dg-final { scan-tree-dump "omp taskloop\[^\n\r]*shared\\(j10\\)" "gimple" } } ! NOTE: This is implementation detail.
diff --git a/gcc/testsuite/gfortran.dg/gomp/pr99928-8.f90 b/gcc/testsuite/gfortran.dg/gomp/pr99928-8.f90
index c5d1eb7..a0414a5 100644
--- a/gcc/testsuite/gfortran.dg/gomp/pr99928-8.f90
+++ b/gcc/testsuite/gfortran.dg/gomp/pr99928-8.f90
@@ -113,14 +113,14 @@ subroutine bar ()
! { dg-final { scan-tree-dump "omp target\[^\n\r]*map\\(tofrom:r13" "gimple" } }
! { dg-final { scan-tree-dump-not "omp target\[^\n\r]*firstprivate\\(r13\\)" "gimple" } }
! { dg-final { scan-tree-dump "omp parallel\[^\n\r]*reduction\\(\\+:r13\\)" "gimple" } }
- !$omp target parallel reduction(+:r13) default(none) ! defaultmap(none)
+ !$omp target parallel reduction(+:r13) default(none) defaultmap(none)
r13 = r13 + 1
!$omp end target parallel
! { dg-final { scan-tree-dump "omp target\[^\n\r]*map\\(tofrom:r14" "gimple" } }
! { dg-final { scan-tree-dump-not "omp target\[^\n\r]*firstprivate\\(r14\\)" "gimple" } }
! { dg-final { scan-tree-dump "omp parallel\[^\n\r]*reduction\\(\\+:r14\\)" "gimple" } } ! FIXME: This should be on for instead.
! { dg-final { scan-tree-dump-not "omp for\[^\n\r]*reduction\\(\\+:r14\\)" "gimple" } } ! FIXME.
- !$omp target parallel do reduction(+:r14) default(none) ! defaultmap(none)
+ !$omp target parallel do reduction(+:r14) default(none) defaultmap(none)
do i = 1, 64
r14 = r14 + 1
end do
@@ -129,7 +129,7 @@ subroutine bar ()
! { dg-final { scan-tree-dump "omp parallel\[^\n\r]*reduction\\(\\+:r15\\)" "gimple" } } ! FIXME: This should be on for instead.
! { dg-final { scan-tree-dump-not "omp for\[^\n\r]*reduction\\(\\+:r15\\)" "gimple" } } ! FIXME.
! { dg-final { scan-tree-dump "omp simd\[^\n\r]*reduction\\(\\+:r15\\)" "gimple" } }
- !$omp target parallel do simd reduction(+:r15) default(none) ! defaultmap(none)
+ !$omp target parallel do simd reduction(+:r15) default(none) defaultmap(none)
do i = 1, 64
r15 = r15 + 1
end do
@@ -138,21 +138,21 @@ subroutine bar ()
! { dg-final { scan-tree-dump "omp parallel\[^\n\r]*shared\\(r16\\)" "gimple" } }
! { dg-final { scan-tree-dump "omp for\[^\n\r]*reduction\\(\\+:r16\\)" "gimple" } } ! NOTE: This is implementation detail.
! { dg-final { scan-tree-dump "omp simd\[^\n\r]*reduction\\(\\+:r16\\)" "gimple" } } ! NOTE: This is implementation detail.
- !$omp target parallel loop reduction(+:r16) default(none) ! defaultmap(none)
+ !$omp target parallel loop reduction(+:r16) default(none) defaultmap(none)
do i = 1, 64
r16 = r16 + 1
end do
! { dg-final { scan-tree-dump "omp target\[^\n\r]*map\\(tofrom:r17" "gimple" } }
! { dg-final { scan-tree-dump-not "omp target\[^\n\r]*firstprivate\\(r17\\)" "gimple" } }
! { dg-final { scan-tree-dump "omp teams\[^\n\r]*reduction\\(\\+:r17\\)" "gimple" } }
- !$omp target teams reduction(+:r17) default(none) ! defaultmap(none)
+ !$omp target teams reduction(+:r17) default(none) defaultmap(none)
r17 = r17 + 1
!$omp end target teams
! { dg-final { scan-tree-dump "omp target\[^\n\r]*map\\(tofrom:r18" "gimple" } }
! { dg-final { scan-tree-dump-not "omp target\[^\n\r]*firstprivate\\(r18\\)" "gimple" } }
! { dg-final { scan-tree-dump "omp teams\[^\n\r]*reduction\\(\\+:r18\\)" "gimple" } }
! { dg-final { scan-tree-dump-not "omp distribute\[^\n\r]*reduction\\(\\+:r18\\)" "gimple" } }
- !$omp target teams distribute reduction(+:r18) default(none) ! defaultmap(none)
+ !$omp target teams distribute reduction(+:r18) default(none) defaultmap(none)
do i = 1, 64
r18 = r18 + 1
end do
@@ -162,7 +162,7 @@ subroutine bar ()
! { dg-final { scan-tree-dump-not "omp distribute\[^\n\r]*reduction\\(\\+:r19\\)" "gimple" } }
! { dg-final { scan-tree-dump "omp parallel\[^\n\r]*reduction\\(\\+:r19\\)" "gimple" } } ! FIXME: This should be on for instead.
! { dg-final { scan-tree-dump-not "omp for\[^\n\r]*reduction\\(\\+:r19\\)" "gimple" } } ! FIXME.
- !$omp target teams distribute parallel do reduction(+:r19) default(none) ! defaultmap(none)
+ !$omp target teams distribute parallel do reduction(+:r19) default(none) defaultmap(none)
do i = 1, 64
r19 = r19 + 1
end do
@@ -173,7 +173,7 @@ subroutine bar ()
! { dg-final { scan-tree-dump "omp parallel\[^\n\r]*reduction\\(\\+:r20\\)" "gimple" } } ! FIXME: This should be on for instead.
! { dg-final { scan-tree-dump-not "omp for\[^\n\r]*reduction\\(\\+:r20\\)" "gimple" } } ! FIXME.
! { dg-final { scan-tree-dump "omp simd\[^\n\r]*reduction\\(\\+:r20\\)" "gimple" } }
- !$omp target teams distribute parallel do simd reduction(+:r20) default(none) ! defaultmap(none)
+ !$omp target teams distribute parallel do simd reduction(+:r20) default(none) defaultmap(none)
do i = 1, 64
r20 = r20 + 1
end do
@@ -182,7 +182,7 @@ subroutine bar ()
! { dg-final { scan-tree-dump "omp teams\[^\n\r]*reduction\\(\\+:r21\\)" "gimple" } }
! { dg-final { scan-tree-dump-not "omp distribute\[^\n\r]*reduction\\(\\+:r21\\)" "gimple" } }
! { dg-final { scan-tree-dump "omp simd\[^\n\r]*reduction\\(\\+:r21\\)" "gimple" } }
- !$omp target teams distribute simd reduction(+:r21) default(none) ! defaultmap(none)
+ !$omp target teams distribute simd reduction(+:r21) default(none) defaultmap(none)
do i = 1, 64
r21 = r21 + 1
end do
@@ -193,14 +193,14 @@ subroutine bar ()
! { dg-final { scan-tree-dump "omp parallel\[^\n\r]*shared\\(r22\\)" "gimple" } } ! NOTE: This is implementation detail.
! { dg-final { scan-tree-dump "omp for\[^\n\r]*reduction\\(\\+:r22\\)" "gimple" } } ! NOTE: This is implementation detail.
! { dg-final { scan-tree-dump "omp simd\[^\n\r]*reduction\\(\\+:r22\\)" "gimple" } } ! NOTE: This is implementation detail.
- !$omp target teams loop reduction(+:r22) default(none) ! defaultmap(none)
+ !$omp target teams loop reduction(+:r22) default(none) defaultmap(none)
do i = 1, 64
r22 = r22 + 1
end do
! { dg-final { scan-tree-dump "omp target\[^\n\r]*map\\(tofrom:r23" "gimple" } }
! { dg-final { scan-tree-dump-not "omp target\[^\n\r]*firstprivate\\(r23\\)" "gimple" } }
! { dg-final { scan-tree-dump "omp simd\[^\n\r]*reduction\\(\\+:r23\\)" "gimple" } }
- !$omp target simd reduction(+:r23) ! defaultmap(none)
+ !$omp target simd reduction(+:r23) defaultmap(none)
do i = 1, 64
r23 = r23 + 1
end do
diff --git a/gcc/testsuite/gnat.dg/limited4.adb b/gcc/testsuite/gnat.dg/limited4.adb
index 1a8ec97..2a22a2c 100644
--- a/gcc/testsuite/gnat.dg/limited4.adb
+++ b/gcc/testsuite/gnat.dg/limited4.adb
@@ -22,11 +22,12 @@ procedure Limited4 is
Obj2 : Lim_Tagged'Class := Lim_Tagged'Class'(raise TBD_Error);
-- b) initialization expression of a CW component_declaration
-
- type Rec is record
- Comp01 : Lim_Tagged'Class := (raise TBD_Error);
- Comp02 : Lim_Tagged'Class := Lim_Tagged'Class'((raise TBD_Error));
- end record;
+ -- ... is illegal: cannot have unconstrained components.
+ --
+ -- type Rec is record
+ -- Comp01 : Lim_Tagged'Class := (raise TBD_Error);
+ -- Comp02 : Lim_Tagged'Class := Lim_Tagged'Class'((raise TBD_Error));
+ -- end record;
-- c) the expression of a record_component_association
@@ -55,4 +56,4 @@ procedure Limited4 is
begin
Check := Do_Test1 (raise TBD_Error);
Check := Do_Test2;
-end; \ No newline at end of file
+end;
diff --git a/gcc/tree-sra.c b/gcc/tree-sra.c
index 8dfc923..5e86d3f 100644
--- a/gcc/tree-sra.c
+++ b/gcc/tree-sra.c
@@ -915,6 +915,12 @@ create_access (tree expr, gimple *stmt, bool write)
if (!DECL_P (base) || !bitmap_bit_p (candidate_bitmap, DECL_UID (base)))
return NULL;
+ if (write && TREE_READONLY (base))
+ {
+ disqualify_candidate (base, "Encountered a store to a read-only decl.");
+ return NULL;
+ }
+
HOST_WIDE_INT offset, size, max_size;
if (!poffset.is_constant (&offset)
|| !psize.is_constant (&size)
@@ -3826,7 +3832,7 @@ sra_modify_expr (tree *expr, gimple_stmt_iterator *gsi, bool write)
gsi_insert_after (gsi, ds, GSI_NEW_STMT);
}
- if (access->first_child)
+ if (access->first_child && !TREE_READONLY (access->base))
{
HOST_WIDE_INT start_offset, chunk_size;
if (bfr
@@ -3890,6 +3896,13 @@ static void
handle_unscalarized_data_in_subtree (struct subreplacement_assignment_data *sad)
{
tree src;
+ /* If the RHS is a load from a constant, we do not need to (and must not)
+ flush replacements to it and can use it directly as if we did. */
+ if (TREE_READONLY (sad->top_racc->base))
+ {
+ sad->refreshed = SRA_UDH_RIGHT;
+ return;
+ }
if (sad->top_racc->grp_unscalarized_data)
{
src = sad->assignment_rhs;
@@ -4243,8 +4256,8 @@ sra_modify_assign (gimple *stmt, gimple_stmt_iterator *gsi)
|| contains_vce_or_bfcref_p (lhs)
|| stmt_ends_bb_p (stmt))
{
- /* No need to copy into a constant-pool, it comes pre-initialized. */
- if (access_has_children_p (racc) && !constant_decl_p (racc->base))
+ /* No need to copy into a constant, it comes pre-initialized. */
+ if (access_has_children_p (racc) && !TREE_READONLY (racc->base))
generate_subtree_copies (racc->first_child, rhs, racc->offset, 0, 0,
gsi, false, false, loc);
if (access_has_children_p (lacc))
@@ -4333,7 +4346,7 @@ sra_modify_assign (gimple *stmt, gimple_stmt_iterator *gsi)
}
/* Restore the aggregate RHS from its components so the
prevailing aggregate copy does the right thing. */
- if (access_has_children_p (racc))
+ if (access_has_children_p (racc) && !TREE_READONLY (racc->base))
generate_subtree_copies (racc->first_child, rhs, racc->offset, 0, 0,
gsi, false, false, loc);
/* Re-load the components of the aggregate copy destination.
diff --git a/gcc/tree-ssa-loop-im.c b/gcc/tree-ssa-loop-im.c
index 1c865b2..7de47ed 100644
--- a/gcc/tree-ssa-loop-im.c
+++ b/gcc/tree-ssa-loop-im.c
@@ -2340,7 +2340,13 @@ sm_seq_valid_bb (class loop *loop, basic_block bb, tree vdef,
tree vuse = gimple_phi_arg_def (phi, i);
edge e = gimple_phi_arg_edge (phi, i);
auto_vec<seq_entry> edge_seq;
- bitmap_copy (tem_refs_not_in_seq, refs_not_in_seq);
+ bitmap_and_compl (tem_refs_not_in_seq,
+ refs_not_in_seq, refs_not_supported);
+ /* If we've marked all refs we search for as unsupported
+ we can stop processing and use the sequence as before
+ the PHI. */
+ if (bitmap_empty_p (tem_refs_not_in_seq))
+ return 1;
eret = sm_seq_valid_bb (loop, e->src, vuse, edge_seq,
tem_refs_not_in_seq, refs_not_supported,
true, fully_visited);
@@ -2379,9 +2385,9 @@ sm_seq_valid_bb (class loop *loop, basic_block bb, tree vdef,
/* sm_other prevails. */
else if (first_edge_seq[i].second != edge_seq[i].second)
{
- /* This is just an optimization. */
- gcc_assert (bitmap_bit_p (refs_not_supported,
- first_edge_seq[i].first));
+ /* Make sure the ref is marked as not supported. */
+ bitmap_set_bit (refs_not_supported,
+ first_edge_seq[i].first);
first_edge_seq[i].second = sm_other;
first_edge_seq[i].from = NULL_TREE;
}
@@ -2533,7 +2539,12 @@ hoist_memory_references (class loop *loop, bitmap mem_refs,
vec<seq_entry> seq;
seq.create (4);
auto_bitmap refs_not_in_seq (&lim_bitmap_obstack);
- bitmap_copy (refs_not_in_seq, mem_refs);
+ bitmap_and_compl (refs_not_in_seq, mem_refs, refs_not_supported);
+ if (bitmap_empty_p (refs_not_in_seq))
+ {
+ seq.release ();
+ break;
+ }
auto_bitmap fully_visited;
int res = sm_seq_valid_bb (loop, e->src, NULL_TREE,
seq, refs_not_in_seq,
diff --git a/gcc/tree-vect-slp.c b/gcc/tree-vect-slp.c
index 9ded585..8ec589b 100644
--- a/gcc/tree-vect-slp.c
+++ b/gcc/tree-vect-slp.c
@@ -1536,13 +1536,12 @@ vect_build_slp_tree (vec_info *vinfo,
/* Helper for building an associated SLP node chain. */
static void
-vect_slp_build_two_operator_nodes (slp_tree perm,
+vect_slp_build_two_operator_nodes (slp_tree perm, tree vectype,
slp_tree op0, slp_tree op1,
stmt_vec_info oper1, stmt_vec_info oper2,
vec<std::pair<unsigned, unsigned> > lperm)
{
unsigned group_size = SLP_TREE_LANES (op1);
- tree vectype = SLP_TREE_VECTYPE (op1);
slp_tree child1 = new _slp_tree;
SLP_TREE_DEF_TYPE (child1) = vect_internal_def;
@@ -2087,7 +2086,7 @@ vect_build_slp_tree_2 (vec_info *vinfo, slp_tree node,
for (unsigned lane = 0; lane < group_size; ++lane)
lperm.quick_push (std::make_pair
(chains[lane][i].code != chains[0][i].code, lane));
- vect_slp_build_two_operator_nodes (child, op0, op1,
+ vect_slp_build_two_operator_nodes (child, vectype, op0, op1,
(chains[0][i].code == code
? op_stmt_info
: other_op_stmt_info),
diff --git a/libffi/src/x86/ffi64.c b/libffi/src/x86/ffi64.c
index 131b5e3..243cbc7 100644
--- a/libffi/src/x86/ffi64.c
+++ b/libffi/src/x86/ffi64.c
@@ -217,7 +217,8 @@ classify_argument (ffi_type *type, enum x86_64_reg_class classes[],
case FFI_TYPE_STRUCT:
{
const size_t UNITS_PER_WORD = 8;
- size_t words = (type->size + UNITS_PER_WORD - 1) / UNITS_PER_WORD;
+ size_t words = (type->size + byte_offset + UNITS_PER_WORD - 1)
+ / UNITS_PER_WORD;
ffi_type **ptr;
int i;
enum x86_64_reg_class subclasses[MAX_CLASSES];
@@ -241,16 +242,16 @@ classify_argument (ffi_type *type, enum x86_64_reg_class classes[],
/* Merge the fields of structure. */
for (ptr = type->elements; *ptr != NULL; ptr++)
{
- size_t num;
+ size_t num, pos;
byte_offset = ALIGN (byte_offset, (*ptr)->alignment);
num = classify_argument (*ptr, subclasses, byte_offset % 8);
if (num == 0)
return 0;
- for (i = 0; i < num; i++)
+ pos = byte_offset / 8;
+ for (i = 0; i < num && (i + pos) < words; i++)
{
- size_t pos = byte_offset / 8;
classes[i + pos] =
merge_classes (subclasses[i], classes[i + pos]);
}
diff --git a/libffi/testsuite/libffi.call/nested_struct12.c b/libffi/testsuite/libffi.call/nested_struct12.c
new file mode 100644
index 0000000..6f3d736
--- /dev/null
+++ b/libffi/testsuite/libffi.call/nested_struct12.c
@@ -0,0 +1,107 @@
+/* Area: ffi_call, closure_call
+ Purpose: Check structure passing.
+ Limitations: none.
+ PR: none.
+ Originator: <jincheng@ca.ibm.com> and <jakub@redhat.com> 20210609 */
+
+/* { dg-do run } */
+#include "ffitest.h"
+
+typedef struct A {
+ float a, b;
+} A;
+
+typedef struct B {
+ float x;
+ struct A y;
+} B;
+
+B B_fn(float b0, struct B b1)
+{
+ struct B result;
+
+ result.x = b0 + b1.x;
+ result.y.a = b0 + b1.y.a;
+ result.y.b = b0 + b1.y.b;
+
+ printf("%g %g %g %g: %g %g %g\n", b0, b1.x, b1.y.a, b1.y.b,
+ result.x, result.y.a, result.y.b);
+
+ return result;
+}
+
+static void
+B_gn(ffi_cif* cif __UNUSED__, void* resp, void** args,
+ void* userdata __UNUSED__)
+{
+ float b0;
+ struct B b1;
+
+ b0 = *(float*)(args[0]);
+ b1 = *(struct B*)(args[1]);
+
+ *(B*)resp = B_fn(b0, b1);
+}
+
+int main (void)
+{
+ ffi_cif cif;
+ void *code;
+ ffi_closure *pcl = ffi_closure_alloc(sizeof(ffi_closure), &code);
+ void* args_dbl[3];
+ ffi_type* cls_struct_fields[3];
+ ffi_type* cls_struct_fields1[3];
+ ffi_type cls_struct_type, cls_struct_type1;
+ ffi_type* dbl_arg_types[3];
+
+ float e_dbl = 12.125f;
+ struct B f_dbl = { 24.75f, { 31.625f, 32.25f } };
+
+ struct B res_dbl;
+
+ cls_struct_type.size = 0;
+ cls_struct_type.alignment = 0;
+ cls_struct_type.type = FFI_TYPE_STRUCT;
+ cls_struct_type.elements = cls_struct_fields;
+
+ cls_struct_type1.size = 0;
+ cls_struct_type1.alignment = 0;
+ cls_struct_type1.type = FFI_TYPE_STRUCT;
+ cls_struct_type1.elements = cls_struct_fields1;
+
+ cls_struct_fields[0] = &ffi_type_float;
+ cls_struct_fields[1] = &ffi_type_float;
+ cls_struct_fields[2] = NULL;
+
+ cls_struct_fields1[0] = &ffi_type_float;
+ cls_struct_fields1[1] = &cls_struct_type;
+ cls_struct_fields1[2] = NULL;
+
+
+ dbl_arg_types[0] = &ffi_type_float;
+ dbl_arg_types[1] = &cls_struct_type1;
+ dbl_arg_types[2] = NULL;
+
+ CHECK(ffi_prep_cif(&cif, FFI_DEFAULT_ABI, 2, &cls_struct_type1,
+ dbl_arg_types) == FFI_OK);
+
+ args_dbl[0] = &e_dbl;
+ args_dbl[1] = &f_dbl;
+ args_dbl[2] = NULL;
+
+ ffi_call(&cif, FFI_FN(B_fn), &res_dbl, args_dbl);
+ /* { dg-output "12.125 24.75 31.625 32.25: 36.875 43.75 44.375" } */
+ CHECK( res_dbl.x == (e_dbl + f_dbl.x));
+ CHECK( res_dbl.y.a == (e_dbl + f_dbl.y.a));
+ CHECK( res_dbl.y.b == (e_dbl + f_dbl.y.b));
+
+ CHECK(ffi_prep_closure_loc(pcl, &cif, B_gn, NULL, code) == FFI_OK);
+
+ res_dbl = ((B(*)(float, B))(code))(e_dbl, f_dbl);
+ /* { dg-output "\n12.125 24.75 31.625 32.25: 36.875 43.75 44.375" } */
+ CHECK( res_dbl.x == (e_dbl + f_dbl.x));
+ CHECK( res_dbl.y.a == (e_dbl + f_dbl.y.a));
+ CHECK( res_dbl.y.b == (e_dbl + f_dbl.y.b));
+
+ exit(0);
+}
diff --git a/libgomp/ChangeLog b/libgomp/ChangeLog
index ed9f258..975406a 100644
--- a/libgomp/ChangeLog
+++ b/libgomp/ChangeLog
@@ -1,3 +1,8 @@
+2021-06-15 Tobias Burnus <tobias@codesourcery.com>
+
+ PR fortran/92568
+ * testsuite/libgomp.fortran/defaultmap-8.f90: New test.
+
2021-06-10 Andrew Stubbs <ams@codesourcery.com>
Thomas Schwinge <thomas@codesourcery.com>
diff --git a/libgomp/testsuite/libgomp.fortran/defaultmap-8.f90 b/libgomp/testsuite/libgomp.fortran/defaultmap-8.f90
new file mode 100644
index 0000000..ddf5057
--- /dev/null
+++ b/libgomp/testsuite/libgomp.fortran/defaultmap-8.f90
@@ -0,0 +1,279 @@
+! { dg-do run }
+! { dg-additional-options "-fdump-tree-gimple" }
+!
+! PR fortran/92568
+!
+program main
+ implicit none
+ integer :: xa1, xa2, xp1, xp2, xat1, xat2, xt1, xt2, xi1, xi2
+ allocatable :: xa1, xa2, xat1, xat2
+ pointer :: xp1, xp2
+
+ allocate (xa1, xa2, xat1, xat2, xp1, xp2)
+
+ call foo (xa1, xa2, xp1, xp2, xat1, xat2, xt1, xt2, xi1, xi2)
+ call foo2 (xa1, xa2, xp1, xp2, xat1, xat2, xt1, xt2, xi1, xi2)
+ call foo3 (xa1, xa2, xp1, xp2, xat1, xat2, xt1, xt2, xi1, xi2)
+ call bar (xa1, xa2, xp1, xp2, xat1, xat2, xt1, xt2, xi1, xi2)
+
+ deallocate (xa1, xa2, xat1, xat2, xp1, xp2)
+contains
+! Implicit mapping
+subroutine foo (ia1, ia2, ip1, ip2, iat1, iat2, it1, it2, ii1, ii2)
+ implicit none
+ integer :: ia1, ia2, ia3, ip1, ip2, ip3, iat1, iat2, iat3, it1, it2, it3, ii1, ii2, ii3
+ allocatable :: ia1, ia2, ia3, iat1, iat2, iat3
+ pointer :: ip1, ip2, ip3
+ target :: iat1, iat2, iat3, it1, it2, it3
+ optional :: ia1, ip1, iat1, it1, ii1
+
+ allocate(ia3, iat3, ip3)
+
+ ia1 = 2; ia2 = 2; ia3 = 2; ip1 = 2; ip2 = 2; ip3 = 2;
+ iat1 = 2; iat2 = 2; iat3 = 2; it1 = 2; it2 = 2; it3 = 2
+ ii1 = 2; ii2 = 2; ii3 = 2
+
+ ! Implicitly, scalars are 'firstprivate' except
+ ! if target, allocatable, pointer they are always tofrom.
+ !$omp target
+ if (ia1 /= 2) stop 1
+ if (ia2 /= 2) stop 2
+ if (ia3 /= 2) stop 3
+ if (ip1 /= 2) stop 4
+ if (ip2 /= 2) stop 5
+ if (ip3 /= 2) stop 6
+ if (iat1 /= 2) stop 7
+ if (iat2 /= 2) stop 8
+ if (iat3 /= 2) stop 9
+ if (it1 /= 2) stop 10
+ if (it2 /= 2) stop 11
+ if (it3 /= 2) stop 12
+ if (ii1 /= 2) stop 13
+ if (ii2 /= 2) stop 14
+ if (ii3 /= 2) stop 15
+
+ ia1 = 1; ia2 = 1; ia3 = 1; ip1 = 1; ip2 = 1; ip3 = 1;
+ iat1 = 1; iat2 = 1; iat3 = 1; it1 = 1; it2 = 1; it3 = 1
+ ii1 = 1; ii2 = 1; ii3 = 1
+ !$omp end target
+
+ ! (target,allocatable,pointer) -> tofrom
+ if (ia1 /= 1) stop 16
+ if (ia2 /= 1) stop 17
+ if (ia3 /= 1) stop 18
+ if (ip1 /= 1) stop 19
+ if (ip2 /= 1) stop 20
+ if (ip3 /= 1) stop 21
+ if (iat1 /= 1) stop 22
+ if (iat2 /= 1) stop 23
+ if (iat3 /= 1) stop 24
+ if (it1 /= 1) stop 25
+ if (it2 /= 1) stop 26
+ if (it3 /= 1) stop 27
+ ! non-(target,allocatable,pointer) -> firstprivate
+ !if (ii1 /= 2) stop 28 ! FIXME: optional scalar wrongly mapped as tofrom, PR fortran/100991
+ if (ii2 /= 2) stop 29
+ if (ii3 /= 2) stop 30
+
+ deallocate(ia3, iat3, ip3)
+end
+
+! Implicit mapping likewise even though there is defaultmap
+subroutine foo2 (ia1, ia2, ip1, ip2, iat1, iat2, it1, it2, ii1, ii2)
+ implicit none
+ integer :: ia1, ia2, ia3, ip1, ip2, ip3, iat1, iat2, iat3, it1, it2, it3, ii1, ii2, ii3
+ allocatable :: ia1, ia2, ia3, iat1, iat2, iat3
+ pointer :: ip1, ip2, ip3
+ target :: iat1, iat2, iat3, it1, it2, it3
+ optional :: ia1, ip1, iat1, it1, ii1
+
+ allocate(ia3, iat3, ip3)
+
+ ia1 = 2; ia2 = 2; ia3 = 2; ip1 = 2; ip2 = 2; ip3 = 2;
+ iat1 = 2; iat2 = 2; iat3 = 2; it1 = 2; it2 = 2; it3 = 2
+ ii1 = 2; ii2 = 2; ii3 = 2
+
+ ! Implicitly, scalars are 'firstprivate' except
+ ! if target, allocatable, pointer they are always tofrom.
+ !$omp target defaultmap(default)
+ if (ia1 /= 2) stop 31
+ if (ia2 /= 2) stop 32
+ if (ia3 /= 2) stop 33
+ if (ip1 /= 2) stop 34
+ if (ip2 /= 2) stop 35
+ if (ip3 /= 2) stop 36
+ if (iat1 /= 2) stop 37
+ if (iat2 /= 2) stop 38
+ if (iat3 /= 2) stop 39
+ if (it1 /= 2) stop 40
+ if (it2 /= 2) stop 41
+ if (it3 /= 2) stop 42
+ if (ii1 /= 2) stop 43
+ if (ii2 /= 2) stop 44
+ if (ii3 /= 2) stop 45
+
+ ia1 = 1; ia2 = 1; ia3 = 1; ip1 = 1; ip2 = 1; ip3 = 1;
+ iat1 = 1; iat2 = 1; iat3 = 1; it1 = 1; it2 = 1; it3 = 1
+ ii1 = 1; ii2 = 1; ii3 = 1
+ !$omp end target
+
+ ! (target,allocatable,pointer) -> tofrom
+ if (ia1 /= 1) stop 46
+ if (ia2 /= 1) stop 47
+ if (ia3 /= 1) stop 48
+ if (ip1 /= 1) stop 49
+ if (ip2 /= 1) stop 50
+ if (ip3 /= 1) stop 51
+ if (iat1 /= 1) stop 52
+ if (iat2 /= 1) stop 53
+ if (iat3 /= 1) stop 54
+ if (it1 /= 1) stop 55
+ if (it2 /= 1) stop 56
+ if (it3 /= 1) stop 57
+ ! non-(target,allocatable,pointer) -> firstprivate
+ !if (ii1 /= 2) stop 58 ! FIXME: optional scalar wrongly mapped as tofrom, PR fortran/100991
+ if (ii2 /= 2) stop 59
+ if (ii3 /= 2) stop 60
+
+ deallocate(ia3, iat3, ip3)
+end
+
+! Implicit mapping likewise even though there is defaultmap
+subroutine foo3 (ia1, ia2, ip1, ip2, iat1, iat2, it1, it2, ii1, ii2)
+ implicit none
+ integer :: ia1, ia2, ia3, ip1, ip2, ip3, iat1, iat2, iat3, it1, it2, it3, ii1, ii2, ii3
+ allocatable :: ia1, ia2, ia3, iat1, iat2, iat3
+ pointer :: ip1, ip2, ip3
+ target :: iat1, iat2, iat3, it1, it2, it3
+ optional :: ia1, ip1, iat1, it1, ii1
+
+ allocate(ia3, iat3, ip3)
+
+ ia1 = 2; ia2 = 2; ia3 = 2; ip1 = 2; ip2 = 2; ip3 = 2;
+ iat1 = 2; iat2 = 2; iat3 = 2; it1 = 2; it2 = 2; it3 = 2
+ ii1 = 2; ii2 = 2; ii3 = 2
+
+ ! Implicitly, scalars are 'firstprivate' except
+ ! if target, allocatable, pointer they are always tofrom.
+ !$omp target defaultmap(none:aggregate)
+ if (ia1 /= 2) stop 61
+ if (ia2 /= 2) stop 62
+ if (ia3 /= 2) stop 63
+ if (ip1 /= 2) stop 64
+ if (ip2 /= 2) stop 65
+ if (ip3 /= 2) stop 66
+ if (iat1 /= 2) stop 67
+ if (iat2 /= 2) stop 68
+ if (iat3 /= 2) stop 69
+ if (it1 /= 2) stop 70
+ if (it2 /= 2) stop 71
+ if (it3 /= 2) stop 72
+ if (ii1 /= 2) stop 73
+ if (ii2 /= 2) stop 74
+ if (ii3 /= 2) stop 75
+
+ ia1 = 1; ia2 = 1; ia3 = 1; ip1 = 1; ip2 = 1; ip3 = 1;
+ iat1 = 1; iat2 = 1; iat3 = 1; it1 = 1; it2 = 1; it3 = 1
+ ii1 = 1; ii2 = 1; ii3 = 1
+ !$omp end target
+
+ ! (target,allocatable,pointer) -> tofrom
+ if (ia1 /= 1) stop 76
+ if (ia2 /= 1) stop 77
+ if (ia3 /= 1) stop 78
+ if (ip1 /= 1) stop 79
+ if (ip2 /= 1) stop 80
+ if (ip3 /= 1) stop 81
+ if (iat1 /= 1) stop 82
+ if (iat2 /= 1) stop 83
+ if (iat3 /= 1) stop 84
+ if (it1 /= 1) stop 85
+ if (it2 /= 1) stop 86
+ if (it3 /= 1) stop 87
+ ! non-(target,allocatable,pointer) -> firstprivate
+ !if (ii1 /= 2) stop 88 ! FIXME: optional scalar wrongly mapped as tofrom, PR fortran/100991
+ if (ii2 /= 2) stop 89
+ if (ii3 /= 2) stop 90
+
+ deallocate(ia3, iat3, ip3)
+end
+
+subroutine bar (ea1, ea2, ep1, ep2, eat1, eat2, et1, et2, ei1, ei2)
+ implicit none
+ integer :: ea1, ea2, ea3, ep1, ep2, ep3, eat1, eat2, eat3, et1, et2, et3, ei1, ei2, ei3
+ allocatable :: ea1, ea2, ea3, eat1, eat2, eat3
+ pointer :: ep1, ep2, ep3
+ target :: eat1, eat2, eat3, et1, et2, et3
+ optional :: ea1, ep1, eat1, et1, ei1
+
+ allocate(ea3, eat3, ep3)
+
+ ea1 = 2; ea2 = 2; ea3 = 2; ep1 = 2; ep2 = 2; ep3 = 2;
+ eat1 = 2; eat2 = 2; eat3 = 2; et1 = 2; et2 = 2; et3 = 2
+ ei1 = 2; ei2 = 2; ei3 = 2
+
+ ! While here 'scalar' implies nonallocatable/nonpointer and
+ ! the target attribute plays no role.
+ !$omp target defaultmap(tofrom:scalar) defaultmap(firstprivate:allocatable) &
+ !$omp& defaultmap(none:aggregate) defaultmap(firstprivate:pointer)
+ if (ea1 /= 2) stop 91
+ if (ea2 /= 2) stop 92
+ if (ea3 /= 2) stop 93
+ if (ep1 /= 2) stop 94
+ if (ep2 /= 2) stop 95
+ if (ep3 /= 2) stop 96
+ if (eat1 /= 2) stop 97
+ if (eat2 /= 2) stop 98
+ if (eat3 /= 2) stop 99
+ if (et1 /= 2) stop 100
+ if (et2 /= 2) stop 101
+ if (et3 /= 2) stop 102
+ if (ei1 /= 2) stop 103
+ if (ei2 /= 2) stop 104
+ if (ei3 /= 2) stop 105
+ ep1 => null(); ep2 => null(); ep3 => null()
+ ea1 = 1; ea2 = 1; ea3 = 1
+ eat1 = 1; eat2 = 1; eat3 = 1
+ et1 = 1; et2 = 1; et3 = 1
+ ei1 = 1; ei2 = 1; ei3 = 1
+ !$omp end target
+ ! (allocatable,pointer) -> firstprivate
+
+! FIXME: allocatables not properly privatized, cf. PR fortran/90742
+
+! if (ea1 /= 2) stop 106
+! if (ea2 /= 2) stop 107
+! if (ea3 /= 2) stop 108
+! if (eat1 /= 2) stop 112
+! if (eat2 /= 2) stop 113
+! if (eat3 /= 2) stop 114
+ if (ep1 /= 2) stop 109
+ if (ep2 /= 2) stop 110
+ if (ep3 /= 2) stop 111
+ ! (scalar) -> tofrom
+ !if (et1 /= 1) stop 115 ! FIXME: optional scalar wrongly mapped as 'firstprivate', PR fortran/100991
+ if (et2 /= 1) stop 116
+ if (et3 /= 1) stop 117
+ !if (ei1 /= 1) stop 118 ! FIXME: optional scalar wrongly mapped as 'firstprivate', PR fortran/100991
+ if (ei2 /= 1) stop 119
+ if (ei3 /= 1) stop 120
+
+ deallocate(ea3, eat3, ep3)
+end
+
+end
+
+! FIXME/xfail: Optional scalars wrongly classified, PR fortran/100991
+! { dg-final { scan-tree-dump-times "firstprivate\\(ii1\\)" 3 "gimple" { xfail *-*-* } } }
+! { dg-final { scan-tree-dump-not "firstprivate\\(et1\\)" "gimple" { xfail *-*-* } } }
+! { dg-final { scan-tree-dump-not "firstprivate\\(ei1\\)" "gimple" { xfail *-*-* } } }
+
+! { dg-final { scan-tree-dump-times "firstprivate\\(ea1\\)" 1 "gimple" } }
+! { dg-final { scan-tree-dump-times "firstprivate\\(ea2\\)" 1 "gimple" } }
+! { dg-final { scan-tree-dump-times "firstprivate\\(ea3\\)" 1 "gimple" } }
+! { dg-final { scan-tree-dump-times "firstprivate\\(eat1\\)" 1 "gimple" } }
+! { dg-final { scan-tree-dump-times "firstprivate\\(eat2\\)" 1 "gimple" } }
+! { dg-final { scan-tree-dump-times "firstprivate\\(eat3\\)" 1 "gimple" } }
+! { dg-final { scan-tree-dump-times "firstprivate\\(ep1\\)" 1 "gimple" } }
+! { dg-final { scan-tree-dump-times "firstprivate\\(ep2\\)" 1 "gimple" } }
+! { dg-final { scan-tree-dump-times "firstprivate\\(ep3\\)" 1 "gimple" } }
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog
index 635bc1c..c802dac 100644
--- a/libstdc++-v3/ChangeLog
+++ b/libstdc++-v3/ChangeLog
@@ -1,3 +1,46 @@
+2021-06-15 Jonathan Wakely <jwakely@redhat.com>
+
+ * include/bits/ranges_base.h (ranges::begin, ranges::end)
+ (ranges::cbegin, ranges::cend, ranges::rbeing, ranges::rend)
+ (ranges::crbegin, ranges::crend, ranges::size, ranges::ssize)
+ (ranges::empty, ranges::data, ranges::cdata): Make types final.
+ Add deleted operator& overloads.
+ (ranges::advance, ranges::distance, ranges::next, ranges::prev):
+ Likewise.
+ * testsuite/std/ranges/headers/ranges/synopsis.cc: Replace
+ ill-formed & expressions with using-declarations. Add checks for
+ other function objects.
+
+2021-06-15 Jonathan Wakely <jwakely@redhat.com>
+
+ * include/bits/ranges_util.h (view_interface): Add noexcept to
+ empty, operator bool, data and size members.
+ (subrange): Add noexcept to constructors.
+ * include/std/ranges (single_view, ref_view): Add noexcept to
+ constructors.
+ (views::single, views::all): Add noexcept.
+ * testsuite/std/ranges/adaptors/all.cc: Check noexcept.
+ * testsuite/std/ranges/single_view.cc: Likewise.
+
+2021-06-15 Jonathan Wakely <jwakely@redhat.com>
+
+ * include/bits/ranges_util.h (subrange): Add __size_type typedef
+ and use it to simplify declarations.
+ (subrange(i, s, n)): Remove assertion.
+ * testsuite/std/ranges/subrange/constexpr.cc: New test.
+
+2021-06-15 Jonathan Wakely <jwakely@redhat.com>
+
+ * include/bits/iterator_concepts.h (__cust_access::__decay_copy):
+ Replace with function object.
+ (__cust_access::__member_begin, ___cust_access::_adl_begin): Use
+ __decay_copy unqualified.
+ * include/bits/ranges_base.h (__member_end, __adl_end):
+ Likewise. Use __range_iter_t for type of ranges::begin.
+ (__member_rend): Use correct value category for rbegin argument.
+ (__member_data): Use __decay_copy unqualified.
+ (__begin_data): Use __range_iter_t for type of ranges::begin.
+
2021-06-14 Jonathan Wakely <jwakely@redhat.com>
* include/bits/ranges_base.h (ranges::empty): Check whether
diff --git a/libstdc++-v3/include/bits/iterator_concepts.h b/libstdc++-v3/include/bits/iterator_concepts.h
index 8723f35..d18ae32 100644
--- a/libstdc++-v3/include/bits/iterator_concepts.h
+++ b/libstdc++-v3/include/bits/iterator_concepts.h
@@ -930,17 +930,18 @@ namespace ranges
{
using std::__detail::__class_or_enum;
- template<typename _Tp>
- constexpr decay_t<_Tp>
- __decay_copy(_Tp&& __t)
- noexcept(is_nothrow_convertible_v<_Tp, decay_t<_Tp>>)
- { return std::forward<_Tp>(__t); }
+ struct {
+ template<typename _Tp>
+ constexpr decay_t<_Tp>
+ operator()(_Tp&& __t) const
+ noexcept(is_nothrow_convertible_v<_Tp, decay_t<_Tp>>)
+ { return std::forward<_Tp>(__t); }
+ } inline constexpr __decay_copy{};
template<typename _Tp>
concept __member_begin = requires(_Tp& __t)
{
- { __cust_access::__decay_copy(__t.begin()) }
- -> input_or_output_iterator;
+ { __decay_copy(__t.begin()) } -> input_or_output_iterator;
};
// Poison pills so that unqualified lookup doesn't find std::begin.
@@ -951,8 +952,7 @@ namespace ranges
concept __adl_begin = __class_or_enum<remove_reference_t<_Tp>>
&& requires(_Tp& __t)
{
- { __cust_access::__decay_copy(begin(__t)) }
- -> input_or_output_iterator;
+ { __decay_copy(begin(__t)) } -> input_or_output_iterator;
};
// Simplified version of std::ranges::begin that only supports lvalues,
diff --git a/libstdc++-v3/include/bits/ranges_base.h b/libstdc++-v3/include/bits/ranges_base.h
index 3bc657c..e392c37 100644
--- a/libstdc++-v3/include/bits/ranges_base.h
+++ b/libstdc++-v3/include/bits/ranges_base.h
@@ -89,8 +89,9 @@ namespace ranges
namespace __cust_access
{
using std::ranges::__detail::__maybe_borrowed_range;
+ using std::__detail::__range_iter_t;
- struct _Begin
+ struct _Begin final
{
private:
template<typename _Tp>
@@ -105,6 +106,8 @@ namespace ranges
return noexcept(__decay_copy(begin(std::declval<_Tp&>())));
}
+ void operator&() const = delete;
+
public:
template<__maybe_borrowed_range _Tp>
requires is_array_v<remove_reference_t<_Tp>> || __member_begin<_Tp>
@@ -127,8 +130,7 @@ namespace ranges
template<typename _Tp>
concept __member_end = requires(_Tp& __t)
{
- { __decay_copy(__t.end()) }
- -> sentinel_for<decltype(_Begin{}(std::forward<_Tp>(__t)))>;
+ { __decay_copy(__t.end()) } -> sentinel_for<__range_iter_t<_Tp>>;
};
// Poison pills so that unqualified lookup doesn't find std::end.
@@ -139,11 +141,10 @@ namespace ranges
concept __adl_end = __class_or_enum<remove_reference_t<_Tp>>
&& requires(_Tp& __t)
{
- { __decay_copy(end(__t)) }
- -> sentinel_for<decltype(_Begin{}(std::forward<_Tp>(__t)))>;
+ { __decay_copy(end(__t)) } -> sentinel_for<__range_iter_t<_Tp>>;
};
- struct _End
+ struct _End final
{
private:
template<typename _Tp>
@@ -158,6 +159,8 @@ namespace ranges
return noexcept(__decay_copy(end(std::declval<_Tp&>())));
}
+ void operator&() const = delete;
+
public:
template<__maybe_borrowed_range _Tp>
requires is_bounded_array_v<remove_reference_t<_Tp>>
@@ -190,7 +193,7 @@ namespace ranges
return static_cast<const _Tp&&>(__t);
}
- struct _CBegin
+ struct _CBegin final
{
template<typename _Tp>
constexpr auto
@@ -200,9 +203,11 @@ namespace ranges
{
return _Begin{}(__cust_access::__as_const<_Tp>(__e));
}
+
+ void operator&() const = delete;
};
- struct _CEnd
+ struct _CEnd final
{
template<typename _Tp>
constexpr auto
@@ -212,6 +217,8 @@ namespace ranges
{
return _End{}(__cust_access::__as_const<_Tp>(__e));
}
+
+ void operator&() const = delete;
};
template<typename _Tp>
@@ -237,7 +244,7 @@ namespace ranges
{ _End{}(__t) } -> same_as<decltype(_Begin{}(__t))>;
};
- struct _RBegin
+ struct _RBegin final
{
private:
template<typename _Tp>
@@ -261,6 +268,8 @@ namespace ranges
}
}
+ void operator&() const = delete;
+
public:
template<__maybe_borrowed_range _Tp>
requires __member_rbegin<_Tp> || __adl_rbegin<_Tp> || __reversable<_Tp>
@@ -281,7 +290,7 @@ namespace ranges
concept __member_rend = requires(_Tp& __t)
{
{ __decay_copy(__t.rend()) }
- -> sentinel_for<decltype(_RBegin{}(__t))>;
+ -> sentinel_for<decltype(_RBegin{}(std::forward<_Tp>(__t)))>;
};
void rend(auto&) = delete;
@@ -295,7 +304,7 @@ namespace ranges
-> sentinel_for<decltype(_RBegin{}(std::forward<_Tp>(__t)))>;
};
- struct _REnd
+ struct _REnd final
{
private:
template<typename _Tp>
@@ -319,6 +328,8 @@ namespace ranges
}
}
+ void operator&() const = delete;
+
public:
template<__maybe_borrowed_range _Tp>
requires __member_rend<_Tp> || __adl_rend<_Tp> || __reversable<_Tp>
@@ -335,7 +346,7 @@ namespace ranges
}
};
- struct _CRBegin
+ struct _CRBegin final
{
template<typename _Tp>
constexpr auto
@@ -345,9 +356,11 @@ namespace ranges
{
return _RBegin{}(__cust_access::__as_const<_Tp>(__e));
}
+
+ void operator&() const = delete;
};
- struct _CREnd
+ struct _CREnd final
{
template<typename _Tp>
constexpr auto
@@ -357,6 +370,8 @@ namespace ranges
{
return _REnd{}(__cust_access::__as_const<_Tp>(__e));
}
+
+ void operator&() const = delete;
};
template<typename _Tp>
@@ -387,7 +402,7 @@ namespace ranges
__detail::__to_unsigned_like(_End{}(__t) - _Begin{}(__t));
};
- struct _Size
+ struct _Size final
{
private:
template<typename _Tp>
@@ -405,6 +420,8 @@ namespace ranges
- _Begin{}(std::declval<_Tp&>()));
}
+ void operator&() const = delete;
+
public:
template<typename _Tp>
requires is_bounded_array_v<remove_reference_t<_Tp>>
@@ -423,7 +440,7 @@ namespace ranges
}
};
- struct _SSize
+ struct _SSize final
{
// _GLIBCXX_RESOLVE_LIB_DEFECTS
// 3403. Domain of ranges::ssize(E) doesn't match ranges::size(E)
@@ -452,6 +469,8 @@ namespace ranges
else // Must be one of __max_diff_type or __max_size_type.
return __detail::__max_diff_type(__size);
}
+
+ void operator&() const = delete;
};
template<typename _Tp>
@@ -468,7 +487,7 @@ namespace ranges
bool(_Begin{}(__t) == _End{}(__t));
};
- struct _Empty
+ struct _Empty final
{
private:
template<typename _Tp>
@@ -484,6 +503,8 @@ namespace ranges
== _End{}(std::declval<_Tp&>())));
}
+ void operator&() const = delete;
+
public:
template<typename _Tp>
requires __member_empty<_Tp> || __size0_empty<_Tp>
@@ -507,14 +528,13 @@ namespace ranges
template<typename _Tp>
concept __member_data = requires(_Tp& __t)
{
- { __cust_access::__decay_copy(__t.data()) } -> __pointer_to_object;
+ { __decay_copy(__t.data()) } -> __pointer_to_object;
};
template<typename _Tp>
- concept __begin_data = requires(_Tp& __t)
- { { _Begin{}(__t) } -> contiguous_iterator; };
+ concept __begin_data = contiguous_iterator<__range_iter_t<_Tp>>;
- struct _Data
+ struct _Data final
{
private:
template<typename _Tp>
@@ -527,6 +547,8 @@ namespace ranges
return noexcept(_Begin{}(std::declval<_Tp&>()));
}
+ void operator&() const = delete;
+
public:
template<__maybe_borrowed_range _Tp>
requires __member_data<_Tp> || __begin_data<_Tp>
@@ -540,7 +562,7 @@ namespace ranges
}
};
- struct _CData
+ struct _CData final
{
template<typename _Tp>
constexpr auto
@@ -550,6 +572,8 @@ namespace ranges
{
return _Data{}(__cust_access::__as_const<_Tp>(__e));
}
+
+ void operator&() const = delete;
};
} // namespace __cust_access
@@ -671,7 +695,7 @@ namespace ranges
// [range.iter.ops] range iterator operations
- struct __advance_fn
+ struct __advance_fn final
{
template<input_or_output_iterator _It>
constexpr void
@@ -776,11 +800,13 @@ namespace ranges
return __n;
}
}
+
+ void operator&() const = delete;
};
inline constexpr __advance_fn advance{};
- struct __distance_fn
+ struct __distance_fn final
{
template<input_or_output_iterator _It, sentinel_for<_It> _Sent>
constexpr iter_difference_t<_It>
@@ -809,11 +835,13 @@ namespace ranges
else
return (*this)(ranges::begin(__r), ranges::end(__r));
}
+
+ void operator&() const = delete;
};
inline constexpr __distance_fn distance{};
- struct __next_fn
+ struct __next_fn final
{
template<input_or_output_iterator _It>
constexpr _It
@@ -846,11 +874,13 @@ namespace ranges
ranges::advance(__x, __n, __bound);
return __x;
}
+
+ void operator&() const = delete;
};
inline constexpr __next_fn next{};
- struct __prev_fn
+ struct __prev_fn final
{
template<bidirectional_iterator _It>
constexpr _It
@@ -875,6 +905,8 @@ namespace ranges
ranges::advance(__x, -__n, __bound);
return __x;
}
+
+ void operator&() const = delete;
};
inline constexpr __prev_fn prev{};
diff --git a/libstdc++-v3/include/bits/ranges_util.h b/libstdc++-v3/include/bits/ranges_util.h
index b73fc12..dd829ed 100644
--- a/libstdc++-v3/include/bits/ranges_util.h
+++ b/libstdc++-v3/include/bits/ranges_util.h
@@ -77,45 +77,67 @@ namespace ranges
return static_cast<const _Derived&>(*this);
}
+ static constexpr bool
+ _S_bool(bool) noexcept; // not defined
+
+ template<typename _Tp>
+ static constexpr bool
+ _S_empty(_Tp& __t)
+ noexcept(noexcept(_S_bool(ranges::begin(__t) == ranges::end(__t))))
+ { return ranges::begin(__t) == ranges::end(__t); }
+
+ template<typename _Tp>
+ static constexpr auto
+ _S_size(_Tp& __t)
+ noexcept(noexcept(ranges::end(__t) - ranges::begin(__t)))
+ { return ranges::end(__t) - ranges::begin(__t); }
+
public:
constexpr bool
- empty() requires forward_range<_Derived>
- { return ranges::begin(_M_derived()) == ranges::end(_M_derived()); }
+ empty()
+ noexcept(noexcept(_S_empty(_M_derived())))
+ requires forward_range<_Derived>
+ { return _S_empty(_M_derived()); }
constexpr bool
- empty() const requires forward_range<const _Derived>
- { return ranges::begin(_M_derived()) == ranges::end(_M_derived()); }
+ empty() const
+ noexcept(noexcept(_S_empty(_M_derived())))
+ requires forward_range<const _Derived>
+ { return _S_empty(_M_derived()); }
constexpr explicit
- operator bool() requires requires { ranges::empty(_M_derived()); }
+ operator bool() noexcept(noexcept(ranges::empty(_M_derived())))
+ requires requires { ranges::empty(_M_derived()); }
{ return !ranges::empty(_M_derived()); }
constexpr explicit
- operator bool() const requires requires { ranges::empty(_M_derived()); }
+ operator bool() const noexcept(noexcept(ranges::empty(_M_derived())))
+ requires requires { ranges::empty(_M_derived()); }
{ return !ranges::empty(_M_derived()); }
constexpr auto
- data() requires contiguous_iterator<iterator_t<_Derived>>
- { return to_address(ranges::begin(_M_derived())); }
+ data() noexcept(noexcept(ranges::begin(_M_derived())))
+ requires contiguous_iterator<iterator_t<_Derived>>
+ { return std::to_address(ranges::begin(_M_derived())); }
constexpr auto
- data() const
+ data() const noexcept(noexcept(ranges::begin(_M_derived())))
requires range<const _Derived>
&& contiguous_iterator<iterator_t<const _Derived>>
- { return to_address(ranges::begin(_M_derived())); }
+ { return std::to_address(ranges::begin(_M_derived())); }
constexpr auto
- size()
+ size() noexcept(noexcept(_S_size(_M_derived())))
requires forward_range<_Derived>
&& sized_sentinel_for<sentinel_t<_Derived>, iterator_t<_Derived>>
- { return ranges::end(_M_derived()) - ranges::begin(_M_derived()); }
+ { return _S_size(_M_derived()); }
constexpr auto
- size() const
+ size() const noexcept(noexcept(_S_size(_M_derived())))
requires forward_range<const _Derived>
&& sized_sentinel_for<sentinel_t<const _Derived>,
iterator_t<const _Derived>>
- { return ranges::end(_M_derived()) - ranges::begin(_M_derived()); }
+ { return _S_size(_M_derived()); }
constexpr decltype(auto)
front() requires forward_range<_Derived>
@@ -205,33 +227,38 @@ namespace ranges
_It _M_begin = _It();
[[no_unique_address]] _Sent _M_end = _Sent();
+ using __size_type
+ = __detail::__make_unsigned_like_t<iter_difference_t<_It>>;
+
template<typename, bool = _S_store_size>
struct _Size
{ };
template<typename _Tp>
struct _Size<_Tp, true>
- { __detail::__make_unsigned_like_t<_Tp> _M_size; };
+ { _Tp _M_size; };
- [[no_unique_address]] _Size<iter_difference_t<_It>> _M_size = {};
+ [[no_unique_address]] _Size<__size_type> _M_size = {};
public:
subrange() = default;
constexpr
subrange(__detail::__convertible_to_non_slicing<_It> auto __i, _Sent __s)
+ noexcept(is_nothrow_constructible_v<_It, decltype(__i)>
+ && is_nothrow_constructible_v<_Sent, _Sent&>)
requires (!_S_store_size)
: _M_begin(std::move(__i)), _M_end(__s)
{ }
constexpr
subrange(__detail::__convertible_to_non_slicing<_It> auto __i, _Sent __s,
- __detail::__make_unsigned_like_t<iter_difference_t<_It>> __n)
+ __size_type __n)
+ noexcept(is_nothrow_constructible_v<_It, decltype(__i)>
+ && is_nothrow_constructible_v<_Sent, _Sent&>)
requires (_Kind == subrange_kind::sized)
: _M_begin(std::move(__i)), _M_end(__s)
{
- using __detail::__to_unsigned_like;
- __glibcxx_assert(__n == __to_unsigned_like(ranges::distance(__i, __s)));
if constexpr (_S_store_size)
_M_size._M_size = __n;
}
@@ -241,7 +268,9 @@ namespace ranges
&& __detail::__convertible_to_non_slicing<iterator_t<_Rng>, _It>
&& convertible_to<sentinel_t<_Rng>, _Sent>
constexpr
- subrange(_Rng&& __r) requires _S_store_size && sized_range<_Rng>
+ subrange(_Rng&& __r)
+ noexcept(noexcept(subrange(__r, ranges::size(__r))))
+ requires _S_store_size && sized_range<_Rng>
: subrange(__r, ranges::size(__r))
{ }
@@ -250,7 +279,9 @@ namespace ranges
&& __detail::__convertible_to_non_slicing<iterator_t<_Rng>, _It>
&& convertible_to<sentinel_t<_Rng>, _Sent>
constexpr
- subrange(_Rng&& __r) requires (!_S_store_size)
+ subrange(_Rng&& __r)
+ noexcept(noexcept(subrange(ranges::begin(__r), ranges::end(__r))))
+ requires (!_S_store_size)
: subrange(ranges::begin(__r), ranges::end(__r))
{ }
@@ -258,8 +289,8 @@ namespace ranges
requires __detail::__convertible_to_non_slicing<iterator_t<_Rng>, _It>
&& convertible_to<sentinel_t<_Rng>, _Sent>
constexpr
- subrange(_Rng&& __r,
- __detail::__make_unsigned_like_t<iter_difference_t<_It>> __n)
+ subrange(_Rng&& __r, __size_type __n)
+ noexcept(noexcept(subrange(ranges::begin(__r), ranges::end(__r), __n)))
requires (_Kind == subrange_kind::sized)
: subrange{ranges::begin(__r), ranges::end(__r), __n}
{ }
@@ -267,9 +298,9 @@ namespace ranges
template<__detail::__not_same_as<subrange> _PairLike>
requires __detail::__pair_like_convertible_from<_PairLike, const _It&,
const _Sent&>
- constexpr
- operator _PairLike() const
- { return _PairLike(_M_begin, _M_end); }
+ constexpr
+ operator _PairLike() const
+ { return _PairLike(_M_begin, _M_end); }
constexpr _It
begin() const requires copyable<_It>
@@ -283,7 +314,7 @@ namespace ranges
constexpr bool empty() const { return _M_begin == _M_end; }
- constexpr __detail::__make_unsigned_like_t<iter_difference_t<_It>>
+ constexpr __size_type
size() const requires (_Kind == subrange_kind::sized)
{
if constexpr (_S_store_size)
diff --git a/libstdc++-v3/include/std/ranges b/libstdc++-v3/include/std/ranges
index 220a44e..b294349 100644
--- a/libstdc++-v3/include/std/ranges
+++ b/libstdc++-v3/include/std/ranges
@@ -197,11 +197,13 @@ namespace ranges
constexpr explicit
single_view(const _Tp& __t)
+ noexcept(is_nothrow_copy_constructible_v<_Tp>)
: _M_value(__t)
{ }
constexpr explicit
single_view(_Tp&& __t)
+ noexcept(is_nothrow_move_constructible_v<_Tp>)
: _M_value(std::move(__t))
{ }
@@ -211,6 +213,7 @@ namespace ranges
requires constructible_from<_Tp, _Args...>
constexpr explicit
single_view(in_place_t, _Args&&... __args)
+ noexcept(is_nothrow_constructible_v<_Tp, _Args...>)
: _M_value{in_place, std::forward<_Args>(__args)...}
{ }
@@ -604,6 +607,7 @@ namespace views
template<typename _Tp>
constexpr auto
operator()(_Tp&& __e) const
+ noexcept(noexcept(single_view<decay_t<_Tp>>(std::forward<_Tp>(__e))))
{ return single_view<decay_t<_Tp>>(std::forward<_Tp>(__e)); }
};
@@ -1022,6 +1026,7 @@ namespace views::__adaptor
&& requires { _S_fun(declval<_Tp>()); }
constexpr
ref_view(_Tp&& __t)
+ noexcept(noexcept(static_cast<_Range&>(std::declval<_Tp>())))
: _M_r(std::__addressof(static_cast<_Range&>(std::forward<_Tp>(__t))))
{ }
@@ -1069,12 +1074,25 @@ namespace views::__adaptor
struct _All : __adaptor::_RangeAdaptorClosure
{
+ template<typename _Range>
+ static constexpr bool
+ _S_noexcept()
+ {
+ if constexpr (view<decay_t<_Range>>)
+ return is_nothrow_constructible_v<decay_t<_Range>, _Range>;
+ else if constexpr (__detail::__can_ref_view<_Range>)
+ return true;
+ else
+ return noexcept(subrange{std::declval<_Range>()});
+ }
+
template<viewable_range _Range>
requires view<decay_t<_Range>>
|| __detail::__can_ref_view<_Range>
|| __detail::__can_subrange<_Range>
constexpr auto
operator()(_Range&& __r) const
+ noexcept(_S_noexcept<_Range>())
{
if constexpr (view<decay_t<_Range>>)
return std::forward<_Range>(__r);
diff --git a/libstdc++-v3/testsuite/std/ranges/adaptors/all.cc b/libstdc++-v3/testsuite/std/ranges/adaptors/all.cc
index 42913ad..9a6a31e 100644
--- a/libstdc++-v3/testsuite/std/ranges/adaptors/all.cc
+++ b/libstdc++-v3/testsuite/std/ranges/adaptors/all.cc
@@ -130,6 +130,35 @@ test05()
static_assert(!requires { 0 | all; });
}
+template<bool B1, bool B2>
+struct BorrowedRange
+{
+ int* ptr = nullptr;
+
+ BorrowedRange(int (&arr)[3]) noexcept : ptr(arr) { }
+
+ int* begin() const noexcept(B1) { return ptr; }
+ int* end() const noexcept(B2) { return ptr + 3; }
+};
+
+template<bool B1, bool B2>
+const bool std::ranges::enable_borrowed_range<BorrowedRange<B1, B2>> = true;
+
+void
+test06()
+{
+ int x[] { 1, 2, 3 };
+
+ // Using ref_view:
+ static_assert(noexcept(views::all(x)));
+
+ // Using subrange:
+ static_assert(noexcept(views::all(BorrowedRange<true, true>(x))));
+ static_assert(!noexcept(views::all(BorrowedRange<true, false>(x))));
+ static_assert(!noexcept(views::all(BorrowedRange<false, true>(x))));
+ static_assert(!noexcept(views::all(BorrowedRange<false, false>(x))));
+}
+
int
main()
{
@@ -138,4 +167,5 @@ main()
static_assert(test03());
static_assert(test04());
test05();
+ test06();
}
diff --git a/libstdc++-v3/testsuite/std/ranges/headers/ranges/synopsis.cc b/libstdc++-v3/testsuite/std/ranges/headers/ranges/synopsis.cc
index 115b157..ea26b50 100644
--- a/libstdc++-v3/testsuite/std/ranges/headers/ranges/synopsis.cc
+++ b/libstdc++-v3/testsuite/std/ranges/headers/ranges/synopsis.cc
@@ -33,12 +33,22 @@ namespace __gnu_test
{
constexpr const bool* disable_sized_range
= &std::ranges::disable_sized_range<void>;
- constexpr auto* begin = &std::ranges::begin;
- constexpr auto* end = &std::ranges::end;
- constexpr auto* cbegin = &std::ranges::cbegin;
- constexpr auto* cend = &std::ranges::cend;
- constexpr auto* rbegin = &std::ranges::rbegin;
- constexpr auto* rend = &std::ranges::rend;
- constexpr auto* crbegin = &std::ranges::crbegin;
- constexpr auto* crend = &std::ranges::crend;
+ using std::ranges::begin;
+ using std::ranges::end;
+ using std::ranges::cbegin;
+ using std::ranges::cend;
+ using std::ranges::rbegin;
+ using std::ranges::rend;
+ using std::ranges::crbegin;
+ using std::ranges::crend;
+ using std::ranges::size;
+ using std::ranges::ssize;
+ using std::ranges::empty;
+ using std::ranges::data;
+ using std::ranges::cdata;
+
+ using std::ranges::advance;
+ using std::ranges::distance;
+ using std::ranges::next;
+ using std::ranges::prev;
}
diff --git a/libstdc++-v3/testsuite/std/ranges/single_view.cc b/libstdc++-v3/testsuite/std/ranges/single_view.cc
index f530cc0..c036fc89 100644
--- a/libstdc++-v3/testsuite/std/ranges/single_view.cc
+++ b/libstdc++-v3/testsuite/std/ranges/single_view.cc
@@ -73,10 +73,34 @@ test04()
std::as_const(s).data();
}
+void
+test05()
+{
+ int i = 0;
+ static_assert(noexcept(std::ranges::single_view<int>()));
+ static_assert(noexcept(std::ranges::single_view<int>(i)));
+ static_assert(noexcept(std::ranges::single_view<int>(1)));
+ static_assert(noexcept(std::ranges::single_view<int>(std::in_place, 2)));
+ static_assert(noexcept(std::ranges::views::single(i)));
+ auto s = std::ranges::views::single(i);
+ static_assert(noexcept(s.begin()));
+ static_assert(noexcept(s.end()));
+ static_assert(noexcept(s.size()));
+ static_assert(noexcept(s.data()));
+ static_assert(noexcept(s.empty())); // view_interface::empty()
+ const auto cs = s;
+ static_assert(noexcept(cs.begin()));
+ static_assert(noexcept(cs.end()));
+ static_assert(noexcept(cs.size()));
+ static_assert(noexcept(cs.data()));
+ static_assert(noexcept(cs.empty())); // view_interface::empty()
+}
+
int main()
{
test01();
test02();
test03();
test04();
+ test05();
}
diff --git a/libstdc++-v3/testsuite/std/ranges/subrange/constexpr.cc b/libstdc++-v3/testsuite/std/ranges/subrange/constexpr.cc
new file mode 100644
index 0000000..f5bc52b
--- /dev/null
+++ b/libstdc++-v3/testsuite/std/ranges/subrange/constexpr.cc
@@ -0,0 +1,26 @@
+// { dg-options "-std=gnu++20" }
+// { dg-do compile { target c++20 } }
+
+#include <ranges>
+
+struct iterator
+{
+ using difference_type = int;
+
+ int i;
+
+ int operator*() const { return i; }
+
+ // These are intentionally not constexpr:
+ iterator& operator++() { ++i; return *this; }
+ iterator operator++(int) { return {i++}; }
+ bool operator==(const iterator& it) const { return i == it.i; }
+};
+
+constexpr iterator begin(1), end(2);
+
+using std::ranges::subrange;
+using std::ranges::subrange_kind;
+
+// This used to fail due to using operator++ and operator== in an assertion:
+constexpr subrange<iterator, iterator, subrange_kind::sized> s(begin, end, 1);