aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Liska <mliska@suse.cz>2021-06-22 09:47:42 +0200
committerMartin Liska <mliska@suse.cz>2021-06-22 09:47:42 +0200
commit899e9ed59760a728715d698c7aa4632fab226dff (patch)
tree26db1e27b8e811a4a3d567a72663175bc7b274cd
parent86e9a5c431d1af7ca07356a7763d806ab6368bad (diff)
parent8819c82ce814a6911e2c1bfebd60b1c2366a3805 (diff)
downloadgcc-899e9ed59760a728715d698c7aa4632fab226dff.zip
gcc-899e9ed59760a728715d698c7aa4632fab226dff.tar.gz
gcc-899e9ed59760a728715d698c7aa4632fab226dff.tar.bz2
Merge branch 'master' into devel/sphinx
-rw-r--r--ChangeLog5
-rw-r--r--contrib/ChangeLog11
-rwxr-xr-xcontrib/mklog.py38
-rwxr-xr-xcontrib/test_mklog.py3
-rw-r--r--gcc/ChangeLog88
-rw-r--r--gcc/DATESTAMP2
-rw-r--r--gcc/ada/ChangeLog353
-rw-r--r--gcc/ada/Make-generated.in13
-rw-r--r--gcc/ada/Makefile.rtl17
-rw-r--r--gcc/ada/checks.adb50
-rw-r--r--gcc/ada/debug.adb5
-rw-r--r--gcc/ada/doc/gnat_rm/implementation_defined_attributes.rst9
-rw-r--r--gcc/ada/doc/gnat_rm/implementation_defined_pragmas.rst17
-rw-r--r--gcc/ada/doc/gnat_rm/representation_clauses_and_pragmas.rst2
-rw-r--r--gcc/ada/einfo.ads5
-rw-r--r--gcc/ada/err_vars.ads2
-rw-r--r--gcc/ada/errout.adb15
-rw-r--r--gcc/ada/errout.ads7
-rw-r--r--gcc/ada/exp_attr.adb18
-rw-r--r--gcc/ada/exp_ch11.adb18
-rw-r--r--gcc/ada/exp_ch11.ads1
-rw-r--r--gcc/ada/exp_ch5.adb273
-rw-r--r--gcc/ada/exp_ch5.ads1
-rw-r--r--gcc/ada/exp_ch6.adb18
-rw-r--r--gcc/ada/exp_ch6.ads1
-rw-r--r--gcc/ada/exp_ch9.adb6
-rw-r--r--gcc/ada/exp_dbug.adb2
-rw-r--r--gcc/ada/exp_dist.adb6
-rw-r--r--gcc/ada/exp_imgv.adb106
-rw-r--r--gcc/ada/exp_imgv.ads4
-rw-r--r--gcc/ada/exp_put_image.adb59
-rw-r--r--gcc/ada/exp_put_image.ads13
-rw-r--r--gcc/ada/exp_util.adb13
-rw-r--r--gcc/ada/expander.adb9
-rw-r--r--gcc/ada/fe.h2
-rw-r--r--gcc/ada/gen_il-fields.ads2
-rw-r--r--gcc/ada/gen_il-gen-gen_entities.adb2
-rw-r--r--gcc/ada/gen_il-gen-gen_nodes.adb16
-rw-r--r--gcc/ada/gen_il-gen.adb1123
-rw-r--r--gcc/ada/gen_il-internals.adb57
-rw-r--r--gcc/ada/gen_il-internals.ads9
-rw-r--r--gcc/ada/gen_il-types.ads3
-rw-r--r--gcc/ada/gen_il.adb73
-rw-r--r--gcc/ada/gen_il.ads27
-rw-r--r--gcc/ada/gnat1drv.adb6
-rw-r--r--gcc/ada/gnat_rm.texi906
-rw-r--r--gcc/ada/hostparm.ads5
-rw-r--r--gcc/ada/impunit.adb14
-rw-r--r--gcc/ada/libgnarl/s-putaim.adb7
-rw-r--r--gcc/ada/libgnarl/s-putaim.ads4
-rw-r--r--gcc/ada/libgnat/a-cbdlli.adb2
-rw-r--r--gcc/ada/libgnat/a-cbdlli.ads4
-rw-r--r--gcc/ada/libgnat/a-cbhama.adb2
-rw-r--r--gcc/ada/libgnat/a-cbhama.ads4
-rw-r--r--gcc/ada/libgnat/a-cbhase.adb2
-rw-r--r--gcc/ada/libgnat/a-cbhase.ads4
-rw-r--r--gcc/ada/libgnat/a-cbmutr.adb2
-rw-r--r--gcc/ada/libgnat/a-cbmutr.ads4
-rw-r--r--gcc/ada/libgnat/a-cborma.adb2
-rw-r--r--gcc/ada/libgnat/a-cborma.ads4
-rw-r--r--gcc/ada/libgnat/a-cborse.adb2
-rw-r--r--gcc/ada/libgnat/a-cborse.ads4
-rw-r--r--gcc/ada/libgnat/a-cdlili.adb2
-rw-r--r--gcc/ada/libgnat/a-cdlili.ads4
-rw-r--r--gcc/ada/libgnat/a-cidlli.adb2
-rw-r--r--gcc/ada/libgnat/a-cidlli.ads4
-rw-r--r--gcc/ada/libgnat/a-cihama.adb2
-rw-r--r--gcc/ada/libgnat/a-cihama.ads4
-rw-r--r--gcc/ada/libgnat/a-cihase.adb2
-rw-r--r--gcc/ada/libgnat/a-cihase.ads4
-rw-r--r--gcc/ada/libgnat/a-cimutr.adb2
-rw-r--r--gcc/ada/libgnat/a-cimutr.ads4
-rw-r--r--gcc/ada/libgnat/a-ciorma.adb2
-rw-r--r--gcc/ada/libgnat/a-ciorma.ads4
-rw-r--r--gcc/ada/libgnat/a-ciormu.adb2
-rw-r--r--gcc/ada/libgnat/a-ciormu.ads4
-rw-r--r--gcc/ada/libgnat/a-ciorse.adb2
-rw-r--r--gcc/ada/libgnat/a-ciorse.ads4
-rw-r--r--gcc/ada/libgnat/a-coboho.adb2
-rw-r--r--gcc/ada/libgnat/a-coboho.ads4
-rw-r--r--gcc/ada/libgnat/a-cobove.adb2
-rw-r--r--gcc/ada/libgnat/a-cobove.ads4
-rw-r--r--gcc/ada/libgnat/a-cohama.adb2
-rw-r--r--gcc/ada/libgnat/a-cohama.ads4
-rw-r--r--gcc/ada/libgnat/a-cohase.adb2
-rw-r--r--gcc/ada/libgnat/a-cohase.ads4
-rw-r--r--gcc/ada/libgnat/a-coinho.adb2
-rw-r--r--gcc/ada/libgnat/a-coinho.ads4
-rw-r--r--gcc/ada/libgnat/a-coinho__shared.adb2
-rw-r--r--gcc/ada/libgnat/a-coinho__shared.ads4
-rw-r--r--gcc/ada/libgnat/a-coinve.adb2
-rw-r--r--gcc/ada/libgnat/a-coinve.ads4
-rw-r--r--gcc/ada/libgnat/a-comutr.adb2
-rw-r--r--gcc/ada/libgnat/a-comutr.ads4
-rw-r--r--gcc/ada/libgnat/a-convec.adb2
-rw-r--r--gcc/ada/libgnat/a-convec.ads4
-rw-r--r--gcc/ada/libgnat/a-coorma.adb2
-rw-r--r--gcc/ada/libgnat/a-coorma.ads4
-rw-r--r--gcc/ada/libgnat/a-coormu.adb2
-rw-r--r--gcc/ada/libgnat/a-coormu.ads4
-rw-r--r--gcc/ada/libgnat/a-coorse.adb2
-rw-r--r--gcc/ada/libgnat/a-coorse.ads4
-rw-r--r--gcc/ada/libgnat/a-nbnbin.adb5
-rw-r--r--gcc/ada/libgnat/a-nbnbin.ads4
-rw-r--r--gcc/ada/libgnat/a-nbnbin__gmp.adb5
-rw-r--r--gcc/ada/libgnat/a-nbnbre.adb5
-rw-r--r--gcc/ada/libgnat/a-nbnbre.ads4
-rw-r--r--gcc/ada/libgnat/a-stbubo.adb147
-rw-r--r--gcc/ada/libgnat/a-stbubo.ads73
-rw-r--r--gcc/ada/libgnat/a-stbufi.adb82
-rw-r--r--gcc/ada/libgnat/a-stbufi.ads75
-rw-r--r--gcc/ada/libgnat/a-stbufo.adb158
-rw-r--r--gcc/ada/libgnat/a-stbufo.ads73
-rw-r--r--gcc/ada/libgnat/a-stbuun.adb193
-rw-r--r--gcc/ada/libgnat/a-stbuun.ads87
-rw-r--r--gcc/ada/libgnat/a-stbuut.adb81
-rw-r--r--gcc/ada/libgnat/a-stbuut.ads82
-rw-r--r--gcc/ada/libgnat/a-strunb.adb3
-rw-r--r--gcc/ada/libgnat/a-strunb.ads5
-rw-r--r--gcc/ada/libgnat/a-strunb__shared.adb3
-rw-r--r--gcc/ada/libgnat/a-strunb__shared.ads5
-rw-r--r--gcc/ada/libgnat/a-sttebu.adb121
-rw-r--r--gcc/ada/libgnat/a-sttebu.ads135
-rw-r--r--gcc/ada/libgnat/a-stteou__bootstrap.ads190
-rw-r--r--gcc/ada/libgnat/s-bitfie.ads15
-rw-r--r--gcc/ada/libgnat/s-bituti.adb39
-rw-r--r--gcc/ada/libgnat/s-bituti.ads20
-rw-r--r--gcc/ada/libgnat/s-putima.adb16
-rw-r--r--gcc/ada/libgnat/s-putima.ads4
-rw-r--r--gcc/ada/libgnat/s-rannum.adb10
-rw-r--r--gcc/ada/libgnat/s-rannum.ads8
-rw-r--r--gcc/ada/libgnat/s-vaen16.ads11
-rw-r--r--gcc/ada/libgnat/s-vaen32.ads9
-rw-r--r--gcc/ada/libgnat/s-vaenu8.ads11
-rw-r--r--gcc/ada/libgnat/s-valuen.adb98
-rw-r--r--gcc/ada/libgnat/s-valuen.ads26
-rw-r--r--gcc/ada/libgnat/s-valuti.adb4
-rw-r--r--gcc/ada/libgnat/s-valuti.ads4
-rw-r--r--gcc/ada/opt.ads5
-rw-r--r--gcc/ada/par-ch11.adb18
-rw-r--r--gcc/ada/par-ch12.adb23
-rw-r--r--gcc/ada/par-ch5.adb53
-rw-r--r--gcc/ada/par-ch6.adb103
-rw-r--r--gcc/ada/par-util.adb29
-rw-r--r--gcc/ada/par.adb12
-rw-r--r--gcc/ada/repinfo.adb6
-rw-r--r--gcc/ada/rtsfind.adb11
-rw-r--r--gcc/ada/rtsfind.ads66
-rw-r--r--gcc/ada/sem.adb9
-rw-r--r--gcc/ada/sem_attr.adb57
-rw-r--r--gcc/ada/sem_ch10.adb2
-rw-r--r--gcc/ada/sem_ch11.adb12
-rw-r--r--gcc/ada/sem_ch11.ads1
-rw-r--r--gcc/ada/sem_ch12.adb452
-rw-r--r--gcc/ada/sem_ch13.adb6
-rw-r--r--gcc/ada/sem_ch3.adb2
-rw-r--r--gcc/ada/sem_ch5.adb12
-rw-r--r--gcc/ada/sem_ch5.ads1
-rw-r--r--gcc/ada/sem_ch6.adb12
-rw-r--r--gcc/ada/sem_ch6.ads1
-rw-r--r--gcc/ada/sem_util.adb107
-rw-r--r--gcc/ada/sem_util.ads26
-rw-r--r--gcc/ada/sinfo.ads1
-rw-r--r--gcc/ada/snames.ads-tmpl2
-rw-r--r--gcc/ada/sprint.adb27
-rw-r--r--gcc/ada/urealp.adb136
-rw-r--r--gcc/ada/urealp.ads4
-rw-r--r--gcc/auto-profile.c2
-rw-r--r--gcc/c/ChangeLog6
-rw-r--r--gcc/c/c-typeck.c11
-rw-r--r--gcc/cfgexpand.c43
-rw-r--r--gcc/config/arm/arm_neon.h44
-rw-r--r--gcc/config/arm/iterators.md2
-rw-r--r--gcc/config/arm/neon.md6
-rw-r--r--gcc/config/i386/i386-builtin.def48
-rw-r--r--gcc/config/i386/i386-expand.c5
-rw-r--r--gcc/config/i386/i386.c13
-rw-r--r--gcc/config/i386/i386.md56
-rw-r--r--gcc/config/i386/sse.md69
-rw-r--r--gcc/cp/ChangeLog18
-rw-r--r--gcc/cp/tree.c14
-rw-r--r--gcc/cp/typeck.c16
-rw-r--r--gcc/df-scan.c2
-rw-r--r--gcc/function.c16
-rw-r--r--gcc/gcov-io.h3
-rw-r--r--gcc/gimplify.c9
-rw-r--r--gcc/testsuite/ChangeLog45
-rw-r--r--gcc/testsuite/c-c++-common/pr100785.c21
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/nsdmi-virtual1a.C28
-rw-r--r--gcc/testsuite/g++.dg/opt/nrv21.C14
-rw-r--r--gcc/testsuite/g++.target/i386/empty-class1.C9
-rw-r--r--gcc/testsuite/gcc.dg/pr48552-1.c4
-rw-r--r--gcc/testsuite/gcc.dg/pr48552-2.c4
-rw-r--r--gcc/testsuite/gcc.target/arm/simd/pr97906.c13
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512bitalg-pr97770-1.c27
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512bw-pr100267-1.c38
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512bw-pr100267-b-2.c74
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512bw-pr100267-d-2.c74
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512bw-pr100267-q-2.c74
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512bw-pr100267-w-2.c74
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-pr100267-1.c66
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-pr100267-pd-2.c76
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-pr100267-ps-2.c72
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512vl-pr100267-1.c122
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512vl-pr100267-pd-2.c15
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512vl-pr100267-ps-2.c15
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512vlbw-pr100267-1.c66
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512vlbw-pr100267-b-2.c16
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512vlbw-pr100267-d-2.c15
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512vlbw-pr100267-q-2.c15
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512vlbw-pr100267-w-2.c16
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512vpopcntdq-pr97770-1.c9
-rw-r--r--gcc/testsuite/gcc.target/i386/pr100310.c12
-rw-r--r--gcc/testsuite/gcc.target/i386/pr11877.c16
-rw-r--r--gcc/testsuite/gcc.target/i386/spill_to_mask-1.c89
-rw-r--r--gcc/testsuite/gcc.target/i386/spill_to_mask-2.c11
-rw-r--r--gcc/testsuite/gcc.target/i386/spill_to_mask-3.c11
-rw-r--r--gcc/testsuite/gcc.target/i386/spill_to_mask-4.c11
-rw-r--r--gcc/testsuite/gfortran.dg/pr101121.f203
-rw-r--r--gcc/tree-vect-data-refs.c12
-rw-r--r--gcc/tree-vect-patterns.c112
-rw-r--r--gcc/tree-vect-slp.c49
-rw-r--r--gcc/tree-vect-stmts.c7
-rw-r--r--gcc/tree-vectorizer.h2
-rw-r--r--libstdc++-v3/ChangeLog15
-rw-r--r--libstdc++-v3/include/bits/ranges_cmp.h2
-rw-r--r--libstdc++-v3/include/std/mutex138
227 files changed, 6699 insertions, 1985 deletions
diff --git a/ChangeLog b/ChangeLog
index 5a88b74..61fc3e8 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2021-06-21 liuhongt <hongtao.liu@intel.com>
+
+ * MAINTAINERS: Add myself as maintainer of the i386 vector
+ extensions.
+
2021-06-18 Antoni Boucher <bouanto@zoho.com>
* MAINTAINERS (Write After Approval): Add myself.
diff --git a/contrib/ChangeLog b/contrib/ChangeLog
index 6d5a2e4..9b31022 100644
--- a/contrib/ChangeLog
+++ b/contrib/ChangeLog
@@ -1,3 +1,14 @@
+2021-06-21 Tobias Burnus <tobias@codesourcery.com>
+ Martin Sebor <msebor@redhat.com>
+
+ * mklog.py (bugzilla_url): Fetch also component.
+ (pr_filename_regex): New.
+ (get_pr_titles): Update PR string with correct format and component.
+ (generate_changelog): Take additional PRs; extract PR from the
+ filename.
+ (__main__): Add -b/--pr-numbers argument.
+ * test_mklog.py (EXPECTED4): Update to expect a PR for the new file.
+
2021-06-17 Jason Merrill <jason@redhat.com>
* mklog.py: Add an initial component: [PRnnnnn] line when
diff --git a/contrib/mklog.py b/contrib/mklog.py
index 1f59055..0b434f6 100755
--- a/contrib/mklog.py
+++ b/contrib/mklog.py
@@ -42,6 +42,7 @@ pr_regex = re.compile(r'(\/(\/|\*)|[Cc*!])\s+(?P<pr>PR [a-z+-]+\/[0-9]+)')
prnum_regex = re.compile(r'PR (?P<comp>[a-z+-]+)/(?P<num>[0-9]+)')
dr_regex = re.compile(r'(\/(\/|\*)|[Cc*!])\s+(?P<dr>DR [0-9]+)')
dg_regex = re.compile(r'{\s+dg-(error|warning)')
+pr_filename_regex = re.compile(r'(^|[\W_])[Pp][Rr](?P<pr>\d{4,})')
identifier_regex = re.compile(r'^([a-zA-Z0-9_#].*)')
comment_regex = re.compile(r'^\/\*')
struct_regex = re.compile(r'^(class|struct|union|enum)\s+'
@@ -52,7 +53,7 @@ fn_regex = re.compile(r'([a-zA-Z_][^()\s]*)\s*\([^*]')
template_and_param_regex = re.compile(r'<[^<>]*>')
md_def_regex = re.compile(r'\(define.*\s+"(.*)"')
bugzilla_url = 'https://gcc.gnu.org/bugzilla/rest.cgi/bug?id=%s&' \
- 'include_fields=summary'
+ 'include_fields=summary,component'
function_extensions = {'.c', '.cpp', '.C', '.cc', '.h', '.inc', '.def', '.md'}
@@ -118,20 +119,23 @@ def sort_changelog_files(changed_file):
def get_pr_titles(prs):
- output = ''
- for pr in prs:
+ output = []
+ for idx, pr in enumerate(prs):
pr_id = pr.split('/')[-1]
r = requests.get(bugzilla_url % pr_id)
bugs = r.json()['bugs']
if len(bugs) == 1:
- output += '%s - %s\n' % (pr, bugs[0]['summary'])
- print(output)
+ prs[idx] = 'PR %s/%s' % (bugs[0]['component'], pr_id)
+ out = '%s - %s\n' % (prs[idx], bugs[0]['summary'])
+ if out not in output:
+ output.append(out)
if output:
- output += '\n'
- return output
+ output.append('')
+ return '\n'.join(output)
-def generate_changelog(data, no_functions=False, fill_pr_titles=False):
+def generate_changelog(data, no_functions=False, fill_pr_titles=False,
+ additional_prs=None):
changelogs = {}
changelog_list = []
prs = []
@@ -139,6 +143,8 @@ def generate_changelog(data, no_functions=False, fill_pr_titles=False):
diff = PatchSet(data)
global firstpr
+ if additional_prs:
+ prs = [pr for pr in additional_prs if pr not in prs]
for file in diff:
# skip files that can't be parsed
if file.path == '/dev/null':
@@ -154,21 +160,32 @@ def generate_changelog(data, no_functions=False, fill_pr_titles=False):
# Only search first ten lines as later lines may
# contains commented code which a note that it
# has not been tested due to a certain PR or DR.
+ this_file_prs = []
for line in list(file)[0][0:10]:
m = pr_regex.search(line.value)
if m:
pr = m.group('pr')
if pr not in prs:
prs.append(pr)
+ this_file_prs.append(pr.split('/')[-1])
else:
m = dr_regex.search(line.value)
if m:
dr = m.group('dr')
if dr not in prs:
prs.append(dr)
+ this_file_prs.append(dr.split('/')[-1])
elif dg_regex.search(line.value):
# Found dg-warning/dg-error line
break
+ # PR number in the file name
+ fname = os.path.basename(file.path)
+ m = pr_filename_regex.search(fname)
+ if m:
+ pr = m.group('pr')
+ pr2 = 'PR ' + pr
+ if pr not in this_file_prs and pr2 not in prs:
+ prs.append(pr2)
if prs:
firstpr = prs[0]
@@ -286,6 +303,9 @@ if __name__ == '__main__':
parser = argparse.ArgumentParser(description=help_message)
parser.add_argument('input', nargs='?',
help='Patch file (or missing, read standard input)')
+ parser.add_argument('-b', '--pr-numbers', action='store',
+ type=lambda arg: arg.split(','), nargs="?",
+ help='Add the specified PRs (comma separated)')
parser.add_argument('-s', '--no-functions', action='store_true',
help='Do not generate function names in ChangeLogs')
parser.add_argument('-p', '--fill-up-bug-titles', action='store_true',
@@ -309,7 +329,7 @@ if __name__ == '__main__':
update_copyright(data)
else:
output = generate_changelog(data, args.no_functions,
- args.fill_up_bug_titles)
+ args.fill_up_bug_titles, args.pr_numbers)
if args.changelog:
lines = open(args.changelog).read().split('\n')
start = list(takewhile(lambda l: not l.startswith('#'), lines))
diff --git a/contrib/test_mklog.py b/contrib/test_mklog.py
index a0670da..f5e9ecd 100755
--- a/contrib/test_mklog.py
+++ b/contrib/test_mklog.py
@@ -240,6 +240,9 @@ index 4ad78c1f77b..6687b368038 100644
'''
EXPECTED4 = '''\
+
+ PR 50209
+
gcc/ChangeLog:
* ipa-icf.c:
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 4597e59..5e73922 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,91 @@
+2021-06-21 Jason Merrill <jason@redhat.com>
+
+ PR target/88529
+ * df-scan.c (df_ref_record): Check that regno < endregno.
+ * function.c (assign_parms, expand_function_end): Do nothing with a
+ TYPE_EMPTY_P result.
+
+2021-06-21 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/101120
+ * tree-vect-data-refs.c (bump_vector_ptr): Fold the
+ built increment.
+ * tree-vect-slp.c (vect_transform_slp_perm_load): Add
+ DR chain DCE capability.
+ * tree-vectorizer.h (vect_transform_slp_perm_load): Adjust.
+ * tree-vect-stmts.c (vectorizable_load): Remove unused
+ loads in the DR chain for SLP.
+
+2021-06-21 Jakub Jelinek <jakub@redhat.com>
+
+ PR inline-asm/100785
+ * gimplify.c (gimplify_asm_expr): Don't diagnose errors if
+ output or input operands were already error_mark_node.
+ * cfgexpand.c (expand_asm_stmt): If errors are emitted,
+ remove all inputs, outputs and clobbers from the asm and
+ set template to "".
+
+2021-06-21 prathamesh.kulkarni <prathamesh.kulkarni@linaro.org>
+
+ * config/arm/arm_neon.h (vceq_s8): Replace builtin with __a == __b.
+ (vceq_s16): Likewise.
+ (vceq_s32): Likewise.
+ (vceq_u8): Likewise.
+ (vceq_u16): Likewise.
+ (vceq_u32): Likewise.
+ (vceq_p8): Likewise.
+ (vceqq_s8): Likewise.
+ (vceqq_s16): Likewise.
+ (vceqq_s32): Likewise.
+ (vceqq_u8): Likewise.
+ (vceqq_u16): Likewise.
+ (vceqq_u32): Likewise.
+ (vceqq_p8): Likewise.
+ (vceq_f32): Gate __a == __b on __FAST_MATH__.
+ (vceqq_f32): Likewise.
+ (vceq_f16): Likewise.
+ (vceqq_f16): Likewise.
+
+2021-06-21 prathamesh.kulkarni <prathamesh.kulkarni@linaro.org>
+
+ PR target/97906
+ * config/arm/iterators.md (NEON_VACMP): Remove.
+ * config/arm/neon.md (neon_vca<cmp_op><mode>): Use GLTE instead of GTGE
+ iterator.
+ (neon_vca<cmp_op><mode>_insn): Likewise.
+ (neon_vca<cmp_op_unsp><mode>_insn_unspec): Use NEON_VAGLTE instead of
+ NEON_VACMP.
+
+2021-06-21 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/101121
+ * tree-vect-slp.c (vect_build_slp_tree_2): To not fail fatally
+ when we just lack a stmt with the desired op when doing permutation.
+ (vect_build_slp_tree): When caching a failed SLP build attempt
+ assert that at least one lane is marked as not matching.
+
+2021-06-21 liuhongt <hongtao.liu@intel.com>
+
+ PR target/101142
+ * config/i386/i386.md: (*anddi_1): Disparage slightly the mask
+ register alternative.
+ (*and<mode>_1): Ditto.
+ (*andqi_1): Ditto.
+ (*andn<mode>_1): Ditto.
+ (*<code><mode>_1): Ditto.
+ (*<code>qi_1): Ditto.
+ (*one_cmpl<mode>2_1): Ditto.
+ (*one_cmplsi2_1_zext): Ditto.
+ (*one_cmplqi2_1): Ditto.
+ * config/i386/i386.c (x86_order_regs_for_local_alloc): Change
+ the order of mask registers to be before general registers.
+
+2021-06-21 Roger Sayle <roger@nextmovesoftware.com>
+
+ PR target/11877
+ * config/i386/i386.md: New define_peephole2s to shrink writing
+ 1, 2 or 4 consecutive zeros to memory when optimizing for size.
+
2021-06-18 Jeff Law <jeffreyalaw@gmail.com>
* config/h8300/h8300.c (h8300_select_cc_mode): Handle SYMBOL_REF.
diff --git a/gcc/DATESTAMP b/gcc/DATESTAMP
index 8abc411..bb14796 100644
--- a/gcc/DATESTAMP
+++ b/gcc/DATESTAMP
@@ -1 +1 @@
-20210621
+20210622
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog
index baf0dbd..11001cd 100644
--- a/gcc/ada/ChangeLog
+++ b/gcc/ada/ChangeLog
@@ -1,3 +1,356 @@
+2021-06-21 Gary Dismukes <dismukes@adacore.com>
+
+ * checks.adb (Selected_Range_Checks): In the case of a
+ qualified_expression where the qualifying subtype is an
+ unconstrained array subtype with fixed lower bounds for some of
+ its indexes, generate tests to check that those bounds are equal
+ to the corresponding lower bounds of the qualified array object.
+
+2021-06-21 Bob Duff <duff@adacore.com>
+
+ * libgnat/s-valuen.ads (Value_Enumeration,
+ Valid_Enumeration_Value): Inline.
+ (Value_Enumeration_Pos): Add Pure_Function.
+
+2021-06-21 Justin Squirek <squirek@adacore.com>
+
+ * doc/gnat_rm/implementation_defined_pragmas.rst: Document new
+ feature under pragma Extensions_Allowed.
+ * gnat_rm.texi: Regenerate.
+ * errout.adb, errout.ads (Error_Msg_GNAT_Extension): Created to
+ issue errors when parsing extension only constructs.
+ * exp_ch11.adb, exp_ch11.ads (Expand_N_Raise_When_Statement):
+ Created to expand raise ... when constucts.
+ * exp_ch5.adb, exp_ch5.ads (Expand_N_Goto_When_Statement):
+ Created to expand goto ... when constructs.
+ * exp_ch6.adb, exp_ch6.ads (Expand_N_Return_When_Statement):
+ Created to expand return ... when constructs.
+ * expander.adb (Expand): Add case entries for "when" constructs.
+ * gen_il-gen-gen_nodes.adb, gen_il-types.ads: Add entries for
+ "when" constructs.
+ * par-ch11.adb (P_Raise_Statement): Add processing for raise ...
+ when.
+ * par-ch5.adb (Missing_Semicolon_On_Exit): Renamed to
+ Missing_Semicolon_On_When and moved to par-util.adb.
+ * par-ch6.adb (Get_Return_Kind): Renamed from Is_Simple and
+ processing added for "return ... when" return kind.
+ (Is_Simple): Renamed to Get_Return_Kind.
+ (P_Return_Statement): Add case for return ... when variant of
+ return statement.
+ * par-util.adb, par.adb (Missing_Semicolon_On_When): Added to
+ centeralize parsing of "when" keywords in the context of "when"
+ constructs.
+ * sem.adb (Analyze): Add case for "when" constructs.
+ * sem_ch11.adb, sem_ch11.ads (Analyze_Raise_When_Statement):
+ Created to analyze raise ... when constructs.
+ * sem_ch5.adb, sem_ch5.ads (Analyzed_Goto_When_Statement):
+ Created to analyze goto ... when constructs.
+ * sem_ch6.adb, sem_ch6.ads (Analyze_Return_When_Statement):
+ Created to analyze return ... when constructs.
+ * sprint.adb (Sprint_Node_Actual): Add entries for new "when"
+ nodes.
+
+2021-06-21 Steve Baird <baird@adacore.com>
+
+ * Make-generated.in (GEN_IL_FLAGS): Keep only GNAT flags.
+ (ada/stamp-gen_il): Remove dependencies on libgnat/ sources. Do not
+ copy libgnat/ sources locally and tidy up.
+ * Makefile.rtl: Include object files for new Text_Buffer units
+ in the GNATRTL_NONTASKING_OBJS list.
+ * exp_put_image.ads, exp_put_image.adb: Update Rtsfind calls to
+ match new specs. For example, calls to RE_Sink are replaced with
+ calls to RE_Root_Buffer_Type. Update comments and change
+ subprogram names accordingly (e.g., Preload_Sink is changed to
+ Preload_Root_Buffer_Type).
+ * impunit.adb: Add 6 new predefined units (Text_Buffers and 5
+ child units thereof).
+ * rtsfind.ads, rtsfind.adb: Add interfaces for accessing the
+ Ada.Strings.Text_Buffers package and declarations
+ therein (including the Unbounded child unit). Do not (yet)
+ delete interfaces for accessing the old Text_Output package.
+ * sem_attr.adb (Check_Put_Image_Attribute): Replace RE_Sink uses
+ with RE_Root_Buffer_Type and update comments accordingly.
+ * sem_ch10.adb (Analyze_Compilation_Unit): Update call to
+ reflect name change of callee (that is, the former Preload_Sink
+ is now Preload_Root_Buffer_Type).
+ * sem_ch13.adb (Has_Good_Profile): Replace RE_Sink use with
+ RE_Root_Buffer_Type.
+ (Build_Spec): Update comment describing a parameter type.
+ * gen_il.ads: Remove clauses for the old Text_Output package and
+ add them for Ada.Streams.Stream_IO.
+ (Sink): Declare.
+ (Create_File): Likewise.
+ (Increase_Indent): Likewise.
+ (Decrease_Indent): Likewise.
+ (Put): Likewise.
+ (LF): Likewise.
+ * gen_il.adb: Add clauses for Ada.Streams.Stream_IO.
+ (Create_File): New procedure.
+ (Increase_Indent): Likewise.
+ (Decrease_Indent): Likewise.
+ (Put): New procedures.
+ * gen_il-gen.adb: Add clauses for Ada.Text_IO. Replace
+ Sink'Class with Sink throughout. Use string concatenation and
+ LF marker instead of formatted strings and "\n" marker. Update
+ Indent/Outdent calls to use new Increase_Indent/Decrease_Indent
+ names.
+ (Put_Membership_Query_Decl): Remove.
+ * gen_il-internals.ads: Replace Sink'Class with Sink throughout.
+ (Ptypes): Remove.
+ (Pfields): Likewise.
+ * gen_il-internals.adb: Remove clauses for GNAT.OS_Lib and
+ Ada.Strings.Text_Buffers.Files. Replace Sink'Class with Sink
+ throughout. Use string concatenation and LF marker instead of
+ formatted strings and "\n" marker.
+ (Stdout): Remove.
+ (Ptypes): Likewise.
+ (Pfields): Likewise.
+ * libgnarl/s-putaim.ads: Modify context clause, update
+ declaration of subtype Sink to refer to
+ Text_Buffers.Root_Buffer_Type instead of the old
+ Text_Output.Sink type.
+ * libgnarl/s-putaim.adb: Modify context clause and add use
+ clause to refer to Text_Buffers package.
+ * libgnat/a-cbdlli.ads, libgnat/a-cbdlli.adb,
+ libgnat/a-cbhama.ads, libgnat/a-cbhama.adb,
+ libgnat/a-cbhase.ads, libgnat/a-cbhase.adb,
+ libgnat/a-cbmutr.ads, libgnat/a-cbmutr.adb,
+ libgnat/a-cborma.ads, libgnat/a-cborma.adb,
+ libgnat/a-cborse.ads, libgnat/a-cborse.adb,
+ libgnat/a-cdlili.ads, libgnat/a-cdlili.adb,
+ libgnat/a-cidlli.ads, libgnat/a-cidlli.adb,
+ libgnat/a-cihama.ads, libgnat/a-cihama.adb,
+ libgnat/a-cihase.ads, libgnat/a-cihase.adb,
+ libgnat/a-cimutr.ads, libgnat/a-cimutr.adb,
+ libgnat/a-ciorma.ads, libgnat/a-ciorma.adb,
+ libgnat/a-ciormu.ads, libgnat/a-ciormu.adb,
+ libgnat/a-ciorse.ads, libgnat/a-ciorse.adb,
+ libgnat/a-coboho.ads, libgnat/a-coboho.adb,
+ libgnat/a-cobove.ads, libgnat/a-cobove.adb,
+ libgnat/a-cohama.ads, libgnat/a-cohama.adb,
+ libgnat/a-cohase.ads, libgnat/a-cohase.adb,
+ libgnat/a-coinho.ads, libgnat/a-coinho.adb,
+ libgnat/a-coinho__shared.ads, libgnat/a-coinho__shared.adb,
+ libgnat/a-coinve.ads, libgnat/a-coinve.adb,
+ libgnat/a-comutr.ads, libgnat/a-comutr.adb,
+ libgnat/a-convec.ads, libgnat/a-convec.adb,
+ libgnat/a-coorma.ads, libgnat/a-coorma.adb,
+ libgnat/a-coormu.ads, libgnat/a-coormu.adb,
+ libgnat/a-coorse.ads, libgnat/a-coorse.adb,
+ libgnat/a-nbnbin.ads, libgnat/a-nbnbin.adb,
+ libgnat/a-nbnbin__gmp.adb, libgnat/a-nbnbre.ads,
+ libgnat/a-nbnbre.adb, libgnat/a-strunb.ads,
+ libgnat/a-strunb.adb, libgnat/a-strunb__shared.ads,
+ libgnat/a-strunb__shared.adb, libgnat/s-rannum.ads,
+ libgnat/s-rannum.adb: Modify Put_Image procedure used in
+ Put_Image aspect specification to conform to Ada profile
+ rules (in particular, the first parameter shall be of type
+ Ada.Strings.Text_Buffers.Root_Buffer_Type'Class).
+ * libgnat/a-sttebu.ads, libgnat/a-sttebu.adb,
+ libgnat/a-stbubo.ads, libgnat/a-stbubo.adb,
+ libgnat/a-stbufi.ads, libgnat/a-stbufi.adb,
+ libgnat/a-stbufo.ads, libgnat/a-stbufo.adb,
+ libgnat/a-stbuun.ads, libgnat/a-stbuun.adb,
+ libgnat/a-stbuut.ads, libgnat/a-stbuut.adb: A new predefined
+ unit, Ada.Strings.Text_Buffers, and five child units. Two of
+ the five are RM-defined: Bounded and Unbounded. The remaining
+ three are GNAT-defined: Files, Utils, and Formatting. The buffer
+ type corresponding to an output file, type Files.File_Buffer, is
+ simpler (and perhaps therefore slower) than its predecessor.
+ Caching similar to what was being done before could be added
+ later if that seems appropriate.
+ * libgnat/s-putima.ads: Modify context clause, update
+ declaration of subtype Sink to refer to
+ Text_Buffers.Root_Buffer_Type instead of the old
+ Text_Output.Sink type.
+ * libgnat/s-putima.adb: Modify context clause. Update
+ Indent/Outdent calls to use new Increase_Indent/Decrease_Indent
+ names; ditto for "Put_String => Put" name change.
+ * libgnat/a-stteou__bootstrap.ads: Delete.
+
+2021-06-21 Eric Botcazou <ebotcazou@adacore.com>
+
+ * exp_ch5.adb (Expand_Assign_Array_Bitfield_Fast): If big-endian
+ ordering is in effect for the operands and they are small,
+ adjust the unchecked conversions done around them.
+
+2021-06-21 Richard Kenner <kenner@adacore.com>
+
+ * einfo.ads (Return_Statement): Add documentation.
+ * exp_ch6.adb (Expand_N_Extended_Return_Statement): Set it.
+ * gen_il-fields.ads: Add it.
+ * gen_il-gen-gen_entities.adb: Add it.
+
+2021-06-21 Bob Duff <duff@adacore.com>
+
+ * rtsfind.ads, libgnat/s-bitfie.ads, libgnat/s-bituti.adb,
+ libgnat/s-bituti.ads (Fast_Copy_Bitfield): New run-time library
+ function to copy bit fields faster than Copy_Bitfield. Cannot be
+ called with zero-size bit fields. Remove obsolete ??? comments
+ from s-bituti.adb; we already do "avoid calling this if
+ Forwards_OK is False".
+ * exp_ch5.adb (Expand_Assign_Array_Loop_Or_Bitfield,
+ Expand_Assign_Array_Bitfield_Fast): Generate calls to
+ Fast_Copy_Bitfield when appropriate.
+ * sem_util.adb, sem_util.ads (Get_Index_Bounds): Two new
+ functions for getting the index bounds. These are more
+ convenient than the procedure of the same name, because they can
+ be used to initialize constants.
+
+2021-06-21 Ed Schonberg <schonberg@adacore.com>
+
+ * gen_il-fields.ads: Add Default_Subtype_Mark to enumeration
+ type for fields.
+ * gen_il-gen-gen_nodes.adb: Add call to create new field for
+ Formal_Type_Declaration node.
+ * par-ch12.adb (P_Formal_Type_Declaration): in Ada_2022 mode,
+ recognize new syntax for default: "or use subtype_mark".
+ (P_Formal_Type_Definition): Ditto for the case of a formal
+ incomplete type.
+ * sinfo.ads: Add field Default_Subtype_Mark to
+ N_Formal_Type_Declaration.
+ * sem_ch12.adb (Validate_Formal_Type_Default): New procedure, to
+ apply legality rules to default subtypes in formal type
+ declarations. Some legality rules apply to all defaults, such as
+ the requirement that the default for a formal type that depends
+ on previous formal entities must itself be a previously declared
+ formal of the same unit. Other checks are kind- specific.
+ (Analyze_Associations): Use specified default if there is no
+ actual provided for a formal type in an instance.
+ (Analyze_Formal_Type_Declaration): Call
+ Validate_Formal_Type_Default when default subtype is present.
+
+2021-06-21 Bob Duff <duff@adacore.com>
+
+ * libgnat/s-valuen.ads, libgnat/s-valuen.adb
+ (Value_Enumeration_Pos): New function to compute the 'Pos of the
+ enumeration literal for a given String. Return a special value
+ instead of raising an exception on invalid input. Called by both
+ Valid_Enumeration_Image and Value_Enumeration.
+ (Valid_Enumeration_Image): Return a Boolean indicating whether
+ the String is a valid Image for the given enumeration type.
+ (Value_Enumeration): Implement in terms of
+ Value_Enumeration_Pos.
+ * libgnat/s-vaenu8.ads, libgnat/s-vaen16.ads,
+ libgnat/s-vaen32.ads: Rename Valid_Enumeration_Image from the
+ instances.
+ * libgnat/s-valuti.ads: Correct documentation (it was not true
+ for the null string).
+ * libgnat/s-valuti.adb (Normalize_String): Do not raise
+ Constraint_Error for the null string, nor strings containing
+ nothing but blanks, so that Valid_Enumeration_Image can return
+ False in these cases, rather than raising an exception.
+ * rtsfind.ads (RE_Value_Enumeration_8, RE_Value_Enumeration_16,
+ RE_Value_Enumeration_32): New functions.
+ (RTE_Available): Improve comment (E doesn't have to be a
+ subprogram, although that's the usual case).
+ * sem_attr.adb (nalid_Value): Semantic analysis for new
+ attribute.
+ * exp_attr.adb: Call Expand_Valid_Value_Attribute for new
+ attribute.
+ * exp_imgv.ads, exp_imgv.adb (Expand_Valid_Value_Attribute): New
+ procedure to expand Valid_Value into a call to
+ Valid_Enumeration_Image_NN.
+ (Expand_Value_Attribute): Misc code cleanups. Remove two ???
+ mark comments. RTE_Available won't work here. For one thing,
+ RTE_Available (X) shouldn't be called until the compiler has
+ decided to make use of X (see comments on RTE_Available), and in
+ this case we're trying to AVOID calling something.
+ * snames.ads-tmpl: New attribute name.
+ * doc/gnat_rm/implementation_defined_attributes.rst: Document
+ new attribute.
+ * gnat_rm.texi: Regenerate.
+
+2021-06-21 Eric Botcazou <ebotcazou@adacore.com>
+
+ * fe.h (Assume_No_Invalid_Values): Declare.
+ * opt.ads (Assume_No_Invalid_Values): Add warning comment.
+
+2021-06-21 Bob Duff <duff@adacore.com>
+
+ * libgnat/s-bituti.ads (Small_Size): Do not include 0 in this
+ type.
+ * libgnat/s-bituti.adb (Copy_Bitfield): Do nothing for 0-bit
+ bitfields.
+
+2021-06-21 Ghjuvan Lacambre <lacambre@adacore.com>
+
+ * exp_ch9.adb (Build_Simple_Entry_Call): Add comment.
+ * libgnat/s-rannum.adb (Random): Update comment.
+ * libgnat/s-rannum.ads (Generator): Update comment.
+
+2021-06-21 Piotr Trojanek <trojanek@adacore.com>
+
+ * doc/gnat_rm/representation_clauses_and_pragmas.rst (Address
+ Clauses): Fix unbalanced parens.
+ * gnat_rm.texi: Regenerate.
+
+2021-06-21 Ghjuvan Lacambre <lacambre@adacore.com>
+
+ * errout.adb (Handle_Serious_Error): Capitalize comment.
+ * exp_dbug.adb (Set_Entity_Name): Capitalize sentence.
+ * exp_dist.adb (Expand_All_Calls_Remote_Subprogram_Call): Fix
+ typo.
+ * sem_ch3.adb (Modular_Type_Declaration): Add space after comma.
+
+2021-06-21 Ghjuvan Lacambre <lacambre@adacore.com>
+
+ * debug.adb: Document -gnatd_U as taken.
+ * err_vars.ads (Warning_Doc_Switch): Set to True.
+ * errout.ads (Errout): Update documentation.
+ * gnat1drv.adb (Adjust_Global_Switches): React to -gnatd_U.
+ * hostparm.ads (Tag_Errors): Set to True.
+ * opt.ads (Unique_Error_Tag): Document -gnatd_U.
+
+2021-06-21 Eric Botcazou <ebotcazou@adacore.com>
+
+ * urealp.ads (UR_Write_To_JSON): Declare.
+ * urealp.adb (Decimal_Exponent_Hi): Treat numbers in base 10
+ specially and rewrite handling of numbers in other bases.
+ (Decimal_Exponent_Lo): Likewise.
+ (Normalize): Minor tweak.
+ (UR_Write_To_JSON): New wrapper procedure around UR_Write.
+ * repinfo.adb (List_Type_Info): When the output is to JSON, call
+ UR_Write_To_JSON instead of UR_Write.
+
+2021-06-21 Piotr Trojanek <trojanek@adacore.com>
+
+ * sem_util.adb (Indexed_Component_Bit_Offset): Return an unknown
+ offset for components within multidimensional arrays; remove
+ redundant parens.
+
+2021-06-21 Piotr Trojanek <trojanek@adacore.com>
+
+ * sem_util.adb (Find_Overlaid_Entity): Ignore references to
+ components and discriminants.
+
+2021-06-21 Doug Rupp <rupp@adacore.com>
+
+ * Makefile.rtl (aarch64-linux) [LIBGNAT_TARGET_PAIRS]: Add
+ $(TRASYM_DWARF_UNIX_PAIRS).
+ [EXTRA_GNAT_RTL_NONTASKING_OBJS]: Add $(TRASYM_DWARF_UNIX_OBJS)
+
+2021-06-21 Gary Dismukes <dismukes@adacore.com>
+
+ * exp_util.adb (Expand_Sliding_Conversion): Only perform
+ expansion when Expander_Active is True. Add a comment about this
+ and refine existing comment regarding string literals.
+
+2021-06-21 Piotr Trojanek <trojanek@adacore.com>
+
+ * sem_util.adb (Denotes_Same_Object): Simplify handling of
+ slices.
+
+2021-06-21 Piotr Trojanek <trojanek@adacore.com>
+
+ * sem_util.adb (Is_Object_Renaming): Rename from Is_Renaming;
+ simplify; adapt callers.
+
+2021-06-21 Frederic Konrad <konrad@adacore.com>
+
+ * Makefile.rtl: Compiles both static and dynamic libgnat for
+ powerpc64-wrs-vxworks7r2.
+
2021-06-18 Gary Dismukes <dismukes@adacore.com>
* sem_ch3.adb (Constrain_Array): Add error checking for
diff --git a/gcc/ada/Make-generated.in b/gcc/ada/Make-generated.in
index 2308b01..129909b 100644
--- a/gcc/ada/Make-generated.in
+++ b/gcc/ada/Make-generated.in
@@ -13,19 +13,12 @@ endif
fsrcdir := $(shell cd $(srcdir);${PWD_COMMAND})
GEN_IL_INCLUDES = -I$(fsrcdir)/ada
-GEN_IL_FLAGS = -a -q -g -gnata -j0 -gnat2012 -gnatw.g -gnatyg -gnatU $(GEN_IL_INCLUDES)
+GEN_IL_FLAGS = -gnata -gnat2012 -gnatw.g -gnatyg -gnatU $(GEN_IL_INCLUDES)
ada/seinfo_tables.ads ada/seinfo_tables.adb ada/sinfo.h ada/einfo.h ada/nmake.ads ada/nmake.adb ada/seinfo.ads ada/sinfo-nodes.ads ada/sinfo-nodes.adb ada/einfo-entities.ads ada/einfo-entities.adb: ada/stamp-gen_il ; @true
-ada/stamp-gen_il: $(fsrcdir)/ada/gen_il* $(fsrcdir)/ada/libgnat/a-sto*.ad? $(fsrcdir)/ada/libgnat/a-stteou__bootstrap.ads
+ada/stamp-gen_il: $(fsrcdir)/ada/gen_il*
$(MKDIR) ada/gen_il
- # Copy recent runtime files needed by gen_il that may not be available
- # in the base compiler.
- $(CP) -f $(fsrcdir)/ada/libgnat/a-sto*.ad? ada/gen_il
- $(CP) -f $(fsrcdir)/ada/libgnat/a-stteou__bootstrap.ads ada/gen_il/a-stteou.ads
- cd ada/gen_il ; gnatmake $(GEN_IL_FLAGS) gen_il-main.adb
- # ignore errors when running gen_il-main due to bootstrap
- # considerations
- -cd ada/gen_il ; ./gen_il-main
+ cd ada/gen_il ; gnatmake -q -g $(GEN_IL_FLAGS) gen_il-main ; ./gen_il-main
$(fsrcdir)/../move-if-change ada/gen_il/seinfo_tables.ads ada/seinfo_tables.ads
$(fsrcdir)/../move-if-change ada/gen_il/seinfo_tables.adb ada/seinfo_tables.adb
$(fsrcdir)/../move-if-change ada/gen_il/sinfo.h ada/sinfo.h
diff --git a/gcc/ada/Makefile.rtl b/gcc/ada/Makefile.rtl
index 7f075c7..f626c5d 100644
--- a/gcc/ada/Makefile.rtl
+++ b/gcc/ada/Makefile.rtl
@@ -296,6 +296,12 @@ GNATRTL_NONTASKING_OBJS= \
a-strunb$(objext) \
a-ststio$(objext) \
a-stteou$(objext) \
+ a-sttebu$(objext) \
+ a-stbuun$(objext) \
+ a-stbubo$(objext) \
+ a-stbuut$(objext) \
+ a-stbufi$(objext) \
+ a-stbufo$(objext) \
a-stunau$(objext) \
a-stunha$(objext) \
a-stuten$(objext) \
@@ -1194,6 +1200,13 @@ ifeq ($(strip $(filter-out powerpc% wrs vxworks vxworksspe vxworks7% vxworks7spe
GCC_SPEC_FILES+=vxworks-cert-$(ARCH_STR)-link.spec
GCC_SPEC_FILES+=vxworks-smp-$(ARCH_STR)-link.spec
endif
+
+ ifeq ($(strip $(filter-out vxworks7r2 powerpc64 rtp rtp-smp, $(target_os) $(target_cpu) $(THREAD_KIND))),)
+ # Shared libraries are only supported on PowerPC64, VxWorks7r2
+ # ATM. Also this is disabled for kernel runtimes.
+ GNATLIB_SHARED = gnatlib-shared-dual
+ LIBRARY_VERSION := $(LIB_VERSION)
+ endif
endif
# PowerPC and e500v2 VxWorks 653
@@ -2449,6 +2462,7 @@ ifeq ($(strip $(filter-out aarch64% linux%,$(target_cpu) $(target_os))),)
s-inmaop.adb<libgnarl/s-inmaop__posix.adb \
s-intman.adb<libgnarl/s-intman__posix.adb \
s-linux.ads<libgnarl/s-linux.ads \
+ $(TRASYM_DWARF_UNIX_PAIRS) \
s-mudido.adb<libgnarl/s-mudido__affinity.adb \
s-osinte.ads<libgnarl/s-osinte__linux.ads \
s-osinte.adb<libgnarl/s-osinte__posix.adb \
@@ -2465,7 +2479,8 @@ ifeq ($(strip $(filter-out aarch64% linux%,$(target_cpu) $(target_os))),)
TOOLS_TARGET_PAIRS = indepsw.adb<indepsw-gnu.adb
- EXTRA_GNATRTL_NONTASKING_OBJS = $(GNATRTL_128BIT_OBJS)
+ EXTRA_GNATRTL_NONTASKING_OBJS += $(GNATRTL_128BIT_OBJS) \
+ $(TRASYM_DWARF_UNIX_OBJS)
EXTRA_GNATRTL_TASKING_OBJS=s-linux.o a-exetim.o
EH_MECHANISM=-gcc
THREADSLIB=-lpthread -lrt
diff --git a/gcc/ada/checks.adb b/gcc/ada/checks.adb
index bdaae59..907641f 100644
--- a/gcc/ada/checks.adb
+++ b/gcc/ada/checks.adb
@@ -11106,6 +11106,56 @@ package body Checks is
end;
end if;
+ -- If the context is a qualified_expression where the subtype is
+ -- an unconstrained array subtype with fixed-lower-bound indexes,
+ -- then consistency checks must be done between the lower bounds
+ -- of any such indexes and the corresponding lower bounds of the
+ -- qualified array object.
+
+ elsif Is_Fixed_Lower_Bound_Array_Subtype (T_Typ)
+ and then Nkind (Parent (Expr)) = N_Qualified_Expression
+ and then not Do_Access
+ then
+ declare
+ Ndims : constant Pos := Number_Dimensions (T_Typ);
+
+ Qual_Index : Node_Id;
+ Expr_Index : Node_Id;
+
+ begin
+ Expr_Actual := Get_Referenced_Object (Expr);
+ Exptyp := Get_Actual_Subtype (Expr_Actual);
+
+ Qual_Index := First_Index (T_Typ);
+ Expr_Index := First_Index (Exptyp);
+
+ for Indx in 1 .. Ndims loop
+ if Nkind (Expr_Index) /= N_Raise_Constraint_Error then
+
+ -- If this index of the qualifying array subtype has
+ -- a fixed lower bound, then apply a check that the
+ -- corresponding lower bound of the array expression
+ -- is equal to it.
+
+ if Is_Fixed_Lower_Bound_Index_Subtype (Etype (Qual_Index))
+ then
+ Evolve_Or_Else
+ (Cond,
+ Make_Op_Ne (Loc,
+ Left_Opnd =>
+ Get_E_First_Or_Last
+ (Loc, Exptyp, Indx, Name_First),
+ Right_Opnd =>
+ New_Copy_Tree
+ (Type_Low_Bound (Etype (Qual_Index)))));
+ end if;
+
+ Next (Qual_Index);
+ Next (Expr_Index);
+ end if;
+ end loop;
+ end;
+
else
-- For a conversion to an unconstrained array type, generate an
-- Action to check that the bounds of the source value are within
diff --git a/gcc/ada/debug.adb b/gcc/ada/debug.adb
index 0694f23..3f1fa55 100644
--- a/gcc/ada/debug.adb
+++ b/gcc/ada/debug.adb
@@ -186,7 +186,7 @@ package body Debug is
-- d_R
-- d_S
-- d_T Output trace information on invocation path recording
- -- d_U
+ -- d_U Disable prepending messages with "error:".
-- d_V Enable verifications on the expanded tree
-- d_W
-- d_X
@@ -1017,6 +1017,9 @@ package body Debug is
-- d_T The compiler outputs trace information to standard output whenever
-- an invocation path is recorded.
+ -- d_U Disable prepending 'error:' to error messages. This used to be the
+ -- default and can be seen as the opposite of -gnatU.
+
-- d_V Enable verification of the expanded code before calling the backend
-- and generate error messages on each inconsistency found.
diff --git a/gcc/ada/doc/gnat_rm/implementation_defined_attributes.rst b/gcc/ada/doc/gnat_rm/implementation_defined_attributes.rst
index fe33dd9..0df103b 100644
--- a/gcc/ada/doc/gnat_rm/implementation_defined_attributes.rst
+++ b/gcc/ada/doc/gnat_rm/implementation_defined_attributes.rst
@@ -1587,6 +1587,15 @@ Multi-dimensional arrays can be modified, as shown by this example:
which changes element (1,2) to 20 and (3,4) to 30.
+Attribute Valid_Image
+=======================
+.. index:: Valid_Image
+
+The ``'Valid_Image`` attribute is defined for enumeration types other than
+those in package Standard. This attribute is a function that takes
+a String, and returns Boolean. ``T'Valid_Image (S)`` returns True
+if and only if ``T'Value (S)`` would not raise Constraint_Error.
+
Attribute Valid_Scalars
=======================
.. index:: Valid_Scalars
diff --git a/gcc/ada/doc/gnat_rm/implementation_defined_pragmas.rst b/gcc/ada/doc/gnat_rm/implementation_defined_pragmas.rst
index 6668dff..d86a2fd 100644
--- a/gcc/ada/doc/gnat_rm/implementation_defined_pragmas.rst
+++ b/gcc/ada/doc/gnat_rm/implementation_defined_pragmas.rst
@@ -2214,6 +2214,23 @@ of GNAT specific extensions are recognized as follows:
This new aggregate syntax for arrays and containers is provided under -gnatX
to experiment and confirm this new language syntax.
+* Additional ``when`` constructs
+
+ In addition to the ``exit when CONDITION`` control structure, several
+ additional constructs are allowed following this format. Including
+ ``return when CONDITION``, ``goto when CONDITION``, and
+ ``raise [with EXCEPTION_MESSAGE] when CONDITION.``
+
+ Some examples:
+
+ .. code-block:: ada
+
+ return Result when Variable > 10;
+
+ raise Program_Error with "Element is null" when Element = null;
+
+ goto End_Of_Subprogram when Variable = -1;
+
* Casing on composite values (aka pattern matching)
The selector for a case statement may be of a composite type, subject to
diff --git a/gcc/ada/doc/gnat_rm/representation_clauses_and_pragmas.rst b/gcc/ada/doc/gnat_rm/representation_clauses_and_pragmas.rst
index c13a882..f755fc1 100644
--- a/gcc/ada/doc/gnat_rm/representation_clauses_and_pragmas.rst
+++ b/gcc/ada/doc/gnat_rm/representation_clauses_and_pragmas.rst
@@ -1738,7 +1738,7 @@ of the use of this pragma. This may cause an overlay to have this
unintended clobbering effect. The compiler avoids this for scalar
types, but not for composite objects (where in general the effect
of ``Initialize_Scalars`` is part of the initialization routine
-for the composite object:
+for the composite object):
::
diff --git a/gcc/ada/einfo.ads b/gcc/ada/einfo.ads
index 93ccffb..4c5a2da 100644
--- a/gcc/ada/einfo.ads
+++ b/gcc/ada/einfo.ads
@@ -4206,6 +4206,11 @@ package Einfo is
-- entities (for convenience in setting it), but is only tested
-- for the function case.
+-- Return_Statement
+-- Defined in E_Variable. Set when Is_Return_Object is set, in which
+-- case it points to the N_Simple_Return_Statement made from the
+-- extended return statement.
+
-- Returns_By_Ref
-- Defined in subprogram type entities and functions. Set if a function
-- (or an access-to-function type) returns a result by reference, either
diff --git a/gcc/ada/err_vars.ads b/gcc/ada/err_vars.ads
index 0dd7c7f..366df62 100644
--- a/gcc/ada/err_vars.ads
+++ b/gcc/ada/err_vars.ads
@@ -89,7 +89,7 @@ package Err_Vars is
-- Source_Reference line, then this is initialized to No_Source_File,
-- to force an initial reference to the real source file name.
- Warning_Doc_Switch : Boolean := False;
+ Warning_Doc_Switch : Boolean := True;
-- If this is set True, then the ??/?x?/?x? sequences in error messages
-- are active (see errout.ads for details). If this switch is False, then
-- these sequences are ignored (i.e. simply equivalent to a single ?). The
diff --git a/gcc/ada/errout.adb b/gcc/ada/errout.adb
index 16f7aa3..f643c8d 100644
--- a/gcc/ada/errout.adb
+++ b/gcc/ada/errout.adb
@@ -886,6 +886,19 @@ package body Errout is
Last => Last_Sloc (Lst)));
end Error_Msg_FE;
+ ------------------------------
+ -- Error_Msg_GNAT_Extension --
+ ------------------------------
+
+ procedure Error_Msg_GNAT_Extension (Extension : String) is
+ Loc : constant Source_Ptr := Token_Ptr;
+ begin
+ if not Extensions_Allowed then
+ Error_Msg (Extension & " is a 'G'N'A'T specific extension", Loc);
+ Error_Msg ("\unit must be compiled with -gnatX switch", Loc);
+ end if;
+ end Error_Msg_GNAT_Extension;
+
------------------------
-- Error_Msg_Internal --
------------------------
@@ -1032,7 +1045,7 @@ package body Errout is
if In_Extended_Main_Source_Unit (Sptr) then
null;
- -- If the main unit has not been read yet. the warning must be on
+ -- If the main unit has not been read yet. The warning must be on
-- a configuration file: gnat.adc or user-defined. This means we
-- are not parsing the main unit yet, so skip following checks.
diff --git a/gcc/ada/errout.ads b/gcc/ada/errout.ads
index 0a4ad62..904c87d 100644
--- a/gcc/ada/errout.ads
+++ b/gcc/ada/errout.ads
@@ -519,7 +519,7 @@ package Errout is
-- The prefixes error and warning are supplied automatically (depending
-- on the use of the ? insertion character), and the call to the error
-- message routine supplies the text. The "error: " prefix is omitted
- -- in brief error message formats.
+ -- if -gnatd_U is among the options given to gnat.
-- Reserved Ada keywords in the message are in the default keyword case
-- (determined from the given source program), surrounded by quotation
@@ -942,6 +942,11 @@ package Errout is
procedure Error_Msg_Ada_2022_Feature (Feature : String; Loc : Source_Ptr);
-- Analogous to Error_Msg_Ada_2012_Feature, for Ada 2022
+ procedure Error_Msg_GNAT_Extension (Extension : String);
+ -- If not operating with extensions allowed, posts errors complaining
+ -- that Extension is only supported when the -gnatX switch is enabled,
+ -- with appropriate suggestions to fix it.
+
procedure dmsg (Id : Error_Msg_Id) renames Erroutc.dmsg;
-- Debugging routine to dump an error message
diff --git a/gcc/ada/exp_attr.adb b/gcc/ada/exp_attr.adb
index a103060..400398d 100644
--- a/gcc/ada/exp_attr.adb
+++ b/gcc/ada/exp_attr.adb
@@ -7384,6 +7384,13 @@ package body Exp_Attr is
Validity_Checks_On := Save_Validity_Checks_On;
end Valid;
+ -----------------
+ -- Valid_Value --
+ -----------------
+
+ when Attribute_Valid_Value =>
+ Exp_Imgv.Expand_Valid_Value_Attribute (N);
+
-------------------
-- Valid_Scalars --
-------------------
@@ -7567,14 +7574,9 @@ package body Exp_Attr is
-- typ'Value
-- (Wide_Wide_String_To_String (X, Wide_Character_Encoding_Method))
- -- Wide_Wide_String_To_String is a runtime function that converts its
- -- wide string argument to String, converting any non-translatable
- -- characters into appropriate escape sequences. This preserves the
- -- required semantics of Wide_Wide_Value in all cases, and results in a
- -- very simple implementation approach.
-
- -- It's not quite right where typ = Wide_Wide_Character, because the
- -- encoding method may not cover the whole character type ???
+ -- See Wide_Value for more information. This is not quite right where
+ -- typ = Wide_Wide_Character, because the encoding method may not cover
+ -- the whole character type.
when Attribute_Wide_Wide_Value =>
Rewrite (N,
diff --git a/gcc/ada/exp_ch11.adb b/gcc/ada/exp_ch11.adb
index 5981ff5..6058826 100644
--- a/gcc/ada/exp_ch11.adb
+++ b/gcc/ada/exp_ch11.adb
@@ -1736,6 +1736,24 @@ package body Exp_Ch11 is
Analyze (N);
end Expand_N_Raise_Statement;
+ -----------------------------------
+ -- Expand_N_Raise_When_Statement --
+ -----------------------------------
+
+ procedure Expand_N_Raise_When_Statement (N : Node_Id) is
+ Loc : constant Source_Ptr := Sloc (N);
+ begin
+ Rewrite (N,
+ Make_If_Statement (Loc,
+ Condition => Condition (N),
+ Then_Statements => New_List (
+ Make_Raise_Statement (Loc,
+ Name => Name (N),
+ Expression => Expression (N)))));
+
+ Analyze (N);
+ end Expand_N_Raise_When_Statement;
+
----------------------------------
-- Expand_N_Raise_Storage_Error --
----------------------------------
diff --git a/gcc/ada/exp_ch11.ads b/gcc/ada/exp_ch11.ads
index d95a02c..057919b 100644
--- a/gcc/ada/exp_ch11.ads
+++ b/gcc/ada/exp_ch11.ads
@@ -34,6 +34,7 @@ package Exp_Ch11 is
procedure Expand_N_Raise_Expression (N : Node_Id);
procedure Expand_N_Raise_Program_Error (N : Node_Id);
procedure Expand_N_Raise_Statement (N : Node_Id);
+ procedure Expand_N_Raise_When_Statement (N : Node_Id);
procedure Expand_N_Raise_Storage_Error (N : Node_Id);
-- Data structures for gathering information to build exception tables
diff --git a/gcc/ada/exp_ch5.adb b/gcc/ada/exp_ch5.adb
index cd9ab29..0070706 100644
--- a/gcc/ada/exp_ch5.adb
+++ b/gcc/ada/exp_ch5.adb
@@ -64,6 +64,7 @@ with Snames; use Snames;
with Stand; use Stand;
with Stringt; use Stringt;
with Tbuild; use Tbuild;
+with Ttypes; use Ttypes;
with Uintp; use Uintp;
with Validsw; use Validsw;
@@ -127,8 +128,16 @@ package body Exp_Ch5 is
R_Type : Entity_Id;
Rev : Boolean) return Node_Id;
-- Alternative to Expand_Assign_Array_Loop for packed bitfields. Generates
- -- a call to the System.Bitfields.Copy_Bitfield, which is more efficient
- -- than copying component-by-component.
+ -- a call to System.Bitfields.Copy_Bitfield, which is more efficient than
+ -- copying component-by-component.
+
+ function Expand_Assign_Array_Bitfield_Fast
+ (N : Node_Id;
+ Larray : Entity_Id;
+ Rarray : Entity_Id) return Node_Id;
+ -- Alternative to Expand_Assign_Array_Bitfield. Generates a call to
+ -- System.Bitfields.Fast_Copy_Bitfield, which is more efficient than
+ -- Copy_Bitfield, but only works in restricted situations.
function Expand_Assign_Array_Loop_Or_Bitfield
(N : Node_Id;
@@ -138,8 +147,8 @@ package body Exp_Ch5 is
R_Type : Entity_Id;
Ndim : Pos;
Rev : Boolean) return Node_Id;
- -- Calls either Expand_Assign_Array_Loop or Expand_Assign_Array_Bitfield as
- -- appropriate.
+ -- Calls either Expand_Assign_Array_Loop, Expand_Assign_Array_Bitfield, or
+ -- Expand_Assign_Array_Bitfield_Fast as appropriate.
procedure Expand_Assign_Record (N : Node_Id);
-- N is an assignment of an untagged record value. This routine handles
@@ -1440,6 +1449,137 @@ package body Exp_Ch5 is
R_Addr, R_Bit, L_Addr, L_Bit, Size));
end Expand_Assign_Array_Bitfield;
+ ---------------------------------------
+ -- Expand_Assign_Array_Bitfield_Fast --
+ ---------------------------------------
+
+ function Expand_Assign_Array_Bitfield_Fast
+ (N : Node_Id;
+ Larray : Entity_Id;
+ Rarray : Entity_Id) return Node_Id
+ is
+ pragma Assert (not Change_Of_Representation (N));
+ -- This won't work, for example, to copy a packed array to an unpacked
+ -- array.
+
+ -- For L (A .. B) := R (C .. D), we generate:
+ --
+ -- L := Fast_Copy_Bitfield (R, <offset of R(C)>, L, <offset of L(A)>,
+ -- L (A .. B)'Length * L'Component_Size);
+ --
+ -- with L and R suitably uncheckedly converted to/from Val_2.
+ -- The offsets are from the start of L and R.
+
+ Loc : constant Source_Ptr := Sloc (N);
+
+ L_Typ : constant Entity_Id := Etype (Larray);
+ R_Typ : constant Entity_Id := Etype (Rarray);
+ -- The original type of the arrays
+
+ L_Val : constant Node_Id :=
+ Unchecked_Convert_To (RTE (RE_Val_2), Larray);
+ R_Val : constant Node_Id :=
+ Unchecked_Convert_To (RTE (RE_Val_2), Rarray);
+ -- Converted values of left- and right-hand sides
+
+ L_Small : constant Boolean :=
+ Known_Static_RM_Size (L_Typ)
+ and then RM_Size (L_Typ) < Standard_Long_Long_Integer_Size;
+ R_Small : constant Boolean :=
+ Known_Static_RM_Size (R_Typ)
+ and then RM_Size (R_Typ) < Standard_Long_Long_Integer_Size;
+ -- Whether the above unchecked conversions need to be padded with zeros
+
+ C_Size : constant Uint := Component_Size (L_Typ);
+ pragma Assert (C_Size >= 1);
+ pragma Assert (C_Size = Component_Size (R_Typ));
+
+ Larray_Bounds : constant Range_Values :=
+ Get_Index_Bounds (First_Index (L_Typ));
+ L_Bounds : constant Range_Values :=
+ (if Nkind (Name (N)) = N_Slice
+ then Get_Index_Bounds (Discrete_Range (Name (N)))
+ else Larray_Bounds);
+ -- If the left-hand side is A (L..H), Larray_Bounds is A'Range, and
+ -- L_Bounds is L..H. If it's not a slice, we treat it like a slice
+ -- starting at A'First.
+
+ L_Bit : constant Node_Id :=
+ Make_Integer_Literal (Loc, (L_Bounds.L - Larray_Bounds.L) * C_Size);
+
+ Rarray_Bounds : constant Range_Values :=
+ Get_Index_Bounds (First_Index (R_Typ));
+ R_Bounds : constant Range_Values :=
+ (if Nkind (Expression (N)) = N_Slice
+ then Get_Index_Bounds (Discrete_Range (Expression (N)))
+ else Rarray_Bounds);
+
+ R_Bit : constant Node_Id :=
+ Make_Integer_Literal (Loc, (R_Bounds.L - Rarray_Bounds.L) * C_Size);
+
+ Size : constant Node_Id :=
+ Make_Op_Multiply (Loc,
+ Make_Attribute_Reference (Loc,
+ Prefix =>
+ Duplicate_Subexpr (Name (N), True),
+ Attribute_Name => Name_Length),
+ Make_Attribute_Reference (Loc,
+ Prefix =>
+ Duplicate_Subexpr (Larray, True),
+ Attribute_Name => Name_Component_Size));
+
+ L_Arg, R_Arg, Call : Node_Id;
+
+ begin
+ -- The semantics of unchecked conversion between bit-packed arrays that
+ -- are implemented as modular types and modular types is precisely that
+ -- of unchecked conversion between modular types. Therefore, if it needs
+ -- to be padded with zeros, the padding must be moved to the correct end
+ -- for memory order because System.Bitfield_Utils works in memory order.
+
+ if L_Small
+ and then (Bytes_Big_Endian xor Reverse_Storage_Order (L_Typ))
+ then
+ L_Arg := Make_Op_Shift_Left (Loc,
+ Left_Opnd => L_Val,
+ Right_Opnd => Make_Integer_Literal (Loc,
+ Standard_Long_Long_Integer_Size - RM_Size (L_Typ)));
+ else
+ L_Arg := L_Val;
+ end if;
+
+ if R_Small
+ and then (Bytes_Big_Endian xor Reverse_Storage_Order (R_Typ))
+ then
+ R_Arg := Make_Op_Shift_Left (Loc,
+ Left_Opnd => R_Val,
+ Right_Opnd => Make_Integer_Literal (Loc,
+ Standard_Long_Long_Integer_Size - RM_Size (R_Typ)));
+ else
+ R_Arg := R_Val;
+ end if;
+
+ Call := Make_Function_Call (Loc,
+ Name => New_Occurrence_Of (RTE (RE_Fast_Copy_Bitfield), Loc),
+ Parameter_Associations => New_List (
+ R_Arg, R_Bit, L_Arg, L_Bit, Size));
+
+ -- Conversely, the final unchecked conversion must take significant bits
+
+ if L_Small
+ and then (Bytes_Big_Endian xor Reverse_Storage_Order (L_Typ))
+ then
+ Call := Make_Op_Shift_Right (Loc,
+ Left_Opnd => Call,
+ Right_Opnd => Make_Integer_Literal (Loc,
+ Standard_Long_Long_Integer_Size - RM_Size (L_Typ)));
+ end if;
+
+ return Make_Assignment_Statement (Loc,
+ Name => Duplicate_Subexpr (Larray, True),
+ Expression => Unchecked_Convert_To (L_Typ, Call));
+ end Expand_Assign_Array_Bitfield_Fast;
+
------------------------------------------
-- Expand_Assign_Array_Loop_Or_Bitfield --
------------------------------------------
@@ -1453,6 +1593,7 @@ package body Exp_Ch5 is
Ndim : Pos;
Rev : Boolean) return Node_Id
is
+
Slices : constant Boolean :=
Nkind (Name (N)) = N_Slice or else Nkind (Expression (N)) = N_Slice;
L_Prefix_Comp : constant Boolean :=
@@ -1467,23 +1608,23 @@ package body Exp_Ch5 is
N_Selected_Component | N_Indexed_Component | N_Slice;
begin
- -- Determine whether Copy_Bitfield is appropriate (will work, and will
- -- be more efficient than component-by-component copy). Copy_Bitfield
- -- doesn't work for reversed storage orders. It is efficient for slices
- -- of bit-packed arrays. Copy_Bitfield can read and write bits that are
- -- not part of the objects being copied, so we don't want to use it if
- -- there are volatile or independent components. If the Prefix of the
- -- slice is a component or slice, then it might be a part of an object
- -- with some other volatile or independent components, so we disable the
- -- optimization in that case as well. We could complicate this code by
- -- actually looking for such volatile and independent components.
+ -- Determine whether Copy_Bitfield or Fast_Copy_Bitfield is appropriate
+ -- (will work, and will be more efficient than component-by-component
+ -- copy). Copy_Bitfield doesn't work for reversed storage orders. It is
+ -- efficient for slices of bit-packed arrays. Copy_Bitfield can read and
+ -- write bits that are not part of the objects being copied, so we don't
+ -- want to use it if there are volatile or independent components. If
+ -- the Prefix of the slice is a component or slice, then it might be a
+ -- part of an object with some other volatile or independent components,
+ -- so we disable the optimization in that case as well. We could
+ -- complicate this code by actually looking for such volatile and
+ -- independent components.
if Is_Bit_Packed_Array (L_Type)
and then Is_Bit_Packed_Array (R_Type)
and then not Reverse_Storage_Order (L_Type)
and then not Reverse_Storage_Order (R_Type)
and then Ndim = 1
- and then not Rev
and then Slices
and then not Has_Volatile_Component (L_Type)
and then not Has_Volatile_Component (R_Type)
@@ -1491,14 +1632,87 @@ package body Exp_Ch5 is
and then not Has_Independent_Components (R_Type)
and then not L_Prefix_Comp
and then not R_Prefix_Comp
- and then RTE_Available (RE_Copy_Bitfield)
then
- return Expand_Assign_Array_Bitfield
- (N, Larray, Rarray, L_Type, R_Type, Rev);
- else
- return Expand_Assign_Array_Loop
- (N, Larray, Rarray, L_Type, R_Type, Ndim, Rev);
+ -- Here if Copy_Bitfield can work (except for the Rev test below).
+ -- Determine whether to call Fast_Copy_Bitfield instead. If we
+ -- are assigning slices, and all the relevant bounds are known at
+ -- compile time, and the maximum object size is no greater than
+ -- System.Bitfields.Val_Bits (i.e. Long_Long_Integer'Size / 2), and
+ -- we don't have enumeration representation clauses, we can use
+ -- Fast_Copy_Bitfield. The max size test is to ensure that the slices
+ -- cannot overlap boundaries not supported by Fast_Copy_Bitfield.
+
+ pragma Assert (Known_Component_Size (Base_Type (L_Type)));
+ pragma Assert (Known_Component_Size (Base_Type (R_Type)));
+
+ -- Note that L_Type and R_Type do not necessarily have the same base
+ -- type, because of array type conversions. Hence the need to check
+ -- various properties of both.
+
+ if Compile_Time_Known_Bounds (Base_Type (L_Type))
+ and then Compile_Time_Known_Bounds (Base_Type (R_Type))
+ then
+ declare
+ Left_Base_Index : constant Entity_Id :=
+ First_Index (Base_Type (L_Type));
+ Left_Base_Range : constant Range_Values :=
+ Get_Index_Bounds (Left_Base_Index);
+
+ Right_Base_Index : constant Entity_Id :=
+ First_Index (Base_Type (R_Type));
+ Right_Base_Range : constant Range_Values :=
+ Get_Index_Bounds (Right_Base_Index);
+
+ Known_Left_Slice_Low : constant Boolean :=
+ (if Nkind (Name (N)) = N_Slice
+ then Compile_Time_Known_Value
+ (Get_Index_Bounds (Discrete_Range (Name (N))).L));
+ Known_Right_Slice_Low : constant Boolean :=
+ (if Nkind (Expression (N)) = N_Slice
+ then Compile_Time_Known_Value
+ (Get_Index_Bounds (Discrete_Range (Expression (N))).H));
+
+ Val_Bits : constant Pos := Standard_Long_Long_Integer_Size / 2;
+
+ begin
+ if Left_Base_Range.H - Left_Base_Range.L < Val_Bits
+ and then Right_Base_Range.H - Right_Base_Range.L < Val_Bits
+ and then Known_Esize (L_Type)
+ and then Known_Esize (R_Type)
+ and then Known_Left_Slice_Low
+ and then Known_Right_Slice_Low
+ and then Compile_Time_Known_Value
+ (Get_Index_Bounds (First_Index (Etype (Larray))).L)
+ and then Compile_Time_Known_Value
+ (Get_Index_Bounds (First_Index (Etype (Rarray))).L)
+ and then
+ not (Is_Enumeration_Type (Etype (Left_Base_Index))
+ and then Has_Enumeration_Rep_Clause
+ (Etype (Left_Base_Index)))
+ and then RTE_Available (RE_Fast_Copy_Bitfield)
+ then
+ pragma Assert (Esize (L_Type) /= 0);
+ pragma Assert (Esize (R_Type) /= 0);
+
+ return Expand_Assign_Array_Bitfield_Fast (N, Larray, Rarray);
+ end if;
+ end;
+ end if;
+
+ -- Fast_Copy_Bitfield can work if Rev is True, because the data is
+ -- passed and returned by copy. Copy_Bitfield cannot.
+
+ if not Rev and then RTE_Available (RE_Copy_Bitfield) then
+ return Expand_Assign_Array_Bitfield
+ (N, Larray, Rarray, L_Type, R_Type, Rev);
+ end if;
end if;
+
+ -- Here if we did not return above, with Fast_Copy_Bitfield or
+ -- Copy_Bitfield.
+
+ return Expand_Assign_Array_Loop
+ (N, Larray, Rarray, L_Type, R_Type, Ndim, Rev);
end Expand_Assign_Array_Loop_Or_Bitfield;
--------------------------
@@ -3962,6 +4176,23 @@ package body Exp_Ch5 is
Analyze (N);
end Expand_Formal_Container_Element_Loop;
+ ----------------------------------
+ -- Expand_N_Goto_When_Statement --
+ ----------------------------------
+
+ procedure Expand_N_Goto_When_Statement (N : Node_Id) is
+ Loc : constant Source_Ptr := Sloc (N);
+ begin
+ Rewrite (N,
+ Make_If_Statement (Loc,
+ Condition => Condition (N),
+ Then_Statements => New_List (
+ Make_Goto_Statement (Loc,
+ Name => Name (N)))));
+
+ Analyze (N);
+ end Expand_N_Goto_When_Statement;
+
---------------------------
-- Expand_N_If_Statement --
---------------------------
diff --git a/gcc/ada/exp_ch5.ads b/gcc/ada/exp_ch5.ads
index fa47be1..75dd2cc 100644
--- a/gcc/ada/exp_ch5.ads
+++ b/gcc/ada/exp_ch5.ads
@@ -32,6 +32,7 @@ package Exp_Ch5 is
procedure Expand_N_Block_Statement (N : Node_Id);
procedure Expand_N_Case_Statement (N : Node_Id);
procedure Expand_N_Exit_Statement (N : Node_Id);
+ procedure Expand_N_Goto_When_Statement (N : Node_Id);
procedure Expand_N_If_Statement (N : Node_Id);
procedure Expand_N_Loop_Statement (N : Node_Id);
diff --git a/gcc/ada/exp_ch6.adb b/gcc/ada/exp_ch6.adb
index 14c5d18..cd972e1 100644
--- a/gcc/ada/exp_ch6.adb
+++ b/gcc/ada/exp_ch6.adb
@@ -6033,6 +6033,7 @@ package body Exp_Ch6 is
-- Set the flag to prevent infinite recursion
Set_Comes_From_Extended_Return_Statement (Return_Stmt);
+ Set_Return_Statement (Ret_Obj_Id, Return_Stmt);
Rewrite (N, Result);
@@ -6063,6 +6064,23 @@ package body Exp_Ch6 is
Expand_Call (N);
end Expand_N_Procedure_Call_Statement;
+ ------------------------------------
+ -- Expand_N_Return_When_Statement --
+ ------------------------------------
+
+ procedure Expand_N_Return_When_Statement (N : Node_Id) is
+ Loc : constant Source_Ptr := Sloc (N);
+ begin
+ Rewrite (N,
+ Make_If_Statement (Loc,
+ Condition => Condition (N),
+ Then_Statements => New_List (
+ Make_Simple_Return_Statement (Loc,
+ Expression => Expression (N)))));
+
+ Analyze (N);
+ end Expand_N_Return_When_Statement;
+
--------------------------------------
-- Expand_N_Simple_Return_Statement --
--------------------------------------
diff --git a/gcc/ada/exp_ch6.ads b/gcc/ada/exp_ch6.ads
index 3b589be..07a88c5 100644
--- a/gcc/ada/exp_ch6.ads
+++ b/gcc/ada/exp_ch6.ads
@@ -32,6 +32,7 @@ package Exp_Ch6 is
procedure Expand_N_Extended_Return_Statement (N : Node_Id);
procedure Expand_N_Function_Call (N : Node_Id);
procedure Expand_N_Procedure_Call_Statement (N : Node_Id);
+ procedure Expand_N_Return_When_Statement (N : Node_Id);
procedure Expand_N_Simple_Return_Statement (N : Node_Id);
procedure Expand_N_Subprogram_Body (N : Node_Id);
procedure Expand_N_Subprogram_Body_Stub (N : Node_Id);
diff --git a/gcc/ada/exp_ch9.adb b/gcc/ada/exp_ch9.adb
index 3948b6a..6b1e284 100644
--- a/gcc/ada/exp_ch9.adb
+++ b/gcc/ada/exp_ch9.adb
@@ -282,7 +282,11 @@ package body Exp_Ch9 is
Concval : Node_Id;
Ename : Node_Id;
Index : Node_Id);
- -- Some comments here would be useful ???
+ -- Build the call corresponding to the task entry call. N is the task entry
+ -- call, Concval is the concurrent object, Ename is the entry name and
+ -- Index is the entry family index.
+ -- Note that N might be expanded into an N_Block_Statement if it gets
+ -- inlined.
function Build_Task_Proc_Specification (T : Entity_Id) return Node_Id;
-- This routine constructs a specification for the procedure that we will
diff --git a/gcc/ada/exp_dbug.adb b/gcc/ada/exp_dbug.adb
index ef7b024..ed5ae43 100644
--- a/gcc/ada/exp_dbug.adb
+++ b/gcc/ada/exp_dbug.adb
@@ -1557,7 +1557,7 @@ package body Exp_Dbug is
then
Set_BNPE_Suffix (Ent);
- -- Strip trailing n's and last trailing b as required. note that
+ -- Strip trailing n's and last trailing b as required. Note that
-- we know there is at least one b, or no suffix would be generated.
while Name_Buffer (Name_Len) = 'n' loop
diff --git a/gcc/ada/exp_dist.adb b/gcc/ada/exp_dist.adb
index 7fb2132..9805457 100644
--- a/gcc/ada/exp_dist.adb
+++ b/gcc/ada/exp_dist.adb
@@ -2859,9 +2859,9 @@ package body Exp_Dist is
if E_Calling_Stubs = Empty then
RCI_Locator := RCI_Locator_Table.Get (RCI_Package);
- -- The RCI_Locator package and calling stub are is inserted at the
- -- top level in the current unit, and must appear in the proper scope
- -- so that it is not prematurely removed by the GCC back end.
+ -- The RCI_Locator package and calling stub are inserted at the top
+ -- level in the current unit, and must appear in the proper scope so
+ -- that it is not prematurely removed by the GCC back end.
declare
Scop : constant Entity_Id := Cunit_Entity (Current_Sem_Unit);
diff --git a/gcc/ada/exp_imgv.adb b/gcc/ada/exp_imgv.adb
index 54626be..38ee11e 100644
--- a/gcc/ada/exp_imgv.adb
+++ b/gcc/ada/exp_imgv.adb
@@ -1422,6 +1422,71 @@ package body Exp_Imgv is
Analyze_And_Resolve (N, Standard_String, Suppress => All_Checks);
end Expand_Image_Attribute;
+ ----------------------------------
+ -- Expand_Valid_Value_Attribute --
+ ----------------------------------
+
+ procedure Expand_Valid_Value_Attribute (N : Node_Id) is
+ Loc : constant Source_Ptr := Sloc (N);
+ Btyp : constant Entity_Id := Base_Type (Entity (Prefix (N)));
+ Rtyp : constant Entity_Id := Root_Type (Btyp);
+ pragma Assert (Is_Enumeration_Type (Rtyp));
+
+ Args : constant List_Id := Expressions (N);
+ Func : RE_Id;
+ Ttyp : Entity_Id;
+
+ begin
+ -- Generate:
+
+ -- Valid_Enumeration_Value _NN
+ -- (typS, typN'Address, typH'Unrestricted_Access, Num, X)
+
+ Ttyp := Component_Type (Etype (Lit_Indexes (Rtyp)));
+
+ if Ttyp = Standard_Integer_8 then
+ Func := RE_Valid_Enumeration_Value_8;
+ elsif Ttyp = Standard_Integer_16 then
+ Func := RE_Valid_Enumeration_Value_16;
+ else
+ Func := RE_Valid_Enumeration_Value_32;
+ end if;
+
+ Prepend_To (Args,
+ Make_Attribute_Reference (Loc,
+ Prefix => New_Occurrence_Of (Rtyp, Loc),
+ Attribute_Name => Name_Pos,
+ Expressions => New_List (
+ Make_Attribute_Reference (Loc,
+ Prefix => New_Occurrence_Of (Rtyp, Loc),
+ Attribute_Name => Name_Last))));
+
+ if Present (Lit_Hash (Rtyp)) then
+ Prepend_To (Args,
+ Make_Attribute_Reference (Loc,
+ Prefix => New_Occurrence_Of (Lit_Hash (Rtyp), Loc),
+ Attribute_Name => Name_Unrestricted_Access));
+ else
+ Prepend_To (Args, Make_Null (Loc));
+ end if;
+
+ Prepend_To (Args,
+ Make_Attribute_Reference (Loc,
+ Prefix => New_Occurrence_Of (Lit_Indexes (Rtyp), Loc),
+ Attribute_Name => Name_Address));
+
+ Prepend_To (Args,
+ New_Occurrence_Of (Lit_Strings (Rtyp), Loc));
+
+ Rewrite (N,
+ Make_Function_Call (Loc,
+ Name =>
+ New_Occurrence_Of (RTE (Func), Loc),
+ Parameter_Associations => Args));
+
+ Analyze_And_Resolve (N, Standard_Boolean);
+ end Expand_Valid_Value_Attribute;
+
----------------------------
-- Expand_Value_Attribute --
----------------------------
@@ -1490,28 +1555,26 @@ package body Exp_Imgv is
procedure Expand_Value_Attribute (N : Node_Id) is
Loc : constant Source_Ptr := Sloc (N);
- Typ : constant Entity_Id := Etype (N);
- Btyp : constant Entity_Id := Base_Type (Typ);
- Rtyp : constant Entity_Id := Root_Type (Typ);
- Exprs : constant List_Id := Expressions (N);
- Args : List_Id;
- Func : RE_Id;
+ Btyp : constant Entity_Id := Etype (N);
+ pragma Assert (Is_Base_Type (Btyp));
+ pragma Assert (Btyp = Base_Type (Entity (Prefix (N))));
+ Rtyp : constant Entity_Id := Root_Type (Btyp);
+
+ Args : constant List_Id := Expressions (N);
Ttyp : Entity_Id;
Vid : RE_Id;
begin
- Args := Exprs;
-
-- Fall through for all cases except user-defined enumeration type
-- and decimal types, with Vid set to the Id of the entity for the
-- Value routine and Args set to the list of parameters for the call.
- if Rtyp = Standard_Character then
- Vid := RE_Value_Character;
-
- elsif Rtyp = Standard_Boolean then
+ if Rtyp = Standard_Boolean then
Vid := RE_Value_Boolean;
+ elsif Rtyp = Standard_Character then
+ Vid := RE_Value_Character;
+
elsif Rtyp = Standard_Wide_Character then
Vid := RE_Value_Wide_Character;
@@ -1633,7 +1696,7 @@ package body Exp_Imgv is
-- Case of pragma Discard_Names, transform the Value
-- attribute to Btyp'Val (Long_Long_Integer'Value (Args))
- if Discard_Names (First_Subtype (Typ))
+ if Discard_Names (First_Subtype (Btyp))
or else No (Lit_Strings (Rtyp))
then
Rewrite (N,
@@ -1659,11 +1722,11 @@ package body Exp_Imgv is
Ttyp := Component_Type (Etype (Lit_Indexes (Rtyp)));
if Ttyp = Standard_Integer_8 then
- Func := RE_Value_Enumeration_8;
+ Vid := RE_Value_Enumeration_8;
elsif Ttyp = Standard_Integer_16 then
- Func := RE_Value_Enumeration_16;
+ Vid := RE_Value_Enumeration_16;
else
- Func := RE_Value_Enumeration_32;
+ Vid := RE_Value_Enumeration_32;
end if;
Prepend_To (Args,
@@ -1694,12 +1757,12 @@ package body Exp_Imgv is
Rewrite (N,
Make_Attribute_Reference (Loc,
- Prefix => New_Occurrence_Of (Typ, Loc),
+ Prefix => New_Occurrence_Of (Btyp, Loc),
Attribute_Name => Name_Val,
Expressions => New_List (
Make_Function_Call (Loc,
Name =>
- New_Occurrence_Of (RTE (Func), Loc),
+ New_Occurrence_Of (RTE (Vid), Loc),
Parameter_Associations => Args))));
Analyze_And_Resolve (N, Btyp);
@@ -1711,11 +1774,7 @@ package body Exp_Imgv is
-- Compiling package Ada.Tags under No_Run_Time_Mode we disable the
-- expansion of the attribute into the function call statement to avoid
-- generating spurious errors caused by the use of Integer_Address'Value
- -- in our implementation of Ada.Tags.Internal_Tag
-
- -- Seems like a bit of a odd approach, there should be a better way ???
-
- -- There is a better way, test RTE_Available ???
+ -- in our implementation of Ada.Tags.Internal_Tag.
if No_Run_Time_Mode
and then Is_RTE (Rtyp, RE_Integer_Address)
@@ -1726,6 +1785,7 @@ package body Exp_Imgv is
Rewrite (N,
Unchecked_Convert_To (Rtyp,
Make_Integer_Literal (Loc, Uint_0)));
+
else
Rewrite (N,
Convert_To (Btyp,
diff --git a/gcc/ada/exp_imgv.ads b/gcc/ada/exp_imgv.ads
index 4b9fb81..f6ce172 100644
--- a/gcc/ada/exp_imgv.ads
+++ b/gcc/ada/exp_imgv.ads
@@ -85,6 +85,10 @@ package Exp_Imgv is
-- This procedure is called from Exp_Attr to expand an occurrence of the
-- attribute Wide_Wide_Image.
+ procedure Expand_Valid_Value_Attribute (N : Node_Id);
+ -- This procedure is called from Exp_Attr to expand an occurrence of the
+ -- attribute Valid_Value.
+
procedure Expand_Value_Attribute (N : Node_Id);
-- This procedure is called from Exp_Attr to expand an occurrence of the
-- attribute Value.
diff --git a/gcc/ada/exp_put_image.adb b/gcc/ada/exp_put_image.adb
index a41b71f..33c72c3 100644
--- a/gcc/ada/exp_put_image.adb
+++ b/gcc/ada/exp_put_image.adb
@@ -339,7 +339,7 @@ package body Exp_Put_Image is
-- For other elementary types, generate:
--
- -- Put_Wide_Wide_String (Sink, U_Type'Wide_Wide_Image (Item));
+ -- Wide_Wide_Put (Sink, U_Type'Wide_Wide_Image (Item));
--
-- It would be more elegant to do it the other way around (define
-- '[[Wide_]Wide_]Image in terms of 'Put_Image). But this is easier
@@ -366,7 +366,7 @@ package body Exp_Put_Image is
Put_Call : constant Node_Id :=
Make_Procedure_Call_Statement (Loc,
Name =>
- New_Occurrence_Of (RTE (RE_Put_Wide_Wide_String), Loc),
+ New_Occurrence_Of (RTE (RE_Wide_Wide_Put), Loc),
Parameter_Associations => New_List
(Relocate_Node (Sink), Image));
begin
@@ -758,7 +758,8 @@ package body Exp_Put_Image is
In_Present => True,
Out_Present => True,
Parameter_Type =>
- New_Occurrence_Of (Class_Wide_Type (RTE (RE_Sink)), Loc)),
+ New_Occurrence_Of
+ (Class_Wide_Type (RTE (RE_Root_Buffer_Type)), Loc)),
Make_Parameter_Specification (Loc,
Defining_Identifier => Make_Defining_Identifier (Loc, Name_V),
@@ -816,13 +817,16 @@ package body Exp_Put_Image is
function Enable_Put_Image (Typ : Entity_Id) return Boolean is
begin
+ -- The name "Sink" here is a short nickname for
+ -- "Ada.Strings.Text_Buffers.Root_Buffer_Type".
+
-- There's a bit of a chicken&egg problem. The compiler is likely to
-- have trouble if we refer to the Put_Image of Sink itself, because
-- Sink is part of the parameter profile:
--
-- function Sink'Put_Image (S : in out Sink'Class; V : T);
--
- -- Likewise, the Ada.Strings.Text_Output package, where Sink is
+ -- Likewise, the Ada.Strings.Buffer package, where Sink is
-- declared, depends on various other packages, so if we refer to
-- Put_Image of types declared in those other packages, we could create
-- cyclic dependencies. Therefore, we disable Put_Image for some
@@ -858,13 +862,13 @@ package body Exp_Put_Image is
-- If type Sink is unavailable in this runtime, disable Put_Image
-- altogether.
- if No_Run_Time_Mode or else not RTE_Available (RE_Sink) then
+ if No_Run_Time_Mode or else not RTE_Available (RE_Root_Buffer_Type) then
return False;
end if;
- -- ???Disable Put_Image on type Sink declared in
- -- Ada.Strings.Text_Output. Note that we can't call Is_RTU on
- -- Ada_Strings_Text_Output, because it's not known yet (we might be
+ -- ???Disable Put_Image on type Root_Buffer_Type declared in
+ -- Ada.Strings.Text_Buffers. Note that we can't call Is_RTU on
+ -- Ada_Strings_Text_Buffers, because it's not known yet (we might be
-- compiling it). But this is insufficient to allow support for tagged
-- predefined types.
@@ -873,7 +877,7 @@ package body Exp_Put_Image is
begin
if Present (Parent_Scope)
and then Is_RTU (Parent_Scope, Ada_Strings)
- and then Chars (Scope (Typ)) = Name_Find ("text_output")
+ and then Chars (Scope (Typ)) = Name_Find ("text_buffers")
then
return False;
end if;
@@ -964,11 +968,8 @@ package body Exp_Put_Image is
Make_Object_Declaration (Loc,
Defining_Identifier => Sink_Entity,
Object_Definition =>
- New_Occurrence_Of (RTE (RE_Buffer), Loc),
- Expression =>
- Make_Function_Call (Loc,
- Name => New_Occurrence_Of (RTE (RE_New_Buffer), Loc),
- Parameter_Associations => Empty_List));
+ New_Occurrence_Of (RTE (RE_Buffer_Type), Loc));
+
Put_Im : constant Node_Id :=
Make_Attribute_Reference (Loc,
Prefix => New_Occurrence_Of (U_Type, Loc),
@@ -996,15 +997,16 @@ package body Exp_Put_Image is
return Image;
end Build_Image_Call;
- ------------------
- -- Preload_Sink --
- ------------------
+ ------------------------------
+ -- Preload_Root_Buffer_Type --
+ ------------------------------
- procedure Preload_Sink (Compilation_Unit : Node_Id) is
+ procedure Preload_Root_Buffer_Type (Compilation_Unit : Node_Id) is
begin
- -- We can't call RTE (RE_Sink) for at least some predefined units,
- -- because it would introduce cyclic dependences. The package where Sink
- -- is declared, for example, and things it depends on.
+ -- We can't call RTE (RE_Root_Buffer_Type) for at least some
+ -- predefined units, because it would introduce cyclic dependences.
+ -- The package where Root_Buffer_Type is declared, for example, and
+ -- things it depends on.
--
-- It's only needed for tagged types, so don't do it unless Put_Image is
-- enabled for tagged types, and we've seen a tagged type. Note that
@@ -1013,25 +1015,26 @@ package body Exp_Put_Image is
-- It's unfortunate to have this Tagged_Seen processing so scattered
-- about, but we need to know if there are tagged types where this is
-- called in Analyze_Compilation_Unit, before we have analyzed any type
- -- declarations. This mechanism also prevents doing RTE (RE_Sink) when
- -- compiling the compiler itself. Packages Ada.Strings.Text_Output and
- -- friends are not included in the compiler.
+ -- declarations. This mechanism also prevents doing
+ -- RTE (RE_Root_Buffer_Type) when compiling the compiler itself.
+ -- Packages Ada.Strings.Buffer_Types and friends are not included
+ -- in the compiler.
--
- -- Don't do it if type Sink is unavailable in the runtime.
+ -- Don't do it if type Root_Buffer_Type is unavailable in the runtime.
if not In_Predefined_Unit (Compilation_Unit)
and then Tagged_Put_Image_Enabled
and then Tagged_Seen
and then not No_Run_Time_Mode
- and then RTE_Available (RE_Sink)
+ and then RTE_Available (RE_Root_Buffer_Type)
then
declare
- Ignore : constant Entity_Id := RTE (RE_Sink);
+ Ignore : constant Entity_Id := RTE (RE_Root_Buffer_Type);
begin
null;
end;
end if;
- end Preload_Sink;
+ end Preload_Root_Buffer_Type;
-------------------------
-- Put_Image_Base_Type --
diff --git a/gcc/ada/exp_put_image.ads b/gcc/ada/exp_put_image.ads
index 7ef8eef..4f049f1 100644
--- a/gcc/ada/exp_put_image.ads
+++ b/gcc/ada/exp_put_image.ads
@@ -27,8 +27,9 @@ with Types; use Types;
package Exp_Put_Image is
- -- Routines to build Put_Image calls. See Ada.Strings.Text_Output.Utils and
- -- System.Put_Images for the run-time routines we are generating calls to.
+ -- Routines to build Put_Image calls. See Ada.Strings.Text_Buffers.Utils
+ -- and System.Put_Images for the run-time routines we are generating calls
+ -- to.
-- For a call to T'Put_Image, if T is elementary, we expand the code
-- inline. If T is a tagged type, then Put_Image is a primitive procedure
@@ -94,10 +95,10 @@ package Exp_Put_Image is
-- to call T'Put_Image into a buffer and then extract the string from the
-- buffer.
- procedure Preload_Sink (Compilation_Unit : Node_Id);
- -- Call RTE (RE_Sink) if necessary, to load the packages involved in
- -- Put_Image. We need to do this explicitly, fairly early during
- -- compilation, because otherwise it happens during freezing, which
+ procedure Preload_Root_Buffer_Type (Compilation_Unit : Node_Id);
+ -- Call RTE (RE_Root_Buffer_Type) if necessary, to load the packages
+ -- involved in Put_Image. We need to do this explicitly, fairly early
+ -- during compilation, because otherwise it happens during freezing, which
-- triggers visibility bugs in generic instantiations.
end Exp_Put_Image;
diff --git a/gcc/ada/exp_util.adb b/gcc/ada/exp_util.adb
index ed1a016..d02e587 100644
--- a/gcc/ada/exp_util.adb
+++ b/gcc/ada/exp_util.adb
@@ -5343,10 +5343,15 @@ package body Exp_Util is
All_FLBs_Match : Boolean := True;
begin
- -- Sliding should never be needed for string literals, because they have
- -- their bounds set according to the applicable index constraint.
-
- if Nkind (N) /= N_String_Literal then
+ -- This procedure is called during semantic analysis, and we only expand
+ -- a sliding conversion when Expander_Active, to avoid doing it during
+ -- preanalysis (which can lead to problems with the target subtype not
+ -- getting properly expanded during later full analysis). Also, sliding
+ -- should never be needed for string literals, because their bounds are
+ -- determined directly based on the fixed lower bound of Arr_Typ and
+ -- their length.
+
+ if Expander_Active and then Nkind (N) /= N_String_Literal then
Constraints := New_List;
Act_Subt := Get_Actual_Subtype (N);
diff --git a/gcc/ada/expander.adb b/gcc/ada/expander.adb
index 8243df2..e0483b7 100644
--- a/gcc/ada/expander.adb
+++ b/gcc/ada/expander.adb
@@ -274,6 +274,9 @@ package body Expander is
when N_Generic_Instantiation =>
Expand_N_Generic_Instantiation (N);
+ when N_Goto_When_Statement =>
+ Expand_N_Goto_When_Statement (N);
+
when N_Handled_Sequence_Of_Statements =>
Expand_N_Handled_Sequence_Of_Statements (N);
@@ -421,6 +424,9 @@ package body Expander is
when N_Raise_Statement =>
Expand_N_Raise_Statement (N);
+ when N_Raise_When_Statement =>
+ Expand_N_Raise_When_Statement (N);
+
when N_Raise_Constraint_Error =>
Expand_N_Raise_Constraint_Error (N);
@@ -442,6 +448,9 @@ package body Expander is
when N_Requeue_Statement =>
Expand_N_Requeue_Statement (N);
+ when N_Return_When_Statement =>
+ Expand_N_Return_When_Statement (N);
+
when N_Simple_Return_Statement =>
Expand_N_Simple_Return_Statement (N);
diff --git a/gcc/ada/fe.h b/gcc/ada/fe.h
index dc2b416..3e42f16 100644
--- a/gcc/ada/fe.h
+++ b/gcc/ada/fe.h
@@ -190,6 +190,7 @@ extern Boolean In_Extended_Main_Code_Unit (Entity_Id);
/* opt: */
#define Ada_Version opt__ada_version
+#define Assume_No_Invalid_Values opt__assume_no_invalid_values
#define Back_End_Inlining opt__back_end_inlining
#define Debug_Generated_Code opt__debug_generated_code
#define Enable_128bit_Types opt__enable_128bit_types
@@ -211,6 +212,7 @@ typedef enum {
} Exception_Mechanism_Type;
extern Ada_Version_Type Ada_Version;
+extern Boolean Assume_No_Invalid_Values;
extern Boolean Back_End_Inlining;
extern Boolean Debug_Generated_Code;
extern Boolean Enable_128bit_Types;
diff --git a/gcc/ada/gen_il-fields.ads b/gcc/ada/gen_il-fields.ads
index 220db60..603f08a 100644
--- a/gcc/ada/gen_il-fields.ads
+++ b/gcc/ada/gen_il-fields.ads
@@ -136,6 +136,7 @@ package Gen_IL.Fields is
Default_Expression,
Default_Storage_Pool,
Default_Name,
+ Default_Subtype_Mark,
Defining_Identifier,
Defining_Unit_Name,
Delay_Alternative,
@@ -873,6 +874,7 @@ package Gen_IL.Fields is
Requires_Overriding,
Return_Applies_To,
Return_Present,
+ Return_Statement,
Returns_By_Ref,
Reverse_Bit_Order,
Reverse_Storage_Order,
diff --git a/gcc/ada/gen_il-gen-gen_entities.adb b/gcc/ada/gen_il-gen-gen_entities.adb
index dda309b..9fe9012 100644
--- a/gcc/ada/gen_il-gen-gen_entities.adb
+++ b/gcc/ada/gen_il-gen-gen_entities.adb
@@ -350,6 +350,7 @@ begin -- Gen_IL.Gen.Gen_Entities
Sm (Prival_Link, Node_Id),
Sm (Related_Expression, Node_Id),
Sm (Related_Type, Node_Id),
+ Sm (Return_Statement, Node_Id),
Sm (Size_Check_Code, Node_Id),
Sm (SPARK_Pragma, Node_Id),
Sm (SPARK_Pragma_Inherited, Flag),
@@ -421,6 +422,7 @@ begin -- Gen_IL.Gen.Gen_Entities
Sm (Prival_Link, Node_Id),
Sm (Related_Expression, Node_Id),
Sm (Related_Type, Node_Id),
+ Sm (Return_Statement, Node_Id),
Sm (Shared_Var_Procs_Instance, Node_Id),
Sm (Size_Check_Code, Node_Id),
Sm (SPARK_Pragma, Node_Id),
diff --git a/gcc/ada/gen_il-gen-gen_nodes.adb b/gcc/ada/gen_il-gen-gen_nodes.adb
index 13bdd71..26fc069 100644
--- a/gcc/ada/gen_il-gen-gen_nodes.adb
+++ b/gcc/ada/gen_il-gen-gen_nodes.adb
@@ -610,7 +610,8 @@ begin -- Gen_IL.Gen.Gen_Nodes
(Sy (Defining_Identifier, Node_Id),
Sy (Formal_Type_Definition, Node_Id),
Sy (Discriminant_Specifications, List_Id, Default_No_List),
- Sy (Unknown_Discriminants_Present, Flag)));
+ Sy (Unknown_Discriminants_Present, Flag),
+ Sy (Default_Subtype_Mark, Node_Id)));
Cc (N_Full_Type_Declaration, N_Declaration,
(Sy (Defining_Identifier, Node_Id),
@@ -1018,6 +1019,10 @@ begin -- Gen_IL.Gen.Gen_Nodes
(Sy (Name, Node_Id, Default_Empty),
Sm (Exception_Junk, Flag)));
+ Cc (N_Goto_When_Statement, N_Statement_Other_Than_Procedure_Call,
+ (Sy (Name, Node_Id, Default_Empty),
+ Sy (Condition, Node_Id, Default_Empty)));
+
Cc (N_Loop_Statement, N_Statement_Other_Than_Procedure_Call,
(Sy (Identifier, Node_Id, Default_Empty),
Sy (Iteration_Scheme, Node_Id, Default_Empty),
@@ -1035,6 +1040,11 @@ begin -- Gen_IL.Gen.Gen_Nodes
Sy (Expression, Node_Id, Default_Empty),
Sm (From_At_End, Flag)));
+ Cc (N_Raise_When_Statement, N_Statement_Other_Than_Procedure_Call,
+ (Sy (Name, Node_Id, Default_Empty),
+ Sy (Expression, Node_Id, Default_Empty),
+ Sy (Condition, Node_Id, Default_Empty)));
+
Cc (N_Requeue_Statement, N_Statement_Other_Than_Procedure_Call,
(Sy (Name, Node_Id, Default_Empty),
Sy (Abort_Present, Flag),
@@ -1060,6 +1070,10 @@ begin -- Gen_IL.Gen.Gen_Nodes
Sm (Return_Statement_Entity, Node_Id),
Sm (Storage_Pool, Node_Id)));
+ Cc (N_Return_When_Statement, N_Statement_Other_Than_Procedure_Call,
+ (Sy (Expression, Node_Id, Default_Empty),
+ Sy (Condition, Node_Id, Default_Empty)));
+
Cc (N_Selective_Accept, N_Statement_Other_Than_Procedure_Call,
(Sy (Select_Alternatives, List_Id),
Sy (Else_Statements, List_Id, Default_No_List)));
diff --git a/gcc/ada/gen_il-gen.adb b/gcc/ada/gen_il-gen.adb
index 7ef285e..6b48e8e 100644
--- a/gcc/ada/gen_il-gen.adb
+++ b/gcc/ada/gen_il-gen.adb
@@ -24,6 +24,7 @@
------------------------------------------------------------------------------
with Ada.Containers; use type Ada.Containers.Count_Type;
+with Ada.Text_IO;
package body Gen_IL.Gen is
@@ -536,15 +537,15 @@ package body Gen_IL.Gen is
-- Print out the Einfo.Entities package spec and body
procedure Put_Type_And_Subtypes
- (S : in out Sink'Class; Root : Root_Type);
+ (S : in out Sink; Root : Root_Type);
-- Called by Put_Nodes and Put_Entities to print out the main type
-- and subtype declarations in Sinfo.Nodes and Einfo.Entities.
- procedure Put_Subp_Decls (S : in out Sink'Class; Root : Root_Type);
+ procedure Put_Subp_Decls (S : in out Sink; Root : Root_Type);
-- Called by Put_Nodes and Put_Entities to print out the subprogram
-- declarations in Sinfo.Nodes and Einfo.Entities.
- procedure Put_Subp_Bodies (S : in out Sink'Class; Root : Root_Type);
+ procedure Put_Subp_Bodies (S : in out Sink; Root : Root_Type);
-- Called by Put_Nodes and Put_Entities to print out the subprogram
-- bodies in Sinfo.Nodes and Einfo.Entities.
@@ -554,29 +555,29 @@ package body Gen_IL.Gen is
-- parameter N). But if Type_Only was specified, we need to fetch the
-- corresponding base (etc) type.
- procedure Put_Getter_Spec (S : in out Sink'Class; F : Field_Enum);
- procedure Put_Setter_Spec (S : in out Sink'Class; F : Field_Enum);
- procedure Put_Getter_Decl (S : in out Sink'Class; F : Field_Enum);
- procedure Put_Setter_Decl (S : in out Sink'Class; F : Field_Enum);
- procedure Put_Getter_Body (S : in out Sink'Class; F : Field_Enum);
- procedure Put_Setter_Body (S : in out Sink'Class; F : Field_Enum);
+ procedure Put_Getter_Spec (S : in out Sink; F : Field_Enum);
+ procedure Put_Setter_Spec (S : in out Sink; F : Field_Enum);
+ procedure Put_Getter_Decl (S : in out Sink; F : Field_Enum);
+ procedure Put_Setter_Decl (S : in out Sink; F : Field_Enum);
+ procedure Put_Getter_Body (S : in out Sink; F : Field_Enum);
+ procedure Put_Setter_Body (S : in out Sink; F : Field_Enum);
-- Print out the specification, declaration, or body of a getter or
-- setter for the given field.
procedure Put_Precondition
- (S : in out Sink'Class; F : Field_Enum);
+ (S : in out Sink; F : Field_Enum);
-- Print out the precondition, if any, for a getter or setter for the
-- given field.
procedure Put_Low_Level_Accessor_Instantiations
- (S : in out Sink'Class; T : Type_Enum);
+ (S : in out Sink; T : Type_Enum);
-- Print out the low-level getter and setter for a given type
- procedure Put_Traversed_Fields (S : in out Sink'Class);
+ procedure Put_Traversed_Fields (S : in out Sink);
-- Called by Put_Nodes to print out the Traversed_Fields table in
-- Sinfo.Nodes.
- procedure Put_Tables (S : in out Sink'Class; Root : Root_Type);
+ procedure Put_Tables (S : in out Sink; Root : Root_Type);
-- Called by Put_Nodes and Put_Entities to print out the various tables
-- in Sinfo.Nodes and Einfo.Entities.
@@ -584,14 +585,14 @@ package body Gen_IL.Gen is
-- Print out the Nmake package spec and body, containing
-- Make_... functions for each concrete node type.
- procedure Put_Make_Decls (S : in out Sink'Class; Root : Root_Type);
+ procedure Put_Make_Decls (S : in out Sink; Root : Root_Type);
-- Called by Put_Nmake to print out the Make_... function declarations
- procedure Put_Make_Bodies (S : in out Sink'Class; Root : Root_Type);
+ procedure Put_Make_Bodies (S : in out Sink; Root : Root_Type);
-- Called by Put_Nmake to print out the Make_... function bodies
procedure Put_Make_Spec
- (S : in out Sink'Class; Root : Root_Type; T : Concrete_Type);
+ (S : in out Sink; Root : Root_Type; T : Concrete_Type);
-- Called by Put_Make_Decls and Put_Make_Bodies to print out the spec of
-- a single Make_... function.
@@ -606,27 +607,27 @@ package body Gen_IL.Gen is
-- Print out the einfo.h file
procedure Put_C_Type_And_Subtypes
- (S : in out Sink'Class; Root : Root_Type);
+ (S : in out Sink; Root : Root_Type);
-- Used by Put_Sinfo_Dot_H and Put_Einfo_Dot_H to print out the C code
-- corresponding to the Ada Node_Kind, Entity_Kind, and subtypes
-- thereof.
procedure Put_Low_Level_C_Getter
- (S : in out Sink'Class; T : Type_Enum);
+ (S : in out Sink; T : Type_Enum);
-- Used by Put_Sinfo_Dot_H and Put_Einfo_Dot_H to print out low-level
-- getters.
procedure Put_High_Level_C_Getters
- (S : in out Sink'Class; Root : Root_Type);
+ (S : in out Sink; Root : Root_Type);
-- Used by Put_Sinfo_Dot_H and Put_Einfo_Dot_H to print out high-level
-- getters.
procedure Put_High_Level_C_Getter
- (S : in out Sink'Class; F : Field_Enum);
+ (S : in out Sink; F : Field_Enum);
-- Used by Put_High_Level_C_Getters to print out one high-level getter.
procedure Put_Union_Membership
- (S : in out Sink'Class; Root : Root_Type);
+ (S : in out Sink; Root : Root_Type);
-- Used by Put_Sinfo_Dot_H and Put_Einfo_Dot_H to print out functions to
-- test membership in a union type.
@@ -764,7 +765,8 @@ package body Gen_IL.Gen is
for F of Type_Table (CT).Fields loop
if Fields_Per_Node (CT) (F) then
- Put ("duplicate field \1.\2\n", Image (CT), Image (F));
+ Ada.Text_IO.Put_Line
+ ("duplicate field" & Image (CT) & Image (F));
Duplicate_Fields_Found := True;
end if;
@@ -1383,7 +1385,7 @@ package body Gen_IL.Gen is
---------------------------
procedure Put_Type_And_Subtypes
- (S : in out Sink'Class; Root : Root_Type)
+ (S : in out Sink; Root : Root_Type)
is
procedure Put_Enum_Type;
@@ -1411,10 +1413,10 @@ package body Gen_IL.Gen is
if First_Time then
First_Time := False;
else
- Put (S, ",\n");
+ Put (S, "," & LF);
end if;
- Put (S, "\1", Image (T));
+ Put (S, Image (T));
end if;
end Put_Enum_Lit;
@@ -1423,14 +1425,15 @@ package body Gen_IL.Gen is
Num_Types : constant Root_Int := Dummy'Length;
begin
- Put (S, "type \1 is -- \2 \1s\n", Image (Root), Image (Num_Types));
- Indent (S, 2);
+ Put (S, "type " & Image (Root) & " is -- " &
+ Image (Num_Types) & " " & Image (Root) & "s" & LF);
+ Increase_Indent (S, 2);
Put (S, "(");
- Indent (S, 1);
+ Increase_Indent (S, 1);
Iterate_Types (Root, Pre => Put_Enum_Lit'Access);
- Outdent (S, 1);
- Put (S, "\n) with Size => 8; -- \1\n\n", Image (Root));
- Outdent (S, 2);
+ Decrease_Indent (S, 1);
+ Put (S, LF & ") with Size => 8; -- " & Image (Root) & LF & LF);
+ Decrease_Indent (S, 2);
end Put_Enum_Type;
procedure Put_Kind_Subtype (T : Node_Or_Entity_Type) is
@@ -1439,35 +1442,32 @@ package body Gen_IL.Gen is
if Type_Table (T).Is_Union then
pragma Assert (Type_Table (T).Parent = Root);
- Put (S, "subtype \1 is\n", Image (T));
- Indent (S, 2);
- Put (S, "\1 with Predicate =>\n",
- Image (Root));
- Indent (S, 2);
- Put (S, "\1 in\n", Image (T));
+ Put (S, "subtype " & Image (T) & " is" & LF);
+ Increase_Indent (S, 2);
+ Put (S, Image (Root) & " with Predicate =>" & LF);
+ Increase_Indent (S, 2);
+ Put (S, Image (T) & " in" & LF);
Put_Types_With_Bars (S, Type_Table (T).Children);
- Outdent (S, 2);
- Put (S, ";\n");
- Outdent (S, 2);
+ Decrease_Indent (S, 2);
+ Put (S, ";" & LF);
+ Decrease_Indent (S, 2);
elsif Type_Table (T).Parent /= No_Type then
- Put (S, "subtype \1 is \2 range\n",
- Image (T),
- Image (Type_Table (T).Parent));
- Indent (S, 2);
- Put (S, "\1 .. \2;\n",
- Image (Type_Table (T).First),
- Image (Type_Table (T).Last));
- Outdent (S, 2);
+ Put (S, "subtype " & Image (T) & " is " &
+ Image (Type_Table (T).Parent) & " range" & LF);
+ Increase_Indent (S, 2);
+ Put (S, Image (Type_Table (T).First) & " .. " &
+ Image (Type_Table (T).Last) & ";" & LF);
+ Decrease_Indent (S, 2);
- Indent (S, 3);
+ Increase_Indent (S, 3);
for J in 1 .. Type_Table (T).Concrete_Descendants.Last_Index loop
- Put (S, "-- \1\n",
- Image (Type_Table (T).Concrete_Descendants (J)));
+ Put (S, "-- " &
+ Image (Type_Table (T).Concrete_Descendants (J)) & LF);
end loop;
- Outdent (S, 3);
+ Decrease_Indent (S, 3);
end if;
end if;
end Put_Kind_Subtype;
@@ -1475,19 +1475,19 @@ package body Gen_IL.Gen is
procedure Put_Id_Subtype (T : Node_Or_Entity_Type) is
begin
if Type_Table (T).Parent /= No_Type then
- Put (S, "subtype \1 is\n", Id_Image (T));
- Indent (S, 2);
- Put (S, "\1", Id_Image (Type_Table (T).Parent));
+ Put (S, "subtype " & Id_Image (T) & " is" & LF);
+ Increase_Indent (S, 2);
+ Put (S, Id_Image (Type_Table (T).Parent));
if Enable_Assertions then
- Put (S, " with Predicate =>\n");
- Indent (S, 2);
- Put (S, "K (\1) in \2", Id_Image (T), Image (T));
- Outdent (S, 2);
+ Put (S, " with Predicate =>" & LF);
+ Increase_Indent (S, 2);
+ Put (S, "K (" & Id_Image (T) & ") in " & Image (T));
+ Decrease_Indent (S, 2);
end if;
- Put (S, ";\n");
- Outdent (S, 2);
+ Put (S, ";" & LF);
+ Decrease_Indent (S, 2);
end if;
end Put_Id_Subtype;
@@ -1501,48 +1501,45 @@ package body Gen_IL.Gen is
case Root is
when Node_Kind =>
Put_Getter_Decl (S, Nkind);
- Put (S, "function K (N : Node_Id) return Node_Kind renames Nkind;\n");
- Put (S, "-- Shorthand for use in predicates and preconditions below\n");
- Put (S, "-- There is no procedure Set_Nkind.\n");
- Put (S, "-- See Init_Nkind and Mutate_Nkind in Atree.\n\n");
+ Put (S, "function K (N : Node_Id) return Node_Kind renames Nkind;" & LF);
+ Put (S, "-- Shorthand for use in predicates and preconditions below" & LF);
+ Put (S, "-- There is no procedure Set_Nkind." & LF);
+ Put (S, "-- See Init_Nkind and Mutate_Nkind in Atree." & LF & LF);
when Entity_Kind =>
Put_Getter_Decl (S, Ekind);
- Put (S, "function K (N : Entity_Id) return Entity_Kind renames Ekind;\n");
- Put (S, "-- Shorthand for use in predicates and preconditions below\n");
- Put (S, "-- There is no procedure Set_Ekind here.\n");
- Put (S, "-- See Mutate_Ekind in Atree.\n\n");
+ Put (S, "function K (N : Entity_Id) return Entity_Kind renames Ekind;" & LF);
+ Put (S, "-- Shorthand for use in predicates and preconditions below" & LF);
+ Put (S, "-- There is no procedure Set_Ekind here." & LF);
+ Put (S, "-- See Mutate_Ekind in Atree." & LF & LF);
when others => raise Program_Error;
end case;
- Put (S, "-- Subtypes of \1 for each abstract type:\n\n",
- Image (Root));
+ Put (S, "-- Subtypes of " & Image (Root) & " for each abstract type:" & LF & LF);
- Put (S, "pragma Style_Checks (""M200"");\n");
+ Put (S, "pragma Style_Checks (""M200"");" & LF);
Iterate_Types (Root, Pre => Put_Kind_Subtype'Access);
- Put (S, "\n-- Subtypes of \1 with specified \2.\n",
- Id_Image (Root), Image (Root));
- Put (S, "-- These may be used in place of \1 for better documentation,\n",
- Id_Image (Root));
- Put (S, "-- and if assertions are enabled, for run-time checking.\n\n");
+ Put (S, LF & "-- Subtypes of " & Id_Image (Root) &
+ " with specified " & Image (Root) & "." & LF);
+ Put (S, "-- These may be used in place of " & Id_Image (Root) &
+ " for better documentation," & LF);
+ Put (S, "-- and if assertions are enabled, for run-time checking." & LF & LF);
Iterate_Types (Root, Pre => Put_Id_Subtype'Access);
- Put (S, "\n");
- Put (S, "-- Union types (nonhierarchical subtypes of \1)\n\n",
- Id_Image (Root));
+ Put (S, LF & "-- Union types (nonhierarchical subtypes of " &
+ Id_Image (Root) & ")" & LF & LF);
for T in First_Abstract (Root) .. Last_Abstract (Root) loop
if Type_Table (T) /= null and then Type_Table (T).Is_Union then
Put_Kind_Subtype (T);
Put_Id_Subtype (T);
- Put (S, "\n");
end if;
end loop;
- Put (S, "subtype Flag is Boolean;\n\n");
+ Put (S, "subtype Flag is Boolean;" & LF & LF);
end Put_Type_And_Subtypes;
function Low_Level_Getter_Name (T : Type_Enum) return String is
@@ -1558,7 +1555,7 @@ package body Gen_IL.Gen is
-------------------------------------------
procedure Put_Low_Level_Accessor_Instantiations
- (S : in out Sink'Class; T : Type_Enum)
+ (S : in out Sink; T : Type_Enum)
is
begin
-- Special case for types that have defaults; instantiate
@@ -1572,39 +1569,34 @@ package body Gen_IL.Gen is
(if T = Elist_Id then "No_Elist" else "Uint_0");
begin
- Put (S, "\nfunction \1 is new Get_32_Bit_Field_With_Default (\2, \3) with \4;\n",
- Low_Level_Getter_Name (T),
- Get_Set_Id_Image (T),
- Default_Val,
- Inline);
+ Put (S, LF & "function " & Low_Level_Getter_Name (T) &
+ " is new Get_32_Bit_Field_With_Default (" &
+ Get_Set_Id_Image (T) & ", " & Default_Val &
+ ") with " & Inline & ";" & LF);
end;
-- Otherwise, instantiate the normal getter for the right size in
-- bits.
else
- Put (S, "\nfunction \1 is new Get_\2_Bit_Field (\3) with \4;\n",
- Low_Level_Getter_Name (T),
- Image (Field_Size (T)),
- Get_Set_Id_Image (T),
- Inline);
+ Put (S, LF & "function " & Low_Level_Getter_Name (T) &
+ " is new Get_" & Image (Field_Size (T)) & "_Bit_Field (" &
+ Get_Set_Id_Image (T) & ") with " & Inline & ";" & LF);
end if;
-- No special case for the setter
if T in Node_Kind_Type | Entity_Kind_Type then
- Put (S, "pragma Warnings (Off);\n");
+ Put (S, "pragma Warnings (Off);" & LF);
-- Set_Node_Kind_Type and Set_Entity_Kind_Type might not be called
end if;
- Put (S, "procedure \1 is new Set_\2_Bit_Field (\3) with \4;\n",
- Low_Level_Setter_Name (T),
- Image (Field_Size (T)),
- Get_Set_Id_Image (T),
- Inline);
+ Put (S, "procedure " & Low_Level_Setter_Name (T) & " is new Set_" &
+ Image (Field_Size (T)) & "_Bit_Field (" & Get_Set_Id_Image (T) &
+ ") with " & Inline & ";" & LF);
if T in Node_Kind_Type | Entity_Kind_Type then
- Put (S, "pragma Warnings (On);\n");
+ Put (S, "pragma Warnings (On);" & LF);
end if;
end Put_Low_Level_Accessor_Instantiations;
@@ -1613,7 +1605,7 @@ package body Gen_IL.Gen is
----------------------
procedure Put_Precondition
- (S : in out Sink'Class; F : Field_Enum)
+ (S : in out Sink; F : Field_Enum)
is
-- If the field is present in all entities, we want to assert that
-- N in N_Entity_Id. If the field is present in only some entities,
@@ -1638,21 +1630,21 @@ package body Gen_IL.Gen is
or else Field_Table (F).Have_This_Field = Nodes_And_Entities
then
if Is_Entity /= "" then
- Indent (S, 1);
- Put (S, ", Pre =>\n");
- Put (S, "\1", Is_Entity);
- Outdent (S, 1);
+ Increase_Indent (S, 1);
+ Put (S, ", Pre =>" & LF);
+ Put (S, Is_Entity);
+ Decrease_Indent (S, 1);
end if;
else
- Put (S, ", Pre =>\n");
- Indent (S, 1);
+ Put (S, ", Pre =>" & LF);
+ Increase_Indent (S, 1);
Put (S, "N in ");
Put_Type_Ids_With_Bars (S, Field_Table (F).Have_This_Field);
pragma Assert (Is_Entity = "");
- Outdent (S, 1);
+ Decrease_Indent (S, 1);
end if;
end if;
end Put_Precondition;
@@ -1691,35 +1683,35 @@ package body Gen_IL.Gen is
-- Put_Getter_Spec --
---------------------
- procedure Put_Getter_Spec (S : in out Sink'Class; F : Field_Enum) is
+ procedure Put_Getter_Spec (S : in out Sink; F : Field_Enum) is
begin
- Put (S, "function \1\n", Image (F));
- Indent (S, 2);
- Put (S, "(N : \1) return \2",
- N_Type (F), Get_Set_Id_Image (Field_Table (F).Field_Type));
- Outdent (S, 2);
+ Put (S, "function " & Image (F) & LF);
+ Increase_Indent (S, 2);
+ Put (S, "(N : " & N_Type (F) & ") return " &
+ Get_Set_Id_Image (Field_Table (F).Field_Type));
+ Decrease_Indent (S, 2);
end Put_Getter_Spec;
---------------------
-- Put_Getter_Decl --
---------------------
- procedure Put_Getter_Decl (S : in out Sink'Class; F : Field_Enum) is
+ procedure Put_Getter_Decl (S : in out Sink; F : Field_Enum) is
begin
Put_Getter_Spec (S, F);
- Put (S, " with \1", Inline);
- Indent (S, 2);
+ Put (S, " with " & Inline);
+ Increase_Indent (S, 2);
Put_Precondition (S, F);
- Outdent (S, 2);
- Put (S, ";\n");
+ Decrease_Indent (S, 2);
+ Put (S, ";" & LF);
end Put_Getter_Decl;
---------------------
-- Put_Getter_Body --
---------------------
- procedure Put_Getter_Body (S : in out Sink'Class; F : Field_Enum) is
+ procedure Put_Getter_Body (S : in out Sink; F : Field_Enum) is
Rec : Field_Info renames Field_Table (F).all;
begin
-- Note that we store the result in a local constant below, so that
@@ -1729,66 +1721,64 @@ package body Gen_IL.Gen is
-- and setter.
Put_Getter_Spec (S, F);
- Put (S, " is\n");
- Indent (S, 3);
- Put (S, "Val : constant \1 := \2 (\3, \4);\n",
- Get_Set_Id_Image (Rec.Field_Type),
- Low_Level_Getter_Name (Rec.Field_Type),
- Node_To_Fetch_From (F),
- Image (Rec.Offset));
- Outdent (S, 3);
- Put (S, "begin\n");
- Indent (S, 3);
+ Put (S, " is" & LF);
+ Increase_Indent (S, 3);
+ Put (S, "Val : constant " & Get_Set_Id_Image (Rec.Field_Type) &
+ " := " & Low_Level_Getter_Name (Rec.Field_Type) &
+ " (" & Node_To_Fetch_From (F) & ", " &
+ Image (Rec.Offset) & ");" & LF);
+ Decrease_Indent (S, 3);
+ Put (S, "begin" & LF);
+ Increase_Indent (S, 3);
if Rec.Pre.all /= "" then
- Put (S, "pragma Assert (\1);\n", Rec.Pre.all);
+ Put (S, "pragma Assert (" & Rec.Pre.all & ");" & LF);
end if;
if Rec.Pre_Get.all /= "" then
- Put (S, "pragma Assert (\1);\n", Rec.Pre_Get.all);
+ Put (S, "pragma Assert (" & Rec.Pre_Get.all & ");" & LF);
end if;
- Put (S, "return Val;\n");
- Outdent (S, 3);
- Put (S, "end \1;\n\n", Image (F));
+ Put (S, "return Val;" & LF);
+ Decrease_Indent (S, 3);
+ Put (S, "end " & Image (F) & ";" & LF & LF);
end Put_Getter_Body;
---------------------
-- Put_Setter_Spec --
---------------------
- procedure Put_Setter_Spec (S : in out Sink'Class; F : Field_Enum) is
+ procedure Put_Setter_Spec (S : in out Sink; F : Field_Enum) is
Rec : Field_Info renames Field_Table (F).all;
Default : constant String :=
(if Rec.Field_Type = Flag then " := True" else "");
begin
- Put (S, "procedure Set_\1\n", Image (F));
- Indent (S, 2);
- Put (S, "(N : \1; Val : \2\3)",
- N_Type (F), Get_Set_Id_Image (Rec.Field_Type),
- Default);
- Outdent (S, 2);
+ Put (S, "procedure Set_" & Image (F) & LF);
+ Increase_Indent (S, 2);
+ Put (S, "(N : " & N_Type (F) & "; Val : " &
+ Get_Set_Id_Image (Rec.Field_Type) & Default & ")");
+ Decrease_Indent (S, 2);
end Put_Setter_Spec;
---------------------
-- Put_Setter_Decl --
---------------------
- procedure Put_Setter_Decl (S : in out Sink'Class; F : Field_Enum) is
+ procedure Put_Setter_Decl (S : in out Sink; F : Field_Enum) is
begin
Put_Setter_Spec (S, F);
- Put (S, " with \1", Inline);
- Indent (S, 2);
+ Put (S, " with " & Inline);
+ Increase_Indent (S, 2);
Put_Precondition (S, F);
- Outdent (S, 2);
- Put (S, ";\n");
+ Decrease_Indent (S, 2);
+ Put (S, ";" & LF);
end Put_Setter_Decl;
---------------------
-- Put_Setter_Body --
---------------------
- procedure Put_Setter_Body (S : in out Sink'Class; F : Field_Enum) is
+ procedure Put_Setter_Body (S : in out Sink; F : Field_Enum) is
Rec : Field_Info renames Field_Table (F).all;
-- If Type_Only was specified in the call to Create_Semantic_Field,
@@ -1802,58 +1792,57 @@ package body Gen_IL.Gen is
"Is_Base_Type (N)");
begin
Put_Setter_Spec (S, F);
- Put (S, " is\n");
- Put (S, "begin\n");
- Indent (S, 3);
+ Put (S, " is" & LF);
+ Put (S, "begin" & LF);
+ Increase_Indent (S, 3);
if Rec.Pre.all /= "" then
- Put (S, "pragma Assert (\1);\n", Rec.Pre.all);
+ Put (S, "pragma Assert (" & Rec.Pre.all & ");" & LF);
end if;
if Rec.Pre_Set.all /= "" then
- Put (S, "pragma Assert (\1);\n", Rec.Pre_Set.all);
+ Put (S, "pragma Assert (" & Rec.Pre_Set.all & ");" & LF);
end if;
if Type_Only_Assertion /= "" then
- Put (S, "pragma Assert (\1);\n", Type_Only_Assertion);
+ Put (S, "pragma Assert (" & Type_Only_Assertion & ");" & LF);
end if;
- Put (S, "\1 (N, \2, Val);\n",
- Low_Level_Setter_Name (F),
- Image (Rec.Offset));
- Outdent (S, 3);
- Put (S, "end Set_\1;\n\n", Image (F));
+ Put (S, Low_Level_Setter_Name (F) & " (N, " & Image (Rec.Offset)
+ & ", Val);" & LF);
+ Decrease_Indent (S, 3);
+ Put (S, "end Set_" & Image (F) & ";" & LF & LF);
end Put_Setter_Body;
--------------------
-- Put_Subp_Decls --
--------------------
- procedure Put_Subp_Decls (S : in out Sink'Class; Root : Root_Type) is
+ procedure Put_Subp_Decls (S : in out Sink; Root : Root_Type) is
-- Note that there are several fields that are defined for both nodes
-- and entities, such as Nkind. These are allocated slots in both,
-- but here we only put out getters and setters in Sinfo.Nodes, not
-- Einfo.Entities.
begin
- Put (S, "-- Getters and setters for fields\n");
+ Put (S, "-- Getters and setters for fields" & LF);
for F in First_Field (Root) .. Last_Field (Root) loop
-- Nkind/Ekind getter is already done (see Put_Type_And_Subtypes),
-- and there is no setter for these.
if F = Nkind then
- Put (S, "\n-- Nkind getter is above\n");
+ Put (S, LF & "-- Nkind getter is above" & LF);
elsif F = Ekind then
- Put (S, "\n-- Ekind getter is above\n");
+ Put (S, LF & "-- Ekind getter is above" & LF);
else
Put_Getter_Decl (S, F);
Put_Setter_Decl (S, F);
end if;
- Put (S, "\n");
+ Put (S, LF);
end loop;
end Put_Subp_Decls;
@@ -1861,9 +1850,9 @@ package body Gen_IL.Gen is
-- Put_Subp_Bodies --
---------------------
- procedure Put_Subp_Bodies (S : in out Sink'Class; Root : Root_Type) is
+ procedure Put_Subp_Bodies (S : in out Sink; Root : Root_Type) is
begin
- Put (S, "\n-- Getters and setters for fields\n\n");
+ Put (S, LF & "-- Getters and setters for fields" & LF & LF);
for F in First_Field (Root) .. Last_Field (Root) loop
Put_Getter_Body (S, F);
@@ -1878,7 +1867,7 @@ package body Gen_IL.Gen is
-- Put_Traversed_Fields --
--------------------------
- procedure Put_Traversed_Fields (S : in out Sink'Class) is
+ procedure Put_Traversed_Fields (S : in out Sink) is
function Is_Traversed_Field
(T : Concrete_Node; F : Field_Enum) return Boolean;
@@ -1909,11 +1898,11 @@ package body Gen_IL.Gen is
if First_Time then
First_Time := False;
else
- Put (S, ",\n");
+ Put (S, "," & LF);
end if;
- Put (S, "\1 => (", Image (T));
- Indent (S, 2);
+ Put (S, Image (T) & " => (");
+ Increase_Indent (S, 2);
for FI in 1 .. Last_Index (Type_Table (T).Fields) loop
declare
@@ -1925,7 +1914,7 @@ package body Gen_IL.Gen is
Left_Opnd_Skipped := True; -- see comment below
else
- Put (S, "\1, ", Image (Field_Table (F).Offset));
+ Put (S, Image (Field_Table (F).Offset) & ", ");
end if;
end if;
end;
@@ -1937,12 +1926,12 @@ package body Gen_IL.Gen is
-- that.
if Left_Opnd_Skipped then
- Put (S, "\1, ", Image (Field_Table (Left_Opnd).Offset));
+ Put (S, Image (Field_Table (Left_Opnd).Offset) & ", ");
end if;
Put (S, "others => No_Field_Offset");
- Outdent (S, 2);
+ Decrease_Indent (S, 2);
Put (S, ")");
end if;
end Put_Aggregate;
@@ -1979,29 +1968,29 @@ package body Gen_IL.Gen is
Init_Max_Traversed_Fields;
begin
- Put (S, "-- Table of fields that should be traversed by Traverse subprograms.\n");
- Put (S, "-- Each entry is an array of offsets in slots of fields to be\n");
- Put (S, "-- traversed, terminated by a sentinel equal to No_Field_Offset.\n\n");
+ Put (S, "-- Table of fields that should be traversed by Traverse subprograms." & LF);
+ Put (S, "-- Each entry is an array of offsets in slots of fields to be" & LF);
+ Put (S, "-- traversed, terminated by a sentinel equal to No_Field_Offset." & LF & LF);
- Put (S, "subtype Traversed_Offset_Array is Offset_Array (0 .. \1 + 1);\n",
- Image (Max_Traversed_Fields - 1));
- Put (S, "Traversed_Fields : constant array (Node_Kind) of Traversed_Offset_Array :=\n");
+ Put (S, "subtype Traversed_Offset_Array is Offset_Array (0 .. " &
+ Image (Max_Traversed_Fields - 1) & " + 1);" & LF);
+ Put (S, "Traversed_Fields : constant array (Node_Kind) of Traversed_Offset_Array :=" & LF);
-- One extra for the sentinel
- Indent (S, 2);
+ Increase_Indent (S, 2);
Put (S, "(");
- Indent (S, 1);
+ Increase_Indent (S, 1);
Iterate_Types (Node_Kind, Pre => Put_Aggregate'Access);
- Outdent (S, 1);
- Put (S, ");\n\n");
- Outdent (S, 2);
+ Decrease_Indent (S, 1);
+ Put (S, ");" & LF & LF);
+ Decrease_Indent (S, 2);
end Put_Traversed_Fields;
----------------
-- Put_Tables --
----------------
- procedure Put_Tables (S : in out Sink'Class; Root : Root_Type) is
+ procedure Put_Tables (S : in out Sink; Root : Root_Type) is
First_Time : Boolean := True;
@@ -2012,10 +2001,10 @@ package body Gen_IL.Gen is
if First_Time then
First_Time := False;
else
- Put (S, ",\n");
+ Put (S, "," & LF);
end if;
- Put (S, "\1 => \2", Image (T), Image (Type_Size_In_Slots (T)));
+ Put (S, Image (T) & " => " & Image (Type_Size_In_Slots (T)));
end if;
end Put_Size;
@@ -2029,10 +2018,10 @@ package body Gen_IL.Gen is
if First_Time then
First_Time := False;
else
- Put (S, ",\n");
+ Put (S, "," & LF);
end if;
- Put (S, "\1", F_Image (F));
+ Put (S, F_Image (F));
end if;
end loop;
end Put_Field_Array;
@@ -2043,35 +2032,36 @@ package body Gen_IL.Gen is
when others => "Entity_Field"); -- Entity_Kind
begin
- Put (S, "-- Table of sizes in 32-bit slots for given \1, for use by Atree:\n",
- Image (Root));
+ Put (S, "-- Table of sizes in 32-bit slots for given " &
+ Image (Root) & ", for use by Atree:" & LF);
case Root is
when Node_Kind =>
- Put (S, "\nMin_Node_Size : constant Field_Offset := \1;\n",
- Image (Min_Node_Size));
- Put (S, "Max_Node_Size : constant Field_Offset := \1;\n\n",
- Image (Max_Node_Size));
- Put (S, "Average_Node_Size_In_Slots : constant := \1;\n\n",
- Average_Node_Size_In_Slots'Img);
+ Put (S, LF & "Min_Node_Size : constant Field_Offset := " &
+ Image (Min_Node_Size) & ";" & LF);
+ Put (S, "Max_Node_Size : constant Field_Offset := " &
+ Image (Max_Node_Size) & ";" & LF & LF);
+ Put (S, "Average_Node_Size_In_Slots : constant := " &
+ Average_Node_Size_In_Slots'Img & ";" & LF & LF);
when Entity_Kind =>
- Put (S, "\nMin_Entity_Size : constant Field_Offset := \1;\n",
- Image (Min_Entity_Size));
- Put (S, "Max_Entity_Size : constant Field_Offset := \1;\n\n",
- Image (Max_Entity_Size));
+ Put (S, LF & "Min_Entity_Size : constant Field_Offset := " &
+ Image (Min_Entity_Size) & ";" & LF);
+ Put (S, "Max_Entity_Size : constant Field_Offset := " &
+ Image (Max_Entity_Size) & ";" & LF & LF);
when others => raise Program_Error;
end case;
- Put (S, "Size : constant array (\1) of Field_Offset :=\n", Image (Root));
- Indent (S, 2);
+ Put (S, "Size : constant array (" & Image (Root) &
+ ") of Field_Offset :=" & LF);
+ Increase_Indent (S, 2);
Put (S, "(");
- Indent (S, 1);
+ Increase_Indent (S, 1);
Iterate_Types (Root, Pre => Put_Size'Access);
- Outdent (S, 1);
- Put (S, "); -- Size\n");
- Outdent (S, 2);
+ Decrease_Indent (S, 1);
+ Put (S, "); -- Size" & LF);
+ Decrease_Indent (S, 2);
declare
type Dummy is array
@@ -2079,35 +2069,37 @@ package body Gen_IL.Gen is
Num_Fields : constant Root_Int := Dummy'Length;
First_Time : Boolean := True;
begin
- Put (S, "\n-- Enumeration of all \1 fields:\n\n",
- Image (Num_Fields));
+ Put (S, LF & "-- Enumeration of all " & Image (Num_Fields)
+ & " fields:" & LF & LF);
- Put (S, "type \1 is\n", Field_Enum_Type_Name);
- Indent (S, 2);
+ Put (S, "type " & Field_Enum_Type_Name & " is" & LF);
+ Increase_Indent (S, 2);
Put (S, "(");
- Indent (S, 1);
+ Increase_Indent (S, 1);
for F in First_Field (Root) .. Last_Field (Root) loop
if First_Time then
First_Time := False;
else
- Put (S, ",\n");
+ Put (S, "," & LF);
end if;
- Put (S, "\1", F_Image (F));
+ Put (S, F_Image (F));
end loop;
- Outdent (S, 1);
- Put (S, "); -- \1\n", Field_Enum_Type_Name);
- Outdent (S, 2);
+ Decrease_Indent (S, 1);
+ Put (S, "); -- " & Field_Enum_Type_Name & LF);
+ Decrease_Indent (S, 2);
end;
- Put (S, "\ntype \1_Index is new Pos;\n", Field_Enum_Type_Name);
- Put (S, "type \1_Array is array (\1_Index range <>) of \1;\n",
- Field_Enum_Type_Name);
- Put (S, "type \1_Array_Ref is access constant \1_Array;\n",
- Field_Enum_Type_Name);
- Put (S, "subtype A is \1_Array;\n", Field_Enum_Type_Name);
+ Put (S, LF & "type " & Field_Enum_Type_Name & "_Index is new Pos;" & LF);
+ Put (S, "type " & Field_Enum_Type_Name & "_Array is array (" &
+ Field_Enum_Type_Name & "_Index range <>) of " &
+ Field_Enum_Type_Name & ";" & LF);
+ Put (S, "type " & Field_Enum_Type_Name &
+ "_Array_Ref is access constant " & Field_Enum_Type_Name &
+ "_Array;" & LF);
+ Put (S, "subtype A is " & Field_Enum_Type_Name & "_Array;" & LF);
-- Short name to make allocators below more readable
declare
@@ -2120,67 +2112,70 @@ package body Gen_IL.Gen is
if First_Time then
First_Time := False;
else
- Put (S, ",\n");
+ Put (S, "," & LF);
end if;
- Put (S, "\1 =>\n", Image (T));
- Indent (S, 2);
+ Put (S, Image (T) & " =>" & LF);
+ Increase_Indent (S, 2);
Put (S, "new A'(");
- Indent (S, 6);
- Indent (S, 1);
+ Increase_Indent (S, 6);
+ Increase_Indent (S, 1);
Put_Field_Array (T);
- Outdent (S, 1);
+ Decrease_Indent (S, 1);
Put (S, ")");
- Outdent (S, 6);
- Outdent (S, 2);
+ Decrease_Indent (S, 6);
+ Decrease_Indent (S, 2);
end if;
end Do_One_Type;
begin
- Put (S, "\n-- Table mapping \1s to the sequence of fields that exist in that \1:\n\n",
- Image (Root));
+ Put (S, LF & "-- Table mapping " & Image (Root) &
+ "s to the sequence of fields that exist in that " &
+ Image (Root) & ":" & LF & LF);
- Put (S, "\1_Table : constant array (\2) of \1_Array_Ref :=\n",
- Field_Enum_Type_Name, Image (Root));
+ Put (S, Field_Enum_Type_Name & "_Table : constant array (" &
+ Image (Root) & ") of " & Field_Enum_Type_Name &
+ "_Array_Ref :=" & LF);
- Indent (S, 2);
+ Increase_Indent (S, 2);
Put (S, "(");
- Indent (S, 1);
+ Increase_Indent (S, 1);
Iterate_Types (Root, Pre => Do_One_Type'Access);
- Outdent (S, 1);
- Put (S, "); -- \1_Table\n", Field_Enum_Type_Name);
- Outdent (S, 2);
+ Decrease_Indent (S, 1);
+ Put (S, "); -- " & Field_Enum_Type_Name & "_Table" & LF);
+ Decrease_Indent (S, 2);
end;
declare
First_Time : Boolean := True;
begin
- Put (S, "\n-- Table mapping fields to kind and offset:\n\n");
+ Put (S, LF & "-- Table mapping fields to kind and offset:" & LF & LF);
- Put (S, "\1_Descriptors : constant array (\1) of Field_Descriptor :=\n",
- Field_Enum_Type_Name);
+ Put (S, Field_Enum_Type_Name & "_Descriptors : constant array (" &
+ Field_Enum_Type_Name & ") of Field_Descriptor :=" & LF);
- Indent (S, 2);
+ Increase_Indent (S, 2);
Put (S, "(");
- Indent (S, 1);
+ Increase_Indent (S, 1);
for F in First_Field (Root) .. Last_Field (Root) loop
if First_Time then
First_Time := False;
else
- Put (S, ",\n");
+ Put (S, "," & LF);
end if;
- Put (S, "\1 => (\2_Field, \3)", F_Image (F),
- Image (Field_Table (F).Field_Type), Image (Field_Table (F).Offset));
+ Put (S, F_Image (F) & " => (" &
+ Image (Field_Table (F).Field_Type) & "_Field, " &
+ Image (Field_Table (F).Offset) & ")");
end loop;
- Outdent (S, 1);
- Put (S, "); -- Field_Descriptors\n");
- Outdent (S, 2);
+ Decrease_Indent (S, 1);
+ Put (S, "); -- Field_Descriptors" & LF);
+ Decrease_Indent (S, 2);
end;
end Put_Tables;
@@ -2190,20 +2185,21 @@ package body Gen_IL.Gen is
----------------
procedure Put_Seinfo is
- S : Sink'Class := Create_File ("seinfo.ads");
+ S : Sink;
begin
- Put (S, "with Types; use Types;\n");
- Put (S, "\npackage Seinfo is\n\n");
- Indent (S, 3);
+ Create_File (S, "seinfo.ads");
+ Put (S, "with Types; use Types;" & LF);
+ Put (S, LF & "package Seinfo is" & LF & LF);
+ Increase_Indent (S, 3);
- Put (S, "-- This package is automatically generated.\n\n");
+ Put (S, "-- This package is automatically generated." & LF & LF);
- Put (S, "-- Common declarations visible in both Sinfo.Nodes and Einfo.Entities.\n");
+ Put (S, "-- Common declarations visible in both Sinfo.Nodes and Einfo.Entities." & LF);
- Put (S, "\ntype Field_Kind is\n");
- Indent (S, 2);
+ Put (S, LF & "type Field_Kind is" & LF);
+ Increase_Indent (S, 2);
Put (S, "(");
- Indent (S, 1);
+ Increase_Indent (S, 1);
declare
First_Time : Boolean := True;
@@ -2212,21 +2208,21 @@ package body Gen_IL.Gen is
if First_Time then
First_Time := False;
else
- Put (S, ",\n");
+ Put (S, "," & LF);
end if;
- Put (S, "\1_Field", Image (T));
+ Put (S, Image (T) & "_Field");
end loop;
end;
- Outdent (S, 1);
- Outdent (S, 2);
- Put (S, ");\n");
+ Decrease_Indent (S, 1);
+ Decrease_Indent (S, 2);
+ Put (S, ");" & LF);
- Put (S, "\nField_Size : constant array (Field_Kind) of Field_Size_In_Bits :=\n");
- Indent (S, 2);
+ Put (S, LF & "Field_Size : constant array (Field_Kind) of Field_Size_In_Bits :=" & LF);
+ Increase_Indent (S, 2);
Put (S, "(");
- Indent (S, 1);
+ Increase_Indent (S, 1);
declare
First_Time : Boolean := True;
@@ -2235,26 +2231,26 @@ package body Gen_IL.Gen is
if First_Time then
First_Time := False;
else
- Put (S, ",\n");
+ Put (S, "," & LF);
end if;
- Put (S, "\1_Field => \2", Image (T), Image (Field_Size (T)));
+ Put (S, Image (T) & "_Field => " & Image (Field_Size (T)));
end loop;
end;
- Outdent (S, 1);
- Outdent (S, 2);
- Put (S, ");\n\n");
+ Decrease_Indent (S, 1);
+ Decrease_Indent (S, 2);
+ Put (S, ");" & LF & LF);
- Put (S, "type Field_Descriptor is record\n");
- Indent (S, 3);
- Put (S, "Kind : Field_Kind;\n");
- Put (S, "Offset : Field_Offset;\n");
- Outdent (S, 3);
- Put (S, "end record;\n");
+ Put (S, "type Field_Descriptor is record" & LF);
+ Increase_Indent (S, 3);
+ Put (S, "Kind : Field_Kind;" & LF);
+ Put (S, "Offset : Field_Offset;" & LF);
+ Decrease_Indent (S, 3);
+ Put (S, "end record;" & LF);
- Outdent (S, 3);
- Put (S, "\nend Seinfo;\n");
+ Decrease_Indent (S, 3);
+ Put (S, LF & "end Seinfo;" & LF);
end Put_Seinfo;
---------------
@@ -2262,8 +2258,8 @@ package body Gen_IL.Gen is
---------------
procedure Put_Nodes is
- S : Sink'Class := Create_File ("sinfo-nodes.ads");
- B : Sink'Class := Create_File ("sinfo-nodes.adb");
+ S : Sink;
+ B : Sink;
procedure Put_Setter_With_Parent (Kind : String);
-- Put the low-level ..._With_Parent setter. Kind is either "Node" or
@@ -2272,51 +2268,53 @@ package body Gen_IL.Gen is
procedure Put_Setter_With_Parent (Kind : String) is
Error : constant String := (if Kind = "Node" then "" else "_" & Kind);
begin
- Put (B, "\nprocedure Set_\1_Id_With_Parent\n", Kind);
- Indent (B, 2);
- Put (B, "(N : Node_Id; Offset : Field_Offset; Val : \1_Id);\n\n", Kind);
- Outdent (B, 2);
-
- Put (B, "procedure Set_\1_Id_With_Parent\n", Kind);
- Indent (B, 2);
- Put (B, "(N : Node_Id; Offset : Field_Offset; Val : \1_Id) is\n", Kind);
- Outdent (B, 2);
- Put (B, "begin\n");
- Indent (B, 3);
- Put (B, "if Present (Val) and then Val /= Error\1 then\n", Error);
- Indent (B, 3);
- Put (B, "pragma Warnings (Off, ""actuals for this call may be in wrong order"");\n");
- Put (B, "Set_Parent (Val, N);\n");
- Put (B, "pragma Warnings (On, ""actuals for this call may be in wrong order"");\n");
- Outdent (B, 3);
- Put (B, "end if;\n\n");
-
- Put (B, "Set_\1_Id (N, Offset, Val);\n", Kind);
- Outdent (B, 3);
- Put (B, "end Set_\1_Id_With_Parent;\n", Kind);
+ Put (B, LF & "procedure Set_" & Kind & "_Id_With_Parent" & LF);
+ Increase_Indent (B, 2);
+ Put (B, "(N : Node_Id; Offset : Field_Offset; Val : " & Kind & "_Id);" & LF & LF);
+ Decrease_Indent (B, 2);
+
+ Put (B, "procedure Set_" & Kind & "_Id_With_Parent" & LF);
+ Increase_Indent (B, 2);
+ Put (B, "(N : Node_Id; Offset : Field_Offset; Val : " & Kind & "_Id) is" & LF);
+ Decrease_Indent (B, 2);
+ Put (B, "begin" & LF);
+ Increase_Indent (B, 3);
+ Put (B, "if Present (Val) and then Val /= Error" & Error & " then" & LF);
+ Increase_Indent (B, 3);
+ Put (B, "pragma Warnings (Off, ""actuals for this call may be in wrong order"");" & LF);
+ Put (B, "Set_Parent (Val, N);" & LF);
+ Put (B, "pragma Warnings (On, ""actuals for this call may be in wrong order"");" & LF);
+ Decrease_Indent (B, 3);
+ Put (B, "end if;" & LF & LF);
+
+ Put (B, "Set_" & Kind & "_Id (N, Offset, Val);" & LF);
+ Decrease_Indent (B, 3);
+ Put (B, "end Set_" & Kind & "_Id_With_Parent;" & LF);
end Put_Setter_With_Parent;
-- Start of processing for Put_Nodes
begin
- Put (S, "with Seinfo; use Seinfo;\n");
- Put (S, "pragma Warnings (Off);\n");
+ Create_File (S, "sinfo-nodes.ads");
+ Create_File (B, "sinfo-nodes.adb");
+ Put (S, "with Seinfo; use Seinfo;" & LF);
+ Put (S, "pragma Warnings (Off);" & LF);
-- With's included in case they are needed; so we don't have to keep
-- switching back and forth.
- Put (S, "with Output; use Output;\n");
- Put (S, "pragma Warnings (On);\n");
+ Put (S, "with Output; use Output;" & LF);
+ Put (S, "pragma Warnings (On);" & LF);
- Put (S, "\npackage Sinfo.Nodes is\n\n");
- Indent (S, 3);
+ Put (S, LF & "package Sinfo.Nodes is" & LF & LF);
+ Increase_Indent (S, 3);
- Put (S, "-- This package is automatically generated.\n\n");
+ Put (S, "-- This package is automatically generated." & LF & LF);
Put_Type_Hierarchy (S, Node_Kind);
Put_Type_And_Subtypes (S, Node_Kind);
- Put (S, "pragma Assert (Node_Kind'Pos (N_Unused_At_Start) = 0);\n\n");
- Put (S, "pragma Assert (Node_Kind'Last = N_Unused_At_End);\n\n");
+ Put (S, "pragma Assert (Node_Kind'Pos (N_Unused_At_Start) = 0);" & LF & LF);
+ Put (S, "pragma Assert (Node_Kind'Last = N_Unused_At_End);" & LF & LF);
Put_Subp_Decls (S, Node_Kind);
@@ -2324,24 +2322,24 @@ package body Gen_IL.Gen is
Put_Tables (S, Node_Kind);
- Outdent (S, 3);
- Put (S, "\nend Sinfo.Nodes;\n");
+ Decrease_Indent (S, 3);
+ Put (S, LF & "end Sinfo.Nodes;" & LF);
- Put (B, "with Atree; use Atree; use Atree.Atree_Private_Part;\n");
- Put (B, "with Nlists; use Nlists;\n");
- Put (B, "pragma Warnings (Off);\n");
- Put (B, "with Einfo.Utils; use Einfo.Utils;\n");
- Put (B, "pragma Warnings (On);\n");
+ Put (B, "with Atree; use Atree; use Atree.Atree_Private_Part;" & LF);
+ Put (B, "with Nlists; use Nlists;" & LF);
+ Put (B, "pragma Warnings (Off);" & LF);
+ Put (B, "with Einfo.Utils; use Einfo.Utils;" & LF);
+ Put (B, "pragma Warnings (On);" & LF);
- Put (B, "\npackage body Sinfo.Nodes is\n\n");
- Indent (B, 3);
+ Put (B, LF & "package body Sinfo.Nodes is" & LF & LF);
+ Increase_Indent (B, 3);
- Put (B, "-- This package is automatically generated.\n\n");
+ Put (B, "-- This package is automatically generated." & LF & LF);
- Put (B, "-- Instantiations of low-level getters and setters that take offsets\n");
- Put (B, "-- in units of the size of the field.\n");
+ Put (B, "-- Instantiations of low-level getters and setters that take offsets" & LF);
+ Put (B, "-- in units of the size of the field." & LF);
- Put (B, "pragma Style_Checks (""M200"");\n");
+ Put (B, "pragma Style_Checks (""M200"");" & LF);
for T in Special_Type loop
if Node_Field_Types_Used (T) then
Put_Low_Level_Accessor_Instantiations (B, T);
@@ -2353,8 +2351,8 @@ package body Gen_IL.Gen is
Put_Subp_Bodies (B, Node_Kind);
- Outdent (B, 3);
- Put (B, "end Sinfo.Nodes;\n");
+ Decrease_Indent (B, 3);
+ Put (B, "end Sinfo.Nodes;" & LF);
end Put_Nodes;
@@ -2363,16 +2361,18 @@ package body Gen_IL.Gen is
------------------
procedure Put_Entities is
- S : Sink'Class := Create_File ("einfo-entities.ads");
- B : Sink'Class := Create_File ("einfo-entities.adb");
+ S : Sink;
+ B : Sink;
begin
- Put (S, "with Seinfo; use Seinfo;\n");
- Put (S, "with Sinfo.Nodes; use Sinfo.Nodes;\n");
+ Create_File (S, "einfo-entities.ads");
+ Create_File (B, "einfo-entities.adb");
+ Put (S, "with Seinfo; use Seinfo;" & LF);
+ Put (S, "with Sinfo.Nodes; use Sinfo.Nodes;" & LF);
- Put (S, "\npackage Einfo.Entities is\n\n");
- Indent (S, 3);
+ Put (S, LF & "package Einfo.Entities is" & LF & LF);
+ Increase_Indent (S, 3);
- Put (S, "-- This package is automatically generated.\n\n");
+ Put (S, "-- This package is automatically generated." & LF & LF);
Put_Type_Hierarchy (S, Entity_Kind);
@@ -2382,22 +2382,22 @@ package body Gen_IL.Gen is
Put_Tables (S, Entity_Kind);
- Outdent (S, 3);
- Put (S, "\nend Einfo.Entities;\n");
+ Decrease_Indent (S, 3);
+ Put (S, LF & "end Einfo.Entities;" & LF);
- Put (B, "with Atree; use Atree; use Atree.Atree_Private_Part;\n");
- Put (B, "with Einfo.Utils; use Einfo.Utils;\n");
+ Put (B, "with Atree; use Atree; use Atree.Atree_Private_Part;" & LF);
+ Put (B, "with Einfo.Utils; use Einfo.Utils;" & LF);
-- This forms a cycle between packages (via bodies, which is OK)
- Put (B, "\npackage body Einfo.Entities is\n\n");
- Indent (B, 3);
+ Put (B, LF & "package body Einfo.Entities is" & LF & LF);
+ Increase_Indent (B, 3);
- Put (B, "-- This package is automatically generated.\n\n");
+ Put (B, "-- This package is automatically generated." & LF & LF);
- Put (B, "-- Instantiations of low-level getters and setters that take offsets\n");
- Put (B, "-- in units of the size of the field.\n");
+ Put (B, "-- Instantiations of low-level getters and setters that take offsets" & LF);
+ Put (B, "-- in units of the size of the field." & LF);
- Put (B, "pragma Style_Checks (""M200"");\n");
+ Put (B, "pragma Style_Checks (""M200"");" & LF);
for T in Special_Type loop
if Entity_Field_Types_Used (T) then
Put_Low_Level_Accessor_Instantiations (B, T);
@@ -2406,8 +2406,8 @@ package body Gen_IL.Gen is
Put_Subp_Bodies (B, Entity_Kind);
- Outdent (B, 3);
- Put (B, "end Einfo.Entities;\n");
+ Decrease_Indent (B, 3);
+ Put (B, "end Einfo.Entities;" & LF);
end Put_Entities;
@@ -2416,13 +2416,13 @@ package body Gen_IL.Gen is
-------------------
procedure Put_Make_Spec
- (S : in out Sink'Class; Root : Root_Type; T : Concrete_Type)
+ (S : in out Sink; Root : Root_Type; T : Concrete_Type)
is
begin
- Put (S, "function Make_\1\n", Image_Sans_N (T));
- Indent (S, 2);
+ Put (S, "function Make_" & Image_Sans_N (T) & "" & LF);
+ Increase_Indent (S, 2);
Put (S, "(Sloc : Source_Ptr");
- Indent (S, 1);
+ Increase_Indent (S, 1);
for F of Type_Table (T).Fields loop
pragma Assert (Fields_Per_Node (T) (F));
@@ -2442,28 +2442,29 @@ package body Gen_IL.Gen is
else " := " & Value_Image (Field_Table (F).Default_Value));
begin
- Put (S, ";\n");
- Put (S, "\1", Image (F));
- Put (S, " : \1\2", Typ, Default);
+ Put (S, ";" & LF);
+ Put (S, Image (F));
+ Put (S, " : " & Typ & Default);
end;
end if;
end loop;
- Put (S, ")\nreturn \1_Id", Node_Or_Entity (Root));
- Outdent (S, 2);
- Outdent (S, 1);
+ Put (S, ")" & LF & "return " & Node_Or_Entity (Root) & "_Id");
+ Decrease_Indent (S, 2);
+ Decrease_Indent (S, 1);
end Put_Make_Spec;
--------------------
-- Put_Make_Decls --
--------------------
- procedure Put_Make_Decls (S : in out Sink'Class; Root : Root_Type) is
+ procedure Put_Make_Decls (S : in out Sink; Root : Root_Type) is
begin
for T in First_Concrete (Root) .. Last_Concrete (Root) loop
if T not in N_Unused_At_Start | N_Unused_At_End then
Put_Make_Spec (S, Root, T);
- Put (S, ";\npragma \1 (Make_\2);\n\n", Inline, Image_Sans_N (T));
+ Put (S, ";" & LF & "pragma " & Inline & " (Make_" &
+ Image_Sans_N (T) & ");" & LF & LF);
end if;
end loop;
end Put_Make_Decls;
@@ -2472,28 +2473,28 @@ package body Gen_IL.Gen is
-- Put_Make_Bodies --
---------------------
- procedure Put_Make_Bodies (S : in out Sink'Class; Root : Root_Type) is
+ procedure Put_Make_Bodies (S : in out Sink; Root : Root_Type) is
begin
for T in First_Concrete (Root) .. Last_Concrete (Root) loop
if T not in N_Unused_At_Start | N_Unused_At_End then
Put_Make_Spec (S, Root, T);
- Put (S, "\nis\n");
+ Put (S, LF & "is" & LF);
- Indent (S, 3);
- Put (S, "N : constant Node_Id :=\n");
+ Increase_Indent (S, 3);
+ Put (S, "N : constant Node_Id :=" & LF);
if T in Entity_Node then
- Put (S, " New_Entity (\1, Sloc);\n", Image (T));
+ Put (S, " New_Entity (" & Image (T) & ", Sloc);" & LF);
else
- Put (S, " New_Node (\1, Sloc);\n", Image (T));
+ Put (S, " New_Node (" & Image (T) & ", Sloc);" & LF);
end if;
- Outdent (S, 3);
+ Decrease_Indent (S, 3);
- Put (S, "begin\n");
+ Put (S, "begin" & LF);
- Indent (S, 3);
+ Increase_Indent (S, 3);
for F of Type_Table (T).Fields loop
pragma Assert (Fields_Per_Node (T) (F));
@@ -2508,15 +2509,15 @@ package body Gen_IL.Gen is
begin
if F_Name'Length < NWidth then
- Put (S, "Set_\1 (N, \1);\n", F_Name);
+ Put (S, "Set_" & F_Name & " (N, " & F_Name & ");" & LF);
-- Wrap the line
else
- Put (S, "Set_\1\n", F_Name);
- Indent (S, 2);
- Put (S, "(N, \1);\n", F_Name);
- Outdent (S, 2);
+ Put (S, "Set_" & F_Name & "" & LF);
+ Increase_Indent (S, 2);
+ Put (S, "(N, " & F_Name & ");" & LF);
+ Decrease_Indent (S, 2);
end if;
end;
end if;
@@ -2554,15 +2555,15 @@ package body Gen_IL.Gen is
-- "Op_", but the Name_Id constant does not.
begin
- Put (S, "Set_Chars (N, Name_\1);\n", Op_Name);
- Put (S, "Set_Entity (N, Standard_\1);\n", Op);
+ Put (S, "Set_Chars (N, Name_" & Op_Name & ");" & LF);
+ Put (S, "Set_Entity (N, Standard_" & Op & ");" & LF);
end;
end if;
- Put (S, "return N;\n");
- Outdent (S, 3);
+ Put (S, "return N;" & LF);
+ Decrease_Indent (S, 3);
- Put (S, "end Make_\1;\n\n", Image_Sans_N (T));
+ Put (S, "end Make_" & Image_Sans_N (T) & ";" & LF & LF);
end if;
end loop;
end Put_Make_Bodies;
@@ -2593,42 +2594,44 @@ package body Gen_IL.Gen is
-- argument can have side effects (e.g. be a call to a parse routine).
procedure Put_Nmake is
- S : Sink'Class := Create_File ("nmake.ads");
- B : Sink'Class := Create_File ("nmake.adb");
+ S : Sink;
+ B : Sink;
begin
- Put (S, "with Namet; use Namet;\n");
- Put (S, "with Nlists; use Nlists;\n");
- Put (S, "with Types; use Types;\n");
- Put (S, "with Uintp; use Uintp;\n");
- Put (S, "with Urealp; use Urealp;\n");
+ Create_File (S, "nmake.ads");
+ Create_File (B, "nmake.adb");
+ Put (S, "with Namet; use Namet;" & LF);
+ Put (S, "with Nlists; use Nlists;" & LF);
+ Put (S, "with Types; use Types;" & LF);
+ Put (S, "with Uintp; use Uintp;" & LF);
+ Put (S, "with Urealp; use Urealp;" & LF);
- Put (S, "\npackage Nmake is\n\n");
- Indent (S, 3);
+ Put (S, LF & "package Nmake is" & LF & LF);
+ Increase_Indent (S, 3);
- Put (S, "-- This package is automatically generated.\n\n");
- Put (S, "-- See Put_Nmake in gen_il-gen.adb for documentation.\n\n");
+ Put (S, "-- This package is automatically generated." & LF & LF);
+ Put (S, "-- See Put_Nmake in gen_il-gen.adb for documentation." & LF & LF);
Put_Make_Decls (S, Node_Kind);
- Outdent (S, 3);
- Put (S, "end Nmake;\n");
+ Decrease_Indent (S, 3);
+ Put (S, "end Nmake;" & LF);
- Put (B, "with Atree; use Atree;\n");
- Put (B, "with Sinfo.Nodes; use Sinfo.Nodes;\n");
- Put (B, "with Sinfo.Utils; use Sinfo.Utils;\n");
- Put (B, "with Snames; use Snames;\n");
- Put (B, "with Stand; use Stand;\n");
+ Put (B, "with Atree; use Atree;" & LF);
+ Put (B, "with Sinfo.Nodes; use Sinfo.Nodes;" & LF);
+ Put (B, "with Sinfo.Utils; use Sinfo.Utils;" & LF);
+ Put (B, "with Snames; use Snames;" & LF);
+ Put (B, "with Stand; use Stand;" & LF);
- Put (B, "\npackage body Nmake is\n\n");
- Indent (B, 3);
+ Put (B, LF & "package body Nmake is" & LF & LF);
+ Increase_Indent (B, 3);
- Put (B, "-- This package is automatically generated.\n\n");
+ Put (B, "-- This package is automatically generated." & LF & LF);
Put_Make_Bodies (B, Node_Kind);
- Outdent (B, 3);
- Put (B, "end Nmake;\n");
+ Decrease_Indent (B, 3);
+ Put (B, "end Nmake;" & LF);
end Put_Nmake;
-----------------------
@@ -2636,8 +2639,8 @@ package body Gen_IL.Gen is
-----------------------
procedure Put_Seinfo_Tables is
- S : Sink'Class := Create_File ("seinfo_tables.ads");
- B : Sink'Class := Create_File ("seinfo_tables.adb");
+ S : Sink;
+ B : Sink;
Type_Layout : Concrete_Type_Layout_Array;
@@ -2715,15 +2718,17 @@ package body Gen_IL.Gen is
if First_Time then
First_Time := False;
else
- Put (B, ",\n");
+ Put (B, "," & LF);
end if;
- Put (B, "\1", Image (F));
+ Put (B, Image (F));
end if;
end loop;
end Put_Field_List;
begin -- Put_Seinfo_Tables
+ Create_File (S, "seinfo_tables.ads");
+ Create_File (B, "seinfo_tables.adb");
for T in Concrete_Type loop
Type_Layout (T) := new Field_Array'
@@ -2753,50 +2758,50 @@ package body Gen_IL.Gen is
end loop;
end loop;
- Put (S, "\npackage Seinfo_Tables is\n\n");
- Indent (S, 3);
+ Put (S, LF & "package Seinfo_Tables is" & LF & LF);
+ Increase_Indent (S, 3);
- Put (S, "-- This package is automatically generated.\n\n");
+ Put (S, "-- This package is automatically generated." & LF & LF);
- Put (S, "-- This package is not used by the compiler.\n");
- Put (S, "-- The body contains tables that are intended to be used by humans to\n");
- Put (S, "-- help understand the layout of various data structures.\n\n");
+ Put (S, "-- This package is not used by the compiler." & LF);
+ Put (S, "-- The body contains tables that are intended to be used by humans to" & LF);
+ Put (S, "-- help understand the layout of various data structures." & LF & LF);
- Put (S, "pragma Elaborate_Body;\n");
+ Put (S, "pragma Elaborate_Body;" & LF);
- Outdent (S, 3);
- Put (S, "\nend Seinfo_Tables;\n");
+ Decrease_Indent (S, 3);
+ Put (S, LF & "end Seinfo_Tables;" & LF);
- Put (B, "with Gen_IL.Types; use Gen_IL.Types;\n");
- Put (B, "with Gen_IL.Fields; use Gen_IL.Fields;\n");
- Put (B, "with Gen_IL.Internals; use Gen_IL.Internals;\n");
+ Put (B, "with Gen_IL.Types; use Gen_IL.Types;" & LF);
+ Put (B, "with Gen_IL.Fields; use Gen_IL.Fields;" & LF);
+ Put (B, "with Gen_IL.Internals; use Gen_IL.Internals;" & LF);
- Put (B, "\npackage body Seinfo_Tables is\n\n");
- Indent (B, 3);
+ Put (B, LF & "package body Seinfo_Tables is" & LF & LF);
+ Increase_Indent (B, 3);
- Put (B, "-- This package is automatically generated.\n\n");
+ Put (B, "-- This package is automatically generated." & LF & LF);
- Put (B, "Num_Wasted_Bits : Bit_Offset'Base := \1 with Unreferenced;\n",
- Image (Num_Wasted_Bits));
+ Put (B, "Num_Wasted_Bits : Bit_Offset'Base := " & Image (Num_Wasted_Bits) &
+ " with Unreferenced;" & LF);
- Put (B, "\nWasted_Bits : constant Opt_Field_Enum := No_Field;\n");
+ Put (B, LF & "Wasted_Bits : constant Opt_Field_Enum := No_Field;" & LF);
- Put (B, "\n-- Table showing the layout of each Node_Or_Entity_Type. For each\n");
- Put (B, "-- concrete type, we show the bits used by each field. Each field\n");
- Put (B, "-- uses the same bit range in all types. This table is not used by\n");
- Put (B, "-- the compiler; it is for information only.\n\n");
+ Put (B, LF & "-- Table showing the layout of each Node_Or_Entity_Type. For each" & LF);
+ Put (B, "-- concrete type, we show the bits used by each field. Each field" & LF);
+ Put (B, "-- uses the same bit range in all types. This table is not used by" & LF);
+ Put (B, "-- the compiler; it is for information only." & LF & LF);
- Put (B, "-- Wasted_Bits are unused bits between fields, and padding at the end\n");
- Put (B, "-- to round up to a multiple of the slot size.\n");
+ Put (B, "-- Wasted_Bits are unused bits between fields, and padding at the end" & LF);
+ Put (B, "-- to round up to a multiple of the slot size." & LF);
- Put (B, "\n-- Type_Layout is \1 bytes.\n", Image (Type_Layout_Size / 8));
+ Put (B, LF & "-- Type_Layout is " & Image (Type_Layout_Size / 8) & " bytes." & LF);
- Put (B, "\npragma Style_Checks (Off);\n");
- Put (B, "Type_Layout : constant Concrete_Type_Layout_Array := \n");
- Indent (B, 2);
- Put (B, "-- Concrete node types:\n");
+ Put (B, LF & "pragma Style_Checks (Off);" & LF);
+ Put (B, "Type_Layout : constant Concrete_Type_Layout_Array := " & LF);
+ Increase_Indent (B, 2);
+ Put (B, "-- Concrete node types:" & LF);
Put (B, "(");
- Indent (B, 1);
+ Increase_Indent (B, 1);
declare
First_Time : Boolean := True;
@@ -2805,18 +2810,18 @@ package body Gen_IL.Gen is
if First_Time then
First_Time := False;
else
- Put (B, ",\n\n");
+ Put (B, "," & LF & LF);
end if;
if T = Concrete_Entity'First then
- Put (B, "-- Concrete entity types:\n\n");
+ Put (B, "-- Concrete entity types:" & LF & LF);
end if;
- Put (B, "\1 => new Field_Array'\n", Image (T));
+ Put (B, Image (T) & " => new Field_Array'" & LF);
- Indent (B, 2);
+ Increase_Indent (B, 2);
Put (B, "(");
- Indent (B, 1);
+ Increase_Indent (B, 1);
declare
First_Time : Boolean := True;
@@ -2826,7 +2831,7 @@ package body Gen_IL.Gen is
if First_Time then
First_Time := False;
else
- Put (B, ",\n");
+ Put (B, "," & LF);
end if;
declare
@@ -2842,16 +2847,14 @@ package body Gen_IL.Gen is
(First_Bit .. Last_Bit => F));
if Last_Bit = First_Bit then
- Put (B, "\1 => \2",
- First_Bit_Image (First_Bit),
+ Put (B, First_Bit_Image (First_Bit) & " => " &
Image_Or_Waste (F));
else
pragma Assert
(if F /= No_Field then
First_Bit mod Field_Size (F) = 0);
- Put (B, "\1 .. \2 => \3",
- First_Bit_Image (First_Bit),
- Last_Bit_Image (Last_Bit),
+ Put (B, First_Bit_Image (First_Bit) & " .. " &
+ Last_Bit_Image (Last_Bit) & " => " &
Image_Or_Waste (F));
end if;
@@ -2861,25 +2864,25 @@ package body Gen_IL.Gen is
end loop;
end;
- Outdent (B, 1);
+ Decrease_Indent (B, 1);
Put (B, ")");
- Outdent (B, 2);
+ Decrease_Indent (B, 2);
end loop;
end;
- Outdent (B, 1);
- Put (B, ") -- Type_Layout\n");
- Indent (B, 6);
- Put (B, "with Export, Convention => Ada;\n");
- Outdent (B, 6);
- Outdent (B, 2);
+ Decrease_Indent (B, 1);
+ Put (B, ") -- Type_Layout" & LF);
+ Increase_Indent (B, 6);
+ Put (B, "with Export, Convention => Ada;" & LF);
+ Decrease_Indent (B, 6);
+ Decrease_Indent (B, 2);
- Put (B, "\n-- Table mapping bit offsets to the set of fields at that offset\n\n");
- Put (B, "Bit_Used : constant Offset_To_Fields_Mapping :=\n");
+ Put (B, LF & "-- Table mapping bit offsets to the set of fields at that offset" & LF & LF);
+ Put (B, "Bit_Used : constant Offset_To_Fields_Mapping :=" & LF);
- Indent (B, 2);
+ Increase_Indent (B, 2);
Put (B, "(");
- Indent (B, 1);
+ Increase_Indent (B, 1);
declare
First_Time : Boolean := True;
@@ -2890,33 +2893,33 @@ package body Gen_IL.Gen is
if First_Time then
First_Time := False;
else
- Put (B, ",\n\n");
+ Put (B, "," & LF & LF);
end if;
- Put (B, "\1 => new Field_Array'\n", First_Bit_Image (Bit));
+ Put (B, First_Bit_Image (Bit) & " => new Field_Array'" & LF);
-- Use [...] notation here, to get around annoying Ada
-- limitations on empty and singleton aggregates. This code is
-- not used in the compiler, so there are no bootstrap issues.
- Indent (B, 2);
+ Increase_Indent (B, 2);
Put (B, "[");
- Indent (B, 1);
+ Increase_Indent (B, 1);
Put_Field_List (Bit);
- Outdent (B, 1);
+ Decrease_Indent (B, 1);
Put (B, "]");
- Outdent (B, 2);
+ Decrease_Indent (B, 2);
end loop;
end;
- Outdent (B, 1);
- Put (B, "); -- Bit_Used\n");
- Outdent (B, 2);
+ Decrease_Indent (B, 1);
+ Put (B, "); -- Bit_Used" & LF);
+ Decrease_Indent (B, 2);
- Outdent (B, 3);
- Put (B, "\nend Seinfo_Tables;\n");
+ Decrease_Indent (B, 3);
+ Put (B, LF & "end Seinfo_Tables;" & LF);
end Put_Seinfo_Tables;
@@ -2925,7 +2928,7 @@ package body Gen_IL.Gen is
-----------------------------
procedure Put_C_Type_And_Subtypes
- (S : in out Sink'Class; Root : Root_Type) is
+ (S : in out Sink; Root : Root_Type) is
procedure Put_Enum_Lit (T : Node_Or_Entity_Type);
-- Print out the #define corresponding to the Ada enumeration literal
@@ -2938,37 +2941,29 @@ package body Gen_IL.Gen is
procedure Put_Enum_Lit (T : Node_Or_Entity_Type) is
begin
if T in Concrete_Type then
- Put (S, "#define \1 \2\n", Image (T), Image (Pos (T)));
+ Put (S, "#define " & Image (T) & " " & Image (Pos (T)) & "" & LF);
end if;
end Put_Enum_Lit;
procedure Put_Kind_Subtype (T : Node_Or_Entity_Type) is
begin
if T in Abstract_Type and then Type_Table (T).Parent /= No_Type then
- Put (S, "SUBTYPE (\1, \2,\n",
- Image (T),
- Image (Type_Table (T).Parent));
- Indent (S, 3);
- Put (S, "\1,\n\2)\n",
- Image (Type_Table (T).First),
- Image (Type_Table (T).Last));
- Outdent (S, 3);
+ Put (S, "SUBTYPE (" & Image (T) & ", " &
+ Image (Type_Table (T).Parent) & "," & LF);
+ Increase_Indent (S, 3);
+ Put (S, Image (Type_Table (T).First) & "," & LF);
+ Put (S, Image (Type_Table (T).Last) & ")" & LF);
+ Decrease_Indent (S, 3);
end if;
end Put_Kind_Subtype;
begin
- Indent (S, 6);
Iterate_Types (Root, Pre => Put_Enum_Lit'Access);
- Put (S, "\n#define Number_\1_Kinds \2\n",
- Node_Or_Entity (Root),
- Image (Pos (Last_Concrete (Root)) + 1));
+ Put (S, "#define Number_" & Node_Or_Entity (Root) & "_Kinds " &
+ Image (Pos (Last_Concrete (Root)) + 1) & "" & LF & LF);
- Outdent (S, 6);
-
- Indent (S, 3);
Iterate_Types (Root, Pre => Put_Kind_Subtype'Access);
- Outdent (S, 3);
Put_Union_Membership (S, Root);
end Put_C_Type_And_Subtypes;
@@ -2978,17 +2973,15 @@ package body Gen_IL.Gen is
----------------------------
procedure Put_Low_Level_C_Getter
- (S : in out Sink'Class; T : Type_Enum)
+ (S : in out Sink; T : Type_Enum)
is
T_Image : constant String := Get_Set_Id_Image (T);
begin
- Put (S, "static \1 Get_\2(Node_Id N, Field_Offset Offset);\n\n",
- T_Image, Image (T));
- Put (S, "INLINE \1\n", T_Image);
- Put (S, "Get_\1(Node_Id N, Field_Offset Offset)\n", Image (T));
+ Put (S, "INLINE " & T_Image & "" & LF);
+ Put (S, "Get_" & Image (T) & " (Node_Id N, Field_Offset Offset)" & LF);
- Indent (S, 3);
+ Increase_Indent (S, 3);
-- Same special case as in Put_Low_Level_Accessor_Instantiations
@@ -3000,16 +2993,17 @@ package body Gen_IL.Gen is
(if T = Elist_Id then "No_Elist" else "Uint_0");
begin
- Put (S, "{ return (\1) Get_32_Bit_Field_With_Default(N, Offset, \2); }\n\n",
- T_Image, Default_Val);
+ Put (S, "{ return (" & T_Image &
+ ") Get_32_Bit_Field_With_Default(N, Offset, " &
+ Default_Val & "); }" & LF & LF);
end;
else
- Put (S, "{ return (\1) Get_\2_Bit_Field(N, Offset); }\n\n",
- T_Image, Image (Field_Size (T)));
+ Put (S, "{ return (" & T_Image & ") Get_" &
+ Image (Field_Size (T)) & "_Bit_Field(N, Offset); }" & LF & LF);
end if;
- Outdent (S, 3);
+ Decrease_Indent (S, 3);
end Put_Low_Level_C_Getter;
-----------------------------
@@ -3017,19 +3011,18 @@ package body Gen_IL.Gen is
-----------------------------
procedure Put_High_Level_C_Getter
- (S : in out Sink'Class; F : Field_Enum)
+ (S : in out Sink; F : Field_Enum)
is
begin
- Put (S, "INLINE \1 \2\n",
- Get_Set_Id_Image (Field_Table (F).Field_Type), Image (F));
- Put (S, "(Node_Id N)\n");
-
- Indent (S, 3);
- Put (S, "{ return \1(\2, \3); }\n\n",
- Low_Level_Getter_Name (Field_Table (F).Field_Type),
- Node_To_Fetch_From (F),
- Image (Field_Table (F).Offset));
- Outdent (S, 3);
+ Put (S, "INLINE " & Get_Set_Id_Image (Field_Table (F).Field_Type) &
+ " " & Image (F) & " (Node_Id N)" & LF);
+
+ Increase_Indent (S, 3);
+ Put (S, "{ return " &
+ Low_Level_Getter_Name (Field_Table (F).Field_Type) &
+ "(" & Node_To_Fetch_From (F) & ", " &
+ Image (Field_Table (F).Offset) & "); }" & LF & LF);
+ Decrease_Indent (S, 3);
end Put_High_Level_C_Getter;
------------------------------
@@ -3037,10 +3030,10 @@ package body Gen_IL.Gen is
------------------------------
procedure Put_High_Level_C_Getters
- (S : in out Sink'Class; Root : Root_Type)
+ (S : in out Sink; Root : Root_Type)
is
begin
- Put (S, "// Getters for fields\n\n");
+ Put (S, "// Getters for fields" & LF & LF);
for F in First_Field (Root) .. Last_Field (Root) loop
Put_High_Level_C_Getter (S, F);
@@ -3052,7 +3045,7 @@ package body Gen_IL.Gen is
--------------------------
procedure Put_Union_Membership
- (S : in out Sink'Class; Root : Root_Type) is
+ (S : in out Sink; Root : Root_Type) is
procedure Put_Ors (T : Abstract_Type);
-- Print the "or" (i.e. "||") of tests whether kind is in each child
@@ -3065,7 +3058,7 @@ package body Gen_IL.Gen is
if First_Time then
First_Time := False;
else
- Put (S, " ||\n");
+ Put (S, " ||" & LF);
end if;
-- Unions, other abstract types, and concrete types each have
@@ -3073,39 +3066,37 @@ package body Gen_IL.Gen is
if Child in Abstract_Type then
if Type_Table (Child).Is_Union then
- Put (S, "Is_In_\1 (kind)", Image (Child));
+ Put (S, "Is_In_" & Image (Child) & " (kind)");
else
- Put (S, "IN (kind, \1)", Image (Child));
+ Put (S, "IN (kind, " & Image (Child) & ")");
end if;
else
- Put (S, "kind == \1", Image (Child));
+ Put (S, "kind == " & Image (Child));
end if;
end loop;
end Put_Ors;
begin
- Put (S, "\n// Membership tests for union types\n\n");
+ Put (S, LF & "// Membership tests for union types" & LF & LF);
for T in First_Abstract (Root) .. Last_Abstract (Root) loop
if Type_Table (T) /= null and then Type_Table (T).Is_Union then
- Put (S, "static Boolean Is_In_\1(\2_Kind kind);\n",
- Image (T), Node_Or_Entity (Root));
- Put (S, "INLINE Boolean\n");
- Put (S, "Is_In_\1(\2_Kind kind)\n",
- Image (T), Node_Or_Entity (Root));
-
- Put (S, "{\n");
- Indent (S, 3);
- Put (S, "return\n");
- Indent (S, 3);
+ Put (S, "INLINE Boolean" & LF);
+ Put (S, "Is_In_" & Image (T) & " (" &
+ Node_Or_Entity (Root) & "_Kind kind)" & LF);
+
+ Put (S, "{" & LF);
+ Increase_Indent (S, 3);
+ Put (S, "return" & LF);
+ Increase_Indent (S, 3);
Put_Ors (T);
- Outdent (S, 3);
- Outdent (S, 3);
- Put (S, ";\n}\n");
+ Decrease_Indent (S, 3);
+ Decrease_Indent (S, 3);
+ Put (S, ";" & LF & "}" & LF);
- Put (S, "\n");
+ Put (S, "" & LF);
end if;
end loop;
end Put_Union_Membership;
@@ -3115,19 +3106,20 @@ package body Gen_IL.Gen is
---------------------
procedure Put_Sinfo_Dot_H is
- S : Sink'Class := Create_File ("sinfo.h");
+ S : Sink;
begin
- Put (S, "#ifdef __cplusplus\n");
- Put (S, "extern ""C"" {\n");
- Put (S, "#endif\n\n");
+ Create_File (S, "sinfo.h");
+ Put (S, "#ifdef __cplusplus" & LF);
+ Put (S, "extern ""C"" {" & LF);
+ Put (S, "#endif" & LF & LF);
- Put (S, "typedef Boolean Flag;\n\n");
+ Put (S, "typedef Boolean Flag;" & LF & LF);
Put_C_Type_And_Subtypes (S, Node_Kind);
- Put (S, "\n// Getters corresponding to instantiations of Atree.Get_n_Bit_Field\n");
- Put (S, "// generic functions.\n\n");
+ Put (S, "// Getters corresponding to instantiations of Atree.Get_n_Bit_Field"
+ & LF & LF);
for T in Special_Type loop
Put_Low_Level_C_Getter (S, T);
@@ -3135,9 +3127,9 @@ package body Gen_IL.Gen is
Put_High_Level_C_Getters (S, Node_Kind);
- Put (S, "#ifdef __cplusplus\n");
- Put (S, "}\n");
- Put (S, "#endif\n");
+ Put (S, "#ifdef __cplusplus" & LF);
+ Put (S, "}" & LF);
+ Put (S, "#endif" & LF);
end Put_Sinfo_Dot_H;
---------------------
@@ -3145,10 +3137,9 @@ package body Gen_IL.Gen is
---------------------
procedure Put_Einfo_Dot_H is
- S : Sink'Class := Create_File ("einfo.h");
+ S : Sink;
procedure Put_Membership_Query_Spec (T : Node_Or_Entity_Type);
- procedure Put_Membership_Query_Decl (T : Node_Or_Entity_Type);
procedure Put_Membership_Query_Defn (T : Node_Or_Entity_Type);
-- Print out the Is_... function for T that calls the IN macro on the
-- SUBTYPE.
@@ -3165,59 +3156,43 @@ package body Gen_IL.Gen is
begin
pragma Assert (not Type_Table (T).Is_Union);
- Put (S, "INLINE B Is_\1\2 ", Im2, Typ);
- Tab_To_Column (S, 49);
- Put (S, "(E Id)");
+ Put (S, "INLINE B Is_" & Im2 & Typ & " (E Id)");
end Put_Membership_Query_Spec;
- procedure Put_Membership_Query_Decl (T : Node_Or_Entity_Type) is
- begin
- if T in Abstract_Type and T not in Root_Type then
- Put_Membership_Query_Spec (T);
- Put (S, ";\n");
- end if;
- end Put_Membership_Query_Decl;
-
procedure Put_Membership_Query_Defn (T : Node_Or_Entity_Type) is
begin
if T in Abstract_Type and T not in Root_Type then
Put_Membership_Query_Spec (T);
- Put (S, "\n");
- Indent (S, 3);
- Put (S, "{ return IN (Ekind (Id), \1); }\n", Image (T));
- Outdent (S, 3);
+ Put (S, "" & LF);
+ Increase_Indent (S, 3);
+ Put (S, "{ return IN (Ekind (Id), " & Image (T) & "); }" & LF);
+ Decrease_Indent (S, 3);
end if;
end Put_Membership_Query_Defn;
begin
- Put (S, "#ifdef __cplusplus\n");
- Put (S, "extern ""C"" {\n");
- Put (S, "#endif\n\n");
+ Create_File (S, "einfo.h");
+ Put (S, "#ifdef __cplusplus" & LF);
+ Put (S, "extern ""C"" {" & LF);
+ Put (S, "#endif" & LF & LF);
- Put (S, "typedef Boolean Flag;\n\n");
+ Put (S, "typedef Boolean Flag;" & LF & LF);
Put_C_Type_And_Subtypes (S, Entity_Kind);
- Put (S, "\n// Getters corresponding to instantiations of Atree.Get_n_Bit_Field\n");
- Put (S, "// generic functions.\n\n");
-
-- Note that we do not call Put_Low_Level_C_Getter here. Those are in
-- sinfo.h, so every file that #includes einfo.h must #include
-- sinfo.h first.
Put_High_Level_C_Getters (S, Entity_Kind);
- Put (S, "\n// Abstract type queries\n\n");
+ Put (S, "// Abstract type queries" & LF & LF);
- Indent (S, 3);
- Iterate_Types (Entity_Kind, Pre => Put_Membership_Query_Decl'Access);
- Put (S, "\n");
Iterate_Types (Entity_Kind, Pre => Put_Membership_Query_Defn'Access);
- Outdent (S, 3);
- Put (S, "#ifdef __cplusplus\n");
- Put (S, "}\n");
- Put (S, "#endif\n");
+ Put (S, LF & "#ifdef __cplusplus" & LF);
+ Put (S, "}" & LF);
+ Put (S, "#endif" & LF);
end Put_Einfo_Dot_H;
begin -- Compile
diff --git a/gcc/ada/gen_il-internals.adb b/gcc/ada/gen_il-internals.adb
index d676d91..59a142d 100644
--- a/gcc/ada/gen_il-internals.adb
+++ b/gcc/ada/gen_il-internals.adb
@@ -207,44 +207,44 @@ package body Gen_IL.Internals is
-- Put_Types_With_Bars --
-------------------------
- procedure Put_Types_With_Bars (S : in out Sink'Class; U : Type_Vector) is
+ procedure Put_Types_With_Bars (S : in out Sink; U : Type_Vector) is
First_Time : Boolean := True;
begin
- Indent (S, 3);
+ Increase_Indent (S, 3);
for T of U loop
if First_Time then
First_Time := False;
else
- Put (S, "\n| ");
+ Put (S, LF & "| ");
end if;
- Put (S, "\1", Image (T));
+ Put (S, Image (T));
end loop;
- Outdent (S, 3);
+ Decrease_Indent (S, 3);
end Put_Types_With_Bars;
----------------------------
-- Put_Type_Ids_With_Bars --
----------------------------
- procedure Put_Type_Ids_With_Bars (S : in out Sink'Class; U : Type_Vector) is
+ procedure Put_Type_Ids_With_Bars (S : in out Sink; U : Type_Vector) is
First_Time : Boolean := True;
begin
- Indent (S, 3);
+ Increase_Indent (S, 3);
for T of U loop
if First_Time then
First_Time := False;
else
- Put (S, "\n| ");
+ Put (S, LF & "| ");
end if;
- Put (S, "\1", Id_Image (T));
+ Put (S, Id_Image (T));
end loop;
- Outdent (S, 3);
+ Decrease_Indent (S, 3);
end Put_Type_Ids_With_Bars;
-----------
@@ -431,7 +431,7 @@ package body Gen_IL.Internals is
-- Put_Type_Hierarchy --
------------------------
- procedure Put_Type_Hierarchy (S : in out Sink'Class; Root : Root_Type) is
+ procedure Put_Type_Hierarchy (S : in out Sink; Root : Root_Type) is
Level : Natural := 0;
function Indentation return String is ((1 .. 3 * Level => ' '));
@@ -444,7 +444,7 @@ package body Gen_IL.Internals is
procedure Pre (T : Node_Or_Entity_Type) is
begin
- Put (S, "-- \1\2\n", Indentation, Image (T));
+ Put (S, "-- " & Indentation & Image (T) & LF);
Level := Level + 1;
end Pre;
@@ -456,7 +456,7 @@ package body Gen_IL.Internals is
-- an arbitrary definition of "many".
if Num_Concrete_Descendants (T) > 10 then
- Put (S, "-- \1end \2\n", Indentation, Image (T));
+ Put (S, "-- " & Indentation & "end " & Image (T) & LF);
end if;
end Post;
@@ -468,13 +468,13 @@ package body Gen_IL.Internals is
-- Start of processing for Put_Type_Hierarchy
begin
- Put (S, "-- Type hierarchy for \1\n", N_Or_E);
- Put (S, "--\n");
+ Put (S, "-- Type hierarchy for " & N_Or_E & LF);
+ Put (S, "--" & LF);
Iterate_Types (Root, Pre'Access, Post'Access);
- Put (S, "--\n");
- Put (S, "-- End type hierarchy for \1\n\n", N_Or_E);
+ Put (S, "--" & LF);
+ Put (S, "-- End type hierarchy for " & N_Or_E & LF & LF);
end Put_Type_Hierarchy;
---------
@@ -489,27 +489,4 @@ package body Gen_IL.Internals is
return Type_Enum'Pos (T) - Type_Enum'Pos (First);
end Pos;
- Stdout : Sink'Class renames Files.Standard_Output.all;
-
- -- The following procedures are for use in gdb. They use the 'Put_Image
- -- attribute. That is commented out, because we don't want this new feature
- -- used in the compiler. If you need this for debugging, just uncomment
- -- those lines back in, and rebuild.
-
- pragma Warnings (Off);
- procedure Ptypes (V : Type_Vector) is
- begin
--- Type_Vector'Put_Image (Stdout, V);
- New_Line (Stdout);
- Flush (Stdout);
- end Ptypes;
-
- procedure Pfields (V : Field_Vector) is
- begin
--- Field_Vector'Put_Image (Stdout, V);
- New_Line (Stdout);
- Flush (Stdout);
- end Pfields;
- pragma Warnings (On);
-
end Gen_IL.Internals;
diff --git a/gcc/ada/gen_il-internals.ads b/gcc/ada/gen_il-internals.ads
index 27022a0..8d13e80 100644
--- a/gcc/ada/gen_il-internals.ads
+++ b/gcc/ada/gen_il-internals.ads
@@ -47,14 +47,12 @@ package Gen_IL.Internals is
use Type_Vectors;
subtype Type_Vector is Type_Vectors.Vector;
- procedure Ptypes (V : Type_Vector); -- for debugging
-
type Type_Array is array (Type_Index range <>) of Type_Enum;
----------------
- procedure Put_Types_With_Bars (S : in out Sink'Class; U : Type_Vector);
- procedure Put_Type_Ids_With_Bars (S : in out Sink'Class; U : Type_Vector);
+ procedure Put_Types_With_Bars (S : in out Sink; U : Type_Vector);
+ procedure Put_Type_Ids_With_Bars (S : in out Sink; U : Type_Vector);
-- Put the types with vertical bars in between, as in
-- N_This | N_That | N_Other
-- or
@@ -76,7 +74,6 @@ package Gen_IL.Internals is
type Field_Index is new Positive;
package Field_Vectors is new Vectors (Field_Index, Field_Enum);
subtype Field_Vector is Field_Vectors.Vector;
- procedure Pfields (V : Field_Vector); -- for debugging
type Bit_Offset is new Root_Nat range 0 .. 32_000 - 1;
-- Offset in bits. The number 32_000 is chosen because there are fewer than
@@ -213,7 +210,7 @@ package Gen_IL.Internals is
-- True if Ancestor is an ancestor of Descendant. True for
-- a type itself.
- procedure Put_Type_Hierarchy (S : in out Sink'Class; Root : Root_Type);
+ procedure Put_Type_Hierarchy (S : in out Sink; Root : Root_Type);
function Pos (T : Concrete_Type) return Root_Nat;
-- Return Node_Kind'Pos (T) or Entity_Kind'Pos (T)
diff --git a/gcc/ada/gen_il-types.ads b/gcc/ada/gen_il-types.ads
index 96231e9..482d01d 100644
--- a/gcc/ada/gen_il-types.ads
+++ b/gcc/ada/gen_il-types.ads
@@ -308,12 +308,15 @@ package Gen_IL.Types is
N_Entry_Call_Statement,
N_Free_Statement,
N_Goto_Statement,
+ N_Goto_When_Statement,
N_Loop_Statement,
N_Null_Statement,
N_Raise_Statement,
+ N_Raise_When_Statement,
N_Requeue_Statement,
N_Simple_Return_Statement,
N_Extended_Return_Statement,
+ N_Return_When_Statement,
N_Selective_Accept,
N_Timed_Entry_Call,
N_Exit_Statement,
diff --git a/gcc/ada/gen_il.adb b/gcc/ada/gen_il.adb
index 7114c7c..23619b6 100644
--- a/gcc/ada/gen_il.adb
+++ b/gcc/ada/gen_il.adb
@@ -23,8 +23,13 @@
-- --
------------------------------------------------------------------------------
+with Ada.Streams.Stream_IO; use Ada.Streams.Stream_IO;
+
package body Gen_IL is
+ procedure Put (F : File_Type; S : String);
+ -- The output primitive
+
-----------
-- Image --
-----------
@@ -72,4 +77,72 @@ package body Gen_IL is
end return;
end Capitalize;
+ -----------------
+ -- Create_File --
+ -----------------
+
+ procedure Create_File (Buffer : in out Sink; Name : String) is
+ begin
+ Create (Buffer.File, Out_File, Name);
+ Buffer.Indent := 0;
+ Buffer.New_Line := True;
+ end Create_File;
+
+ ---------------------
+ -- Increase_Indent --
+ ---------------------
+
+ procedure Increase_Indent (Buffer : in out Sink; Amount : Natural) is
+ begin
+ Buffer.Indent := Buffer.Indent + Amount;
+ end Increase_Indent;
+
+ ---------------------
+ -- Decrease_Indent --
+ ---------------------
+
+ procedure Decrease_Indent (Buffer : in out Sink; Amount : Natural) is
+ begin
+ Buffer.Indent := Buffer.Indent - Amount;
+ end Decrease_Indent;
+
+ ---------
+ -- Put --
+ ---------
+
+ procedure Put (F : File_Type; S : String) is
+ begin
+ String'Write (Stream (F), S);
+ end Put;
+
+ procedure Put (Buffer : in out Sink; Item : String) is
+ begin
+ -- If the first character is LF, indent after it only
+
+ if Item (Item'First) = ASCII.LF then
+ Put (Buffer.File, LF);
+ Buffer.New_Line := True;
+
+ if Item'Length > 1 then
+ Put (Buffer, Item (Item'First + 1 .. Item'Last));
+ end if;
+
+ return;
+ end if;
+
+ -- If this is a new line, indent
+
+ if Buffer.New_Line and then Buffer.Indent > 0 then
+ declare
+ S : constant String (1 .. Buffer.Indent) := (others => ' ');
+ begin
+ Put (Buffer.File, S);
+ end;
+ end if;
+
+ Put (Buffer.File, Item);
+
+ Buffer.New_Line := Item (Item'Last) = ASCII.LF;
+ end Put;
+
end Gen_IL;
diff --git a/gcc/ada/gen_il.ads b/gcc/ada/gen_il.ads
index 6a86ed6..5f307fe 100644
--- a/gcc/ada/gen_il.ads
+++ b/gcc/ada/gen_il.ads
@@ -24,11 +24,8 @@
------------------------------------------------------------------------------
pragma Warnings (Off); -- with clauses for children
-with Ada.Strings.Text_Output.Formatting;
-use Ada.Strings.Text_Output, Ada.Strings.Text_Output.Formatting;
-with Ada.Strings.Text_Output.Files; use Ada.Strings.Text_Output.Files;
-with Ada.Strings.Text_Output.Utils; use Ada.Strings.Text_Output.Utils;
-with Ada.Characters.Handling; use Ada.Characters.Handling;
+with Ada.Characters.Handling; use Ada.Characters.Handling;
+with Ada.Streams.Stream_IO;
pragma Warnings (On);
package Gen_IL is -- generate intermediate language
@@ -76,4 +73,24 @@ package Gen_IL is -- generate intermediate language
procedure Capitalize (S : in out String);
-- Turns an identifier into Mixed_Case
+ -- The following declares a minimal implementation of formatted output
+ -- that is piggybacked on Ada.Streams.Stream_IO for bootstrap reasons.
+ -- It uses LF as universal line terminator to make it host independent.
+
+ type Sink is record
+ File : Ada.Streams.Stream_IO.File_Type;
+ Indent : Natural;
+ New_Line : Boolean;
+ end record;
+
+ procedure Create_File (Buffer : in out Sink; Name : String);
+
+ procedure Increase_Indent (Buffer : in out Sink; Amount : Natural);
+
+ procedure Decrease_Indent (Buffer : in out Sink; Amount : Natural);
+
+ procedure Put (Buffer : in out Sink; Item : String);
+
+ LF : constant String := "" & ASCII.LF;
+
end Gen_IL;
diff --git a/gcc/ada/gnat1drv.adb b/gcc/ada/gnat1drv.adb
index 7177533..59b9595 100644
--- a/gcc/ada/gnat1drv.adb
+++ b/gcc/ada/gnat1drv.adb
@@ -153,6 +153,12 @@ procedure Gnat1drv is
Map_Pragma_Name (From => Name_Gnat_Annotate, To => Name_Annotate);
+ -- -gnatd_U disables prepending error messages with "error:"
+
+ if Debug_Flag_Underscore_UU then
+ Unique_Error_Tag := False;
+ end if;
+
-- -gnatd.M enables Relaxed_RM_Semantics
if Debug_Flag_Dot_MM then
diff --git a/gcc/ada/gnat_rm.texi b/gcc/ada/gnat_rm.texi
index 5c22995..79f8bb3 100644
--- a/gcc/ada/gnat_rm.texi
+++ b/gcc/ada/gnat_rm.texi
@@ -436,6 +436,7 @@ Implementation Defined Attributes
* Attribute Universal_Literal_String::
* Attribute Unrestricted_Access::
* Attribute Update::
+* Attribute Valid_Image::
* Attribute Valid_Scalars::
* Attribute VADS_Size::
* Attribute Value_Size::
@@ -3639,6 +3640,24 @@ This new aggregate syntax for arrays and containers is provided under -gnatX
to experiment and confirm this new language syntax.
@item
+Additional @code{when} constructs
+
+In addition to the @code{exit when CONDITION} control structure, several
+additional constructs are allowed following this format. Including
+@code{return when CONDITION}, @code{goto when CONDITION}, and
+@code{raise [with EXCEPTION_MESSAGE] when CONDITION.}
+
+Some examples:
+
+@example
+return Result when Variable > 10;
+
+raise Program_Error with "Element is null" when Element = null;
+
+goto End_Of_Subprogram when Variable = -1;
+@end example
+
+@item
Casing on composite values (aka pattern matching)
The selector for a case statement may be of a composite type, subject to
@@ -10182,6 +10201,7 @@ consideration, you should minimize the use of these attributes.
* Attribute Universal_Literal_String::
* Attribute Unrestricted_Access::
* Attribute Update::
+* Attribute Valid_Image::
* Attribute Valid_Scalars::
* Attribute VADS_Size::
* Attribute Value_Size::
@@ -11893,7 +11913,7 @@ In general this is a risky approach. It may appear to "work" but such uses of
@code{Unrestricted_Access} are potentially non-portable, even from one version
of GNAT to another, so are best avoided if possible.
-@node Attribute Update,Attribute Valid_Scalars,Attribute Unrestricted_Access,Implementation Defined Attributes
+@node Attribute Update,Attribute Valid_Image,Attribute Unrestricted_Access,Implementation Defined Attributes
@anchor{gnat_rm/implementation_defined_attributes attribute-update}@anchor{1ad}
@section Attribute Update
@@ -11974,8 +11994,20 @@ A := A'Update ((1, 2) => 20, (3, 4) => 30);
which changes element (1,2) to 20 and (3,4) to 30.
-@node Attribute Valid_Scalars,Attribute VADS_Size,Attribute Update,Implementation Defined Attributes
-@anchor{gnat_rm/implementation_defined_attributes attribute-valid-scalars}@anchor{1ae}
+@node Attribute Valid_Image,Attribute Valid_Scalars,Attribute Update,Implementation Defined Attributes
+@anchor{gnat_rm/implementation_defined_attributes attribute-valid-image}@anchor{1ae}
+@section Attribute Valid_Image
+
+
+@geindex Valid_Image
+
+The @code{'Valid_Image} attribute is defined for enumeration types other than
+those in package Standard. This attribute is a function that takes
+a String, and returns Boolean. @code{T'Valid_Image (S)} returns True
+if and only if @code{T'Value (S)} would not raise Constraint_Error.
+
+@node Attribute Valid_Scalars,Attribute VADS_Size,Attribute Valid_Image,Implementation Defined Attributes
+@anchor{gnat_rm/implementation_defined_attributes attribute-valid-scalars}@anchor{1af}
@section Attribute Valid_Scalars
@@ -12009,7 +12041,7 @@ write a function with a single use of the attribute, and then call that
function from multiple places.
@node Attribute VADS_Size,Attribute Value_Size,Attribute Valid_Scalars,Implementation Defined Attributes
-@anchor{gnat_rm/implementation_defined_attributes attribute-vads-size}@anchor{1af}
+@anchor{gnat_rm/implementation_defined_attributes attribute-vads-size}@anchor{1b0}
@section Attribute VADS_Size
@@ -12029,7 +12061,7 @@ gives the result that would be obtained by applying the attribute to
the corresponding type.
@node Attribute Value_Size,Attribute Wchar_T_Size,Attribute VADS_Size,Implementation Defined Attributes
-@anchor{gnat_rm/implementation_defined_attributes id6}@anchor{1b0}@anchor{gnat_rm/implementation_defined_attributes attribute-value-size}@anchor{15d}
+@anchor{gnat_rm/implementation_defined_attributes id6}@anchor{1b1}@anchor{gnat_rm/implementation_defined_attributes attribute-value-size}@anchor{15d}
@section Attribute Value_Size
@@ -12043,7 +12075,7 @@ a value of the given subtype. It is the same as @code{type'Size},
but, unlike @code{Size}, may be set for non-first subtypes.
@node Attribute Wchar_T_Size,Attribute Word_Size,Attribute Value_Size,Implementation Defined Attributes
-@anchor{gnat_rm/implementation_defined_attributes attribute-wchar-t-size}@anchor{1b1}
+@anchor{gnat_rm/implementation_defined_attributes attribute-wchar-t-size}@anchor{1b2}
@section Attribute Wchar_T_Size
@@ -12055,7 +12087,7 @@ primarily for constructing the definition of this type in
package @code{Interfaces.C}. The result is a static constant.
@node Attribute Word_Size,,Attribute Wchar_T_Size,Implementation Defined Attributes
-@anchor{gnat_rm/implementation_defined_attributes attribute-word-size}@anchor{1b2}
+@anchor{gnat_rm/implementation_defined_attributes attribute-word-size}@anchor{1b3}
@section Attribute Word_Size
@@ -12066,7 +12098,7 @@ prefix) provides the value @code{System.Word_Size}. The result is
a static constant.
@node Standard and Implementation Defined Restrictions,Implementation Advice,Implementation Defined Attributes,Top
-@anchor{gnat_rm/standard_and_implementation_defined_restrictions standard-and-implementation-defined-restrictions}@anchor{9}@anchor{gnat_rm/standard_and_implementation_defined_restrictions doc}@anchor{1b3}@anchor{gnat_rm/standard_and_implementation_defined_restrictions id1}@anchor{1b4}
+@anchor{gnat_rm/standard_and_implementation_defined_restrictions standard-and-implementation-defined-restrictions}@anchor{9}@anchor{gnat_rm/standard_and_implementation_defined_restrictions doc}@anchor{1b4}@anchor{gnat_rm/standard_and_implementation_defined_restrictions id1}@anchor{1b5}
@chapter Standard and Implementation Defined Restrictions
@@ -12095,7 +12127,7 @@ language defined or GNAT-specific, are listed in the following.
@end menu
@node Partition-Wide Restrictions,Program Unit Level Restrictions,,Standard and Implementation Defined Restrictions
-@anchor{gnat_rm/standard_and_implementation_defined_restrictions partition-wide-restrictions}@anchor{1b5}@anchor{gnat_rm/standard_and_implementation_defined_restrictions id2}@anchor{1b6}
+@anchor{gnat_rm/standard_and_implementation_defined_restrictions partition-wide-restrictions}@anchor{1b6}@anchor{gnat_rm/standard_and_implementation_defined_restrictions id2}@anchor{1b7}
@section Partition-Wide Restrictions
@@ -12184,7 +12216,7 @@ then all compilation units in the partition must obey the restriction).
@end menu
@node Immediate_Reclamation,Max_Asynchronous_Select_Nesting,,Partition-Wide Restrictions
-@anchor{gnat_rm/standard_and_implementation_defined_restrictions immediate-reclamation}@anchor{1b7}
+@anchor{gnat_rm/standard_and_implementation_defined_restrictions immediate-reclamation}@anchor{1b8}
@subsection Immediate_Reclamation
@@ -12196,7 +12228,7 @@ deallocation, any storage reserved at run time for an object is
immediately reclaimed when the object no longer exists.
@node Max_Asynchronous_Select_Nesting,Max_Entry_Queue_Length,Immediate_Reclamation,Partition-Wide Restrictions
-@anchor{gnat_rm/standard_and_implementation_defined_restrictions max-asynchronous-select-nesting}@anchor{1b8}
+@anchor{gnat_rm/standard_and_implementation_defined_restrictions max-asynchronous-select-nesting}@anchor{1b9}
@subsection Max_Asynchronous_Select_Nesting
@@ -12208,7 +12240,7 @@ detected at compile time. Violations of this restriction with values
other than zero cause Storage_Error to be raised.
@node Max_Entry_Queue_Length,Max_Protected_Entries,Max_Asynchronous_Select_Nesting,Partition-Wide Restrictions
-@anchor{gnat_rm/standard_and_implementation_defined_restrictions max-entry-queue-length}@anchor{1b9}
+@anchor{gnat_rm/standard_and_implementation_defined_restrictions max-entry-queue-length}@anchor{1ba}
@subsection Max_Entry_Queue_Length
@@ -12229,7 +12261,7 @@ compatibility purposes (and a warning will be generated for its use if
warnings on obsolescent features are activated).
@node Max_Protected_Entries,Max_Select_Alternatives,Max_Entry_Queue_Length,Partition-Wide Restrictions
-@anchor{gnat_rm/standard_and_implementation_defined_restrictions max-protected-entries}@anchor{1ba}
+@anchor{gnat_rm/standard_and_implementation_defined_restrictions max-protected-entries}@anchor{1bb}
@subsection Max_Protected_Entries
@@ -12240,7 +12272,7 @@ bounds of every entry family of a protected unit shall be static, or shall be
defined by a discriminant of a subtype whose corresponding bound is static.
@node Max_Select_Alternatives,Max_Storage_At_Blocking,Max_Protected_Entries,Partition-Wide Restrictions
-@anchor{gnat_rm/standard_and_implementation_defined_restrictions max-select-alternatives}@anchor{1bb}
+@anchor{gnat_rm/standard_and_implementation_defined_restrictions max-select-alternatives}@anchor{1bc}
@subsection Max_Select_Alternatives
@@ -12249,7 +12281,7 @@ defined by a discriminant of a subtype whose corresponding bound is static.
[RM D.7] Specifies the maximum number of alternatives in a selective accept.
@node Max_Storage_At_Blocking,Max_Task_Entries,Max_Select_Alternatives,Partition-Wide Restrictions
-@anchor{gnat_rm/standard_and_implementation_defined_restrictions max-storage-at-blocking}@anchor{1bc}
+@anchor{gnat_rm/standard_and_implementation_defined_restrictions max-storage-at-blocking}@anchor{1bd}
@subsection Max_Storage_At_Blocking
@@ -12260,7 +12292,7 @@ Storage_Size that can be retained by a blocked task. A violation of this
restriction causes Storage_Error to be raised.
@node Max_Task_Entries,Max_Tasks,Max_Storage_At_Blocking,Partition-Wide Restrictions
-@anchor{gnat_rm/standard_and_implementation_defined_restrictions max-task-entries}@anchor{1bd}
+@anchor{gnat_rm/standard_and_implementation_defined_restrictions max-task-entries}@anchor{1be}
@subsection Max_Task_Entries
@@ -12273,7 +12305,7 @@ defined by a discriminant of a subtype whose
corresponding bound is static.
@node Max_Tasks,No_Abort_Statements,Max_Task_Entries,Partition-Wide Restrictions
-@anchor{gnat_rm/standard_and_implementation_defined_restrictions max-tasks}@anchor{1be}
+@anchor{gnat_rm/standard_and_implementation_defined_restrictions max-tasks}@anchor{1bf}
@subsection Max_Tasks
@@ -12286,7 +12318,7 @@ time. Violations of this restriction with values other than zero cause
Storage_Error to be raised.
@node No_Abort_Statements,No_Access_Parameter_Allocators,Max_Tasks,Partition-Wide Restrictions
-@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-abort-statements}@anchor{1bf}
+@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-abort-statements}@anchor{1c0}
@subsection No_Abort_Statements
@@ -12296,7 +12328,7 @@ Storage_Error to be raised.
no calls to Task_Identification.Abort_Task.
@node No_Access_Parameter_Allocators,No_Access_Subprograms,No_Abort_Statements,Partition-Wide Restrictions
-@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-access-parameter-allocators}@anchor{1c0}
+@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-access-parameter-allocators}@anchor{1c1}
@subsection No_Access_Parameter_Allocators
@@ -12307,7 +12339,7 @@ occurrences of an allocator as the actual parameter to an access
parameter.
@node No_Access_Subprograms,No_Allocators,No_Access_Parameter_Allocators,Partition-Wide Restrictions
-@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-access-subprograms}@anchor{1c1}
+@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-access-subprograms}@anchor{1c2}
@subsection No_Access_Subprograms
@@ -12317,7 +12349,7 @@ parameter.
declarations of access-to-subprogram types.
@node No_Allocators,No_Anonymous_Allocators,No_Access_Subprograms,Partition-Wide Restrictions
-@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-allocators}@anchor{1c2}
+@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-allocators}@anchor{1c3}
@subsection No_Allocators
@@ -12327,7 +12359,7 @@ declarations of access-to-subprogram types.
occurrences of an allocator.
@node No_Anonymous_Allocators,No_Asynchronous_Control,No_Allocators,Partition-Wide Restrictions
-@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-anonymous-allocators}@anchor{1c3}
+@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-anonymous-allocators}@anchor{1c4}
@subsection No_Anonymous_Allocators
@@ -12337,7 +12369,7 @@ occurrences of an allocator.
occurrences of an allocator of anonymous access type.
@node No_Asynchronous_Control,No_Calendar,No_Anonymous_Allocators,Partition-Wide Restrictions
-@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-asynchronous-control}@anchor{1c4}
+@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-asynchronous-control}@anchor{1c5}
@subsection No_Asynchronous_Control
@@ -12347,7 +12379,7 @@ occurrences of an allocator of anonymous access type.
dependences on the predefined package Asynchronous_Task_Control.
@node No_Calendar,No_Coextensions,No_Asynchronous_Control,Partition-Wide Restrictions
-@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-calendar}@anchor{1c5}
+@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-calendar}@anchor{1c6}
@subsection No_Calendar
@@ -12357,7 +12389,7 @@ dependences on the predefined package Asynchronous_Task_Control.
dependences on package Calendar.
@node No_Coextensions,No_Default_Initialization,No_Calendar,Partition-Wide Restrictions
-@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-coextensions}@anchor{1c6}
+@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-coextensions}@anchor{1c7}
@subsection No_Coextensions
@@ -12367,7 +12399,7 @@ dependences on package Calendar.
coextensions. See 3.10.2.
@node No_Default_Initialization,No_Delay,No_Coextensions,Partition-Wide Restrictions
-@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-default-initialization}@anchor{1c7}
+@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-default-initialization}@anchor{1c8}
@subsection No_Default_Initialization
@@ -12384,7 +12416,7 @@ is to prohibit all cases of variables declared without a specific
initializer (including the case of OUT scalar parameters).
@node No_Delay,No_Dependence,No_Default_Initialization,Partition-Wide Restrictions
-@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-delay}@anchor{1c8}
+@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-delay}@anchor{1c9}
@subsection No_Delay
@@ -12394,7 +12426,7 @@ initializer (including the case of OUT scalar parameters).
delay statements and no semantic dependences on package Calendar.
@node No_Dependence,No_Direct_Boolean_Operators,No_Delay,Partition-Wide Restrictions
-@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-dependence}@anchor{1c9}
+@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-dependence}@anchor{1ca}
@subsection No_Dependence
@@ -12404,7 +12436,7 @@ delay statements and no semantic dependences on package Calendar.
dependences on a library unit.
@node No_Direct_Boolean_Operators,No_Dispatch,No_Dependence,Partition-Wide Restrictions
-@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-direct-boolean-operators}@anchor{1ca}
+@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-direct-boolean-operators}@anchor{1cb}
@subsection No_Direct_Boolean_Operators
@@ -12417,7 +12449,7 @@ protocol requires the use of short-circuit (and then, or else) forms for all
composite boolean operations.
@node No_Dispatch,No_Dispatching_Calls,No_Direct_Boolean_Operators,Partition-Wide Restrictions
-@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-dispatch}@anchor{1cb}
+@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-dispatch}@anchor{1cc}
@subsection No_Dispatch
@@ -12427,7 +12459,7 @@ composite boolean operations.
occurrences of @code{T'Class}, for any (tagged) subtype @code{T}.
@node No_Dispatching_Calls,No_Dynamic_Attachment,No_Dispatch,Partition-Wide Restrictions
-@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-dispatching-calls}@anchor{1cc}
+@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-dispatching-calls}@anchor{1cd}
@subsection No_Dispatching_Calls
@@ -12488,7 +12520,7 @@ end Example;
@end example
@node No_Dynamic_Attachment,No_Dynamic_Priorities,No_Dispatching_Calls,Partition-Wide Restrictions
-@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-dynamic-attachment}@anchor{1cd}
+@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-dynamic-attachment}@anchor{1ce}
@subsection No_Dynamic_Attachment
@@ -12507,7 +12539,7 @@ compatibility purposes (and a warning will be generated for its use if
warnings on obsolescent features are activated).
@node No_Dynamic_Priorities,No_Entry_Calls_In_Elaboration_Code,No_Dynamic_Attachment,Partition-Wide Restrictions
-@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-dynamic-priorities}@anchor{1ce}
+@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-dynamic-priorities}@anchor{1cf}
@subsection No_Dynamic_Priorities
@@ -12516,7 +12548,7 @@ warnings on obsolescent features are activated).
[RM D.7] There are no semantic dependencies on the package Dynamic_Priorities.
@node No_Entry_Calls_In_Elaboration_Code,No_Enumeration_Maps,No_Dynamic_Priorities,Partition-Wide Restrictions
-@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-entry-calls-in-elaboration-code}@anchor{1cf}
+@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-entry-calls-in-elaboration-code}@anchor{1d0}
@subsection No_Entry_Calls_In_Elaboration_Code
@@ -12528,7 +12560,7 @@ restriction, the compiler can assume that no code past an accept statement
in a task can be executed at elaboration time.
@node No_Enumeration_Maps,No_Exception_Handlers,No_Entry_Calls_In_Elaboration_Code,Partition-Wide Restrictions
-@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-enumeration-maps}@anchor{1d0}
+@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-enumeration-maps}@anchor{1d1}
@subsection No_Enumeration_Maps
@@ -12539,7 +12571,7 @@ enumeration maps are used (that is Image and Value attributes applied
to enumeration types).
@node No_Exception_Handlers,No_Exception_Propagation,No_Enumeration_Maps,Partition-Wide Restrictions
-@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-exception-handlers}@anchor{1d1}
+@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-exception-handlers}@anchor{1d2}
@subsection No_Exception_Handlers
@@ -12564,7 +12596,7 @@ statement generated by the compiler). The Line parameter when nonzero
represents the line number in the source program where the raise occurs.
@node No_Exception_Propagation,No_Exception_Registration,No_Exception_Handlers,Partition-Wide Restrictions
-@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-exception-propagation}@anchor{1d2}
+@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-exception-propagation}@anchor{1d3}
@subsection No_Exception_Propagation
@@ -12581,7 +12613,7 @@ the package GNAT.Current_Exception is not permitted, and reraise
statements (raise with no operand) are not permitted.
@node No_Exception_Registration,No_Exceptions,No_Exception_Propagation,Partition-Wide Restrictions
-@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-exception-registration}@anchor{1d3}
+@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-exception-registration}@anchor{1d4}
@subsection No_Exception_Registration
@@ -12595,7 +12627,7 @@ code is simplified by omitting the otherwise-required global registration
of exceptions when they are declared.
@node No_Exceptions,No_Finalization,No_Exception_Registration,Partition-Wide Restrictions
-@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-exceptions}@anchor{1d4}
+@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-exceptions}@anchor{1d5}
@subsection No_Exceptions
@@ -12606,7 +12638,7 @@ raise statements and no exception handlers and also suppresses the
generation of language-defined run-time checks.
@node No_Finalization,No_Fixed_Point,No_Exceptions,Partition-Wide Restrictions
-@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-finalization}@anchor{1d5}
+@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-finalization}@anchor{1d6}
@subsection No_Finalization
@@ -12647,7 +12679,7 @@ object or a nested component, either declared on the stack or on the heap. The
deallocation of a controlled object no longer finalizes its contents.
@node No_Fixed_Point,No_Floating_Point,No_Finalization,Partition-Wide Restrictions
-@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-fixed-point}@anchor{1d6}
+@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-fixed-point}@anchor{1d7}
@subsection No_Fixed_Point
@@ -12657,7 +12689,7 @@ deallocation of a controlled object no longer finalizes its contents.
occurrences of fixed point types and operations.
@node No_Floating_Point,No_Implicit_Conditionals,No_Fixed_Point,Partition-Wide Restrictions
-@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-floating-point}@anchor{1d7}
+@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-floating-point}@anchor{1d8}
@subsection No_Floating_Point
@@ -12667,7 +12699,7 @@ occurrences of fixed point types and operations.
occurrences of floating point types and operations.
@node No_Implicit_Conditionals,No_Implicit_Dynamic_Code,No_Floating_Point,Partition-Wide Restrictions
-@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-implicit-conditionals}@anchor{1d8}
+@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-implicit-conditionals}@anchor{1d9}
@subsection No_Implicit_Conditionals
@@ -12683,7 +12715,7 @@ normal manner. Constructs generating implicit conditionals include comparisons
of composite objects and the Max/Min attributes.
@node No_Implicit_Dynamic_Code,No_Implicit_Heap_Allocations,No_Implicit_Conditionals,Partition-Wide Restrictions
-@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-implicit-dynamic-code}@anchor{1d9}
+@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-implicit-dynamic-code}@anchor{1da}
@subsection No_Implicit_Dynamic_Code
@@ -12713,7 +12745,7 @@ foreign-language convention; primitive operations of nested tagged
types.
@node No_Implicit_Heap_Allocations,No_Implicit_Protected_Object_Allocations,No_Implicit_Dynamic_Code,Partition-Wide Restrictions
-@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-implicit-heap-allocations}@anchor{1da}
+@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-implicit-heap-allocations}@anchor{1db}
@subsection No_Implicit_Heap_Allocations
@@ -12722,7 +12754,7 @@ types.
[RM D.7] No constructs are allowed to cause implicit heap allocation.
@node No_Implicit_Protected_Object_Allocations,No_Implicit_Task_Allocations,No_Implicit_Heap_Allocations,Partition-Wide Restrictions
-@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-implicit-protected-object-allocations}@anchor{1db}
+@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-implicit-protected-object-allocations}@anchor{1dc}
@subsection No_Implicit_Protected_Object_Allocations
@@ -12732,7 +12764,7 @@ types.
protected object.
@node No_Implicit_Task_Allocations,No_Initialize_Scalars,No_Implicit_Protected_Object_Allocations,Partition-Wide Restrictions
-@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-implicit-task-allocations}@anchor{1dc}
+@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-implicit-task-allocations}@anchor{1dd}
@subsection No_Implicit_Task_Allocations
@@ -12741,7 +12773,7 @@ protected object.
[GNAT] No constructs are allowed to cause implicit heap allocation of a task.
@node No_Initialize_Scalars,No_IO,No_Implicit_Task_Allocations,Partition-Wide Restrictions
-@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-initialize-scalars}@anchor{1dd}
+@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-initialize-scalars}@anchor{1de}
@subsection No_Initialize_Scalars
@@ -12753,7 +12785,7 @@ code, and in particular eliminates dummy null initialization routines that
are otherwise generated for some record and array types.
@node No_IO,No_Local_Allocators,No_Initialize_Scalars,Partition-Wide Restrictions
-@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-io}@anchor{1de}
+@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-io}@anchor{1df}
@subsection No_IO
@@ -12764,7 +12796,7 @@ dependences on any of the library units Sequential_IO, Direct_IO,
Text_IO, Wide_Text_IO, Wide_Wide_Text_IO, or Stream_IO.
@node No_Local_Allocators,No_Local_Protected_Objects,No_IO,Partition-Wide Restrictions
-@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-local-allocators}@anchor{1df}
+@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-local-allocators}@anchor{1e0}
@subsection No_Local_Allocators
@@ -12775,7 +12807,7 @@ occurrences of an allocator in subprograms, generic subprograms, tasks,
and entry bodies.
@node No_Local_Protected_Objects,No_Local_Timing_Events,No_Local_Allocators,Partition-Wide Restrictions
-@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-local-protected-objects}@anchor{1e0}
+@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-local-protected-objects}@anchor{1e1}
@subsection No_Local_Protected_Objects
@@ -12785,7 +12817,7 @@ and entry bodies.
only declared at the library level.
@node No_Local_Timing_Events,No_Long_Long_Integers,No_Local_Protected_Objects,Partition-Wide Restrictions
-@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-local-timing-events}@anchor{1e1}
+@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-local-timing-events}@anchor{1e2}
@subsection No_Local_Timing_Events
@@ -12795,7 +12827,7 @@ only declared at the library level.
declared at the library level.
@node No_Long_Long_Integers,No_Multiple_Elaboration,No_Local_Timing_Events,Partition-Wide Restrictions
-@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-long-long-integers}@anchor{1e2}
+@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-long-long-integers}@anchor{1e3}
@subsection No_Long_Long_Integers
@@ -12807,7 +12839,7 @@ implicit base type is Long_Long_Integer, and modular types whose size exceeds
Long_Integer'Size.
@node No_Multiple_Elaboration,No_Nested_Finalization,No_Long_Long_Integers,Partition-Wide Restrictions
-@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-multiple-elaboration}@anchor{1e3}
+@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-multiple-elaboration}@anchor{1e4}
@subsection No_Multiple_Elaboration
@@ -12823,7 +12855,7 @@ possible, including non-Ada main programs and Stand Alone libraries, are not
permitted and will be diagnosed by the binder.
@node No_Nested_Finalization,No_Protected_Type_Allocators,No_Multiple_Elaboration,Partition-Wide Restrictions
-@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-nested-finalization}@anchor{1e4}
+@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-nested-finalization}@anchor{1e5}
@subsection No_Nested_Finalization
@@ -12832,7 +12864,7 @@ permitted and will be diagnosed by the binder.
[RM D.7] All objects requiring finalization are declared at the library level.
@node No_Protected_Type_Allocators,No_Protected_Types,No_Nested_Finalization,Partition-Wide Restrictions
-@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-protected-type-allocators}@anchor{1e5}
+@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-protected-type-allocators}@anchor{1e6}
@subsection No_Protected_Type_Allocators
@@ -12842,7 +12874,7 @@ permitted and will be diagnosed by the binder.
expressions that attempt to allocate protected objects.
@node No_Protected_Types,No_Recursion,No_Protected_Type_Allocators,Partition-Wide Restrictions
-@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-protected-types}@anchor{1e6}
+@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-protected-types}@anchor{1e7}
@subsection No_Protected_Types
@@ -12852,7 +12884,7 @@ expressions that attempt to allocate protected objects.
declarations of protected types or protected objects.
@node No_Recursion,No_Reentrancy,No_Protected_Types,Partition-Wide Restrictions
-@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-recursion}@anchor{1e7}
+@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-recursion}@anchor{1e8}
@subsection No_Recursion
@@ -12862,7 +12894,7 @@ declarations of protected types or protected objects.
part of its execution.
@node No_Reentrancy,No_Relative_Delay,No_Recursion,Partition-Wide Restrictions
-@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-reentrancy}@anchor{1e8}
+@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-reentrancy}@anchor{1e9}
@subsection No_Reentrancy
@@ -12872,7 +12904,7 @@ part of its execution.
two tasks at the same time.
@node No_Relative_Delay,No_Requeue_Statements,No_Reentrancy,Partition-Wide Restrictions
-@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-relative-delay}@anchor{1e9}
+@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-relative-delay}@anchor{1ea}
@subsection No_Relative_Delay
@@ -12883,7 +12915,7 @@ relative statements and prevents expressions such as @code{delay 1.23;} from
appearing in source code.
@node No_Requeue_Statements,No_Secondary_Stack,No_Relative_Delay,Partition-Wide Restrictions
-@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-requeue-statements}@anchor{1ea}
+@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-requeue-statements}@anchor{1eb}
@subsection No_Requeue_Statements
@@ -12901,7 +12933,7 @@ compatibility purposes (and a warning will be generated for its use if
warnings on oNobsolescent features are activated).
@node No_Secondary_Stack,No_Select_Statements,No_Requeue_Statements,Partition-Wide Restrictions
-@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-secondary-stack}@anchor{1eb}
+@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-secondary-stack}@anchor{1ec}
@subsection No_Secondary_Stack
@@ -12914,7 +12946,7 @@ stack is used to implement functions returning unconstrained objects
secondary stacks for tasks (excluding the environment task) at run time.
@node No_Select_Statements,No_Specific_Termination_Handlers,No_Secondary_Stack,Partition-Wide Restrictions
-@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-select-statements}@anchor{1ec}
+@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-select-statements}@anchor{1ed}
@subsection No_Select_Statements
@@ -12924,7 +12956,7 @@ secondary stacks for tasks (excluding the environment task) at run time.
kind are permitted, that is the keyword @code{select} may not appear.
@node No_Specific_Termination_Handlers,No_Specification_of_Aspect,No_Select_Statements,Partition-Wide Restrictions
-@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-specific-termination-handlers}@anchor{1ed}
+@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-specific-termination-handlers}@anchor{1ee}
@subsection No_Specific_Termination_Handlers
@@ -12934,7 +12966,7 @@ kind are permitted, that is the keyword @code{select} may not appear.
or to Ada.Task_Termination.Specific_Handler.
@node No_Specification_of_Aspect,No_Standard_Allocators_After_Elaboration,No_Specific_Termination_Handlers,Partition-Wide Restrictions
-@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-specification-of-aspect}@anchor{1ee}
+@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-specification-of-aspect}@anchor{1ef}
@subsection No_Specification_of_Aspect
@@ -12945,7 +12977,7 @@ specification, attribute definition clause, or pragma is given for a
given aspect.
@node No_Standard_Allocators_After_Elaboration,No_Standard_Storage_Pools,No_Specification_of_Aspect,Partition-Wide Restrictions
-@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-standard-allocators-after-elaboration}@anchor{1ef}
+@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-standard-allocators-after-elaboration}@anchor{1f0}
@subsection No_Standard_Allocators_After_Elaboration
@@ -12957,7 +12989,7 @@ library items of the partition has completed. Otherwise, Storage_Error
is raised.
@node No_Standard_Storage_Pools,No_Stream_Optimizations,No_Standard_Allocators_After_Elaboration,Partition-Wide Restrictions
-@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-standard-storage-pools}@anchor{1f0}
+@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-standard-storage-pools}@anchor{1f1}
@subsection No_Standard_Storage_Pools
@@ -12969,7 +13001,7 @@ have an explicit Storage_Pool attribute defined specifying a
user-defined storage pool.
@node No_Stream_Optimizations,No_Streams,No_Standard_Storage_Pools,Partition-Wide Restrictions
-@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-stream-optimizations}@anchor{1f1}
+@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-stream-optimizations}@anchor{1f2}
@subsection No_Stream_Optimizations
@@ -12982,7 +13014,7 @@ due to their superior performance. When this restriction is in effect, the
compiler performs all IO operations on a per-character basis.
@node No_Streams,No_Task_Allocators,No_Stream_Optimizations,Partition-Wide Restrictions
-@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-streams}@anchor{1f2}
+@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-streams}@anchor{1f3}
@subsection No_Streams
@@ -13003,7 +13035,7 @@ unit declaring a tagged type should be compiled with the restriction,
though this is not required.
@node No_Task_Allocators,No_Task_At_Interrupt_Priority,No_Streams,Partition-Wide Restrictions
-@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-task-allocators}@anchor{1f3}
+@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-task-allocators}@anchor{1f4}
@subsection No_Task_Allocators
@@ -13013,7 +13045,7 @@ though this is not required.
or types containing task subcomponents.
@node No_Task_At_Interrupt_Priority,No_Task_Attributes_Package,No_Task_Allocators,Partition-Wide Restrictions
-@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-task-at-interrupt-priority}@anchor{1f4}
+@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-task-at-interrupt-priority}@anchor{1f5}
@subsection No_Task_At_Interrupt_Priority
@@ -13025,7 +13057,7 @@ a consequence, the tasks are always created with a priority below
that an interrupt priority.
@node No_Task_Attributes_Package,No_Task_Hierarchy,No_Task_At_Interrupt_Priority,Partition-Wide Restrictions
-@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-task-attributes-package}@anchor{1f5}
+@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-task-attributes-package}@anchor{1f6}
@subsection No_Task_Attributes_Package
@@ -13042,7 +13074,7 @@ compatibility purposes (and a warning will be generated for its use if
warnings on obsolescent features are activated).
@node No_Task_Hierarchy,No_Task_Termination,No_Task_Attributes_Package,Partition-Wide Restrictions
-@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-task-hierarchy}@anchor{1f6}
+@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-task-hierarchy}@anchor{1f7}
@subsection No_Task_Hierarchy
@@ -13052,7 +13084,7 @@ warnings on obsolescent features are activated).
directly on the environment task of the partition.
@node No_Task_Termination,No_Tasking,No_Task_Hierarchy,Partition-Wide Restrictions
-@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-task-termination}@anchor{1f7}
+@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-task-termination}@anchor{1f8}
@subsection No_Task_Termination
@@ -13061,7 +13093,7 @@ directly on the environment task of the partition.
[RM D.7] Tasks that terminate are erroneous.
@node No_Tasking,No_Terminate_Alternatives,No_Task_Termination,Partition-Wide Restrictions
-@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-tasking}@anchor{1f8}
+@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-tasking}@anchor{1f9}
@subsection No_Tasking
@@ -13074,7 +13106,7 @@ and cause an error message to be output either by the compiler or
binder.
@node No_Terminate_Alternatives,No_Unchecked_Access,No_Tasking,Partition-Wide Restrictions
-@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-terminate-alternatives}@anchor{1f9}
+@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-terminate-alternatives}@anchor{1fa}
@subsection No_Terminate_Alternatives
@@ -13083,7 +13115,7 @@ binder.
[RM D.7] There are no selective accepts with terminate alternatives.
@node No_Unchecked_Access,No_Unchecked_Conversion,No_Terminate_Alternatives,Partition-Wide Restrictions
-@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-unchecked-access}@anchor{1fa}
+@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-unchecked-access}@anchor{1fb}
@subsection No_Unchecked_Access
@@ -13093,7 +13125,7 @@ binder.
occurrences of the Unchecked_Access attribute.
@node No_Unchecked_Conversion,No_Unchecked_Deallocation,No_Unchecked_Access,Partition-Wide Restrictions
-@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-unchecked-conversion}@anchor{1fb}
+@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-unchecked-conversion}@anchor{1fc}
@subsection No_Unchecked_Conversion
@@ -13103,7 +13135,7 @@ occurrences of the Unchecked_Access attribute.
dependences on the predefined generic function Unchecked_Conversion.
@node No_Unchecked_Deallocation,No_Use_Of_Entity,No_Unchecked_Conversion,Partition-Wide Restrictions
-@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-unchecked-deallocation}@anchor{1fc}
+@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-unchecked-deallocation}@anchor{1fd}
@subsection No_Unchecked_Deallocation
@@ -13113,7 +13145,7 @@ dependences on the predefined generic function Unchecked_Conversion.
dependences on the predefined generic procedure Unchecked_Deallocation.
@node No_Use_Of_Entity,Pure_Barriers,No_Unchecked_Deallocation,Partition-Wide Restrictions
-@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-use-of-entity}@anchor{1fd}
+@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-use-of-entity}@anchor{1fe}
@subsection No_Use_Of_Entity
@@ -13133,7 +13165,7 @@ No_Use_Of_Entity => Ada.Text_IO.Put_Line
@end example
@node Pure_Barriers,Simple_Barriers,No_Use_Of_Entity,Partition-Wide Restrictions
-@anchor{gnat_rm/standard_and_implementation_defined_restrictions pure-barriers}@anchor{1fe}
+@anchor{gnat_rm/standard_and_implementation_defined_restrictions pure-barriers}@anchor{1ff}
@subsection Pure_Barriers
@@ -13184,7 +13216,7 @@ but still ensures absence of side effects, exceptions, and recursion
during the evaluation of the barriers.
@node Simple_Barriers,Static_Priorities,Pure_Barriers,Partition-Wide Restrictions
-@anchor{gnat_rm/standard_and_implementation_defined_restrictions simple-barriers}@anchor{1ff}
+@anchor{gnat_rm/standard_and_implementation_defined_restrictions simple-barriers}@anchor{200}
@subsection Simple_Barriers
@@ -13203,7 +13235,7 @@ compatibility purposes (and a warning will be generated for its use if
warnings on obsolescent features are activated).
@node Static_Priorities,Static_Storage_Size,Simple_Barriers,Partition-Wide Restrictions
-@anchor{gnat_rm/standard_and_implementation_defined_restrictions static-priorities}@anchor{200}
+@anchor{gnat_rm/standard_and_implementation_defined_restrictions static-priorities}@anchor{201}
@subsection Static_Priorities
@@ -13214,7 +13246,7 @@ are static, and that there are no dependences on the package
@code{Ada.Dynamic_Priorities}.
@node Static_Storage_Size,,Static_Priorities,Partition-Wide Restrictions
-@anchor{gnat_rm/standard_and_implementation_defined_restrictions static-storage-size}@anchor{201}
+@anchor{gnat_rm/standard_and_implementation_defined_restrictions static-storage-size}@anchor{202}
@subsection Static_Storage_Size
@@ -13224,7 +13256,7 @@ are static, and that there are no dependences on the package
in a Storage_Size pragma or attribute definition clause is static.
@node Program Unit Level Restrictions,,Partition-Wide Restrictions,Standard and Implementation Defined Restrictions
-@anchor{gnat_rm/standard_and_implementation_defined_restrictions program-unit-level-restrictions}@anchor{202}@anchor{gnat_rm/standard_and_implementation_defined_restrictions id3}@anchor{203}
+@anchor{gnat_rm/standard_and_implementation_defined_restrictions program-unit-level-restrictions}@anchor{203}@anchor{gnat_rm/standard_and_implementation_defined_restrictions id3}@anchor{204}
@section Program Unit Level Restrictions
@@ -13254,7 +13286,7 @@ other compilation units in the partition.
@end menu
@node No_Elaboration_Code,No_Dynamic_Sized_Objects,,Program Unit Level Restrictions
-@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-elaboration-code}@anchor{204}
+@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-elaboration-code}@anchor{205}
@subsection No_Elaboration_Code
@@ -13310,7 +13342,7 @@ associated with the unit. This counter is typically used to check for access
before elaboration and to control multiple elaboration attempts.
@node No_Dynamic_Sized_Objects,No_Entry_Queue,No_Elaboration_Code,Program Unit Level Restrictions
-@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-dynamic-sized-objects}@anchor{205}
+@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-dynamic-sized-objects}@anchor{206}
@subsection No_Dynamic_Sized_Objects
@@ -13328,7 +13360,7 @@ access discriminants. It is often a good idea to combine this restriction
with No_Secondary_Stack.
@node No_Entry_Queue,No_Implementation_Aspect_Specifications,No_Dynamic_Sized_Objects,Program Unit Level Restrictions
-@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-entry-queue}@anchor{206}
+@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-entry-queue}@anchor{207}
@subsection No_Entry_Queue
@@ -13341,7 +13373,7 @@ checked at compile time. A program execution is erroneous if an attempt
is made to queue a second task on such an entry.
@node No_Implementation_Aspect_Specifications,No_Implementation_Attributes,No_Entry_Queue,Program Unit Level Restrictions
-@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-implementation-aspect-specifications}@anchor{207}
+@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-implementation-aspect-specifications}@anchor{208}
@subsection No_Implementation_Aspect_Specifications
@@ -13352,7 +13384,7 @@ GNAT-defined aspects are present. With this restriction, the only
aspects that can be used are those defined in the Ada Reference Manual.
@node No_Implementation_Attributes,No_Implementation_Identifiers,No_Implementation_Aspect_Specifications,Program Unit Level Restrictions
-@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-implementation-attributes}@anchor{208}
+@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-implementation-attributes}@anchor{209}
@subsection No_Implementation_Attributes
@@ -13364,7 +13396,7 @@ attributes that can be used are those defined in the Ada Reference
Manual.
@node No_Implementation_Identifiers,No_Implementation_Pragmas,No_Implementation_Attributes,Program Unit Level Restrictions
-@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-implementation-identifiers}@anchor{209}
+@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-implementation-identifiers}@anchor{20a}
@subsection No_Implementation_Identifiers
@@ -13375,7 +13407,7 @@ implementation-defined identifiers (marked with pragma Implementation_Defined)
occur within language-defined packages.
@node No_Implementation_Pragmas,No_Implementation_Restrictions,No_Implementation_Identifiers,Program Unit Level Restrictions
-@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-implementation-pragmas}@anchor{20a}
+@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-implementation-pragmas}@anchor{20b}
@subsection No_Implementation_Pragmas
@@ -13386,7 +13418,7 @@ GNAT-defined pragmas are present. With this restriction, the only
pragmas that can be used are those defined in the Ada Reference Manual.
@node No_Implementation_Restrictions,No_Implementation_Units,No_Implementation_Pragmas,Program Unit Level Restrictions
-@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-implementation-restrictions}@anchor{20b}
+@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-implementation-restrictions}@anchor{20c}
@subsection No_Implementation_Restrictions
@@ -13398,7 +13430,7 @@ are present. With this restriction, the only other restriction identifiers
that can be used are those defined in the Ada Reference Manual.
@node No_Implementation_Units,No_Implicit_Aliasing,No_Implementation_Restrictions,Program Unit Level Restrictions
-@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-implementation-units}@anchor{20c}
+@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-implementation-units}@anchor{20d}
@subsection No_Implementation_Units
@@ -13409,7 +13441,7 @@ mention in the context clause of any implementation-defined descendants
of packages Ada, Interfaces, or System.
@node No_Implicit_Aliasing,No_Implicit_Loops,No_Implementation_Units,Program Unit Level Restrictions
-@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-implicit-aliasing}@anchor{20d}
+@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-implicit-aliasing}@anchor{20e}
@subsection No_Implicit_Aliasing
@@ -13424,7 +13456,7 @@ to be aliased, and in such cases, it can always be replaced by
the standard attribute Unchecked_Access which is preferable.
@node No_Implicit_Loops,No_Obsolescent_Features,No_Implicit_Aliasing,Program Unit Level Restrictions
-@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-implicit-loops}@anchor{20e}
+@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-implicit-loops}@anchor{20f}
@subsection No_Implicit_Loops
@@ -13441,7 +13473,7 @@ arrays larger than about 5000 scalar components. Note that if this restriction
is set in the spec of a package, it will not apply to its body.
@node No_Obsolescent_Features,No_Wide_Characters,No_Implicit_Loops,Program Unit Level Restrictions
-@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-obsolescent-features}@anchor{20f}
+@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-obsolescent-features}@anchor{210}
@subsection No_Obsolescent_Features
@@ -13451,7 +13483,7 @@ is set in the spec of a package, it will not apply to its body.
features are used, as defined in Annex J of the Ada Reference Manual.
@node No_Wide_Characters,Static_Dispatch_Tables,No_Obsolescent_Features,Program Unit Level Restrictions
-@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-wide-characters}@anchor{210}
+@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-wide-characters}@anchor{211}
@subsection No_Wide_Characters
@@ -13465,7 +13497,7 @@ appear in the program (that is literals representing characters not in
type @code{Character}).
@node Static_Dispatch_Tables,SPARK_05,No_Wide_Characters,Program Unit Level Restrictions
-@anchor{gnat_rm/standard_and_implementation_defined_restrictions static-dispatch-tables}@anchor{211}
+@anchor{gnat_rm/standard_and_implementation_defined_restrictions static-dispatch-tables}@anchor{212}
@subsection Static_Dispatch_Tables
@@ -13475,7 +13507,7 @@ type @code{Character}).
associated with dispatch tables can be placed in read-only memory.
@node SPARK_05,,Static_Dispatch_Tables,Program Unit Level Restrictions
-@anchor{gnat_rm/standard_and_implementation_defined_restrictions spark-05}@anchor{212}
+@anchor{gnat_rm/standard_and_implementation_defined_restrictions spark-05}@anchor{213}
@subsection SPARK_05
@@ -13498,7 +13530,7 @@ gnatprove -P project.gpr --mode=check_all
@end example
@node Implementation Advice,Implementation Defined Characteristics,Standard and Implementation Defined Restrictions,Top
-@anchor{gnat_rm/implementation_advice doc}@anchor{213}@anchor{gnat_rm/implementation_advice implementation-advice}@anchor{a}@anchor{gnat_rm/implementation_advice id1}@anchor{214}
+@anchor{gnat_rm/implementation_advice doc}@anchor{214}@anchor{gnat_rm/implementation_advice implementation-advice}@anchor{a}@anchor{gnat_rm/implementation_advice id1}@anchor{215}
@chapter Implementation Advice
@@ -13596,7 +13628,7 @@ case the text describes what GNAT does and why.
@end menu
@node RM 1 1 3 20 Error Detection,RM 1 1 3 31 Child Units,,Implementation Advice
-@anchor{gnat_rm/implementation_advice rm-1-1-3-20-error-detection}@anchor{215}
+@anchor{gnat_rm/implementation_advice rm-1-1-3-20-error-detection}@anchor{216}
@section RM 1.1.3(20): Error Detection
@@ -13613,7 +13645,7 @@ or diagnosed at compile time.
@geindex Child Units
@node RM 1 1 3 31 Child Units,RM 1 1 5 12 Bounded Errors,RM 1 1 3 20 Error Detection,Implementation Advice
-@anchor{gnat_rm/implementation_advice rm-1-1-3-31-child-units}@anchor{216}
+@anchor{gnat_rm/implementation_advice rm-1-1-3-31-child-units}@anchor{217}
@section RM 1.1.3(31): Child Units
@@ -13629,7 +13661,7 @@ Followed.
@geindex Bounded errors
@node RM 1 1 5 12 Bounded Errors,RM 2 8 16 Pragmas,RM 1 1 3 31 Child Units,Implementation Advice
-@anchor{gnat_rm/implementation_advice rm-1-1-5-12-bounded-errors}@anchor{217}
+@anchor{gnat_rm/implementation_advice rm-1-1-5-12-bounded-errors}@anchor{218}
@section RM 1.1.5(12): Bounded Errors
@@ -13646,7 +13678,7 @@ runtime.
@geindex Pragmas
@node RM 2 8 16 Pragmas,RM 2 8 17-19 Pragmas,RM 1 1 5 12 Bounded Errors,Implementation Advice
-@anchor{gnat_rm/implementation_advice id2}@anchor{218}@anchor{gnat_rm/implementation_advice rm-2-8-16-pragmas}@anchor{219}
+@anchor{gnat_rm/implementation_advice id2}@anchor{219}@anchor{gnat_rm/implementation_advice rm-2-8-16-pragmas}@anchor{21a}
@section RM 2.8(16): Pragmas
@@ -13759,7 +13791,7 @@ that this advice not be followed. For details see
@ref{7,,Implementation Defined Pragmas}.
@node RM 2 8 17-19 Pragmas,RM 3 5 2 5 Alternative Character Sets,RM 2 8 16 Pragmas,Implementation Advice
-@anchor{gnat_rm/implementation_advice rm-2-8-17-19-pragmas}@anchor{21a}
+@anchor{gnat_rm/implementation_advice rm-2-8-17-19-pragmas}@anchor{21b}
@section RM 2.8(17-19): Pragmas
@@ -13780,14 +13812,14 @@ replacing @code{library_items}."
@end itemize
@end quotation
-See @ref{219,,RM 2.8(16); Pragmas}.
+See @ref{21a,,RM 2.8(16); Pragmas}.
@geindex Character Sets
@geindex Alternative Character Sets
@node RM 3 5 2 5 Alternative Character Sets,RM 3 5 4 28 Integer Types,RM 2 8 17-19 Pragmas,Implementation Advice
-@anchor{gnat_rm/implementation_advice rm-3-5-2-5-alternative-character-sets}@anchor{21b}
+@anchor{gnat_rm/implementation_advice rm-3-5-2-5-alternative-character-sets}@anchor{21c}
@section RM 3.5.2(5): Alternative Character Sets
@@ -13815,7 +13847,7 @@ there is no such restriction.
@geindex Integer types
@node RM 3 5 4 28 Integer Types,RM 3 5 4 29 Integer Types,RM 3 5 2 5 Alternative Character Sets,Implementation Advice
-@anchor{gnat_rm/implementation_advice rm-3-5-4-28-integer-types}@anchor{21c}
+@anchor{gnat_rm/implementation_advice rm-3-5-4-28-integer-types}@anchor{21d}
@section RM 3.5.4(28): Integer Types
@@ -13834,7 +13866,7 @@ are supported for convenient interface to C, and so that all hardware
types of the machine are easily available.
@node RM 3 5 4 29 Integer Types,RM 3 5 5 8 Enumeration Values,RM 3 5 4 28 Integer Types,Implementation Advice
-@anchor{gnat_rm/implementation_advice rm-3-5-4-29-integer-types}@anchor{21d}
+@anchor{gnat_rm/implementation_advice rm-3-5-4-29-integer-types}@anchor{21e}
@section RM 3.5.4(29): Integer Types
@@ -13850,7 +13882,7 @@ Followed.
@geindex Enumeration values
@node RM 3 5 5 8 Enumeration Values,RM 3 5 7 17 Float Types,RM 3 5 4 29 Integer Types,Implementation Advice
-@anchor{gnat_rm/implementation_advice rm-3-5-5-8-enumeration-values}@anchor{21e}
+@anchor{gnat_rm/implementation_advice rm-3-5-5-8-enumeration-values}@anchor{21f}
@section RM 3.5.5(8): Enumeration Values
@@ -13870,7 +13902,7 @@ Followed.
@geindex Float types
@node RM 3 5 7 17 Float Types,RM 3 6 2 11 Multidimensional Arrays,RM 3 5 5 8 Enumeration Values,Implementation Advice
-@anchor{gnat_rm/implementation_advice rm-3-5-7-17-float-types}@anchor{21f}
+@anchor{gnat_rm/implementation_advice rm-3-5-7-17-float-types}@anchor{220}
@section RM 3.5.7(17): Float Types
@@ -13900,7 +13932,7 @@ is a software rather than a hardware format.
@geindex multidimensional
@node RM 3 6 2 11 Multidimensional Arrays,RM 9 6 30-31 Duration'Small,RM 3 5 7 17 Float Types,Implementation Advice
-@anchor{gnat_rm/implementation_advice rm-3-6-2-11-multidimensional-arrays}@anchor{220}
+@anchor{gnat_rm/implementation_advice rm-3-6-2-11-multidimensional-arrays}@anchor{221}
@section RM 3.6.2(11): Multidimensional Arrays
@@ -13918,7 +13950,7 @@ Followed.
@geindex Duration'Small
@node RM 9 6 30-31 Duration'Small,RM 10 2 1 12 Consistent Representation,RM 3 6 2 11 Multidimensional Arrays,Implementation Advice
-@anchor{gnat_rm/implementation_advice rm-9-6-30-31-duration-small}@anchor{221}
+@anchor{gnat_rm/implementation_advice rm-9-6-30-31-duration-small}@anchor{222}
@section RM 9.6(30-31): Duration'Small
@@ -13939,7 +13971,7 @@ it need not be the same time base as used for @code{Calendar.Clock}."
Followed.
@node RM 10 2 1 12 Consistent Representation,RM 11 4 1 19 Exception Information,RM 9 6 30-31 Duration'Small,Implementation Advice
-@anchor{gnat_rm/implementation_advice rm-10-2-1-12-consistent-representation}@anchor{222}
+@anchor{gnat_rm/implementation_advice rm-10-2-1-12-consistent-representation}@anchor{223}
@section RM 10.2.1(12): Consistent Representation
@@ -13961,7 +13993,7 @@ advice without severely impacting efficiency of execution.
@geindex Exception information
@node RM 11 4 1 19 Exception Information,RM 11 5 28 Suppression of Checks,RM 10 2 1 12 Consistent Representation,Implementation Advice
-@anchor{gnat_rm/implementation_advice rm-11-4-1-19-exception-information}@anchor{223}
+@anchor{gnat_rm/implementation_advice rm-11-4-1-19-exception-information}@anchor{224}
@section RM 11.4.1(19): Exception Information
@@ -13992,7 +14024,7 @@ Pragma @code{Discard_Names}.
@geindex suppression of
@node RM 11 5 28 Suppression of Checks,RM 13 1 21-24 Representation Clauses,RM 11 4 1 19 Exception Information,Implementation Advice
-@anchor{gnat_rm/implementation_advice rm-11-5-28-suppression-of-checks}@anchor{224}
+@anchor{gnat_rm/implementation_advice rm-11-5-28-suppression-of-checks}@anchor{225}
@section RM 11.5(28): Suppression of Checks
@@ -14007,7 +14039,7 @@ Followed.
@geindex Representation clauses
@node RM 13 1 21-24 Representation Clauses,RM 13 2 6-8 Packed Types,RM 11 5 28 Suppression of Checks,Implementation Advice
-@anchor{gnat_rm/implementation_advice rm-13-1-21-24-representation-clauses}@anchor{225}
+@anchor{gnat_rm/implementation_advice rm-13-1-21-24-representation-clauses}@anchor{226}
@section RM 13.1 (21-24): Representation Clauses
@@ -14056,7 +14088,7 @@ Followed.
@geindex Packed types
@node RM 13 2 6-8 Packed Types,RM 13 3 14-19 Address Clauses,RM 13 1 21-24 Representation Clauses,Implementation Advice
-@anchor{gnat_rm/implementation_advice rm-13-2-6-8-packed-types}@anchor{226}
+@anchor{gnat_rm/implementation_advice rm-13-2-6-8-packed-types}@anchor{227}
@section RM 13.2(6-8): Packed Types
@@ -14095,7 +14127,7 @@ Followed.
@geindex Address clauses
@node RM 13 3 14-19 Address Clauses,RM 13 3 29-35 Alignment Clauses,RM 13 2 6-8 Packed Types,Implementation Advice
-@anchor{gnat_rm/implementation_advice rm-13-3-14-19-address-clauses}@anchor{227}
+@anchor{gnat_rm/implementation_advice rm-13-3-14-19-address-clauses}@anchor{228}
@section RM 13.3(14-19): Address Clauses
@@ -14148,7 +14180,7 @@ Followed.
@geindex Alignment clauses
@node RM 13 3 29-35 Alignment Clauses,RM 13 3 42-43 Size Clauses,RM 13 3 14-19 Address Clauses,Implementation Advice
-@anchor{gnat_rm/implementation_advice rm-13-3-29-35-alignment-clauses}@anchor{228}
+@anchor{gnat_rm/implementation_advice rm-13-3-29-35-alignment-clauses}@anchor{229}
@section RM 13.3(29-35): Alignment Clauses
@@ -14205,7 +14237,7 @@ Followed.
@geindex Size clauses
@node RM 13 3 42-43 Size Clauses,RM 13 3 50-56 Size Clauses,RM 13 3 29-35 Alignment Clauses,Implementation Advice
-@anchor{gnat_rm/implementation_advice rm-13-3-42-43-size-clauses}@anchor{229}
+@anchor{gnat_rm/implementation_advice rm-13-3-42-43-size-clauses}@anchor{22a}
@section RM 13.3(42-43): Size Clauses
@@ -14223,7 +14255,7 @@ object's @code{Alignment} (if the @code{Alignment} is nonzero)."
Followed.
@node RM 13 3 50-56 Size Clauses,RM 13 3 71-73 Component Size Clauses,RM 13 3 42-43 Size Clauses,Implementation Advice
-@anchor{gnat_rm/implementation_advice rm-13-3-50-56-size-clauses}@anchor{22a}
+@anchor{gnat_rm/implementation_advice rm-13-3-50-56-size-clauses}@anchor{22b}
@section RM 13.3(50-56): Size Clauses
@@ -14274,7 +14306,7 @@ Followed.
@geindex Component_Size clauses
@node RM 13 3 71-73 Component Size Clauses,RM 13 4 9-10 Enumeration Representation Clauses,RM 13 3 50-56 Size Clauses,Implementation Advice
-@anchor{gnat_rm/implementation_advice rm-13-3-71-73-component-size-clauses}@anchor{22b}
+@anchor{gnat_rm/implementation_advice rm-13-3-71-73-component-size-clauses}@anchor{22c}
@section RM 13.3(71-73): Component Size Clauses
@@ -14308,7 +14340,7 @@ Followed.
@geindex enumeration
@node RM 13 4 9-10 Enumeration Representation Clauses,RM 13 5 1 17-22 Record Representation Clauses,RM 13 3 71-73 Component Size Clauses,Implementation Advice
-@anchor{gnat_rm/implementation_advice rm-13-4-9-10-enumeration-representation-clauses}@anchor{22c}
+@anchor{gnat_rm/implementation_advice rm-13-4-9-10-enumeration-representation-clauses}@anchor{22d}
@section RM 13.4(9-10): Enumeration Representation Clauses
@@ -14330,7 +14362,7 @@ Followed.
@geindex records
@node RM 13 5 1 17-22 Record Representation Clauses,RM 13 5 2 5 Storage Place Attributes,RM 13 4 9-10 Enumeration Representation Clauses,Implementation Advice
-@anchor{gnat_rm/implementation_advice rm-13-5-1-17-22-record-representation-clauses}@anchor{22d}
+@anchor{gnat_rm/implementation_advice rm-13-5-1-17-22-record-representation-clauses}@anchor{22e}
@section RM 13.5.1(17-22): Record Representation Clauses
@@ -14390,7 +14422,7 @@ and all mentioned features are implemented.
@geindex Storage place attributes
@node RM 13 5 2 5 Storage Place Attributes,RM 13 5 3 7-8 Bit Ordering,RM 13 5 1 17-22 Record Representation Clauses,Implementation Advice
-@anchor{gnat_rm/implementation_advice rm-13-5-2-5-storage-place-attributes}@anchor{22e}
+@anchor{gnat_rm/implementation_advice rm-13-5-2-5-storage-place-attributes}@anchor{22f}
@section RM 13.5.2(5): Storage Place Attributes
@@ -14410,7 +14442,7 @@ Followed. There are no such components in GNAT.
@geindex Bit ordering
@node RM 13 5 3 7-8 Bit Ordering,RM 13 7 37 Address as Private,RM 13 5 2 5 Storage Place Attributes,Implementation Advice
-@anchor{gnat_rm/implementation_advice rm-13-5-3-7-8-bit-ordering}@anchor{22f}
+@anchor{gnat_rm/implementation_advice rm-13-5-3-7-8-bit-ordering}@anchor{230}
@section RM 13.5.3(7-8): Bit Ordering
@@ -14430,7 +14462,7 @@ Thus non-default bit ordering is not supported.
@geindex as private type
@node RM 13 7 37 Address as Private,RM 13 7 1 16 Address Operations,RM 13 5 3 7-8 Bit Ordering,Implementation Advice
-@anchor{gnat_rm/implementation_advice rm-13-7-37-address-as-private}@anchor{230}
+@anchor{gnat_rm/implementation_advice rm-13-7-37-address-as-private}@anchor{231}
@section RM 13.7(37): Address as Private
@@ -14448,7 +14480,7 @@ Followed.
@geindex operations of
@node RM 13 7 1 16 Address Operations,RM 13 9 14-17 Unchecked Conversion,RM 13 7 37 Address as Private,Implementation Advice
-@anchor{gnat_rm/implementation_advice rm-13-7-1-16-address-operations}@anchor{231}
+@anchor{gnat_rm/implementation_advice rm-13-7-1-16-address-operations}@anchor{232}
@section RM 13.7.1(16): Address Operations
@@ -14466,7 +14498,7 @@ operation raises @code{Program_Error}, since all operations make sense.
@geindex Unchecked conversion
@node RM 13 9 14-17 Unchecked Conversion,RM 13 11 23-25 Implicit Heap Usage,RM 13 7 1 16 Address Operations,Implementation Advice
-@anchor{gnat_rm/implementation_advice rm-13-9-14-17-unchecked-conversion}@anchor{232}
+@anchor{gnat_rm/implementation_advice rm-13-9-14-17-unchecked-conversion}@anchor{233}
@section RM 13.9(14-17): Unchecked Conversion
@@ -14510,7 +14542,7 @@ Followed.
@geindex implicit
@node RM 13 11 23-25 Implicit Heap Usage,RM 13 11 2 17 Unchecked Deallocation,RM 13 9 14-17 Unchecked Conversion,Implementation Advice
-@anchor{gnat_rm/implementation_advice rm-13-11-23-25-implicit-heap-usage}@anchor{233}
+@anchor{gnat_rm/implementation_advice rm-13-11-23-25-implicit-heap-usage}@anchor{234}
@section RM 13.11(23-25): Implicit Heap Usage
@@ -14561,7 +14593,7 @@ Followed.
@geindex Unchecked deallocation
@node RM 13 11 2 17 Unchecked Deallocation,RM 13 13 2 1 6 Stream Oriented Attributes,RM 13 11 23-25 Implicit Heap Usage,Implementation Advice
-@anchor{gnat_rm/implementation_advice rm-13-11-2-17-unchecked-deallocation}@anchor{234}
+@anchor{gnat_rm/implementation_advice rm-13-11-2-17-unchecked-deallocation}@anchor{235}
@section RM 13.11.2(17): Unchecked Deallocation
@@ -14576,7 +14608,7 @@ Followed.
@geindex Stream oriented attributes
@node RM 13 13 2 1 6 Stream Oriented Attributes,RM A 1 52 Names of Predefined Numeric Types,RM 13 11 2 17 Unchecked Deallocation,Implementation Advice
-@anchor{gnat_rm/implementation_advice rm-13-13-2-1-6-stream-oriented-attributes}@anchor{235}
+@anchor{gnat_rm/implementation_advice rm-13-13-2-1-6-stream-oriented-attributes}@anchor{236}
@section RM 13.13.2(1.6): Stream Oriented Attributes
@@ -14607,7 +14639,7 @@ scalar types. This XDR alternative can be enabled via the binder switch -xdr.
@geindex Stream oriented attributes
@node RM A 1 52 Names of Predefined Numeric Types,RM A 3 2 49 Ada Characters Handling,RM 13 13 2 1 6 Stream Oriented Attributes,Implementation Advice
-@anchor{gnat_rm/implementation_advice rm-a-1-52-names-of-predefined-numeric-types}@anchor{236}
+@anchor{gnat_rm/implementation_advice rm-a-1-52-names-of-predefined-numeric-types}@anchor{237}
@section RM A.1(52): Names of Predefined Numeric Types
@@ -14625,7 +14657,7 @@ Followed.
@geindex Ada.Characters.Handling
@node RM A 3 2 49 Ada Characters Handling,RM A 4 4 106 Bounded-Length String Handling,RM A 1 52 Names of Predefined Numeric Types,Implementation Advice
-@anchor{gnat_rm/implementation_advice rm-a-3-2-49-ada-characters-handling}@anchor{237}
+@anchor{gnat_rm/implementation_advice rm-a-3-2-49-ada-characters-handling}@anchor{238}
@section RM A.3.2(49): @code{Ada.Characters.Handling}
@@ -14642,7 +14674,7 @@ Followed. GNAT provides no such localized definitions.
@geindex Bounded-length strings
@node RM A 4 4 106 Bounded-Length String Handling,RM A 5 2 46-47 Random Number Generation,RM A 3 2 49 Ada Characters Handling,Implementation Advice
-@anchor{gnat_rm/implementation_advice rm-a-4-4-106-bounded-length-string-handling}@anchor{238}
+@anchor{gnat_rm/implementation_advice rm-a-4-4-106-bounded-length-string-handling}@anchor{239}
@section RM A.4.4(106): Bounded-Length String Handling
@@ -14657,7 +14689,7 @@ Followed. No implicit pointers or dynamic allocation are used.
@geindex Random number generation
@node RM A 5 2 46-47 Random Number Generation,RM A 10 7 23 Get_Immediate,RM A 4 4 106 Bounded-Length String Handling,Implementation Advice
-@anchor{gnat_rm/implementation_advice rm-a-5-2-46-47-random-number-generation}@anchor{239}
+@anchor{gnat_rm/implementation_advice rm-a-5-2-46-47-random-number-generation}@anchor{23a}
@section RM A.5.2(46-47): Random Number Generation
@@ -14686,7 +14718,7 @@ condition here to hold true.
@geindex Get_Immediate
@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{23a}
+@anchor{gnat_rm/implementation_advice rm-a-10-7-23-get-immediate}@anchor{23b}
@section RM A.10.7(23): @code{Get_Immediate}
@@ -14710,7 +14742,7 @@ 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{23b}
+@anchor{gnat_rm/implementation_advice rm-a-18-containers}@anchor{23c}
@section RM A.18: @code{Containers}
@@ -14731,7 +14763,7 @@ follow the implementation advice.
@geindex Export
@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{23c}
+@anchor{gnat_rm/implementation_advice rm-b-1-39-41-pragma-export}@anchor{23d}
@section RM B.1(39-41): Pragma @code{Export}
@@ -14779,7 +14811,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{23d}
+@anchor{gnat_rm/implementation_advice rm-b-2-12-13-package-interfaces}@anchor{23e}
@section RM B.2(12-13): Package @code{Interfaces}
@@ -14809,7 +14841,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{23e}
+@anchor{gnat_rm/implementation_advice rm-b-3-63-71-interfacing-with-c}@anchor{23f}
@section RM B.3(63-71): Interfacing with C
@@ -14897,7 +14929,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{23f}
+@anchor{gnat_rm/implementation_advice rm-b-4-95-98-interfacing-with-cobol}@anchor{240}
@section RM B.4(95-98): Interfacing with COBOL
@@ -14938,7 +14970,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{240}
+@anchor{gnat_rm/implementation_advice rm-b-5-22-26-interfacing-with-fortran}@anchor{241}
@section RM B.5(22-26): Interfacing with Fortran
@@ -14989,7 +15021,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{241}
+@anchor{gnat_rm/implementation_advice rm-c-1-3-5-access-to-machine-operations}@anchor{242}
@section RM C.1(3-5): Access to Machine Operations
@@ -15024,7 +15056,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{242}
+@anchor{gnat_rm/implementation_advice rm-c-1-10-16-access-to-machine-operations}@anchor{243}
@section RM C.1(10-16): Access to Machine Operations
@@ -15085,7 +15117,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{243}
+@anchor{gnat_rm/implementation_advice rm-c-3-28-interrupt-support}@anchor{244}
@section RM C.3(28): Interrupt Support
@@ -15103,7 +15135,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{244}
+@anchor{gnat_rm/implementation_advice rm-c-3-1-20-21-protected-procedure-handlers}@anchor{245}
@section RM C.3.1(20-21): Protected Procedure Handlers
@@ -15129,7 +15161,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{245}
+@anchor{gnat_rm/implementation_advice rm-c-3-2-25-package-interrupts}@anchor{246}
@section RM C.3.2(25): Package @code{Interrupts}
@@ -15147,7 +15179,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{246}
+@anchor{gnat_rm/implementation_advice rm-c-4-14-pre-elaboration-requirements}@anchor{247}
@section RM C.4(14): Pre-elaboration Requirements
@@ -15163,7 +15195,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{247}
+@anchor{gnat_rm/implementation_advice rm-c-5-8-pragma-discard-names}@anchor{248}
@section RM C.5(8): Pragma @code{Discard_Names}
@@ -15181,7 +15213,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{248}
+@anchor{gnat_rm/implementation_advice rm-c-7-2-30-the-package-task-attributes}@anchor{249}
@section RM C.7.2(30): The Package Task_Attributes
@@ -15202,7 +15234,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{249}
+@anchor{gnat_rm/implementation_advice rm-d-3-17-locking-policies}@anchor{24a}
@section RM D.3(17): Locking Policies
@@ -15219,7 +15251,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{24a}
+@anchor{gnat_rm/implementation_advice rm-d-4-16-entry-queuing-policies}@anchor{24b}
@section RM D.4(16): Entry Queuing Policies
@@ -15234,7 +15266,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{24b}
+@anchor{gnat_rm/implementation_advice rm-d-6-9-10-preemptive-abort}@anchor{24c}
@section RM D.6(9-10): Preemptive Abort
@@ -15260,7 +15292,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{24c}
+@anchor{gnat_rm/implementation_advice rm-d-7-21-tasking-restrictions}@anchor{24d}
@section RM D.7(21): Tasking Restrictions
@@ -15279,7 +15311,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{24d}
+@anchor{gnat_rm/implementation_advice rm-d-8-47-49-monotonic-time}@anchor{24e}
@section RM D.8(47-49): Monotonic Time
@@ -15314,7 +15346,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{24e}
+@anchor{gnat_rm/implementation_advice rm-e-5-28-29-partition-communication-subsystem}@anchor{24f}
@section RM E.5(28-29): Partition Communication Subsystem
@@ -15342,7 +15374,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{24f}
+@anchor{gnat_rm/implementation_advice rm-f-7-cobol-support}@anchor{250}
@section RM F(7): COBOL Support
@@ -15362,7 +15394,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{250}
+@anchor{gnat_rm/implementation_advice rm-f-1-2-decimal-radix-support}@anchor{251}
@section RM F.1(2): Decimal Radix Support
@@ -15378,7 +15410,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{251}
+@anchor{gnat_rm/implementation_advice rm-g-numerics}@anchor{252}
@section RM G: Numerics
@@ -15398,7 +15430,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{252}
+@anchor{gnat_rm/implementation_advice rm-g-1-1-56-58-complex-types}@anchor{253}
@section RM G.1.1(56-58): Complex Types
@@ -15460,7 +15492,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{253}
+@anchor{gnat_rm/implementation_advice rm-g-1-2-49-complex-elementary-functions}@anchor{254}
@section RM G.1.2(49): Complex Elementary Functions
@@ -15482,7 +15514,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{254}
+@anchor{gnat_rm/implementation_advice rm-g-2-4-19-accuracy-requirements}@anchor{255}
@section RM G.2.4(19): Accuracy Requirements
@@ -15506,7 +15538,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{255}
+@anchor{gnat_rm/implementation_advice rm-g-2-6-15-complex-arithmetic-accuracy}@anchor{256}
@section RM G.2.6(15): Complex Arithmetic Accuracy
@@ -15524,7 +15556,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{256}
+@anchor{gnat_rm/implementation_advice rm-h-6-15-2-pragma-partition-elaboration-policy}@anchor{257}
@section RM H.6(15/2): Pragma Partition_Elaboration_Policy
@@ -15539,7 +15571,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{257}@anchor{gnat_rm/implementation_defined_characteristics id1}@anchor{258}
+@anchor{gnat_rm/implementation_defined_characteristics implementation-defined-characteristics}@anchor{b}@anchor{gnat_rm/implementation_defined_characteristics doc}@anchor{258}@anchor{gnat_rm/implementation_defined_characteristics id1}@anchor{259}
@chapter Implementation Defined Characteristics
@@ -16767,7 +16799,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{259,,GNAT.Regexp (g-regexp.ads)}.
+See @ref{25a,,GNAT.Regexp (g-regexp.ads)}.
@itemize *
@@ -17815,7 +17847,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{25a}@anchor{gnat_rm/intrinsic_subprograms intrinsic-subprograms}@anchor{c}@anchor{gnat_rm/intrinsic_subprograms id1}@anchor{25b}
+@anchor{gnat_rm/intrinsic_subprograms doc}@anchor{25b}@anchor{gnat_rm/intrinsic_subprograms intrinsic-subprograms}@anchor{c}@anchor{gnat_rm/intrinsic_subprograms id1}@anchor{25c}
@chapter Intrinsic Subprograms
@@ -17853,7 +17885,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{25c}@anchor{gnat_rm/intrinsic_subprograms intrinsic-operators}@anchor{25d}
+@anchor{gnat_rm/intrinsic_subprograms id2}@anchor{25d}@anchor{gnat_rm/intrinsic_subprograms intrinsic-operators}@anchor{25e}
@section Intrinsic Operators
@@ -17884,7 +17916,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{25e}@anchor{gnat_rm/intrinsic_subprograms compilation-iso-date}@anchor{25f}
+@anchor{gnat_rm/intrinsic_subprograms id3}@anchor{25f}@anchor{gnat_rm/intrinsic_subprograms compilation-iso-date}@anchor{260}
@section Compilation_ISO_Date
@@ -17898,7 +17930,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{260}@anchor{gnat_rm/intrinsic_subprograms id4}@anchor{261}
+@anchor{gnat_rm/intrinsic_subprograms compilation-date}@anchor{261}@anchor{gnat_rm/intrinsic_subprograms id4}@anchor{262}
@section Compilation_Date
@@ -17908,7 +17940,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{262}@anchor{gnat_rm/intrinsic_subprograms id5}@anchor{263}
+@anchor{gnat_rm/intrinsic_subprograms compilation-time}@anchor{263}@anchor{gnat_rm/intrinsic_subprograms id5}@anchor{264}
@section Compilation_Time
@@ -17922,7 +17954,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{264}@anchor{gnat_rm/intrinsic_subprograms enclosing-entity}@anchor{265}
+@anchor{gnat_rm/intrinsic_subprograms id6}@anchor{265}@anchor{gnat_rm/intrinsic_subprograms enclosing-entity}@anchor{266}
@section Enclosing_Entity
@@ -17936,7 +17968,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{266}@anchor{gnat_rm/intrinsic_subprograms exception-information}@anchor{267}
+@anchor{gnat_rm/intrinsic_subprograms id7}@anchor{267}@anchor{gnat_rm/intrinsic_subprograms exception-information}@anchor{268}
@section Exception_Information
@@ -17950,7 +17982,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{268}@anchor{gnat_rm/intrinsic_subprograms id8}@anchor{269}
+@anchor{gnat_rm/intrinsic_subprograms exception-message}@anchor{269}@anchor{gnat_rm/intrinsic_subprograms id8}@anchor{26a}
@section Exception_Message
@@ -17964,7 +17996,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{26a}@anchor{gnat_rm/intrinsic_subprograms id9}@anchor{26b}
+@anchor{gnat_rm/intrinsic_subprograms exception-name}@anchor{26b}@anchor{gnat_rm/intrinsic_subprograms id9}@anchor{26c}
@section Exception_Name
@@ -17978,7 +18010,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{26c}@anchor{gnat_rm/intrinsic_subprograms file}@anchor{26d}
+@anchor{gnat_rm/intrinsic_subprograms id10}@anchor{26d}@anchor{gnat_rm/intrinsic_subprograms file}@anchor{26e}
@section File
@@ -17992,7 +18024,7 @@ application program should simply call the function
file.
@node Line,Shifts and Rotates,File,Intrinsic Subprograms
-@anchor{gnat_rm/intrinsic_subprograms id11}@anchor{26e}@anchor{gnat_rm/intrinsic_subprograms line}@anchor{26f}
+@anchor{gnat_rm/intrinsic_subprograms id11}@anchor{26f}@anchor{gnat_rm/intrinsic_subprograms line}@anchor{270}
@section Line
@@ -18006,7 +18038,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{270}@anchor{gnat_rm/intrinsic_subprograms id12}@anchor{271}
+@anchor{gnat_rm/intrinsic_subprograms shifts-and-rotates}@anchor{271}@anchor{gnat_rm/intrinsic_subprograms id12}@anchor{272}
@section Shifts and Rotates
@@ -18049,7 +18081,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{272}@anchor{gnat_rm/intrinsic_subprograms id13}@anchor{273}
+@anchor{gnat_rm/intrinsic_subprograms source-location}@anchor{273}@anchor{gnat_rm/intrinsic_subprograms id13}@anchor{274}
@section Source_Location
@@ -18063,7 +18095,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{274}@anchor{gnat_rm/representation_clauses_and_pragmas id1}@anchor{275}
+@anchor{gnat_rm/representation_clauses_and_pragmas representation-clauses-and-pragmas}@anchor{d}@anchor{gnat_rm/representation_clauses_and_pragmas doc}@anchor{275}@anchor{gnat_rm/representation_clauses_and_pragmas id1}@anchor{276}
@chapter Representation Clauses and Pragmas
@@ -18109,7 +18141,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{276}@anchor{gnat_rm/representation_clauses_and_pragmas alignment-clauses}@anchor{277}
+@anchor{gnat_rm/representation_clauses_and_pragmas id2}@anchor{277}@anchor{gnat_rm/representation_clauses_and_pragmas alignment-clauses}@anchor{278}
@section Alignment Clauses
@@ -18240,7 +18272,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{278}@anchor{gnat_rm/representation_clauses_and_pragmas size-clauses}@anchor{279}
+@anchor{gnat_rm/representation_clauses_and_pragmas id3}@anchor{279}@anchor{gnat_rm/representation_clauses_and_pragmas size-clauses}@anchor{27a}
@section Size Clauses
@@ -18317,7 +18349,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{27a}@anchor{gnat_rm/representation_clauses_and_pragmas id4}@anchor{27b}
+@anchor{gnat_rm/representation_clauses_and_pragmas storage-size-clauses}@anchor{27b}@anchor{gnat_rm/representation_clauses_and_pragmas id4}@anchor{27c}
@section Storage_Size Clauses
@@ -18390,7 +18422,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{27c}@anchor{gnat_rm/representation_clauses_and_pragmas size-of-variant-record-objects}@anchor{27d}
+@anchor{gnat_rm/representation_clauses_and_pragmas id5}@anchor{27d}@anchor{gnat_rm/representation_clauses_and_pragmas size-of-variant-record-objects}@anchor{27e}
@section Size of Variant Record Objects
@@ -18500,7 +18532,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{27e}@anchor{gnat_rm/representation_clauses_and_pragmas biased-representation}@anchor{27f}
+@anchor{gnat_rm/representation_clauses_and_pragmas id6}@anchor{27f}@anchor{gnat_rm/representation_clauses_and_pragmas biased-representation}@anchor{280}
@section Biased Representation
@@ -18538,7 +18570,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{280}@anchor{gnat_rm/representation_clauses_and_pragmas value-size-and-object-size-clauses}@anchor{281}
+@anchor{gnat_rm/representation_clauses_and_pragmas id7}@anchor{281}@anchor{gnat_rm/representation_clauses_and_pragmas value-size-and-object-size-clauses}@anchor{282}
@section Value_Size and Object_Size Clauses
@@ -18854,7 +18886,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{282}@anchor{gnat_rm/representation_clauses_and_pragmas component-size-clauses}@anchor{283}
+@anchor{gnat_rm/representation_clauses_and_pragmas id8}@anchor{283}@anchor{gnat_rm/representation_clauses_and_pragmas component-size-clauses}@anchor{284}
@section Component_Size Clauses
@@ -18902,7 +18934,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{284}@anchor{gnat_rm/representation_clauses_and_pragmas id9}@anchor{285}
+@anchor{gnat_rm/representation_clauses_and_pragmas bit-order-clauses}@anchor{285}@anchor{gnat_rm/representation_clauses_and_pragmas id9}@anchor{286}
@section Bit_Order Clauses
@@ -19008,7 +19040,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{286}@anchor{gnat_rm/representation_clauses_and_pragmas effect-of-bit-order-on-byte-ordering}@anchor{287}
+@anchor{gnat_rm/representation_clauses_and_pragmas id10}@anchor{287}@anchor{gnat_rm/representation_clauses_and_pragmas effect-of-bit-order-on-byte-ordering}@anchor{288}
@section Effect of Bit_Order on Byte Ordering
@@ -19265,7 +19297,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{288}@anchor{gnat_rm/representation_clauses_and_pragmas id11}@anchor{289}
+@anchor{gnat_rm/representation_clauses_and_pragmas pragma-pack-for-arrays}@anchor{289}@anchor{gnat_rm/representation_clauses_and_pragmas id11}@anchor{28a}
@section Pragma Pack for Arrays
@@ -19385,7 +19417,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{28a}@anchor{gnat_rm/representation_clauses_and_pragmas id12}@anchor{28b}
+@anchor{gnat_rm/representation_clauses_and_pragmas pragma-pack-for-records}@anchor{28b}@anchor{gnat_rm/representation_clauses_and_pragmas id12}@anchor{28c}
@section Pragma Pack for Records
@@ -19469,7 +19501,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{28c}@anchor{gnat_rm/representation_clauses_and_pragmas record-representation-clauses}@anchor{28d}
+@anchor{gnat_rm/representation_clauses_and_pragmas id13}@anchor{28d}@anchor{gnat_rm/representation_clauses_and_pragmas record-representation-clauses}@anchor{28e}
@section Record Representation Clauses
@@ -19548,7 +19580,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{28e}@anchor{gnat_rm/representation_clauses_and_pragmas id14}@anchor{28f}
+@anchor{gnat_rm/representation_clauses_and_pragmas handling-of-records-with-holes}@anchor{28f}@anchor{gnat_rm/representation_clauses_and_pragmas id14}@anchor{290}
@section Handling of Records with Holes
@@ -19624,7 +19656,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{290}@anchor{gnat_rm/representation_clauses_and_pragmas id15}@anchor{291}
+@anchor{gnat_rm/representation_clauses_and_pragmas enumeration-clauses}@anchor{291}@anchor{gnat_rm/representation_clauses_and_pragmas id15}@anchor{292}
@section Enumeration Clauses
@@ -19667,7 +19699,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{292}@anchor{gnat_rm/representation_clauses_and_pragmas address-clauses}@anchor{293}
+@anchor{gnat_rm/representation_clauses_and_pragmas id16}@anchor{293}@anchor{gnat_rm/representation_clauses_and_pragmas address-clauses}@anchor{294}
@section Address Clauses
@@ -19946,7 +19978,7 @@ of the use of this pragma. This may cause an overlay to have this
unintended clobbering effect. The compiler avoids this for scalar
types, but not for composite objects (where in general the effect
of @code{Initialize_Scalars} is part of the initialization routine
-for the composite object:
+for the composite object):
@example
pragma Initialize_Scalars;
@@ -19996,7 +20028,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{294}@anchor{gnat_rm/representation_clauses_and_pragmas use-of-address-clauses-for-memory-mapped-i-o}@anchor{295}
+@anchor{gnat_rm/representation_clauses_and_pragmas id17}@anchor{295}@anchor{gnat_rm/representation_clauses_and_pragmas use-of-address-clauses-for-memory-mapped-i-o}@anchor{296}
@section Use of Address Clauses for Memory-Mapped I/O
@@ -20054,7 +20086,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{296}@anchor{gnat_rm/representation_clauses_and_pragmas effect-of-convention-on-representation}@anchor{297}
+@anchor{gnat_rm/representation_clauses_and_pragmas id18}@anchor{297}@anchor{gnat_rm/representation_clauses_and_pragmas effect-of-convention-on-representation}@anchor{298}
@section Effect of Convention on Representation
@@ -20132,7 +20164,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{298}@anchor{gnat_rm/representation_clauses_and_pragmas id19}@anchor{299}
+@anchor{gnat_rm/representation_clauses_and_pragmas conventions-and-anonymous-access-types}@anchor{299}@anchor{gnat_rm/representation_clauses_and_pragmas id19}@anchor{29a}
@section Conventions and Anonymous Access Types
@@ -20208,7 +20240,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{29a}@anchor{gnat_rm/representation_clauses_and_pragmas determining-the-representations-chosen-by-gnat}@anchor{29b}
+@anchor{gnat_rm/representation_clauses_and_pragmas id20}@anchor{29b}@anchor{gnat_rm/representation_clauses_and_pragmas determining-the-representations-chosen-by-gnat}@anchor{29c}
@section Determining the Representations chosen by GNAT
@@ -20360,7 +20392,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{29c}@anchor{gnat_rm/standard_library_routines id1}@anchor{29d}
+@anchor{gnat_rm/standard_library_routines standard-library-routines}@anchor{e}@anchor{gnat_rm/standard_library_routines doc}@anchor{29d}@anchor{gnat_rm/standard_library_routines id1}@anchor{29e}
@chapter Standard Library Routines
@@ -21184,7 +21216,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{29e}@anchor{gnat_rm/the_implementation_of_standard_i_o id1}@anchor{29f}
+@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{29f}@anchor{gnat_rm/the_implementation_of_standard_i_o id1}@anchor{2a0}
@chapter The Implementation of Standard I/O
@@ -21236,7 +21268,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{2a0}@anchor{gnat_rm/the_implementation_of_standard_i_o id2}@anchor{2a1}
+@anchor{gnat_rm/the_implementation_of_standard_i_o standard-i-o-packages}@anchor{2a1}@anchor{gnat_rm/the_implementation_of_standard_i_o id2}@anchor{2a2}
@section Standard I/O Packages
@@ -21307,7 +21339,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{2a2}@anchor{gnat_rm/the_implementation_of_standard_i_o id3}@anchor{2a3}
+@anchor{gnat_rm/the_implementation_of_standard_i_o form-strings}@anchor{2a3}@anchor{gnat_rm/the_implementation_of_standard_i_o id3}@anchor{2a4}
@section FORM Strings
@@ -21333,7 +21365,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{2a4}@anchor{gnat_rm/the_implementation_of_standard_i_o id4}@anchor{2a5}
+@anchor{gnat_rm/the_implementation_of_standard_i_o direct-io}@anchor{2a5}@anchor{gnat_rm/the_implementation_of_standard_i_o id4}@anchor{2a6}
@section Direct_IO
@@ -21353,7 +21385,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{2a6}@anchor{gnat_rm/the_implementation_of_standard_i_o id5}@anchor{2a7}
+@anchor{gnat_rm/the_implementation_of_standard_i_o sequential-io}@anchor{2a7}@anchor{gnat_rm/the_implementation_of_standard_i_o id5}@anchor{2a8}
@section Sequential_IO
@@ -21400,7 +21432,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{2a8}@anchor{gnat_rm/the_implementation_of_standard_i_o text-io}@anchor{2a9}
+@anchor{gnat_rm/the_implementation_of_standard_i_o id6}@anchor{2a9}@anchor{gnat_rm/the_implementation_of_standard_i_o text-io}@anchor{2aa}
@section Text_IO
@@ -21483,7 +21515,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{2aa}@anchor{gnat_rm/the_implementation_of_standard_i_o stream-pointer-positioning}@anchor{2ab}
+@anchor{gnat_rm/the_implementation_of_standard_i_o id7}@anchor{2ab}@anchor{gnat_rm/the_implementation_of_standard_i_o stream-pointer-positioning}@anchor{2ac}
@subsection Stream Pointer Positioning
@@ -21519,7 +21551,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{2ac}@anchor{gnat_rm/the_implementation_of_standard_i_o id8}@anchor{2ad}
+@anchor{gnat_rm/the_implementation_of_standard_i_o reading-and-writing-non-regular-files}@anchor{2ad}@anchor{gnat_rm/the_implementation_of_standard_i_o id8}@anchor{2ae}
@subsection Reading and Writing Non-Regular Files
@@ -21570,7 +21602,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{2ae}@anchor{gnat_rm/the_implementation_of_standard_i_o id9}@anchor{2af}
+@anchor{gnat_rm/the_implementation_of_standard_i_o get-immediate}@anchor{2af}@anchor{gnat_rm/the_implementation_of_standard_i_o id9}@anchor{2b0}
@subsection Get_Immediate
@@ -21588,7 +21620,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{2b0}@anchor{gnat_rm/the_implementation_of_standard_i_o treating-text-io-files-as-streams}@anchor{2b1}
+@anchor{gnat_rm/the_implementation_of_standard_i_o id10}@anchor{2b1}@anchor{gnat_rm/the_implementation_of_standard_i_o treating-text-io-files-as-streams}@anchor{2b2}
@subsection Treating Text_IO Files as Streams
@@ -21604,7 +21636,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{2b2}@anchor{gnat_rm/the_implementation_of_standard_i_o text-io-extensions}@anchor{2b3}
+@anchor{gnat_rm/the_implementation_of_standard_i_o id11}@anchor{2b3}@anchor{gnat_rm/the_implementation_of_standard_i_o text-io-extensions}@anchor{2b4}
@subsection Text_IO Extensions
@@ -21632,7 +21664,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{2b4}@anchor{gnat_rm/the_implementation_of_standard_i_o id12}@anchor{2b5}
+@anchor{gnat_rm/the_implementation_of_standard_i_o text-io-facilities-for-unbounded-strings}@anchor{2b5}@anchor{gnat_rm/the_implementation_of_standard_i_o id12}@anchor{2b6}
@subsection Text_IO Facilities for Unbounded Strings
@@ -21680,7 +21712,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{2b6}@anchor{gnat_rm/the_implementation_of_standard_i_o id13}@anchor{2b7}
+@anchor{gnat_rm/the_implementation_of_standard_i_o wide-text-io}@anchor{2b7}@anchor{gnat_rm/the_implementation_of_standard_i_o id13}@anchor{2b8}
@section Wide_Text_IO
@@ -21927,12 +21959,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{2b8}@anchor{gnat_rm/the_implementation_of_standard_i_o id14}@anchor{2b9}
+@anchor{gnat_rm/the_implementation_of_standard_i_o stream-pointer-positioning-1}@anchor{2b9}@anchor{gnat_rm/the_implementation_of_standard_i_o id14}@anchor{2ba}
@subsection Stream Pointer Positioning
@code{Ada.Wide_Text_IO} is similar to @code{Ada.Text_IO} in its handling
-of stream pointer positioning (@ref{2a9,,Text_IO}). There is one additional
+of stream pointer positioning (@ref{2aa,,Text_IO}). There is one additional
case:
If @code{Ada.Wide_Text_IO.Look_Ahead} reads a character outside the
@@ -21951,7 +21983,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{2ba}@anchor{gnat_rm/the_implementation_of_standard_i_o id15}@anchor{2bb}
+@anchor{gnat_rm/the_implementation_of_standard_i_o reading-and-writing-non-regular-files-1}@anchor{2bb}@anchor{gnat_rm/the_implementation_of_standard_i_o id15}@anchor{2bc}
@subsection Reading and Writing Non-Regular Files
@@ -21962,7 +21994,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{2bc}@anchor{gnat_rm/the_implementation_of_standard_i_o wide-wide-text-io}@anchor{2bd}
+@anchor{gnat_rm/the_implementation_of_standard_i_o id16}@anchor{2bd}@anchor{gnat_rm/the_implementation_of_standard_i_o wide-wide-text-io}@anchor{2be}
@section Wide_Wide_Text_IO
@@ -22131,12 +22163,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{2be}@anchor{gnat_rm/the_implementation_of_standard_i_o id17}@anchor{2bf}
+@anchor{gnat_rm/the_implementation_of_standard_i_o stream-pointer-positioning-2}@anchor{2bf}@anchor{gnat_rm/the_implementation_of_standard_i_o id17}@anchor{2c0}
@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{2a9,,Text_IO}). There is one additional
+of stream pointer positioning (@ref{2aa,,Text_IO}). There is one additional
case:
If @code{Ada.Wide_Wide_Text_IO.Look_Ahead} reads a character outside the
@@ -22155,7 +22187,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{2c0}@anchor{gnat_rm/the_implementation_of_standard_i_o reading-and-writing-non-regular-files-2}@anchor{2c1}
+@anchor{gnat_rm/the_implementation_of_standard_i_o id18}@anchor{2c1}@anchor{gnat_rm/the_implementation_of_standard_i_o reading-and-writing-non-regular-files-2}@anchor{2c2}
@subsection Reading and Writing Non-Regular Files
@@ -22166,7 +22198,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{2c2}@anchor{gnat_rm/the_implementation_of_standard_i_o stream-io}@anchor{2c3}
+@anchor{gnat_rm/the_implementation_of_standard_i_o id19}@anchor{2c3}@anchor{gnat_rm/the_implementation_of_standard_i_o stream-io}@anchor{2c4}
@section Stream_IO
@@ -22188,7 +22220,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{2c4}@anchor{gnat_rm/the_implementation_of_standard_i_o text-translation}@anchor{2c5}
+@anchor{gnat_rm/the_implementation_of_standard_i_o id20}@anchor{2c5}@anchor{gnat_rm/the_implementation_of_standard_i_o text-translation}@anchor{2c6}
@section Text Translation
@@ -22222,7 +22254,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{2c6}@anchor{gnat_rm/the_implementation_of_standard_i_o shared-files}@anchor{2c7}
+@anchor{gnat_rm/the_implementation_of_standard_i_o id21}@anchor{2c7}@anchor{gnat_rm/the_implementation_of_standard_i_o shared-files}@anchor{2c8}
@section Shared Files
@@ -22285,7 +22317,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{2c8}@anchor{gnat_rm/the_implementation_of_standard_i_o id22}@anchor{2c9}
+@anchor{gnat_rm/the_implementation_of_standard_i_o filenames-encoding}@anchor{2c9}@anchor{gnat_rm/the_implementation_of_standard_i_o id22}@anchor{2ca}
@section Filenames encoding
@@ -22325,7 +22357,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{2ca}@anchor{gnat_rm/the_implementation_of_standard_i_o id23}@anchor{2cb}
+@anchor{gnat_rm/the_implementation_of_standard_i_o file-content-encoding}@anchor{2cb}@anchor{gnat_rm/the_implementation_of_standard_i_o id23}@anchor{2cc}
@section File content encoding
@@ -22358,7 +22390,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{2cc}@anchor{gnat_rm/the_implementation_of_standard_i_o id24}@anchor{2cd}
+@anchor{gnat_rm/the_implementation_of_standard_i_o open-modes}@anchor{2cd}@anchor{gnat_rm/the_implementation_of_standard_i_o id24}@anchor{2ce}
@section Open Modes
@@ -22461,7 +22493,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{2ce}@anchor{gnat_rm/the_implementation_of_standard_i_o id25}@anchor{2cf}
+@anchor{gnat_rm/the_implementation_of_standard_i_o operations-on-c-streams}@anchor{2cf}@anchor{gnat_rm/the_implementation_of_standard_i_o id25}@anchor{2d0}
@section Operations on C Streams
@@ -22621,7 +22653,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{2d0}@anchor{gnat_rm/the_implementation_of_standard_i_o id26}@anchor{2d1}
+@anchor{gnat_rm/the_implementation_of_standard_i_o interfacing-to-c-streams}@anchor{2d1}@anchor{gnat_rm/the_implementation_of_standard_i_o id26}@anchor{2d2}
@section Interfacing to C Streams
@@ -22714,7 +22746,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{2d2}@anchor{gnat_rm/the_gnat_library id1}@anchor{2d3}
+@anchor{gnat_rm/the_gnat_library the-gnat-library}@anchor{10}@anchor{gnat_rm/the_gnat_library doc}@anchor{2d3}@anchor{gnat_rm/the_gnat_library id1}@anchor{2d4}
@chapter The GNAT Library
@@ -22908,7 +22940,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{2d4}@anchor{gnat_rm/the_gnat_library ada-characters-latin-9-a-chlat9-ads}@anchor{2d5}
+@anchor{gnat_rm/the_gnat_library id2}@anchor{2d5}@anchor{gnat_rm/the_gnat_library ada-characters-latin-9-a-chlat9-ads}@anchor{2d6}
@section @code{Ada.Characters.Latin_9} (@code{a-chlat9.ads})
@@ -22925,7 +22957,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{2d6}@anchor{gnat_rm/the_gnat_library id3}@anchor{2d7}
+@anchor{gnat_rm/the_gnat_library ada-characters-wide-latin-1-a-cwila1-ads}@anchor{2d7}@anchor{gnat_rm/the_gnat_library id3}@anchor{2d8}
@section @code{Ada.Characters.Wide_Latin_1} (@code{a-cwila1.ads})
@@ -22942,7 +22974,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{2d8}@anchor{gnat_rm/the_gnat_library ada-characters-wide-latin-9-a-cwila1-ads}@anchor{2d9}
+@anchor{gnat_rm/the_gnat_library id4}@anchor{2d9}@anchor{gnat_rm/the_gnat_library ada-characters-wide-latin-9-a-cwila1-ads}@anchor{2da}
@section @code{Ada.Characters.Wide_Latin_9} (@code{a-cwila1.ads})
@@ -22959,7 +22991,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{2da}@anchor{gnat_rm/the_gnat_library id5}@anchor{2db}
+@anchor{gnat_rm/the_gnat_library ada-characters-wide-wide-latin-1-a-chzla1-ads}@anchor{2db}@anchor{gnat_rm/the_gnat_library id5}@anchor{2dc}
@section @code{Ada.Characters.Wide_Wide_Latin_1} (@code{a-chzla1.ads})
@@ -22976,7 +23008,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{2dc}@anchor{gnat_rm/the_gnat_library id6}@anchor{2dd}
+@anchor{gnat_rm/the_gnat_library ada-characters-wide-wide-latin-9-a-chzla9-ads}@anchor{2dd}@anchor{gnat_rm/the_gnat_library id6}@anchor{2de}
@section @code{Ada.Characters.Wide_Wide_Latin_9} (@code{a-chzla9.ads})
@@ -22993,7 +23025,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{2de}@anchor{gnat_rm/the_gnat_library ada-containers-formal-doubly-linked-lists-a-cfdlli-ads}@anchor{2df}
+@anchor{gnat_rm/the_gnat_library id7}@anchor{2df}@anchor{gnat_rm/the_gnat_library ada-containers-formal-doubly-linked-lists-a-cfdlli-ads}@anchor{2e0}
@section @code{Ada.Containers.Formal_Doubly_Linked_Lists} (@code{a-cfdlli.ads})
@@ -23012,7 +23044,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{2e0}@anchor{gnat_rm/the_gnat_library ada-containers-formal-hashed-maps-a-cfhama-ads}@anchor{2e1}
+@anchor{gnat_rm/the_gnat_library id8}@anchor{2e1}@anchor{gnat_rm/the_gnat_library ada-containers-formal-hashed-maps-a-cfhama-ads}@anchor{2e2}
@section @code{Ada.Containers.Formal_Hashed_Maps} (@code{a-cfhama.ads})
@@ -23031,7 +23063,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{2e2}@anchor{gnat_rm/the_gnat_library ada-containers-formal-hashed-sets-a-cfhase-ads}@anchor{2e3}
+@anchor{gnat_rm/the_gnat_library id9}@anchor{2e3}@anchor{gnat_rm/the_gnat_library ada-containers-formal-hashed-sets-a-cfhase-ads}@anchor{2e4}
@section @code{Ada.Containers.Formal_Hashed_Sets} (@code{a-cfhase.ads})
@@ -23050,7 +23082,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{2e4}@anchor{gnat_rm/the_gnat_library ada-containers-formal-ordered-maps-a-cforma-ads}@anchor{2e5}
+@anchor{gnat_rm/the_gnat_library id10}@anchor{2e5}@anchor{gnat_rm/the_gnat_library ada-containers-formal-ordered-maps-a-cforma-ads}@anchor{2e6}
@section @code{Ada.Containers.Formal_Ordered_Maps} (@code{a-cforma.ads})
@@ -23069,7 +23101,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{2e6}@anchor{gnat_rm/the_gnat_library id11}@anchor{2e7}
+@anchor{gnat_rm/the_gnat_library ada-containers-formal-ordered-sets-a-cforse-ads}@anchor{2e7}@anchor{gnat_rm/the_gnat_library id11}@anchor{2e8}
@section @code{Ada.Containers.Formal_Ordered_Sets} (@code{a-cforse.ads})
@@ -23088,7 +23120,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{2e8}@anchor{gnat_rm/the_gnat_library ada-containers-formal-vectors-a-cofove-ads}@anchor{2e9}
+@anchor{gnat_rm/the_gnat_library id12}@anchor{2e9}@anchor{gnat_rm/the_gnat_library ada-containers-formal-vectors-a-cofove-ads}@anchor{2ea}
@section @code{Ada.Containers.Formal_Vectors} (@code{a-cofove.ads})
@@ -23107,7 +23139,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{2ea}@anchor{gnat_rm/the_gnat_library ada-containers-formal-indefinite-vectors-a-cfinve-ads}@anchor{2eb}
+@anchor{gnat_rm/the_gnat_library id13}@anchor{2eb}@anchor{gnat_rm/the_gnat_library ada-containers-formal-indefinite-vectors-a-cfinve-ads}@anchor{2ec}
@section @code{Ada.Containers.Formal_Indefinite_Vectors} (@code{a-cfinve.ads})
@@ -23126,7 +23158,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{2ec}@anchor{gnat_rm/the_gnat_library ada-containers-functional-vectors-a-cofuve-ads}@anchor{2ed}
+@anchor{gnat_rm/the_gnat_library id14}@anchor{2ed}@anchor{gnat_rm/the_gnat_library ada-containers-functional-vectors-a-cofuve-ads}@anchor{2ee}
@section @code{Ada.Containers.Functional_Vectors} (@code{a-cofuve.ads})
@@ -23148,7 +23180,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{2ee}@anchor{gnat_rm/the_gnat_library id15}@anchor{2ef}
+@anchor{gnat_rm/the_gnat_library ada-containers-functional-sets-a-cofuse-ads}@anchor{2ef}@anchor{gnat_rm/the_gnat_library id15}@anchor{2f0}
@section @code{Ada.Containers.Functional_Sets} (@code{a-cofuse.ads})
@@ -23170,7 +23202,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{2f0}@anchor{gnat_rm/the_gnat_library ada-containers-functional-maps-a-cofuma-ads}@anchor{2f1}
+@anchor{gnat_rm/the_gnat_library id16}@anchor{2f1}@anchor{gnat_rm/the_gnat_library ada-containers-functional-maps-a-cofuma-ads}@anchor{2f2}
@section @code{Ada.Containers.Functional_Maps} (@code{a-cofuma.ads})
@@ -23192,7 +23224,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{2f2}@anchor{gnat_rm/the_gnat_library id17}@anchor{2f3}
+@anchor{gnat_rm/the_gnat_library ada-containers-bounded-holders-a-coboho-ads}@anchor{2f3}@anchor{gnat_rm/the_gnat_library id17}@anchor{2f4}
@section @code{Ada.Containers.Bounded_Holders} (@code{a-coboho.ads})
@@ -23204,7 +23236,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{2f4}@anchor{gnat_rm/the_gnat_library id18}@anchor{2f5}
+@anchor{gnat_rm/the_gnat_library ada-command-line-environment-a-colien-ads}@anchor{2f5}@anchor{gnat_rm/the_gnat_library id18}@anchor{2f6}
@section @code{Ada.Command_Line.Environment} (@code{a-colien.ads})
@@ -23217,7 +23249,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{2f6}@anchor{gnat_rm/the_gnat_library ada-command-line-remove-a-colire-ads}@anchor{2f7}
+@anchor{gnat_rm/the_gnat_library id19}@anchor{2f7}@anchor{gnat_rm/the_gnat_library ada-command-line-remove-a-colire-ads}@anchor{2f8}
@section @code{Ada.Command_Line.Remove} (@code{a-colire.ads})
@@ -23235,7 +23267,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{2f8}@anchor{gnat_rm/the_gnat_library ada-command-line-response-file-a-clrefi-ads}@anchor{2f9}
+@anchor{gnat_rm/the_gnat_library id20}@anchor{2f9}@anchor{gnat_rm/the_gnat_library ada-command-line-response-file-a-clrefi-ads}@anchor{2fa}
@section @code{Ada.Command_Line.Response_File} (@code{a-clrefi.ads})
@@ -23255,7 +23287,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{2fa}@anchor{gnat_rm/the_gnat_library ada-direct-io-c-streams-a-diocst-ads}@anchor{2fb}
+@anchor{gnat_rm/the_gnat_library id21}@anchor{2fb}@anchor{gnat_rm/the_gnat_library ada-direct-io-c-streams-a-diocst-ads}@anchor{2fc}
@section @code{Ada.Direct_IO.C_Streams} (@code{a-diocst.ads})
@@ -23270,7 +23302,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{2fc}@anchor{gnat_rm/the_gnat_library ada-exceptions-is-null-occurrence-a-einuoc-ads}@anchor{2fd}
+@anchor{gnat_rm/the_gnat_library id22}@anchor{2fd}@anchor{gnat_rm/the_gnat_library ada-exceptions-is-null-occurrence-a-einuoc-ads}@anchor{2fe}
@section @code{Ada.Exceptions.Is_Null_Occurrence} (@code{a-einuoc.ads})
@@ -23284,7 +23316,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{2fe}@anchor{gnat_rm/the_gnat_library ada-exceptions-last-chance-handler-a-elchha-ads}@anchor{2ff}
+@anchor{gnat_rm/the_gnat_library id23}@anchor{2ff}@anchor{gnat_rm/the_gnat_library ada-exceptions-last-chance-handler-a-elchha-ads}@anchor{300}
@section @code{Ada.Exceptions.Last_Chance_Handler} (@code{a-elchha.ads})
@@ -23298,7 +23330,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{300}@anchor{gnat_rm/the_gnat_library id24}@anchor{301}
+@anchor{gnat_rm/the_gnat_library ada-exceptions-traceback-a-exctra-ads}@anchor{301}@anchor{gnat_rm/the_gnat_library id24}@anchor{302}
@section @code{Ada.Exceptions.Traceback} (@code{a-exctra.ads})
@@ -23311,7 +23343,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{302}@anchor{gnat_rm/the_gnat_library id25}@anchor{303}
+@anchor{gnat_rm/the_gnat_library ada-sequential-io-c-streams-a-siocst-ads}@anchor{303}@anchor{gnat_rm/the_gnat_library id25}@anchor{304}
@section @code{Ada.Sequential_IO.C_Streams} (@code{a-siocst.ads})
@@ -23326,7 +23358,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{304}@anchor{gnat_rm/the_gnat_library ada-streams-stream-io-c-streams-a-ssicst-ads}@anchor{305}
+@anchor{gnat_rm/the_gnat_library id26}@anchor{305}@anchor{gnat_rm/the_gnat_library ada-streams-stream-io-c-streams-a-ssicst-ads}@anchor{306}
@section @code{Ada.Streams.Stream_IO.C_Streams} (@code{a-ssicst.ads})
@@ -23341,7 +23373,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{306}@anchor{gnat_rm/the_gnat_library id27}@anchor{307}
+@anchor{gnat_rm/the_gnat_library ada-strings-unbounded-text-io-a-suteio-ads}@anchor{307}@anchor{gnat_rm/the_gnat_library id27}@anchor{308}
@section @code{Ada.Strings.Unbounded.Text_IO} (@code{a-suteio.ads})
@@ -23358,7 +23390,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{308}@anchor{gnat_rm/the_gnat_library ada-strings-wide-unbounded-wide-text-io-a-swuwti-ads}@anchor{309}
+@anchor{gnat_rm/the_gnat_library id28}@anchor{309}@anchor{gnat_rm/the_gnat_library ada-strings-wide-unbounded-wide-text-io-a-swuwti-ads}@anchor{30a}
@section @code{Ada.Strings.Wide_Unbounded.Wide_Text_IO} (@code{a-swuwti.ads})
@@ -23375,7 +23407,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{30a}@anchor{gnat_rm/the_gnat_library ada-strings-wide-wide-unbounded-wide-wide-text-io-a-szuzti-ads}@anchor{30b}
+@anchor{gnat_rm/the_gnat_library id29}@anchor{30b}@anchor{gnat_rm/the_gnat_library ada-strings-wide-wide-unbounded-wide-wide-text-io-a-szuzti-ads}@anchor{30c}
@section @code{Ada.Strings.Wide_Wide_Unbounded.Wide_Wide_Text_IO} (@code{a-szuzti.ads})
@@ -23392,7 +23424,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{30c}@anchor{gnat_rm/the_gnat_library id30}@anchor{30d}
+@anchor{gnat_rm/the_gnat_library ada-task-initialization-a-tasini-ads}@anchor{30d}@anchor{gnat_rm/the_gnat_library id30}@anchor{30e}
@section @code{Ada.Task_Initialization} (@code{a-tasini.ads})
@@ -23404,7 +23436,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{30e}@anchor{gnat_rm/the_gnat_library id31}@anchor{30f}
+@anchor{gnat_rm/the_gnat_library ada-text-io-c-streams-a-tiocst-ads}@anchor{30f}@anchor{gnat_rm/the_gnat_library id31}@anchor{310}
@section @code{Ada.Text_IO.C_Streams} (@code{a-tiocst.ads})
@@ -23419,7 +23451,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{310}@anchor{gnat_rm/the_gnat_library id32}@anchor{311}
+@anchor{gnat_rm/the_gnat_library ada-text-io-reset-standard-files-a-tirsfi-ads}@anchor{311}@anchor{gnat_rm/the_gnat_library id32}@anchor{312}
@section @code{Ada.Text_IO.Reset_Standard_Files} (@code{a-tirsfi.ads})
@@ -23434,7 +23466,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{312}@anchor{gnat_rm/the_gnat_library ada-wide-characters-unicode-a-wichun-ads}@anchor{313}
+@anchor{gnat_rm/the_gnat_library id33}@anchor{313}@anchor{gnat_rm/the_gnat_library ada-wide-characters-unicode-a-wichun-ads}@anchor{314}
@section @code{Ada.Wide_Characters.Unicode} (@code{a-wichun.ads})
@@ -23447,7 +23479,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{314}@anchor{gnat_rm/the_gnat_library ada-wide-text-io-c-streams-a-wtcstr-ads}@anchor{315}
+@anchor{gnat_rm/the_gnat_library id34}@anchor{315}@anchor{gnat_rm/the_gnat_library ada-wide-text-io-c-streams-a-wtcstr-ads}@anchor{316}
@section @code{Ada.Wide_Text_IO.C_Streams} (@code{a-wtcstr.ads})
@@ -23462,7 +23494,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{316}@anchor{gnat_rm/the_gnat_library id35}@anchor{317}
+@anchor{gnat_rm/the_gnat_library ada-wide-text-io-reset-standard-files-a-wrstfi-ads}@anchor{317}@anchor{gnat_rm/the_gnat_library id35}@anchor{318}
@section @code{Ada.Wide_Text_IO.Reset_Standard_Files} (@code{a-wrstfi.ads})
@@ -23477,7 +23509,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{318}@anchor{gnat_rm/the_gnat_library ada-wide-wide-characters-unicode-a-zchuni-ads}@anchor{319}
+@anchor{gnat_rm/the_gnat_library id36}@anchor{319}@anchor{gnat_rm/the_gnat_library ada-wide-wide-characters-unicode-a-zchuni-ads}@anchor{31a}
@section @code{Ada.Wide_Wide_Characters.Unicode} (@code{a-zchuni.ads})
@@ -23490,7 +23522,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{31a}@anchor{gnat_rm/the_gnat_library ada-wide-wide-text-io-c-streams-a-ztcstr-ads}@anchor{31b}
+@anchor{gnat_rm/the_gnat_library id37}@anchor{31b}@anchor{gnat_rm/the_gnat_library ada-wide-wide-text-io-c-streams-a-ztcstr-ads}@anchor{31c}
@section @code{Ada.Wide_Wide_Text_IO.C_Streams} (@code{a-ztcstr.ads})
@@ -23505,7 +23537,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{31c}@anchor{gnat_rm/the_gnat_library id38}@anchor{31d}
+@anchor{gnat_rm/the_gnat_library ada-wide-wide-text-io-reset-standard-files-a-zrstfi-ads}@anchor{31d}@anchor{gnat_rm/the_gnat_library id38}@anchor{31e}
@section @code{Ada.Wide_Wide_Text_IO.Reset_Standard_Files} (@code{a-zrstfi.ads})
@@ -23520,7 +23552,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{31e}@anchor{gnat_rm/the_gnat_library id39}@anchor{31f}
+@anchor{gnat_rm/the_gnat_library gnat-altivec-g-altive-ads}@anchor{31f}@anchor{gnat_rm/the_gnat_library id39}@anchor{320}
@section @code{GNAT.Altivec} (@code{g-altive.ads})
@@ -23533,7 +23565,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{320}@anchor{gnat_rm/the_gnat_library id40}@anchor{321}
+@anchor{gnat_rm/the_gnat_library gnat-altivec-conversions-g-altcon-ads}@anchor{321}@anchor{gnat_rm/the_gnat_library id40}@anchor{322}
@section @code{GNAT.Altivec.Conversions} (@code{g-altcon.ads})
@@ -23544,7 +23576,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{322}@anchor{gnat_rm/the_gnat_library gnat-altivec-vector-operations-g-alveop-ads}@anchor{323}
+@anchor{gnat_rm/the_gnat_library id41}@anchor{323}@anchor{gnat_rm/the_gnat_library gnat-altivec-vector-operations-g-alveop-ads}@anchor{324}
@section @code{GNAT.Altivec.Vector_Operations} (@code{g-alveop.ads})
@@ -23558,7 +23590,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{324}@anchor{gnat_rm/the_gnat_library id42}@anchor{325}
+@anchor{gnat_rm/the_gnat_library gnat-altivec-vector-types-g-alvety-ads}@anchor{325}@anchor{gnat_rm/the_gnat_library id42}@anchor{326}
@section @code{GNAT.Altivec.Vector_Types} (@code{g-alvety.ads})
@@ -23570,7 +23602,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{326}@anchor{gnat_rm/the_gnat_library id43}@anchor{327}
+@anchor{gnat_rm/the_gnat_library gnat-altivec-vector-views-g-alvevi-ads}@anchor{327}@anchor{gnat_rm/the_gnat_library id43}@anchor{328}
@section @code{GNAT.Altivec.Vector_Views} (@code{g-alvevi.ads})
@@ -23585,7 +23617,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{328}@anchor{gnat_rm/the_gnat_library id44}@anchor{329}
+@anchor{gnat_rm/the_gnat_library gnat-array-split-g-arrspl-ads}@anchor{329}@anchor{gnat_rm/the_gnat_library id44}@anchor{32a}
@section @code{GNAT.Array_Split} (@code{g-arrspl.ads})
@@ -23598,7 +23630,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{32a}@anchor{gnat_rm/the_gnat_library gnat-awk-g-awk-ads}@anchor{32b}
+@anchor{gnat_rm/the_gnat_library id45}@anchor{32b}@anchor{gnat_rm/the_gnat_library gnat-awk-g-awk-ads}@anchor{32c}
@section @code{GNAT.AWK} (@code{g-awk.ads})
@@ -23613,7 +23645,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{32c}@anchor{gnat_rm/the_gnat_library gnat-bind-environment-g-binenv-ads}@anchor{32d}
+@anchor{gnat_rm/the_gnat_library id46}@anchor{32d}@anchor{gnat_rm/the_gnat_library gnat-bind-environment-g-binenv-ads}@anchor{32e}
@section @code{GNAT.Bind_Environment} (@code{g-binenv.ads})
@@ -23626,7 +23658,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{32e}@anchor{gnat_rm/the_gnat_library gnat-branch-prediction-g-brapre-ads}@anchor{32f}
+@anchor{gnat_rm/the_gnat_library id47}@anchor{32f}@anchor{gnat_rm/the_gnat_library gnat-branch-prediction-g-brapre-ads}@anchor{330}
@section @code{GNAT.Branch_Prediction} (@code{g-brapre.ads})
@@ -23637,7 +23669,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{330}@anchor{gnat_rm/the_gnat_library id48}@anchor{331}
+@anchor{gnat_rm/the_gnat_library gnat-bounded-buffers-g-boubuf-ads}@anchor{331}@anchor{gnat_rm/the_gnat_library id48}@anchor{332}
@section @code{GNAT.Bounded_Buffers} (@code{g-boubuf.ads})
@@ -23652,7 +23684,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{332}@anchor{gnat_rm/the_gnat_library id49}@anchor{333}
+@anchor{gnat_rm/the_gnat_library gnat-bounded-mailboxes-g-boumai-ads}@anchor{333}@anchor{gnat_rm/the_gnat_library id49}@anchor{334}
@section @code{GNAT.Bounded_Mailboxes} (@code{g-boumai.ads})
@@ -23665,7 +23697,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{334}@anchor{gnat_rm/the_gnat_library id50}@anchor{335}
+@anchor{gnat_rm/the_gnat_library gnat-bubble-sort-g-bubsor-ads}@anchor{335}@anchor{gnat_rm/the_gnat_library id50}@anchor{336}
@section @code{GNAT.Bubble_Sort} (@code{g-bubsor.ads})
@@ -23680,7 +23712,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{336}@anchor{gnat_rm/the_gnat_library gnat-bubble-sort-a-g-busora-ads}@anchor{337}
+@anchor{gnat_rm/the_gnat_library id51}@anchor{337}@anchor{gnat_rm/the_gnat_library gnat-bubble-sort-a-g-busora-ads}@anchor{338}
@section @code{GNAT.Bubble_Sort_A} (@code{g-busora.ads})
@@ -23696,7 +23728,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{338}@anchor{gnat_rm/the_gnat_library id52}@anchor{339}
+@anchor{gnat_rm/the_gnat_library gnat-bubble-sort-g-g-busorg-ads}@anchor{339}@anchor{gnat_rm/the_gnat_library id52}@anchor{33a}
@section @code{GNAT.Bubble_Sort_G} (@code{g-busorg.ads})
@@ -23712,7 +23744,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{33a}@anchor{gnat_rm/the_gnat_library id53}@anchor{33b}
+@anchor{gnat_rm/the_gnat_library gnat-byte-order-mark-g-byorma-ads}@anchor{33b}@anchor{gnat_rm/the_gnat_library id53}@anchor{33c}
@section @code{GNAT.Byte_Order_Mark} (@code{g-byorma.ads})
@@ -23728,7 +23760,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{33c}@anchor{gnat_rm/the_gnat_library id54}@anchor{33d}
+@anchor{gnat_rm/the_gnat_library gnat-byte-swapping-g-bytswa-ads}@anchor{33d}@anchor{gnat_rm/the_gnat_library id54}@anchor{33e}
@section @code{GNAT.Byte_Swapping} (@code{g-bytswa.ads})
@@ -23742,7 +23774,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{33e}@anchor{gnat_rm/the_gnat_library gnat-calendar-g-calend-ads}@anchor{33f}
+@anchor{gnat_rm/the_gnat_library id55}@anchor{33f}@anchor{gnat_rm/the_gnat_library gnat-calendar-g-calend-ads}@anchor{340}
@section @code{GNAT.Calendar} (@code{g-calend.ads})
@@ -23756,7 +23788,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{340}@anchor{gnat_rm/the_gnat_library gnat-calendar-time-io-g-catiio-ads}@anchor{341}
+@anchor{gnat_rm/the_gnat_library id56}@anchor{341}@anchor{gnat_rm/the_gnat_library gnat-calendar-time-io-g-catiio-ads}@anchor{342}
@section @code{GNAT.Calendar.Time_IO} (@code{g-catiio.ads})
@@ -23767,7 +23799,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{342}@anchor{gnat_rm/the_gnat_library gnat-crc32-g-crc32-ads}@anchor{343}
+@anchor{gnat_rm/the_gnat_library id57}@anchor{343}@anchor{gnat_rm/the_gnat_library gnat-crc32-g-crc32-ads}@anchor{344}
@section @code{GNAT.CRC32} (@code{g-crc32.ads})
@@ -23784,7 +23816,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{344}@anchor{gnat_rm/the_gnat_library gnat-case-util-g-casuti-ads}@anchor{345}
+@anchor{gnat_rm/the_gnat_library id58}@anchor{345}@anchor{gnat_rm/the_gnat_library gnat-case-util-g-casuti-ads}@anchor{346}
@section @code{GNAT.Case_Util} (@code{g-casuti.ads})
@@ -23799,7 +23831,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{346}@anchor{gnat_rm/the_gnat_library gnat-cgi-g-cgi-ads}@anchor{347}
+@anchor{gnat_rm/the_gnat_library id59}@anchor{347}@anchor{gnat_rm/the_gnat_library gnat-cgi-g-cgi-ads}@anchor{348}
@section @code{GNAT.CGI} (@code{g-cgi.ads})
@@ -23814,7 +23846,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{348}@anchor{gnat_rm/the_gnat_library id60}@anchor{349}
+@anchor{gnat_rm/the_gnat_library gnat-cgi-cookie-g-cgicoo-ads}@anchor{349}@anchor{gnat_rm/the_gnat_library id60}@anchor{34a}
@section @code{GNAT.CGI.Cookie} (@code{g-cgicoo.ads})
@@ -23829,7 +23861,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{34a}@anchor{gnat_rm/the_gnat_library id61}@anchor{34b}
+@anchor{gnat_rm/the_gnat_library gnat-cgi-debug-g-cgideb-ads}@anchor{34b}@anchor{gnat_rm/the_gnat_library id61}@anchor{34c}
@section @code{GNAT.CGI.Debug} (@code{g-cgideb.ads})
@@ -23841,7 +23873,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{34c}@anchor{gnat_rm/the_gnat_library gnat-command-line-g-comlin-ads}@anchor{34d}
+@anchor{gnat_rm/the_gnat_library id62}@anchor{34d}@anchor{gnat_rm/the_gnat_library gnat-command-line-g-comlin-ads}@anchor{34e}
@section @code{GNAT.Command_Line} (@code{g-comlin.ads})
@@ -23854,7 +23886,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{34e}@anchor{gnat_rm/the_gnat_library id63}@anchor{34f}
+@anchor{gnat_rm/the_gnat_library gnat-compiler-version-g-comver-ads}@anchor{34f}@anchor{gnat_rm/the_gnat_library id63}@anchor{350}
@section @code{GNAT.Compiler_Version} (@code{g-comver.ads})
@@ -23872,7 +23904,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{350}@anchor{gnat_rm/the_gnat_library gnat-ctrl-c-g-ctrl-c-ads}@anchor{351}
+@anchor{gnat_rm/the_gnat_library id64}@anchor{351}@anchor{gnat_rm/the_gnat_library gnat-ctrl-c-g-ctrl-c-ads}@anchor{352}
@section @code{GNAT.Ctrl_C} (@code{g-ctrl_c.ads})
@@ -23883,7 +23915,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{352}@anchor{gnat_rm/the_gnat_library gnat-current-exception-g-curexc-ads}@anchor{353}
+@anchor{gnat_rm/the_gnat_library id65}@anchor{353}@anchor{gnat_rm/the_gnat_library gnat-current-exception-g-curexc-ads}@anchor{354}
@section @code{GNAT.Current_Exception} (@code{g-curexc.ads})
@@ -23900,7 +23932,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{354}@anchor{gnat_rm/the_gnat_library id66}@anchor{355}
+@anchor{gnat_rm/the_gnat_library gnat-debug-pools-g-debpoo-ads}@anchor{355}@anchor{gnat_rm/the_gnat_library id66}@anchor{356}
@section @code{GNAT.Debug_Pools} (@code{g-debpoo.ads})
@@ -23917,7 +23949,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{356}@anchor{gnat_rm/the_gnat_library id67}@anchor{357}
+@anchor{gnat_rm/the_gnat_library gnat-debug-utilities-g-debuti-ads}@anchor{357}@anchor{gnat_rm/the_gnat_library id67}@anchor{358}
@section @code{GNAT.Debug_Utilities} (@code{g-debuti.ads})
@@ -23930,7 +23962,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{358}@anchor{gnat_rm/the_gnat_library id68}@anchor{359}
+@anchor{gnat_rm/the_gnat_library gnat-decode-string-g-decstr-ads}@anchor{359}@anchor{gnat_rm/the_gnat_library id68}@anchor{35a}
@section @code{GNAT.Decode_String} (@code{g-decstr.ads})
@@ -23954,7 +23986,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{35a}@anchor{gnat_rm/the_gnat_library id69}@anchor{35b}
+@anchor{gnat_rm/the_gnat_library gnat-decode-utf8-string-g-deutst-ads}@anchor{35b}@anchor{gnat_rm/the_gnat_library id69}@anchor{35c}
@section @code{GNAT.Decode_UTF8_String} (@code{g-deutst.ads})
@@ -23975,7 +24007,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{35c}@anchor{gnat_rm/the_gnat_library gnat-directory-operations-g-dirope-ads}@anchor{35d}
+@anchor{gnat_rm/the_gnat_library id70}@anchor{35d}@anchor{gnat_rm/the_gnat_library gnat-directory-operations-g-dirope-ads}@anchor{35e}
@section @code{GNAT.Directory_Operations} (@code{g-dirope.ads})
@@ -23988,7 +24020,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{35e}@anchor{gnat_rm/the_gnat_library gnat-directory-operations-iteration-g-diopit-ads}@anchor{35f}
+@anchor{gnat_rm/the_gnat_library id71}@anchor{35f}@anchor{gnat_rm/the_gnat_library gnat-directory-operations-iteration-g-diopit-ads}@anchor{360}
@section @code{GNAT.Directory_Operations.Iteration} (@code{g-diopit.ads})
@@ -24000,7 +24032,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{360}@anchor{gnat_rm/the_gnat_library gnat-dynamic-htables-g-dynhta-ads}@anchor{361}
+@anchor{gnat_rm/the_gnat_library id72}@anchor{361}@anchor{gnat_rm/the_gnat_library gnat-dynamic-htables-g-dynhta-ads}@anchor{362}
@section @code{GNAT.Dynamic_HTables} (@code{g-dynhta.ads})
@@ -24018,7 +24050,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{362}@anchor{gnat_rm/the_gnat_library id73}@anchor{363}
+@anchor{gnat_rm/the_gnat_library gnat-dynamic-tables-g-dyntab-ads}@anchor{363}@anchor{gnat_rm/the_gnat_library id73}@anchor{364}
@section @code{GNAT.Dynamic_Tables} (@code{g-dyntab.ads})
@@ -24038,7 +24070,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{364}@anchor{gnat_rm/the_gnat_library gnat-encode-string-g-encstr-ads}@anchor{365}
+@anchor{gnat_rm/the_gnat_library id74}@anchor{365}@anchor{gnat_rm/the_gnat_library gnat-encode-string-g-encstr-ads}@anchor{366}
@section @code{GNAT.Encode_String} (@code{g-encstr.ads})
@@ -24060,7 +24092,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{366}@anchor{gnat_rm/the_gnat_library id75}@anchor{367}
+@anchor{gnat_rm/the_gnat_library gnat-encode-utf8-string-g-enutst-ads}@anchor{367}@anchor{gnat_rm/the_gnat_library id75}@anchor{368}
@section @code{GNAT.Encode_UTF8_String} (@code{g-enutst.ads})
@@ -24081,7 +24113,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{368}@anchor{gnat_rm/the_gnat_library id76}@anchor{369}
+@anchor{gnat_rm/the_gnat_library gnat-exception-actions-g-excact-ads}@anchor{369}@anchor{gnat_rm/the_gnat_library id76}@anchor{36a}
@section @code{GNAT.Exception_Actions} (@code{g-excact.ads})
@@ -24094,7 +24126,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{36a}@anchor{gnat_rm/the_gnat_library id77}@anchor{36b}
+@anchor{gnat_rm/the_gnat_library gnat-exception-traces-g-exctra-ads}@anchor{36b}@anchor{gnat_rm/the_gnat_library id77}@anchor{36c}
@section @code{GNAT.Exception_Traces} (@code{g-exctra.ads})
@@ -24108,7 +24140,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{36c}@anchor{gnat_rm/the_gnat_library gnat-exceptions-g-except-ads}@anchor{36d}
+@anchor{gnat_rm/the_gnat_library id78}@anchor{36d}@anchor{gnat_rm/the_gnat_library gnat-exceptions-g-except-ads}@anchor{36e}
@section @code{GNAT.Exceptions} (@code{g-except.ads})
@@ -24129,7 +24161,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{36e}@anchor{gnat_rm/the_gnat_library gnat-expect-g-expect-ads}@anchor{36f}
+@anchor{gnat_rm/the_gnat_library id79}@anchor{36f}@anchor{gnat_rm/the_gnat_library gnat-expect-g-expect-ads}@anchor{370}
@section @code{GNAT.Expect} (@code{g-expect.ads})
@@ -24145,7 +24177,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{370}@anchor{gnat_rm/the_gnat_library gnat-expect-tty-g-exptty-ads}@anchor{371}
+@anchor{gnat_rm/the_gnat_library id80}@anchor{371}@anchor{gnat_rm/the_gnat_library gnat-expect-tty-g-exptty-ads}@anchor{372}
@section @code{GNAT.Expect.TTY} (@code{g-exptty.ads})
@@ -24157,7 +24189,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{372}@anchor{gnat_rm/the_gnat_library gnat-float-control-g-flocon-ads}@anchor{373}
+@anchor{gnat_rm/the_gnat_library id81}@anchor{373}@anchor{gnat_rm/the_gnat_library gnat-float-control-g-flocon-ads}@anchor{374}
@section @code{GNAT.Float_Control} (@code{g-flocon.ads})
@@ -24171,7 +24203,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{374}@anchor{gnat_rm/the_gnat_library gnat-formatted-string-g-forstr-ads}@anchor{375}
+@anchor{gnat_rm/the_gnat_library id82}@anchor{375}@anchor{gnat_rm/the_gnat_library gnat-formatted-string-g-forstr-ads}@anchor{376}
@section @code{GNAT.Formatted_String} (@code{g-forstr.ads})
@@ -24186,7 +24218,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{376}@anchor{gnat_rm/the_gnat_library gnat-heap-sort-g-heasor-ads}@anchor{377}
+@anchor{gnat_rm/the_gnat_library id83}@anchor{377}@anchor{gnat_rm/the_gnat_library gnat-heap-sort-g-heasor-ads}@anchor{378}
@section @code{GNAT.Heap_Sort} (@code{g-heasor.ads})
@@ -24200,7 +24232,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{378}@anchor{gnat_rm/the_gnat_library id84}@anchor{379}
+@anchor{gnat_rm/the_gnat_library gnat-heap-sort-a-g-hesora-ads}@anchor{379}@anchor{gnat_rm/the_gnat_library id84}@anchor{37a}
@section @code{GNAT.Heap_Sort_A} (@code{g-hesora.ads})
@@ -24216,7 +24248,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{37a}@anchor{gnat_rm/the_gnat_library gnat-heap-sort-g-g-hesorg-ads}@anchor{37b}
+@anchor{gnat_rm/the_gnat_library id85}@anchor{37b}@anchor{gnat_rm/the_gnat_library gnat-heap-sort-g-g-hesorg-ads}@anchor{37c}
@section @code{GNAT.Heap_Sort_G} (@code{g-hesorg.ads})
@@ -24230,7 +24262,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{37c}@anchor{gnat_rm/the_gnat_library gnat-htable-g-htable-ads}@anchor{37d}
+@anchor{gnat_rm/the_gnat_library id86}@anchor{37d}@anchor{gnat_rm/the_gnat_library gnat-htable-g-htable-ads}@anchor{37e}
@section @code{GNAT.HTable} (@code{g-htable.ads})
@@ -24243,7 +24275,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{37e}@anchor{gnat_rm/the_gnat_library gnat-io-g-io-ads}@anchor{37f}
+@anchor{gnat_rm/the_gnat_library id87}@anchor{37f}@anchor{gnat_rm/the_gnat_library gnat-io-g-io-ads}@anchor{380}
@section @code{GNAT.IO} (@code{g-io.ads})
@@ -24259,7 +24291,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{380}@anchor{gnat_rm/the_gnat_library gnat-io-aux-g-io-aux-ads}@anchor{381}
+@anchor{gnat_rm/the_gnat_library id88}@anchor{381}@anchor{gnat_rm/the_gnat_library gnat-io-aux-g-io-aux-ads}@anchor{382}
@section @code{GNAT.IO_Aux} (@code{g-io_aux.ads})
@@ -24273,7 +24305,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{382}@anchor{gnat_rm/the_gnat_library gnat-lock-files-g-locfil-ads}@anchor{383}
+@anchor{gnat_rm/the_gnat_library id89}@anchor{383}@anchor{gnat_rm/the_gnat_library gnat-lock-files-g-locfil-ads}@anchor{384}
@section @code{GNAT.Lock_Files} (@code{g-locfil.ads})
@@ -24287,7 +24319,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{384}@anchor{gnat_rm/the_gnat_library gnat-mbbs-discrete-random-g-mbdira-ads}@anchor{385}
+@anchor{gnat_rm/the_gnat_library id90}@anchor{385}@anchor{gnat_rm/the_gnat_library gnat-mbbs-discrete-random-g-mbdira-ads}@anchor{386}
@section @code{GNAT.MBBS_Discrete_Random} (@code{g-mbdira.ads})
@@ -24299,7 +24331,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{386}@anchor{gnat_rm/the_gnat_library gnat-mbbs-float-random-g-mbflra-ads}@anchor{387}
+@anchor{gnat_rm/the_gnat_library id91}@anchor{387}@anchor{gnat_rm/the_gnat_library gnat-mbbs-float-random-g-mbflra-ads}@anchor{388}
@section @code{GNAT.MBBS_Float_Random} (@code{g-mbflra.ads})
@@ -24311,7 +24343,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{388}@anchor{gnat_rm/the_gnat_library gnat-md5-g-md5-ads}@anchor{389}
+@anchor{gnat_rm/the_gnat_library id92}@anchor{389}@anchor{gnat_rm/the_gnat_library gnat-md5-g-md5-ads}@anchor{38a}
@section @code{GNAT.MD5} (@code{g-md5.ads})
@@ -24324,7 +24356,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{38a}@anchor{gnat_rm/the_gnat_library gnat-memory-dump-g-memdum-ads}@anchor{38b}
+@anchor{gnat_rm/the_gnat_library id93}@anchor{38b}@anchor{gnat_rm/the_gnat_library gnat-memory-dump-g-memdum-ads}@anchor{38c}
@section @code{GNAT.Memory_Dump} (@code{g-memdum.ads})
@@ -24337,7 +24369,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{38c}@anchor{gnat_rm/the_gnat_library id94}@anchor{38d}
+@anchor{gnat_rm/the_gnat_library gnat-most-recent-exception-g-moreex-ads}@anchor{38d}@anchor{gnat_rm/the_gnat_library id94}@anchor{38e}
@section @code{GNAT.Most_Recent_Exception} (@code{g-moreex.ads})
@@ -24351,7 +24383,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{38e}@anchor{gnat_rm/the_gnat_library id95}@anchor{38f}
+@anchor{gnat_rm/the_gnat_library gnat-os-lib-g-os-lib-ads}@anchor{38f}@anchor{gnat_rm/the_gnat_library id95}@anchor{390}
@section @code{GNAT.OS_Lib} (@code{g-os_lib.ads})
@@ -24367,7 +24399,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{390}@anchor{gnat_rm/the_gnat_library id96}@anchor{391}
+@anchor{gnat_rm/the_gnat_library gnat-perfect-hash-generators-g-pehage-ads}@anchor{391}@anchor{gnat_rm/the_gnat_library id96}@anchor{392}
@section @code{GNAT.Perfect_Hash_Generators} (@code{g-pehage.ads})
@@ -24385,7 +24417,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{392}@anchor{gnat_rm/the_gnat_library id97}@anchor{393}
+@anchor{gnat_rm/the_gnat_library gnat-random-numbers-g-rannum-ads}@anchor{393}@anchor{gnat_rm/the_gnat_library id97}@anchor{394}
@section @code{GNAT.Random_Numbers} (@code{g-rannum.ads})
@@ -24397,7 +24429,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{394}@anchor{gnat_rm/the_gnat_library gnat-regexp-g-regexp-ads}@anchor{259}
+@anchor{gnat_rm/the_gnat_library id98}@anchor{395}@anchor{gnat_rm/the_gnat_library gnat-regexp-g-regexp-ads}@anchor{25a}
@section @code{GNAT.Regexp} (@code{g-regexp.ads})
@@ -24413,7 +24445,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{395}@anchor{gnat_rm/the_gnat_library gnat-registry-g-regist-ads}@anchor{396}
+@anchor{gnat_rm/the_gnat_library id99}@anchor{396}@anchor{gnat_rm/the_gnat_library gnat-registry-g-regist-ads}@anchor{397}
@section @code{GNAT.Registry} (@code{g-regist.ads})
@@ -24427,7 +24459,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{397}@anchor{gnat_rm/the_gnat_library gnat-regpat-g-regpat-ads}@anchor{398}
+@anchor{gnat_rm/the_gnat_library id100}@anchor{398}@anchor{gnat_rm/the_gnat_library gnat-regpat-g-regpat-ads}@anchor{399}
@section @code{GNAT.Regpat} (@code{g-regpat.ads})
@@ -24442,7 +24474,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{399}@anchor{gnat_rm/the_gnat_library gnat-rewrite-data-g-rewdat-ads}@anchor{39a}
+@anchor{gnat_rm/the_gnat_library id101}@anchor{39a}@anchor{gnat_rm/the_gnat_library gnat-rewrite-data-g-rewdat-ads}@anchor{39b}
@section @code{GNAT.Rewrite_Data} (@code{g-rewdat.ads})
@@ -24456,7 +24488,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{39b}@anchor{gnat_rm/the_gnat_library id102}@anchor{39c}
+@anchor{gnat_rm/the_gnat_library gnat-secondary-stack-info-g-sestin-ads}@anchor{39c}@anchor{gnat_rm/the_gnat_library id102}@anchor{39d}
@section @code{GNAT.Secondary_Stack_Info} (@code{g-sestin.ads})
@@ -24468,7 +24500,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{39d}@anchor{gnat_rm/the_gnat_library gnat-semaphores-g-semaph-ads}@anchor{39e}
+@anchor{gnat_rm/the_gnat_library id103}@anchor{39e}@anchor{gnat_rm/the_gnat_library gnat-semaphores-g-semaph-ads}@anchor{39f}
@section @code{GNAT.Semaphores} (@code{g-semaph.ads})
@@ -24479,7 +24511,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{39f}@anchor{gnat_rm/the_gnat_library id104}@anchor{3a0}
+@anchor{gnat_rm/the_gnat_library gnat-serial-communications-g-sercom-ads}@anchor{3a0}@anchor{gnat_rm/the_gnat_library id104}@anchor{3a1}
@section @code{GNAT.Serial_Communications} (@code{g-sercom.ads})
@@ -24491,7 +24523,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{3a1}@anchor{gnat_rm/the_gnat_library id105}@anchor{3a2}
+@anchor{gnat_rm/the_gnat_library gnat-sha1-g-sha1-ads}@anchor{3a2}@anchor{gnat_rm/the_gnat_library id105}@anchor{3a3}
@section @code{GNAT.SHA1} (@code{g-sha1.ads})
@@ -24504,7 +24536,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{3a3}@anchor{gnat_rm/the_gnat_library id106}@anchor{3a4}
+@anchor{gnat_rm/the_gnat_library gnat-sha224-g-sha224-ads}@anchor{3a4}@anchor{gnat_rm/the_gnat_library id106}@anchor{3a5}
@section @code{GNAT.SHA224} (@code{g-sha224.ads})
@@ -24517,7 +24549,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{3a5}@anchor{gnat_rm/the_gnat_library id107}@anchor{3a6}
+@anchor{gnat_rm/the_gnat_library gnat-sha256-g-sha256-ads}@anchor{3a6}@anchor{gnat_rm/the_gnat_library id107}@anchor{3a7}
@section @code{GNAT.SHA256} (@code{g-sha256.ads})
@@ -24530,7 +24562,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{3a7}@anchor{gnat_rm/the_gnat_library gnat-sha384-g-sha384-ads}@anchor{3a8}
+@anchor{gnat_rm/the_gnat_library id108}@anchor{3a8}@anchor{gnat_rm/the_gnat_library gnat-sha384-g-sha384-ads}@anchor{3a9}
@section @code{GNAT.SHA384} (@code{g-sha384.ads})
@@ -24543,7 +24575,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{3a9}@anchor{gnat_rm/the_gnat_library gnat-sha512-g-sha512-ads}@anchor{3aa}
+@anchor{gnat_rm/the_gnat_library id109}@anchor{3aa}@anchor{gnat_rm/the_gnat_library gnat-sha512-g-sha512-ads}@anchor{3ab}
@section @code{GNAT.SHA512} (@code{g-sha512.ads})
@@ -24556,7 +24588,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{3ab}@anchor{gnat_rm/the_gnat_library id110}@anchor{3ac}
+@anchor{gnat_rm/the_gnat_library gnat-signals-g-signal-ads}@anchor{3ac}@anchor{gnat_rm/the_gnat_library id110}@anchor{3ad}
@section @code{GNAT.Signals} (@code{g-signal.ads})
@@ -24568,7 +24600,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{3ad}@anchor{gnat_rm/the_gnat_library id111}@anchor{3ae}
+@anchor{gnat_rm/the_gnat_library gnat-sockets-g-socket-ads}@anchor{3ae}@anchor{gnat_rm/the_gnat_library id111}@anchor{3af}
@section @code{GNAT.Sockets} (@code{g-socket.ads})
@@ -24583,7 +24615,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{3af}@anchor{gnat_rm/the_gnat_library id112}@anchor{3b0}
+@anchor{gnat_rm/the_gnat_library gnat-source-info-g-souinf-ads}@anchor{3b0}@anchor{gnat_rm/the_gnat_library id112}@anchor{3b1}
@section @code{GNAT.Source_Info} (@code{g-souinf.ads})
@@ -24597,7 +24629,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{3b1}@anchor{gnat_rm/the_gnat_library id113}@anchor{3b2}
+@anchor{gnat_rm/the_gnat_library gnat-spelling-checker-g-speche-ads}@anchor{3b2}@anchor{gnat_rm/the_gnat_library id113}@anchor{3b3}
@section @code{GNAT.Spelling_Checker} (@code{g-speche.ads})
@@ -24609,7 +24641,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{3b3}@anchor{gnat_rm/the_gnat_library id114}@anchor{3b4}
+@anchor{gnat_rm/the_gnat_library gnat-spelling-checker-generic-g-spchge-ads}@anchor{3b4}@anchor{gnat_rm/the_gnat_library id114}@anchor{3b5}
@section @code{GNAT.Spelling_Checker_Generic} (@code{g-spchge.ads})
@@ -24622,7 +24654,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{3b5}@anchor{gnat_rm/the_gnat_library id115}@anchor{3b6}
+@anchor{gnat_rm/the_gnat_library gnat-spitbol-patterns-g-spipat-ads}@anchor{3b6}@anchor{gnat_rm/the_gnat_library id115}@anchor{3b7}
@section @code{GNAT.Spitbol.Patterns} (@code{g-spipat.ads})
@@ -24638,7 +24670,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{3b7}@anchor{gnat_rm/the_gnat_library gnat-spitbol-g-spitbo-ads}@anchor{3b8}
+@anchor{gnat_rm/the_gnat_library id116}@anchor{3b8}@anchor{gnat_rm/the_gnat_library gnat-spitbol-g-spitbo-ads}@anchor{3b9}
@section @code{GNAT.Spitbol} (@code{g-spitbo.ads})
@@ -24653,7 +24685,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{3b9}@anchor{gnat_rm/the_gnat_library id117}@anchor{3ba}
+@anchor{gnat_rm/the_gnat_library gnat-spitbol-table-boolean-g-sptabo-ads}@anchor{3ba}@anchor{gnat_rm/the_gnat_library id117}@anchor{3bb}
@section @code{GNAT.Spitbol.Table_Boolean} (@code{g-sptabo.ads})
@@ -24668,7 +24700,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{3bb}@anchor{gnat_rm/the_gnat_library id118}@anchor{3bc}
+@anchor{gnat_rm/the_gnat_library gnat-spitbol-table-integer-g-sptain-ads}@anchor{3bc}@anchor{gnat_rm/the_gnat_library id118}@anchor{3bd}
@section @code{GNAT.Spitbol.Table_Integer} (@code{g-sptain.ads})
@@ -24685,7 +24717,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{3bd}@anchor{gnat_rm/the_gnat_library gnat-spitbol-table-vstring-g-sptavs-ads}@anchor{3be}
+@anchor{gnat_rm/the_gnat_library id119}@anchor{3be}@anchor{gnat_rm/the_gnat_library gnat-spitbol-table-vstring-g-sptavs-ads}@anchor{3bf}
@section @code{GNAT.Spitbol.Table_VString} (@code{g-sptavs.ads})
@@ -24702,7 +24734,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{3bf}@anchor{gnat_rm/the_gnat_library gnat-sse-g-sse-ads}@anchor{3c0}
+@anchor{gnat_rm/the_gnat_library id120}@anchor{3c0}@anchor{gnat_rm/the_gnat_library gnat-sse-g-sse-ads}@anchor{3c1}
@section @code{GNAT.SSE} (@code{g-sse.ads})
@@ -24714,7 +24746,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{3c1}@anchor{gnat_rm/the_gnat_library id121}@anchor{3c2}
+@anchor{gnat_rm/the_gnat_library gnat-sse-vector-types-g-ssvety-ads}@anchor{3c2}@anchor{gnat_rm/the_gnat_library id121}@anchor{3c3}
@section @code{GNAT.SSE.Vector_Types} (@code{g-ssvety.ads})
@@ -24723,7 +24755,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{3c3}@anchor{gnat_rm/the_gnat_library id122}@anchor{3c4}
+@anchor{gnat_rm/the_gnat_library gnat-string-hash-g-strhas-ads}@anchor{3c4}@anchor{gnat_rm/the_gnat_library id122}@anchor{3c5}
@section @code{GNAT.String_Hash} (@code{g-strhas.ads})
@@ -24735,7 +24767,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{3c5}@anchor{gnat_rm/the_gnat_library gnat-strings-g-string-ads}@anchor{3c6}
+@anchor{gnat_rm/the_gnat_library id123}@anchor{3c6}@anchor{gnat_rm/the_gnat_library gnat-strings-g-string-ads}@anchor{3c7}
@section @code{GNAT.Strings} (@code{g-string.ads})
@@ -24745,7 +24777,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{3c7}@anchor{gnat_rm/the_gnat_library id124}@anchor{3c8}
+@anchor{gnat_rm/the_gnat_library gnat-string-split-g-strspl-ads}@anchor{3c8}@anchor{gnat_rm/the_gnat_library id124}@anchor{3c9}
@section @code{GNAT.String_Split} (@code{g-strspl.ads})
@@ -24759,7 +24791,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{3c9}@anchor{gnat_rm/the_gnat_library gnat-table-g-table-ads}@anchor{3ca}
+@anchor{gnat_rm/the_gnat_library id125}@anchor{3ca}@anchor{gnat_rm/the_gnat_library gnat-table-g-table-ads}@anchor{3cb}
@section @code{GNAT.Table} (@code{g-table.ads})
@@ -24779,7 +24811,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{3cb}@anchor{gnat_rm/the_gnat_library gnat-task-lock-g-tasloc-ads}@anchor{3cc}
+@anchor{gnat_rm/the_gnat_library id126}@anchor{3cc}@anchor{gnat_rm/the_gnat_library gnat-task-lock-g-tasloc-ads}@anchor{3cd}
@section @code{GNAT.Task_Lock} (@code{g-tasloc.ads})
@@ -24796,7 +24828,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{3cd}@anchor{gnat_rm/the_gnat_library gnat-time-stamp-g-timsta-ads}@anchor{3ce}
+@anchor{gnat_rm/the_gnat_library id127}@anchor{3ce}@anchor{gnat_rm/the_gnat_library gnat-time-stamp-g-timsta-ads}@anchor{3cf}
@section @code{GNAT.Time_Stamp} (@code{g-timsta.ads})
@@ -24811,7 +24843,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{3cf}@anchor{gnat_rm/the_gnat_library id128}@anchor{3d0}
+@anchor{gnat_rm/the_gnat_library gnat-threads-g-thread-ads}@anchor{3d0}@anchor{gnat_rm/the_gnat_library id128}@anchor{3d1}
@section @code{GNAT.Threads} (@code{g-thread.ads})
@@ -24828,7 +24860,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{3d1}@anchor{gnat_rm/the_gnat_library gnat-traceback-g-traceb-ads}@anchor{3d2}
+@anchor{gnat_rm/the_gnat_library id129}@anchor{3d2}@anchor{gnat_rm/the_gnat_library gnat-traceback-g-traceb-ads}@anchor{3d3}
@section @code{GNAT.Traceback} (@code{g-traceb.ads})
@@ -24840,7 +24872,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{3d3}@anchor{gnat_rm/the_gnat_library gnat-traceback-symbolic-g-trasym-ads}@anchor{3d4}
+@anchor{gnat_rm/the_gnat_library id130}@anchor{3d4}@anchor{gnat_rm/the_gnat_library gnat-traceback-symbolic-g-trasym-ads}@anchor{3d5}
@section @code{GNAT.Traceback.Symbolic} (@code{g-trasym.ads})
@@ -24849,7 +24881,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{3d5}@anchor{gnat_rm/the_gnat_library gnat-utf-32-g-table-ads}@anchor{3d6}
+@anchor{gnat_rm/the_gnat_library id131}@anchor{3d6}@anchor{gnat_rm/the_gnat_library gnat-utf-32-g-table-ads}@anchor{3d7}
@section @code{GNAT.UTF_32} (@code{g-table.ads})
@@ -24868,7 +24900,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{3d7}@anchor{gnat_rm/the_gnat_library id132}@anchor{3d8}
+@anchor{gnat_rm/the_gnat_library gnat-wide-spelling-checker-g-u3spch-ads}@anchor{3d8}@anchor{gnat_rm/the_gnat_library id132}@anchor{3d9}
@section @code{GNAT.Wide_Spelling_Checker} (@code{g-u3spch.ads})
@@ -24881,7 +24913,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{3d9}@anchor{gnat_rm/the_gnat_library id133}@anchor{3da}
+@anchor{gnat_rm/the_gnat_library gnat-wide-spelling-checker-g-wispch-ads}@anchor{3da}@anchor{gnat_rm/the_gnat_library id133}@anchor{3db}
@section @code{GNAT.Wide_Spelling_Checker} (@code{g-wispch.ads})
@@ -24893,7 +24925,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{3db}@anchor{gnat_rm/the_gnat_library gnat-wide-string-split-g-wistsp-ads}@anchor{3dc}
+@anchor{gnat_rm/the_gnat_library id134}@anchor{3dc}@anchor{gnat_rm/the_gnat_library gnat-wide-string-split-g-wistsp-ads}@anchor{3dd}
@section @code{GNAT.Wide_String_Split} (@code{g-wistsp.ads})
@@ -24907,7 +24939,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{3dd}@anchor{gnat_rm/the_gnat_library id135}@anchor{3de}
+@anchor{gnat_rm/the_gnat_library gnat-wide-wide-spelling-checker-g-zspche-ads}@anchor{3de}@anchor{gnat_rm/the_gnat_library id135}@anchor{3df}
@section @code{GNAT.Wide_Wide_Spelling_Checker} (@code{g-zspche.ads})
@@ -24919,7 +24951,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{3df}@anchor{gnat_rm/the_gnat_library id136}@anchor{3e0}
+@anchor{gnat_rm/the_gnat_library gnat-wide-wide-string-split-g-zistsp-ads}@anchor{3e0}@anchor{gnat_rm/the_gnat_library id136}@anchor{3e1}
@section @code{GNAT.Wide_Wide_String_Split} (@code{g-zistsp.ads})
@@ -24933,7 +24965,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{3e1}@anchor{gnat_rm/the_gnat_library id137}@anchor{3e2}
+@anchor{gnat_rm/the_gnat_library interfaces-c-extensions-i-cexten-ads}@anchor{3e2}@anchor{gnat_rm/the_gnat_library id137}@anchor{3e3}
@section @code{Interfaces.C.Extensions} (@code{i-cexten.ads})
@@ -24944,7 +24976,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{3e3}@anchor{gnat_rm/the_gnat_library interfaces-c-streams-i-cstrea-ads}@anchor{3e4}
+@anchor{gnat_rm/the_gnat_library id138}@anchor{3e4}@anchor{gnat_rm/the_gnat_library interfaces-c-streams-i-cstrea-ads}@anchor{3e5}
@section @code{Interfaces.C.Streams} (@code{i-cstrea.ads})
@@ -24957,7 +24989,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{3e5}@anchor{gnat_rm/the_gnat_library id139}@anchor{3e6}
+@anchor{gnat_rm/the_gnat_library interfaces-packed-decimal-i-pacdec-ads}@anchor{3e6}@anchor{gnat_rm/the_gnat_library id139}@anchor{3e7}
@section @code{Interfaces.Packed_Decimal} (@code{i-pacdec.ads})
@@ -24972,7 +25004,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{3e7}@anchor{gnat_rm/the_gnat_library id140}@anchor{3e8}
+@anchor{gnat_rm/the_gnat_library interfaces-vxworks-i-vxwork-ads}@anchor{3e8}@anchor{gnat_rm/the_gnat_library id140}@anchor{3e9}
@section @code{Interfaces.VxWorks} (@code{i-vxwork.ads})
@@ -24988,7 +25020,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{3e9}@anchor{gnat_rm/the_gnat_library id141}@anchor{3ea}
+@anchor{gnat_rm/the_gnat_library interfaces-vxworks-int-connection-i-vxinco-ads}@anchor{3ea}@anchor{gnat_rm/the_gnat_library id141}@anchor{3eb}
@section @code{Interfaces.VxWorks.Int_Connection} (@code{i-vxinco.ads})
@@ -25004,7 +25036,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{3eb}@anchor{gnat_rm/the_gnat_library id142}@anchor{3ec}
+@anchor{gnat_rm/the_gnat_library interfaces-vxworks-io-i-vxwoio-ads}@anchor{3ec}@anchor{gnat_rm/the_gnat_library id142}@anchor{3ed}
@section @code{Interfaces.VxWorks.IO} (@code{i-vxwoio.ads})
@@ -25027,7 +25059,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{3ed}@anchor{gnat_rm/the_gnat_library id143}@anchor{3ee}
+@anchor{gnat_rm/the_gnat_library system-address-image-s-addima-ads}@anchor{3ee}@anchor{gnat_rm/the_gnat_library id143}@anchor{3ef}
@section @code{System.Address_Image} (@code{s-addima.ads})
@@ -25043,7 +25075,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{3ef}@anchor{gnat_rm/the_gnat_library system-assertions-s-assert-ads}@anchor{3f0}
+@anchor{gnat_rm/the_gnat_library id144}@anchor{3f0}@anchor{gnat_rm/the_gnat_library system-assertions-s-assert-ads}@anchor{3f1}
@section @code{System.Assertions} (@code{s-assert.ads})
@@ -25059,7 +25091,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{3f1}@anchor{gnat_rm/the_gnat_library system-atomic-counters-s-atocou-ads}@anchor{3f2}
+@anchor{gnat_rm/the_gnat_library id145}@anchor{3f2}@anchor{gnat_rm/the_gnat_library system-atomic-counters-s-atocou-ads}@anchor{3f3}
@section @code{System.Atomic_Counters} (@code{s-atocou.ads})
@@ -25073,7 +25105,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{3f3}@anchor{gnat_rm/the_gnat_library id146}@anchor{3f4}
+@anchor{gnat_rm/the_gnat_library system-memory-s-memory-ads}@anchor{3f4}@anchor{gnat_rm/the_gnat_library id146}@anchor{3f5}
@section @code{System.Memory} (@code{s-memory.ads})
@@ -25091,7 +25123,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{3f5}@anchor{gnat_rm/the_gnat_library system-multiprocessors-s-multip-ads}@anchor{3f6}
+@anchor{gnat_rm/the_gnat_library id147}@anchor{3f6}@anchor{gnat_rm/the_gnat_library system-multiprocessors-s-multip-ads}@anchor{3f7}
@section @code{System.Multiprocessors} (@code{s-multip.ads})
@@ -25104,7 +25136,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{3f7}@anchor{gnat_rm/the_gnat_library id148}@anchor{3f8}
+@anchor{gnat_rm/the_gnat_library system-multiprocessors-dispatching-domains-s-mudido-ads}@anchor{3f8}@anchor{gnat_rm/the_gnat_library id148}@anchor{3f9}
@section @code{System.Multiprocessors.Dispatching_Domains} (@code{s-mudido.ads})
@@ -25117,7 +25149,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{3f9}@anchor{gnat_rm/the_gnat_library system-partition-interface-s-parint-ads}@anchor{3fa}
+@anchor{gnat_rm/the_gnat_library id149}@anchor{3fa}@anchor{gnat_rm/the_gnat_library system-partition-interface-s-parint-ads}@anchor{3fb}
@section @code{System.Partition_Interface} (@code{s-parint.ads})
@@ -25130,7 +25162,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{3fb}@anchor{gnat_rm/the_gnat_library system-pool-global-s-pooglo-ads}@anchor{3fc}
+@anchor{gnat_rm/the_gnat_library id150}@anchor{3fc}@anchor{gnat_rm/the_gnat_library system-pool-global-s-pooglo-ads}@anchor{3fd}
@section @code{System.Pool_Global} (@code{s-pooglo.ads})
@@ -25147,7 +25179,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{3fd}@anchor{gnat_rm/the_gnat_library id151}@anchor{3fe}
+@anchor{gnat_rm/the_gnat_library system-pool-local-s-pooloc-ads}@anchor{3fe}@anchor{gnat_rm/the_gnat_library id151}@anchor{3ff}
@section @code{System.Pool_Local} (@code{s-pooloc.ads})
@@ -25164,7 +25196,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{3ff}@anchor{gnat_rm/the_gnat_library system-restrictions-s-restri-ads}@anchor{400}
+@anchor{gnat_rm/the_gnat_library id152}@anchor{400}@anchor{gnat_rm/the_gnat_library system-restrictions-s-restri-ads}@anchor{401}
@section @code{System.Restrictions} (@code{s-restri.ads})
@@ -25180,7 +25212,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{401}@anchor{gnat_rm/the_gnat_library id153}@anchor{402}
+@anchor{gnat_rm/the_gnat_library system-rident-s-rident-ads}@anchor{402}@anchor{gnat_rm/the_gnat_library id153}@anchor{403}
@section @code{System.Rident} (@code{s-rident.ads})
@@ -25196,7 +25228,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{403}@anchor{gnat_rm/the_gnat_library system-strings-stream-ops-s-ststop-ads}@anchor{404}
+@anchor{gnat_rm/the_gnat_library id154}@anchor{404}@anchor{gnat_rm/the_gnat_library system-strings-stream-ops-s-ststop-ads}@anchor{405}
@section @code{System.Strings.Stream_Ops} (@code{s-ststop.ads})
@@ -25212,7 +25244,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{405}@anchor{gnat_rm/the_gnat_library id155}@anchor{406}
+@anchor{gnat_rm/the_gnat_library system-unsigned-types-s-unstyp-ads}@anchor{406}@anchor{gnat_rm/the_gnat_library id155}@anchor{407}
@section @code{System.Unsigned_Types} (@code{s-unstyp.ads})
@@ -25225,7 +25257,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{407}@anchor{gnat_rm/the_gnat_library id156}@anchor{408}
+@anchor{gnat_rm/the_gnat_library system-wch-cnv-s-wchcnv-ads}@anchor{408}@anchor{gnat_rm/the_gnat_library id156}@anchor{409}
@section @code{System.Wch_Cnv} (@code{s-wchcnv.ads})
@@ -25246,7 +25278,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{409}@anchor{gnat_rm/the_gnat_library system-wch-con-s-wchcon-ads}@anchor{40a}
+@anchor{gnat_rm/the_gnat_library id157}@anchor{40a}@anchor{gnat_rm/the_gnat_library system-wch-con-s-wchcon-ads}@anchor{40b}
@section @code{System.Wch_Con} (@code{s-wchcon.ads})
@@ -25258,7 +25290,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{40b}@anchor{gnat_rm/interfacing_to_other_languages id1}@anchor{40c}
+@anchor{gnat_rm/interfacing_to_other_languages interfacing-to-other-languages}@anchor{11}@anchor{gnat_rm/interfacing_to_other_languages doc}@anchor{40c}@anchor{gnat_rm/interfacing_to_other_languages id1}@anchor{40d}
@chapter Interfacing to Other Languages
@@ -25276,7 +25308,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{40d}@anchor{gnat_rm/interfacing_to_other_languages id2}@anchor{40e}
+@anchor{gnat_rm/interfacing_to_other_languages interfacing-to-c}@anchor{40e}@anchor{gnat_rm/interfacing_to_other_languages id2}@anchor{40f}
@section Interfacing to C
@@ -25416,7 +25448,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{40f}@anchor{gnat_rm/interfacing_to_other_languages id3}@anchor{47}
+@anchor{gnat_rm/interfacing_to_other_languages id4}@anchor{410}@anchor{gnat_rm/interfacing_to_other_languages id3}@anchor{47}
@section Interfacing to C++
@@ -25473,7 +25505,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{410}@anchor{gnat_rm/interfacing_to_other_languages interfacing-to-cobol}@anchor{411}
+@anchor{gnat_rm/interfacing_to_other_languages id5}@anchor{411}@anchor{gnat_rm/interfacing_to_other_languages interfacing-to-cobol}@anchor{412}
@section Interfacing to COBOL
@@ -25481,7 +25513,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{412}@anchor{gnat_rm/interfacing_to_other_languages interfacing-to-fortran}@anchor{413}
+@anchor{gnat_rm/interfacing_to_other_languages id6}@anchor{413}@anchor{gnat_rm/interfacing_to_other_languages interfacing-to-fortran}@anchor{414}
@section Interfacing to Fortran
@@ -25491,7 +25523,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{414}@anchor{gnat_rm/interfacing_to_other_languages id7}@anchor{415}
+@anchor{gnat_rm/interfacing_to_other_languages interfacing-to-non-gnat-ada-code}@anchor{415}@anchor{gnat_rm/interfacing_to_other_languages id7}@anchor{416}
@section Interfacing to non-GNAT Ada code
@@ -25515,7 +25547,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{416}@anchor{gnat_rm/specialized_needs_annexes id1}@anchor{417}
+@anchor{gnat_rm/specialized_needs_annexes specialized-needs-annexes}@anchor{12}@anchor{gnat_rm/specialized_needs_annexes doc}@anchor{417}@anchor{gnat_rm/specialized_needs_annexes id1}@anchor{418}
@chapter Specialized Needs Annexes
@@ -25556,7 +25588,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{418}@anchor{gnat_rm/implementation_of_specific_ada_features id1}@anchor{419}
+@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{419}@anchor{gnat_rm/implementation_of_specific_ada_features id1}@anchor{41a}
@chapter Implementation of Specific Ada Features
@@ -25574,7 +25606,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{166}@anchor{gnat_rm/implementation_of_specific_ada_features id2}@anchor{41a}
+@anchor{gnat_rm/implementation_of_specific_ada_features machine-code-insertions}@anchor{166}@anchor{gnat_rm/implementation_of_specific_ada_features id2}@anchor{41b}
@section Machine Code Insertions
@@ -25742,7 +25774,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{41b}@anchor{gnat_rm/implementation_of_specific_ada_features gnat-implementation-of-tasking}@anchor{41c}
+@anchor{gnat_rm/implementation_of_specific_ada_features id3}@anchor{41c}@anchor{gnat_rm/implementation_of_specific_ada_features gnat-implementation-of-tasking}@anchor{41d}
@section GNAT Implementation of Tasking
@@ -25758,7 +25790,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{41d}@anchor{gnat_rm/implementation_of_specific_ada_features id4}@anchor{41e}
+@anchor{gnat_rm/implementation_of_specific_ada_features mapping-ada-tasks-onto-the-underlying-kernel-threads}@anchor{41e}@anchor{gnat_rm/implementation_of_specific_ada_features id4}@anchor{41f}
@subsection Mapping Ada Tasks onto the Underlying Kernel Threads
@@ -25827,7 +25859,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{41f}@anchor{gnat_rm/implementation_of_specific_ada_features ensuring-compliance-with-the-real-time-annex}@anchor{420}
+@anchor{gnat_rm/implementation_of_specific_ada_features id5}@anchor{420}@anchor{gnat_rm/implementation_of_specific_ada_features ensuring-compliance-with-the-real-time-annex}@anchor{421}
@subsection Ensuring Compliance with the Real-Time Annex
@@ -25878,7 +25910,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{421}
+@anchor{gnat_rm/implementation_of_specific_ada_features support-for-locking-policies}@anchor{422}
@subsection Support for Locking Policies
@@ -25912,7 +25944,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{422}@anchor{gnat_rm/implementation_of_specific_ada_features gnat-implementation-of-shared-passive-packages}@anchor{423}
+@anchor{gnat_rm/implementation_of_specific_ada_features id6}@anchor{423}@anchor{gnat_rm/implementation_of_specific_ada_features gnat-implementation-of-shared-passive-packages}@anchor{424}
@section GNAT Implementation of Shared Passive Packages
@@ -26010,7 +26042,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{424}@anchor{gnat_rm/implementation_of_specific_ada_features id7}@anchor{425}
+@anchor{gnat_rm/implementation_of_specific_ada_features code-generation-for-array-aggregates}@anchor{425}@anchor{gnat_rm/implementation_of_specific_ada_features id7}@anchor{426}
@section Code Generation for Array Aggregates
@@ -26041,7 +26073,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{426}@anchor{gnat_rm/implementation_of_specific_ada_features id8}@anchor{427}
+@anchor{gnat_rm/implementation_of_specific_ada_features static-constant-aggregates-with-static-bounds}@anchor{427}@anchor{gnat_rm/implementation_of_specific_ada_features id8}@anchor{428}
@subsection Static constant aggregates with static bounds
@@ -26088,7 +26120,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{428}@anchor{gnat_rm/implementation_of_specific_ada_features id9}@anchor{429}
+@anchor{gnat_rm/implementation_of_specific_ada_features constant-aggregates-with-unconstrained-nominal-types}@anchor{429}@anchor{gnat_rm/implementation_of_specific_ada_features id9}@anchor{42a}
@subsection Constant aggregates with unconstrained nominal types
@@ -26103,7 +26135,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{42a}@anchor{gnat_rm/implementation_of_specific_ada_features aggregates-with-static-bounds}@anchor{42b}
+@anchor{gnat_rm/implementation_of_specific_ada_features id10}@anchor{42b}@anchor{gnat_rm/implementation_of_specific_ada_features aggregates-with-static-bounds}@anchor{42c}
@subsection Aggregates with static bounds
@@ -26131,7 +26163,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{42c}@anchor{gnat_rm/implementation_of_specific_ada_features aggregates-with-nonstatic-bounds}@anchor{42d}
+@anchor{gnat_rm/implementation_of_specific_ada_features id11}@anchor{42d}@anchor{gnat_rm/implementation_of_specific_ada_features aggregates-with-nonstatic-bounds}@anchor{42e}
@subsection Aggregates with nonstatic bounds
@@ -26142,7 +26174,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{42e}@anchor{gnat_rm/implementation_of_specific_ada_features aggregates-in-assignment-statements}@anchor{42f}
+@anchor{gnat_rm/implementation_of_specific_ada_features id12}@anchor{42f}@anchor{gnat_rm/implementation_of_specific_ada_features aggregates-in-assignment-statements}@anchor{430}
@subsection Aggregates in assignment statements
@@ -26184,7 +26216,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{430}@anchor{gnat_rm/implementation_of_specific_ada_features the-size-of-discriminated-records-with-default-discriminants}@anchor{431}
+@anchor{gnat_rm/implementation_of_specific_ada_features id13}@anchor{431}@anchor{gnat_rm/implementation_of_specific_ada_features the-size-of-discriminated-records-with-default-discriminants}@anchor{432}
@section The Size of Discriminated Records with Default Discriminants
@@ -26264,7 +26296,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{432}@anchor{gnat_rm/implementation_of_specific_ada_features id14}@anchor{433}
+@anchor{gnat_rm/implementation_of_specific_ada_features strict-conformance-to-the-ada-reference-manual}@anchor{433}@anchor{gnat_rm/implementation_of_specific_ada_features id14}@anchor{434}
@section Strict Conformance to the Ada Reference Manual
@@ -26291,7 +26323,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{434}@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{435}
+@anchor{gnat_rm/implementation_of_ada_2012_features doc}@anchor{435}@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{436}
@chapter Implementation of Ada 2012 Features
@@ -28457,7 +28489,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{436}@anchor{gnat_rm/obsolescent_features doc}@anchor{437}@anchor{gnat_rm/obsolescent_features obsolescent-features}@anchor{15}
+@anchor{gnat_rm/obsolescent_features id1}@anchor{437}@anchor{gnat_rm/obsolescent_features doc}@anchor{438}@anchor{gnat_rm/obsolescent_features obsolescent-features}@anchor{15}
@chapter Obsolescent Features
@@ -28476,7 +28508,7 @@ compatibility purposes.
@end menu
@node pragma No_Run_Time,pragma Ravenscar,,Obsolescent Features
-@anchor{gnat_rm/obsolescent_features id2}@anchor{438}@anchor{gnat_rm/obsolescent_features pragma-no-run-time}@anchor{439}
+@anchor{gnat_rm/obsolescent_features id2}@anchor{439}@anchor{gnat_rm/obsolescent_features pragma-no-run-time}@anchor{43a}
@section pragma No_Run_Time
@@ -28489,7 +28521,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{43a}@anchor{gnat_rm/obsolescent_features pragma-ravenscar}@anchor{43b}
+@anchor{gnat_rm/obsolescent_features id3}@anchor{43b}@anchor{gnat_rm/obsolescent_features pragma-ravenscar}@anchor{43c}
@section pragma Ravenscar
@@ -28498,7 +28530,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{43c}@anchor{gnat_rm/obsolescent_features id4}@anchor{43d}
+@anchor{gnat_rm/obsolescent_features pragma-restricted-run-time}@anchor{43d}@anchor{gnat_rm/obsolescent_features id4}@anchor{43e}
@section pragma Restricted_Run_Time
@@ -28508,7 +28540,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{43e}@anchor{gnat_rm/obsolescent_features id5}@anchor{43f}
+@anchor{gnat_rm/obsolescent_features pragma-task-info}@anchor{43f}@anchor{gnat_rm/obsolescent_features id5}@anchor{440}
@section pragma Task_Info
@@ -28534,7 +28566,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{440}@anchor{gnat_rm/obsolescent_features package-system-task-info-s-tasinf-ads}@anchor{441}
+@anchor{gnat_rm/obsolescent_features package-system-task-info}@anchor{441}@anchor{gnat_rm/obsolescent_features package-system-task-info-s-tasinf-ads}@anchor{442}
@section package System.Task_Info (@code{s-tasinf.ads})
@@ -28544,7 +28576,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{442}@anchor{gnat_rm/compatibility_and_porting_guide id1}@anchor{443}
+@anchor{gnat_rm/compatibility_and_porting_guide compatibility-and-porting-guide}@anchor{16}@anchor{gnat_rm/compatibility_and_porting_guide doc}@anchor{443}@anchor{gnat_rm/compatibility_and_porting_guide id1}@anchor{444}
@chapter Compatibility and Porting Guide
@@ -28566,7 +28598,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{444}@anchor{gnat_rm/compatibility_and_porting_guide writing-portable-fixed-point-declarations}@anchor{445}
+@anchor{gnat_rm/compatibility_and_porting_guide id2}@anchor{445}@anchor{gnat_rm/compatibility_and_porting_guide writing-portable-fixed-point-declarations}@anchor{446}
@section Writing Portable Fixed-Point Declarations
@@ -28688,7 +28720,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{446}@anchor{gnat_rm/compatibility_and_porting_guide id3}@anchor{447}
+@anchor{gnat_rm/compatibility_and_porting_guide compatibility-with-ada-83}@anchor{447}@anchor{gnat_rm/compatibility_and_porting_guide id3}@anchor{448}
@section Compatibility with Ada 83
@@ -28716,7 +28748,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{448}@anchor{gnat_rm/compatibility_and_porting_guide legal-ada-83-programs-that-are-illegal-in-ada-95}@anchor{449}
+@anchor{gnat_rm/compatibility_and_porting_guide id4}@anchor{449}@anchor{gnat_rm/compatibility_and_porting_guide legal-ada-83-programs-that-are-illegal-in-ada-95}@anchor{44a}
@subsection Legal Ada 83 programs that are illegal in Ada 95
@@ -28816,7 +28848,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{44a}@anchor{gnat_rm/compatibility_and_porting_guide id5}@anchor{44b}
+@anchor{gnat_rm/compatibility_and_porting_guide more-deterministic-semantics}@anchor{44b}@anchor{gnat_rm/compatibility_and_porting_guide id5}@anchor{44c}
@subsection More deterministic semantics
@@ -28844,7 +28876,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{44c}@anchor{gnat_rm/compatibility_and_porting_guide changed-semantics}@anchor{44d}
+@anchor{gnat_rm/compatibility_and_porting_guide id6}@anchor{44d}@anchor{gnat_rm/compatibility_and_porting_guide changed-semantics}@anchor{44e}
@subsection Changed semantics
@@ -28886,7 +28918,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{44e}@anchor{gnat_rm/compatibility_and_porting_guide id7}@anchor{44f}
+@anchor{gnat_rm/compatibility_and_porting_guide other-language-compatibility-issues}@anchor{44f}@anchor{gnat_rm/compatibility_and_porting_guide id7}@anchor{450}
@subsection Other language compatibility issues
@@ -28919,7 +28951,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{450}@anchor{gnat_rm/compatibility_and_porting_guide id8}@anchor{451}
+@anchor{gnat_rm/compatibility_and_porting_guide compatibility-between-ada-95-and-ada-2005}@anchor{451}@anchor{gnat_rm/compatibility_and_porting_guide id8}@anchor{452}
@section Compatibility between Ada 95 and Ada 2005
@@ -28991,7 +29023,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{452}@anchor{gnat_rm/compatibility_and_porting_guide id9}@anchor{453}
+@anchor{gnat_rm/compatibility_and_porting_guide implementation-dependent-characteristics}@anchor{453}@anchor{gnat_rm/compatibility_and_porting_guide id9}@anchor{454}
@section Implementation-dependent characteristics
@@ -29014,7 +29046,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{454}@anchor{gnat_rm/compatibility_and_porting_guide id10}@anchor{455}
+@anchor{gnat_rm/compatibility_and_porting_guide implementation-defined-pragmas}@anchor{455}@anchor{gnat_rm/compatibility_and_porting_guide id10}@anchor{456}
@subsection Implementation-defined pragmas
@@ -29036,7 +29068,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{456}@anchor{gnat_rm/compatibility_and_porting_guide implementation-defined-attributes}@anchor{457}
+@anchor{gnat_rm/compatibility_and_porting_guide id11}@anchor{457}@anchor{gnat_rm/compatibility_and_porting_guide implementation-defined-attributes}@anchor{458}
@subsection Implementation-defined attributes
@@ -29050,7 +29082,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{458}@anchor{gnat_rm/compatibility_and_porting_guide id12}@anchor{459}
+@anchor{gnat_rm/compatibility_and_porting_guide libraries}@anchor{459}@anchor{gnat_rm/compatibility_and_porting_guide id12}@anchor{45a}
@subsection Libraries
@@ -29079,7 +29111,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{45a}@anchor{gnat_rm/compatibility_and_porting_guide id13}@anchor{45b}
+@anchor{gnat_rm/compatibility_and_porting_guide elaboration-order}@anchor{45b}@anchor{gnat_rm/compatibility_and_porting_guide id13}@anchor{45c}
@subsection Elaboration order
@@ -29115,7 +29147,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{45c}@anchor{gnat_rm/compatibility_and_porting_guide id14}@anchor{45d}
+@anchor{gnat_rm/compatibility_and_porting_guide target-specific-aspects}@anchor{45d}@anchor{gnat_rm/compatibility_and_porting_guide id14}@anchor{45e}
@subsection Target-specific aspects
@@ -29128,10 +29160,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{45e,,Representation Clauses}.
+GNAT's approach to these issues is described in @ref{45f,,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{45f}@anchor{gnat_rm/compatibility_and_porting_guide compatibility-with-other-ada-systems}@anchor{460}
+@anchor{gnat_rm/compatibility_and_porting_guide id15}@anchor{460}@anchor{gnat_rm/compatibility_and_porting_guide compatibility-with-other-ada-systems}@anchor{461}
@section Compatibility with Other Ada Systems
@@ -29174,7 +29206,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{45e}@anchor{gnat_rm/compatibility_and_porting_guide id16}@anchor{461}
+@anchor{gnat_rm/compatibility_and_porting_guide representation-clauses}@anchor{45f}@anchor{gnat_rm/compatibility_and_porting_guide id16}@anchor{462}
@section Representation Clauses
@@ -29267,7 +29299,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{462}@anchor{gnat_rm/compatibility_and_porting_guide id17}@anchor{463}
+@anchor{gnat_rm/compatibility_and_porting_guide compatibility-with-hp-ada-83}@anchor{463}@anchor{gnat_rm/compatibility_and_porting_guide id17}@anchor{464}
@section Compatibility with HP Ada 83
@@ -29297,7 +29329,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{464}@anchor{share/gnu_free_documentation_license gnu-free-documentation-license}@anchor{465}
+@anchor{share/gnu_free_documentation_license gnu-fdl}@anchor{1}@anchor{share/gnu_free_documentation_license doc}@anchor{465}@anchor{share/gnu_free_documentation_license gnu-free-documentation-license}@anchor{466}
@chapter GNU Free Documentation License
diff --git a/gcc/ada/hostparm.ads b/gcc/ada/hostparm.ads
index da0fbe4..4d128cc 100644
--- a/gcc/ada/hostparm.ads
+++ b/gcc/ada/hostparm.ads
@@ -56,9 +56,10 @@ package Hostparm is
-- of file names in the library, must be at least Max_Line_Length, but
-- can be larger.
- Tag_Errors : constant Boolean := False;
+ Tag_Errors : constant Boolean := True;
-- If set to true, then brief form error messages will be prefaced by
- -- the string "error:". Used as default for Opt.Unique_Error_Tag.
+ -- the string "error:". Used as default for Opt.Unique_Error_Tag. Disabled
+ -- by gnatd_U.
Exclude_Missing_Objects : constant Boolean := True;
-- If set to true, gnatbind will exclude from consideration all
diff --git a/gcc/ada/impunit.adb b/gcc/ada/impunit.adb
index 75b5046..7e4a4d9 100644
--- a/gcc/ada/impunit.adb
+++ b/gcc/ada/impunit.adb
@@ -632,16 +632,26 @@ package body Impunit is
("s-aotase", T), -- System.Atomic_Operations.Test_And_Set
("s-atoope", T), -- System.Atomic_Operations
("s-atopex", T), -- System.Atomic_Operations.Exchange
+ ("a-sttebu", T), -- Ada.Strings.Text_Buffers
+ ("a-stbuun", T), -- Ada.Strings.Text_Buffers.Unbounded
+ ("a-stbubo", T), -- Ada.Strings.Text_Buffers.Bounded
("a-stteou", T), -- Ada.Strings.Text_Output
("a-stouut", T), -- Ada.Strings.Text_Output.Utils
- ("a-stoubu", T), -- Ada.Strings.Text_Output.Buffers
("a-stoufi", T), -- Ada.Strings.Text_Output.Files
("a-stobfi", T), -- Ada.Strings.Text_Output.Basic_Files
("a-stobbu", T), -- Ada.Strings.Text_Output.Bit_Buckets
("a-stoufo", T), -- Ada.Strings.Text_Output.Formatting
("a-strsto", T), -- Ada.Streams.Storage
("a-ststbo", T), -- Ada.Streams.Storage.Bounded
- ("a-ststun", T) -- Ada.Streams.Storage.Unbounded
+ ("a-ststun", T), -- Ada.Streams.Storage.Unbounded
+
+ ----------------------------------------
+ -- GNAT Defined Additions to Ada 2022 --
+ ----------------------------------------
+
+ ("a-stbufi", T), -- Ada.Strings.Text_Buffers.Files
+ ("a-stbufo", T), -- Ada.Strings.Text_Buffers.Formatting
+ ("a-stbuut", T) -- Ada.Strings.Text_Buffers.Utils
);
-----------------------
diff --git a/gcc/ada/libgnarl/s-putaim.adb b/gcc/ada/libgnarl/s-putaim.adb
index ae785e2..687ac0e 100644
--- a/gcc/ada/libgnarl/s-putaim.adb
+++ b/gcc/ada/libgnarl/s-putaim.adb
@@ -29,13 +29,10 @@
-- --
------------------------------------------------------------------------------
-with Unchecked_Conversion;
-with Ada.Strings.Text_Output.Utils;
-use Ada.Strings.Text_Output;
-use Ada.Strings.Text_Output.Utils;
-
package body System.Put_Task_Images is
+ use Ada.Strings.Text_Buffers;
+
procedure Put_Image_Protected (S : in out Sink'Class) is
begin
Put_UTF_8 (S, "(protected object)");
diff --git a/gcc/ada/libgnarl/s-putaim.ads b/gcc/ada/libgnarl/s-putaim.ads
index 5ad69db..ff0c344 100644
--- a/gcc/ada/libgnarl/s-putaim.ads
+++ b/gcc/ada/libgnarl/s-putaim.ads
@@ -29,7 +29,7 @@
-- --
------------------------------------------------------------------------------
-with Ada.Strings.Text_Output;
+with Ada.Strings.Text_Buffers;
with Ada.Task_Identification;
package System.Put_Task_Images is
@@ -39,7 +39,7 @@ package System.Put_Task_Images is
-- separate from System.Put_Images to avoid dragging the tasking runtimes
-- into nontasking programs.
- subtype Sink is Ada.Strings.Text_Output.Sink;
+ subtype Sink is Ada.Strings.Text_Buffers.Root_Buffer_Type;
procedure Put_Image_Protected (S : in out Sink'Class);
procedure Put_Image_Task
diff --git a/gcc/ada/libgnat/a-cbdlli.adb b/gcc/ada/libgnat/a-cbdlli.adb
index 0d29cfd..bb92bda 100644
--- a/gcc/ada/libgnat/a-cbdlli.adb
+++ b/gcc/ada/libgnat/a-cbdlli.adb
@@ -1504,7 +1504,7 @@ is
---------------
procedure Put_Image
- (S : in out Ada.Strings.Text_Output.Sink'Class; V : List)
+ (S : in out Ada.Strings.Text_Buffers.Root_Buffer_Type'Class; V : List)
is
First_Time : Boolean := True;
use System.Put_Images;
diff --git a/gcc/ada/libgnat/a-cbdlli.ads b/gcc/ada/libgnat/a-cbdlli.ads
index 8773e21..ab55086 100644
--- a/gcc/ada/libgnat/a-cbdlli.ads
+++ b/gcc/ada/libgnat/a-cbdlli.ads
@@ -36,7 +36,7 @@ with Ada.Iterator_Interfaces;
with Ada.Containers.Helpers;
private with Ada.Streams;
private with Ada.Finalization;
-private with Ada.Strings.Text_Output;
+private with Ada.Strings.Text_Buffers;
generic
type Element_Type is private;
@@ -285,7 +285,7 @@ private
end record with Put_Image => Put_Image;
procedure Put_Image
- (S : in out Ada.Strings.Text_Output.Sink'Class; V : List);
+ (S : in out Ada.Strings.Text_Buffers.Root_Buffer_Type'Class; V : List);
procedure Read
(Stream : not null access Root_Stream_Type'Class;
diff --git a/gcc/ada/libgnat/a-cbhama.adb b/gcc/ada/libgnat/a-cbhama.adb
index 6d490ad..78a590f 100644
--- a/gcc/ada/libgnat/a-cbhama.adb
+++ b/gcc/ada/libgnat/a-cbhama.adb
@@ -902,7 +902,7 @@ is
---------------
procedure Put_Image
- (S : in out Ada.Strings.Text_Output.Sink'Class; V : Map)
+ (S : in out Ada.Strings.Text_Buffers.Root_Buffer_Type'Class; V : Map)
is
First_Time : Boolean := True;
use System.Put_Images;
diff --git a/gcc/ada/libgnat/a-cbhama.ads b/gcc/ada/libgnat/a-cbhama.ads
index 482b5fd..8be64c8 100644
--- a/gcc/ada/libgnat/a-cbhama.ads
+++ b/gcc/ada/libgnat/a-cbhama.ads
@@ -36,7 +36,7 @@ with Ada.Iterator_Interfaces;
private with Ada.Containers.Hash_Tables;
private with Ada.Streams;
private with Ada.Finalization;
-private with Ada.Strings.Text_Output;
+private with Ada.Strings.Text_Buffers;
generic
type Key_Type is private;
@@ -349,7 +349,7 @@ private
with null record with Put_Image => Put_Image;
procedure Put_Image
- (S : in out Ada.Strings.Text_Output.Sink'Class; V : Map);
+ (S : in out Ada.Strings.Text_Buffers.Root_Buffer_Type'Class; V : Map);
use HT_Types, HT_Types.Implementation;
use Ada.Streams;
diff --git a/gcc/ada/libgnat/a-cbhase.adb b/gcc/ada/libgnat/a-cbhase.adb
index c87d2ac..f8ca4d2 100644
--- a/gcc/ada/libgnat/a-cbhase.adb
+++ b/gcc/ada/libgnat/a-cbhase.adb
@@ -1125,7 +1125,7 @@ is
---------------
procedure Put_Image
- (S : in out Ada.Strings.Text_Output.Sink'Class; V : Set)
+ (S : in out Ada.Strings.Text_Buffers.Root_Buffer_Type'Class; V : Set)
is
First_Time : Boolean := True;
use System.Put_Images;
diff --git a/gcc/ada/libgnat/a-cbhase.ads b/gcc/ada/libgnat/a-cbhase.ads
index 90d7ff9..92926c1 100644
--- a/gcc/ada/libgnat/a-cbhase.ads
+++ b/gcc/ada/libgnat/a-cbhase.ads
@@ -37,7 +37,7 @@ private with Ada.Containers.Hash_Tables;
with Ada.Containers.Helpers;
private with Ada.Streams;
private with Ada.Finalization;
-private with Ada.Strings.Text_Output;
+private with Ada.Strings.Text_Buffers;
generic
type Element_Type is private;
@@ -507,7 +507,7 @@ private
with null record with Put_Image => Put_Image;
procedure Put_Image
- (S : in out Ada.Strings.Text_Output.Sink'Class; V : Set);
+ (S : in out Ada.Strings.Text_Buffers.Root_Buffer_Type'Class; V : Set);
use HT_Types, HT_Types.Implementation;
use Ada.Streams;
diff --git a/gcc/ada/libgnat/a-cbmutr.adb b/gcc/ada/libgnat/a-cbmutr.adb
index 25524d0..714dea1 100644
--- a/gcc/ada/libgnat/a-cbmutr.adb
+++ b/gcc/ada/libgnat/a-cbmutr.adb
@@ -2328,7 +2328,7 @@ is
---------------
procedure Put_Image
- (S : in out Ada.Strings.Text_Output.Sink'Class; V : Tree)
+ (S : in out Ada.Strings.Text_Buffers.Root_Buffer_Type'Class; V : Tree)
is
use System.Put_Images;
diff --git a/gcc/ada/libgnat/a-cbmutr.ads b/gcc/ada/libgnat/a-cbmutr.ads
index 3a519c8..c7e221a 100644
--- a/gcc/ada/libgnat/a-cbmutr.ads
+++ b/gcc/ada/libgnat/a-cbmutr.ads
@@ -35,7 +35,7 @@ with Ada.Iterator_Interfaces;
with Ada.Containers.Helpers;
private with Ada.Streams;
-private with Ada.Strings.Text_Output;
+private with Ada.Strings.Text_Buffers;
generic
type Element_Type is private;
@@ -311,7 +311,7 @@ private
end record with Put_Image => Put_Image;
procedure Put_Image
- (S : in out Ada.Strings.Text_Output.Sink'Class; V : Tree);
+ (S : in out Ada.Strings.Text_Buffers.Root_Buffer_Type'Class; V : Tree);
procedure Write
(Stream : not null access Root_Stream_Type'Class;
diff --git a/gcc/ada/libgnat/a-cborma.adb b/gcc/ada/libgnat/a-cborma.adb
index 186aad7..67e6108 100644
--- a/gcc/ada/libgnat/a-cborma.adb
+++ b/gcc/ada/libgnat/a-cborma.adb
@@ -1306,7 +1306,7 @@ is
---------------
procedure Put_Image
- (S : in out Ada.Strings.Text_Output.Sink'Class; V : Map)
+ (S : in out Ada.Strings.Text_Buffers.Root_Buffer_Type'Class; V : Map)
is
First_Time : Boolean := True;
use System.Put_Images;
diff --git a/gcc/ada/libgnat/a-cborma.ads b/gcc/ada/libgnat/a-cborma.ads
index 1b41ce9..f87522a 100644
--- a/gcc/ada/libgnat/a-cborma.ads
+++ b/gcc/ada/libgnat/a-cborma.ads
@@ -36,7 +36,7 @@ with Ada.Iterator_Interfaces;
private with Ada.Containers.Red_Black_Trees;
private with Ada.Streams;
private with Ada.Finalization;
-private with Ada.Strings.Text_Output;
+private with Ada.Strings.Text_Buffers;
generic
type Key_Type is private;
@@ -257,7 +257,7 @@ private
with null record with Put_Image => Put_Image;
procedure Put_Image
- (S : in out Ada.Strings.Text_Output.Sink'Class; V : Map);
+ (S : in out Ada.Strings.Text_Buffers.Root_Buffer_Type'Class; V : Map);
use Red_Black_Trees;
use Tree_Types, Tree_Types.Implementation;
diff --git a/gcc/ada/libgnat/a-cborse.adb b/gcc/ada/libgnat/a-cborse.adb
index 54cb7ce..0b9e0cc 100644
--- a/gcc/ada/libgnat/a-cborse.adb
+++ b/gcc/ada/libgnat/a-cborse.adb
@@ -1645,7 +1645,7 @@ is
---------------
procedure Put_Image
- (S : in out Ada.Strings.Text_Output.Sink'Class; V : Set)
+ (S : in out Ada.Strings.Text_Buffers.Root_Buffer_Type'Class; V : Set)
is
First_Time : Boolean := True;
use System.Put_Images;
diff --git a/gcc/ada/libgnat/a-cborse.ads b/gcc/ada/libgnat/a-cborse.ads
index a79bb7d..06bd20f 100644
--- a/gcc/ada/libgnat/a-cborse.ads
+++ b/gcc/ada/libgnat/a-cborse.ads
@@ -37,7 +37,7 @@ with Ada.Containers.Helpers;
private with Ada.Containers.Red_Black_Trees;
private with Ada.Streams;
private with Ada.Finalization;
-private with Ada.Strings.Text_Output;
+private with Ada.Strings.Text_Buffers;
generic
type Element_Type is private;
@@ -345,7 +345,7 @@ private
with null record with Put_Image => Put_Image;
procedure Put_Image
- (S : in out Ada.Strings.Text_Output.Sink'Class; V : Set);
+ (S : in out Ada.Strings.Text_Buffers.Root_Buffer_Type'Class; V : Set);
use Tree_Types, Tree_Types.Implementation;
use Ada.Finalization;
diff --git a/gcc/ada/libgnat/a-cdlili.adb b/gcc/ada/libgnat/a-cdlili.adb
index 3b82ac5..73c1e6d 100644
--- a/gcc/ada/libgnat/a-cdlili.adb
+++ b/gcc/ada/libgnat/a-cdlili.adb
@@ -1269,7 +1269,7 @@ is
---------------
procedure Put_Image
- (S : in out Ada.Strings.Text_Output.Sink'Class; V : List)
+ (S : in out Ada.Strings.Text_Buffers.Root_Buffer_Type'Class; V : List)
is
First_Time : Boolean := True;
use System.Put_Images;
diff --git a/gcc/ada/libgnat/a-cdlili.ads b/gcc/ada/libgnat/a-cdlili.ads
index 8d2d345..66368b5 100644
--- a/gcc/ada/libgnat/a-cdlili.ads
+++ b/gcc/ada/libgnat/a-cdlili.ads
@@ -36,7 +36,7 @@ with Ada.Iterator_Interfaces;
with Ada.Containers.Helpers;
private with Ada.Finalization;
private with Ada.Streams;
-private with Ada.Strings.Text_Output;
+private with Ada.Strings.Text_Buffers;
generic
type Element_Type is private;
@@ -288,7 +288,7 @@ private
end record with Put_Image => Put_Image;
procedure Put_Image
- (S : in out Ada.Strings.Text_Output.Sink'Class; V : List);
+ (S : in out Ada.Strings.Text_Buffers.Root_Buffer_Type'Class; V : List);
overriding procedure Adjust (Container : in out List);
diff --git a/gcc/ada/libgnat/a-cidlli.adb b/gcc/ada/libgnat/a-cidlli.adb
index 58170fe..3fc57da 100644
--- a/gcc/ada/libgnat/a-cidlli.adb
+++ b/gcc/ada/libgnat/a-cidlli.adb
@@ -1311,7 +1311,7 @@ is
---------------
procedure Put_Image
- (S : in out Ada.Strings.Text_Output.Sink'Class; V : List)
+ (S : in out Ada.Strings.Text_Buffers.Root_Buffer_Type'Class; V : List)
is
First_Time : Boolean := True;
use System.Put_Images;
diff --git a/gcc/ada/libgnat/a-cidlli.ads b/gcc/ada/libgnat/a-cidlli.ads
index d5c4e45..c8794a3 100644
--- a/gcc/ada/libgnat/a-cidlli.ads
+++ b/gcc/ada/libgnat/a-cidlli.ads
@@ -36,7 +36,7 @@ with Ada.Iterator_Interfaces;
with Ada.Containers.Helpers;
private with Ada.Finalization;
private with Ada.Streams;
-private with Ada.Strings.Text_Output;
+private with Ada.Strings.Text_Buffers;
generic
type Element_Type (<>) is private;
@@ -282,7 +282,7 @@ private
end record with Put_Image => Put_Image;
procedure Put_Image
- (S : in out Ada.Strings.Text_Output.Sink'Class; V : List);
+ (S : in out Ada.Strings.Text_Buffers.Root_Buffer_Type'Class; V : List);
overriding procedure Adjust (Container : in out List);
diff --git a/gcc/ada/libgnat/a-cihama.adb b/gcc/ada/libgnat/a-cihama.adb
index 0bc4473..2fbf65e 100644
--- a/gcc/ada/libgnat/a-cihama.adb
+++ b/gcc/ada/libgnat/a-cihama.adb
@@ -973,7 +973,7 @@ is
---------------
procedure Put_Image
- (S : in out Ada.Strings.Text_Output.Sink'Class; V : Map)
+ (S : in out Ada.Strings.Text_Buffers.Root_Buffer_Type'Class; V : Map)
is
First_Time : Boolean := True;
use System.Put_Images;
diff --git a/gcc/ada/libgnat/a-cihama.ads b/gcc/ada/libgnat/a-cihama.ads
index 1f0173d..056f338 100644
--- a/gcc/ada/libgnat/a-cihama.ads
+++ b/gcc/ada/libgnat/a-cihama.ads
@@ -36,7 +36,7 @@ with Ada.Iterator_Interfaces;
private with Ada.Containers.Hash_Tables;
private with Ada.Finalization;
private with Ada.Streams;
-private with Ada.Strings.Text_Output;
+private with Ada.Strings.Text_Buffers;
generic
type Key_Type (<>) is private;
@@ -336,7 +336,7 @@ private
end record with Put_Image => Put_Image;
procedure Put_Image
- (S : in out Ada.Strings.Text_Output.Sink'Class; V : Map);
+ (S : in out Ada.Strings.Text_Buffers.Root_Buffer_Type'Class; V : Map);
overriding procedure Adjust (Container : in out Map);
diff --git a/gcc/ada/libgnat/a-cihase.adb b/gcc/ada/libgnat/a-cihase.adb
index d3876fc..9fd4d98 100644
--- a/gcc/ada/libgnat/a-cihase.adb
+++ b/gcc/ada/libgnat/a-cihase.adb
@@ -1281,7 +1281,7 @@ is
---------------
procedure Put_Image
- (S : in out Ada.Strings.Text_Output.Sink'Class; V : Set)
+ (S : in out Ada.Strings.Text_Buffers.Root_Buffer_Type'Class; V : Set)
is
First_Time : Boolean := True;
use System.Put_Images;
diff --git a/gcc/ada/libgnat/a-cihase.ads b/gcc/ada/libgnat/a-cihase.ads
index 3547fca..a73e898 100644
--- a/gcc/ada/libgnat/a-cihase.ads
+++ b/gcc/ada/libgnat/a-cihase.ads
@@ -37,7 +37,7 @@ private with Ada.Containers.Hash_Tables;
with Ada.Containers.Helpers;
private with Ada.Streams;
private with Ada.Finalization;
-private with Ada.Strings.Text_Output;
+private with Ada.Strings.Text_Buffers;
generic
type Element_Type (<>) is private;
@@ -500,7 +500,7 @@ private
end record with Put_Image => Put_Image;
procedure Put_Image
- (S : in out Ada.Strings.Text_Output.Sink'Class; V : Set);
+ (S : in out Ada.Strings.Text_Buffers.Root_Buffer_Type'Class; V : Set);
overriding procedure Adjust (Container : in out Set);
diff --git a/gcc/ada/libgnat/a-cimutr.adb b/gcc/ada/libgnat/a-cimutr.adb
index f5cba6e..aa7efac 100644
--- a/gcc/ada/libgnat/a-cimutr.adb
+++ b/gcc/ada/libgnat/a-cimutr.adb
@@ -1881,7 +1881,7 @@ is
---------------
procedure Put_Image
- (S : in out Ada.Strings.Text_Output.Sink'Class; V : Tree)
+ (S : in out Ada.Strings.Text_Buffers.Root_Buffer_Type'Class; V : Tree)
is
use System.Put_Images;
diff --git a/gcc/ada/libgnat/a-cimutr.ads b/gcc/ada/libgnat/a-cimutr.ads
index 2ac5627..014d1fe 100644
--- a/gcc/ada/libgnat/a-cimutr.ads
+++ b/gcc/ada/libgnat/a-cimutr.ads
@@ -36,7 +36,7 @@ with Ada.Iterator_Interfaces;
with Ada.Containers.Helpers;
private with Ada.Finalization;
private with Ada.Streams;
-private with Ada.Strings.Text_Output;
+private with Ada.Strings.Text_Buffers;
generic
type Element_Type (<>) is private;
@@ -352,7 +352,7 @@ private
end record with Put_Image => Put_Image;
procedure Put_Image
- (S : in out Ada.Strings.Text_Output.Sink'Class; V : Tree);
+ (S : in out Ada.Strings.Text_Buffers.Root_Buffer_Type'Class; V : Tree);
overriding procedure Adjust (Container : in out Tree);
diff --git a/gcc/ada/libgnat/a-ciorma.adb b/gcc/ada/libgnat/a-ciorma.adb
index b53cbcb..a569156 100644
--- a/gcc/ada/libgnat/a-ciorma.adb
+++ b/gcc/ada/libgnat/a-ciorma.adb
@@ -1297,7 +1297,7 @@ is
---------------
procedure Put_Image
- (S : in out Ada.Strings.Text_Output.Sink'Class; V : Map)
+ (S : in out Ada.Strings.Text_Buffers.Root_Buffer_Type'Class; V : Map)
is
First_Time : Boolean := True;
use System.Put_Images;
diff --git a/gcc/ada/libgnat/a-ciorma.ads b/gcc/ada/libgnat/a-ciorma.ads
index 68e9b93..157714d 100644
--- a/gcc/ada/libgnat/a-ciorma.ads
+++ b/gcc/ada/libgnat/a-ciorma.ads
@@ -36,7 +36,7 @@ with Ada.Iterator_Interfaces;
private with Ada.Containers.Red_Black_Trees;
private with Ada.Finalization;
private with Ada.Streams;
-private with Ada.Strings.Text_Output;
+private with Ada.Strings.Text_Buffers;
generic
type Key_Type (<>) is private;
@@ -265,7 +265,7 @@ private
end record with Put_Image => Put_Image;
procedure Put_Image
- (S : in out Ada.Strings.Text_Output.Sink'Class; V : Map);
+ (S : in out Ada.Strings.Text_Buffers.Root_Buffer_Type'Class; V : Map);
overriding procedure Adjust (Container : in out Map);
diff --git a/gcc/ada/libgnat/a-ciormu.adb b/gcc/ada/libgnat/a-ciormu.adb
index 0dc1b48..f1b9021 100644
--- a/gcc/ada/libgnat/a-ciormu.adb
+++ b/gcc/ada/libgnat/a-ciormu.adb
@@ -1663,7 +1663,7 @@ is
---------------
procedure Put_Image
- (S : in out Ada.Strings.Text_Output.Sink'Class; V : Set)
+ (S : in out Ada.Strings.Text_Buffers.Root_Buffer_Type'Class; V : Set)
is
First_Time : Boolean := True;
use System.Put_Images;
diff --git a/gcc/ada/libgnat/a-ciormu.ads b/gcc/ada/libgnat/a-ciormu.ads
index 77eb54d..cf8ea0d 100644
--- a/gcc/ada/libgnat/a-ciormu.ads
+++ b/gcc/ada/libgnat/a-ciormu.ads
@@ -35,7 +35,7 @@
private with Ada.Containers.Red_Black_Trees;
private with Ada.Finalization;
private with Ada.Streams;
-private with Ada.Strings.Text_Output;
+private with Ada.Strings.Text_Buffers;
with Ada.Iterator_Interfaces;
generic
@@ -472,7 +472,7 @@ private
end record with Put_Image => Put_Image;
procedure Put_Image
- (S : in out Ada.Strings.Text_Output.Sink'Class; V : Set);
+ (S : in out Ada.Strings.Text_Buffers.Root_Buffer_Type'Class; V : Set);
overriding procedure Adjust (Container : in out Set);
diff --git a/gcc/ada/libgnat/a-ciorse.adb b/gcc/ada/libgnat/a-ciorse.adb
index 267daab..7e63f15 100644
--- a/gcc/ada/libgnat/a-ciorse.adb
+++ b/gcc/ada/libgnat/a-ciorse.adb
@@ -1728,7 +1728,7 @@ is
---------------
procedure Put_Image
- (S : in out Ada.Strings.Text_Output.Sink'Class; V : Set)
+ (S : in out Ada.Strings.Text_Buffers.Root_Buffer_Type'Class; V : Set)
is
First_Time : Boolean := True;
use System.Put_Images;
diff --git a/gcc/ada/libgnat/a-ciorse.ads b/gcc/ada/libgnat/a-ciorse.ads
index 0e98298..1a9d82c 100644
--- a/gcc/ada/libgnat/a-ciorse.ads
+++ b/gcc/ada/libgnat/a-ciorse.ads
@@ -37,7 +37,7 @@ with Ada.Containers.Helpers;
private with Ada.Containers.Red_Black_Trees;
private with Ada.Finalization;
private with Ada.Streams;
-private with Ada.Strings.Text_Output;
+private with Ada.Strings.Text_Buffers;
generic
type Element_Type (<>) is private;
@@ -364,7 +364,7 @@ private
end record with Put_Image => Put_Image;
procedure Put_Image
- (S : in out Ada.Strings.Text_Output.Sink'Class; V : Set);
+ (S : in out Ada.Strings.Text_Buffers.Root_Buffer_Type'Class; V : Set);
overriding procedure Adjust (Container : in out Set);
diff --git a/gcc/ada/libgnat/a-coboho.adb b/gcc/ada/libgnat/a-coboho.adb
index ae167e3..32346d0 100644
--- a/gcc/ada/libgnat/a-coboho.adb
+++ b/gcc/ada/libgnat/a-coboho.adb
@@ -70,7 +70,7 @@ package body Ada.Containers.Bounded_Holders is
---------------
procedure Put_Image
- (S : in out Ada.Strings.Text_Output.Sink'Class; V : Holder)
+ (S : in out Ada.Strings.Text_Buffers.Root_Buffer_Type'Class; V : Holder)
is
use System.Put_Images;
begin
diff --git a/gcc/ada/libgnat/a-coboho.ads b/gcc/ada/libgnat/a-coboho.ads
index 134e58f..9dd73ba 100644
--- a/gcc/ada/libgnat/a-coboho.ads
+++ b/gcc/ada/libgnat/a-coboho.ads
@@ -30,7 +30,7 @@
------------------------------------------------------------------------------
private with System;
-private with Ada.Strings.Text_Output;
+private with Ada.Strings.Text_Buffers;
generic
type Element_Type (<>) is private;
@@ -100,7 +100,7 @@ private
-- (default) alignment instead.
procedure Put_Image
- (S : in out Ada.Strings.Text_Output.Sink'Class; V : Holder);
+ (S : in out Ada.Strings.Text_Buffers.Root_Buffer_Type'Class; V : Holder);
type Element_Access is access all Element_Type;
pragma Assert (Element_Access'Size = Standard'Address_Size,
diff --git a/gcc/ada/libgnat/a-cobove.adb b/gcc/ada/libgnat/a-cobove.adb
index 5e61ba9..f32afa1 100644
--- a/gcc/ada/libgnat/a-cobove.adb
+++ b/gcc/ada/libgnat/a-cobove.adb
@@ -2140,7 +2140,7 @@ package body Ada.Containers.Bounded_Vectors is
---------------
procedure Put_Image
- (S : in out Ada.Strings.Text_Output.Sink'Class; V : Vector)
+ (S : in out Ada.Strings.Text_Buffers.Root_Buffer_Type'Class; V : Vector)
is
First_Time : Boolean := True;
use System.Put_Images;
diff --git a/gcc/ada/libgnat/a-cobove.ads b/gcc/ada/libgnat/a-cobove.ads
index eb8072d..67c4419 100644
--- a/gcc/ada/libgnat/a-cobove.ads
+++ b/gcc/ada/libgnat/a-cobove.ads
@@ -36,7 +36,7 @@ with Ada.Iterator_Interfaces;
with Ada.Containers.Helpers;
private with Ada.Streams;
private with Ada.Finalization;
-private with Ada.Strings.Text_Output;
+private with Ada.Strings.Text_Buffers;
generic
type Index_Type is range <>;
@@ -433,7 +433,7 @@ private
end record with Put_Image => Put_Image;
procedure Put_Image
- (S : in out Ada.Strings.Text_Output.Sink'Class; V : Vector);
+ (S : in out Ada.Strings.Text_Buffers.Root_Buffer_Type'Class; V : Vector);
procedure Write
(Stream : not null access Root_Stream_Type'Class;
diff --git a/gcc/ada/libgnat/a-cohama.adb b/gcc/ada/libgnat/a-cohama.adb
index affeda3..26bdd55 100644
--- a/gcc/ada/libgnat/a-cohama.adb
+++ b/gcc/ada/libgnat/a-cohama.adb
@@ -892,7 +892,7 @@ is
---------------
procedure Put_Image
- (S : in out Ada.Strings.Text_Output.Sink'Class; V : Map)
+ (S : in out Ada.Strings.Text_Buffers.Root_Buffer_Type'Class; V : Map)
is
First_Time : Boolean := True;
use System.Put_Images;
diff --git a/gcc/ada/libgnat/a-cohama.ads b/gcc/ada/libgnat/a-cohama.ads
index 0ae3298..a04cb3a 100644
--- a/gcc/ada/libgnat/a-cohama.ads
+++ b/gcc/ada/libgnat/a-cohama.ads
@@ -36,7 +36,7 @@ with Ada.Iterator_Interfaces;
private with Ada.Containers.Hash_Tables;
private with Ada.Finalization;
private with Ada.Streams;
-private with Ada.Strings.Text_Output;
+private with Ada.Strings.Text_Buffers;
-- The language-defined generic package Containers.Hashed_Maps provides
-- private types Map and Cursor, and a set of operations for each type. A map
@@ -431,7 +431,7 @@ private
end record with Put_Image => Put_Image;
procedure Put_Image
- (S : in out Ada.Strings.Text_Output.Sink'Class; V : Map);
+ (S : in out Ada.Strings.Text_Buffers.Root_Buffer_Type'Class; V : Map);
overriding procedure Adjust (Container : in out Map);
diff --git a/gcc/ada/libgnat/a-cohase.adb b/gcc/ada/libgnat/a-cohase.adb
index 8a55fc3..31374f6 100644
--- a/gcc/ada/libgnat/a-cohase.adb
+++ b/gcc/ada/libgnat/a-cohase.adb
@@ -1170,7 +1170,7 @@ is
---------------
procedure Put_Image
- (S : in out Ada.Strings.Text_Output.Sink'Class; V : Set)
+ (S : in out Ada.Strings.Text_Buffers.Root_Buffer_Type'Class; V : Set)
is
First_Time : Boolean := True;
use System.Put_Images;
diff --git a/gcc/ada/libgnat/a-cohase.ads b/gcc/ada/libgnat/a-cohase.ads
index 0602f5d..f0763af 100644
--- a/gcc/ada/libgnat/a-cohase.ads
+++ b/gcc/ada/libgnat/a-cohase.ads
@@ -37,7 +37,7 @@ private with Ada.Containers.Hash_Tables;
with Ada.Containers.Helpers;
private with Ada.Finalization;
private with Ada.Streams;
-private with Ada.Strings.Text_Output;
+private with Ada.Strings.Text_Buffers;
generic
type Element_Type is private;
@@ -510,7 +510,7 @@ private
end record with Put_Image => Put_Image;
procedure Put_Image
- (S : in out Ada.Strings.Text_Output.Sink'Class; V : Set);
+ (S : in out Ada.Strings.Text_Buffers.Root_Buffer_Type'Class; V : Set);
overriding procedure Adjust (Container : in out Set);
diff --git a/gcc/ada/libgnat/a-coinho.adb b/gcc/ada/libgnat/a-coinho.adb
index dfaf619..ca6882a 100644
--- a/gcc/ada/libgnat/a-coinho.adb
+++ b/gcc/ada/libgnat/a-coinho.adb
@@ -235,7 +235,7 @@ package body Ada.Containers.Indefinite_Holders is
---------------
procedure Put_Image
- (S : in out Ada.Strings.Text_Output.Sink'Class; V : Holder)
+ (S : in out Ada.Strings.Text_Buffers.Root_Buffer_Type'Class; V : Holder)
is
use System.Put_Images;
begin
diff --git a/gcc/ada/libgnat/a-coinho.ads b/gcc/ada/libgnat/a-coinho.ads
index 3b73db2..b648836 100644
--- a/gcc/ada/libgnat/a-coinho.ads
+++ b/gcc/ada/libgnat/a-coinho.ads
@@ -31,7 +31,7 @@
private with Ada.Finalization;
private with Ada.Streams;
-private with Ada.Strings.Text_Output;
+private with Ada.Strings.Text_Buffers;
generic
type Element_Type (<>) is private;
@@ -119,7 +119,7 @@ private
end record with Put_Image => Put_Image;
procedure Put_Image
- (S : in out Ada.Strings.Text_Output.Sink'Class; V : Holder);
+ (S : in out Ada.Strings.Text_Buffers.Root_Buffer_Type'Class; V : Holder);
for Holder'Read use Read;
for Holder'Write use Write;
diff --git a/gcc/ada/libgnat/a-coinho__shared.adb b/gcc/ada/libgnat/a-coinho__shared.adb
index cac6e6d..0340af0 100644
--- a/gcc/ada/libgnat/a-coinho__shared.adb
+++ b/gcc/ada/libgnat/a-coinho__shared.adb
@@ -325,7 +325,7 @@ package body Ada.Containers.Indefinite_Holders is
---------------
procedure Put_Image
- (S : in out Ada.Strings.Text_Output.Sink'Class; V : Holder)
+ (S : in out Ada.Strings.Text_Buffers.Root_Buffer_Type'Class; V : Holder)
is
use System.Put_Images;
begin
diff --git a/gcc/ada/libgnat/a-coinho__shared.ads b/gcc/ada/libgnat/a-coinho__shared.ads
index bb3129b..97f796d 100644
--- a/gcc/ada/libgnat/a-coinho__shared.ads
+++ b/gcc/ada/libgnat/a-coinho__shared.ads
@@ -36,7 +36,7 @@ private with Ada.Finalization;
private with Ada.Streams;
private with System.Atomic_Counters;
-private with Ada.Strings.Text_Output;
+private with Ada.Strings.Text_Buffers;
generic
type Element_Type (<>) is private;
@@ -134,7 +134,7 @@ private
end record with Put_Image => Put_Image;
procedure Put_Image
- (S : in out Ada.Strings.Text_Output.Sink'Class; V : Holder);
+ (S : in out Ada.Strings.Text_Buffers.Root_Buffer_Type'Class; V : Holder);
for Holder'Read use Read;
for Holder'Write use Write;
diff --git a/gcc/ada/libgnat/a-coinve.adb b/gcc/ada/libgnat/a-coinve.adb
index aa5ca5e..9df6e3d 100644
--- a/gcc/ada/libgnat/a-coinve.adb
+++ b/gcc/ada/libgnat/a-coinve.adb
@@ -2670,7 +2670,7 @@ is
---------------
procedure Put_Image
- (S : in out Ada.Strings.Text_Output.Sink'Class; V : Vector)
+ (S : in out Ada.Strings.Text_Buffers.Root_Buffer_Type'Class; V : Vector)
is
First_Time : Boolean := True;
use System.Put_Images;
diff --git a/gcc/ada/libgnat/a-coinve.ads b/gcc/ada/libgnat/a-coinve.ads
index c139f7a..828ed29 100644
--- a/gcc/ada/libgnat/a-coinve.ads
+++ b/gcc/ada/libgnat/a-coinve.ads
@@ -36,7 +36,7 @@ with Ada.Iterator_Interfaces;
with Ada.Containers.Helpers;
private with Ada.Finalization;
private with Ada.Streams;
-private with Ada.Strings.Text_Output;
+private with Ada.Strings.Text_Buffers;
generic
type Index_Type is range <>;
@@ -428,7 +428,7 @@ private
end record with Put_Image => Put_Image;
procedure Put_Image
- (S : in out Ada.Strings.Text_Output.Sink'Class; V : Vector);
+ (S : in out Ada.Strings.Text_Buffers.Root_Buffer_Type'Class; V : Vector);
overriding procedure Adjust (Container : in out Vector);
overriding procedure Finalize (Container : in out Vector);
diff --git a/gcc/ada/libgnat/a-comutr.adb b/gcc/ada/libgnat/a-comutr.adb
index e1b3ef6..617d248 100644
--- a/gcc/ada/libgnat/a-comutr.adb
+++ b/gcc/ada/libgnat/a-comutr.adb
@@ -1864,7 +1864,7 @@ is
---------------
procedure Put_Image
- (S : in out Ada.Strings.Text_Output.Sink'Class; V : Tree)
+ (S : in out Ada.Strings.Text_Buffers.Root_Buffer_Type'Class; V : Tree)
is
use System.Put_Images;
diff --git a/gcc/ada/libgnat/a-comutr.ads b/gcc/ada/libgnat/a-comutr.ads
index a6a534d..8e88b14 100644
--- a/gcc/ada/libgnat/a-comutr.ads
+++ b/gcc/ada/libgnat/a-comutr.ads
@@ -36,7 +36,7 @@ with Ada.Iterator_Interfaces;
with Ada.Containers.Helpers;
private with Ada.Finalization;
private with Ada.Streams;
-private with Ada.Strings.Text_Output;
+private with Ada.Strings.Text_Buffers;
generic
type Element_Type is private;
@@ -404,7 +404,7 @@ private
end record with Put_Image => Put_Image;
procedure Put_Image
- (S : in out Ada.Strings.Text_Output.Sink'Class; V : Tree);
+ (S : in out Ada.Strings.Text_Buffers.Root_Buffer_Type'Class; V : Tree);
overriding procedure Adjust (Container : in out Tree);
diff --git a/gcc/ada/libgnat/a-convec.adb b/gcc/ada/libgnat/a-convec.adb
index f9d2c46..5cede72 100644
--- a/gcc/ada/libgnat/a-convec.adb
+++ b/gcc/ada/libgnat/a-convec.adb
@@ -2345,7 +2345,7 @@ is
---------------
procedure Put_Image
- (S : in out Ada.Strings.Text_Output.Sink'Class; V : Vector)
+ (S : in out Ada.Strings.Text_Buffers.Root_Buffer_Type'Class; V : Vector)
is
First_Time : Boolean := True;
use System.Put_Images;
diff --git a/gcc/ada/libgnat/a-convec.ads b/gcc/ada/libgnat/a-convec.ads
index 53dc671..41eafbc 100644
--- a/gcc/ada/libgnat/a-convec.ads
+++ b/gcc/ada/libgnat/a-convec.ads
@@ -36,7 +36,7 @@ with Ada.Iterator_Interfaces;
with Ada.Containers.Helpers;
private with Ada.Finalization;
private with Ada.Streams;
-private with Ada.Strings.Text_Output;
+private with Ada.Strings.Text_Buffers;
-- The language-defined generic package Containers.Vectors provides private
-- types Vector and Cursor, and a set of operations for each type. A vector
@@ -745,7 +745,7 @@ private
end record with Put_Image => Put_Image;
procedure Put_Image
- (S : in out Ada.Strings.Text_Output.Sink'Class; V : Vector);
+ (S : in out Ada.Strings.Text_Buffers.Root_Buffer_Type'Class; V : Vector);
overriding procedure Adjust (Container : in out Vector);
overriding procedure Finalize (Container : in out Vector);
diff --git a/gcc/ada/libgnat/a-coorma.adb b/gcc/ada/libgnat/a-coorma.adb
index afc36b8..65adf4c 100644
--- a/gcc/ada/libgnat/a-coorma.adb
+++ b/gcc/ada/libgnat/a-coorma.adb
@@ -1220,7 +1220,7 @@ is
---------------
procedure Put_Image
- (S : in out Ada.Strings.Text_Output.Sink'Class; V : Map)
+ (S : in out Ada.Strings.Text_Buffers.Root_Buffer_Type'Class; V : Map)
is
First_Time : Boolean := True;
use System.Put_Images;
diff --git a/gcc/ada/libgnat/a-coorma.ads b/gcc/ada/libgnat/a-coorma.ads
index 5740621..5de65c1 100644
--- a/gcc/ada/libgnat/a-coorma.ads
+++ b/gcc/ada/libgnat/a-coorma.ads
@@ -36,7 +36,7 @@ with Ada.Iterator_Interfaces;
private with Ada.Containers.Red_Black_Trees;
private with Ada.Finalization;
private with Ada.Streams;
-private with Ada.Strings.Text_Output;
+private with Ada.Strings.Text_Buffers;
generic
type Key_Type is private;
@@ -267,7 +267,7 @@ private
end record with Put_Image => Put_Image;
procedure Put_Image
- (S : in out Ada.Strings.Text_Output.Sink'Class; V : Map);
+ (S : in out Ada.Strings.Text_Buffers.Root_Buffer_Type'Class; V : Map);
overriding procedure Adjust (Container : in out Map);
diff --git a/gcc/ada/libgnat/a-coormu.adb b/gcc/ada/libgnat/a-coormu.adb
index e269eb4..9b11d29 100644
--- a/gcc/ada/libgnat/a-coormu.adb
+++ b/gcc/ada/libgnat/a-coormu.adb
@@ -1571,7 +1571,7 @@ is
---------------
procedure Put_Image
- (S : in out Ada.Strings.Text_Output.Sink'Class; V : Set)
+ (S : in out Ada.Strings.Text_Buffers.Root_Buffer_Type'Class; V : Set)
is
First_Time : Boolean := True;
use System.Put_Images;
diff --git a/gcc/ada/libgnat/a-coormu.ads b/gcc/ada/libgnat/a-coormu.ads
index 423270f..51b94eb 100644
--- a/gcc/ada/libgnat/a-coormu.ads
+++ b/gcc/ada/libgnat/a-coormu.ads
@@ -34,7 +34,7 @@
private with Ada.Containers.Red_Black_Trees;
private with Ada.Finalization;
private with Ada.Streams;
-private with Ada.Strings.Text_Output;
+private with Ada.Strings.Text_Buffers;
with Ada.Iterator_Interfaces;
generic
@@ -476,7 +476,7 @@ private
end record with Put_Image => Put_Image;
procedure Put_Image
- (S : in out Ada.Strings.Text_Output.Sink'Class; V : Set);
+ (S : in out Ada.Strings.Text_Buffers.Root_Buffer_Type'Class; V : Set);
overriding procedure Adjust (Container : in out Set);
diff --git a/gcc/ada/libgnat/a-coorse.adb b/gcc/ada/libgnat/a-coorse.adb
index 8c03e89..ca8f238 100644
--- a/gcc/ada/libgnat/a-coorse.adb
+++ b/gcc/ada/libgnat/a-coorse.adb
@@ -1586,7 +1586,7 @@ is
---------------
procedure Put_Image
- (S : in out Ada.Strings.Text_Output.Sink'Class; V : Set)
+ (S : in out Ada.Strings.Text_Buffers.Root_Buffer_Type'Class; V : Set)
is
First_Time : Boolean := True;
use System.Put_Images;
diff --git a/gcc/ada/libgnat/a-coorse.ads b/gcc/ada/libgnat/a-coorse.ads
index 29a7322..6d24e03 100644
--- a/gcc/ada/libgnat/a-coorse.ads
+++ b/gcc/ada/libgnat/a-coorse.ads
@@ -37,7 +37,7 @@ with Ada.Containers.Helpers;
private with Ada.Containers.Red_Black_Trees;
private with Ada.Finalization;
private with Ada.Streams;
-private with Ada.Strings.Text_Output;
+private with Ada.Strings.Text_Buffers;
generic
type Element_Type is private;
@@ -347,7 +347,7 @@ private
end record with Put_Image => Put_Image;
procedure Put_Image
- (S : in out Ada.Strings.Text_Output.Sink'Class; V : Set);
+ (S : in out Ada.Strings.Text_Buffers.Root_Buffer_Type'Class; V : Set);
overriding procedure Adjust (Container : in out Set);
diff --git a/gcc/ada/libgnat/a-nbnbin.adb b/gcc/ada/libgnat/a-nbnbin.adb
index 0551943..fe41cf1 100644
--- a/gcc/ada/libgnat/a-nbnbin.adb
+++ b/gcc/ada/libgnat/a-nbnbin.adb
@@ -30,7 +30,6 @@
------------------------------------------------------------------------------
with Ada.Unchecked_Deallocation;
-with Ada.Strings.Text_Output.Utils;
with Interfaces; use Interfaces;
@@ -432,12 +431,12 @@ package body Ada.Numerics.Big_Numbers.Big_Integers is
-- Put_Image --
---------------
- procedure Put_Image (S : in out Sink'Class; V : Big_Integer) is
+ procedure Put_Image (S : in out Root_Buffer_Type'Class; V : Big_Integer) is
-- This is implemented in terms of To_String. It might be more elegant
-- and more efficient to do it the other way around, but this is the
-- most expedient implementation for now.
begin
- Strings.Text_Output.Utils.Put_UTF_8 (S, To_String (V));
+ Strings.Text_Buffers.Put_UTF_8 (S, To_String (V));
end Put_Image;
---------
diff --git a/gcc/ada/libgnat/a-nbnbin.ads b/gcc/ada/libgnat/a-nbnbin.ads
index 31a8bc9..1ba10da 100644
--- a/gcc/ada/libgnat/a-nbnbin.ads
+++ b/gcc/ada/libgnat/a-nbnbin.ads
@@ -13,7 +13,7 @@
-- --
------------------------------------------------------------------------------
-with Ada.Strings.Text_Output; use Ada.Strings.Text_Output;
+with Ada.Strings.Text_Buffers; use Ada.Strings.Text_Buffers;
private with Ada.Finalization;
private with System;
@@ -119,7 +119,7 @@ is
function From_Universal_Image (Arg : String) return Valid_Big_Integer
renames From_String;
- procedure Put_Image (S : in out Sink'Class; V : Big_Integer);
+ procedure Put_Image (S : in out Root_Buffer_Type'Class; V : Big_Integer);
function "+" (L : Valid_Big_Integer) return Valid_Big_Integer
with Global => null;
diff --git a/gcc/ada/libgnat/a-nbnbin__gmp.adb b/gcc/ada/libgnat/a-nbnbin__gmp.adb
index 98d7d93..880e9a3 100644
--- a/gcc/ada/libgnat/a-nbnbin__gmp.adb
+++ b/gcc/ada/libgnat/a-nbnbin__gmp.adb
@@ -35,7 +35,6 @@ with Ada.Unchecked_Conversion;
with Ada.Unchecked_Deallocation;
with Interfaces.C; use Interfaces.C;
with Interfaces.C.Strings; use Interfaces.C.Strings;
-with Ada.Strings.Text_Output.Utils;
with Ada.Characters.Handling; use Ada.Characters.Handling;
package body Ada.Numerics.Big_Numbers.Big_Integers is
@@ -403,12 +402,12 @@ package body Ada.Numerics.Big_Numbers.Big_Integers is
-- Put_Image --
---------------
- procedure Put_Image (S : in out Sink'Class; V : Big_Integer) is
+ procedure Put_Image (S : in out Root_Buffer_Type'Class; V : Big_Integer) is
-- This is implemented in terms of To_String. It might be more elegant
-- and more efficient to do it the other way around, but this is the
-- most expedient implementation for now.
begin
- Strings.Text_Output.Utils.Put_UTF_8 (S, To_String (V));
+ Strings.Text_Buffers.Put_UTF_8 (S, To_String (V));
end Put_Image;
---------
diff --git a/gcc/ada/libgnat/a-nbnbre.adb b/gcc/ada/libgnat/a-nbnbre.adb
index 794e918..e45bc6d 100644
--- a/gcc/ada/libgnat/a-nbnbre.adb
+++ b/gcc/ada/libgnat/a-nbnbre.adb
@@ -29,7 +29,6 @@
-- --
------------------------------------------------------------------------------
-with Ada.Strings.Text_Output.Utils;
with System.Unsigned_Types; use System.Unsigned_Types;
package body Ada.Numerics.Big_Numbers.Big_Reals is
@@ -619,12 +618,12 @@ package body Ada.Numerics.Big_Numbers.Big_Reals is
-- Put_Image --
---------------
- procedure Put_Image (S : in out Sink'Class; V : Big_Real) is
+ procedure Put_Image (S : in out Root_Buffer_Type'Class; V : Big_Real) is
-- This is implemented in terms of To_String. It might be more elegant
-- and more efficient to do it the other way around, but this is the
-- most expedient implementation for now.
begin
- Strings.Text_Output.Utils.Put_UTF_8 (S, To_String (V));
+ Strings.Text_Buffers.Put_UTF_8 (S, To_String (V));
end Put_Image;
---------
diff --git a/gcc/ada/libgnat/a-nbnbre.ads b/gcc/ada/libgnat/a-nbnbre.ads
index eb7c8a7..4118d2b 100644
--- a/gcc/ada/libgnat/a-nbnbre.ads
+++ b/gcc/ada/libgnat/a-nbnbre.ads
@@ -15,7 +15,7 @@
with Ada.Numerics.Big_Numbers.Big_Integers;
-with Ada.Strings.Text_Output; use Ada.Strings.Text_Output;
+with Ada.Strings.Text_Buffers; use Ada.Strings.Text_Buffers;
package Ada.Numerics.Big_Numbers.Big_Reals
with Preelaborate
@@ -138,7 +138,7 @@ is
function From_Quotient_String (Arg : String) return Valid_Big_Real
with Global => null;
- procedure Put_Image (S : in out Sink'Class; V : Big_Real);
+ procedure Put_Image (S : in out Root_Buffer_Type'Class; V : Big_Real);
function "+" (L : Valid_Big_Real) return Valid_Big_Real
with Global => null;
diff --git a/gcc/ada/libgnat/a-stbubo.adb b/gcc/ada/libgnat/a-stbubo.adb
new file mode 100644
index 0000000..a3e0e32
--- /dev/null
+++ b/gcc/ada/libgnat/a-stbubo.adb
@@ -0,0 +1,147 @@
+------------------------------------------------------------------------------
+-- --
+-- GNAT RUN-TIME COMPONENTS --
+-- --
+-- ADA.STRINGS.TEXT_BUFFERS.BOUNDED --
+-- --
+-- B o d y --
+-- --
+-- Copyright (C) 2020-2021, Free Software Foundation, Inc. --
+-- --
+-- GNAT is free software; you can redistribute it and/or modify it under --
+-- terms of the GNU General Public License as published by the Free Soft- --
+-- ware Foundation; either version 3, or (at your option) any later ver- --
+-- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
+-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
+-- or FITNESS FOR A PARTICULAR PURPOSE. --
+-- --
+-- As a special exception under Section 7 of GPL version 3, you are granted --
+-- additional permissions described in the GCC Runtime Library Exception, --
+-- version 3.1, as published by the Free Software Foundation. --
+-- --
+-- You should have received a copy of the GNU General Public License and --
+-- a copy of the GCC Runtime Library Exception along with this program; --
+-- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see --
+-- <http://www.gnu.org/licenses/>. --
+-- --
+-- GNAT was originally developed by the GNAT team at New York University. --
+-- Extensive contributions were provided by Ada Core Technologies Inc. --
+-- --
+------------------------------------------------------------------------------
+
+with Ada.Strings.UTF_Encoding.Conversions;
+with Ada.Strings.UTF_Encoding.Strings;
+with Ada.Strings.UTF_Encoding.Wide_Strings;
+with Ada.Strings.UTF_Encoding.Wide_Wide_Strings;
+package body Ada.Strings.Text_Buffers.Bounded is
+
+ -- Pretty much the same as the Unbounded version, except where different.
+ --
+ -- One could imagine inventing an Input_Mapping generic analogous to
+ -- the existing Output_Mapping generic to address the Get-related
+ -- Bounded/Unbounded code duplication issues, but let's not. In the
+ -- Output case, there was more substantial duplication and there were
+ -- 3 clients (Bounded, Unbounded, and Files) instead of 2.
+
+ function Text_Truncated (Buffer : Buffer_Type) return Boolean is
+ (Buffer.Truncated);
+
+ function Get (Buffer : in out Buffer_Type) return String is
+ -- If all characters are 7 bits, we don't need to decode;
+ -- this is an optimization.
+ -- Otherwise, if all are 8 bits, we need to decode to get Latin-1.
+ -- Otherwise, the result is implementation defined, so we return a
+ -- String encoded as UTF-8. Note that the RM says "if any character
+ -- in the sequence is not defined in Character, the result is
+ -- implementation-defined", so we are not obliged to decode ANY
+ -- Latin-1 characters if ANY character is bigger than 8 bits.
+ begin
+ if Buffer.All_8_Bits and not Buffer.All_7_Bits then
+ return UTF_Encoding.Strings.Decode (Get_UTF_8 (Buffer));
+ else
+ return Get_UTF_8 (Buffer);
+ end if;
+ end Get;
+
+ function Wide_Get (Buffer : in out Buffer_Type) return Wide_String is
+ begin
+ return UTF_Encoding.Wide_Strings.Decode (Get_UTF_8 (Buffer));
+ end Wide_Get;
+
+ function Wide_Wide_Get (Buffer : in out Buffer_Type) return Wide_Wide_String
+ is
+ begin
+ return UTF_Encoding.Wide_Wide_Strings.Decode (Get_UTF_8 (Buffer));
+ end Wide_Wide_Get;
+
+ function Get_UTF_8
+ (Buffer : in out Buffer_Type) return UTF_Encoding.UTF_8_String
+ is
+ begin
+ return
+ Result : constant UTF_Encoding.UTF_8_String :=
+ UTF_Encoding.UTF_8_String
+ (Buffer.Chars (1 .. Text_Buffer_Count (Buffer.UTF_8_Length)))
+ do
+ -- Reset buffer to default initial value.
+ declare
+ Defaulted : Buffer_Type (0);
+
+ -- If this aggregate becomes illegal due to new field, don't
+ -- forget to add corresponding assignment statement below.
+ Dummy : array (1 .. 0) of Buffer_Type (0) :=
+ (others =>
+ (Max_Characters => 0, Chars => <>, Indentation => <>,
+ Indent_Pending => <>, UTF_8_Length => <>, UTF_8_Column => <>,
+ All_7_Bits => <>, All_8_Bits => <>, Truncated => <>));
+ begin
+ Buffer.Indentation := Defaulted.Indentation;
+ Buffer.Indent_Pending := Defaulted.Indent_Pending;
+ Buffer.UTF_8_Length := Defaulted.UTF_8_Length;
+ Buffer.UTF_8_Column := Defaulted.UTF_8_Column;
+ Buffer.All_7_Bits := Defaulted.All_7_Bits;
+ Buffer.All_8_Bits := Defaulted.All_8_Bits;
+ Buffer.Truncated := Defaulted.Truncated;
+ end;
+ end return;
+ end Get_UTF_8;
+
+ function Wide_Get_UTF_16
+ (Buffer : in out Buffer_Type) return UTF_Encoding.UTF_16_Wide_String
+ is
+ begin
+ return
+ UTF_Encoding.Conversions.Convert
+ (Get_UTF_8 (Buffer), Input_Scheme => UTF_Encoding.UTF_8);
+ end Wide_Get_UTF_16;
+
+ procedure Put_UTF_8_Implementation
+ (Buffer : in out Root_Buffer_Type'Class;
+ Item : UTF_Encoding.UTF_8_String)
+ is
+ procedure Buffer_Type_Implementation (Buffer : in out Buffer_Type);
+ -- View the passed-in Buffer parameter as being of type Buffer_Type,
+ -- not of Root_Buffer_Type'Class.
+
+ procedure Buffer_Type_Implementation (Buffer : in out Buffer_Type) is
+ begin
+ for Char of Item loop
+ if Buffer.UTF_8_Length = Integer (Buffer.Max_Characters) then
+ Buffer.Truncated := True;
+ return;
+ end if;
+
+ Buffer.All_7_Bits := @ and then Character'Pos (Char) < 128;
+
+ Buffer.UTF_8_Length := @ + 1;
+ Buffer.UTF_8_Column := @ + 1;
+ Buffer.Chars (Text_Buffer_Count (Buffer.UTF_8_Length)) := Char;
+ end loop;
+ end Buffer_Type_Implementation;
+ begin
+ if Item'Length > 0 then
+ Buffer_Type_Implementation (Buffer_Type (Buffer));
+ end if;
+ end Put_UTF_8_Implementation;
+
+end Ada.Strings.Text_Buffers.Bounded;
diff --git a/gcc/ada/libgnat/a-stbubo.ads b/gcc/ada/libgnat/a-stbubo.ads
new file mode 100644
index 0000000..aef7ccf
--- /dev/null
+++ b/gcc/ada/libgnat/a-stbubo.ads
@@ -0,0 +1,73 @@
+------------------------------------------------------------------------------
+-- --
+-- GNAT RUN-TIME COMPONENTS --
+-- --
+-- ADA.STRINGS.TEXT_BUFFERS.BOUNDED --
+-- --
+-- S p e c --
+-- --
+-- Copyright (C) 2020-2021, Free Software Foundation, Inc. --
+-- --
+-- This specification is derived from the Ada Reference Manual for use with --
+-- GNAT. In accordance with the copyright of that document, you can freely --
+-- copy and modify this specification, provided that if you redistribute a --
+-- modified version, any changes that you have made are clearly indicated. --
+-- --
+------------------------------------------------------------------------------
+
+package Ada.Strings.Text_Buffers.Bounded with
+ Pure
+is
+
+ type Buffer_Type (Max_Characters : Text_Buffer_Count) is
+ new Root_Buffer_Type with private with
+ Default_Initial_Condition => not Text_Truncated (Buffer_Type);
+
+ function Text_Truncated (Buffer : Buffer_Type) return Boolean;
+
+ function Get (Buffer : in out Buffer_Type) return String with
+ Post'Class => Get'Result'First = 1 and then Current_Indent (Buffer) = 0;
+
+ function Wide_Get (Buffer : in out Buffer_Type) return Wide_String with
+ Post'Class => Wide_Get'Result'First = 1
+ and then Current_Indent (Buffer) = 0;
+
+ function Wide_Wide_Get
+ (Buffer : in out Buffer_Type) return Wide_Wide_String with
+ Post'Class => Wide_Wide_Get'Result'First = 1
+ and then Current_Indent (Buffer) = 0;
+
+ function Get_UTF_8
+ (Buffer : in out Buffer_Type) return UTF_Encoding.UTF_8_String with
+ Post'Class => Get_UTF_8'Result'First = 1
+ and then Current_Indent (Buffer) = 0;
+
+ function Wide_Get_UTF_16
+ (Buffer : in out Buffer_Type) return UTF_Encoding.UTF_16_Wide_String with
+ Post'Class => Wide_Get_UTF_16'Result'First = 1
+ and then Current_Indent (Buffer) = 0;
+
+private
+
+ procedure Put_UTF_8_Implementation
+ (Buffer : in out Root_Buffer_Type'Class;
+ Item : UTF_Encoding.UTF_8_String)
+ with Pre => Buffer in Buffer_Type'Class;
+
+ package Mapping is new Output_Mapping (Put_UTF_8_Implementation);
+
+ subtype Positive_Text_Buffer_Count is
+ Text_Buffer_Count range 1 .. Text_Buffer_Count'Last;
+
+ type Convertible_To_UTF_8_String is
+ array (Positive_Text_Buffer_Count range <>) of Character;
+
+ type Buffer_Type (Max_Characters : Text_Buffer_Count)
+ is new Mapping.Buffer_Type with record
+ Truncated : Boolean := False;
+ -- True if we ran out of space on a Put
+
+ Chars : Convertible_To_UTF_8_String (1 .. Max_Characters);
+ end record;
+
+end Ada.Strings.Text_Buffers.Bounded;
diff --git a/gcc/ada/libgnat/a-stbufi.adb b/gcc/ada/libgnat/a-stbufi.adb
new file mode 100644
index 0000000..0a8feab
--- /dev/null
+++ b/gcc/ada/libgnat/a-stbufi.adb
@@ -0,0 +1,82 @@
+------------------------------------------------------------------------------
+-- --
+-- GNAT RUN-TIME COMPONENTS --
+-- --
+-- ADA.STRINGS.TEXT_BUFFERS.FILES --
+-- --
+-- B o d y --
+-- --
+-- Copyright (C) 2020-2021, Free Software Foundation, Inc. --
+-- --
+-- GNAT is free software; you can redistribute it and/or modify it under --
+-- terms of the GNU General Public License as published by the Free Soft- --
+-- ware Foundation; either version 3, or (at your option) any later ver- --
+-- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
+-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
+-- or FITNESS FOR A PARTICULAR PURPOSE. --
+-- --
+-- As a special exception under Section 7 of GPL version 3, you are granted --
+-- additional permissions described in the GCC Runtime Library Exception, --
+-- version 3.1, as published by the Free Software Foundation. --
+-- --
+-- You should have received a copy of the GNU General Public License and --
+-- a copy of the GCC Runtime Library Exception along with this program; --
+-- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see --
+-- <http://www.gnu.org/licenses/>. --
+-- --
+-- GNAT was originally developed by the GNAT team at New York University. --
+-- Extensive contributions were provided by Ada Core Technologies Inc. --
+-- --
+------------------------------------------------------------------------------
+
+package body Ada.Strings.Text_Buffers.Files is
+
+ procedure Put_UTF_8_Implementation
+ (Buffer : in out Root_Buffer_Type'Class;
+ Item : UTF_Encoding.UTF_8_String) is
+ Result : Integer;
+ begin
+ Result := OS.Write (File_Buffer (Buffer).FD,
+ Item (Item'First)'Address,
+ Item'Length);
+ if Result /= Item'Length then
+ raise Program_Error with OS.Errno_Message;
+ end if;
+ end Put_UTF_8_Implementation;
+
+ function Create_From_FD
+ (FD : GNAT.OS_Lib.File_Descriptor;
+ Close_Upon_Finalization : Boolean := True) return File_Buffer
+ is
+ use OS;
+ begin
+ if FD = Invalid_FD then
+ raise Program_Error with OS.Errno_Message;
+ end if;
+ return Result : File_Buffer do
+ Result.FD := FD;
+ Result.Close_Upon_Finalization := Close_Upon_Finalization;
+ end return;
+ end Create_From_FD;
+
+ function Create_File (Name : String) return File_Buffer is
+ begin
+ return Create_From_FD (OS.Create_File (Name, Fmode => OS.Binary));
+ end Create_File;
+
+ procedure Finalize (Ref : in out Self_Ref) is
+ Success : Boolean;
+ use OS;
+ begin
+ if Ref.Self.FD /= OS.Invalid_FD
+ and then Ref.Self.Close_Upon_Finalization
+ then
+ Close (Ref.Self.FD, Success);
+ if not Success then
+ raise Program_Error with OS.Errno_Message;
+ end if;
+ end if;
+ Ref.Self.FD := OS.Invalid_FD;
+ end Finalize;
+
+end Ada.Strings.Text_Buffers.Files;
diff --git a/gcc/ada/libgnat/a-stbufi.ads b/gcc/ada/libgnat/a-stbufi.ads
new file mode 100644
index 0000000..2a2db90
--- /dev/null
+++ b/gcc/ada/libgnat/a-stbufi.ads
@@ -0,0 +1,75 @@
+------------------------------------------------------------------------------
+-- --
+-- GNAT RUN-TIME COMPONENTS --
+-- --
+-- ADA.STRINGS.TEXT_BUFFERS.FILES --
+-- --
+-- S p e c --
+-- --
+-- Copyright (C) 2020-2021, Free Software Foundation, Inc. --
+-- --
+-- GNAT is free software; you can redistribute it and/or modify it under --
+-- terms of the GNU General Public License as published by the Free Soft- --
+-- ware Foundation; either version 3, or (at your option) any later ver- --
+-- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
+-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
+-- or FITNESS FOR A PARTICULAR PURPOSE. --
+-- --
+-- As a special exception under Section 7 of GPL version 3, you are granted --
+-- additional permissions described in the GCC Runtime Library Exception, --
+-- version 3.1, as published by the Free Software Foundation. --
+-- --
+-- You should have received a copy of the GNU General Public License and --
+-- a copy of the GCC Runtime Library Exception along with this program; --
+-- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see --
+-- <http://www.gnu.org/licenses/>. --
+-- --
+-- GNAT was originally developed by the GNAT team at New York University. --
+-- Extensive contributions were provided by Ada Core Technologies Inc. --
+-- --
+------------------------------------------------------------------------------
+
+with Ada.Finalization;
+with GNAT.OS_Lib;
+
+package Ada.Strings.Text_Buffers.Files is
+
+ type File_Buffer is new Root_Buffer_Type with private;
+ -- Output written to a File_Buffer is written to the associated file.
+
+ function Create_From_FD
+ (FD : GNAT.OS_Lib.File_Descriptor;
+ Close_Upon_Finalization : Boolean := True)
+ return File_Buffer;
+ -- file closed upon finalization if specified
+
+ function Create_File (Name : String) return File_Buffer;
+ -- file closed upon finalization
+
+ function Create_Standard_Output_Buffer return File_Buffer is
+ (Create_From_FD (GNAT.OS_Lib.Standout, Close_Upon_Finalization => False));
+ function Create_Standard_Error_Buffer return File_Buffer is
+ (Create_From_FD (GNAT.OS_Lib.Standerr, Close_Upon_Finalization => False));
+
+private
+
+ procedure Put_UTF_8_Implementation
+ (Buffer : in out Root_Buffer_Type'Class;
+ Item : UTF_Encoding.UTF_8_String)
+ with Pre => Buffer in File_Buffer'Class;
+
+ package Mapping is new Output_Mapping (Put_UTF_8_Implementation);
+
+ package OS renames GNAT.OS_Lib;
+
+ type Self_Ref (Self : not null access File_Buffer)
+ is new Finalization.Limited_Controlled with null record;
+ overriding procedure Finalize (Ref : in out Self_Ref);
+
+ type File_Buffer is new Mapping.Buffer_Type with record
+ FD : OS.File_Descriptor := OS.Invalid_FD;
+ Ref : Self_Ref (File_Buffer'Access);
+ Close_Upon_Finalization : Boolean := False;
+ end record;
+
+end Ada.Strings.Text_Buffers.Files;
diff --git a/gcc/ada/libgnat/a-stbufo.adb b/gcc/ada/libgnat/a-stbufo.adb
new file mode 100644
index 0000000..8ac5512
--- /dev/null
+++ b/gcc/ada/libgnat/a-stbufo.adb
@@ -0,0 +1,158 @@
+------------------------------------------------------------------------------
+-- --
+-- GNAT RUN-TIME COMPONENTS --
+-- --
+-- ADA.STRINGS.TEXT_BUFFERS.FORMATTING --
+-- --
+-- B o d y --
+-- --
+-- Copyright (C) 2020-2021, Free Software Foundation, Inc. --
+-- --
+-- GNAT is free software; you can redistribute it and/or modify it under --
+-- terms of the GNU General Public License as published by the Free Soft- --
+-- ware Foundation; either version 3, or (at your option) any later ver- --
+-- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
+-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
+-- or FITNESS FOR A PARTICULAR PURPOSE. --
+-- --
+-- As a special exception under Section 7 of GPL version 3, you are granted --
+-- additional permissions described in the GCC Runtime Library Exception, --
+-- version 3.1, as published by the Free Software Foundation. --
+-- --
+-- You should have received a copy of the GNU General Public License and --
+-- a copy of the GCC Runtime Library Exception along with this program; --
+-- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see --
+-- <http://www.gnu.org/licenses/>. --
+-- --
+-- GNAT was originally developed by the GNAT team at New York University. --
+-- Extensive contributions were provided by Ada Core Technologies Inc. --
+-- --
+------------------------------------------------------------------------------
+
+with Ada.Strings.Text_Buffers.Unbounded;
+with Ada.Strings.Text_Buffers.Files;
+
+package body Ada.Strings.Text_Buffers.Formatting is
+
+ use Ada.Strings.Text_Buffers.Files;
+ use Ada.Strings.Text_Buffers.Utils;
+
+ procedure Put
+ (S : in out Root_Buffer_Type'Class; T : Template;
+ X1, X2, X3, X4, X5, X6, X7, X8, X9 : Utils.UTF_8_Lines := "")
+ is
+ J : Positive := T'First;
+ Used : array (1 .. 9) of Boolean := (others => False);
+ begin
+ while J <= T'Last loop
+ if T (J) = '\' then
+ J := J + 1;
+ case T (J) is
+ when 'n' =>
+ New_Line (S);
+ when '\' =>
+ Put_7bit (S, '\');
+ when 'i' =>
+ Increase_Indent (S);
+ when 'o' =>
+ Decrease_Indent (S);
+ when 'I' =>
+ Increase_Indent (S, 1);
+ when 'O' =>
+ Decrease_Indent (S, 1);
+
+ when '1' =>
+ Used (1) := True;
+ Put_UTF_8_Lines (S, X1);
+ when '2' =>
+ Used (2) := True;
+ Put_UTF_8_Lines (S, X2);
+ when '3' =>
+ Used (3) := True;
+ Put_UTF_8_Lines (S, X3);
+ when '4' =>
+ Used (4) := True;
+ Put_UTF_8_Lines (S, X4);
+ when '5' =>
+ Used (5) := True;
+ Put_UTF_8_Lines (S, X5);
+ when '6' =>
+ Used (6) := True;
+ Put_UTF_8_Lines (S, X6);
+ when '7' =>
+ Used (7) := True;
+ Put_UTF_8_Lines (S, X7);
+ when '8' =>
+ Used (8) := True;
+ Put_UTF_8_Lines (S, X8);
+ when '9' =>
+ Used (9) := True;
+ Put_UTF_8_Lines (S, X9);
+
+ when others =>
+ raise Program_Error;
+ end case;
+ else
+ Put_7bit (S, T (J));
+ end if;
+
+ J := J + 1;
+ end loop;
+
+ if not Used (1) then
+ pragma Assert (X1 = "");
+ end if;
+ if not Used (2) then
+ pragma Assert (X2 = "");
+ end if;
+ if not Used (3) then
+ pragma Assert (X3 = "");
+ end if;
+ if not Used (4) then
+ pragma Assert (X4 = "");
+ end if;
+ if not Used (5) then
+ pragma Assert (X5 = "");
+ end if;
+ if not Used (6) then
+ pragma Assert (X6 = "");
+ end if;
+ if not Used (7) then
+ pragma Assert (X7 = "");
+ end if;
+ if not Used (8) then
+ pragma Assert (X8 = "");
+ end if;
+ if not Used (9) then
+ pragma Assert (X9 = "");
+ end if;
+ end Put;
+
+ function Format
+ (T : Template;
+ X1, X2, X3, X4, X5, X6, X7, X8, X9 : Utils.UTF_8_Lines := "")
+ return Utils.UTF_8_Lines
+ is
+ Buffer : Unbounded.Buffer_Type;
+ begin
+ Put (Buffer, T, X1, X2, X3, X4, X5, X6, X7, X8, X9);
+ return Buffer.Get_UTF_8;
+ end Format;
+
+ procedure Put
+ (T : Template;
+ X1, X2, X3, X4, X5, X6, X7, X8, X9 : Utils.UTF_8_Lines := "") is
+ Buffer : File_Buffer := Create_Standard_Output_Buffer;
+ begin
+ Put (Buffer, T, X1, X2, X3, X4, X5, X6, X7, X8, X9);
+ end Put;
+
+ procedure Err
+ (T : Template;
+ X1, X2, X3, X4, X5, X6, X7, X8, X9 : Utils.UTF_8_Lines := "") is
+ Buffer : File_Buffer := Create_Standard_Error_Buffer;
+ begin
+ Put (Buffer, T, X1, X2, X3, X4, X5, X6, X7, X8, X9);
+ end Err;
+
+end Ada.Strings.Text_Buffers.Formatting;
diff --git a/gcc/ada/libgnat/a-stbufo.ads b/gcc/ada/libgnat/a-stbufo.ads
new file mode 100644
index 0000000..8c0d476
--- /dev/null
+++ b/gcc/ada/libgnat/a-stbufo.ads
@@ -0,0 +1,73 @@
+------------------------------------------------------------------------------
+-- --
+-- GNAT RUN-TIME COMPONENTS --
+-- --
+-- ADA.STRINGS.TEXT_BUFFERS.FORMATTING --
+-- --
+-- S p e c --
+-- --
+-- Copyright (C) 2020-2021, Free Software Foundation, Inc. --
+-- --
+-- GNAT is free software; you can redistribute it and/or modify it under --
+-- terms of the GNU General Public License as published by the Free Soft- --
+-- ware Foundation; either version 3, or (at your option) any later ver- --
+-- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
+-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
+-- or FITNESS FOR A PARTICULAR PURPOSE. --
+-- --
+-- As a special exception under Section 7 of GPL version 3, you are granted --
+-- additional permissions described in the GCC Runtime Library Exception, --
+-- version 3.1, as published by the Free Software Foundation. --
+-- --
+-- You should have received a copy of the GNU General Public License and --
+-- a copy of the GCC Runtime Library Exception along with this program; --
+-- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see --
+-- <http://www.gnu.org/licenses/>. --
+-- --
+-- GNAT was originally developed by the GNAT team at New York University. --
+-- Extensive contributions were provided by Ada Core Technologies Inc. --
+-- --
+------------------------------------------------------------------------------
+
+with Ada.Strings.Text_Buffers.Utils;
+
+package Ada.Strings.Text_Buffers.Formatting is
+
+ -- Template-based output, based loosely on C's printf family. Unlike
+ -- printf, it is type safe. We don't support myriad formatting options; the
+ -- caller is expected to call 'Image, or other functions that might have
+ -- various formatting capabilities.
+
+ type Template is new Utils.UTF_8;
+
+ procedure Put
+ (S : in out Root_Buffer_Type'Class; T : Template;
+ X1, X2, X3, X4, X5, X6, X7, X8, X9 : Utils.UTF_8_Lines := "");
+ -- Prints the template as is, except for the following escape sequences:
+ -- "\n" is end of line.
+ -- "\i" indents by the default amount, and "\o" outdents.
+ -- "\I" indents by one space, and "\O" outdents.
+ -- "\1" is replaced with X1, and similarly for 2, 3, ....
+ -- "\\" is "\".
+
+ -- Note that the template is not type String, to avoid this sort of thing:
+ --
+ -- https://xkcd.com/327/
+
+ procedure Put
+ (T : Template;
+ X1, X2, X3, X4, X5, X6, X7, X8, X9 : Utils.UTF_8_Lines := "");
+ -- Sends to standard output
+
+ procedure Err
+ (T : Template;
+ X1, X2, X3, X4, X5, X6, X7, X8, X9 : Utils.UTF_8_Lines := "");
+ -- Sends to standard error
+
+ function Format
+ (T : Template;
+ X1, X2, X3, X4, X5, X6, X7, X8, X9 : Utils.UTF_8_Lines := "")
+ return Utils.UTF_8_Lines;
+ -- Returns a UTF-8-encoded String
+
+end Ada.Strings.Text_Buffers.Formatting;
diff --git a/gcc/ada/libgnat/a-stbuun.adb b/gcc/ada/libgnat/a-stbuun.adb
new file mode 100644
index 0000000..9ae3d28
--- /dev/null
+++ b/gcc/ada/libgnat/a-stbuun.adb
@@ -0,0 +1,193 @@
+------------------------------------------------------------------------------
+-- --
+-- GNAT RUN-TIME COMPONENTS --
+-- --
+-- ADA.STRINGS.TEXT_BUFFERS.UNBOUNDED --
+-- --
+-- B o d y --
+-- --
+-- Copyright (C) 2020-2021, Free Software Foundation, Inc. --
+-- --
+-- GNAT is free software; you can redistribute it and/or modify it under --
+-- terms of the GNU General Public License as published by the Free Soft- --
+-- ware Foundation; either version 3, or (at your option) any later ver- --
+-- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
+-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
+-- or FITNESS FOR A PARTICULAR PURPOSE. --
+-- --
+-- As a special exception under Section 7 of GPL version 3, you are granted --
+-- additional permissions described in the GCC Runtime Library Exception, --
+-- version 3.1, as published by the Free Software Foundation. --
+-- --
+-- You should have received a copy of the GNU General Public License and --
+-- a copy of the GCC Runtime Library Exception along with this program; --
+-- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see --
+-- <http://www.gnu.org/licenses/>. --
+-- --
+-- GNAT was originally developed by the GNAT team at New York University. --
+-- Extensive contributions were provided by Ada Core Technologies Inc. --
+-- --
+------------------------------------------------------------------------------
+
+with Ada.Unchecked_Deallocation;
+with Ada.Strings.UTF_Encoding.Conversions;
+with Ada.Strings.UTF_Encoding.Strings;
+with Ada.Strings.UTF_Encoding.Wide_Strings;
+with Ada.Strings.UTF_Encoding.Wide_Wide_Strings;
+package body Ada.Strings.Text_Buffers.Unbounded is
+
+ function Get (Buffer : in out Buffer_Type) return String is
+ -- If all characters are 7 bits, we don't need to decode;
+ -- this is an optimization.
+ -- Otherwise, if all are 8 bits, we need to decode to get Latin-1.
+ -- Otherwise, the result is implementation defined, so we return a
+ -- String encoded as UTF-8. Note that the RM says "if any character
+ -- in the sequence is not defined in Character, the result is
+ -- implementation-defined", so we are not obliged to decode ANY
+ -- Latin-1 characters if ANY character is bigger than 8 bits.
+ begin
+ if Buffer.All_8_Bits and not Buffer.All_7_Bits then
+ return UTF_Encoding.Strings.Decode (Get_UTF_8 (Buffer));
+ else
+ return Get_UTF_8 (Buffer);
+ end if;
+ end Get;
+
+ function Wide_Get (Buffer : in out Buffer_Type) return Wide_String is
+ begin
+ return UTF_Encoding.Wide_Strings.Decode (Get_UTF_8 (Buffer));
+ end Wide_Get;
+
+ function Wide_Wide_Get (Buffer : in out Buffer_Type) return Wide_Wide_String
+ is
+ begin
+ return UTF_Encoding.Wide_Wide_Strings.Decode (Get_UTF_8 (Buffer));
+ end Wide_Wide_Get;
+
+ function Get_UTF_8
+ (Buffer : in out Buffer_Type) return UTF_Encoding.UTF_8_String
+ is
+ begin
+ return Result : UTF_Encoding.UTF_8_String (1 .. Buffer.UTF_8_Length) do
+ declare
+ Target_First : Positive := 1;
+ Ptr : Chunk_Access := Buffer.List.First_Chunk'Unchecked_Access;
+ Target_Last : Positive;
+ begin
+ while Ptr /= null loop
+ Target_Last := Target_First + Ptr.Chars'Length - 1;
+ if Target_Last <= Result'Last then
+ -- all of chunk is assigned to Result
+ Result (Target_First .. Target_Last) := Ptr.Chars;
+ Target_First := Target_First + Ptr.Chars'Length;
+ else
+ -- only part of (last) chunk is assigned to Result
+ declare
+ Final_Target : UTF_Encoding.UTF_8_String renames
+ Result (Target_First .. Result'Last);
+ begin
+ Final_Target := Ptr.Chars (1 .. Final_Target'Length);
+ end;
+ pragma Assert (Ptr.Next = null);
+ Target_First := Integer'Last;
+ end if;
+
+ Ptr := Ptr.Next;
+ end loop;
+ end;
+
+ -- Reset buffer to default initial value.
+ declare
+ Defaulted : Buffer_Type;
+
+ -- If this aggregate becomes illegal due to new field, don't
+ -- forget to add corresponding assignment statement below.
+ Dummy : array (1 .. 0) of Buffer_Type :=
+ (others =>
+ (Indentation => <>, Indent_Pending => <>, UTF_8_Length => <>,
+ UTF_8_Column => <>, All_7_Bits => <>, All_8_Bits => <>,
+ List => <>, Last_Used => <>));
+ begin
+ Buffer.Indentation := Defaulted.Indentation;
+ Buffer.Indent_Pending := Defaulted.Indent_Pending;
+ Buffer.UTF_8_Length := Defaulted.UTF_8_Length;
+ Buffer.UTF_8_Column := Defaulted.UTF_8_Column;
+ Buffer.All_7_Bits := Defaulted.All_7_Bits;
+ Buffer.All_8_Bits := Defaulted.All_8_Bits;
+ Buffer.Last_Used := Defaulted.Last_Used;
+ Finalize (Buffer.List); -- free any allocated chunks
+ end;
+ end return;
+ end Get_UTF_8;
+
+ function Wide_Get_UTF_16
+ (Buffer : in out Buffer_Type) return UTF_Encoding.UTF_16_Wide_String
+ is
+ begin
+ return
+ UTF_Encoding.Conversions.Convert
+ (Get_UTF_8 (Buffer), Input_Scheme => UTF_Encoding.UTF_8);
+ end Wide_Get_UTF_16;
+
+ procedure Put_UTF_8_Implementation
+ (Buffer : in out Root_Buffer_Type'Class;
+ Item : UTF_Encoding.UTF_8_String)
+ is
+ procedure Buffer_Type_Implementation (Buffer : in out Buffer_Type);
+ -- View the passed-in Buffer parameter as being of type Buffer_Type,
+ -- not of type Root_Buffer_Type'Class.
+
+ procedure Buffer_Type_Implementation (Buffer : in out Buffer_Type) is
+ begin
+ for Char of Item loop
+ Buffer.All_7_Bits := @ and then Character'Pos (Char) < 128;
+
+ if Buffer.Last_Used = Buffer.List.Current_Chunk.Length then
+ -- Current chunk is full; allocate a new one with doubled size
+
+ declare
+ Cc : Chunk renames Buffer.List.Current_Chunk.all;
+ Max : constant Positive := Integer'Last / 2;
+ Length : constant Natural :=
+ Integer'Min (Max, 2 * Cc.Length);
+ begin
+ pragma Assert (Cc.Next = null);
+ Cc.Next := new Chunk (Length => Length);
+ Buffer.List.Current_Chunk := Cc.Next;
+ Buffer.Last_Used := 0;
+ end;
+ end if;
+
+ Buffer.UTF_8_Length := @ + 1;
+ Buffer.UTF_8_Column := @ + 1;
+ Buffer.Last_Used := @ + 1;
+ Buffer.List.Current_Chunk.Chars (Buffer.Last_Used) := Char;
+ end loop;
+ end Buffer_Type_Implementation;
+ begin
+ Buffer_Type_Implementation (Buffer_Type (Buffer));
+ end Put_UTF_8_Implementation;
+
+ procedure Initialize (List : in out Managed_Chunk_List) is
+ begin
+ List.Current_Chunk := List.First_Chunk'Unchecked_Access;
+ end Initialize;
+
+ procedure Finalize (List : in out Managed_Chunk_List) is
+ procedure Free is new Ada.Unchecked_Deallocation (Chunk, Chunk_Access);
+ Ptr : Chunk_Access := List.First_Chunk.Next;
+ begin
+ while Ptr /= null loop
+ declare
+ Old_Ptr : Chunk_Access := Ptr;
+ begin
+ Ptr := Ptr.Next;
+ Free (Old_Ptr);
+ end;
+ end loop;
+
+ List.First_Chunk.Next := null;
+ Initialize (List);
+ end Finalize;
+
+end Ada.Strings.Text_Buffers.Unbounded;
diff --git a/gcc/ada/libgnat/a-stbuun.ads b/gcc/ada/libgnat/a-stbuun.ads
new file mode 100644
index 0000000..3c6ad3a
--- /dev/null
+++ b/gcc/ada/libgnat/a-stbuun.ads
@@ -0,0 +1,87 @@
+------------------------------------------------------------------------------
+-- --
+-- GNAT RUN-TIME COMPONENTS --
+-- --
+-- ADA.STRINGS.TEXT_BUFFERS.UNBOUNDED --
+-- --
+-- S p e c --
+-- --
+-- This specification is derived from the Ada Reference Manual for use with --
+-- GNAT. In accordance with the copyright of that document, you can freely --
+-- copy and modify this specification, provided that if you redistribute a --
+-- modified version, any changes that you have made are clearly indicated. --
+-- --
+------------------------------------------------------------------------------
+
+with Ada.Finalization;
+package Ada.Strings.Text_Buffers.Unbounded with
+ Preelaborate
+ -- , Nonblocking
+ -- , Global => null
+is
+
+ type Buffer_Type is new Root_Buffer_Type with private;
+
+ function Get (Buffer : in out Buffer_Type) return String with
+ Post'Class => Get'Result'First = 1 and then Current_Indent (Buffer) = 0;
+
+ function Wide_Get (Buffer : in out Buffer_Type) return Wide_String with
+ Post'Class => Wide_Get'Result'First = 1
+ and then Current_Indent (Buffer) = 0;
+
+ function Wide_Wide_Get
+ (Buffer : in out Buffer_Type) return Wide_Wide_String with
+ Post'Class => Wide_Wide_Get'Result'First = 1
+ and then Current_Indent (Buffer) = 0;
+
+ function Get_UTF_8
+ (Buffer : in out Buffer_Type) return UTF_Encoding.UTF_8_String with
+ Post'Class => Get_UTF_8'Result'First = 1
+ and then Current_Indent (Buffer) = 0;
+
+ function Wide_Get_UTF_16
+ (Buffer : in out Buffer_Type) return UTF_Encoding.UTF_16_Wide_String with
+ Post'Class => Wide_Get_UTF_16'Result'First = 1
+ and then Current_Indent (Buffer) = 0;
+
+private
+
+ procedure Put_UTF_8_Implementation
+ (Buffer : in out Root_Buffer_Type'Class;
+ Item : UTF_Encoding.UTF_8_String)
+ with Pre => Buffer in Buffer_Type'Class;
+
+ package Mapping is new Output_Mapping (Put_UTF_8_Implementation);
+
+ type Chunk;
+ type Chunk_Access is access all Chunk;
+ type Chunk (Length : Positive) is record
+ Next : Chunk_Access := null;
+ Chars : UTF_Encoding.UTF_8_String (1 .. Length);
+ end record;
+
+ type Managed_Chunk_List is new Ada.Finalization.Limited_Controlled with
+ record
+ First_Chunk : aliased Chunk (64);
+ -- First chunk in list is not created by an allocator; it is
+ -- large enough to suffice for many common images.
+
+ Current_Chunk : Chunk_Access;
+ -- Chunk we are currrently writing to.
+ -- Initialized to Managed_Chunk_List.First'Access.
+ end record;
+
+ overriding procedure Initialize (List : in out Managed_Chunk_List);
+ -- List.Current_Chunk := List.First_Chunk'Unchecked_Access;
+
+ overriding procedure Finalize (List : in out Managed_Chunk_List);
+ -- Free any allocated chunks.
+
+ type Buffer_Type is new Mapping.Buffer_Type with record
+ List : Managed_Chunk_List;
+
+ Last_Used : Natural := 0;
+ -- Index of last used char in List.Current_Chunk.all; 0 if none used.
+ end record;
+
+end Ada.Strings.Text_Buffers.Unbounded;
diff --git a/gcc/ada/libgnat/a-stbuut.adb b/gcc/ada/libgnat/a-stbuut.adb
new file mode 100644
index 0000000..b32b2d3
--- /dev/null
+++ b/gcc/ada/libgnat/a-stbuut.adb
@@ -0,0 +1,81 @@
+------------------------------------------------------------------------------
+-- --
+-- GNAT RUN-TIME COMPONENTS --
+-- --
+-- ADA.STRINGS.TEXT_BUFFERS.UTILS --
+-- --
+-- B o d y --
+-- --
+-- Copyright (C) 2020-2021, Free Software Foundation, Inc. --
+-- --
+-- GNAT is free software; you can redistribute it and/or modify it under --
+-- terms of the GNU General Public License as published by the Free Soft- --
+-- ware Foundation; either version 3, or (at your option) any later ver- --
+-- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
+-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
+-- or FITNESS FOR A PARTICULAR PURPOSE. --
+-- --
+-- As a special exception under Section 7 of GPL version 3, you are granted --
+-- additional permissions described in the GCC Runtime Library Exception, --
+-- version 3.1, as published by the Free Software Foundation. --
+-- --
+-- You should have received a copy of the GNU General Public License and --
+-- a copy of the GCC Runtime Library Exception along with this program; --
+-- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see --
+-- <http://www.gnu.org/licenses/>. --
+-- --
+-- GNAT was originally developed by the GNAT team at New York University. --
+-- Extensive contributions were provided by Ada Core Technologies Inc. --
+-- --
+------------------------------------------------------------------------------
+
+package body Ada.Strings.Text_Buffers.Utils is
+
+ procedure Put_7bit
+ (Buffer : in out Root_Buffer_Type'Class; Item : Character_7)
+ is
+ begin
+ Put (Buffer, (1 => Item));
+ end Put_7bit;
+
+ procedure Put_Character
+ (Buffer : in out Root_Buffer_Type'Class; Item : Character)
+ is
+ begin
+ Put (Buffer, (1 => Item));
+ end Put_Character;
+
+ procedure Put_Wide_Character
+ (Buffer : in out Root_Buffer_Type'Class; Item : Wide_Character)
+ is
+ begin
+ Wide_Put (Buffer, (1 => Item));
+ end Put_Wide_Character;
+
+ procedure Put_Wide_Wide_Character
+ (Buffer : in out Root_Buffer_Type'Class; Item : Wide_Wide_Character)
+ is
+ begin
+ Wide_Wide_Put (Buffer, (1 => Item));
+ end Put_Wide_Wide_Character;
+
+ procedure Put_UTF_8_Lines
+ (Buffer : in out Root_Buffer_Type'Class; Item : UTF_8_Lines)
+ is
+ begin
+ Put (Buffer, Item);
+ end Put_UTF_8_Lines;
+
+ function Column (Buffer : Root_Buffer_Type'Class) return Positive is
+ begin
+ return Buffer.UTF_8_Column;
+ end Column;
+
+ procedure Tab_To_Column
+ (Buffer : in out Root_Buffer_Type'Class; Column : Positive)
+ is
+ begin
+ Put (Buffer, String'(1 .. Column - Utils.Column (Buffer) => ' '));
+ end Tab_To_Column;
+
+end Ada.Strings.Text_Buffers.Utils;
diff --git a/gcc/ada/libgnat/a-stbuut.ads b/gcc/ada/libgnat/a-stbuut.ads
new file mode 100644
index 0000000..d76b8cf
--- /dev/null
+++ b/gcc/ada/libgnat/a-stbuut.ads
@@ -0,0 +1,82 @@
+------------------------------------------------------------------------------
+-- --
+-- GNAT RUN-TIME COMPONENTS --
+-- --
+-- ADA.STRINGS.TEXT_BUFFERS.UTILS --
+-- --
+-- S p e c --
+-- --
+-- Copyright (C) 2020-2021, Free Software Foundation, Inc. --
+-- --
+-- GNAT is free software; you can redistribute it and/or modify it under --
+-- terms of the GNU General Public License as published by the Free Soft- --
+-- ware Foundation; either version 3, or (at your option) any later ver- --
+-- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
+-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
+-- or FITNESS FOR A PARTICULAR PURPOSE. --
+-- --
+-- As a special exception under Section 7 of GPL version 3, you are granted --
+-- additional permissions described in the GCC Runtime Library Exception, --
+-- version 3.1, as published by the Free Software Foundation. --
+-- --
+-- You should have received a copy of the GNU General Public License and --
+-- a copy of the GCC Runtime Library Exception along with this program; --
+-- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see --
+-- <http://www.gnu.org/licenses/>. --
+-- --
+-- GNAT was originally developed by the GNAT team at New York University. --
+-- Extensive contributions were provided by Ada Core Technologies Inc. --
+-- --
+------------------------------------------------------------------------------
+
+with Ada.Strings.UTF_Encoding.Wide_Wide_Strings;
+
+package Ada.Strings.Text_Buffers.Utils with Pure is
+
+ -- Ada.Strings.Text_Buffers is a predefined unit (see Ada RM A.4.12).
+ -- This is a GNAT-defined child unit of that parent.
+
+ subtype Character_7 is
+ Character range Character'Val (0) .. Character'Val (2**7 - 1);
+
+ procedure Put_7bit
+ (Buffer : in out Root_Buffer_Type'Class; Item : Character_7);
+ procedure Put_Character
+ (Buffer : in out Root_Buffer_Type'Class; Item : Character);
+ procedure Put_Wide_Character
+ (Buffer : in out Root_Buffer_Type'Class; Item : Wide_Character);
+ procedure Put_Wide_Wide_Character
+ (Buffer : in out Root_Buffer_Type'Class; Item : Wide_Wide_Character);
+ -- Single character output procedures.
+
+ function Column (Buffer : Root_Buffer_Type'Class) return Positive with
+ Inline;
+ -- Current output column. The Column is initially 1, and is incremented for
+ -- each 8-bit character output. A call to New_Line sets Column back to 1.
+ -- The next character to be output will go in this column.
+
+ procedure Tab_To_Column
+ (Buffer : in out Root_Buffer_Type'Class; Column : Positive);
+ -- Put spaces until we're at or past Column.
+
+ subtype Sink is Root_Buffer_Type;
+
+ function NL return Character is (ASCII.LF) with Inline;
+
+ function UTF_8_Length (Buffer : Root_Buffer_Type'Class) return Natural;
+
+ subtype UTF_8_Lines is UTF_Encoding.UTF_8_String with
+ Predicate =>
+ UTF_Encoding.Wide_Wide_Strings.Encode
+ (UTF_Encoding.Wide_Wide_Strings.Decode (UTF_8_Lines)) = UTF_8_Lines;
+
+ subtype UTF_8 is UTF_8_Lines with
+ Predicate => (for all UTF_8_Char of UTF_8 => UTF_8_Char /= NL);
+
+ procedure Put_UTF_8_Lines
+ (Buffer : in out Root_Buffer_Type'Class; Item : UTF_8_Lines);
+
+private
+ function UTF_8_Length (Buffer : Root_Buffer_Type'Class) return Natural
+ is (Buffer.UTF_8_Length);
+end Ada.Strings.Text_Buffers.Utils;
diff --git a/gcc/ada/libgnat/a-strunb.adb b/gcc/ada/libgnat/a-strunb.adb
index 36dc7ef..4727f965 100644
--- a/gcc/ada/libgnat/a-strunb.adb
+++ b/gcc/ada/libgnat/a-strunb.adb
@@ -783,7 +783,8 @@ package body Ada.Strings.Unbounded is
---------------
procedure Put_Image
- (S : in out Ada.Strings.Text_Output.Sink'Class; V : Unbounded_String) is
+ (S : in out Ada.Strings.Text_Buffers.Root_Buffer_Type'Class;
+ V : Unbounded_String) is
begin
String'Put_Image (S, To_String (V));
end Put_Image;
diff --git a/gcc/ada/libgnat/a-strunb.ads b/gcc/ada/libgnat/a-strunb.ads
index d434cfe..89c8339 100644
--- a/gcc/ada/libgnat/a-strunb.ads
+++ b/gcc/ada/libgnat/a-strunb.ads
@@ -41,7 +41,7 @@ pragma Assertion_Policy (Pre => Ignore);
with Ada.Strings.Maps;
with Ada.Finalization;
-private with Ada.Strings.Text_Output;
+private with Ada.Strings.Text_Buffers;
-- The language-defined package Strings.Unbounded provides a private type
-- Unbounded_String and a set of operations. An object of type
@@ -748,7 +748,8 @@ private
end record with Put_Image => Put_Image;
procedure Put_Image
- (S : in out Ada.Strings.Text_Output.Sink'Class; V : Unbounded_String);
+ (S : in out Ada.Strings.Text_Buffers.Root_Buffer_Type'Class;
+ V : Unbounded_String);
-- The Unbounded_String is using a buffered implementation to increase
-- speed of the Append/Delete/Insert procedures. The Reference string
diff --git a/gcc/ada/libgnat/a-strunb__shared.adb b/gcc/ada/libgnat/a-strunb__shared.adb
index d2907f6..506b614 100644
--- a/gcc/ada/libgnat/a-strunb__shared.adb
+++ b/gcc/ada/libgnat/a-strunb__shared.adb
@@ -1291,7 +1291,8 @@ package body Ada.Strings.Unbounded is
---------------
procedure Put_Image
- (S : in out Ada.Strings.Text_Output.Sink'Class; V : Unbounded_String) is
+ (S : in out Ada.Strings.Text_Buffers.Root_Buffer_Type'Class;
+ V : Unbounded_String) is
begin
String'Put_Image (S, To_String (V));
end Put_Image;
diff --git a/gcc/ada/libgnat/a-strunb__shared.ads b/gcc/ada/libgnat/a-strunb__shared.ads
index 094bf7e..6382252 100644
--- a/gcc/ada/libgnat/a-strunb__shared.ads
+++ b/gcc/ada/libgnat/a-strunb__shared.ads
@@ -78,7 +78,7 @@ pragma Assertion_Policy (Pre => Ignore);
with Ada.Strings.Maps;
private with Ada.Finalization;
private with System.Atomic_Counters;
-private with Ada.Strings.Text_Output;
+private with Ada.Strings.Text_Buffers;
package Ada.Strings.Unbounded with
Initial_Condition => Length (Null_Unbounded_String) = 0
@@ -744,7 +744,8 @@ private
end record with Put_Image => Put_Image;
procedure Put_Image
- (S : in out Ada.Strings.Text_Output.Sink'Class; V : Unbounded_String);
+ (S : in out Ada.Strings.Text_Buffers.Root_Buffer_Type'Class;
+ V : Unbounded_String);
pragma Stream_Convert (Unbounded_String, To_Unbounded, To_String);
-- Provide stream routines without dragging in Ada.Streams
diff --git a/gcc/ada/libgnat/a-sttebu.adb b/gcc/ada/libgnat/a-sttebu.adb
new file mode 100644
index 0000000..bc0c6ce
--- /dev/null
+++ b/gcc/ada/libgnat/a-sttebu.adb
@@ -0,0 +1,121 @@
+------------------------------------------------------------------------------
+-- --
+-- GNAT RUN-TIME COMPONENTS --
+-- --
+-- ADA.STRINGS.TEXT_BUFFERS --
+-- --
+-- B o d y --
+-- --
+-- Copyright (C) 2020-2021, Free Software Foundation, Inc. --
+-- --
+-- GNAT is free software; you can redistribute it and/or modify it under --
+-- terms of the GNU General Public License as published by the Free Soft- --
+-- ware Foundation; either version 3, or (at your option) any later ver- --
+-- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
+-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
+-- or FITNESS FOR A PARTICULAR PURPOSE. --
+-- --
+-- As a special exception under Section 7 of GPL version 3, you are granted --
+-- additional permissions described in the GCC Runtime Library Exception, --
+-- version 3.1, as published by the Free Software Foundation. --
+-- --
+-- You should have received a copy of the GNU General Public License and --
+-- a copy of the GCC Runtime Library Exception along with this program; --
+-- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see --
+-- <http://www.gnu.org/licenses/>. --
+-- --
+-- GNAT was originally developed by the GNAT team at New York University. --
+-- Extensive contributions were provided by Ada Core Technologies Inc. --
+-- --
+------------------------------------------------------------------------------
+
+with Ada.Strings.UTF_Encoding.Wide_Strings;
+with Ada.Strings.UTF_Encoding.Wide_Wide_Strings;
+
+package body Ada.Strings.Text_Buffers is
+ function Current_Indent
+ (Buffer : Root_Buffer_Type) return Text_Buffer_Count is
+ (Text_Buffer_Count (Buffer.Indentation));
+
+ procedure Increase_Indent
+ (Buffer : in out Root_Buffer_Type;
+ Amount : Text_Buffer_Count := Standard_Indent)
+ is
+ begin
+ Buffer.Indentation := @ + Natural (Amount);
+ end Increase_Indent;
+
+ procedure Decrease_Indent
+ (Buffer : in out Root_Buffer_Type;
+ Amount : Text_Buffer_Count := Standard_Indent)
+ is
+ begin
+ Buffer.Indentation := @ - Natural (Amount);
+ end Decrease_Indent;
+
+ package body Output_Mapping is
+ -- Implement indentation in Put_UTF_8 and New_Line.
+ -- Implement other output procedures using Put_UTF_8.
+
+ procedure Put (Buffer : in out Buffer_Type; Item : String) is
+ begin
+ Put_UTF_8 (Buffer, Item);
+ end Put;
+
+ procedure Wide_Put (Buffer : in out Buffer_Type; Item : Wide_String) is
+ begin
+ Buffer.All_8_Bits :=
+ @ and then
+ (for all WChar of Item => Wide_Character'Pos (WChar) < 256);
+
+ Put_UTF_8 (Buffer, UTF_Encoding.Wide_Strings.Encode (Item));
+ end Wide_Put;
+
+ procedure Wide_Wide_Put
+ (Buffer : in out Buffer_Type; Item : Wide_Wide_String)
+ is
+ begin
+ Buffer.All_8_Bits :=
+ @ and then
+ (for all WWChar of Item => Wide_Wide_Character'Pos (WWChar) < 256);
+
+ Put_UTF_8 (Buffer, UTF_Encoding.Wide_Wide_Strings.Encode (Item));
+ end Wide_Wide_Put;
+
+ procedure Put_UTF_8
+ (Buffer : in out Buffer_Type;
+ Item : UTF_Encoding.UTF_8_String) is
+ begin
+ if Item'Length = 0 then
+ return;
+ end if;
+
+ if Buffer.Indent_Pending then
+ Buffer.Indent_Pending := False;
+ if Buffer.Indentation > 0 then
+ Put_UTF_8_Implementation
+ (Buffer, (1 .. Buffer.Indentation => ' '));
+ end if;
+ end if;
+
+ Put_UTF_8_Implementation (Buffer, Item);
+ end Put_UTF_8;
+
+ procedure Wide_Put_UTF_16
+ (Buffer : in out Buffer_Type; Item : UTF_Encoding.UTF_16_Wide_String)
+ is
+ begin
+ Wide_Wide_Put (Buffer, UTF_Encoding.Wide_Wide_Strings.Decode (Item));
+ end Wide_Put_UTF_16;
+
+ procedure New_Line (Buffer : in out Buffer_Type) is
+ begin
+ Buffer.Indent_Pending := False; -- just for a moment
+ Put (Buffer, (1 => ASCII.LF));
+ Buffer.Indent_Pending := True;
+ Buffer.UTF_8_Column := 1;
+ end New_Line;
+
+ end Output_Mapping;
+
+end Ada.Strings.Text_Buffers;
diff --git a/gcc/ada/libgnat/a-sttebu.ads b/gcc/ada/libgnat/a-sttebu.ads
new file mode 100644
index 0000000..4f6fafc
--- /dev/null
+++ b/gcc/ada/libgnat/a-sttebu.ads
@@ -0,0 +1,135 @@
+------------------------------------------------------------------------------
+-- --
+-- GNAT RUN-TIME COMPONENTS --
+-- --
+-- ADA.STRINGS.TEXT_BUFFERS --
+-- --
+-- S p e c --
+-- --
+-- This specification is derived from the Ada Reference Manual for use with --
+-- GNAT. In accordance with the copyright of that document, you can freely --
+-- copy and modify this specification, provided that if you redistribute a --
+-- modified version, any changes that you have made are clearly indicated. --
+-- --
+------------------------------------------------------------------------------
+
+with Ada.Strings.UTF_Encoding;
+package Ada.Strings.Text_Buffers with
+ Pure
+is
+
+ type Text_Buffer_Count is range 0 .. Integer'Last;
+
+ New_Line_Count : constant Text_Buffer_Count := 1;
+ -- There is no support for two-character CR/LF line endings.
+
+ type Root_Buffer_Type is abstract tagged limited private with
+ Default_Initial_Condition => Current_Indent (Root_Buffer_Type) = 0;
+
+ procedure Put (Buffer : in out Root_Buffer_Type; Item : String) is abstract;
+
+ procedure Wide_Put
+ (Buffer : in out Root_Buffer_Type; Item : Wide_String) is abstract;
+
+ procedure Wide_Wide_Put
+ (Buffer : in out Root_Buffer_Type; Item : Wide_Wide_String) is abstract;
+
+ procedure Put_UTF_8
+ (Buffer : in out Root_Buffer_Type;
+ Item : UTF_Encoding.UTF_8_String) is abstract;
+
+ procedure Wide_Put_UTF_16
+ (Buffer : in out Root_Buffer_Type;
+ Item : UTF_Encoding.UTF_16_Wide_String) is abstract;
+
+ procedure New_Line (Buffer : in out Root_Buffer_Type) is abstract;
+
+ Standard_Indent : constant Text_Buffer_Count := 3;
+
+ function Current_Indent
+ (Buffer : Root_Buffer_Type) return Text_Buffer_Count;
+
+ procedure Increase_Indent
+ (Buffer : in out Root_Buffer_Type;
+ Amount : Text_Buffer_Count := Standard_Indent) with
+ Post'Class => Current_Indent (Buffer) =
+ Current_Indent (Buffer)'Old + Amount;
+
+ procedure Decrease_Indent
+ (Buffer : in out Root_Buffer_Type;
+ Amount : Text_Buffer_Count := Standard_Indent) with
+ Pre'Class => Current_Indent (Buffer) >= Amount
+ or else raise Constraint_Error,
+ Post'Class => Current_Indent (Buffer) =
+ Current_Indent (Buffer)'Old - Amount;
+
+private
+
+ type Root_Buffer_Type is abstract tagged limited record
+ Indentation : Natural := 0;
+ -- Current indentation
+
+ Indent_Pending : Boolean := True;
+ -- Set by calls to New_Line, cleared when indentation emitted.
+
+ UTF_8_Length : Natural := 0;
+ -- Count of UTF_8 characters in the buffer
+
+ UTF_8_Column : Positive := 1;
+ -- Column in which next character will be written.
+ -- Calling New_Line resets to 1.
+
+ All_7_Bits : Boolean := True;
+ -- True if all characters seen so far fit in 7 bits
+ All_8_Bits : Boolean := True;
+ -- True if all characters seen so far fit in 8 bits
+
+ end record;
+
+ generic
+ -- This generic allows a client to extend Root_Buffer_Type without
+ -- having to implement any of the abstract subprograms other than
+ -- Put_UTF_8 (i.e., Put, Wide_Put, Wide_Wide_Put, Wide_Put_UTF_16,
+ -- and New_Line). Without this generic, each client would have to
+ -- duplicate the implementations of those 5 subprograms.
+ -- This generic also takes care of handling indentation, thereby
+ -- avoiding further code duplication. The name "Output_Mapping" isn't
+ -- wonderful, but it refers to the idea that this package knows how
+ -- to implement all the other output operations in terms of
+ -- just Put_UTF_8.
+ --
+ -- The classwide parameter type here is somewhat tricky;
+ -- there are no dispatching calls associated with this parameter.
+ -- It would be more accurate to say that the parameter is of type
+ -- Output_Mapping.Buffer_Type'Class, but that type hasn't been declared
+ -- yet. Instantiators will typically declare a non-abstract extension,
+ -- B2, of the buffer type, B1, declared in their instantiation. The
+ -- actual Put_UTF_8_Implementation parameter may then have a
+ -- precondition "Buffer in B2'Class" and that subprogram can safely
+ -- access components declared as part of the declaration of B2.
+
+ with procedure Put_UTF_8_Implementation
+ (Buffer : in out Root_Buffer_Type'Class;
+ Item : UTF_Encoding.UTF_8_String);
+ package Output_Mapping is
+ type Buffer_Type is abstract new Root_Buffer_Type with null record;
+
+ overriding procedure Put (Buffer : in out Buffer_Type; Item : String);
+
+ overriding procedure Wide_Put
+ (Buffer : in out Buffer_Type; Item : Wide_String);
+
+ overriding procedure Wide_Wide_Put
+ (Buffer : in out Buffer_Type; Item : Wide_Wide_String);
+
+ overriding procedure Put_UTF_8
+ (Buffer : in out Buffer_Type;
+ Item : UTF_Encoding.UTF_8_String);
+
+ overriding procedure Wide_Put_UTF_16
+ (Buffer : in out Buffer_Type; Item : UTF_Encoding.UTF_16_Wide_String);
+
+ overriding procedure New_Line (Buffer : in out Buffer_Type);
+ end Output_Mapping;
+
+end Ada.Strings.Text_Buffers;
diff --git a/gcc/ada/libgnat/a-stteou__bootstrap.ads b/gcc/ada/libgnat/a-stteou__bootstrap.ads
deleted file mode 100644
index 0112491..0000000
--- a/gcc/ada/libgnat/a-stteou__bootstrap.ads
+++ /dev/null
@@ -1,190 +0,0 @@
-------------------------------------------------------------------------------
--- --
--- GNAT RUN-TIME COMPONENTS --
--- --
--- ADA.STRINGS.TEXT_OUTPUT --
--- --
--- S p e c --
--- --
--- Copyright (C) 2020-2021, Free Software Foundation, Inc. --
--- --
--- GNAT is free software; you can redistribute it and/or modify it under --
--- terms of the GNU General Public License as published by the Free Soft- --
--- ware Foundation; either version 3, or (at your option) any later ver- --
--- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
--- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
--- or FITNESS FOR A PARTICULAR PURPOSE. --
--- --
--- As a special exception under Section 7 of GPL version 3, you are granted --
--- additional permissions described in the GCC Runtime Library Exception, --
--- version 3.1, as published by the Free Software Foundation. --
--- --
--- You should have received a copy of the GNU General Public License and --
--- a copy of the GCC Runtime Library Exception along with this program; --
--- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see --
--- <http://www.gnu.org/licenses/>. --
--- --
--- GNAT was originally developed by the GNAT team at New York University. --
--- Extensive contributions were provided by Ada Core Technologies Inc. --
--- --
-------------------------------------------------------------------------------
-
--- Simplified version used during bootstrap only
-
-with Ada.Strings.UTF_Encoding;
-
-package Ada.Strings.Text_Output with Pure is
-
- -- This package provides a "Sink" abstraction, to which characters of type
- -- Character, Wide_Character, and Wide_Wide_Character can be sent. This
- -- type is used by the Put_Image attribute. In particular, T'Put_Image has
- -- the following parameter types:
- --
- -- procedure T'Put_Image (S : in out Sink'Class; V : T);
- --
- -- The default generated code for Put_Image of a composite type will
- -- typically call Put_Image on the components.
- --
- -- This is not a fully general abstraction that can be arbitrarily
- -- extended. It is designed with particular extensions in mind, and these
- -- extensions are declared in child packages of this package, because they
- -- depend on implementation details in the private part of this
- -- package.
- --
- -- Users are not expected to extend type Sink.
- --
- -- The primary extensions of Sink are:
- --
- -- Buffer. The characters sent to a Buffer are stored in memory, and can
- -- be retrieved via Get functions. This is intended for the
- -- implementation of the 'Image attribute. The compiler will generate a
- -- T'Image function that declares a local Buffer, sends characters to
- -- it, and then returns a call to Get, Destroying the Buffer on return.
- --
- -- function T'Image (V : T) return String is
- -- Buf : Buffer := New_Buffer (...);
- -- begin
- -- T'Put_Image (Buf, V);
- -- return Result : constant String := Get (Buf) do
- -- Destroy (Buf);
- -- end return;
- -- end T'Image;
- -- ????Perhaps Buffer should be controlled; if you don't like
- -- controlled types, call Put_Image directly.
- --
- -- File. The characters are sent to a file, possibly opened by file
- -- name, or possibly standard output or standard error. 'Put_Image
- -- can be called directly on a File, thus avoiding any heap allocation.
-
- type Sink (<>) is abstract tagged limited private;
- type Sink_Access is access all Sink'Class with Storage_Size => 0;
- -- Sink is a character sink; you can send characters to a Sink.
- -- UTF-8 encoding is used.
-
- procedure Full_Method (S : in out Sink) is abstract;
- procedure Flush_Method (S : in out Sink) is abstract;
- -- There is an internal buffer to store the characters. Full_Method is
- -- called when the buffer is full, and Flush_Method may be called to flush
- -- the buffer. For Buffer, Full_Method allocates more space for more
- -- characters, and Flush_Method does nothing. For File, Full_Method and
- -- Flush_Method do the same thing: write the characters to the file, and
- -- empty the internal buffer.
- --
- -- These are the only dispatching subprograms on Sink. This is for
- -- efficiency; we don't dispatch on every write to the Sink, but only when
- -- the internal buffer is full (or upon client request).
- --
- -- Full_Method and Flush_Method must make the current chunk empty.
- --
- -- Additional operations operating on Sink'Class are declared in the Utils
- -- child, including Full and Flush, which call the above.
-
- function To_Wide (C : Character) return Wide_Character is
- (Wide_Character'Val (Character'Pos (C)));
- function To_Wide_Wide (C : Character) return Wide_Wide_Character is
- (Wide_Wide_Character'Val (Character'Pos (C)));
- function To_Wide_Wide (C : Wide_Character) return Wide_Wide_Character is
- (Wide_Wide_Character'Val (Wide_Character'Pos (C)));
- -- Conversions [Wide_]Character --> [Wide_]Wide_Character.
- -- These cannot fail.
-
- function From_Wide (C : Wide_Character) return Character is
- (Character'Val (Wide_Character'Pos (C)));
- function From_Wide_Wide (C : Wide_Wide_Character) return Character is
- (Character'Val (Wide_Wide_Character'Pos (C)));
- function From_Wide_Wide (C : Wide_Wide_Character) return Wide_Character is
- (Wide_Character'Val (Wide_Wide_Character'Pos (C)));
- -- Conversions [Wide_]Wide_Character --> [Wide_]Character.
- -- These fail if the character is out of range.
-
- function NL return Character is (ASCII.LF) with Inline;
- function Wide_NL return Wide_Character is (To_Wide (Character'(NL)))
- with Inline;
- function Wide_Wide_NL return Wide_Wide_Character is
- (To_Wide_Wide (Character'(NL))) with Inline;
- -- Character representing new line. There is no support for CR/LF line
- -- endings.
-
- -- We have two subtypes of String that are encoded in UTF-8. UTF_8 cannot
- -- contain newline characters; UTF_8_Lines can. Sending UTF_8 data to a
- -- Sink is more efficient, because end-of-line processing is not needed.
- -- Both of these are more efficient than [[Wide_]Wide_]String, because no
- -- encoding is needed.
-
- subtype UTF_8_Lines is UTF_Encoding.UTF_8_String;
-
- subtype UTF_8 is UTF_8_Lines;
-
- Default_Indent_Amount : constant Natural := 4;
-
- Default_Chunk_Length : constant Positive := 500;
- -- Experiment shows this value to be reasonably efficient; decreasing it
- -- slows things down, but increasing it doesn't gain much.
-
-private
- -- For Buffer, the "internal buffer" mentioned above is implemented as a
- -- linked list of chunks. When the current chunk is full, we allocate a new
- -- one. For File, there is only one chunk. When it is full, we send the
- -- data to the file, and empty it.
-
- type Chunk;
- type Chunk_Access is access all Chunk with Storage_Size => 0;
- type Chunk (Length : Positive) is limited record
- Next : Chunk_Access := null;
- Chars : UTF_8_Lines (1 .. Length);
- end record;
-
- type Sink (Chunk_Length : Positive) is abstract tagged limited record
- Indent_Amount : Natural;
- Column : Positive := 1;
- Indentation : Natural := 0;
-
- All_7_Bits : Boolean := True;
- -- For optimization of Text_Output.Buffers.Get (cf).
- -- True if all characters seen so far fit in 7 bits.
- -- 7-bit characters are represented the same in Character
- -- and in UTF-8, so they don't need translation.
-
- All_8_Bits : Boolean := True;
- -- True if all characters seen so far fit in 8 bits.
- -- This is needed in Text_Output.Buffers.Get to distinguish
- -- the case where all characters are Latin-1 (so it should
- -- decode) from the case where some characters are bigger than
- -- 8 bits (so the result is implementation defined).
-
- Cur_Chunk : Chunk_Access;
- -- Points to the chunk we are currently sending characters to.
- -- We want to say:
- -- Cur_Chunk : Chunk_Access := Initial_Chunk'Access;
- -- but that's illegal, so we have some horsing around to do.
-
- Last : Natural := 0;
- -- Last-used character in Cur_Chunk.all.
-
- Initial_Chunk : aliased Chunk (Length => Chunk_Length);
- -- For Buffer, this is the first chunk. Subsequent chunks are allocated
- -- on the heap. For File, this is the only chunk, and there is no heap
- -- allocation.
- end record;
-
-end Ada.Strings.Text_Output;
diff --git a/gcc/ada/libgnat/s-bitfie.ads b/gcc/ada/libgnat/s-bitfie.ads
index b60a4fe..f081d55 100644
--- a/gcc/ada/libgnat/s-bitfie.ads
+++ b/gcc/ada/libgnat/s-bitfie.ads
@@ -47,10 +47,9 @@ package System.Bitfields is
pragma Provide_Shift_Operators (Val_2);
type Val is mod 2**Val_Bits with Alignment => Val_Bytes;
- -- ??? It turns out that enabling checks on the instantiation of
- -- System.Bitfield_Utils.G makes a latent visibility bug appear on strict
- -- alignment platforms related to alignment checks. Work around it by
- -- suppressing these checks explicitly.
+ -- Enabling checks on the instantiation of System.Bitfield_Utils.G makes a
+ -- latent visibility bug appear on strict alignment platforms related to
+ -- alignment checks. Work around it by suppressing these checks explicitly.
pragma Suppress (Alignment_Check);
package Utils is new System.Bitfield_Utils.G (Val, Val_2);
@@ -63,4 +62,12 @@ package System.Bitfields is
Size : Utils.Bit_Size)
renames Utils.Copy_Bitfield;
+ function Fast_Copy_Bitfield
+ (Src : Val_2;
+ Src_Offset : Utils.Bit_Offset;
+ Dest : Val_2;
+ Dest_Offset : Utils.Bit_Offset;
+ Size : Utils.Small_Size)
+ return Val_2 renames Utils.Fast_Copy_Bitfield;
+
end System.Bitfields;
diff --git a/gcc/ada/libgnat/s-bituti.adb b/gcc/ada/libgnat/s-bituti.adb
index fbb5389..d571f54 100644
--- a/gcc/ada/libgnat/s-bituti.adb
+++ b/gcc/ada/libgnat/s-bituti.adb
@@ -31,14 +31,6 @@
package body System.Bitfield_Utils is
- -- ???
- --
- -- This code does not yet work for overlapping bit fields. We need to copy
- -- backwards in some cases (i.e. from higher to lower bit addresses).
- -- Alternatively, we could avoid calling this if Forwards_OK is False.
- --
- -- ???
-
package body G is
Val_Bytes : constant Address := Address (Val'Size / Storage_Unit);
@@ -77,7 +69,7 @@ package body System.Bitfield_Utils is
function Get_Bitfield
(Src : Val_2; Src_Offset : Bit_Offset; Size : Small_Size)
- return Val;
+ return Val with Inline;
-- Returns the bit field in Src starting at Src_Offset, of the given
-- Size. If Size < Small_Size'Last, then high order bits are zero.
@@ -86,7 +78,7 @@ package body System.Bitfield_Utils is
Dest : Val_2;
Dest_Offset : Bit_Offset;
Size : Small_Size)
- return Val_2;
+ return Val_2 with Inline;
-- The bit field in Dest starting at Dest_Offset, of the given Size, is
-- set to Src_Value. Src_Value must have high order bits (Size and
-- above) zero. The result is returned as the function result.
@@ -402,11 +394,22 @@ package body System.Bitfield_Utils is
pragma Assert (Al_Src_Address mod Val'Alignment = 0);
pragma Assert (Al_Dest_Address mod Val'Alignment = 0);
begin
+ -- Optimized small case
+
if Size in Small_Size then
Copy_Small_Bitfield
(Al_Src_Address, Al_Src_Offset,
Al_Dest_Address, Al_Dest_Offset,
Size);
+
+ -- Do nothing for zero size. This is necessary to avoid doing invalid
+ -- reads, which are detected by valgrind.
+
+ elsif Size = 0 then
+ null;
+
+ -- Large case
+
else
Copy_Large_Bitfield
(Al_Src_Address, Al_Src_Offset,
@@ -415,6 +418,22 @@ package body System.Bitfield_Utils is
end if;
end Copy_Bitfield;
+ function Fast_Copy_Bitfield
+ (Src : Val_2;
+ Src_Offset : Bit_Offset;
+ Dest : Val_2;
+ Dest_Offset : Bit_Offset;
+ Size : Small_Size)
+ return Val_2 is
+ Result : constant Val_2 := Set_Bitfield
+ (Get_Bitfield (Src, Src_Offset, Size), Dest, Dest_Offset, Size);
+ begin
+ -- No need to explicitly do nothing for zero size case, because Size
+ -- cannot be zero.
+
+ return Result;
+ end Fast_Copy_Bitfield;
+
end G;
end System.Bitfield_Utils;
diff --git a/gcc/ada/libgnat/s-bituti.ads b/gcc/ada/libgnat/s-bituti.ads
index eb1662d..8afee24 100644
--- a/gcc/ada/libgnat/s-bituti.ads
+++ b/gcc/ada/libgnat/s-bituti.ads
@@ -54,7 +54,7 @@ package System.Bitfield_Utils is
-- generic formal, or on a type derived from a generic formal, so they have
-- to be passed in.
--
- -- Endian indicates whether we're on little-endian or big-endian machine.
+ -- Endian indicates whether we're on a little- or big-endian machine.
pragma Elaborate_Body;
@@ -98,9 +98,9 @@ package System.Bitfield_Utils is
pragma Assert (Val_Array'Component_Size = Val'Size);
subtype Bit_Size is Natural; -- Size in bits of a bit field
- subtype Small_Size is Bit_Size range 0 .. Val'Size;
+ subtype Small_Size is Bit_Size range 1 .. Val'Size;
-- Size of a small one
- subtype Bit_Offset is Small_Size range 0 .. Val'Size - 1;
+ subtype Bit_Offset is Small_Size'Base range 0 .. Val'Size - 1;
-- Starting offset
subtype Bit_Offset_In_Byte is Bit_Offset range 0 .. Storage_Unit - 1;
@@ -127,6 +127,20 @@ package System.Bitfield_Utils is
-- D (D_First)'Address, D (D_First)'Bit,
-- Size);
+ function Fast_Copy_Bitfield
+ (Src : Val_2;
+ Src_Offset : Bit_Offset;
+ Dest : Val_2;
+ Dest_Offset : Bit_Offset;
+ Size : Small_Size)
+ return Val_2 with Inline;
+ -- Faster version of Copy_Bitfield, with a different calling convention.
+ -- In particular, we pass by copy rather than passing Addresses. The bit
+ -- field must fit in Val_Bits. Src and Dest must be properly aligned.
+ -- The result is supposed to be assigned back into Dest, as in:
+ --
+ -- Dest := Fast_Copy_Bitfield (Src, ..., Dest, ..., ...);
+
end G;
end System.Bitfield_Utils;
diff --git a/gcc/ada/libgnat/s-putima.adb b/gcc/ada/libgnat/s-putima.adb
index b0fdae2..33960a4 100644
--- a/gcc/ada/libgnat/s-putima.adb
+++ b/gcc/ada/libgnat/s-putima.adb
@@ -29,10 +29,10 @@
-- --
------------------------------------------------------------------------------
+with Ada.Strings.Text_Buffers.Utils;
+use Ada.Strings.Text_Buffers;
+use Ada.Strings.Text_Buffers.Utils;
with Unchecked_Conversion;
-with Ada.Strings.Text_Output.Utils;
-use Ada.Strings.Text_Output;
-use Ada.Strings.Text_Output.Utils;
package body System.Put_Images is
@@ -215,7 +215,7 @@ package body System.Put_Images is
begin
New_Line (S);
Put_7bit (S, '[');
- Indent (S, 1);
+ Increase_Indent (S, 1);
end Array_Before;
procedure Array_Between (S : in out Sink'Class) is
@@ -226,7 +226,7 @@ package body System.Put_Images is
procedure Array_After (S : in out Sink'Class) is
begin
- Outdent (S, 1);
+ Decrease_Indent (S, 1);
Put_7bit (S, ']');
end Array_After;
@@ -244,7 +244,7 @@ package body System.Put_Images is
begin
New_Line (S);
Put_7bit (S, '(');
- Indent (S, 1);
+ Increase_Indent (S, 1);
end Record_Before;
procedure Record_Between (S : in out Sink'Class) is
@@ -255,7 +255,7 @@ package body System.Put_Images is
procedure Record_After (S : in out Sink'Class) is
begin
- Outdent (S, 1);
+ Decrease_Indent (S, 1);
Put_7bit (S, ')');
end Record_After;
@@ -267,7 +267,7 @@ package body System.Put_Images is
procedure Put_Image_Unknown (S : in out Sink'Class; Type_Name : String) is
begin
Put_UTF_8 (S, "{");
- Put_String (S, Type_Name);
+ Put (S, Type_Name);
Put_UTF_8 (S, " object}");
end Put_Image_Unknown;
diff --git a/gcc/ada/libgnat/s-putima.ads b/gcc/ada/libgnat/s-putima.ads
index e94c9b8..4a33e79 100644
--- a/gcc/ada/libgnat/s-putima.ads
+++ b/gcc/ada/libgnat/s-putima.ads
@@ -29,7 +29,7 @@
-- --
------------------------------------------------------------------------------
-with Ada.Strings.Text_Output;
+with Ada.Strings.Text_Buffers;
with System.Unsigned_Types;
package System.Put_Images with Pure is
@@ -50,7 +50,7 @@ package System.Put_Images with Pure is
pragma Preelaborate;
- subtype Sink is Ada.Strings.Text_Output.Sink;
+ subtype Sink is Ada.Strings.Text_Buffers.Root_Buffer_Type;
procedure Put_Image_Integer (S : in out Sink'Class; X : Integer);
procedure Put_Image_Long_Long_Integer
diff --git a/gcc/ada/libgnat/s-rannum.adb b/gcc/ada/libgnat/s-rannum.adb
index 8769167..92a91a6 100644
--- a/gcc/ada/libgnat/s-rannum.adb
+++ b/gcc/ada/libgnat/s-rannum.adb
@@ -86,7 +86,6 @@
-- --
------------------------------------------------------------------------------
-with Ada.Strings.Text_Output.Utils;
with Ada.Unchecked_Conversion;
with System.Random_Seed;
@@ -178,7 +177,10 @@ is
function Random (Gen : Generator) return Unsigned_32 is
G : Generator renames Gen.Writable.Self.all;
Y : State_Val;
- I : Integer; -- should avoid use of identifier I ???
+ I : Integer;
+ -- Naming exception: I is fine to use here as it is the name used in
+ -- the original paper describing the Mersenne Twister and in common
+ -- descriptions of the algorithm.
begin
I := G.I;
@@ -686,9 +688,9 @@ is
---------------
procedure Put_Image
- (S : in out Strings.Text_Output.Sink'Class; V : State) is
+ (S : in out Strings.Text_Buffers.Root_Buffer_Type'Class; V : State) is
begin
- Strings.Text_Output.Utils.Put_String (S, Image (V));
+ Strings.Text_Buffers.Put (S, Image (V));
end Put_Image;
-----------
diff --git a/gcc/ada/libgnat/s-rannum.ads b/gcc/ada/libgnat/s-rannum.ads
index 855b5b5..99ed57d 100644
--- a/gcc/ada/libgnat/s-rannum.ads
+++ b/gcc/ada/libgnat/s-rannum.ads
@@ -57,7 +57,7 @@
with Interfaces;
-private with Ada.Strings.Text_Output;
+private with Ada.Strings.Text_Buffers;
package System.Random_Numbers with
SPARK_Mode => Off
@@ -148,7 +148,7 @@ private
type State is array (0 .. N - 1) of State_Val with Put_Image => Put_Image;
procedure Put_Image
- (S : in out Ada.Strings.Text_Output.Sink'Class; V : State);
+ (S : in out Ada.Strings.Text_Buffers.Root_Buffer_Type'Class; V : State);
type Writable_Access (Self : access Generator) is limited null record;
-- Auxiliary type to make Generator a self-referential type
@@ -162,7 +162,9 @@ private
I : Integer := N;
-- Current starting position in shift register S (N means uninitialized)
- -- We should avoid using the identifier I here ???
+ -- Naming exception: I is fine to use here as it is the name used in the
+ -- original paper describing the Mersenne Twister and in common
+ -- descriptions of the algorithm.
end record;
end System.Random_Numbers;
diff --git a/gcc/ada/libgnat/s-vaen16.ads b/gcc/ada/libgnat/s-vaen16.ads
index f119778..86cdaa1 100644
--- a/gcc/ada/libgnat/s-vaen16.ads
+++ b/gcc/ada/libgnat/s-vaen16.ads
@@ -30,7 +30,7 @@
------------------------------------------------------------------------------
-- Instantiation of System.Value_N for enumeration types whose names table
--- has a length that fits in a 16-bit but not a 8-bit integer.
+-- has a length that fits in a 16-bit but not an 8-bit integer.
with Interfaces;
with System.Value_N;
@@ -49,4 +49,13 @@ package System.Val_Enum_16 is
return Natural
renames Impl.Value_Enumeration;
+ function Valid_Enumeration_Value_16
+ (Names : String;
+ Indexes : System.Address;
+ Hash : Impl.Hash_Function_Ptr;
+ Num : Natural;
+ Str : String)
+ return Boolean
+ renames Impl.Valid_Enumeration_Value;
+
end System.Val_Enum_16;
diff --git a/gcc/ada/libgnat/s-vaen32.ads b/gcc/ada/libgnat/s-vaen32.ads
index ba24af3..0dead07 100644
--- a/gcc/ada/libgnat/s-vaen32.ads
+++ b/gcc/ada/libgnat/s-vaen32.ads
@@ -49,4 +49,13 @@ package System.Val_Enum_32 is
return Natural
renames Impl.Value_Enumeration;
+ function Valid_Enumeration_Value_32
+ (Names : String;
+ Indexes : System.Address;
+ Hash : Impl.Hash_Function_Ptr;
+ Num : Natural;
+ Str : String)
+ return Boolean
+ renames Impl.Valid_Enumeration_Value;
+
end System.Val_Enum_32;
diff --git a/gcc/ada/libgnat/s-vaenu8.ads b/gcc/ada/libgnat/s-vaenu8.ads
index 4de9b0e..db0b360 100644
--- a/gcc/ada/libgnat/s-vaenu8.ads
+++ b/gcc/ada/libgnat/s-vaenu8.ads
@@ -30,7 +30,7 @@
------------------------------------------------------------------------------
-- Instantiation of System.Value_N for enumeration types whose names table
--- has a length that fits in a 8-bit integer.
+-- has a length that fits in an 8-bit integer.
with Interfaces;
with System.Value_N;
@@ -49,4 +49,13 @@ package System.Val_Enum_8 is
return Natural
renames Impl.Value_Enumeration;
+ function Valid_Enumeration_Value_8
+ (Names : String;
+ Indexes : System.Address;
+ Hash : Impl.Hash_Function_Ptr;
+ Num : Natural;
+ Str : String)
+ return Boolean
+ renames Impl.Valid_Enumeration_Value;
+
end System.Val_Enum_8;
diff --git a/gcc/ada/libgnat/s-valuen.adb b/gcc/ada/libgnat/s-valuen.adb
index 08d1a738..7b72bc6 100644
--- a/gcc/ada/libgnat/s-valuen.adb
+++ b/gcc/ada/libgnat/s-valuen.adb
@@ -35,22 +35,21 @@ with System.Val_Util; use System.Val_Util;
package body System.Value_N is
- -----------------------
- -- Value_Enumeration --
- -----------------------
+ ---------------------------
+ -- Value_Enumeration_Pos --
+ ---------------------------
- function Value_Enumeration
+ function Value_Enumeration_Pos
(Names : String;
Indexes : System.Address;
Hash : Hash_Function_Ptr;
Num : Natural;
Str : String)
- return Natural
+ return Integer
is
- F : Natural;
- L : Natural;
- H : Natural;
- S : String (Str'Range) := Str;
+ F, L : Integer;
+ H : Natural;
+ S : String (Str'Range) := Str;
subtype Names_Index is
Index_Type range Index_Type (Names'First)
@@ -69,32 +68,75 @@ package body System.Value_N is
begin
Normalize_String (S, F, L);
- -- If we have a valid hash value, do a single lookup
+ declare
+ Normal : String renames S (F .. L);
- H := (if Hash /= null then Hash.all (S (F .. L)) else Natural'Last);
+ begin
+ -- If we have a valid hash value, do a single lookup
- if H /= Natural'Last then
- if Names
- (Natural (IndexesT (H)) ..
- Natural (IndexesT (H + 1)) - 1) = S (F .. L)
- then
- return H;
- end if;
-
- -- Otherwise do a linear search
+ H := (if Hash /= null then Hash.all (Normal) else Natural'Last);
- else
- for J in 0 .. Num loop
+ if H /= Natural'Last then
if Names
- (Natural (IndexesT (J)) ..
- Natural (IndexesT (J + 1)) - 1) = S (F .. L)
+ (Natural (IndexesT (H)) ..
+ Natural (IndexesT (H + 1)) - 1) = Normal
then
- return J;
+ return H;
end if;
- end loop;
- end if;
- Bad_Value (Str);
+ -- Otherwise do a linear search
+
+ else
+ for J in 0 .. Num loop
+ if Names
+ (Natural (IndexesT (J)) ..
+ Natural (IndexesT (J + 1)) - 1) = Normal
+ then
+ return J;
+ end if;
+ end loop;
+ end if;
+ end;
+
+ return Invalid;
+ end Value_Enumeration_Pos;
+
+ -----------------------
+ -- Value_Enumeration --
+ -----------------------
+
+ function Value_Enumeration
+ (Names : String;
+ Indexes : System.Address;
+ Hash : Hash_Function_Ptr;
+ Num : Natural;
+ Str : String)
+ return Natural
+ is
+ Result : constant Integer :=
+ Value_Enumeration_Pos (Names, Indexes, Hash, Num, Str);
+ begin
+ if Result = Invalid then
+ Bad_Value (Str);
+ else
+ return Result;
+ end if;
end Value_Enumeration;
+ -----------------------------
+ -- Valid_Enumeration_Value --
+ -----------------------------
+
+ function Valid_Enumeration_Value
+ (Names : String;
+ Indexes : System.Address;
+ Hash : Hash_Function_Ptr;
+ Num : Natural;
+ Str : String)
+ return Boolean
+ is
+ begin
+ return Value_Enumeration_Pos (Names, Indexes, Hash, Num, Str) /= Invalid;
+ end Valid_Enumeration_Value;
+
end System.Value_N;
diff --git a/gcc/ada/libgnat/s-valuen.ads b/gcc/ada/libgnat/s-valuen.ads
index dafa451..7ef0539 100644
--- a/gcc/ada/libgnat/s-valuen.ads
+++ b/gcc/ada/libgnat/s-valuen.ads
@@ -48,7 +48,7 @@ package System.Value_N is
Hash : Hash_Function_Ptr;
Num : Natural;
Str : String)
- return Natural;
+ return Natural with Inline;
-- Used to compute Enum'Value (Str) where Enum is some enumeration type
-- other than those defined in package Standard. Names is a string with
-- a lower bound of 1 containing the characters of all the enumeration
@@ -67,4 +67,28 @@ package System.Value_N is
-- If the image is found in Names, then the corresponding Pos value is
-- returned. If not, Constraint_Error is raised.
+ function Valid_Enumeration_Value
+ (Names : String;
+ Indexes : System.Address;
+ Hash : Hash_Function_Ptr;
+ Num : Natural;
+ Str : String)
+ return Boolean with Inline;
+ -- Returns True if Str is a valid Image of some enumeration literal, False
+ -- otherwise. That is, returns False if and only if Value_Enumeration would
+ -- raise Constraint_Error. The parameters have the same meaning as for
+ -- Value_Enumeration.
+
+ Invalid : constant Integer := -1;
+
+ function Value_Enumeration_Pos
+ (Names : String;
+ Indexes : System.Address;
+ Hash : Hash_Function_Ptr;
+ Num : Natural;
+ Str : String)
+ return Integer with Pure_Function;
+ -- Same as Value_Enumeration, except returns Invalid if Value_Enumeration
+ -- would raise Constraint_Error.
+
end System.Value_N;
diff --git a/gcc/ada/libgnat/s-valuti.adb b/gcc/ada/libgnat/s-valuti.adb
index 1ad758b..31edc40 100644
--- a/gcc/ada/libgnat/s-valuti.adb
+++ b/gcc/ada/libgnat/s-valuti.adb
@@ -68,10 +68,10 @@ package body System.Val_Util is
F := F + 1;
end loop;
- -- Check for case when the string contained no characters
+ -- Case of no nonspace characters found
if F > L then
- Bad_Value (S);
+ return;
end if;
-- Scan for trailing spaces
diff --git a/gcc/ada/libgnat/s-valuti.ads b/gcc/ada/libgnat/s-valuti.ads
index 07b2c77..3d426d9 100644
--- a/gcc/ada/libgnat/s-valuti.ads
+++ b/gcc/ada/libgnat/s-valuti.ads
@@ -45,9 +45,7 @@ package System.Val_Util is
-- non-blank character of S and L to be the index of the last non-blank
-- character of S. Any lower case characters present in S will be folded to
-- their upper case equivalent except for character literals. If S consists
- -- of entirely blanks then Constraint_Error is raised.
- --
- -- Note: if S is the null string, F is set to S'First, L to S'Last
+ -- of entirely blanks (including when S = "") then we return with F > L.
procedure Scan_Sign
(Str : String;
diff --git a/gcc/ada/opt.ads b/gcc/ada/opt.ads
index 827bbef..3786d2c 100644
--- a/gcc/ada/opt.ads
+++ b/gcc/ada/opt.ads
@@ -191,6 +191,8 @@ package Opt is
-- are valid and in range of their representations. This feature is now
-- fully enabled in the compiler.
+ -- WARNING: There is a matching C declaration of this variable in fe.h
+
Back_Annotate_Rep_Info : Boolean := False;
-- GNAT
-- If set True, enables back annotation of representation information
@@ -1651,7 +1653,8 @@ package Opt is
Unique_Error_Tag : Boolean := Tag_Errors;
-- GNAT
-- Indicates if error messages are to be prefixed by the string error:
- -- Initialized from Tag_Errors, can be forced on with the -gnatU switch.
+ -- Initialized from Tag_Errors, can be forced on with the -gnatU switch and
+ -- disabled with -gnatd_U.
Unnest_Subprogram_Mode : Boolean := False;
-- If true, activates the circuitry for unnesting subprograms (see the spec
diff --git a/gcc/ada/par-ch11.adb b/gcc/ada/par-ch11.adb
index 87751d1..8304c3e 100644
--- a/gcc/ada/par-ch11.adb
+++ b/gcc/ada/par-ch11.adb
@@ -233,6 +233,24 @@ package body Ch11 is
Set_Expression (Raise_Node, P_Expression);
end if;
+ if Token = Tok_When then
+ Error_Msg_GNAT_Extension ("raise when statement");
+
+ Mutate_Nkind (Raise_Node, N_Raise_When_Statement);
+
+ if Token = Tok_When and then not Missing_Semicolon_On_When then
+ Scan; -- past WHEN
+ Set_Condition (Raise_Node, P_Expression_No_Right_Paren);
+
+ -- Allow IF instead of WHEN, giving error message
+
+ elsif Token = Tok_If then
+ T_When;
+ Scan; -- past IF used in place of WHEN
+ Set_Condition (Raise_Node, P_Expression_No_Right_Paren);
+ end if;
+ end if;
+
TF_Semicolon;
return Raise_Node;
end P_Raise_Statement;
diff --git a/gcc/ada/par-ch12.adb b/gcc/ada/par-ch12.adb
index ba11a99..eac3643 100644
--- a/gcc/ada/par-ch12.adb
+++ b/gcc/ada/par-ch12.adb
@@ -559,6 +559,20 @@ package body Ch12 is
if Def_Node /= Error then
Set_Formal_Type_Definition (Decl_Node, Def_Node);
+
+ if Token = Tok_Or then
+ Error_Msg_Ada_2022_Feature
+ ("default for formal type", Sloc (Decl_Node));
+ Scan; -- Past OR
+
+ if Token /= Tok_Use then
+ Error_Msg_SC ("missing USE for default subtype");
+ else
+ Scan; -- Past USE
+ Set_Default_Subtype_Mark (Decl_Node, P_Name);
+ end if;
+ end if;
+
P_Aspect_Specifications (Decl_Node);
else
@@ -727,11 +741,18 @@ package body Ch12 is
return Error;
end if;
+ when Tok_Or =>
+ -- Ada_2022: incomplete type with default
+ return
+ New_Node (N_Formal_Incomplete_Type_Definition, Token_Ptr);
+
when Tok_Private =>
return P_Formal_Private_Type_Definition;
when Tok_Tagged =>
- if Next_Token_Is (Tok_Semicolon) then
+ if Next_Token_Is (Tok_Semicolon)
+ or else Next_Token_Is (Tok_Or)
+ then
Typedef_Node :=
New_Node (N_Formal_Incomplete_Type_Definition, Token_Ptr);
Set_Tagged_Present (Typedef_Node);
diff --git a/gcc/ada/par-ch5.adb b/gcc/ada/par-ch5.adb
index a702431..608ebd0 100644
--- a/gcc/ada/par-ch5.adb
+++ b/gcc/ada/par-ch5.adb
@@ -1905,47 +1905,6 @@ package body Ch5 is
function P_Exit_Statement return Node_Id is
Exit_Node : Node_Id;
- function Missing_Semicolon_On_Exit return Boolean;
- -- This function deals with the following specialized situation
- --
- -- when 'x' =>
- -- exit [identifier]
- -- when 'y' =>
- --
- -- This looks like a messed up EXIT WHEN, when in fact the problem
- -- is a missing semicolon. It is called with Token pointing to the
- -- WHEN token, and returns True if a semicolon is missing before
- -- the WHEN as in the above example.
-
- -------------------------------
- -- Missing_Semicolon_On_Exit --
- -------------------------------
-
- function Missing_Semicolon_On_Exit return Boolean is
- State : Saved_Scan_State;
-
- begin
- if not Token_Is_At_Start_Of_Line then
- return False;
-
- elsif Scopes (Scope.Last).Etyp /= E_Case then
- return False;
-
- else
- Save_Scan_State (State);
- Scan; -- past WHEN
- Scan; -- past token after WHEN
-
- if Token = Tok_Arrow then
- Restore_Scan_State (State);
- return True;
- else
- Restore_Scan_State (State);
- return False;
- end if;
- end if;
- end Missing_Semicolon_On_Exit;
-
-- Start of processing for P_Exit_Statement
begin
@@ -1975,7 +1934,7 @@ package body Ch5 is
end loop Check_No_Exit_Name;
end if;
- if Token = Tok_When and then not Missing_Semicolon_On_Exit then
+ if Token = Tok_When and then not Missing_Semicolon_On_When then
Scan; -- past WHEN
Set_Condition (Exit_Node, P_Condition);
@@ -2010,7 +1969,15 @@ package body Ch5 is
Scan; -- past GOTO (or TO)
Set_Name (Goto_Node, P_Qualified_Simple_Name_Resync);
Append_Elmt (Goto_Node, Goto_List);
- No_Constraint;
+
+ if Token = Tok_When then
+ Error_Msg_GNAT_Extension ("goto when statement");
+
+ Scan; -- past WHEN
+ Mutate_Nkind (Goto_Node, N_Goto_When_Statement);
+ Set_Condition (Goto_Node, P_Expression_No_Right_Paren);
+ end if;
+
TF_Semicolon;
return Goto_Node;
end P_Goto_Statement;
diff --git a/gcc/ada/par-ch6.adb b/gcc/ada/par-ch6.adb
index 9d4f736..45a4214 100644
--- a/gcc/ada/par-ch6.adb
+++ b/gcc/ada/par-ch6.adb
@@ -1874,18 +1874,20 @@ package body Ch6 is
function P_Return_Statement return Node_Id is
-- The caller has checked that the initial token is RETURN
- function Is_Simple return Boolean;
+ type Return_Kind is (Simple_Return, Extended_Return, Return_When);
+
+ function Get_Return_Kind return Return_Kind;
-- Scan state is just after RETURN (and is left that way). Determine
-- whether this is a simple or extended return statement by looking
-- ahead for "identifier :", which implies extended.
- ---------------
- -- Is_Simple --
- ---------------
+ ---------------------
+ -- Get_Return_Kind --
+ ---------------------
- function Is_Simple return Boolean is
+ function Get_Return_Kind return Return_Kind is
Scan_State : Saved_Scan_State;
- Result : Boolean := True;
+ Result : Return_Kind := Simple_Return;
begin
if Token = Tok_Identifier then
@@ -1893,18 +1895,22 @@ package body Ch6 is
Scan; -- past identifier
if Token = Tok_Colon then
- Result := False; -- It's an extended_return_statement.
+ Result := Extended_Return; -- It's an extended_return_statement
+ elsif Token = Tok_When then
+ Error_Msg_GNAT_Extension ("return when statement");
+
+ Result := Return_When;
end if;
Restore_Scan_State (Scan_State); -- to identifier
end if;
return Result;
- end Is_Simple;
+ end Get_Return_Kind;
Ret_Sloc : constant Source_Ptr := Token_Ptr;
Ret_Strt : constant Column_Number := Start_Column;
- Ret_Node : Node_Id;
+ Ret_Node : Node_Id := New_Node (N_Simple_Return_Statement, Ret_Sloc);
Decl : Node_Id;
-- Start of processing for P_Return_Statement
@@ -1917,7 +1923,6 @@ package body Ch6 is
if Token = Tok_Semicolon then
Scan; -- past ;
- Ret_Node := New_Node (N_Simple_Return_Statement, Ret_Sloc);
-- Nontrivial case
@@ -1928,41 +1933,65 @@ package body Ch6 is
-- expression terminator since in that case the best error
-- message is probably that we have a missing semicolon.
- if Is_Simple then
- Ret_Node := New_Node (N_Simple_Return_Statement, Ret_Sloc);
+ case Get_Return_Kind is
+ -- Return_when_statement (Experimental only)
- if Token not in Token_Class_Eterm then
- Set_Expression (Ret_Node, P_Expression_No_Right_Paren);
- end if;
+ when Return_When =>
+ Ret_Node := New_Node (N_Return_When_Statement, Ret_Sloc);
- -- Extended_return_statement (Ada 2005 only -- AI-318):
+ if Token not in Token_Class_Eterm then
+ Set_Expression (Ret_Node, P_Expression_No_Right_Paren);
+ end if;
- else
- Error_Msg_Ada_2005_Extension ("extended return statement");
+ if Token = Tok_When and then not Missing_Semicolon_On_When then
+ Scan; -- past WHEN
+ Set_Condition (Ret_Node, P_Condition);
- Ret_Node := New_Node (N_Extended_Return_Statement, Ret_Sloc);
- Decl := P_Return_Object_Declaration;
- Set_Return_Object_Declarations (Ret_Node, New_List (Decl));
+ -- Allow IF instead of WHEN, giving error message
- if Token = Tok_With then
- P_Aspect_Specifications (Decl, False);
- end if;
+ elsif Token = Tok_If then
+ T_When;
+ Scan; -- past IF used in place of WHEN
+ Set_Condition (Ret_Node, P_Expression_No_Right_Paren);
+ end if;
- if Token = Tok_Do then
- Push_Scope_Stack;
- Scopes (Scope.Last).Ecol := Ret_Strt;
- Scopes (Scope.Last).Etyp := E_Return;
- Scopes (Scope.Last).Labl := Error;
- Scopes (Scope.Last).Sloc := Ret_Sloc;
+ -- Simple_return_statement
- Scan; -- past DO
- Set_Handled_Statement_Sequence
- (Ret_Node, P_Handled_Sequence_Of_Statements);
- End_Statements;
+ when Simple_Return =>
+ Ret_Node := New_Node (N_Simple_Return_Statement, Ret_Sloc);
- -- Do we need to handle Error_Resync here???
- end if;
- end if;
+ if Token not in Token_Class_Eterm then
+ Set_Expression (Ret_Node, P_Expression_No_Right_Paren);
+ end if;
+
+ -- Extended_return_statement (Ada 2005 only -- AI-318):
+
+ when Extended_Return =>
+ Error_Msg_Ada_2005_Extension ("extended return statement");
+
+ Ret_Node := New_Node (N_Extended_Return_Statement, Ret_Sloc);
+ Decl := P_Return_Object_Declaration;
+ Set_Return_Object_Declarations (Ret_Node, New_List (Decl));
+
+ if Token = Tok_With then
+ P_Aspect_Specifications (Decl, False);
+ end if;
+
+ if Token = Tok_Do then
+ Push_Scope_Stack;
+ Scopes (Scope.Last).Ecol := Ret_Strt;
+ Scopes (Scope.Last).Etyp := E_Return;
+ Scopes (Scope.Last).Labl := Error;
+ Scopes (Scope.Last).Sloc := Ret_Sloc;
+
+ Scan; -- past DO
+ Set_Handled_Statement_Sequence
+ (Ret_Node, P_Handled_Sequence_Of_Statements);
+ End_Statements;
+
+ -- Do we need to handle Error_Resync here???
+ end if;
+ end case;
TF_Semicolon;
end if;
diff --git a/gcc/ada/par-util.adb b/gcc/ada/par-util.adb
index 149b1a1..f4179b9 100644
--- a/gcc/ada/par-util.adb
+++ b/gcc/ada/par-util.adb
@@ -630,6 +630,35 @@ package body Util is
Scan;
end Merge_Identifier;
+ -------------------------------
+ -- Missing_Semicolon_On_When --
+ -------------------------------
+
+ function Missing_Semicolon_On_When return Boolean is
+ State : Saved_Scan_State;
+
+ begin
+ if not Token_Is_At_Start_Of_Line then
+ return False;
+
+ elsif Scopes (Scope.Last).Etyp /= E_Case then
+ return False;
+
+ else
+ Save_Scan_State (State);
+ Scan; -- past WHEN
+ Scan; -- past token after WHEN
+
+ if Token = Tok_Arrow then
+ Restore_Scan_State (State);
+ return True;
+ else
+ Restore_Scan_State (State);
+ return False;
+ end if;
+ end if;
+ end Missing_Semicolon_On_When;
+
-------------------
-- Next_Token_Is --
-------------------
diff --git a/gcc/ada/par.adb b/gcc/ada/par.adb
index 67339f1..649d2a0 100644
--- a/gcc/ada/par.adb
+++ b/gcc/ada/par.adb
@@ -1351,6 +1351,18 @@ function Par (Configuration_Pragmas : Boolean) return List_Id is
-- conditions are met, an error message is issued, and the merge is
-- carried out, modifying the Chars field of Prev.
+ function Missing_Semicolon_On_When return Boolean;
+ -- This function deals with the following specialized situations
+ --
+ -- when 'x' =>
+ -- exit/return [identifier]
+ -- when 'y' =>
+ --
+ -- This looks like a messed up EXIT WHEN or RETURN WHEN, when in fact
+ -- the problem is a missing semicolon. It is called with Token pointing
+ -- to the WHEN token, and returns True if a semicolon is missing before
+ -- the WHEN as in the above example.
+
function Next_Token_Is (Tok : Token_Type) return Boolean;
-- Looks at token after current one and returns True if the token type
-- matches Tok. The scan is unconditionally restored on return.
diff --git a/gcc/ada/repinfo.adb b/gcc/ada/repinfo.adb
index d9dc5b8..137c867 100644
--- a/gcc/ada/repinfo.adb
+++ b/gcc/ada/repinfo.adb
@@ -2030,7 +2030,7 @@ package body Repinfo is
if List_Representation_Info_To_JSON then
Write_Line (",");
Write_Str (" ""Small"": ");
- UR_Write (Small_Value (Ent));
+ UR_Write_To_JSON (Small_Value (Ent));
else
Write_Str ("for ");
List_Name (Ent);
@@ -2052,9 +2052,9 @@ package body Repinfo is
if List_Representation_Info_To_JSON then
Write_Line (",");
Write_Str (" ""Range"": [ ");
- UR_Write (Realval (Low_Bound (R)));
+ UR_Write_To_JSON (Realval (Low_Bound (R)));
Write_Str (", ");
- UR_Write (Realval (High_Bound (R)));
+ UR_Write_To_JSON (Realval (High_Bound (R)));
Write_Str (" ]");
else
Write_Str ("for ");
diff --git a/gcc/ada/rtsfind.adb b/gcc/ada/rtsfind.adb
index 175bc14..6fe6f85 100644
--- a/gcc/ada/rtsfind.adb
+++ b/gcc/ada/rtsfind.adb
@@ -574,10 +574,11 @@ package body Rtsfind is
range Ada_Streams_Stream_IO .. Ada_Streams_Stream_IO;
subtype Ada_Strings_Descendant is Ada_Descendant
- range Ada_Strings_Superbounded .. Ada_Strings_Text_Output_Buffers;
+ range Ada_Strings_Superbounded .. Ada_Strings_Text_Buffers_Unbounded;
- subtype Ada_Strings_Text_Output_Descendant is Ada_Strings_Descendant
- range Ada_Strings_Text_Output_Utils .. Ada_Strings_Text_Output_Buffers;
+ subtype Ada_Strings_Text_Buffers_Descendant is Ada_Strings_Descendant
+ range Ada_Strings_Text_Buffers_Unbounded ..
+ Ada_Strings_Text_Buffers_Unbounded;
subtype Ada_Text_IO_Descendant is Ada_Descendant
range Ada_Text_IO_Decimal_IO .. Ada_Text_IO_Modular_IO;
@@ -661,8 +662,8 @@ package body Rtsfind is
elsif U_Id in Ada_Strings_Descendant then
Name_Buffer (12) := '.';
- if U_Id in Ada_Strings_Text_Output_Descendant then
- Name_Buffer (24) := '.';
+ if U_Id in Ada_Strings_Text_Buffers_Descendant then
+ Name_Buffer (25) := '.';
end if;
elsif U_Id in Ada_Text_IO_Descendant then
diff --git a/gcc/ada/rtsfind.ads b/gcc/ada/rtsfind.ads
index ef17cf2..df51477 100644
--- a/gcc/ada/rtsfind.ads
+++ b/gcc/ada/rtsfind.ads
@@ -126,12 +126,11 @@ package Rtsfind is
Ada_Strings_Wide_Superbounded,
Ada_Strings_Wide_Wide_Superbounded,
Ada_Strings_Unbounded,
- Ada_Strings_Text_Output,
+ Ada_Strings_Text_Buffers,
- -- Children of Ada.Strings.Text_Output
+ -- Children of Ada.Strings.Text_Buffers
- Ada_Strings_Text_Output_Utils,
- Ada_Strings_Text_Output_Buffers,
+ Ada_Strings_Text_Buffers_Unbounded,
-- Children of Ada.Text_IO (for Check_Text_IO_Special_Unit)
@@ -604,15 +603,14 @@ package Rtsfind is
RE_Unbounded_String, -- Ada.Strings.Unbounded
- RE_Sink, -- Ada.Strings.Text_Output
+ RE_Root_Buffer_Type, -- Ada.Strings.Text_Buffers
+ RE_Put_UTF_8, -- Ada.Strings.Text_Buffers
+ RE_Wide_Wide_Put, -- Ada.Strings.Text_Buffers
- RE_Put_UTF_8, -- Ada.Strings.Text_Output.Utils
- RE_Put_Wide_Wide_String, -- Ada.Strings.Text_Output.Utils
-
- RE_Buffer, -- Ada.Strings.Text_Output.Buffers
- RE_New_Buffer, -- Ada.Strings.Text_Output.Buffers
- RE_Destroy, -- Ada.Strings.Text_Output.Buffers
- RE_Get, -- Ada.Strings.Text_Output.Buffers
+ RE_Buffer_Type, -- Ada.Strings.Text_Buffers.Unbounded
+ RE_Get, -- Ada.Strings.Text_Buffers.Unbounded
+ RE_Wide_Get, -- Ada.Strings.Text_Buffers.Unbounded
+ RE_Wide_Wide_Get, -- Ada.Strings.Text_Buffers.Unbounded
RE_Wait_For_Release, -- Ada.Synchronous_Barriers
@@ -838,7 +836,9 @@ package Rtsfind is
RE_To_Bignum, -- System.Bignums
RE_From_Bignum, -- System.Bignums
+ RE_Val_2, -- System.Bitfields
RE_Copy_Bitfield, -- System.Bitfields
+ RE_Fast_Copy_Bitfield, -- System.Bitfields
RE_Bit_And, -- System.Bit_Ops
RE_Bit_Eq, -- System.Bit_Ops
@@ -2036,9 +2036,13 @@ package Rtsfind is
RE_Value_Decimal128, -- System_Val_Decimal_128
- RE_Value_Enumeration_8, -- System.Val_Enum
- RE_Value_Enumeration_16, -- System.Val_Enum
- RE_Value_Enumeration_32, -- System.Val_Enum
+ RE_Value_Enumeration_8, -- System.Val_Enum_8
+ RE_Value_Enumeration_16, -- System.Val_Enum_16
+ RE_Value_Enumeration_32, -- System.Val_Enum_32
+
+ RE_Valid_Enumeration_Value_8, -- System.Val_Enum_8
+ RE_Valid_Enumeration_Value_16, -- System.Val_Enum_16
+ RE_Valid_Enumeration_Value_32, -- System.Val_Enum_32
RE_Value_Fixed32, -- System_Val_Fixed_32
@@ -2280,15 +2284,14 @@ package Rtsfind is
RE_Unbounded_String => Ada_Strings_Unbounded,
- RE_Sink => Ada_Strings_Text_Output,
-
- RE_Put_UTF_8 => Ada_Strings_Text_Output_Utils,
- RE_Put_Wide_Wide_String => Ada_Strings_Text_Output_Utils,
+ RE_Root_Buffer_Type => Ada_Strings_Text_Buffers,
+ RE_Put_UTF_8 => Ada_Strings_Text_Buffers,
+ RE_Wide_Wide_Put => Ada_Strings_Text_Buffers,
- RE_Buffer => Ada_Strings_Text_Output_Buffers,
- RE_New_Buffer => Ada_Strings_Text_Output_Buffers,
- RE_Destroy => Ada_Strings_Text_Output_Buffers,
- RE_Get => Ada_Strings_Text_Output_Buffers,
+ RE_Buffer_Type => Ada_Strings_Text_Buffers_Unbounded,
+ RE_Get => Ada_Strings_Text_Buffers_Unbounded,
+ RE_Wide_Get => Ada_Strings_Text_Buffers_Unbounded,
+ RE_Wide_Wide_Get => Ada_Strings_Text_Buffers_Unbounded,
RE_Wait_For_Release => Ada_Synchronous_Barriers,
@@ -2514,7 +2517,9 @@ package Rtsfind is
RE_To_Bignum => System_Bignums,
RE_From_Bignum => System_Bignums,
+ RE_Val_2 => System_Bitfields,
RE_Copy_Bitfield => System_Bitfields,
+ RE_Fast_Copy_Bitfield => System_Bitfields,
RE_Bit_And => System_Bit_Ops,
RE_Bit_Eq => System_Bit_Ops,
@@ -3726,6 +3731,12 @@ package Rtsfind is
RE_Value_Enumeration_32 => System_Val_Enum_32,
+ RE_Valid_Enumeration_Value_8 => System_Val_Enum_8,
+
+ RE_Valid_Enumeration_Value_16 => System_Val_Enum_16,
+
+ RE_Valid_Enumeration_Value_32 => System_Val_Enum_32,
+
RE_Value_Fixed32 => System_Val_Fixed_32,
RE_Value_Fixed64 => System_Val_Fixed_64,
@@ -4074,10 +4085,11 @@ package Rtsfind is
-- and without generating an error message, i.e. if the call will obtain
-- the desired entity without any problems.
--
- -- If we call this and it returns True, we should generate a call to E.
- -- In other words, the compiler should not call RTE_Available (E) until
- -- it has decided it wants to generate a call to E. Otherwise we can get
- -- spurious dependencies and elaboration orders.
+ -- If we call this and it returns True, we should generate a reference to
+ -- E (usually a call). In other words, for a subprogram E, the compiler
+ -- should not call RTE_Available (E) until it has decided it wants to
+ -- generate a call to E. Otherwise we can get spurious dependencies and
+ -- elaboration orders.
--
-- if RTE_Available (E) -- WRONG!
-- and then <some condition>
diff --git a/gcc/ada/sem.adb b/gcc/ada/sem.adb
index a3deef5..783c94aa 100644
--- a/gcc/ada/sem.adb
+++ b/gcc/ada/sem.adb
@@ -298,6 +298,9 @@ package body Sem is
when N_Goto_Statement =>
Analyze_Goto_Statement (N);
+ when N_Goto_When_Statement =>
+ Analyze_Goto_When_Statement (N);
+
when N_Handled_Sequence_Of_Statements =>
Analyze_Handled_Statements (N);
@@ -505,6 +508,9 @@ package body Sem is
when N_Raise_Statement =>
Analyze_Raise_Statement (N);
+ when N_Raise_When_Statement =>
+ Analyze_Raise_When_Statement (N);
+
when N_Raise_xxx_Error =>
Analyze_Raise_xxx_Error (N);
@@ -526,6 +532,9 @@ package body Sem is
when N_Requeue_Statement =>
Analyze_Requeue (N);
+ when N_Return_When_Statement =>
+ Analyze_Return_When_Statement (N);
+
when N_Simple_Return_Statement =>
Analyze_Simple_Return_Statement (N);
diff --git a/gcc/ada/sem_attr.adb b/gcc/ada/sem_attr.adb
index 46c3d65..b7297e5 100644
--- a/gcc/ada/sem_attr.adb
+++ b/gcc/ada/sem_attr.adb
@@ -324,7 +324,8 @@ package body Sem_Attr is
procedure Check_Enum_Image (Check_Enumeration_Maps : Boolean := False);
-- Common processing for the Image and Value family of attributes,
- -- including their Wide and Wide_Wide versions, Enum_Val and Img.
+ -- including their Wide and Wide_Wide versions, Enum_Val, Img,
+ -- and Valid_Value.
--
-- If the prefix type of an attribute is an enumeration type, set all
-- its literals as referenced, since the attribute function can
@@ -388,6 +389,9 @@ package body Sem_Attr is
procedure Check_Real_Type;
-- Verify that prefix of attribute N is fixed or float type
+ procedure Check_Enumeration_Type;
+ -- Verify that prefix of attribute N is an enumeration type
+
procedure Check_Scalar_Type;
-- Verify that prefix of attribute N is a scalar type
@@ -1983,6 +1987,7 @@ package body Sem_Attr is
pragma Assert
(Check_Enumeration_Maps = (Attr_Id in Attribute_Image
| Attribute_Img
+ | Attribute_Valid_Value
| Attribute_Value
| Attribute_Wide_Image
| Attribute_Wide_Value
@@ -2363,6 +2368,19 @@ package body Sem_Attr is
end if;
end Check_Real_Type;
+ ----------------------------
+ -- Check_Enumeration_Type --
+ ----------------------------
+
+ procedure Check_Enumeration_Type is
+ begin
+ Check_Type;
+
+ if not Is_Enumeration_Type (P_Type) then
+ Error_Attr_P ("prefix of % attribute must be enumeration type");
+ end if;
+ end Check_Enumeration_Type;
+
-----------------------
-- Check_Scalar_Type --
-----------------------
@@ -2414,15 +2432,18 @@ package body Sem_Attr is
Analyze_And_Resolve (E1);
-- Check that the first argument is
- -- Ada.Strings.Text_Output.Sink'Class.
+ -- Ada.Strings.Text_Buffers.Root_Buffer_Type'Class.
-- Note: the double call to Root_Type here is needed because the
-- root type of a class-wide type is the corresponding type (e.g.
-- X for X'Class, and we really want to go to the root.)
- if not Is_RTE (Root_Type (Root_Type (Etype (E1))), RE_Sink) then
+ if not Is_RTE (Root_Type (Root_Type (Etype (E1))),
+ RE_Root_Buffer_Type)
+ then
Error_Attr
- ("expected Ada.Strings.Text_Output.Sink''Class", E1);
+ ("expected Ada.Strings.Text_Buffers.Root_Buffer_Type''Class",
+ E1);
end if;
-- Check that the second argument is of the right type
@@ -7074,6 +7095,31 @@ package body Sem_Attr is
Set_Etype (N, Standard_Boolean);
end Valid;
+ -----------------
+ -- Valid_Value --
+ -----------------
+
+ when Attribute_Valid_Value =>
+ Check_E1;
+ Check_Enumeration_Type;
+ Check_Enum_Image (Check_Enumeration_Maps => True);
+ Set_Etype (N, Standard_Boolean);
+ Validate_Non_Static_Attribute_Function_Call;
+
+ if P_Type in Standard_Boolean
+ | Standard_Character
+ | Standard_Wide_Character
+ | Standard_Wide_Wide_Character
+ then
+ Error_Attr_P
+ ("prefix of % attribute must not be a type in Standard");
+ end if;
+
+ if Discard_Names (First_Subtype (P_Type)) then
+ Error_Attr_P
+ ("prefix of % attribute must not have Discard_Names");
+ end if;
+
-------------------
-- Valid_Scalars --
-------------------
@@ -10479,6 +10525,7 @@ package body Sem_Attr is
| Attribute_Unrestricted_Access
| Attribute_Valid
| Attribute_Valid_Scalars
+ | Attribute_Valid_Value
| Attribute_Value
| Attribute_Wchar_T_Size
| Attribute_Wide_Value
@@ -12271,7 +12318,7 @@ package body Sem_Attr is
-- reference is resolved.
case Attr_Id is
- when Attribute_Value =>
+ when Attribute_Valid_Value | Attribute_Value =>
Resolve (First (Expressions (N)), Standard_String);
when Attribute_Wide_Value =>
diff --git a/gcc/ada/sem_ch10.adb b/gcc/ada/sem_ch10.adb
index 9ec5844..1e7b93c 100644
--- a/gcc/ada/sem_ch10.adb
+++ b/gcc/ada/sem_ch10.adb
@@ -626,7 +626,7 @@ package body Sem_Ch10 is
-- Start of processing for Analyze_Compilation_Unit
begin
- Exp_Put_Image.Preload_Sink (N);
+ Exp_Put_Image.Preload_Root_Buffer_Type (N);
Process_Compilation_Unit_Pragmas (N);
diff --git a/gcc/ada/sem_ch11.adb b/gcc/ada/sem_ch11.adb
index 13e37cf..5a2c6a6 100644
--- a/gcc/ada/sem_ch11.adb
+++ b/gcc/ada/sem_ch11.adb
@@ -662,6 +662,18 @@ package body Sem_Ch11 is
Kill_Current_Values (Last_Assignment_Only => True);
end Analyze_Raise_Statement;
+ ----------------------------------
+ -- Analyze_Raise_When_Statement --
+ ----------------------------------
+
+ procedure Analyze_Raise_When_Statement (N : Node_Id) is
+ begin
+ -- Verify the condition is a Boolean expression
+
+ Analyze_And_Resolve (Condition (N), Any_Boolean);
+ Check_Unset_Reference (Condition (N));
+ end Analyze_Raise_When_Statement;
+
-----------------------------
-- Analyze_Raise_xxx_Error --
-----------------------------
diff --git a/gcc/ada/sem_ch11.ads b/gcc/ada/sem_ch11.ads
index 95a9a21..9b027d9 100644
--- a/gcc/ada/sem_ch11.ads
+++ b/gcc/ada/sem_ch11.ads
@@ -29,6 +29,7 @@ package Sem_Ch11 is
procedure Analyze_Handled_Statements (N : Node_Id);
procedure Analyze_Raise_Expression (N : Node_Id);
procedure Analyze_Raise_Statement (N : Node_Id);
+ procedure Analyze_Raise_When_Statement (N : Node_Id);
procedure Analyze_Raise_xxx_Error (N : Node_Id);
procedure Analyze_Exception_Handlers (L : List_Id);
diff --git a/gcc/ada/sem_ch12.adb b/gcc/ada/sem_ch12.adb
index efdc449..9ccc5c5 100644
--- a/gcc/ada/sem_ch12.adb
+++ b/gcc/ada/sem_ch12.adb
@@ -888,6 +888,17 @@ package body Sem_Ch12 is
-- Verify that an attribute that appears as the default for a formal
-- subprogram is a function or procedure with the correct profile.
+ procedure Validate_Formal_Type_Default (Decl : Node_Id);
+ -- Ada_2022 AI12-205: if a default subtype_mark is present, verify
+ -- that it is the name of a type in the same class as the formal.
+ -- The treatment parallels what is done in Instantiate_Type but differs
+ -- in a few ways so that this machinery cannot be reused as is: on one
+ -- hand there are no visibility issues for a default, because it is
+ -- analyzed in the same context as the formal type definition; on the
+ -- other hand the check needs to take into acount the use of a previous
+ -- formal type in the current formal type definition (see details in
+ -- AI12-0205).
+
-------------------------------------------
-- Data Structures for Generic Renamings --
-------------------------------------------
@@ -1762,6 +1773,14 @@ package body Sem_Ch12 is
if Partial_Parameterization then
Process_Default (Formal);
+ elsif Present (Default_Subtype_Mark (Formal)) then
+ Match := New_Copy (Default_Subtype_Mark (Formal));
+ Append_List
+ (Instantiate_Type
+ (Formal, Match, Analyzed_Formal, Assoc_List),
+ Assoc_List);
+ Append_Elmt (Entity (Match), Actuals_To_Freeze);
+
else
Error_Msg_Sloc := Sloc (Gen_Unit);
Error_Msg_NE
@@ -3528,6 +3547,10 @@ package body Sem_Ch12 is
Set_Is_Generic_Type (T);
Set_Is_First_Subtype (T);
+ if Present (Default_Subtype_Mark (Original_Node (N))) then
+ Validate_Formal_Type_Default (N);
+ end if;
+
if Has_Aspects (N) then
Analyze_Aspect_Specifications (N, T);
end if;
@@ -12683,6 +12706,11 @@ package body Sem_Ch12 is
-- declaration, it carries the flag No_Predicate_On_Actual. it is part
-- of the generic contract that the actual cannot have predicates.
+ function Subtypes_Match (Gen_T, Act_T : Entity_Id) return Boolean;
+ -- Check that base types are the same and that the subtypes match
+ -- statically. Used in several of the validation subprograms for
+ -- actuals in instantiations.
+
procedure Validate_Array_Type_Instance;
procedure Validate_Access_Subprogram_Instance;
procedure Validate_Access_Type_Instance;
@@ -12696,10 +12724,6 @@ package body Sem_Ch12 is
-- Validate_Discriminated_Formal_Type is shared by formal private
-- types and Ada 2012 formal incomplete types.
- function Subtypes_Match (Gen_T, Act_T : Entity_Id) return Boolean;
- -- Check that base types are the same and that the subtypes match
- -- statically. Used in several of the validation subprograms.
-
--------------------------------------------
-- Check_Shared_Variable_Control_Aspects --
--------------------------------------------
@@ -16991,4 +17015,424 @@ package body Sem_Ch12 is
end if;
end Valid_Default_Attribute;
+ ----------------------------------
+ -- Validate_Formal_Type_Default --
+ ----------------------------------
+
+ procedure Validate_Formal_Type_Default (Decl : Node_Id) is
+ Default : constant Node_Id :=
+ Default_Subtype_Mark (Original_Node (Decl));
+ Formal : constant Entity_Id := Defining_Identifier (Decl);
+
+ Def_Sub : Entity_Id; -- Default subtype mark
+ Type_Def : Node_Id;
+
+ procedure Check_Discriminated_Formal;
+ -- Check that discriminants of default for private or incomplete
+ -- type match those of formal type.
+
+ function Reference_Formal (N : Node_Id) return Traverse_Result;
+ -- Check whether formal type definition mentions a previous formal
+ -- type of the same generic.
+
+ ----------------------
+ -- Reference_Formal --
+ ----------------------
+
+ function Reference_Formal (N : Node_Id) return Traverse_Result is
+ begin
+ if Is_Entity_Name (N)
+ and then Scope (Entity (N)) = Current_Scope
+ then
+ return Abandon;
+ else
+ return OK;
+ end if;
+ end Reference_Formal;
+
+ function Depends_On_Other_Formals is
+ new Traverse_Func (Reference_Formal);
+
+ function Default_Subtype_Matches
+ (Gen_T, Def_T : Entity_Id) return Boolean;
+
+ procedure Validate_Array_Type_Default;
+ -- Verify that dimension, indices, and component types of default
+ -- are compatible with formal array type definition.
+
+ procedure Validate_Derived_Type_Default;
+ -- Verify that ancestor and progenitor types match.
+
+ ---------------------------------
+ -- Check_Discriminated_Formal --
+ ---------------------------------
+
+ procedure Check_Discriminated_Formal is
+ Formal_Discr : Entity_Id;
+ Actual_Discr : Entity_Id;
+ Formal_Subt : Entity_Id;
+
+ begin
+ if Has_Discriminants (Formal) then
+ if not Has_Discriminants (Def_Sub) then
+ Error_Msg_NE
+ ("default for & must have discriminants", Default, Formal);
+
+ elsif Is_Constrained (Def_Sub) then
+ Error_Msg_NE
+ ("default for & must be unconstrained", Default, Formal);
+
+ else
+ Formal_Discr := First_Discriminant (Formal);
+ Actual_Discr := First_Discriminant (Def_Sub);
+ while Formal_Discr /= Empty loop
+ if Actual_Discr = Empty then
+ Error_Msg_N
+ ("discriminants on Formal do not match formal",
+ Default);
+ end if;
+
+ Formal_Subt := Etype (Formal_Discr);
+
+ -- Access discriminants match if designated types do
+
+ if Ekind (Base_Type (Formal_Subt)) = E_Anonymous_Access_Type
+ and then (Ekind (Base_Type (Etype (Actual_Discr)))) =
+ E_Anonymous_Access_Type
+ and then
+ Designated_Type (Base_Type (Formal_Subt)) =
+ Designated_Type (Base_Type (Etype (Actual_Discr)))
+ then
+ null;
+
+ elsif Base_Type (Formal_Subt) /=
+ Base_Type (Etype (Actual_Discr))
+ then
+ Error_Msg_N
+ ("types of discriminants of default must match formal",
+ Default);
+
+ elsif not Subtypes_Statically_Match
+ (Formal_Subt, Etype (Actual_Discr))
+ and then Ada_Version >= Ada_95
+ then
+ Error_Msg_N
+ ("subtypes of discriminants of default "
+ & "must match formal",
+ Default);
+ end if;
+
+ Next_Discriminant (Formal_Discr);
+ Next_Discriminant (Actual_Discr);
+ end loop;
+
+ if Actual_Discr /= Empty then
+ Error_Msg_NE
+ ("discriminants on default do not match formal",
+ Default, Formal);
+ end if;
+ end if;
+ end if;
+ end Check_Discriminated_Formal;
+
+ ---------------------------
+ -- Default_Subtype_Matches --
+ ---------------------------
+
+ function Default_Subtype_Matches
+ (Gen_T, Def_T : Entity_Id) return Boolean
+ is
+ begin
+ -- Check that the base types, root types (when dealing with class
+ -- wide types), or designated types (when dealing with anonymous
+ -- access types) of Gen_T and Def_T are statically matching subtypes.
+
+ return (Base_Type (Gen_T) = Base_Type (Def_T)
+ and then Subtypes_Statically_Match (Gen_T, Def_T))
+
+ or else (Is_Class_Wide_Type (Gen_T)
+ and then Is_Class_Wide_Type (Def_T)
+ and then Default_Subtype_Matches
+ (Root_Type (Gen_T), Root_Type (Def_T)))
+
+ or else (Is_Anonymous_Access_Type (Gen_T)
+ and then Ekind (Def_T) = Ekind (Gen_T)
+ and then Subtypes_Statically_Match
+ (Designated_Type (Gen_T), Designated_Type (Def_T)));
+
+ end Default_Subtype_Matches;
+
+ ----------------------------------
+ -- Validate_Array_Type_Default --
+ ----------------------------------
+
+ procedure Validate_Array_Type_Default is
+ I1, I2 : Node_Id;
+ T2 : Entity_Id;
+ begin
+ if not Is_Array_Type (Def_Sub) then
+ Error_Msg_NE ("default for& must be an array type ",
+ Default, Formal);
+ return;
+
+ elsif Number_Dimensions (Def_Sub) /= Number_Dimensions (Formal)
+ or else Is_Constrained (Def_Sub) /=
+ Is_Constrained (Formal)
+ then
+ Error_Msg_NE ("default array type does not match&",
+ Default, Formal);
+ return;
+ end if;
+
+ I1 := First_Index (Formal);
+ I2 := First_Index (Def_Sub);
+ for J in 1 .. Number_Dimensions (Formal) loop
+
+ -- If the indexes of the actual were given by a subtype_mark,
+ -- the index was transformed into a range attribute. Retrieve
+ -- the original type mark for checking.
+
+ if Is_Entity_Name (Original_Node (I2)) then
+ T2 := Entity (Original_Node (I2));
+ else
+ T2 := Etype (I2);
+ end if;
+
+ if not Subtypes_Statically_Match (Etype (I1), T2) then
+ Error_Msg_NE
+ ("index types of default do not match those of formal &",
+ Default, Formal);
+ end if;
+
+ Next_Index (I1);
+ Next_Index (I2);
+ end loop;
+
+ if not Default_Subtype_Matches
+ (Component_Type (Formal), Component_Type (Def_Sub))
+ then
+ Error_Msg_NE
+ ("component subtype of default does not match that of formal &",
+ Default, Formal);
+ end if;
+
+ if Has_Aliased_Components (Formal)
+ and then not Has_Aliased_Components (Default)
+ then
+ Error_Msg_NE
+ ("default must have aliased components to match formal type &",
+ Default, Formal);
+ end if;
+ end Validate_Array_Type_Default;
+
+ -----------------------------------
+ -- Validate_Derived_Type_Default --
+ -----------------------------------
+
+ procedure Validate_Derived_Type_Default is
+ begin
+ if not Is_Ancestor (Etype (Formal), Def_Sub) then
+ Error_Msg_NE ("default must be a descendent of&",
+ Default, Etype (Formal));
+ end if;
+
+ if Has_Interfaces (Formal) then
+ if not Has_Interfaces (Def_Sub) then
+ Error_Msg_NE
+ ("default must implement all interfaces of formal&",
+ Default, Formal);
+
+ else
+ declare
+ Act_Iface_List : Elist_Id;
+ Iface : Node_Id;
+ Iface_Ent : Entity_Id;
+
+ begin
+ Iface := First (Abstract_Interface_List (Formal));
+ Collect_Interfaces (Def_Sub, Act_Iface_List);
+
+ while Present (Iface) loop
+ Iface_Ent := Entity (Iface);
+
+ if Is_Ancestor (Iface_Ent, Def_Sub)
+ or else Is_Progenitor (Iface_Ent, Def_Sub)
+ then
+ null;
+
+ else
+ Error_Msg_NE
+ ("Default must implement interface&",
+ Default, Etype (Iface));
+ end if;
+
+ Next (Iface);
+ end loop;
+ end;
+ end if;
+ end if;
+ end Validate_Derived_Type_Default;
+
+ -- Start of processing for Validate_Formal_Type_Default
+
+ begin
+ Analyze (Default);
+ if not Is_Entity_Name (Default)
+ or else not Is_Type (Entity (Default))
+ then
+ Error_Msg_N
+ ("Expect type name for default of formal type", Default);
+ return;
+ else
+ Def_Sub := Entity (Default);
+ end if;
+
+ -- Formal derived_type declarations are transformed into full
+ -- type declarations or Private_Type_Extensions for ease of processing.
+
+ if Nkind (Decl) = N_Full_Type_Declaration then
+ Type_Def := Type_Definition (Decl);
+
+ elsif Nkind (Decl) = N_Private_Extension_Declaration then
+ Type_Def := Subtype_Indication (Decl);
+
+ else
+ Type_Def := Formal_Type_Definition (Decl);
+ end if;
+
+ if Depends_On_Other_Formals (Type_Def) = Abandon
+ and then Scope (Def_Sub) /= Current_Scope
+ then
+ Error_Msg_N ("default of formal type that depends on "
+ & "other formals must be a previous formal type", Default);
+ return;
+
+ elsif Def_Sub = Formal then
+ Error_Msg_N
+ ("default for formal type cannot be formal itsef", Default);
+ return;
+ end if;
+
+ case Nkind (Type_Def) is
+
+ when N_Formal_Private_Type_Definition =>
+ if (Is_Abstract_Type (Formal)
+ and then not Is_Abstract_Type (Def_Sub))
+ or else (Is_Limited_Type (Formal)
+ and then not Is_Limited_Type (Def_Sub))
+ then
+ Error_Msg_NE
+ ("default for private type$ does not match",
+ Default, Formal);
+ end if;
+
+ Check_Discriminated_Formal;
+
+ when N_Formal_Derived_Type_Definition =>
+ Check_Discriminated_Formal;
+ Validate_Derived_Type_Default;
+
+ when N_Formal_Incomplete_Type_Definition =>
+ if Is_Tagged_Type (Formal)
+ and then not Is_Tagged_Type (Def_Sub)
+ then
+ Error_Msg_NE
+ ("default for & must be a tagged type", Default, Formal);
+ end if;
+
+ Check_Discriminated_Formal;
+
+ when N_Formal_Discrete_Type_Definition =>
+ if not Is_Discrete_Type (Def_Sub) then
+ Error_Msg_NE ("default for& must be a discrete type",
+ Default, Formal);
+ end if;
+
+ when N_Formal_Signed_Integer_Type_Definition =>
+ if not Is_Integer_Type (Def_Sub) then
+ Error_Msg_NE ("default for& must be a discrete type",
+ Default, Formal);
+ end if;
+
+ when N_Formal_Modular_Type_Definition =>
+ if not Is_Modular_Integer_Type (Def_Sub) then
+ Error_Msg_NE ("default for& must be a modular_integer Type",
+ Default, Formal);
+ end if;
+
+ when N_Formal_Floating_Point_Definition =>
+ if not Is_Floating_Point_Type (Def_Sub) then
+ Error_Msg_NE ("default for& must be a floating_point type",
+ Default, Formal);
+ end if;
+
+ when N_Formal_Ordinary_Fixed_Point_Definition =>
+ if not Is_Ordinary_Fixed_Point_Type (Def_Sub) then
+ Error_Msg_NE ("default for& must be "
+ & "an ordinary_fixed_point type ",
+ Default, Formal);
+ end if;
+
+ when N_Formal_Decimal_Fixed_Point_Definition =>
+ if not Is_Decimal_Fixed_Point_Type (Def_Sub) then
+ Error_Msg_NE ("default for& must be "
+ & "an Decimal_fixed_point type ",
+ Default, Formal);
+ end if;
+
+ when N_Array_Type_Definition =>
+ Validate_Array_Type_Default;
+
+ when N_Access_Function_Definition |
+ N_Access_Procedure_Definition =>
+ if Ekind (Def_Sub) /= E_Access_Subprogram_Type then
+ Error_Msg_NE ("default for& must be an Access_To_Subprogram",
+ Default, Formal);
+ end if;
+ Check_Subtype_Conformant
+ (Designated_Type (Formal), Designated_Type (Def_Sub));
+
+ when N_Access_To_Object_Definition =>
+ if not Is_Access_Object_Type (Def_Sub) then
+ Error_Msg_NE ("default for& must be an Access_To_Object",
+ Default, Formal);
+
+ elsif not Default_Subtype_Matches
+ (Designated_Type (Formal), Designated_Type (Def_Sub))
+ then
+ Error_Msg_NE ("designated type of defaul does not match "
+ & "designated type of formal type",
+ Default, Formal);
+ end if;
+
+ when N_Record_Definition => -- Formal interface type
+ if not Is_Interface (Def_Sub) then
+ Error_Msg_NE
+ ("default for formal interface type must be an interface",
+ Default, Formal);
+
+ elsif Is_Limited_Type (Def_Sub) /= Is_Limited_Type (Formal)
+ or else Is_Task_Interface (Formal) /= Is_Task_Interface (Def_Sub)
+ or else Is_Protected_Interface (Formal) /=
+ Is_Protected_Interface (Def_Sub)
+ or else Is_Synchronized_Interface (Formal) /=
+ Is_Synchronized_Interface (Def_Sub)
+ then
+ Error_Msg_NE
+ ("default for interface& does not match", Def_Sub, Formal);
+ end if;
+
+ when N_Derived_Type_Definition =>
+ Validate_Derived_Type_Default;
+
+ when N_Identifier => -- case of a private extension
+ Validate_Derived_Type_Default;
+
+ when N_Error =>
+ null;
+
+ when others =>
+ raise Program_Error;
+ end case;
+ end Validate_Formal_Type_Default;
end Sem_Ch12;
diff --git a/gcc/ada/sem_ch13.adb b/gcc/ada/sem_ch13.adb
index 062aa50..cfcbe14 100644
--- a/gcc/ada/sem_ch13.adb
+++ b/gcc/ada/sem_ch13.adb
@@ -5230,7 +5230,9 @@ package body Sem_Ch13 is
F := First_Formal (Subp);
- if No (F) or else Etype (F) /= Class_Wide_Type (RTE (RE_Sink)) then
+ if No (F)
+ or else Etype (F) /= Class_Wide_Type (RTE (RE_Root_Buffer_Type))
+ then
return False;
end if;
@@ -14171,7 +14173,7 @@ package body Sem_Ch13 is
begin
Subp_Id := Make_Defining_Identifier (Loc, Sname);
- -- S : Sink'Class
+ -- S : Root_Buffer_Type'Class
Formals := New_List (
Make_Parameter_Specification (Loc,
diff --git a/gcc/ada/sem_ch3.adb b/gcc/ada/sem_ch3.adb
index 4982fcd..594e08e 100644
--- a/gcc/ada/sem_ch3.adb
+++ b/gcc/ada/sem_ch3.adb
@@ -19736,7 +19736,7 @@ package body Sem_Ch3 is
begin
-- If the mod expression is (exactly) 2 * literal, where literal is
- -- 128 or less,then almost certainly the * was meant to be **. Warn.
+ -- 128 or less, then almost certainly the * was meant to be **. Warn.
if Warn_On_Suspicious_Modulus_Value
and then Nkind (Mod_Expr) = N_Op_Multiply
diff --git a/gcc/ada/sem_ch5.adb b/gcc/ada/sem_ch5.adb
index 58cf6c2..3c98d73 100644
--- a/gcc/ada/sem_ch5.adb
+++ b/gcc/ada/sem_ch5.adb
@@ -1825,6 +1825,18 @@ package body Sem_Ch5 is
raise Program_Error;
end Analyze_Goto_Statement;
+ ---------------------------------
+ -- Analyze_Goto_When_Statement --
+ ---------------------------------
+
+ procedure Analyze_Goto_When_Statement (N : Node_Id) is
+ begin
+ -- Verify the condition is a Boolean expression
+
+ Analyze_And_Resolve (Condition (N), Any_Boolean);
+ Check_Unset_Reference (Condition (N));
+ end Analyze_Goto_When_Statement;
+
--------------------------
-- Analyze_If_Statement --
--------------------------
diff --git a/gcc/ada/sem_ch5.ads b/gcc/ada/sem_ch5.ads
index 92fec23..c320665 100644
--- a/gcc/ada/sem_ch5.ads
+++ b/gcc/ada/sem_ch5.ads
@@ -33,6 +33,7 @@ package Sem_Ch5 is
procedure Analyze_Compound_Statement (N : Node_Id);
procedure Analyze_Exit_Statement (N : Node_Id);
procedure Analyze_Goto_Statement (N : Node_Id);
+ procedure Analyze_Goto_When_Statement (N : Node_Id);
procedure Analyze_If_Statement (N : Node_Id);
procedure Analyze_Implicit_Label_Declaration (N : Node_Id);
procedure Analyze_Iterator_Specification (N : Node_Id);
diff --git a/gcc/ada/sem_ch6.adb b/gcc/ada/sem_ch6.adb
index 05e74ef..d37f295 100644
--- a/gcc/ada/sem_ch6.adb
+++ b/gcc/ada/sem_ch6.adb
@@ -2614,6 +2614,18 @@ package body Sem_Ch6 is
Analyze_Dimension (N);
end Analyze_Return_Statement;
+ -----------------------------------
+ -- Analyze_Return_When_Statement --
+ -----------------------------------
+
+ procedure Analyze_Return_When_Statement (N : Node_Id) is
+ begin
+ -- Verify the condition is a Boolean expression
+
+ Analyze_And_Resolve (Condition (N), Any_Boolean);
+ Check_Unset_Reference (Condition (N));
+ end Analyze_Return_When_Statement;
+
-------------------------------------
-- Analyze_Simple_Return_Statement --
-------------------------------------
diff --git a/gcc/ada/sem_ch6.ads b/gcc/ada/sem_ch6.ads
index 05ef0c3..9579582 100644
--- a/gcc/ada/sem_ch6.ads
+++ b/gcc/ada/sem_ch6.ads
@@ -41,6 +41,7 @@ package Sem_Ch6 is
procedure Analyze_Operator_Symbol (N : Node_Id);
procedure Analyze_Parameter_Association (N : Node_Id);
procedure Analyze_Procedure_Call (N : Node_Id);
+ procedure Analyze_Return_When_Statement (N : Node_Id);
procedure Analyze_Simple_Return_Statement (N : Node_Id);
procedure Analyze_Subprogram_Declaration (N : Node_Id);
procedure Analyze_Subprogram_Body (N : Node_Id);
diff --git a/gcc/ada/sem_util.adb b/gcc/ada/sem_util.adb
index fb44823..479bb14 100644
--- a/gcc/ada/sem_util.adb
+++ b/gcc/ada/sem_util.adb
@@ -7262,8 +7262,8 @@ package body Sem_Util is
-------------------------
function Denotes_Same_Object (A1, A2 : Node_Id) return Boolean is
- function Is_Renaming (N : Node_Id) return Boolean;
- -- Return true if N names a renaming entity
+ function Is_Object_Renaming (N : Node_Id) return Boolean;
+ -- Return true if N names an object renaming entity
function Is_Valid_Renaming (N : Node_Id) return Boolean;
-- For renamings, return False if the prefix of any dereference within
@@ -7271,35 +7271,16 @@ package body Sem_Util is
-- renamed object_name contains references to variables or calls on
-- nonstatic functions; otherwise return True (RM 6.4.1(6.10/3))
- -----------------
- -- Is_Renaming --
- -----------------
+ ------------------------
+ -- Is_Object_Renaming --
+ ------------------------
- function Is_Renaming (N : Node_Id) return Boolean is
+ function Is_Object_Renaming (N : Node_Id) return Boolean is
begin
- if not Is_Entity_Name (N) then
- return False;
- end if;
-
- case Ekind (Entity (N)) is
- when E_Variable | E_Constant =>
- return Present (Renamed_Object (Entity (N)));
-
- when E_Exception
- | E_Function
- | E_Generic_Function
- | E_Generic_Package
- | E_Generic_Procedure
- | E_Operator
- | E_Package
- | E_Procedure
- =>
- return Present (Renamed_Entity (Entity (N)));
-
- when others =>
- return False;
- end case;
- end Is_Renaming;
+ return Is_Entity_Name (N)
+ and then Ekind (Entity (N)) in E_Variable | E_Constant
+ and then Present (Renamed_Object (Entity (N)));
+ end Is_Object_Renaming;
-----------------------
-- Is_Valid_Renaming --
@@ -7307,7 +7288,7 @@ package body Sem_Util is
function Is_Valid_Renaming (N : Node_Id) return Boolean is
begin
- if Is_Renaming (N)
+ if Is_Object_Renaming (N)
and then not Is_Valid_Renaming (Renamed_Entity (Entity (N)))
then
return False;
@@ -7481,9 +7462,12 @@ package body Sem_Util is
-- Check whether bounds are statically identical. There is no
-- attempt to detect partial overlap of slices.
- return Denotes_Same_Object (Lo1, Lo2)
- and then
- Denotes_Same_Object (Hi1, Hi2);
+ return Is_OK_Static_Expression (Lo1)
+ and then Is_OK_Static_Expression (Lo2)
+ and then Is_OK_Static_Expression (Hi1)
+ and then Is_OK_Static_Expression (Hi2)
+ and then Expr_Value (Lo1) = Expr_Value (Lo2)
+ and then Expr_Value (Hi1) = Expr_Value (Hi2);
end;
end if;
@@ -7494,30 +7478,16 @@ package body Sem_Util is
-- no references to variables nor calls on nonstatic functions (RM
-- 6.4.1(6.11/3)).
- elsif Is_Renaming (A1)
+ elsif Is_Object_Renaming (A1)
and then Is_Valid_Renaming (A1)
then
return Denotes_Same_Object (Renamed_Entity (Entity (A1)), A2);
- elsif Is_Renaming (A2)
+ elsif Is_Object_Renaming (A2)
and then Is_Valid_Renaming (A2)
then
return Denotes_Same_Object (A1, Renamed_Entity (Entity (A2)));
- -- In the recursion, integer literals appear as slice bounds
-
- elsif Nkind (A1) = N_Integer_Literal
- and then Nkind (A2) = N_Integer_Literal
- then
- return Intval (A1) = Intval (A2);
-
- -- Likewise for character literals
-
- elsif Nkind (A1) = N_Character_Literal
- and then Nkind (A2) = N_Character_Literal
- then
- return Char_Literal_Value (A1) = Char_Literal_Value (A2);
-
else
return False;
end if;
@@ -9467,6 +9437,18 @@ package body Sem_Util is
if Is_Entity_Name (Expr) then
Ent := Entity (Expr);
+
+ -- If expansion is disabled, then we might see an entity of a
+ -- protected component or of a discriminant of a concurrent unit.
+ -- Ignore such entities, because further warnings for overlays
+ -- expect this routine to only collect entities of entire objects.
+
+ if Ekind (Ent) in E_Component | E_Discriminant then
+ pragma Assert
+ (not Expander_Active
+ and then Is_Concurrent_Type (Scope (Ent)));
+ Ent := Empty;
+ end if;
return;
-- Check for components
@@ -10961,6 +10943,23 @@ package body Sem_Util is
end if;
end Get_Index_Bounds;
+ function Get_Index_Bounds
+ (N : Node_Id;
+ Use_Full_View : Boolean := False) return Range_Nodes is
+ Result : Range_Nodes;
+ begin
+ Get_Index_Bounds (N, Result.L, Result.H, Use_Full_View);
+ return Result;
+ end Get_Index_Bounds;
+
+ function Get_Index_Bounds
+ (N : Node_Id;
+ Use_Full_View : Boolean := False) return Range_Values is
+ Nodes : constant Range_Nodes := Get_Index_Bounds (N, Use_Full_View);
+ begin
+ return (Expr_Value (Nodes.L), Expr_Value (Nodes.H));
+ end Get_Index_Bounds;
+
-----------------------------
-- Get_Interfacing_Aspects --
-----------------------------
@@ -14845,6 +14844,12 @@ package body Sem_Util is
return No_Uint;
end if;
+ -- Do not attempt to compute offsets within multi-dimensional arrays
+
+ if Present (Next_Index (Ind)) then
+ return No_Uint;
+ end if;
+
if Nkind (Ind) = N_Subtype_Indication then
Ind := Constraint (Ind);
@@ -14861,7 +14866,7 @@ package body Sem_Util is
-- Return the scaled offset
- return Off * (Expr_Value (Exp) - Expr_Value (Low_Bound ((Ind))));
+ return Off * (Expr_Value (Exp) - Expr_Value (Low_Bound (Ind)));
end Indexed_Component_Bit_Offset;
-----------------------------
@@ -26996,7 +27001,7 @@ package body Sem_Util is
is
begin
-- The only entities for which we track constant values are variables
- -- which are not renamings, constants and formal parameters, so check
+ -- that are not renamings, constants and formal parameters, so check
-- if we have this case.
-- Note: it may seem odd to track constant values for constants, but in
diff --git a/gcc/ada/sem_util.ads b/gcc/ada/sem_util.ads
index 0519b3c..a1ed43c 100644
--- a/gcc/ada/sem_util.ads
+++ b/gcc/ada/sem_util.ads
@@ -1167,6 +1167,26 @@ package Sem_Util is
-- the index type turns out to be a partial view; this case should not
-- arise during normal compilation of semantically correct programs.
+ type Range_Nodes is record
+ L, H : Node_Id; -- First and Last nodes of a discrete_range
+ end record;
+
+ type Range_Values is record
+ L, H : Uint; -- First and Last values of a discrete_range
+ end record;
+
+ function Get_Index_Bounds
+ (N : Node_Id;
+ Use_Full_View : Boolean := False) return Range_Nodes;
+ -- Same as the above procedure, but returns the result as a record.
+ -- ???This should probably replace the procedure.
+
+ function Get_Index_Bounds
+ (N : Node_Id;
+ Use_Full_View : Boolean := False) return Range_Values;
+ -- Same as the above function, but returns the values, which must be known
+ -- at compile time.
+
procedure Get_Interfacing_Aspects
(Iface_Asp : Node_Id;
Conv_Asp : out Node_Id;
@@ -2960,9 +2980,9 @@ package Sem_Util is
-- the value is valid) for the given entity Ent. This value can only be
-- captured if sequential execution semantics can be properly guaranteed so
-- that a subsequent reference will indeed be sure that this current value
- -- indication is correct. The node N is the construct which resulted in
- -- the possible capture of the value (this is used to check if we are in
- -- a conditional).
+ -- indication is correct. The node N is the construct that resulted in the
+ -- possible capture of the value (this is used to check if we are in a
+ -- conditional).
--
-- Cond is used to skip the test for being inside a conditional. It is used
-- in the case of capturing values from if/while tests, which already do a
diff --git a/gcc/ada/sinfo.ads b/gcc/ada/sinfo.ads
index f210c49..fe4f4e1 100644
--- a/gcc/ada/sinfo.ads
+++ b/gcc/ada/sinfo.ads
@@ -7195,6 +7195,7 @@ package Sinfo is
-- Discriminant_Specifications (set to No_List if no
-- discriminant part)
-- Unknown_Discriminants_Present set if (<>) discriminant
+ -- Default_Subtype_Mark
----------------------------------
-- 12.5 Formal type definition --
diff --git a/gcc/ada/snames.ads-tmpl b/gcc/ada/snames.ads-tmpl
index 2611541..b9ca607 100644
--- a/gcc/ada/snames.ads-tmpl
+++ b/gcc/ada/snames.ads-tmpl
@@ -1081,6 +1081,7 @@ package Snames is
Name_To_Any : constant Name_Id := N + $; -- GNAT
Name_Truncation : constant Name_Id := N + $;
Name_TypeCode : constant Name_Id := N + $; -- GNAT
+ Name_Valid_Value : constant Name_Id := N + $; -- GNAT
Name_Value : constant Name_Id := N + $;
Name_Wide_Image : constant Name_Id := N + $;
Name_Wide_Wide_Image : constant Name_Id := N + $;
@@ -1606,6 +1607,7 @@ package Snames is
Attribute_To_Any,
Attribute_Truncation,
Attribute_TypeCode,
+ Attribute_Valid_Value,
Attribute_Value,
Attribute_Wide_Image,
Attribute_Wide_Wide_Image,
diff --git a/gcc/ada/sprint.adb b/gcc/ada/sprint.adb
index 7fc7340..4467929 100644
--- a/gcc/ada/sprint.adb
+++ b/gcc/ada/sprint.adb
@@ -2118,6 +2118,13 @@ package body Sprint is
Write_Indent;
end if;
+ when N_Goto_When_Statement =>
+ Write_Indent_Str_Sloc ("goto ");
+ Sprint_Node (Name (Node));
+ Write_Str (" when ");
+ Sprint_Node (Condition (Node));
+ Write_Char (';');
+
when N_Handled_Sequence_Of_Statements =>
Set_Debug_Sloc;
Sprint_Indented_List (Statements (Node));
@@ -3069,6 +3076,19 @@ package body Sprint is
Write_Char (';');
+ when N_Raise_When_Statement =>
+ Write_Indent_Str_Sloc ("raise ");
+ Sprint_Node (Name (Node));
+ Write_Str (" when ");
+ Sprint_Node (Condition (Node));
+
+ if Present (Expression (Node)) then
+ Write_Str_With_Col_Check_Sloc (" with ");
+ Sprint_Node (Expression (Node));
+ end if;
+
+ Write_Char (';');
+
when N_Range =>
Sprint_Node (Low_Bound (Node));
Write_Str_Sloc (" .. ");
@@ -3142,6 +3162,13 @@ package body Sprint is
Write_Char (';');
+ when N_Return_When_Statement =>
+ Write_Indent_Str_Sloc ("return ");
+ Sprint_Node (Expression (Node));
+ Write_Str (" when ");
+ Sprint_Node (Condition (Node));
+ Write_Char (';');
+
when N_SCIL_Dispatch_Table_Tag_Init =>
Write_Indent_Str ("[N_SCIL_Dispatch_Table_Tag_Init]");
diff --git a/gcc/ada/urealp.adb b/gcc/ada/urealp.adb
index 0f57043..1367ad3 100644
--- a/gcc/ada/urealp.adb
+++ b/gcc/ada/urealp.adb
@@ -174,16 +174,30 @@ package body Urealp is
return UI_Decimal_Digits_Hi (Val.Num) -
UI_Decimal_Digits_Lo (Val.Den);
- -- For based numbers, just subtract the decimal exponent from the
- -- high estimate of the number of digits in the numerator and add
- -- one to accommodate possible round off errors for non-decimal
- -- bases. For example:
+ -- For based numbers, get the maximum number of digits in the numerator
+ -- minus one and the either exact or floor value of the decimal exponent
+ -- of the denominator, and subtract. For example:
- -- 1_500_000 / 10**4 = 1.50E-2
+ -- 321 / 10**3 = 3.21E-1
+ -- 435 / 5**7 = 5.57E-3
- else -- Val.Rbase /= 0
- return UI_Decimal_Digits_Hi (Val.Num) -
- Equivalent_Decimal_Exponent (Val) + 1;
+ else
+ declare
+ E : Int;
+
+ begin
+ if Val.Rbase = 10 then
+ E := UI_To_Int (Val.Den);
+
+ else
+ E := Equivalent_Decimal_Exponent (Val);
+ if E < 0 then
+ E := E - 1;
+ end if;
+ end if;
+
+ return UI_Decimal_Digits_Hi (Val.Num) - 1 - E;
+ end;
end if;
end Decimal_Exponent_Hi;
@@ -213,16 +227,30 @@ package body Urealp is
return UI_Decimal_Digits_Lo (Val.Num) -
UI_Decimal_Digits_Hi (Val.Den) - 1;
- -- For based numbers, just subtract the decimal exponent from the
- -- low estimate of the number of digits in the numerator and subtract
- -- one to accommodate possible round off errors for non-decimal
- -- bases. For example:
+ -- For based numbers, get the minimum number of digits in the numerator
+ -- minus one and the either exact or ceil value of the decimal exponent
+ -- of the denominator, and subtract. For example:
- -- 1_500_000 / 10**4 = 1.50E-2
+ -- 321 / 10**3 = 3.21E-1
+ -- 435 / 5**7 = 5.57E-3
- else -- Val.Rbase /= 0
- return UI_Decimal_Digits_Lo (Val.Num) -
- Equivalent_Decimal_Exponent (Val) - 1;
+ else
+ declare
+ E : Int;
+
+ begin
+ if Val.Rbase = 10 then
+ E := UI_To_Int (Val.Den);
+
+ else
+ E := Equivalent_Decimal_Exponent (Val);
+ if E > 0 then
+ E := E + 1;
+ end if;
+ end if;
+
+ return UI_Decimal_Digits_Lo (Val.Num) - 1 - E;
+ end;
end if;
end Decimal_Exponent_Lo;
@@ -374,7 +402,7 @@ package body Urealp is
Tmp : Uint;
Num : Uint;
Den : Uint;
- M : constant Uintp.Save_Mark := Uintp.Mark;
+ M : constant Uintp.Save_Mark := Mark;
begin
-- Start by setting J to the greatest of the absolute values of the
@@ -1486,6 +1514,80 @@ package body Urealp is
end if;
end UR_Write;
+ ----------------------
+ -- UR_Write_To_JSON --
+ ----------------------
+
+ -- We defer to the implementation of UR_Write in all cases, either directly
+ -- for values that are naturally written in a JSON compatible format, or by
+ -- first computing a decimal approxixmation for other values.
+
+ procedure UR_Write_To_JSON (Real : Ureal) is
+ Val : constant Ureal_Entry := Ureals.Table (Real);
+ Imrk : constant Uintp.Save_Mark := Mark;
+ Rmrk : constant Urealp.Save_Mark := Mark;
+
+ T : Ureal;
+
+ begin
+ -- Zero is zero
+
+ if Val.Num = 0 then
+ T := Real;
+
+ -- For constants with a denominator of zero, the value is simply the
+ -- numerator value, since we are dividing by base**0, which is 1.
+
+ elsif Val.Den = 0 then
+ T := Real;
+
+ -- Small powers of 2 get written in decimal fixed-point format
+
+ elsif Val.Rbase = 2
+ and then Val.Den <= 3
+ and then Val.Den >= -16
+ then
+ T := Real;
+
+ -- Constants in base 10 can be written in normal Ada literal style
+
+ elsif Val.Rbase = 10 then
+ T := Real;
+
+ -- Rationals where numerator is divisible by denominator can be output
+ -- as literals after we do the division. This includes the common case
+ -- where the denominator is 1.
+
+ elsif Val.Rbase = 0 and then Val.Num mod Val.Den = 0 then
+ T := Real;
+
+ -- For other constants, compute an approxixmation in base 10
+
+ else
+ declare
+ A : constant Ureal := UR_Abs (Real);
+ -- The absolute value
+
+ E : constant Uint :=
+ (if A < Ureal_1
+ then UI_From_Int (3 - Decimal_Exponent_Lo (Real))
+ else Uint_3);
+ -- The exponent for at least 3 digits after the decimal point
+
+ Num : constant Uint :=
+ UR_To_Uint (UR_Mul (A, UR_Exponentiate (Ureal_10, E)));
+ -- The numerator appropriately rounded
+
+ begin
+ T := UR_From_Components (Num, E, 10, Val.Negative);
+ end;
+ end if;
+
+ UR_Write (T);
+ Release (Imrk);
+ Release (Rmrk);
+ end UR_Write_To_JSON;
+
-------------
-- Ureal_0 --
-------------
diff --git a/gcc/ada/urealp.ads b/gcc/ada/urealp.ads
index 2cd91ce..5c625f9 100644
--- a/gcc/ada/urealp.ads
+++ b/gcc/ada/urealp.ads
@@ -288,6 +288,10 @@ package Urealp is
-- In the case where an expression is output, if Brackets is set to True,
-- the expression is surrounded by square brackets.
+ procedure UR_Write_To_JSON (Real : Ureal);
+ -- Writes value of Real to standard output in the JSON data interchange
+ -- format specified by the ECMA-404 standard, for the -gnatRj output.
+
procedure pr (Real : Ureal);
pragma Export (Ada, pr);
-- Writes value of Real to standard output with a terminating line return,
diff --git a/gcc/auto-profile.c b/gcc/auto-profile.c
index 43d6fa0..b23b82b 100644
--- a/gcc/auto-profile.c
+++ b/gcc/auto-profile.c
@@ -95,7 +95,7 @@ along with GCC; see the file COPYING3. If not see
*/
#define DEFAULT_AUTO_PROFILE_FILE "fbdata.afdo"
-#define AUTO_PROFILE_VERSION 1
+#define AUTO_PROFILE_VERSION 2
namespace autofdo
{
diff --git a/gcc/c/ChangeLog b/gcc/c/ChangeLog
index 2deedba..5751a37 100644
--- a/gcc/c/ChangeLog
+++ b/gcc/c/ChangeLog
@@ -1,3 +1,9 @@
+2021-06-21 Jakub Jelinek <jakub@redhat.com>
+
+ PR inline-asm/100785
+ * c-typeck.c (c_mark_addressable): Diagnose trying to make
+ bit-fields addressable.
+
2021-06-15 Robin Dapp <rdapp@linux.ibm.com>
* c-decl.c (merge_decls): Copy DECL_USER_ALIGN if DECL_ALIGN is
diff --git a/gcc/c/c-typeck.c b/gcc/c/c-typeck.c
index 845d50f..77de881 100644
--- a/gcc/c/c-typeck.c
+++ b/gcc/c/c-typeck.c
@@ -5034,8 +5034,17 @@ c_mark_addressable (tree exp, bool array_ref_p)
&& TREE_CODE (TREE_TYPE (x)) == ARRAY_TYPE
&& VECTOR_TYPE_P (TREE_TYPE (TREE_OPERAND (x, 0))))
return true;
- /* FALLTHRU */
+ x = TREE_OPERAND (x, 0);
+ break;
+
case COMPONENT_REF:
+ if (DECL_C_BIT_FIELD (TREE_OPERAND (x, 1)))
+ {
+ error ("cannot take address of bit-field %qD",
+ TREE_OPERAND (x, 1));
+ return false;
+ }
+ /* FALLTHRU */
case ADDR_EXPR:
case ARRAY_REF:
case REALPART_EXPR:
diff --git a/gcc/cfgexpand.c b/gcc/cfgexpand.c
index 39e5b04..6394cfd 100644
--- a/gcc/cfgexpand.c
+++ b/gcc/cfgexpand.c
@@ -3082,6 +3082,7 @@ expand_asm_stmt (gasm *stmt)
unsigned ninputs = gimple_asm_ninputs (stmt);
unsigned nlabels = gimple_asm_nlabels (stmt);
unsigned i;
+ bool error_seen = false;
/* ??? Diagnose during gimplification? */
if (ninputs + noutputs + nlabels > MAX_RECOG_OPERANDS)
@@ -3140,6 +3141,7 @@ expand_asm_stmt (gasm *stmt)
{
/* ??? Diagnose during gimplification? */
error ("unknown register name %qs in %<asm%>", regname);
+ error_seen = true;
}
else if (j == -4)
{
@@ -3202,7 +3204,10 @@ expand_asm_stmt (gasm *stmt)
&& REG_P (DECL_RTL (output_tvec[j]))
&& HARD_REGISTER_P (DECL_RTL (output_tvec[j]))
&& output_hregno == REGNO (DECL_RTL (output_tvec[j])))
- error ("invalid hard register usage between output operands");
+ {
+ error ("invalid hard register usage between output operands");
+ error_seen = true;
+ }
/* Verify matching constraint operands use the same hard register
and that the non-matching constraint operands do not use the same
@@ -3225,13 +3230,19 @@ expand_asm_stmt (gasm *stmt)
}
if (i == match
&& output_hregno != input_hregno)
- error ("invalid hard register usage between output operand "
- "and matching constraint operand");
+ {
+ error ("invalid hard register usage between output "
+ "operand and matching constraint operand");
+ error_seen = true;
+ }
else if (early_clobber_p
&& i != match
&& output_hregno == input_hregno)
- error ("invalid hard register usage between earlyclobber "
- "operand and input operand");
+ {
+ error ("invalid hard register usage between "
+ "earlyclobber operand and input operand");
+ error_seen = true;
+ }
}
}
@@ -3307,7 +3318,10 @@ expand_asm_stmt (gasm *stmt)
op = validize_mem (op);
if (! allows_reg && !MEM_P (op))
- error ("output number %d not directly addressable", i);
+ {
+ error ("output number %d not directly addressable", i);
+ error_seen = true;
+ }
if ((! allows_mem && MEM_P (op) && GET_MODE (op) != BLKmode)
|| GET_CODE (op) == CONCAT)
{
@@ -3347,6 +3361,19 @@ expand_asm_stmt (gasm *stmt)
inout_opnum.safe_push (i);
}
+ const char *str = gimple_asm_string (stmt);
+ if (error_seen)
+ {
+ ninputs = 0;
+ noutputs = 0;
+ inout_opnum.truncate (0);
+ output_rvec.truncate (0);
+ clobber_rvec.truncate (0);
+ constraints.truncate (0);
+ CLEAR_HARD_REG_SET (clobbered_regs);
+ str = "";
+ }
+
auto_vec<rtx, MAX_RECOG_OPERANDS> input_rvec;
auto_vec<machine_mode, MAX_RECOG_OPERANDS> input_mode;
@@ -3405,7 +3432,7 @@ expand_asm_stmt (gasm *stmt)
}
/* For in-out operands, copy output rtx to input rtx. */
- unsigned ninout = inout_opnum.length();
+ unsigned ninout = inout_opnum.length ();
for (i = 0; i < ninout; i++)
{
int j = inout_opnum[i];
@@ -3459,7 +3486,7 @@ expand_asm_stmt (gasm *stmt)
rtx body = gen_rtx_ASM_OPERANDS ((noutputs == 0 ? VOIDmode
: GET_MODE (output_rvec[0])),
- ggc_strdup (gimple_asm_string (stmt)),
+ ggc_strdup (str),
"", 0, argvec, constraintvec,
labelvec, locus);
MEM_VOLATILE_P (body) = gimple_asm_volatile_p (stmt);
diff --git a/gcc/config/arm/arm_neon.h b/gcc/config/arm/arm_neon.h
index dcd533f..7a800062 100644
--- a/gcc/config/arm/arm_neon.h
+++ b/gcc/config/arm/arm_neon.h
@@ -2359,112 +2359,120 @@ __extension__ extern __inline uint8x8_t
__attribute__ ((__always_inline__, __gnu_inline__, __artificial__))
vceq_s8 (int8x8_t __a, int8x8_t __b)
{
- return (uint8x8_t)__builtin_neon_vceqv8qi (__a, __b);
+ return (uint8x8_t) (__a == __b);
}
__extension__ extern __inline uint16x4_t
__attribute__ ((__always_inline__, __gnu_inline__, __artificial__))
vceq_s16 (int16x4_t __a, int16x4_t __b)
{
- return (uint16x4_t)__builtin_neon_vceqv4hi (__a, __b);
+ return (uint16x4_t) (__a == __b);
}
__extension__ extern __inline uint32x2_t
__attribute__ ((__always_inline__, __gnu_inline__, __artificial__))
vceq_s32 (int32x2_t __a, int32x2_t __b)
{
- return (uint32x2_t)__builtin_neon_vceqv2si (__a, __b);
+ return (uint32x2_t) (__a == __b);
}
__extension__ extern __inline uint32x2_t
__attribute__ ((__always_inline__, __gnu_inline__, __artificial__))
vceq_f32 (float32x2_t __a, float32x2_t __b)
{
+#ifdef __FAST_MATH__
+ return (uint32x2_t) (__a == __b);
+#else
return (uint32x2_t)__builtin_neon_vceqv2sf (__a, __b);
+#endif
}
__extension__ extern __inline uint8x8_t
__attribute__ ((__always_inline__, __gnu_inline__, __artificial__))
vceq_u8 (uint8x8_t __a, uint8x8_t __b)
{
- return (uint8x8_t)__builtin_neon_vceqv8qi ((int8x8_t) __a, (int8x8_t) __b);
+ return (uint8x8_t) (__a == __b);
}
__extension__ extern __inline uint16x4_t
__attribute__ ((__always_inline__, __gnu_inline__, __artificial__))
vceq_u16 (uint16x4_t __a, uint16x4_t __b)
{
- return (uint16x4_t)__builtin_neon_vceqv4hi ((int16x4_t) __a, (int16x4_t) __b);
+ return (uint16x4_t) (__a == __b);
}
__extension__ extern __inline uint32x2_t
__attribute__ ((__always_inline__, __gnu_inline__, __artificial__))
vceq_u32 (uint32x2_t __a, uint32x2_t __b)
{
- return (uint32x2_t)__builtin_neon_vceqv2si ((int32x2_t) __a, (int32x2_t) __b);
+ return (uint32x2_t) (__a == __b);
}
__extension__ extern __inline uint8x8_t
__attribute__ ((__always_inline__, __gnu_inline__, __artificial__))
vceq_p8 (poly8x8_t __a, poly8x8_t __b)
{
- return (uint8x8_t)__builtin_neon_vceqv8qi ((int8x8_t) __a, (int8x8_t) __b);
+ return (uint8x8_t) (__a == __b);
}
__extension__ extern __inline uint8x16_t
__attribute__ ((__always_inline__, __gnu_inline__, __artificial__))
vceqq_s8 (int8x16_t __a, int8x16_t __b)
{
- return (uint8x16_t)__builtin_neon_vceqv16qi (__a, __b);
+ return (uint8x16_t) (__a == __b);
}
__extension__ extern __inline uint16x8_t
__attribute__ ((__always_inline__, __gnu_inline__, __artificial__))
vceqq_s16 (int16x8_t __a, int16x8_t __b)
{
- return (uint16x8_t)__builtin_neon_vceqv8hi (__a, __b);
+ return (uint16x8_t) (__a == __b);
}
__extension__ extern __inline uint32x4_t
__attribute__ ((__always_inline__, __gnu_inline__, __artificial__))
vceqq_s32 (int32x4_t __a, int32x4_t __b)
{
- return (uint32x4_t)__builtin_neon_vceqv4si (__a, __b);
+ return (uint32x4_t) (__a == __b);
}
__extension__ extern __inline uint32x4_t
__attribute__ ((__always_inline__, __gnu_inline__, __artificial__))
vceqq_f32 (float32x4_t __a, float32x4_t __b)
{
+#ifdef __FAST_MATH__
+ return (uint32x4_t) (__a == __b);
+#else
return (uint32x4_t)__builtin_neon_vceqv4sf (__a, __b);
+#endif
}
__extension__ extern __inline uint8x16_t
__attribute__ ((__always_inline__, __gnu_inline__, __artificial__))
vceqq_u8 (uint8x16_t __a, uint8x16_t __b)
{
- return (uint8x16_t)__builtin_neon_vceqv16qi ((int8x16_t) __a, (int8x16_t) __b);
+ return (uint8x16_t) (__a == __b);
}
__extension__ extern __inline uint16x8_t
__attribute__ ((__always_inline__, __gnu_inline__, __artificial__))
vceqq_u16 (uint16x8_t __a, uint16x8_t __b)
{
- return (uint16x8_t)__builtin_neon_vceqv8hi ((int16x8_t) __a, (int16x8_t) __b);
+ return (uint16x8_t) (__a == __b);
}
__extension__ extern __inline uint32x4_t
__attribute__ ((__always_inline__, __gnu_inline__, __artificial__))
vceqq_u32 (uint32x4_t __a, uint32x4_t __b)
{
- return (uint32x4_t)__builtin_neon_vceqv4si ((int32x4_t) __a, (int32x4_t) __b);
+ return (uint32x4_t) (__a == __b);
}
__extension__ extern __inline uint8x16_t
__attribute__ ((__always_inline__, __gnu_inline__, __artificial__))
vceqq_p8 (poly8x16_t __a, poly8x16_t __b)
{
- return (uint8x16_t)__builtin_neon_vceqv16qi ((int8x16_t) __a, (int8x16_t) __b);
+ return (uint8x16_t) (__a == __b);
}
__extension__ extern __inline uint8x8_t
@@ -17195,14 +17203,22 @@ __extension__ extern __inline uint16x4_t
__attribute__ ((__always_inline__, __gnu_inline__, __artificial__))
vceq_f16 (float16x4_t __a, float16x4_t __b)
{
+#ifdef __FAST_MATH__
+ return (uint16x4_t) (__a == __b);
+#else
return (uint16x4_t)__builtin_neon_vceqv4hf (__a, __b);
+#endif
}
__extension__ extern __inline uint16x8_t
__attribute__ ((__always_inline__, __gnu_inline__, __artificial__))
vceqq_f16 (float16x8_t __a, float16x8_t __b)
{
+#ifdef __FAST_MATH__
+ return (uint16x8_t) (__a == __b);
+#else
return (uint16x8_t)__builtin_neon_vceqv8hf (__a, __b);
+#endif
}
__extension__ extern __inline uint16x4_t
diff --git a/gcc/config/arm/iterators.md b/gcc/config/arm/iterators.md
index 5c4fe89..fafbd2f 100644
--- a/gcc/config/arm/iterators.md
+++ b/gcc/config/arm/iterators.md
@@ -364,8 +364,6 @@
(define_int_iterator NEON_VCMP [UNSPEC_VCEQ UNSPEC_VCGT UNSPEC_VCGE
UNSPEC_VCLT UNSPEC_VCLE])
-(define_int_iterator NEON_VACMP [UNSPEC_VCAGE UNSPEC_VCAGT])
-
(define_int_iterator NEON_VAGLTE [UNSPEC_VCAGE UNSPEC_VCAGT
UNSPEC_VCALE UNSPEC_VCALT])
diff --git a/gcc/config/arm/neon.md b/gcc/config/arm/neon.md
index 392d960..81cc8d3 100644
--- a/gcc/config/arm/neon.md
+++ b/gcc/config/arm/neon.md
@@ -2387,7 +2387,7 @@
(define_expand "neon_vca<cmp_op><mode>"
[(set (match_operand:<V_cmp_result> 0 "s_register_operand")
(neg:<V_cmp_result>
- (GTGE:<V_cmp_result>
+ (GLTE:<V_cmp_result>
(abs:VCVTF (match_operand:VCVTF 1 "s_register_operand"))
(abs:VCVTF (match_operand:VCVTF 2 "s_register_operand")))))]
"TARGET_NEON"
@@ -2406,7 +2406,7 @@
(define_insn "neon_vca<cmp_op><mode>_insn"
[(set (match_operand:<V_cmp_result> 0 "s_register_operand" "=w")
(neg:<V_cmp_result>
- (GTGE:<V_cmp_result>
+ (GLTE:<V_cmp_result>
(abs:VCVTF (match_operand:VCVTF 1 "s_register_operand" "w"))
(abs:VCVTF (match_operand:VCVTF 2 "s_register_operand" "w")))))]
"TARGET_NEON && flag_unsafe_math_optimizations"
@@ -2418,7 +2418,7 @@
[(set (match_operand:<V_cmp_result> 0 "s_register_operand" "=w")
(unspec:<V_cmp_result> [(match_operand:VCVTF 1 "s_register_operand" "w")
(match_operand:VCVTF 2 "s_register_operand" "w")]
- NEON_VACMP))]
+ NEON_VAGLTE))]
"TARGET_NEON"
"vac<cmp_op_unsp>.<V_if_elem>\t%<V_reg>0, %<V_reg>1, %<V_reg>2"
[(set_attr "type" "neon_fp_compare_s<q>")]
diff --git a/gcc/config/i386/i386-builtin.def b/gcc/config/i386/i386-builtin.def
index 80c2a2c..31df3a6 100644
--- a/gcc/config/i386/i386-builtin.def
+++ b/gcc/config/i386/i386-builtin.def
@@ -204,13 +204,13 @@ BDESC (OPTION_MASK_ISA_AVX512F, 0, CODE_FOR_avx512f_compressstorev16sf_mask, "__
BDESC (OPTION_MASK_ISA_AVX512F, 0, CODE_FOR_avx512f_compressstorev16si_mask, "__builtin_ia32_compressstoresi512_mask", IX86_BUILTIN_PCOMPRESSDSTORE512, UNKNOWN, (int) VOID_FTYPE_PV16SI_V16SI_UHI)
BDESC (OPTION_MASK_ISA_AVX512F, 0, CODE_FOR_avx512f_compressstorev8df_mask, "__builtin_ia32_compressstoredf512_mask", IX86_BUILTIN_COMPRESSPDSTORE512, UNKNOWN, (int) VOID_FTYPE_PV8DF_V8DF_UQI)
BDESC (OPTION_MASK_ISA_AVX512F, 0, CODE_FOR_avx512f_compressstorev8di_mask, "__builtin_ia32_compressstoredi512_mask", IX86_BUILTIN_PCOMPRESSQSTORE512, UNKNOWN, (int) VOID_FTYPE_PV8DI_V8DI_UQI)
-BDESC (OPTION_MASK_ISA_AVX512F, 0, CODE_FOR_avx512f_expandv16sf_mask, "__builtin_ia32_expandloadsf512_mask", IX86_BUILTIN_EXPANDPSLOAD512, UNKNOWN, (int) V16SF_FTYPE_PCV16SF_V16SF_UHI)
+BDESC (OPTION_MASK_ISA_AVX512F, 0, CODE_FOR_expandv16sf_mask, "__builtin_ia32_expandloadsf512_mask", IX86_BUILTIN_EXPANDPSLOAD512, UNKNOWN, (int) V16SF_FTYPE_PCV16SF_V16SF_UHI)
BDESC (OPTION_MASK_ISA_AVX512F, 0, CODE_FOR_avx512f_expandv16sf_maskz, "__builtin_ia32_expandloadsf512_maskz", IX86_BUILTIN_EXPANDPSLOAD512Z, UNKNOWN, (int) V16SF_FTYPE_PCV16SF_V16SF_UHI)
-BDESC (OPTION_MASK_ISA_AVX512F, 0, CODE_FOR_avx512f_expandv16si_mask, "__builtin_ia32_expandloadsi512_mask", IX86_BUILTIN_PEXPANDDLOAD512, UNKNOWN, (int) V16SI_FTYPE_PCV16SI_V16SI_UHI)
+BDESC (OPTION_MASK_ISA_AVX512F, 0, CODE_FOR_expandv16si_mask, "__builtin_ia32_expandloadsi512_mask", IX86_BUILTIN_PEXPANDDLOAD512, UNKNOWN, (int) V16SI_FTYPE_PCV16SI_V16SI_UHI)
BDESC (OPTION_MASK_ISA_AVX512F, 0, CODE_FOR_avx512f_expandv16si_maskz, "__builtin_ia32_expandloadsi512_maskz", IX86_BUILTIN_PEXPANDDLOAD512Z, UNKNOWN, (int) V16SI_FTYPE_PCV16SI_V16SI_UHI)
-BDESC (OPTION_MASK_ISA_AVX512F, 0, CODE_FOR_avx512f_expandv8df_mask, "__builtin_ia32_expandloaddf512_mask", IX86_BUILTIN_EXPANDPDLOAD512, UNKNOWN, (int) V8DF_FTYPE_PCV8DF_V8DF_UQI)
+BDESC (OPTION_MASK_ISA_AVX512F, 0, CODE_FOR_expandv8df_mask, "__builtin_ia32_expandloaddf512_mask", IX86_BUILTIN_EXPANDPDLOAD512, UNKNOWN, (int) V8DF_FTYPE_PCV8DF_V8DF_UQI)
BDESC (OPTION_MASK_ISA_AVX512F, 0, CODE_FOR_avx512f_expandv8df_maskz, "__builtin_ia32_expandloaddf512_maskz", IX86_BUILTIN_EXPANDPDLOAD512Z, UNKNOWN, (int) V8DF_FTYPE_PCV8DF_V8DF_UQI)
-BDESC (OPTION_MASK_ISA_AVX512F, 0, CODE_FOR_avx512f_expandv8di_mask, "__builtin_ia32_expandloaddi512_mask", IX86_BUILTIN_PEXPANDQLOAD512, UNKNOWN, (int) V8DI_FTYPE_PCV8DI_V8DI_UQI)
+BDESC (OPTION_MASK_ISA_AVX512F, 0, CODE_FOR_expandv8di_mask, "__builtin_ia32_expandloaddi512_mask", IX86_BUILTIN_PEXPANDQLOAD512, UNKNOWN, (int) V8DI_FTYPE_PCV8DI_V8DI_UQI)
BDESC (OPTION_MASK_ISA_AVX512F, 0, CODE_FOR_avx512f_expandv8di_maskz, "__builtin_ia32_expandloaddi512_maskz", IX86_BUILTIN_PEXPANDQLOAD512Z, UNKNOWN, (int) V8DI_FTYPE_PCV8DI_V8DI_UQI)
BDESC (OPTION_MASK_ISA_AVX512F, 0, CODE_FOR_avx512f_loadv16si_mask, "__builtin_ia32_loaddqusi512_mask", IX86_BUILTIN_LOADDQUSI512, UNKNOWN, (int) V16SI_FTYPE_PCINT_V16SI_UHI)
BDESC (OPTION_MASK_ISA_AVX512F, 0, CODE_FOR_avx512f_loadv8di_mask, "__builtin_ia32_loaddqudi512_mask", IX86_BUILTIN_LOADDQUDI512, UNKNOWN, (int) V8DI_FTYPE_PCINT64_V8DI_UQI)
@@ -337,14 +337,14 @@ BDESC (OPTION_MASK_ISA_AVX512VL, 0, CODE_FOR_avx512vl_compressstorev4di_mask, "_
BDESC (OPTION_MASK_ISA_AVX512VL, 0, CODE_FOR_avx512vl_compressstorev2di_mask, "__builtin_ia32_compressstoredi128_mask", IX86_BUILTIN_PCOMPRESSQSTORE128, UNKNOWN, (int) VOID_FTYPE_PV2DI_V2DI_UQI)
BDESC (OPTION_MASK_ISA_AVX512VL, 0, CODE_FOR_avx512vl_compressstorev8si_mask, "__builtin_ia32_compressstoresi256_mask", IX86_BUILTIN_PCOMPRESSDSTORE256, UNKNOWN, (int) VOID_FTYPE_PV8SI_V8SI_UQI)
BDESC (OPTION_MASK_ISA_AVX512VL, 0, CODE_FOR_avx512vl_compressstorev4si_mask, "__builtin_ia32_compressstoresi128_mask", IX86_BUILTIN_PCOMPRESSDSTORE128, UNKNOWN, (int) VOID_FTYPE_PV4SI_V4SI_UQI)
-BDESC (OPTION_MASK_ISA_AVX512VL, 0, CODE_FOR_avx512vl_expandv4df_mask, "__builtin_ia32_expandloaddf256_mask", IX86_BUILTIN_EXPANDPDLOAD256, UNKNOWN, (int) V4DF_FTYPE_PCV4DF_V4DF_UQI)
-BDESC (OPTION_MASK_ISA_AVX512VL, 0, CODE_FOR_avx512vl_expandv2df_mask, "__builtin_ia32_expandloaddf128_mask", IX86_BUILTIN_EXPANDPDLOAD128, UNKNOWN, (int) V2DF_FTYPE_PCV2DF_V2DF_UQI)
-BDESC (OPTION_MASK_ISA_AVX512VL, 0, CODE_FOR_avx512vl_expandv8sf_mask, "__builtin_ia32_expandloadsf256_mask", IX86_BUILTIN_EXPANDPSLOAD256, UNKNOWN, (int) V8SF_FTYPE_PCV8SF_V8SF_UQI)
-BDESC (OPTION_MASK_ISA_AVX512VL, 0, CODE_FOR_avx512vl_expandv4sf_mask, "__builtin_ia32_expandloadsf128_mask", IX86_BUILTIN_EXPANDPSLOAD128, UNKNOWN, (int) V4SF_FTYPE_PCV4SF_V4SF_UQI)
-BDESC (OPTION_MASK_ISA_AVX512VL, 0, CODE_FOR_avx512vl_expandv4di_mask, "__builtin_ia32_expandloaddi256_mask", IX86_BUILTIN_PEXPANDQLOAD256, UNKNOWN, (int) V4DI_FTYPE_PCV4DI_V4DI_UQI)
-BDESC (OPTION_MASK_ISA_AVX512VL, 0, CODE_FOR_avx512vl_expandv2di_mask, "__builtin_ia32_expandloaddi128_mask", IX86_BUILTIN_PEXPANDQLOAD128, UNKNOWN, (int) V2DI_FTYPE_PCV2DI_V2DI_UQI)
-BDESC (OPTION_MASK_ISA_AVX512VL, 0, CODE_FOR_avx512vl_expandv8si_mask, "__builtin_ia32_expandloadsi256_mask", IX86_BUILTIN_PEXPANDDLOAD256, UNKNOWN, (int) V8SI_FTYPE_PCV8SI_V8SI_UQI)
-BDESC (OPTION_MASK_ISA_AVX512VL, 0, CODE_FOR_avx512vl_expandv4si_mask, "__builtin_ia32_expandloadsi128_mask", IX86_BUILTIN_PEXPANDDLOAD128, UNKNOWN, (int) V4SI_FTYPE_PCV4SI_V4SI_UQI)
+BDESC (OPTION_MASK_ISA_AVX512VL, 0, CODE_FOR_expandv4df_mask, "__builtin_ia32_expandloaddf256_mask", IX86_BUILTIN_EXPANDPDLOAD256, UNKNOWN, (int) V4DF_FTYPE_PCV4DF_V4DF_UQI)
+BDESC (OPTION_MASK_ISA_AVX512VL, 0, CODE_FOR_expandv2df_mask, "__builtin_ia32_expandloaddf128_mask", IX86_BUILTIN_EXPANDPDLOAD128, UNKNOWN, (int) V2DF_FTYPE_PCV2DF_V2DF_UQI)
+BDESC (OPTION_MASK_ISA_AVX512VL, 0, CODE_FOR_expandv8sf_mask, "__builtin_ia32_expandloadsf256_mask", IX86_BUILTIN_EXPANDPSLOAD256, UNKNOWN, (int) V8SF_FTYPE_PCV8SF_V8SF_UQI)
+BDESC (OPTION_MASK_ISA_AVX512VL, 0, CODE_FOR_expandv4sf_mask, "__builtin_ia32_expandloadsf128_mask", IX86_BUILTIN_EXPANDPSLOAD128, UNKNOWN, (int) V4SF_FTYPE_PCV4SF_V4SF_UQI)
+BDESC (OPTION_MASK_ISA_AVX512VL, 0, CODE_FOR_expandv4di_mask, "__builtin_ia32_expandloaddi256_mask", IX86_BUILTIN_PEXPANDQLOAD256, UNKNOWN, (int) V4DI_FTYPE_PCV4DI_V4DI_UQI)
+BDESC (OPTION_MASK_ISA_AVX512VL, 0, CODE_FOR_expandv2di_mask, "__builtin_ia32_expandloaddi128_mask", IX86_BUILTIN_PEXPANDQLOAD128, UNKNOWN, (int) V2DI_FTYPE_PCV2DI_V2DI_UQI)
+BDESC (OPTION_MASK_ISA_AVX512VL, 0, CODE_FOR_expandv8si_mask, "__builtin_ia32_expandloadsi256_mask", IX86_BUILTIN_PEXPANDDLOAD256, UNKNOWN, (int) V8SI_FTYPE_PCV8SI_V8SI_UQI)
+BDESC (OPTION_MASK_ISA_AVX512VL, 0, CODE_FOR_expandv4si_mask, "__builtin_ia32_expandloadsi128_mask", IX86_BUILTIN_PEXPANDDLOAD128, UNKNOWN, (int) V4SI_FTYPE_PCV4SI_V4SI_UQI)
BDESC (OPTION_MASK_ISA_AVX512VL, 0, CODE_FOR_avx512vl_expandv4df_maskz, "__builtin_ia32_expandloaddf256_maskz", IX86_BUILTIN_EXPANDPDLOAD256Z, UNKNOWN, (int) V4DF_FTYPE_PCV4DF_V4DF_UQI)
BDESC (OPTION_MASK_ISA_AVX512VL, 0, CODE_FOR_avx512vl_expandv2df_maskz, "__builtin_ia32_expandloaddf128_maskz", IX86_BUILTIN_EXPANDPDLOAD128Z, UNKNOWN, (int) V2DF_FTYPE_PCV2DF_V2DF_UQI)
BDESC (OPTION_MASK_ISA_AVX512VL, 0, CODE_FOR_avx512vl_expandv8sf_maskz, "__builtin_ia32_expandloadsf256_maskz", IX86_BUILTIN_EXPANDPSLOAD256Z, UNKNOWN, (int) V8SF_FTYPE_PCV8SF_V8SF_UQI)
@@ -1342,9 +1342,9 @@ BDESC (OPTION_MASK_ISA_AVX512F, 0, CODE_FOR_floatv8siv8df2_mask, "__builtin_ia32
BDESC (OPTION_MASK_ISA_AVX512F, 0, CODE_FOR_avx512f_vcvtps2ph512_mask, "__builtin_ia32_vcvtps2ph512_mask", IX86_BUILTIN_CVTPS2PH512, UNKNOWN, (int) V16HI_FTYPE_V16SF_INT_V16HI_UHI)
BDESC (OPTION_MASK_ISA_AVX512F, 0, CODE_FOR_ufloatv8siv8df2_mask, "__builtin_ia32_cvtudq2pd512_mask", IX86_BUILTIN_CVTUDQ2PD512, UNKNOWN, (int) V8DF_FTYPE_V8SI_V8DF_UQI)
BDESC (OPTION_MASK_ISA_AVX512F, 0, CODE_FOR_cvtusi2sd32, "__builtin_ia32_cvtusi2sd32", IX86_BUILTIN_CVTUSI2SD32, UNKNOWN, (int) V2DF_FTYPE_V2DF_UINT)
-BDESC (OPTION_MASK_ISA_AVX512F, 0, CODE_FOR_avx512f_expandv8df_mask, "__builtin_ia32_expanddf512_mask", IX86_BUILTIN_EXPANDPD512, UNKNOWN, (int) V8DF_FTYPE_V8DF_V8DF_UQI)
+BDESC (OPTION_MASK_ISA_AVX512F, 0, CODE_FOR_expandv8df_mask, "__builtin_ia32_expanddf512_mask", IX86_BUILTIN_EXPANDPD512, UNKNOWN, (int) V8DF_FTYPE_V8DF_V8DF_UQI)
BDESC (OPTION_MASK_ISA_AVX512F, 0, CODE_FOR_avx512f_expandv8df_maskz, "__builtin_ia32_expanddf512_maskz", IX86_BUILTIN_EXPANDPD512Z, UNKNOWN, (int) V8DF_FTYPE_V8DF_V8DF_UQI)
-BDESC (OPTION_MASK_ISA_AVX512F, 0, CODE_FOR_avx512f_expandv16sf_mask, "__builtin_ia32_expandsf512_mask", IX86_BUILTIN_EXPANDPS512, UNKNOWN, (int) V16SF_FTYPE_V16SF_V16SF_UHI)
+BDESC (OPTION_MASK_ISA_AVX512F, 0, CODE_FOR_expandv16sf_mask, "__builtin_ia32_expandsf512_mask", IX86_BUILTIN_EXPANDPS512, UNKNOWN, (int) V16SF_FTYPE_V16SF_V16SF_UHI)
BDESC (OPTION_MASK_ISA_AVX512F, 0, CODE_FOR_avx512f_expandv16sf_maskz, "__builtin_ia32_expandsf512_maskz", IX86_BUILTIN_EXPANDPS512Z, UNKNOWN, (int) V16SF_FTYPE_V16SF_V16SF_UHI)
BDESC (OPTION_MASK_ISA_AVX512F, 0, CODE_FOR_avx512f_vextractf32x4_mask, "__builtin_ia32_extractf32x4_mask", IX86_BUILTIN_EXTRACTF32X4, UNKNOWN, (int) V4SF_FTYPE_V16SF_INT_V4SF_UQI)
BDESC (OPTION_MASK_ISA_AVX512F, 0, CODE_FOR_avx512f_vextractf64x4_mask, "__builtin_ia32_extractf64x4_mask", IX86_BUILTIN_EXTRACTF64X4, UNKNOWN, (int) V4DF_FTYPE_V8DF_INT_V4DF_UQI)
@@ -1381,9 +1381,9 @@ BDESC (OPTION_MASK_ISA_AVX512F, 0, CODE_FOR_avx512f_gtv16si3_mask, "__builtin_ia
BDESC (OPTION_MASK_ISA_AVX512F, 0, CODE_FOR_avx512f_gtv8di3_mask, "__builtin_ia32_pcmpgtq512_mask", IX86_BUILTIN_PCMPGTQ512_MASK, UNKNOWN, (int) UQI_FTYPE_V8DI_V8DI_UQI)
BDESC (OPTION_MASK_ISA_AVX512F, 0, CODE_FOR_avx512f_compressv16si_mask, "__builtin_ia32_compresssi512_mask", IX86_BUILTIN_PCOMPRESSD512, UNKNOWN, (int) V16SI_FTYPE_V16SI_V16SI_UHI)
BDESC (OPTION_MASK_ISA_AVX512F, 0, CODE_FOR_avx512f_compressv8di_mask, "__builtin_ia32_compressdi512_mask", IX86_BUILTIN_PCOMPRESSQ512, UNKNOWN, (int) V8DI_FTYPE_V8DI_V8DI_UQI)
-BDESC (OPTION_MASK_ISA_AVX512F, 0, CODE_FOR_avx512f_expandv16si_mask, "__builtin_ia32_expandsi512_mask", IX86_BUILTIN_PEXPANDD512, UNKNOWN, (int) V16SI_FTYPE_V16SI_V16SI_UHI)
+BDESC (OPTION_MASK_ISA_AVX512F, 0, CODE_FOR_expandv16si_mask, "__builtin_ia32_expandsi512_mask", IX86_BUILTIN_PEXPANDD512, UNKNOWN, (int) V16SI_FTYPE_V16SI_V16SI_UHI)
BDESC (OPTION_MASK_ISA_AVX512F, 0, CODE_FOR_avx512f_expandv16si_maskz, "__builtin_ia32_expandsi512_maskz", IX86_BUILTIN_PEXPANDD512Z, UNKNOWN, (int) V16SI_FTYPE_V16SI_V16SI_UHI)
-BDESC (OPTION_MASK_ISA_AVX512F, 0, CODE_FOR_avx512f_expandv8di_mask, "__builtin_ia32_expanddi512_mask", IX86_BUILTIN_PEXPANDQ512, UNKNOWN, (int) V8DI_FTYPE_V8DI_V8DI_UQI)
+BDESC (OPTION_MASK_ISA_AVX512F, 0, CODE_FOR_expandv8di_mask, "__builtin_ia32_expanddi512_mask", IX86_BUILTIN_PEXPANDQ512, UNKNOWN, (int) V8DI_FTYPE_V8DI_V8DI_UQI)
BDESC (OPTION_MASK_ISA_AVX512F, 0, CODE_FOR_avx512f_expandv8di_maskz, "__builtin_ia32_expanddi512_maskz", IX86_BUILTIN_PEXPANDQ512Z, UNKNOWN, (int) V8DI_FTYPE_V8DI_V8DI_UQI)
BDESC (OPTION_MASK_ISA_AVX512F, 0, CODE_FOR_smaxv16si3_mask, "__builtin_ia32_pmaxsd512_mask", IX86_BUILTIN_PMAXSD512, UNKNOWN, (int) V16SI_FTYPE_V16SI_V16SI_V16SI_UHI)
BDESC (OPTION_MASK_ISA_AVX512F, 0, CODE_FOR_smaxv8di3_mask, "__builtin_ia32_pmaxsq512_mask", IX86_BUILTIN_PMAXSQ512, UNKNOWN, (int) V8DI_FTYPE_V8DI_V8DI_V8DI_UQI)
@@ -2187,14 +2187,14 @@ BDESC (OPTION_MASK_ISA_AVX512VL, 0, CODE_FOR_avx512vl_compressv4di_mask, "__buil
BDESC (OPTION_MASK_ISA_AVX512VL, 0, CODE_FOR_avx512vl_compressv2di_mask, "__builtin_ia32_compressdi128_mask", IX86_BUILTIN_PCOMPRESSQ128, UNKNOWN, (int) V2DI_FTYPE_V2DI_V2DI_UQI)
BDESC (OPTION_MASK_ISA_AVX512VL, 0, CODE_FOR_avx512vl_compressv8si_mask, "__builtin_ia32_compresssi256_mask", IX86_BUILTIN_PCOMPRESSD256, UNKNOWN, (int) V8SI_FTYPE_V8SI_V8SI_UQI)
BDESC (OPTION_MASK_ISA_AVX512VL, 0, CODE_FOR_avx512vl_compressv4si_mask, "__builtin_ia32_compresssi128_mask", IX86_BUILTIN_PCOMPRESSD128, UNKNOWN, (int) V4SI_FTYPE_V4SI_V4SI_UQI)
-BDESC (OPTION_MASK_ISA_AVX512VL, 0, CODE_FOR_avx512vl_expandv4df_mask, "__builtin_ia32_expanddf256_mask", IX86_BUILTIN_EXPANDPD256, UNKNOWN, (int) V4DF_FTYPE_V4DF_V4DF_UQI)
-BDESC (OPTION_MASK_ISA_AVX512VL, 0, CODE_FOR_avx512vl_expandv2df_mask, "__builtin_ia32_expanddf128_mask", IX86_BUILTIN_EXPANDPD128, UNKNOWN, (int) V2DF_FTYPE_V2DF_V2DF_UQI)
-BDESC (OPTION_MASK_ISA_AVX512VL, 0, CODE_FOR_avx512vl_expandv8sf_mask, "__builtin_ia32_expandsf256_mask", IX86_BUILTIN_EXPANDPS256, UNKNOWN, (int) V8SF_FTYPE_V8SF_V8SF_UQI)
-BDESC (OPTION_MASK_ISA_AVX512VL, 0, CODE_FOR_avx512vl_expandv4sf_mask, "__builtin_ia32_expandsf128_mask", IX86_BUILTIN_EXPANDPS128, UNKNOWN, (int) V4SF_FTYPE_V4SF_V4SF_UQI)
-BDESC (OPTION_MASK_ISA_AVX512VL, 0, CODE_FOR_avx512vl_expandv4di_mask, "__builtin_ia32_expanddi256_mask", IX86_BUILTIN_PEXPANDQ256, UNKNOWN, (int) V4DI_FTYPE_V4DI_V4DI_UQI)
-BDESC (OPTION_MASK_ISA_AVX512VL, 0, CODE_FOR_avx512vl_expandv2di_mask, "__builtin_ia32_expanddi128_mask", IX86_BUILTIN_PEXPANDQ128, UNKNOWN, (int) V2DI_FTYPE_V2DI_V2DI_UQI)
-BDESC (OPTION_MASK_ISA_AVX512VL, 0, CODE_FOR_avx512vl_expandv8si_mask, "__builtin_ia32_expandsi256_mask", IX86_BUILTIN_PEXPANDD256, UNKNOWN, (int) V8SI_FTYPE_V8SI_V8SI_UQI)
-BDESC (OPTION_MASK_ISA_AVX512VL, 0, CODE_FOR_avx512vl_expandv4si_mask, "__builtin_ia32_expandsi128_mask", IX86_BUILTIN_PEXPANDD128, UNKNOWN, (int) V4SI_FTYPE_V4SI_V4SI_UQI)
+BDESC (OPTION_MASK_ISA_AVX512VL, 0, CODE_FOR_expandv4df_mask, "__builtin_ia32_expanddf256_mask", IX86_BUILTIN_EXPANDPD256, UNKNOWN, (int) V4DF_FTYPE_V4DF_V4DF_UQI)
+BDESC (OPTION_MASK_ISA_AVX512VL, 0, CODE_FOR_expandv2df_mask, "__builtin_ia32_expanddf128_mask", IX86_BUILTIN_EXPANDPD128, UNKNOWN, (int) V2DF_FTYPE_V2DF_V2DF_UQI)
+BDESC (OPTION_MASK_ISA_AVX512VL, 0, CODE_FOR_expandv8sf_mask, "__builtin_ia32_expandsf256_mask", IX86_BUILTIN_EXPANDPS256, UNKNOWN, (int) V8SF_FTYPE_V8SF_V8SF_UQI)
+BDESC (OPTION_MASK_ISA_AVX512VL, 0, CODE_FOR_expandv4sf_mask, "__builtin_ia32_expandsf128_mask", IX86_BUILTIN_EXPANDPS128, UNKNOWN, (int) V4SF_FTYPE_V4SF_V4SF_UQI)
+BDESC (OPTION_MASK_ISA_AVX512VL, 0, CODE_FOR_expandv4di_mask, "__builtin_ia32_expanddi256_mask", IX86_BUILTIN_PEXPANDQ256, UNKNOWN, (int) V4DI_FTYPE_V4DI_V4DI_UQI)
+BDESC (OPTION_MASK_ISA_AVX512VL, 0, CODE_FOR_expandv2di_mask, "__builtin_ia32_expanddi128_mask", IX86_BUILTIN_PEXPANDQ128, UNKNOWN, (int) V2DI_FTYPE_V2DI_V2DI_UQI)
+BDESC (OPTION_MASK_ISA_AVX512VL, 0, CODE_FOR_expandv8si_mask, "__builtin_ia32_expandsi256_mask", IX86_BUILTIN_PEXPANDD256, UNKNOWN, (int) V8SI_FTYPE_V8SI_V8SI_UQI)
+BDESC (OPTION_MASK_ISA_AVX512VL, 0, CODE_FOR_expandv4si_mask, "__builtin_ia32_expandsi128_mask", IX86_BUILTIN_PEXPANDD128, UNKNOWN, (int) V4SI_FTYPE_V4SI_V4SI_UQI)
BDESC (OPTION_MASK_ISA_AVX512VL, 0, CODE_FOR_avx512vl_expandv4df_maskz, "__builtin_ia32_expanddf256_maskz", IX86_BUILTIN_EXPANDPD256Z, UNKNOWN, (int) V4DF_FTYPE_V4DF_V4DF_UQI)
BDESC (OPTION_MASK_ISA_AVX512VL, 0, CODE_FOR_avx512vl_expandv2df_maskz, "__builtin_ia32_expanddf128_maskz", IX86_BUILTIN_EXPANDPD128Z, UNKNOWN, (int) V2DF_FTYPE_V2DF_V2DF_UQI)
BDESC (OPTION_MASK_ISA_AVX512VL, 0, CODE_FOR_avx512vl_expandv8sf_maskz, "__builtin_ia32_expandsf256_maskz", IX86_BUILTIN_EXPANDPS256Z, UNKNOWN, (int) V8SF_FTYPE_V8SF_V8SF_UQI)
diff --git a/gcc/config/i386/i386-expand.c b/gcc/config/i386/i386-expand.c
index 8f4e4e4..cc2eaee 100644
--- a/gcc/config/i386/i386-expand.c
+++ b/gcc/config/i386/i386-expand.c
@@ -10969,11 +10969,12 @@ ix86_expand_special_args_builtin (const struct builtin_description *d,
op = fixup_modeless_constant (op, mode);
- /* NB: 3-operands load implied it's a mask load,
+ /* NB: 3-operands load implied it's a mask load or v{p}expand*,
and that mask operand shoud be at the end.
Keep all-ones mask which would be simplified by the expander. */
if (nargs == 3 && i == 2 && klass == load
- && constm1_operand (op, mode))
+ && constm1_operand (op, mode)
+ && insn_p->operand[i].predicate (op, mode))
;
else if (GET_MODE (op) == mode || GET_MODE (op) == VOIDmode)
op = copy_to_mode_reg (mode, op);
diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c
index 7d0d414..c3740ff 100644
--- a/gcc/config/i386/i386.c
+++ b/gcc/config/i386/i386.c
@@ -20475,6 +20475,15 @@ x86_order_regs_for_local_alloc (void)
int pos = 0;
int i;
+ /* When allocano cost of GENERAL_REGS is same as MASK_REGS, allocate
+ MASK_REGS first since it has already been disparaged. This is for
+ testcase bitwise_mask_op3.c where the input is allocated as mask
+ registers, then mask bitwise instructions should be used there.
+ Refer to pr101142. */
+ /* Mask register. */
+ for (i = FIRST_MASK_REG; i <= LAST_MASK_REG; i++)
+ reg_alloc_order [pos++] = i;
+
/* First allocate the local general purpose registers. */
for (i = 0; i < FIRST_PSEUDO_REGISTER; i++)
if (GENERAL_REGNO_P (i) && call_used_or_fixed_reg_p (i))
@@ -20501,10 +20510,6 @@ x86_order_regs_for_local_alloc (void)
for (i = FIRST_EXT_REX_SSE_REG; i <= LAST_EXT_REX_SSE_REG; i++)
reg_alloc_order [pos++] = i;
- /* Mask register. */
- for (i = FIRST_MASK_REG; i <= LAST_MASK_REG; i++)
- reg_alloc_order [pos++] = i;
-
/* x87 registers. */
if (TARGET_SSE_MATH)
for (i = FIRST_STACK_REG; i <= LAST_STACK_REG; i++)
diff --git a/gcc/config/i386/i386.md b/gcc/config/i386/i386.md
index 48532eb..9116828 100644
--- a/gcc/config/i386/i386.md
+++ b/gcc/config/i386/i386.md
@@ -9138,7 +9138,7 @@
})
(define_insn "*anddi_1"
- [(set (match_operand:DI 0 "nonimmediate_operand" "=r,rm,r,r,k")
+ [(set (match_operand:DI 0 "nonimmediate_operand" "=r,rm,r,r,?k")
(and:DI
(match_operand:DI 1 "nonimmediate_operand" "%0,0,0,qm,k")
(match_operand:DI 2 "x86_64_szext_general_operand" "Z,re,m,L,k")))
@@ -9226,7 +9226,7 @@
(set_attr "mode" "SI")])
(define_insn "*and<mode>_1"
- [(set (match_operand:SWI24 0 "nonimmediate_operand" "=rm,r,Ya,k")
+ [(set (match_operand:SWI24 0 "nonimmediate_operand" "=rm,r,Ya,?k")
(and:SWI24 (match_operand:SWI24 1 "nonimmediate_operand" "%0,0,qm,k")
(match_operand:SWI24 2 "<general_operand>" "r<i>,m,L,k")))
(clobber (reg:CC FLAGS_REG))]
@@ -9255,7 +9255,7 @@
(set_attr "mode" "<MODE>,<MODE>,SI,<MODE>")])
(define_insn "*andqi_1"
- [(set (match_operand:QI 0 "nonimmediate_operand" "=qm,q,r,k")
+ [(set (match_operand:QI 0 "nonimmediate_operand" "=qm,q,r,?k")
(and:QI (match_operand:QI 1 "nonimmediate_operand" "%0,0,0,k")
(match_operand:QI 2 "general_operand" "qn,m,rn,k")))
(clobber (reg:CC FLAGS_REG))]
@@ -9651,7 +9651,7 @@
})
(define_insn "*andn<mode>_1"
- [(set (match_operand:SWI48 0 "register_operand" "=r,r,k")
+ [(set (match_operand:SWI48 0 "register_operand" "=r,r,?k")
(and:SWI48
(not:SWI48 (match_operand:SWI48 1 "register_operand" "r,r,k"))
(match_operand:SWI48 2 "nonimmediate_operand" "r,m,k")))
@@ -9667,7 +9667,7 @@
(set_attr "mode" "<MODE>")])
(define_insn "*andn<mode>_1"
- [(set (match_operand:SWI12 0 "register_operand" "=r,k")
+ [(set (match_operand:SWI12 0 "register_operand" "=r,?k")
(and:SWI12
(not:SWI12 (match_operand:SWI12 1 "register_operand" "r,k"))
(match_operand:SWI12 2 "register_operand" "r,k")))
@@ -9757,7 +9757,7 @@
})
(define_insn "*<code><mode>_1"
- [(set (match_operand:SWI248 0 "nonimmediate_operand" "=rm,r,k")
+ [(set (match_operand:SWI248 0 "nonimmediate_operand" "=rm,r,?k")
(any_or:SWI248
(match_operand:SWI248 1 "nonimmediate_operand" "%0,0,k")
(match_operand:SWI248 2 "<general_operand>" "r<i>,m,k")))
@@ -9847,7 +9847,7 @@
(set_attr "mode" "SI")])
(define_insn "*<code>qi_1"
- [(set (match_operand:QI 0 "nonimmediate_operand" "=qm,q,r,k")
+ [(set (match_operand:QI 0 "nonimmediate_operand" "=qm,q,r,?k")
(any_or:QI (match_operand:QI 1 "nonimmediate_operand" "%0,0,0,k")
(match_operand:QI 2 "general_operand" "qn,m,rn,k")))
(clobber (reg:CC FLAGS_REG))]
@@ -10603,7 +10603,7 @@
"split_double_mode (DImode, &operands[0], 2, &operands[0], &operands[2]);")
(define_insn "*one_cmpl<mode>2_1"
- [(set (match_operand:SWI248 0 "nonimmediate_operand" "=rm,k")
+ [(set (match_operand:SWI248 0 "nonimmediate_operand" "=rm,?k")
(not:SWI248 (match_operand:SWI248 1 "nonimmediate_operand" "0,k")))]
"ix86_unary_operator_ok (NOT, <MODE>mode, operands)"
"@
@@ -10620,7 +10620,7 @@
(set_attr "mode" "<MODE>")])
(define_insn "*one_cmplsi2_1_zext"
- [(set (match_operand:DI 0 "register_operand" "=r,k")
+ [(set (match_operand:DI 0 "register_operand" "=r,?k")
(zero_extend:DI
(not:SI (match_operand:SI 1 "register_operand" "0,k"))))]
"TARGET_64BIT && ix86_unary_operator_ok (NOT, SImode, operands)"
@@ -10632,7 +10632,7 @@
(set_attr "mode" "SI,SI")])
(define_insn "*one_cmplqi2_1"
- [(set (match_operand:QI 0 "nonimmediate_operand" "=qm,r,k")
+ [(set (match_operand:QI 0 "nonimmediate_operand" "=qm,r,?k")
(not:QI (match_operand:QI 1 "nonimmediate_operand" "0,0,k")))]
"ix86_unary_operator_ok (NOT, QImode, operands)"
"@
@@ -19357,6 +19357,42 @@
ix86_expand_clear (operands[1]);
})
+;; When optimizing for size, zeroing memory should use a register.
+(define_peephole2
+ [(match_scratch:SWI48 0 "r")
+ (set (match_operand:SWI48 1 "memory_operand" "") (const_int 0))
+ (set (match_operand:SWI48 2 "memory_operand" "") (const_int 0))
+ (set (match_operand:SWI48 3 "memory_operand" "") (const_int 0))
+ (set (match_operand:SWI48 4 "memory_operand" "") (const_int 0))]
+ "optimize_insn_for_size_p () && peep2_regno_dead_p (0, FLAGS_REG)"
+ [(set (match_dup 1) (match_dup 0))
+ (set (match_dup 2) (match_dup 0))
+ (set (match_dup 3) (match_dup 0))
+ (set (match_dup 4) (match_dup 0))]
+{
+ ix86_expand_clear (operands[0]);
+})
+
+(define_peephole2
+ [(match_scratch:SWI48 0 "r")
+ (set (match_operand:SWI48 1 "memory_operand" "") (const_int 0))
+ (set (match_operand:SWI48 2 "memory_operand" "") (const_int 0))]
+ "optimize_insn_for_size_p () && peep2_regno_dead_p (0, FLAGS_REG)"
+ [(set (match_dup 1) (match_dup 0))
+ (set (match_dup 2) (match_dup 0))]
+{
+ ix86_expand_clear (operands[0]);
+})
+
+(define_peephole2
+ [(match_scratch:SWI48 0 "r")
+ (set (match_operand:SWI48 1 "memory_operand" "") (const_int 0))]
+ "optimize_insn_for_size_p () && peep2_regno_dead_p (0, FLAGS_REG)"
+ [(set (match_dup 1) (match_dup 0))]
+{
+ ix86_expand_clear (operands[0]);
+})
+
;; Reload dislikes loading constants directly into class_likely_spilled
;; hard registers. Try to tidy things up here.
(define_peephole2
diff --git a/gcc/config/i386/sse.md b/gcc/config/i386/sse.md
index 94296bc..f5f9403 100644
--- a/gcc/config/i386/sse.md
+++ b/gcc/config/i386/sse.md
@@ -699,6 +699,17 @@
(V4DI "TARGET_AVX512VL") (V4DF "TARGET_AVX512VL")
(V4SI "TARGET_AVX512VL") (V4SF "TARGET_AVX512VL")
(V2DI "TARGET_AVX512VL") (V2DF "TARGET_AVX512VL")])
+(define_mode_iterator VI12_VI48F_AVX512VLBW
+ [(V16SI "TARGET_AVX512F") (V16SF "TARGET_AVX512F")
+ (V8DI "TARGET_AVX512F") (V8DF "TARGET_AVX512F")
+ (V8SI "TARGET_AVX512VL") (V8SF "TARGET_AVX512VL")
+ (V4DI "TARGET_AVX512VL") (V4DF "TARGET_AVX512VL")
+ (V4SI "TARGET_AVX512VL") (V4SF "TARGET_AVX512VL")
+ (V2DI "TARGET_AVX512VL") (V2DF "TARGET_AVX512VL")
+ (V64QI "TARGET_AVX512BW") (V16QI "TARGET_AVX512VL")
+ (V32QI "TARGET_AVX512VL && TARGET_AVX512BW") (V32HI "TARGET_AVX512BW")
+ (V16HI "TARGET_AVX512VL") (V8HI "TARGET_AVX512VL")])
+
(define_mode_iterator VI48F_256 [V8SI V8SF V4DI V4DF])
(define_mode_iterator VF_AVX512
@@ -23009,7 +23020,7 @@
"TARGET_AVX512F"
"operands[2] = CONST0_RTX (<MODE>mode);")
-(define_insn "<avx512>_expand<mode>_mask"
+(define_insn "expand<mode>_mask"
[(set (match_operand:VI48F 0 "register_operand" "=v,v")
(unspec:VI48F
[(match_operand:VI48F 1 "nonimmediate_operand" "v,m")
@@ -23037,6 +23048,62 @@
(set_attr "memory" "none,load")
(set_attr "mode" "<sseinsnmode>")])
+(define_insn_and_split "*expand<mode>_mask"
+ [(set (match_operand:VI12_VI48F_AVX512VLBW 0 "register_operand")
+ (unspec:VI12_VI48F_AVX512VLBW
+ [(match_operand:VI12_VI48F_AVX512VLBW 1 "nonimmediate_operand")
+ (match_operand:VI12_VI48F_AVX512VLBW 2 "nonimm_or_0_operand")
+ (match_operand 3 "const_int_operand")]
+ UNSPEC_EXPAND))]
+ "ix86_pre_reload_split ()
+ && (TARGET_AVX512VBMI2 || GET_MODE_SIZE (GET_MODE_INNER (<MODE>mode)) >= 4)"
+ "#"
+ "&& 1"
+ [(const_int 0)]
+{
+ unsigned HOST_WIDE_INT mask = INTVAL (operands[3]);
+ bool has_zero = false;
+ unsigned n = GET_MODE_NUNITS (<MODE>mode), i;
+ unsigned ones = 0;
+
+ /* If all ones bits is in mask's lower part,
+ get number of ones and assign it to ONES. */
+ for (i = 0; i != n; i++)
+ {
+ if ((mask & HOST_WIDE_INT_1U << i) && has_zero)
+ break;
+
+ /* Record first zero bit. */
+ if (!(mask & HOST_WIDE_INT_1U << i) && !has_zero)
+ {
+ has_zero = true;
+ ones = i;
+ }
+ }
+
+ if (!has_zero)
+ ones = n;
+
+ if (i != n || (ones != 0 && ones != n))
+ {
+ rtx reg = gen_reg_rtx (<avx512fmaskmode>mode);
+ emit_move_insn (reg, operands[3]);
+ enum insn_code icode;
+ if (i == n)
+ /* For masks with all one bits in it's lower part,
+ we can transform v{,p}expand* to vmovdq* with
+ mask operand. */
+ icode = CODE_FOR_<avx512>_load<mode>_mask;
+ else
+ icode = CODE_FOR_expand<mode>_mask;
+ emit_insn (GEN_FCN (icode) (operands[0], operands[1], operands[2], reg));
+ }
+ else
+ /* For ALL_MASK_ONES or CONST0_RTX mask, transform it to simple mov. */
+ emit_move_insn (operands[0], ones ? operands[1] : operands[2]);
+ DONE;
+})
+
(define_expand "expand<mode>_maskz"
[(set (match_operand:VI12_AVX512VLBW 0 "register_operand")
(unspec:VI12_AVX512VLBW
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index 5142210..cfe9aa4 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,21 @@
+2021-06-21 Patrick Palka <ppalka@redhat.com>
+
+ PR c++/67302
+ * typeck.c (check_return_expr): Call maybe_undo_parenthesized_ref
+ sooner, before the NRVO handling.
+
+2021-06-21 Patrick Palka <ppalka@redhat.com>
+
+ PR c++/80431
+ * tree.c (bot_replace): Use convert_to_base to build the
+ conversion to the (morally) virtual base.
+
+2021-06-21 Jakub Jelinek <jakub@redhat.com>
+
+ PR inline-asm/100785
+ * typeck.c (cxx_mark_addressable): Diagnose trying to make
+ bit-fields addressable.
+
2021-06-17 Jason Merrill <jason@redhat.com>
PR c++/101106
diff --git a/gcc/cp/tree.c b/gcc/cp/tree.c
index fec5afa..297da2b 100644
--- a/gcc/cp/tree.c
+++ b/gcc/cp/tree.c
@@ -3242,15 +3242,11 @@ bot_replace (tree* t, int* /*walk_subtrees*/, void* data_)
else if (TREE_CODE (*t) == CONVERT_EXPR
&& CONVERT_EXPR_VBASE_PATH (*t))
{
- /* In an NSDMI build_base_path defers building conversions to virtual
- bases, and we handle it here. */
- tree basetype = TYPE_MAIN_VARIANT (TREE_TYPE (TREE_TYPE (*t)));
- vec<tree, va_gc> *vbases = CLASSTYPE_VBASECLASSES (current_class_type);
- int i; tree binfo;
- FOR_EACH_VEC_SAFE_ELT (vbases, i, binfo)
- if (BINFO_TYPE (binfo) == basetype)
- break;
- *t = build_base_path (PLUS_EXPR, TREE_OPERAND (*t, 0), binfo, true,
+ /* In an NSDMI build_base_path defers building conversions to morally
+ virtual bases, and we handle it here. */
+ tree basetype = TREE_TYPE (*t);
+ *t = convert_to_base (TREE_OPERAND (*t, 0), basetype,
+ /*check_access=*/false, /*nonnull=*/true,
tf_warning_or_error);
}
diff --git a/gcc/cp/typeck.c b/gcc/cp/typeck.c
index dbb2370..937581a 100644
--- a/gcc/cp/typeck.c
+++ b/gcc/cp/typeck.c
@@ -7119,9 +7119,14 @@ cxx_mark_addressable (tree exp, bool array_ref_p)
&& TREE_CODE (TREE_TYPE (x)) == ARRAY_TYPE
&& VECTOR_TYPE_P (TREE_TYPE (TREE_OPERAND (x, 0))))
return true;
+ x = TREE_OPERAND (x, 0);
+ break;
+
+ case COMPONENT_REF:
+ if (bitfield_p (x))
+ error ("attempt to take address of bit-field");
/* FALLTHRU */
case ADDR_EXPR:
- case COMPONENT_REF:
case ARRAY_REF:
case REALPART_EXPR:
case IMAGPART_EXPR:
@@ -10306,7 +10311,10 @@ check_return_expr (tree retval, bool *no_warning)
See finish_function and finalize_nrv for the rest of this optimization. */
if (retval)
- STRIP_ANY_LOCATION_WRAPPER (retval);
+ {
+ retval = maybe_undo_parenthesized_ref (retval);
+ STRIP_ANY_LOCATION_WRAPPER (retval);
+ }
bool named_return_value_okay_p = can_do_nrvo_p (retval, functype);
if (fn_returns_value_p && flag_elide_constructors)
@@ -10340,10 +10348,6 @@ check_return_expr (tree retval, bool *no_warning)
if (VOID_TYPE_P (functype))
return error_mark_node;
- /* If we had an id-expression obfuscated by force_paren_expr, we need
- to undo it so we can try to treat it as an rvalue below. */
- retval = maybe_undo_parenthesized_ref (retval);
-
if (processing_template_decl)
retval = build_non_dependent_expr (retval);
diff --git a/gcc/df-scan.c b/gcc/df-scan.c
index 1268536..e9da64f 100644
--- a/gcc/df-scan.c
+++ b/gcc/df-scan.c
@@ -2595,6 +2595,8 @@ df_ref_record (enum df_ref_class cl,
ref_flags |= DF_REF_PARTIAL;
ref_flags |= DF_REF_MW_HARDREG;
+ gcc_assert (regno < endregno);
+
hardreg = problem_data->mw_reg_pool->allocate ();
hardreg->type = ref_type;
hardreg->flags = ref_flags;
diff --git a/gcc/function.c b/gcc/function.c
index 6757695..6abaf3d 100644
--- a/gcc/function.c
+++ b/gcc/function.c
@@ -3821,9 +3821,11 @@ assign_parms (tree fndecl)
tree decl_result = DECL_RESULT (fndecl);
rtx decl_rtl = DECL_RTL (decl_result);
- if (REG_P (decl_rtl)
- ? REGNO (decl_rtl) >= FIRST_PSEUDO_REGISTER
- : DECL_REGISTER (decl_result))
+ if ((REG_P (decl_rtl)
+ ? REGNO (decl_rtl) >= FIRST_PSEUDO_REGISTER
+ : DECL_REGISTER (decl_result))
+ /* Unless the psABI says not to. */
+ && !TYPE_EMPTY_P (TREE_TYPE (decl_result)))
{
rtx real_decl_rtl;
@@ -5410,9 +5412,11 @@ expand_function_end (void)
tree decl_result = DECL_RESULT (current_function_decl);
rtx decl_rtl = DECL_RTL (decl_result);
- if (REG_P (decl_rtl)
- ? REGNO (decl_rtl) >= FIRST_PSEUDO_REGISTER
- : DECL_REGISTER (decl_result))
+ if ((REG_P (decl_rtl)
+ ? REGNO (decl_rtl) >= FIRST_PSEUDO_REGISTER
+ : DECL_REGISTER (decl_result))
+ /* Unless the psABI says not to. */
+ && !TYPE_EMPTY_P (TREE_TYPE (decl_result)))
{
rtx real_decl_rtl = crtl->return_rtx;
complex_mode cmode;
diff --git a/gcc/gcov-io.h b/gcc/gcov-io.h
index ff92afe..538bee8 100644
--- a/gcc/gcov-io.h
+++ b/gcc/gcov-io.h
@@ -45,12 +45,11 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
stored as two 32 bit numbers, the low part first.
The number of bytes is stored, followed by the
string. Zero length and NULL strings are simply stored as a length
- of zero (they have no trailing NUL or padding).
+ of zero (they have no trailing NUL).
int32: byte3 byte2 byte1 byte0 | byte0 byte1 byte2 byte3
int64: int32:low int32:high
string: int32:0 | int32:length char* char:0
- padding: | char:0 | char:0 char:0 | char:0 char:0 char:0
item: int32 | int64 | string
The basic format of the notes file is
diff --git a/gcc/gimplify.c b/gcc/gimplify.c
index 2606998..41bae9c 100644
--- a/gcc/gimplify.c
+++ b/gcc/gimplify.c
@@ -6323,12 +6323,14 @@ gimplify_asm_expr (tree *expr_p, gimple_seq *pre_p, gimple_seq *post_p)
if (!allows_reg && allows_mem)
mark_addressable (TREE_VALUE (link));
+ tree orig = TREE_VALUE (link);
tret = gimplify_expr (&TREE_VALUE (link), pre_p, post_p,
is_inout ? is_gimple_min_lval : is_gimple_lvalue,
fb_lvalue | fb_mayfail);
if (tret == GS_ERROR)
{
- error ("invalid lvalue in %<asm%> output %d", i);
+ if (orig != error_mark_node)
+ error ("invalid lvalue in %<asm%> output %d", i);
ret = tret;
}
@@ -6523,8 +6525,9 @@ gimplify_asm_expr (tree *expr_p, gimple_seq *pre_p, gimple_seq *post_p)
mark_addressable (TREE_VALUE (link));
if (tret == GS_ERROR)
{
- error_at (EXPR_LOC_OR_LOC (TREE_VALUE (link), input_location),
- "memory input %d is not directly addressable", i);
+ if (inputv != error_mark_node)
+ error_at (EXPR_LOC_OR_LOC (TREE_VALUE (link), input_location),
+ "memory input %d is not directly addressable", i);
ret = tret;
}
}
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index c1a715f..3b11dcf 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,48 @@
+2021-06-21 Jason Merrill <jason@redhat.com>
+
+ PR target/88529
+ * g++.target/i386/empty-class1.C: New test.
+
+2021-06-21 Patrick Palka <ppalka@redhat.com>
+
+ PR c++/67302
+ * g++.dg/opt/nrv21.C: New test.
+
+2021-06-21 Patrick Palka <ppalka@redhat.com>
+
+ PR c++/80431
+ * g++.dg/cpp0x/nsdmi-virtual1a.C: New test.
+
+2021-06-21 Jakub Jelinek <jakub@redhat.com>
+
+ PR inline-asm/100785
+ * c-c++-common/pr100785.c: New test.
+ * gcc.dg/pr48552-1.c: Don't expect invalid lvalue errors.
+ * gcc.dg/pr48552-2.c: Likewise.
+
+2021-06-21 prathamesh.kulkarni <prathamesh.kulkarni@linaro.org>
+
+ PR target/97906
+ * gcc.target/arm/simd/pr97906.c: New test.
+
+2021-06-21 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/101121
+ * gfortran.dg/pr101121.f: New testcase.
+
+2021-06-21 liuhongt <hongtao.liu@intel.com>
+
+ PR target/101142
+ * gcc.target/i386/spill_to_mask-1.c: Adjust testcase.
+ * gcc.target/i386/spill_to_mask-2.c: Adjust testcase.
+ * gcc.target/i386/spill_to_mask-3.c: Adjust testcase.
+ * gcc.target/i386/spill_to_mask-4.c: Adjust testcase.
+
+2021-06-21 Roger Sayle <roger@nextmovesoftware.com>
+
+ PR target/11877
+ * gcc.target/i386/pr11877.c: New test case.
+
2021-06-18 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
* gcc.target/powerpc/fusion-p10-2logical.c: Update pattern
diff --git a/gcc/testsuite/c-c++-common/pr100785.c b/gcc/testsuite/c-c++-common/pr100785.c
new file mode 100644
index 0000000..37ff0aa
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/pr100785.c
@@ -0,0 +1,21 @@
+/* PR inline-asm/100785 */
+
+struct S { int a : 1; };
+
+void
+foo (struct S *x)
+{
+ __asm__ ("" : "+m" (x->a)); /* { dg-error "address of bit-field" } */
+}
+
+void
+bar (struct S *x)
+{
+ __asm__ ("" : "=m" (x->a)); /* { dg-error "address of bit-field" } */
+}
+
+void
+baz (struct S *x)
+{
+ __asm__ ("" : : "m" (x->a)); /* { dg-error "address of bit-field" } */
+}
diff --git a/gcc/testsuite/g++.dg/cpp0x/nsdmi-virtual1a.C b/gcc/testsuite/g++.dg/cpp0x/nsdmi-virtual1a.C
new file mode 100644
index 0000000..dc847cc
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/nsdmi-virtual1a.C
@@ -0,0 +1,28 @@
+// PR c++/80431
+// { dg-do run { target c++11 } }
+
+// A variant of nsdmi-virtual1.C where A is only a morally virtual base of B.
+
+struct A
+{
+ A(): i(42) { }
+ int i;
+ int f() { return i; }
+};
+
+struct D : A { int pad; };
+
+struct B : virtual D
+{
+ int j = i + f();
+ int k = A::i + A::f();
+};
+
+struct C: B { int pad; };
+
+int main()
+{
+ C c;
+ if (c.j != 84 || c.k != 84)
+ __builtin_abort();
+}
diff --git a/gcc/testsuite/g++.dg/opt/nrv21.C b/gcc/testsuite/g++.dg/opt/nrv21.C
new file mode 100644
index 0000000..ff33852
--- /dev/null
+++ b/gcc/testsuite/g++.dg/opt/nrv21.C
@@ -0,0 +1,14 @@
+// PR c++/67302
+// { dg-additional-options -fdump-tree-gimple }
+// { dg-final { scan-tree-dump-not "<retval> = a" "gimple" } }
+
+struct A
+{
+ int ar[42];
+ A();
+};
+
+A f() {
+ A a;
+ return (a); // The parens should not inhibit NRVO.
+}
diff --git a/gcc/testsuite/g++.target/i386/empty-class1.C b/gcc/testsuite/g++.target/i386/empty-class1.C
new file mode 100644
index 0000000..c199277
--- /dev/null
+++ b/gcc/testsuite/g++.target/i386/empty-class1.C
@@ -0,0 +1,9 @@
+// PR target/88529
+// { dg-do compile { target { c++11 && x86_64-*-* } } }
+// { dg-additional-options -fdump-rtl-expand }
+// { dg-final { scan-rtl-dump-not "set" "expand" } }
+// The x86_64 psABI says that f() doesn't put the return value anywhere.
+
+class A{};
+
+A f() { return {}; }
diff --git a/gcc/testsuite/gcc.dg/pr48552-1.c b/gcc/testsuite/gcc.dg/pr48552-1.c
index 11ee401..4cd7c59 100644
--- a/gcc/testsuite/gcc.dg/pr48552-1.c
+++ b/gcc/testsuite/gcc.dg/pr48552-1.c
@@ -15,7 +15,7 @@ f2 (void *x)
{
__asm volatile ("" : "=r" (*x)); /* { dg-warning "dereferencing" "deref" } */
} /* { dg-error "invalid use of void expression" "void expr" { target *-*-* } .-1 } */
- /* { dg-error "invalid lvalue in 'asm' output 0" "invalid lvalue" { target *-*-* } .-2 } */
+
void
f3 (void *x)
{
@@ -39,7 +39,7 @@ f6 (void *x)
{
__asm volatile ("" : "=g" (*x)); /* { dg-warning "dereferencing" "deref" } */
} /* { dg-error "invalid use of void expression" "void expr" { target *-*-* } .-1 } */
- /* { dg-error "invalid lvalue in 'asm' output 0" "invalid lvalue" { target *-*-* } .-2 } */
+
void
f7 (struct S *x)
{
diff --git a/gcc/testsuite/gcc.dg/pr48552-2.c b/gcc/testsuite/gcc.dg/pr48552-2.c
index 2d2a00c..e22600a 100644
--- a/gcc/testsuite/gcc.dg/pr48552-2.c
+++ b/gcc/testsuite/gcc.dg/pr48552-2.c
@@ -15,7 +15,7 @@ f2 (void *x)
{
__asm ("" : "=r" (*x)); /* { dg-warning "dereferencing" "deref" } */
} /* { dg-error "invalid use of void expression" "void expr" { target *-*-* } .-1 } */
- /* { dg-error "invalid lvalue in 'asm' output 0" "invalid lvalue" { target *-*-* } .-2 } */
+
void
f3 (void *x)
{
@@ -39,7 +39,7 @@ f6 (void *x)
{
__asm ("" : "=g" (*x)); /* { dg-warning "dereferencing" "deref" } */
} /* { dg-error "invalid use of void expression" "void expr" { target *-*-* } .-1 } */
- /* { dg-error "invalid lvalue in 'asm' output 0" "invalid lvalue" { target *-*-* } .-2 } */
+
void
f7 (struct S *x)
{
diff --git a/gcc/testsuite/gcc.target/arm/simd/pr97906.c b/gcc/testsuite/gcc.target/arm/simd/pr97906.c
new file mode 100644
index 0000000..7c972e3
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/simd/pr97906.c
@@ -0,0 +1,13 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -ffast-math" } */
+/* { dg-add-options arm_neon } */
+
+#include <arm_neon.h>
+
+uint32x2_t f1(float32x2_t a, float32x2_t b)
+{
+ return vabs_f32 (a) >= vabs_f32 (b);
+}
+
+/* { dg-final { scan-assembler-times {\tvacle.f32\td[0-9]+, d[0-9]+, d[0-9]+} 1 } } */
+/* { dg-final { scan-assembler-not "vabs" } } */
diff --git a/gcc/testsuite/gcc.target/i386/avx512bitalg-pr97770-1.c b/gcc/testsuite/gcc.target/i386/avx512bitalg-pr97770-1.c
index c83a477..d1beec4 100644
--- a/gcc/testsuite/gcc.target/i386/avx512bitalg-pr97770-1.c
+++ b/gcc/testsuite/gcc.target/i386/avx512bitalg-pr97770-1.c
@@ -1,19 +1,18 @@
/* PR target/97770 */
/* { dg-do compile } */
-/* { dg-options "-O2 -mavx512bitalg -mavx512vl -mprefer-vector-width=512" } */
-/* Add xfail since no IFN for QI/HImode popcount */
-/* { dg-final { scan-assembler-times "vpopcntb\[ \\t\]+\[^\\n\\r\]*xmm" 1 {xfail *-*-*} } } */
-/* { dg-final { scan-assembler-times "vpopcntw\[ \\t\]+\[^\\n\\r\]*xmm" 1 {xfail *-*-*} } } */
-/* { dg-final { scan-assembler-times "vpopcntb\[ \\t\]+\[^\\n\\r\]*ymm" 1 {xfail *-*-*} } } */
-/* { dg-final { scan-assembler-times "vpopcntw\[ \\t\]+\[^\\n\\r\]*ymm" 1 {xfail *-*-*} } } */
-/* { dg-final { scan-assembler-times "vpopcntb\[ \\t\]+\[^\\n\\r\]*zmm" 1 {xfail *-*-*} } } */
-/* { dg-final { scan-assembler-times "vpopcntw\[ \\t\]+\[^\\n\\r\]*zmm" 1 {xfail *-*-*} } } */
+/* { dg-options "-O2 -march=icelake-server -mprefer-vector-width=512" } */
+/* { dg-final { scan-assembler-times "vpopcntb\[ \\t\]+\[^\\n\\r\]*xmm" 1 } } */
+/* { dg-final { scan-assembler-times "vpopcntw\[ \\t\]+\[^\\n\\r\]*xmm" 1 } } */
+/* { dg-final { scan-assembler-times "vpopcntb\[ \\t\]+\[^\\n\\r\]*ymm" 1 } } */
+/* { dg-final { scan-assembler-times "vpopcntw\[ \\t\]+\[^\\n\\r\]*ymm" 1 } } */
+/* { dg-final { scan-assembler-times "vpopcntb\[ \\t\]+\[^\\n\\r\]*zmm" 1 } } */
+/* { dg-final { scan-assembler-times "vpopcntw\[ \\t\]+\[^\\n\\r\]*zmm" 1 } } */
#include <immintrin.h>
void
__attribute__ ((noipa, optimize("-O3")))
-popcountb_128 (char * __restrict dest, char* src)
+popcountb_128 (unsigned char * __restrict dest, unsigned char* src)
{
for (int i = 0; i != 16; i++)
dest[i] = __builtin_popcount (src[i]);
@@ -21,7 +20,7 @@ popcountb_128 (char * __restrict dest, char* src)
void
__attribute__ ((noipa, optimize("-O3")))
-popcountw_128 (short* __restrict dest, short* src)
+popcountw_128 (unsigned short* __restrict dest, unsigned short* src)
{
for (int i = 0; i != 8; i++)
dest[i] = __builtin_popcount (src[i]);
@@ -29,7 +28,7 @@ popcountw_128 (short* __restrict dest, short* src)
void
__attribute__ ((noipa, optimize("-O3")))
-popcountb_256 (char * __restrict dest, char* src)
+popcountb_256 (unsigned char * __restrict dest, unsigned char* src)
{
for (int i = 0; i != 32; i++)
dest[i] = __builtin_popcount (src[i]);
@@ -37,7 +36,7 @@ popcountb_256 (char * __restrict dest, char* src)
void
__attribute__ ((noipa, optimize("-O3")))
-popcountw_256 (short* __restrict dest, short* src)
+popcountw_256 (unsigned short* __restrict dest, unsigned short* src)
{
for (int i = 0; i != 16; i++)
dest[i] = __builtin_popcount (src[i]);
@@ -45,7 +44,7 @@ popcountw_256 (short* __restrict dest, short* src)
void
__attribute__ ((noipa, optimize("-O3")))
-popcountb_512 (char * __restrict dest, char* src)
+popcountb_512 (unsigned char * __restrict dest, unsigned char* src)
{
for (int i = 0; i != 64; i++)
dest[i] = __builtin_popcount (src[i]);
@@ -53,7 +52,7 @@ popcountb_512 (char * __restrict dest, char* src)
void
__attribute__ ((noipa, optimize("-O3")))
-popcountw_512 (short* __restrict dest, short* src)
+popcountw_512 (unsigned short* __restrict dest, unsigned short* src)
{
for (int i = 0; i != 32; i++)
dest[i] = __builtin_popcount (src[i]);
diff --git a/gcc/testsuite/gcc.target/i386/avx512bw-pr100267-1.c b/gcc/testsuite/gcc.target/i386/avx512bw-pr100267-1.c
new file mode 100644
index 0000000..ce83d63
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512bw-pr100267-1.c
@@ -0,0 +1,38 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512bw -mavx512vbmi2 -O2" } */
+/* { dg-final { scan-assembler-times "vpexpandb\[ \\t\]+\[^\{\n\]*\\(\[^\n\]*%zmm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vpexpandb\[ \\t\]+\[^\{\n\(]*%zmm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vpexpandw\[ \\t\]+\[^\{\n\]*\\(\[^\n\]*%zmm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vpexpandw\[ \\t\]+\[^\{\n\(]*%zmm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
+
+/* { dg-final { scan-assembler-times "vmov\[a-z0-9\]*\[ \\t\]+\[^\{\n\]*\\(\[^\n\]*%zmm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 2 } } */
+/* { dg-final { scan-assembler-times "vmov\[a-z0-9\]*\[ \\t\]+\[^\{\n\(]*%zmm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 2 } } */
+#include <immintrin.h>
+
+char *pi8;
+short *pi16;
+volatile __m512i xi16, xi8;
+
+void extern
+avx512f_test (void)
+{
+ xi8 = _mm512_mask_expand_epi8 (xi8, 0, xi8);
+ xi8 = _mm512_mask_expand_epi8 (xi8, -1, xi8);
+ xi8 = _mm512_mask_expand_epi8 (xi8, (1 << 8) - 1, xi8);
+ xi8 = _mm512_mask_expand_epi8 (xi8, (1 << 8) + 1, xi8);
+
+ xi8 = _mm512_mask_expandloadu_epi8 (xi8, 0, pi8);
+ xi8 = _mm512_mask_expandloadu_epi8 (xi8, -1, pi8);
+ xi8 = _mm512_mask_expandloadu_epi8 (xi8, (1 << 6) - 1, pi8);
+ xi8 = _mm512_mask_expandloadu_epi8 (xi8, (1 << 6) + 3, pi8);
+
+ xi16 = _mm512_mask_expand_epi16 (xi16, 0, xi16);
+ xi16 = _mm512_mask_expand_epi16 (xi16, -1, xi16);
+ xi16 = _mm512_mask_expand_epi16 (xi16, (1 << 3) - 1, xi16);
+ xi16 = _mm512_mask_expand_epi16 (xi16, (1 << 3) + 2, xi16);
+
+ xi16 = _mm512_mask_expandloadu_epi16 (xi16, 0, pi16);
+ xi16 = _mm512_mask_expandloadu_epi16 (xi16, -1, pi16);
+ xi16 = _mm512_mask_expandloadu_epi16 (xi16, (1 << 7) - 1, pi16);
+ xi16 = _mm512_mask_expandloadu_epi16 (xi16, (1 << 7) + 7, pi16);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512bw-pr100267-b-2.c b/gcc/testsuite/gcc.target/i386/avx512bw-pr100267-b-2.c
new file mode 100644
index 0000000..424b485
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512bw-pr100267-b-2.c
@@ -0,0 +1,74 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -mavx512f -mavx512vbmi2 -mavx512bw" } */
+/* { dg-require-effective-target avx512f } */
+/* { dg-require-effective-target avx512vbmi2 } */
+
+#define AVX512F
+
+#define AVX512VBMI2
+#include "avx512f-helper.h"
+
+#define SIZE (AVX512F_LEN / 8)
+#include "avx512f-mask-type.h"
+
+static void
+CALC (char *s, char *r, MASK_TYPE mask)
+{
+ int i, k;
+
+ for (i = 0, k = 0; i < SIZE; i++)
+ {
+ if (mask & ((long long)1 << i))
+ r[i] = s[k++];
+ }
+}
+
+void
+TEST (void)
+{
+ UNION_TYPE (AVX512F_LEN, i_b) s1, res1, res2, res3, res4, res5, res6, res7, res8;
+ MASK_TYPE mask = (1 << (SIZE >> 2) - 1) - 1;
+ char s2[SIZE];
+ char res_ref1[SIZE];
+ char res_ref2[SIZE];
+ int i, sign = 1;
+
+ for (i = 0; i < SIZE; i++)
+ {
+ s1.a[i] = 12345 * (i + 200) * sign;
+ s2[i] = 67890 * (i + 300) * sign;
+ res1.a[i] = DEFAULT_VALUE;
+ res5.a[i] = DEFAULT_VALUE;
+ sign = -sign;
+ }
+
+ res2.x = INTRINSIC (_mask_expand_epi8) (res1.x, MASK_ALL_ONES, s1.x);
+ res3.x = INTRINSIC (_mask_expand_epi8) (res1.x, 0, s1.x);
+ res4.x = INTRINSIC (_mask_expand_epi8) (res1.x, mask, s1.x);
+ res6.x = INTRINSIC (_mask_expandloadu_epi8) (res5.x, MASK_ALL_ONES, s2);
+ res7.x = INTRINSIC (_mask_expandloadu_epi8) (res5.x, 0, s2);
+ res8.x = INTRINSIC (_mask_expandloadu_epi8) (res5.x, mask, s2);
+
+ CALC (s1.a, res_ref1, mask);
+ CALC (s2, res_ref2, mask);
+
+ if (UNION_CHECK (AVX512F_LEN, i_b) (res2, s1.a))
+ abort ();
+
+ if (UNION_CHECK (AVX512F_LEN, i_b) (res3, res1.a))
+ abort ();
+
+ MASK_MERGE (i_b) (res_ref1, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, i_b) (res4, res_ref1))
+ abort ();
+
+ if (UNION_CHECK (AVX512F_LEN, i_b) (res6, s2))
+ abort ();
+
+ if (UNION_CHECK (AVX512F_LEN, i_b) (res7, res5.a))
+ abort ();
+
+ MASK_MERGE (i_b) (res_ref2, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, i_b) (res8, res_ref2))
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512bw-pr100267-d-2.c b/gcc/testsuite/gcc.target/i386/avx512bw-pr100267-d-2.c
new file mode 100644
index 0000000..24790b2
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512bw-pr100267-d-2.c
@@ -0,0 +1,74 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -mavx512f -mavx512vbmi2 -mavx512bw" } */
+/* { dg-require-effective-target avx512f } */
+/* { dg-require-effective-target avx512vbmi2 } */
+
+#define AVX512F
+
+#define AVX512VBMI2
+#include "avx512f-helper.h"
+
+#define SIZE (AVX512F_LEN / 32)
+#include "avx512f-mask-type.h"
+
+static void
+CALC (int *s, int *r, MASK_TYPE mask)
+{
+ int i, k;
+
+ for (i = 0, k = 0; i < SIZE; i++)
+ {
+ if (mask & ((long long)1 << i))
+ r[i] = s[k++];
+ }
+}
+
+void
+TEST (void)
+{
+ UNION_TYPE (AVX512F_LEN, i_d) s1, res1, res2, res3, res4, res5, res6, res7, res8;
+ MASK_TYPE mask = (1 << SIZE - 1) - 1;
+ int s2[SIZE];
+ int res_ref1[SIZE];
+ int res_ref2[SIZE];
+ int i, sign = 1;
+
+ for (i = 0; i < SIZE; i++)
+ {
+ s1.a[i] = 12345 * (i + 200) * sign;
+ s2[i] = 67890 * (i + 300) * sign;
+ res1.a[i] = DEFAULT_VALUE;
+ res5.a[i] = DEFAULT_VALUE;
+ sign = -sign;
+ }
+
+ res2.x = INTRINSIC (_mask_expand_epi32) (res1.x, MASK_ALL_ONES, s1.x);
+ res3.x = INTRINSIC (_mask_expand_epi32) (res1.x, 0, s1.x);
+ res4.x = INTRINSIC (_mask_expand_epi32) (res1.x, mask, s1.x);
+ res6.x = INTRINSIC (_mask_expandloadu_epi32) (res5.x, MASK_ALL_ONES, s2);
+ res7.x = INTRINSIC (_mask_expandloadu_epi32) (res5.x, 0, s2);
+ res8.x = INTRINSIC (_mask_expandloadu_epi32) (res5.x, mask, s2);
+
+ CALC (s1.a, res_ref1, mask);
+ CALC (s2, res_ref2, mask);
+
+ if (UNION_CHECK (AVX512F_LEN, i_d) (res2, s1.a))
+ abort ();
+
+ if (UNION_CHECK (AVX512F_LEN, i_d) (res3, res1.a))
+ abort ();
+
+ MASK_MERGE (i_d) (res_ref1, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, i_d) (res4, res_ref1))
+ abort ();
+
+ if (UNION_CHECK (AVX512F_LEN, i_d) (res6, s2))
+ abort ();
+
+ if (UNION_CHECK (AVX512F_LEN, i_d) (res7, res5.a))
+ abort ();
+
+ MASK_MERGE (i_d) (res_ref2, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, i_d) (res8, res_ref2))
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512bw-pr100267-q-2.c b/gcc/testsuite/gcc.target/i386/avx512bw-pr100267-q-2.c
new file mode 100644
index 0000000..119b50e
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512bw-pr100267-q-2.c
@@ -0,0 +1,74 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -mavx512f -mavx512vbmi2 -mavx512bw" } */
+/* { dg-require-effective-target avx512f } */
+/* { dg-require-effective-target avx512vbmi2 } */
+
+#define AVX512F
+
+#define AVX512VBMI2
+#include "avx512f-helper.h"
+
+#define SIZE (AVX512F_LEN / 64)
+#include "avx512f-mask-type.h"
+
+static void
+CALC (long long *s, long long *r, MASK_TYPE mask)
+{
+ int i, k;
+
+ for (i = 0, k = 0; i < SIZE; i++)
+ {
+ if (mask & ((long long)1 << i))
+ r[i] = s[k++];
+ }
+}
+
+void
+TEST (void)
+{
+ UNION_TYPE (AVX512F_LEN, i_q) s1, res1, res2, res3, res4, res5, res6, res7, res8;
+ MASK_TYPE mask = (1 << SIZE - 1) - 1;
+ long long s2[SIZE];
+ long long res_ref1[SIZE];
+ long long res_ref2[SIZE];
+ int i, sign = 1;
+
+ for (i = 0; i < SIZE; i++)
+ {
+ s1.a[i] = 12345 * (i + 200) * sign;
+ s2[i] = 67890 * (i + 300) * sign;
+ res1.a[i] = DEFAULT_VALUE;
+ res5.a[i] = DEFAULT_VALUE;
+ sign = -sign;
+ }
+
+ res2.x = INTRINSIC (_mask_expand_epi64) (res1.x, MASK_ALL_ONES, s1.x);
+ res3.x = INTRINSIC (_mask_expand_epi64) (res1.x, 0, s1.x);
+ res4.x = INTRINSIC (_mask_expand_epi64) (res1.x, mask, s1.x);
+ res6.x = INTRINSIC (_mask_expandloadu_epi64) (res5.x, MASK_ALL_ONES, s2);
+ res7.x = INTRINSIC (_mask_expandloadu_epi64) (res5.x, 0, s2);
+ res8.x = INTRINSIC (_mask_expandloadu_epi64) (res5.x, mask, s2);
+
+ CALC (s1.a, res_ref1, mask);
+ CALC (s2, res_ref2, mask);
+
+ if (UNION_CHECK (AVX512F_LEN, i_q) (res2, s1.a))
+ abort ();
+
+ if (UNION_CHECK (AVX512F_LEN, i_q) (res3, res1.a))
+ abort ();
+
+ MASK_MERGE (i_q) (res_ref1, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, i_q) (res4, res_ref1))
+ abort ();
+
+ if (UNION_CHECK (AVX512F_LEN, i_q) (res6, s2))
+ abort ();
+
+ if (UNION_CHECK (AVX512F_LEN, i_q) (res7, res5.a))
+ abort ();
+
+ MASK_MERGE (i_q) (res_ref2, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, i_q) (res8, res_ref2))
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512bw-pr100267-w-2.c b/gcc/testsuite/gcc.target/i386/avx512bw-pr100267-w-2.c
new file mode 100644
index 0000000..926e04d
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512bw-pr100267-w-2.c
@@ -0,0 +1,74 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -mavx512f -mavx512vbmi2 -mavx512bw" } */
+/* { dg-require-effective-target avx512f } */
+/* { dg-require-effective-target avx512vbmi2 } */
+
+#define AVX512F
+
+#define AVX512VBMI2
+#include "avx512f-helper.h"
+
+#define SIZE (AVX512F_LEN / 16)
+#include "avx512f-mask-type.h"
+
+static void
+CALC (short *s, short *r, MASK_TYPE mask)
+{
+ int i, k;
+
+ for (i = 0, k = 0; i < SIZE; i++)
+ {
+ if (mask & ((long long)1 << i))
+ r[i] = s[k++];
+ }
+}
+
+void
+TEST (void)
+{
+ UNION_TYPE (AVX512F_LEN, i_w) s1, res1, res2, res3, res4, res5, res6, res7, res8;
+ MASK_TYPE mask = (1 << (SIZE >> 2) - 1) - 1;
+ short s2[SIZE];
+ short res_ref1[SIZE];
+ short res_ref2[SIZE];
+ int i, sign = 1;
+
+ for (i = 0; i < SIZE; i++)
+ {
+ s1.a[i] = 12345 * (i + 200) * sign;
+ s2[i] = 67890 * (i + 300) * sign;
+ res1.a[i] = DEFAULT_VALUE;
+ res5.a[i] = DEFAULT_VALUE;
+ sign = -sign;
+ }
+
+ res2.x = INTRINSIC (_mask_expand_epi16) (res1.x, MASK_ALL_ONES, s1.x);
+ res3.x = INTRINSIC (_mask_expand_epi16) (res1.x, 0, s1.x);
+ res4.x = INTRINSIC (_mask_expand_epi16) (res1.x, mask, s1.x);
+ res6.x = INTRINSIC (_mask_expandloadu_epi16) (res5.x, MASK_ALL_ONES, s2);
+ res7.x = INTRINSIC (_mask_expandloadu_epi16) (res5.x, 0, s2);
+ res8.x = INTRINSIC (_mask_expandloadu_epi16) (res5.x, mask, s2);
+
+ CALC (s1.a, res_ref1, mask);
+ CALC (s2, res_ref2, mask);
+
+ if (UNION_CHECK (AVX512F_LEN, i_w) (res2, s1.a))
+ abort ();
+
+ if (UNION_CHECK (AVX512F_LEN, i_w) (res3, res1.a))
+ abort ();
+
+ MASK_MERGE (i_w) (res_ref1, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, i_w) (res4, res_ref1))
+ abort ();
+
+ if (UNION_CHECK (AVX512F_LEN, i_w) (res6, s2))
+ abort ();
+
+ if (UNION_CHECK (AVX512F_LEN, i_w) (res7, res5.a))
+ abort ();
+
+ MASK_MERGE (i_w) (res_ref2, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, i_w) (res8, res_ref2))
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-pr100267-1.c b/gcc/testsuite/gcc.target/i386/avx512f-pr100267-1.c
new file mode 100644
index 0000000..5eb6de5
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-pr100267-1.c
@@ -0,0 +1,66 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-final { scan-assembler-times "vpexpandd\[ \\t\]+\[^\{\n\]*\\(\[^\n\]*%zmm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vpexpandd\[ \\t\]+\[^\{\n\(]*%zmm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vpexpandq\[ \\t\]+\[^\{\n\]*\\(\[^\n\]*%zmm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vpexpandq\[ \\t\]+\[^\{\n\(]*%zmm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vexpandpd\[ \\t\]+\[^\{\n\]*\\(\[^\n\]*%zmm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vexpandpd\[ \\t\]+\[^\{\n\(]*%zmm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vexpandps\[ \\t\]+\[^\{\n\]*\\(\[^\n\]*%zmm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vexpandps\[ \\t\]+\[^\{\n\(]*%zmm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
+
+/* { dg-final { scan-assembler-times "vmov\[a-z0-9\]*\[ \\t\]+\[^\{\n\]*\\(\[^\n\]*%zmm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 4 } } */
+/* { dg-final { scan-assembler-times "vmov\[a-z0-9\]*\[ \\t\]+\[^\{\n\(]*%zmm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 4 } } */
+#include <immintrin.h>
+
+int *pi32;
+long long *pi64;
+double *pd;
+float *pf;
+volatile __m512i xi32, xi64;
+volatile __m512d xd;
+volatile __m512 xf;
+
+void extern
+avx512f_test (void)
+{
+ xi32 = _mm512_mask_expand_epi32 (xi32, 0, xi32);
+ xi32 = _mm512_mask_expand_epi32 (xi32, -1, xi32);
+ xi32 = _mm512_mask_expand_epi32 (xi32, (1 << 8) - 1, xi32);
+ xi32 = _mm512_mask_expand_epi32 (xi32, (1 << 8) + 1, xi32);
+
+ xi32 = _mm512_mask_expandloadu_epi32 (xi32, 0, pi32);
+ xi32 = _mm512_mask_expandloadu_epi32 (xi32, (1 << 16) - 1, pi32);
+ xi32 = _mm512_mask_expandloadu_epi32 (xi32, (1 << 6) - 1, pi32);
+ xi32 = _mm512_mask_expandloadu_epi32 (xi32, (1 << 6) + 3, pi32);
+
+ xi64 = _mm512_mask_expand_epi64 (xi64, 0, xi64);
+ xi64 = _mm512_mask_expand_epi64 (xi64, -1, xi64);
+ xi64 = _mm512_mask_expand_epi64 (xi64, (1 << 3) - 1, xi64);
+ xi64 = _mm512_mask_expand_epi64 (xi64, (1 << 3) + 2, xi64);
+
+ xi64 = _mm512_mask_expandloadu_epi64 (xi64, 0, pi64);
+ xi64 = _mm512_mask_expandloadu_epi64 (xi64, (1 << 8) - 1, pi64);
+ xi64 = _mm512_mask_expandloadu_epi64 (xi64, (1 << 7) - 1, pi64);
+ xi64 = _mm512_mask_expandloadu_epi64 (xi64, (1 << 7) + 7, pi64);
+
+ xf = _mm512_mask_expand_ps (xf, 0, xf);
+ xf = _mm512_mask_expand_ps (xf, (1 << 16) - 1, xf);
+ xf = _mm512_mask_expand_ps (xf, (1 << 15) - 1, xf);
+ xf = _mm512_mask_expand_ps (xf, (1 << 14) + 3, xf);
+
+ xf = _mm512_mask_expandloadu_ps (xf, 0, pf);
+ xf = _mm512_mask_expandloadu_ps (xf, -1, pf);
+ xf = _mm512_mask_expandloadu_ps (xf, (1 << 13) - 1, pf);
+ xf = _mm512_mask_expandloadu_ps (xf, (1 << 13) + 5, pf);
+
+ xd = _mm512_mask_expand_pd (xd, 0, xd);
+ xd = _mm512_mask_expand_pd (xd, (1 << 8) - 1, xd);
+ xd = _mm512_mask_expand_pd (xd, (1 << 4) - 1, xd);
+ xd = _mm512_mask_expand_pd (xd, (1 << 4) + 1, xd);
+
+ xd = _mm512_mask_expandloadu_pd (xd, 0, pd);
+ xd = _mm512_mask_expandloadu_pd (xd, -1, pd);
+ xd = _mm512_mask_expandloadu_pd (xd, (1 << 5) - 1, pd);
+ xd = _mm512_mask_expandloadu_pd (xd, (1 << 5), pd);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-pr100267-pd-2.c b/gcc/testsuite/gcc.target/i386/avx512f-pr100267-pd-2.c
new file mode 100644
index 0000000..7d653e8e
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-pr100267-pd-2.c
@@ -0,0 +1,76 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-require-effective-target avx512f } */
+
+#define AVX512F
+
+#include "avx512f-helper.h"
+
+#define SIZE (AVX512F_LEN / 64)
+#include "avx512f-mask-type.h"
+
+static void
+CALC (double *s, double *r, MASK_TYPE mask)
+{
+ int i, k;
+
+ for (i = 0, k = 0; i < SIZE; i++)
+ {
+ if (mask & (1 << i))
+ r[i] = s[k++];
+ }
+}
+
+void
+TEST (void)
+{
+ UNION_TYPE (AVX512F_LEN, d) s1, res2, res3, res4, res5, res6, res7, res8, res9;
+ MASK_TYPE mask = (1 << SIZE - 1) - 1;
+ double s2[SIZE];
+ double res_ref1[SIZE];
+ double res_ref2[SIZE];
+ int i, sign = 1;
+
+ for (i = 0; i < SIZE; i++)
+ {
+ s1.a[i] = 123.456 * (i + 200) * sign;
+ s2[i] = 789.012 * (i + 300) * sign;
+ res2.a[i] = DEFAULT_VALUE;
+ res6.a[i] = DEFAULT_VALUE;
+ sign = -sign;
+ }
+
+ res3.x = INTRINSIC (_mask_expand_pd) (res2.x, MASK_ALL_ONES, s1.x);
+ res4.x = INTRINSIC (_mask_expand_pd) (res2.x, 0, s1.x);
+ res5.x = INTRINSIC (_mask_expand_pd) (res2.x, mask, s1.x);
+
+ res7.x = INTRINSIC (_mask_expandloadu_pd) (res6.x, MASK_ALL_ONES, s2);
+ res8.x = INTRINSIC (_mask_expandloadu_pd) (res6.x, 0, s2);
+ res9.x = INTRINSIC (_mask_expandloadu_pd) (res6.x, mask, s2);
+
+
+ /* no mask is the same as all ones mask. */
+ CALC (s1.a, res_ref1, mask);
+ CALC (s2, res_ref2, mask);
+
+ if (UNION_CHECK (AVX512F_LEN, d) (res3, s1.a))
+ abort ();
+
+ if (UNION_CHECK (AVX512F_LEN, d) (res4, res2.a))
+ abort ();
+
+ MASK_MERGE (d) (res_ref1, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, d) (res5, res_ref1))
+ abort ();
+
+ if (UNION_CHECK (AVX512F_LEN, d) (res7, s2))
+ abort ();
+
+ if (UNION_CHECK (AVX512F_LEN, d) (res8, res6.a))
+ abort ();
+
+ MASK_MERGE (d) (res_ref2, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, d) (res9, res_ref2))
+ abort ();
+
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-pr100267-ps-2.c b/gcc/testsuite/gcc.target/i386/avx512f-pr100267-ps-2.c
new file mode 100644
index 0000000..40f0dde
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-pr100267-ps-2.c
@@ -0,0 +1,72 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-require-effective-target avx512f } */
+
+#define AVX512F
+
+#include "avx512f-helper.h"
+
+#define SIZE (AVX512F_LEN / 32)
+#include "avx512f-mask-type.h"
+
+static void
+CALC (float *s, float *r, MASK_TYPE mask)
+{
+ int i, k;
+
+ for (i = 0, k = 0; i < SIZE; i++)
+ {
+ if (mask & (1 << i))
+ r[i] = s[k++];
+ }
+}
+
+void
+TEST (void)
+{
+ UNION_TYPE (AVX512F_LEN, ) s1, res2, res3, res4, res5, res6, res7, res8, res9;
+ MASK_TYPE mask = (1 << SIZE - 1) - 1;
+ float s2[SIZE];
+ float res_ref1[SIZE];
+ float res_ref2[SIZE];
+ int i, sign = 1;
+
+ for (i = 0; i < SIZE; i++)
+ {
+ s1.a[i] = 123.456 * (i + 200) * sign;
+ s2[i] = 789.012 * (i + 300) * sign;
+ res2.a[i] = DEFAULT_VALUE;
+ res6.a[i] = DEFAULT_VALUE;
+ sign = -sign;
+ }
+
+ res3.x = INTRINSIC (_mask_expand_ps) (res2.x, MASK_ALL_ONES, s1.x);
+ res4.x = INTRINSIC (_mask_expand_ps) (res2.x, 0, s1.x);
+ res5.x = INTRINSIC (_mask_expand_ps) (res2.x, mask, s1.x);
+ res7.x = INTRINSIC (_mask_expandloadu_ps) (res6.x, MASK_ALL_ONES, s2);
+ res8.x = INTRINSIC (_mask_expandloadu_ps) (res6.x, 0, s2);
+ res9.x = INTRINSIC (_mask_expandloadu_ps) (res6.x, mask, s2);
+
+ CALC (s1.a, res_ref1, mask);
+ CALC (s2, res_ref2, mask);
+
+ if (UNION_CHECK (AVX512F_LEN, ) (res3, s1.a))
+ abort ();
+
+ if (UNION_CHECK (AVX512F_LEN, ) (res4, res2.a))
+ abort ();
+
+ MASK_MERGE () (res_ref1, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, ) (res5, res_ref1))
+ abort ();
+
+ if (UNION_CHECK (AVX512F_LEN, ) (res7, s2))
+ abort ();
+
+ if (UNION_CHECK (AVX512F_LEN, ) (res8, res6.a))
+ abort ();
+
+ MASK_MERGE () (res_ref2, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, ) (res9, res_ref2))
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512vl-pr100267-1.c b/gcc/testsuite/gcc.target/i386/avx512vl-pr100267-1.c
new file mode 100644
index 0000000..9ffd381
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512vl-pr100267-1.c
@@ -0,0 +1,122 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512f -mavx512vl -O2" } */
+/* { dg-final { scan-assembler-times "vpexpandd\[ \\t\]+\[^\{\n\]*\\(\[^\n\]*%ymm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vpexpandd\[ \\t\]+\[^\{\n\(]*%ymm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vpexpandq\[ \\t\]+\[^\{\n\]*\\(\[^\n\]*%ymm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vpexpandq\[ \\t\]+\[^\{\n\(]*%ymm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vexpandpd\[ \\t\]+\[^\{\n\]*\\(\[^\n\]*%ymm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vexpandpd\[ \\t\]+\[^\{\n\(]*%ymm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vexpandps\[ \\t\]+\[^\{\n\]*\\(\[^\n\]*%ymm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vexpandps\[ \\t\]+\[^\{\n\(]*%ymm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
+
+/* { dg-final { scan-assembler-times "vmov\[a-z0-9\]*\[ \\t\]+\[^\{\n\]*\\(\[^\n\]*%ymm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 4 } } */
+/* { dg-final { scan-assembler-times "(?:vmov\[a-z0-9\]*\[ \\t\]+\[^\{\n\(]*%ymm\[0-9\]+\{%k\[1-7\]\}|blend\[a-z]+\[ \\t\]+\[^\{\n\(]*%ymm\[0-9\]+)(?:\n|\[ \\t\]+#)" 4 } } */
+/* { dg-final { scan-assembler-times "vpexpandd\[ \\t\]+\[^\{\n\]*\\(\[^\n\]*%xmm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vpexpandd\[ \\t\]+\[^\{\n\(]*%xmm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vpexpandq\[ \\t\]+\[^\{\n\]*\\(\[^\n\]*%xmm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vpexpandq\[ \\t\]+\[^\{\n\(]*%xmm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vexpandpd\[ \\t\]+\[^\{\n\]*\\(\[^\n\]*%xmm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vexpandpd\[ \\t\]+\[^\{\n\(]*%xmm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vexpandps\[ \\t\]+\[^\{\n\]*\\(\[^\n\]*%xmm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vexpandps\[ \\t\]+\[^\{\n\(]*%xmm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
+
+/* { dg-final { scan-assembler-times "vmov\[a-z0-9\]*\[ \\t\]+\[^\{\n\]*\\(\[^\n\]*%xmm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 4 } } */
+/* { dg-final { scan-assembler-times "(?:vmov\[a-z0-9\]*\[ \\t\]+\[^\{\n\(]*%xmm\[0-9\]+\{%k\[1-7\]\}|(?:blend\[a-z]+|movsd)\[ \\t\]+\[^\{\n\(]*%xmm\[0-9\]+)(?:\n|\[ \\t\]+#)" 4 } } */
+
+#include <immintrin.h>
+
+int *pi32;
+long long *pi64;
+double *pd;
+float *pf;
+volatile __m256i xi32, xi64;
+volatile __m256d xd;
+volatile __m256 xf;
+
+volatile __m128i xi32_128, xi64_128;
+volatile __m128d xd_128;
+volatile __m128 xf_128;
+
+void extern
+avx512vl_test (void)
+{
+ xi32 = _mm256_mask_expand_epi32 (xi32, 0, xi32);
+ xi32 = _mm256_mask_expand_epi32 (xi32, -1, xi32);
+ xi32 = _mm256_mask_expand_epi32 (xi32, (1 << 4) - 1, xi32);
+ xi32 = _mm256_mask_expand_epi32 (xi32, (1 << 4) + 1, xi32);
+
+ xi32 = _mm256_mask_expandloadu_epi32 (xi32, 0, pi32);
+ xi32 = _mm256_mask_expandloadu_epi32 (xi32, (1 << 8) - 1, pi32);
+ xi32 = _mm256_mask_expandloadu_epi32 (xi32, (1 << 6) - 1, pi32);
+ xi32 = _mm256_mask_expandloadu_epi32 (xi32, (1 << 6) + 3, pi32);
+
+ xi64 = _mm256_mask_expand_epi64 (xi64, 0, xi64);
+ xi64 = _mm256_mask_expand_epi64 (xi64, -1, xi64);
+ xi64 = _mm256_mask_expand_epi64 (xi64, (1 << 3) - 1, xi64);
+ xi64 = _mm256_mask_expand_epi64 (xi64, (1 << 3) + 2, xi64);
+
+ xi64 = _mm256_mask_expandloadu_epi64 (xi64, 0, pi64);
+ xi64 = _mm256_mask_expandloadu_epi64 (xi64, (1 << 4) - 1, pi64);
+ xi64 = _mm256_mask_expandloadu_epi64 (xi64, (1 << 2) - 1, pi64);
+ xi64 = _mm256_mask_expandloadu_epi64 (xi64, (1 << 2), pi64);
+
+ xf = _mm256_mask_expand_ps (xf, 0, xf);
+ xf = _mm256_mask_expand_ps (xf, (1 << 8) - 1, xf);
+ xf = _mm256_mask_expand_ps (xf, (1 << 6) - 1, xf);
+ xf = _mm256_mask_expand_ps (xf, (1 << 6) + 3, xf);
+
+ xf = _mm256_mask_expandloadu_ps (xf, 0, pf);
+ xf = _mm256_mask_expandloadu_ps (xf, -1, pf);
+ xf = _mm256_mask_expandloadu_ps (xf, (1 << 7) - 1, pf);
+ xf = _mm256_mask_expandloadu_ps (xf, (1 << 7) + 5, pf);
+
+ xd = _mm256_mask_expand_pd (xd, 0, xd);
+ xd = _mm256_mask_expand_pd (xd, (1 << 4) - 1, xd);
+ xd = _mm256_mask_expand_pd (xd, (1 << 2) - 1, xd);
+ xd = _mm256_mask_expand_pd (xd, (1 << 2), xd);
+
+ xd = _mm256_mask_expandloadu_pd (xd, 0, pd);
+ xd = _mm256_mask_expandloadu_pd (xd, -1, pd);
+ xd = _mm256_mask_expandloadu_pd (xd, (1 << 2) - 1, pd);
+ xd = _mm256_mask_expandloadu_pd (xd, (1 << 2), pd);
+
+ xi32_128 = _mm_mask_expand_epi32 (xi32_128, 0, xi32_128);
+ xi32_128 = _mm_mask_expand_epi32 (xi32_128, -1, xi32_128);
+ xi32_128 = _mm_mask_expand_epi32 (xi32_128, (1 << 3) - 1, xi32_128);
+ xi32_128 = _mm_mask_expand_epi32 (xi32_128, (1 << 3) + 1, xi32_128);
+
+ xi32_128 = _mm_mask_expandloadu_epi32 (xi32_128, 0, pi32);
+ xi32_128 = _mm_mask_expandloadu_epi32 (xi32_128, (1 << 4) - 1, pi32);
+ xi32_128 = _mm_mask_expandloadu_epi32 (xi32_128, (1 << 2) - 1, pi32);
+ xi32_128 = _mm_mask_expandloadu_epi32 (xi32_128, (1 << 1) + 3, pi32);
+
+ xi64_128 = _mm_mask_expand_epi64 (xi64_128, 0, xi64_128);
+ xi64_128 = _mm_mask_expand_epi64 (xi64_128, -1, xi64_128);
+ xi64_128 = _mm_mask_expand_epi64 (xi64_128, (1 << 1) - 1, xi64_128);
+ xi64_128 = _mm_mask_expand_epi64 (xi64_128, 2, xi64_128);
+
+ xi64_128 = _mm_mask_expandloadu_epi64 (xi64_128, 0, pi64);
+ xi64_128 = _mm_mask_expandloadu_epi64 (xi64_128, 3, pi64);
+ xi64_128 = _mm_mask_expandloadu_epi64 (xi64_128, 1, pi64);
+ xi64_128 = _mm_mask_expandloadu_epi64 (xi64_128, 2, pi64);
+
+ xf_128 = _mm_mask_expand_ps (xf_128, 0, xf_128);
+ xf_128 = _mm_mask_expand_ps (xf_128, (1 << 4) - 1, xf_128);
+ xf_128 = _mm_mask_expand_ps (xf_128, (1 << 3) - 1, xf_128);
+ xf_128 = _mm_mask_expand_ps (xf_128, (1 << 2), xf_128);
+
+ xf_128 = _mm_mask_expandloadu_ps (xf_128, 0, pf);
+ xf_128 = _mm_mask_expandloadu_ps (xf_128, -1, pf);
+ xf_128 = _mm_mask_expandloadu_ps (xf_128, (1 << 3) - 1, pf);
+ xf_128 = _mm_mask_expandloadu_ps (xf_128, (1 << 1), pf);
+
+ xd_128 = _mm_mask_expand_pd (xd_128, 0, xd_128);
+ xd_128 = _mm_mask_expand_pd (xd_128, (1 << 2) - 1, xd_128);
+ xd_128 = _mm_mask_expand_pd (xd_128, 1, xd_128);
+ xd_128 = _mm_mask_expand_pd (xd_128, 2, xd_128);
+
+ xd_128 = _mm_mask_expandloadu_pd (xd_128, 0, pd);
+ xd_128 = _mm_mask_expandloadu_pd (xd_128, -1, pd);
+ xd_128 = _mm_mask_expandloadu_pd (xd_128, 1, pd);
+ xd_128 = _mm_mask_expandloadu_pd (xd_128, 2, pd);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512vl-pr100267-pd-2.c b/gcc/testsuite/gcc.target/i386/avx512vl-pr100267-pd-2.c
new file mode 100644
index 0000000..e5f3037
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512vl-pr100267-pd-2.c
@@ -0,0 +1,15 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -mavx512vl" } */
+/* { dg-require-effective-target avx512vl } */
+
+#define AVX512VL
+#define AVX512F_LEN 256
+#define AVX512F_LEN_HALF 128
+#include "avx512f-pr100267-pd-2.c"
+
+#undef AVX512F_LEN
+#undef AVX512F_LEN_HALF
+
+#define AVX512F_LEN 128
+#define AVX512F_LEN_HALF 128
+#include "avx512f-pr100267-pd-2.c"
diff --git a/gcc/testsuite/gcc.target/i386/avx512vl-pr100267-ps-2.c b/gcc/testsuite/gcc.target/i386/avx512vl-pr100267-ps-2.c
new file mode 100644
index 0000000..0149a8a
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512vl-pr100267-ps-2.c
@@ -0,0 +1,15 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -mavx512vl" } */
+/* { dg-require-effective-target avx512vl } */
+
+#define AVX512VL
+#define AVX512F_LEN 256
+#define AVX512F_LEN_HALF 128
+#include "avx512f-pr100267-ps-2.c"
+
+#undef AVX512F_LEN
+#undef AVX512F_LEN_HALF
+
+#define AVX512F_LEN 128
+#define AVX512F_LEN_HALF 128
+#include "avx512f-pr100267-ps-2.c"
diff --git a/gcc/testsuite/gcc.target/i386/avx512vlbw-pr100267-1.c b/gcc/testsuite/gcc.target/i386/avx512vlbw-pr100267-1.c
new file mode 100644
index 0000000..135dbd7
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512vlbw-pr100267-1.c
@@ -0,0 +1,66 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512bw -mavx512vbmi2 -mavx512vl -O2" } */
+/* { dg-final { scan-assembler-times "vpexpandb\[ \\t\]+\[^\{\n\]*\\(\[^\n\]*%ymm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vpexpandb\[ \\t\]+\[^\{\n\(]*%ymm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vpexpandw\[ \\t\]+\[^\{\n\]*\\(\[^\n\]*%ymm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vpexpandw\[ \\t\]+\[^\{\n\(]*%ymm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
+
+/* { dg-final { scan-assembler-times "vmov\[a-z0-9\]*\[ \\t\]+\[^\{\n\]*\\(\[^\n\]*%ymm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 2 } } */
+/* { dg-final { scan-assembler-times "vmov\[a-z0-9\]*\[ \\t\]+\[^\{\n\(]*%ymm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 2 } } */
+/* { dg-final { scan-assembler-times "vpexpandb\[ \\t\]+\[^\{\n\]*\\(\[^\n\]*%xmm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vpexpandb\[ \\t\]+\[^\{\n\(]*%xmm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vpexpandw\[ \\t\]+\[^\{\n\]*\\(\[^\n\]*%xmm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vpexpandw\[ \\t\]+\[^\{\n\(]*%xmm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
+
+/* { dg-final { scan-assembler-times "vmov\[a-z0-9\]*\[ \\t\]+\[^\{\n\]*\\(\[^\n\]*%xmm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 2 } } */
+/* { dg-final { scan-assembler-times "(?:vmov\[a-z0-9\]*\[ \\t\]+\[^\{\n\(]*%xmm\[0-9\]+\{%k\[1-7\]\}|blend\[a-z]*\[ \\t\]+\[^\{\n\(]*%xmm\[0-9\]+)(?:\n|\[ \\t\]+#)" 2 } } */
+#include <immintrin.h>
+
+char *pi8;
+short *pi16;
+volatile __m256i xi16, xi8;
+volatile __m128i xi16_xmm, xi8_xmm;
+
+void extern
+avx512f_test (void)
+{
+ xi8 = _mm256_mask_expand_epi8 (xi8, 0, xi8);
+ xi8 = _mm256_mask_expand_epi8 (xi8, -1, xi8);
+ xi8 = _mm256_mask_expand_epi8 (xi8, (1 << 30) - 1, xi8);
+ xi8 = _mm256_mask_expand_epi8 (xi8, (1 << 16) + 1, xi8);
+
+ xi8 = _mm256_mask_expandloadu_epi8 (xi8, 0, pi8);
+ xi8 = _mm256_mask_expandloadu_epi8 (xi8, -1, pi8);
+ xi8 = _mm256_mask_expandloadu_epi8 (xi8, (1 << 28) - 1, pi8);
+ xi8 = _mm256_mask_expandloadu_epi8 (xi8, (1 << 15) + 3, pi8);
+
+ xi16 = _mm256_mask_expand_epi16 (xi16, 0, xi16);
+ xi16 = _mm256_mask_expand_epi16 (xi16, -1, xi16);
+ xi16 = _mm256_mask_expand_epi16 (xi16, (1 << 15) - 1, xi16);
+ xi16 = _mm256_mask_expand_epi16 (xi16, (1 << 14) + 2, xi16);
+
+ xi16 = _mm256_mask_expandloadu_epi16 (xi16, 0, pi16);
+ xi16 = _mm256_mask_expandloadu_epi16 (xi16, (1 << 16) - 1, pi16);
+ xi16 = _mm256_mask_expandloadu_epi16 (xi16, (1 << 14) - 1, pi16);
+ xi16 = _mm256_mask_expandloadu_epi16 (xi16, (1 << 13) + 7, pi16);
+
+ xi8_xmm = _mm_mask_expand_epi8 (xi8_xmm, 0, xi8_xmm);
+ xi8_xmm = _mm_mask_expand_epi8 (xi8_xmm, -1, xi8_xmm);
+ xi8_xmm = _mm_mask_expand_epi8 (xi8_xmm, (1 << 13) - 1, xi8_xmm);
+ xi8_xmm = _mm_mask_expand_epi8 (xi8_xmm, (1 << 12) + 1, xi8_xmm);
+
+ xi8_xmm = _mm_mask_expandloadu_epi8 (xi8_xmm, 0, pi8);
+ xi8_xmm = _mm_mask_expandloadu_epi8 (xi8_xmm, (1 << 16) - 1, pi8);
+ xi8_xmm = _mm_mask_expandloadu_epi8 (xi8_xmm, (1 << 12) - 1, pi8);
+ xi8_xmm = _mm_mask_expandloadu_epi8 (xi8_xmm, (1 << 11) + 3, pi8);
+
+ xi16_xmm = _mm_mask_expand_epi16 (xi16_xmm, 0, xi16_xmm);
+ xi16_xmm = _mm_mask_expand_epi16 (xi16_xmm, -1, xi16_xmm);
+ xi16_xmm = _mm_mask_expand_epi16 (xi16_xmm, (1 << 7) - 1, xi16_xmm);
+ xi16_xmm = _mm_mask_expand_epi16 (xi16_xmm, (1 << 4) + 2, xi16_xmm);
+
+ xi16_xmm = _mm_mask_expandloadu_epi16 (xi16_xmm, 0, pi16);
+ xi16_xmm = _mm_mask_expandloadu_epi16 (xi16_xmm, (1 << 8) - 1, pi16);
+ xi16_xmm = _mm_mask_expandloadu_epi16 (xi16_xmm, (1 << 3) - 1, pi16);
+ xi16_xmm = _mm_mask_expandloadu_epi16 (xi16_xmm, (1 << 6) + 7, pi16);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512vlbw-pr100267-b-2.c b/gcc/testsuite/gcc.target/i386/avx512vlbw-pr100267-b-2.c
new file mode 100644
index 0000000..d54e803
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512vlbw-pr100267-b-2.c
@@ -0,0 +1,16 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -mavx512vl -mavx512vbmi2 -mavx512bw" } */
+/* { dg-require-effective-target avx512vl } */
+/* { dg-require-effective-target avx512vbmi2 } */
+
+#define AVX512VL
+#define AVX512F_LEN 256
+#define AVX512F_LEN_HALF 128
+#include "avx512bw-pr100267-b-2.c"
+
+#undef AVX512F_LEN
+#undef AVX512F_LEN_HALF
+
+#define AVX512F_LEN 128
+#define AVX512F_LEN_HALF 128
+#include "avx512bw-pr100267-b-2.c"
diff --git a/gcc/testsuite/gcc.target/i386/avx512vlbw-pr100267-d-2.c b/gcc/testsuite/gcc.target/i386/avx512vlbw-pr100267-d-2.c
new file mode 100644
index 0000000..1e604cf
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512vlbw-pr100267-d-2.c
@@ -0,0 +1,15 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -mavx512vl" } */
+/* { dg-require-effective-target avx512vl } */
+
+#define AVX512VL
+#define AVX512F_LEN 256
+#define AVX512F_LEN_HALF 128
+#include "avx512bw-pr100267-d-2.c"
+
+#undef AVX512F_LEN
+#undef AVX512F_LEN_HALF
+
+#define AVX512F_LEN 128
+#define AVX512F_LEN_HALF 128
+#include "avx512bw-pr100267-d-2.c"
diff --git a/gcc/testsuite/gcc.target/i386/avx512vlbw-pr100267-q-2.c b/gcc/testsuite/gcc.target/i386/avx512vlbw-pr100267-q-2.c
new file mode 100644
index 0000000..1f9fe65
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512vlbw-pr100267-q-2.c
@@ -0,0 +1,15 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -mavx512vl" } */
+/* { dg-require-effective-target avx512vl } */
+
+#define AVX512VL
+#define AVX512F_LEN 256
+#define AVX512F_LEN_HALF 128
+#include "avx512bw-pr100267-q-2.c"
+
+#undef AVX512F_LEN
+#undef AVX512F_LEN_HALF
+
+#define AVX512F_LEN 128
+#define AVX512F_LEN_HALF 128
+#include "avx512bw-pr100267-q-2.c"
diff --git a/gcc/testsuite/gcc.target/i386/avx512vlbw-pr100267-w-2.c b/gcc/testsuite/gcc.target/i386/avx512vlbw-pr100267-w-2.c
new file mode 100644
index 0000000..a46ca78
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512vlbw-pr100267-w-2.c
@@ -0,0 +1,16 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -mavx512vl -mavx512vbmi2 -mavx512bw" } */
+/* { dg-require-effective-target avx512vl } */
+/* { dg-require-effective-target avx512vbmi2 } */
+
+#define AVX512VL
+#define AVX512F_LEN 256
+#define AVX512F_LEN_HALF 128
+#include "avx512bw-pr100267-w-2.c"
+
+#undef AVX512F_LEN
+#undef AVX512F_LEN_HALF
+
+#define AVX512F_LEN 128
+#define AVX512F_LEN_HALF 128
+#include "avx512bw-pr100267-w-2.c"
diff --git a/gcc/testsuite/gcc.target/i386/avx512vpopcntdq-pr97770-1.c b/gcc/testsuite/gcc.target/i386/avx512vpopcntdq-pr97770-1.c
index 63bb00d..dedd2e4 100644
--- a/gcc/testsuite/gcc.target/i386/avx512vpopcntdq-pr97770-1.c
+++ b/gcc/testsuite/gcc.target/i386/avx512vpopcntdq-pr97770-1.c
@@ -1,13 +1,12 @@
/* PR target/97770 */
/* { dg-do compile } */
-/* { dg-options "-O2 -mavx512vpopcntdq -mavx512vl -mprefer-vector-width=512" } */
+/* { dg-options "-O2 -march=icelake-server -mprefer-vector-width=512" } */
/* { dg-final { scan-assembler-times "vpopcntd\[ \\t\]+\[^\\n\\r\]*xmm" 1 } } */
/* { dg-final { scan-assembler-times "vpopcntd\[ \\t\]+\[^\\n\\r\]*ymm" 1 } } */
/* { dg-final { scan-assembler-times "vpopcntd\[ \\t\]+\[^\\n\\r\]*zmm" 1 } } */
-/* Add xfail since current vectorizor cannot generate expected code for DImode popcount */
-/* { dg-final { scan-assembler-times "vpopcntq\[ \\t\]+\[^\\n\\r\]*xmm" 1 { xfail *-*-* } } } */
-/* { dg-final { scan-assembler-times "vpopcntq\[ \\t\]+\[^\\n\\r\]*ymm" 1 { xfail *-*-* } } } */
-/* { dg-final { scan-assembler-times "vpopcntq\[ \\t\]+\[^\\n\\r\]*zmm" 1 { xfail *-*-* } } } */
+/* { dg-final { scan-assembler-times "vpopcntq\[ \\t\]+\[^\\n\\r\]*xmm" 1 } } */
+/* { dg-final { scan-assembler-times "vpopcntq\[ \\t\]+\[^\\n\\r\]*ymm" 1 } } */
+/* { dg-final { scan-assembler-times "vpopcntq\[ \\t\]+\[^\\n\\r\]*zmm" 1 } } */
#ifndef AVX512VPOPCNTQ_H_INCLUDED
#define AVX512VPOPCNTQ_H_INCLUDED
diff --git a/gcc/testsuite/gcc.target/i386/pr100310.c b/gcc/testsuite/gcc.target/i386/pr100310.c
new file mode 100644
index 0000000..54ace18
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr100310.c
@@ -0,0 +1,12 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512f -O2" } */
+#include <immintrin.h>
+
+double *p;
+volatile __m512d x;
+volatile __mmask8 m;
+
+void foo()
+{
+ x = _mm512_mask_expandloadu_pd (x, 255, p);
+}
diff --git a/gcc/testsuite/gcc.target/i386/pr11877.c b/gcc/testsuite/gcc.target/i386/pr11877.c
new file mode 100644
index 0000000..5a488cc
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr11877.c
@@ -0,0 +1,16 @@
+/* PR target/11877 */
+/* { dg-do compile } */
+/* { dg-options "-Os" } */
+
+void foo (long long *p)
+{
+ *p = 0;
+}
+
+void bar (int *p)
+{
+ *p = 0;
+}
+
+/* { dg-final { scan-assembler-times "xorl\[ \t\]" 2 } } */
+/* { dg-final { scan-assembler-not "\\\$0," } } */
diff --git a/gcc/testsuite/gcc.target/i386/spill_to_mask-1.c b/gcc/testsuite/gcc.target/i386/spill_to_mask-1.c
index c5043e2..94d6764 100644
--- a/gcc/testsuite/gcc.target/i386/spill_to_mask-1.c
+++ b/gcc/testsuite/gcc.target/i386/spill_to_mask-1.c
@@ -1,15 +1,31 @@
/* { dg-do compile } */
-/* { dg-options "-O2 -march=skylake-avx512" } */
-
-#ifndef DTYPE
-#define DTYPE u32
-#endif
+/* { dg-options "-O2 -march=skylake-avx512 -DDTYPE32" } */
typedef unsigned long long u64;
typedef unsigned int u32;
typedef unsigned short u16;
typedef unsigned char u8;
+#ifdef DTYPE32
+typedef u32 DTYPE;
+#define byteswap byteswapu32
+#endif
+
+#ifdef DTYPE16
+typedef u16 DTYPE;
+#define byteswap byteswapu16
+#endif
+
+#ifdef DTYPE8
+typedef u16 DTYPE;
+#define byteswap byteswapu8
+#endif
+
+#ifdef DTYPE64
+typedef u16 DTYPE;
+#define byteswap byteswapu64
+#endif
+
#define R(x,n) ( (x >> n) | (x << (32 - n)))
#define S0(x) (R(x, 2) ^ R(x,13) ^ R(x,22))
@@ -23,36 +39,51 @@ typedef unsigned char u8;
d += tmp1; \
}
-static inline DTYPE byteswap(DTYPE x)
+static inline u32 byteswapu32(u32 x)
{
- x = (x & 0x0000FFFF) << 16 | (x & 0xFFFF0000) >> 16;
- x = (x & 0x00FF00FF) << 8 | (x & 0xFF00FF00) >> 8;
- return x;
+ x = (x & 0x0000FFFF) << 16 | (x & 0xFFFF0000) >> 16;
+ x = (x & 0x00FF00FF) << 8 | (x & 0xFF00FF00) >> 8;
+ return x;
}
-#define BE_LOAD32(n,b,i) (n) = byteswap(*(DTYPE *)(b + i))
+static inline u16 byteswapu16(u16 x)
+{
+ x = (x & 0x00FF) << 8 | (x & 0xFF00) >> 8;
+ return x;
+}
+
+static inline u8 byteswapu8(u8 x)
+{
+ return x;
+}
+
+static inline u64 byteswapu64(u64 x)
+{
+ x = ((u64)(byteswapu32 (x & 0x00000000FFFFFFFF))) << 32 | byteswapu32((x & 0xFFFFFFFF00000000) >> 32);
+ return x;
+}
-void foo (u8 *in, DTYPE out[8], const DTYPE C[16])
+void foo (DTYPE in[16], DTYPE out[8], const DTYPE C[16])
{
DTYPE tmp1 = 0, tmp2 = 0, a, b, c, d, e, f, g, h;
DTYPE w0, w1, w2, w3, w4, w5, w6, w7,
w8, w9, w10, w11, w12, w13, w14, w15;
- w0 = byteswap(*(DTYPE *)(in + 0));
- w1 = byteswap(*(DTYPE *)(in + 4));
- w2 = byteswap(*(DTYPE *)(in + 8));
- w3 = byteswap(*(DTYPE *)(in + 12));
- w4 = byteswap(*(DTYPE *)(in + 16));
- w5 = byteswap(*(DTYPE *)(in + 20));
- w6 = byteswap(*(DTYPE *)(in + 24));
- w7 = byteswap(*(DTYPE *)(in + 28));
- w8 = byteswap(*(DTYPE *)(in + 32));
- w9 = byteswap(*(DTYPE *)(in + 36));
- w10 = byteswap(*(DTYPE *)(in + 40));
- w11 = byteswap(*(DTYPE *)(in + 44));
- w12 = byteswap(*(DTYPE *)(in + 48));
- w13 = byteswap(*(DTYPE *)(in + 52));
- w14 = byteswap(*(DTYPE *)(in + 56));
- w15 = byteswap(*(DTYPE *)(in + 60));
+ w0 = byteswap(in[0]);
+ w1 = byteswap(in[1]);
+ w2 = byteswap(in[2]);
+ w3 = byteswap(in[3]);
+ w4 = byteswap(in[4]);
+ w5 = byteswap(in[5]);
+ w6 = byteswap(in[6]);
+ w7 = byteswap(in[7]);
+ w8 = byteswap(in[8]);
+ w9 = byteswap(in[9]);
+ w10 = byteswap(in[10]);
+ w11 = byteswap(in[11]);
+ w12 = byteswap(in[12]);
+ w13 = byteswap(in[13]);
+ w14 = byteswap(in[14]);
+ w15 = byteswap(in[15]);
a = out[0];
b = out[1];
c = out[2];
@@ -90,3 +121,7 @@ void foo (u8 *in, DTYPE out[8], const DTYPE C[16])
}
/* { dg-final { scan-assembler "kmovd" } } */
+/* { dg-final { scan-assembler-not "knot" } } */
+/* { dg-final { scan-assembler-not "kxor" } } */
+/* { dg-final { scan-assembler-not "kor" } } */
+/* { dg-final { scan-assembler-not "kandn" } } */
diff --git a/gcc/testsuite/gcc.target/i386/spill_to_mask-2.c b/gcc/testsuite/gcc.target/i386/spill_to_mask-2.c
index 1f0c6b4..c7d0976 100644
--- a/gcc/testsuite/gcc.target/i386/spill_to_mask-2.c
+++ b/gcc/testsuite/gcc.target/i386/spill_to_mask-2.c
@@ -1,10 +1,9 @@
/* { dg-do compile } */
-/* { dg-options "-O2 -march=skylake-avx512" } */
-
-#ifndef DTYPE
-#define DTYPE u16
-#endif
+/* { dg-options "-O2 -march=skylake-avx512 -DDTYPE16" } */
#include "spill_to_mask-1.c"
-/* { dg-final { scan-assembler "kmovw" } } */
+/* { dg-final { scan-assembler-not "knot" } } */
+/* { dg-final { scan-assembler-not "kxor" } } */
+/* { dg-final { scan-assembler-not "kor" } } */
+/* { dg-final { scan-assembler-not "kandn" } } */
diff --git a/gcc/testsuite/gcc.target/i386/spill_to_mask-3.c b/gcc/testsuite/gcc.target/i386/spill_to_mask-3.c
index 5b59090..b7a383f 100644
--- a/gcc/testsuite/gcc.target/i386/spill_to_mask-3.c
+++ b/gcc/testsuite/gcc.target/i386/spill_to_mask-3.c
@@ -1,10 +1,9 @@
/* { dg-do compile } */
-/* { dg-options "-O2 -march=skylake-avx512" } */
-
-#ifndef DTYPE
-#define DTYPE u8
-#endif
+/* { dg-options "-O2 -march=skylake-avx512 -DDTYPE8" } */
#include "spill_to_mask-1.c"
-/* { dg-final { scan-assembler "kmovb" } } */
+/* { dg-final { scan-assembler-not "knot" } } */
+/* { dg-final { scan-assembler-not "kxor" } } */
+/* { dg-final { scan-assembler-not "kor" } } */
+/* { dg-final { scan-assembler-not "kandn" } } */
diff --git a/gcc/testsuite/gcc.target/i386/spill_to_mask-4.c b/gcc/testsuite/gcc.target/i386/spill_to_mask-4.c
index f111cf4..d67038d 100644
--- a/gcc/testsuite/gcc.target/i386/spill_to_mask-4.c
+++ b/gcc/testsuite/gcc.target/i386/spill_to_mask-4.c
@@ -1,10 +1,9 @@
/* { dg-do compile { target { ! ia32 } } } */
-/* { dg-options "-O2 -march=skylake-avx512" } */
-
-#ifndef DTYPE
-#define DTYPE u64
-#endif
+/* { dg-options "-O2 -march=skylake-avx512 -DDTYPE64" } */
#include "spill_to_mask-1.c"
-/* { dg-final { scan-assembler "kmovq" } } */
+/* { dg-final { scan-assembler-not "knot" } } */
+/* { dg-final { scan-assembler-not "kxor" } } */
+/* { dg-final { scan-assembler-not "kor" } } */
+/* { dg-final { scan-assembler-not "kandn" } } */
diff --git a/gcc/testsuite/gfortran.dg/pr101121.f b/gcc/testsuite/gfortran.dg/pr101121.f
new file mode 100644
index 0000000..b623ac1
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/pr101121.f
@@ -0,0 +1,203 @@
+! { dg-do compile }
+! { dg-options "-Ofast -std=legacy" }
+! { dg-additional-options "-march=haswell" { target x86_64-*-* i?86-*-* } }
+ COMMON /JMSG80/ PI4,PIF,P120,R12,P340,R34,FCS(4,3),E34MAX,
+ 7 IJSAME,KLSAME,IKSMJL
+ DIMENSION P1(3),FQ(0:5),F1(0:4),F2(0:4),WS(8),WP(8)
+ DIMENSION VEA(12),VES(9),WES(6)
+ DIMENSION T(0:20),U(0:20)
+ DIMENSION T3R(6,3,3,3),T9B(0:20,3,3,3)
+ DIMENSION F5X(0:12,3,3,3),F6X(0: 6,3,3,3,3)
+ DIMENSION A31(0:3,0:3),C31(2,0:3),A32(0:3,0:3),C32(2,0:3)
+ DIMENSION A41(0:3,0:3),C41(2,0:3),A42(0:3,0:3),C42(2,0:3)
+ DIMENSION A33(16),FIJ00(2),A43(16),FI0K0(2)
+ DIMENSION SEJJK0( 3),A54(16, 3),C54(2, 3)
+ DIMENSION A56(0:22,3,0:3),C56(2,0:3)
+ DIMENSION A60(0:3,0:3),C60(2,0:3),A61(0:3,0:3),C61(2,0:3)
+ DIMENSION A62(16),FI00L(2),A63(16),F0J0L(2)
+ DIMENSION A64(0:3,0:3),C64(2, 3),A65(0:3,0:3),C65(2, 3)
+ DIMENSION A69(0:3, 3),C69(2,0:3),A70(0:3, 3),C70(2,0:3)
+ DIMENSION A71(18, 3),C71(2, 3)
+ DIMENSION A72(18, 3),C72(2, 3)
+ DIMENSION A73(18,0:3),C73(2,0:3)
+ DIMENSION SE0LKL( 3),A75(16,3),C75(2,0:3)
+ DIMENSION SE0JLL( 3),A76(16,3),C76(2,0:3)
+ DIMENSION A77(0:25,3,0:3),C77(2,0:3),A78(0:31,3,0:3),C78(2,0:3)
+ DIMENSION A79(0:31,3,0:3),C79(2,0:3)
+ DIMENSION A80(0: 2,2),A81(0:24,3),A82(0:31,2),A83(0:22,2)
+ DIMENSION A84(0:13,2),A85(0:13,2),A86(0: 6)
+ DIMENSION S4(0:14),Q4(0:4),FIJKL(2)
+ IF(XVA.LT.CUG) THEN
+ ENDIF
+ F1(M)= FQ0*TMP
+ F2(M)= FQ0*TMP
+ XX1=-X12*X43
+ IF(JI.EQ.1) THEN
+ DO 255 J=1,3
+ 255 CONTINUE
+ DO 268 K=1,3
+ SEJJK00= E0+E(2,2,K,0)+E(3,3,K,0)
+ A54( 5,K)= A540
+ 268 CONTINUE
+ 297 F5X(3+M,I,I,I)=-R3(M,I,I,I)
+ DO 299 J=1,3
+ F5X(3+M,I,I,J)=-R3(M,J,I,I)
+ 299 CONTINUE
+ DO 300 L=0,M56
+ DO 300 M=1,3
+ 300 A56(N,M,L)= ZER
+ A60(2,L)= A600+P34(I,3)*E(I,0,0,L)
+ A61(0,L)= A610+D1I *E(L,0,0,I)
+ A61(1,L)= A610+P12(I,3)*E(L,0,0,I)
+ SEL00L= E(1,0,0,1)+E(2,0,0,2)+E(3,0,0,3)
+ IF(I.NE.J) THEN
+ K=6-I-J
+ F6X(0,J,I,I,I)= ZER
+ F6X(0,I,J,I,I)= ZER
+ F6X(0,I,I,J,I)= ZER
+ F6X(0,I,I,I,J)= ZER
+ F6X(M,I,I,K,J)= R2(M,K,J)
+ ENDIF
+ 391 A82( M,N)= ZER
+ 392 A83( M,N)= ZER
+ A84(M,N)= ZER
+ A85(M,N)= ZER
+ 397 A86( M)= ZER
+ DO 399 K=1,3
+ DO 399 J=1,3
+ DO 398 M=1,6
+ T9B(M+ 2,I,J,K)= T3R0
+ T9B(M+ 8,I,J,K)= T1R(M,I,J,K)
+ T9B(M+14,I,J,K)= T3R0
+ 398 CONTINUE
+ 399 CONTINUE
+ 417 A77( M,3,K)= A770+F5X0*GEIJKL
+ 445 A81( M,3) = A81( M,3)+T( M)*TMP
+ IF(K.EQ.L)A81( 5,3)=A81( 5,3)+TMP
+ IF(I.EQ.J) THEN
+ DO 447 M=6,11
+ 447 A81( M,3) = A81( M,3)+T( M)*GEIJKL
+ ENDIF
+ ENDIF
+ IF(LK.EQ.1) THEN
+ IF(JTYPE.NE.4) THEN
+ DO 510 J=0,3
+ A31(3,J)= A310+ A310*Y02
+ A32(3,J)= A320+ A320*Y02
+ 510 CONTINUE
+ A33( 6)=-AEIJ00*Y1Y+T01
+ A33( 7)= A330-0*Y01+T01
+ A33( 8)= A330- A330*Y01
+ A33(15)= A330+0*Y02
+ A33(16)= A330+ A330*Y02
+ ENDIF
+ A84(12,N)= A84( 7,N)+ A84( 8,N)*Y02
+ A84(13,N)= A84( 9,N)
+ A85(10,2)= A85(10,2)- A85(10,1)+ A850
+ A85(11,2)= A85(11,2)- A85(11,1)+ A850
+ A85(12,2)= A85(12,2)- A85(12,1)+ A850
+ A85(13,2)= A85(13,2)- A85(13,1)
+ Q4(0)= S4( 0)+(S4( 1)+(S4( 2)+(S4( 3)+S4( 4)*Y02)*Y02)*Y02)*Y02
+ Q4(1)= S4( 5)+(S4( 6)+(S4( 7)+ S4( 8)*Y02)*Y02)*Y02
+ Q4(2)= S4( 9)+(S4(10)+ S4(11)*Y02)*Y02
+ Q4(3)= S4(12)+ S4(13)*Y02
+ Q4(4)= S4(14)
+ ENDIF
+ IF(JTYPE.NE.4) THEN
+ ENDIF
+ C42(1,M)= T0*F10-T0*F10
+ C42(2,M)= T0*F20-T0*F20
+ T(1)= T01+(A43( 4)- A43( 5)*Y04)*Y04
+ F0J0L(2)= T(0)*F20-T0*F20+T(2)*F20
+ DO 660 N=1,3
+ T(0)= A64(3,N)- A64(0,N)- A64(1,N)
+ T(1)= A640- A640*Y04
+ C64(1,N)= T0*F10-T0*F10
+ C64(2,N)= T0*F20-T0*F2(1)
+ C65(1,N)= T0*F10-T0*F10
+ C65(2,N)= T0*F20-T0*F2(1)
+ C70(2,N)= T0*F20-T0*F20
+ T(2)=(A71(17,N)-(A71(18,N)- A71(16,N)*Y04)*Y04)*XX1
+ C71(1,N)= T0*F10-T0*F10+T0*F10
+ C71(2,N)= T0*F20-T0*F20+T0*F20
+ T(1)=(A720+ A720- A720-T0)*XX1
+ C72(1,N)= T0*F10-T0*F10+T0*F10
+ C75(1,N)= T(0)*F10-T0*F1(1)+T(2)*F1(2)
+ C75(2,N)= T(0)*F20-T0*F2(1)+T(2)*F2(2)
+ T01 = A76( 6,N)*XX1
+ T(1)=(T01- A760-(A760- A76( 7,N)- A76( 8,N)
+ 2 -(A760+ A76( 3,N))*Y04)*Y04)*XX1
+ 660 CONTINUE
+ C73(2,M)= T0*F20+T0*F20+T(2)*F20
+ 2 +(A77(23,1,M)+ A77(24,1,M)*Y04)*Y03
+ T(2)=(A77(21,2,M)+(A77(22,2,M)+ A77(23,2,M)*Y04)*Y04)*XX1
+ 2 -(A77(24,2,M)-(A77(25,2,M)+ A77(20,2,M)*Y04)*Y04)*Y03
+ T(3)=(A77(21,3,M)+(A77(22,3,M)+(A77(23,3,M)
+ 2 + A77(24,3,M)*Y04)*Y04)*Y04)*XX1
+ C77(1,M)= T0*F10-T0*F10-T0*F10+T0*F10
+ C77(2,M)= T(0)*F20-T(1)*F20-T(2)*F20+T(3)*F20
+ T(0)=(A780+ A78(24,1,M))*Y3Y+ A780*XX1
+ T(1)=(A78(23,1,M)+(A78(21,1,M)+A78(22,1,M)*Y04)*Y04)*XX1
+ 2 +(A78(25,1,M)+ A78(26,1,M)*Y04)*Y3Y- A78(27,1,M)*XX2
+ T(2)=(A78(21,2,M)+(A78(22,2,M)+ A78(28,2,M)*Y04)*Y04)*XX2
+ 2 +(A78(23,2,M)-(A78(24,2,M)+ A78(25,2,M)*Y04)*Y04)*XX1
+ 3 -(A78(29,2,M)-(A78(30,2,M)+ A78(31,2,M)*Y04)*Y04)*Y41
+ T(3)=(A78(21,3,M)+(A78(22,3,M)+(A78(23,3,M)
+ 2 + A78(24,3,M)*Y04)*Y04)*Y04)*XX2
+ C78(1,M)= T0*F10-T0*F1(1)-T(2)*F1(2)+T(3)*F1(3)
+ C78(2,M)= T(0)*F2(0)-T(1)*F2(1)-T(2)*F2(2)+T(3)*F2(3)
+ T(0)=-A79(24,1,M)*Y3Y+ A79(30,1,M)*H43
+ T(1)=(A79(21,1,M)-(A79(23,1,M)+ A79(22,1,M)*Y04)*Y04)*XX1
+ 2 +(A79(25,1,M)+ A79(26,1,M)*Y04)*Y3Y- A79(29,1,M)*XX2
+ T(2)=(A79(21,2,M)+(A79(22,2,M)- A79(28,2,M)*Y04)*Y04)*XX2
+ 2 +(A79(23,2,M)-(A79(24,2,M)+ A79(25,2,M)*Y04)*Y04)*XX1
+ 3 -(A79(29,2,M)-(A79(30,2,M)+ A79(31,2,M)*Y04)*Y04)*Y41
+ T(3)=(A79(21,3,M)+(A79(22,3,M)+(A79(23,3,M)
+ 2 + A79(24,3,M)*Y04)*Y04)*Y04)*XX2
+ C79(1,M)= T(0)*F1(0)-T(1)*F1(1)-T(2)*F1(2)+T(3)*F1(3)
+ C79(2,M)= T(0)*F2(0)-T(1)*F2(1)-T(2)*F2(2)+T(3)*F2(3)
+ T(0)= A80( 2,1)*Y3Y+ A80( 2,2)*H43
+ T(1)=(A81(16,1)+(A81(14,1)+A81(15,1)*Y04)*Y04)*XX1
+ 2 +(A81(18,1)+ A81(19,1)*Y04)*Y3Y- A81(20,1)*XX2
+ T(2)=(A82(21,1)+(A82(22,1)+ A82(28,1)*Y04)*Y04)*XX2
+ 2 +(A82(23,1)-(A82(24,1)+ A82(25,1)*Y04)*Y04)*XX1
+ 3 +(A83(15,2)+(A83(16,2)+ A82(31,1)*Y04)*Y04)*Y41
+ 4 -(A83(17,2)-(A83(18,2)- A83(19,2)*Y04)*Y04)*Y3Y
+ T(3)=(A84(10,1)+(A84(11,1)+(A84(12,1)+A84(13,1)*Y04)*Y04)*Y04)*XX2
+ 2 +(A85(10,1)+(A85(10,2)+(A85(11,2)+(A85(12,2)
+ 3 + A85(13,2)*Y04)*Y04)*Y04)*Y04)*XX1
+ T(4)=(Q4(0)+(Q4(1)+(Q4(2)+(Q4(3)+Q4(4)*Y04)*Y04)*Y04)*Y04)*XX2
+ FIJKL(1)= T(0)*F1(0)-T(1)*F1(1)-T(2)*F1(2)+T(3)*F1(3)+T(4)*F1(4)
+ FIJKL(2)= T(0)*F2(0)-T(1)*F2(1)-T(2)*F2(2)+T(3)*F2(3)+T(4)*F2(4)
+ DO 800 ICP=1,2
+ VE0= VE0+C61(ICP,0)*WP(1)+FI00L(ICP)*WP(2)
+ 2 +F0J0L(ICP)*WP(3)+C77(ICP,0)*WP(4)
+ 3 +C73(ICP,0)*WP(5)+C78(ICP,0)*WP(6)
+ 4 +C79(ICP,0)*WP(7)+FIJKL(ICP)*WP(8)
+ IF(ICP.EQ.1) THEN
+ DO 720 M=1,3
+ VES( M)= VES( M)+VEA( M)
+ VES(3+M)= VES(3+M)+VEA(3+M)
+ T01 = VEA(6+M)
+ T02 = VEA(9+M)
+ WES( M)=-T01+(T01+T02)*Y03
+ 720 CONTINUE
+ FE1= X24*VE0
+ DO 730 M=1,3
+ T01 = VEA( M)+VEA(3+M)
+ T02 = VEA(6+M)+VEA(9+M)
+ WES(3+M)=-T01+(T01+T02)*Z02
+ 730 CONTINUE
+ ENDIF
+ 800 CONTINUE
+ WES( M)= WES( M)+P34(M,3)*FE0
+ WES(3+M)= WES(3+M)-P1(M)*FE1
+ VES(6+M)= VES(6+M)+WES(3+M)
+ FCS(3,M)= FCS(3,M)-WES(3+M)*Y03+WES( M)
+ DO 925 M=1,3
+ T01= VES( M)
+ T02= VES(3+M)+VES(6+M)
+ T01=-T01+(T01+T02)*Y01+P12(M,3)*TMP
+ FCS(2,M)= FCS(2,M)-T01+VES(6+M)
+ 925 CONTINUE
+ END
diff --git a/gcc/tree-vect-data-refs.c b/gcc/tree-vect-data-refs.c
index bb086c6..be067c8 100644
--- a/gcc/tree-vect-data-refs.c
+++ b/gcc/tree-vect-data-refs.c
@@ -53,6 +53,7 @@ along with GCC; see the file COPYING3. If not see
#include "tree-hash-traits.h"
#include "vec-perm-indices.h"
#include "internal-fn.h"
+#include "gimple-fold.h"
/* Return true if load- or store-lanes optab OPTAB is implemented for
COUNT vectors of type VECTYPE. NAME is the name of OPTAB. */
@@ -5026,7 +5027,7 @@ bump_vector_ptr (vec_info *vinfo,
struct data_reference *dr = STMT_VINFO_DATA_REF (stmt_info);
tree vectype = STMT_VINFO_VECTYPE (stmt_info);
tree update = TYPE_SIZE_UNIT (vectype);
- gassign *incr_stmt;
+ gimple *incr_stmt;
ssa_op_iter iter;
use_operand_p use_p;
tree new_dataref_ptr;
@@ -5041,6 +5042,15 @@ bump_vector_ptr (vec_info *vinfo,
incr_stmt = gimple_build_assign (new_dataref_ptr, POINTER_PLUS_EXPR,
dataref_ptr, update);
vect_finish_stmt_generation (vinfo, stmt_info, incr_stmt, gsi);
+ /* Fold the increment, avoiding excessive chains use-def chains of
+ those, leading to compile-time issues for passes until the next
+ forwprop pass which would do this as well. */
+ gimple_stmt_iterator fold_gsi = gsi_for_stmt (incr_stmt);
+ if (fold_stmt (&fold_gsi, follow_all_ssa_edges))
+ {
+ incr_stmt = gsi_stmt (fold_gsi);
+ update_stmt (incr_stmt);
+ }
/* Copy the points-to information if it exists. */
if (DR_PTR_INFO (dr))
diff --git a/gcc/tree-vect-patterns.c b/gcc/tree-vect-patterns.c
index 177d44e..5972705 100644
--- a/gcc/tree-vect-patterns.c
+++ b/gcc/tree-vect-patterns.c
@@ -1292,6 +1292,117 @@ vect_recog_widen_minus_pattern (vec_info *vinfo, stmt_vec_info last_stmt_info,
"vect_recog_widen_minus_pattern");
}
+/* Function vect_recog_popcount_pattern
+
+ Try to find the following pattern:
+
+ UTYPE1 A;
+ TYPE1 B;
+ UTYPE2 temp_in;
+ TYPE3 temp_out;
+ temp_in = (TYPE2)A;
+
+ temp_out = __builtin_popcount{,l,ll} (temp_in);
+ B = (TYPE1) temp_out;
+
+ TYPE2 may or may not be equal to TYPE3.
+ i.e. TYPE2 is equal to TYPE3 for __builtin_popcount
+ i.e. TYPE2 is not equal to TYPE3 for __builtin_popcountll
+
+ Input:
+
+ * STMT_VINFO: The stmt from which the pattern search begins.
+ here it starts with B = (TYPE1) temp_out;
+
+ Output:
+
+ * TYPE_OUT: The vector type of the output of this pattern.
+
+ * Return value: A new stmt that will be used to replace the sequence of
+ stmts that constitute the pattern. In this case it will be:
+ B = .POPCOUNT (A);
+*/
+
+static gimple *
+vect_recog_popcount_pattern (vec_info *vinfo,
+ stmt_vec_info stmt_vinfo, tree *type_out)
+{
+ gassign *last_stmt = dyn_cast <gassign *> (stmt_vinfo->stmt);
+ gimple *popcount_stmt, *pattern_stmt;
+ tree rhs_oprnd, rhs_origin, lhs_oprnd, lhs_type, vec_type, new_var;
+ auto_vec<tree> vargs;
+
+ /* Find B = (TYPE1) temp_out. */
+ if (!last_stmt)
+ return NULL;
+ tree_code code = gimple_assign_rhs_code (last_stmt);
+ if (!CONVERT_EXPR_CODE_P (code))
+ return NULL;
+
+ lhs_oprnd = gimple_assign_lhs (last_stmt);
+ lhs_type = TREE_TYPE (lhs_oprnd);
+ if (!INTEGRAL_TYPE_P (lhs_type))
+ return NULL;
+
+ rhs_oprnd = gimple_assign_rhs1 (last_stmt);
+ if (TREE_CODE (rhs_oprnd) != SSA_NAME
+ || !has_single_use (rhs_oprnd))
+ return NULL;
+ popcount_stmt = SSA_NAME_DEF_STMT (rhs_oprnd);
+
+ /* Find temp_out = __builtin_popcount{,l,ll} (temp_in); */
+ if (!is_gimple_call (popcount_stmt))
+ return NULL;
+ switch (gimple_call_combined_fn (popcount_stmt))
+ {
+ CASE_CFN_POPCOUNT:
+ break;
+ default:
+ return NULL;
+ }
+
+ if (gimple_call_num_args (popcount_stmt) != 1)
+ return NULL;
+
+ rhs_oprnd = gimple_call_arg (popcount_stmt, 0);
+ vect_unpromoted_value unprom_diff;
+ rhs_origin = vect_look_through_possible_promotion (vinfo, rhs_oprnd,
+ &unprom_diff);
+
+ if (!rhs_origin)
+ return NULL;
+
+ /* Input and outout of .POPCOUNT should be same-precision integer.
+ Also A should be unsigned or same presion as temp_in,
+ otherwise there would be sign_extend from A to temp_in. */
+ if (TYPE_PRECISION (unprom_diff.type) != TYPE_PRECISION (lhs_type)
+ || (!TYPE_UNSIGNED (unprom_diff.type)
+ && (TYPE_PRECISION (unprom_diff.type)
+ != TYPE_PRECISION (TREE_TYPE (rhs_oprnd)))))
+ return NULL;
+ vargs.safe_push (unprom_diff.op);
+
+ vect_pattern_detected ("vec_regcog_popcount_pattern", popcount_stmt);
+ vec_type = get_vectype_for_scalar_type (vinfo, lhs_type);
+ /* Do it only the backend existed popcount<vector_mode>2. */
+ if (!direct_internal_fn_supported_p (IFN_POPCOUNT,
+ vec_type,
+ OPTIMIZE_FOR_SPEED))
+ return NULL;
+
+ /* Create B = .POPCOUNT (A). */
+ new_var = vect_recog_temp_ssa_var (lhs_type, NULL);
+ pattern_stmt = gimple_build_call_internal_vec (IFN_POPCOUNT, vargs);
+ gimple_call_set_lhs (pattern_stmt, new_var);
+ gimple_set_location (pattern_stmt, gimple_location (last_stmt));
+ *type_out = vec_type;
+
+ if (dump_enabled_p ())
+ dump_printf_loc (MSG_NOTE, vect_location,
+ "created pattern stmt: %G", pattern_stmt);
+ return pattern_stmt;
+}
+
/* Function vect_recog_pow_pattern
Try to find the following pattern:
@@ -5283,6 +5394,7 @@ static vect_recog_func vect_vect_recog_func_ptrs[] = {
{ vect_recog_sad_pattern, "sad" },
{ vect_recog_widen_sum_pattern, "widen_sum" },
{ vect_recog_pow_pattern, "pow" },
+ { vect_recog_popcount_pattern, "popcount" },
{ vect_recog_widen_shift_pattern, "widen_shift" },
{ vect_recog_rotate_pattern, "rotate" },
{ vect_recog_vector_vector_shift_pattern, "vector_vector_shift" },
diff --git a/gcc/tree-vect-slp.c b/gcc/tree-vect-slp.c
index f9c33c0..a32f86b 100644
--- a/gcc/tree-vect-slp.c
+++ b/gcc/tree-vect-slp.c
@@ -1591,6 +1591,14 @@ vect_build_slp_tree (vec_info *vinfo,
SLP_TREE_SCALAR_STMTS (res) = vNULL;
SLP_TREE_DEF_TYPE (res) = vect_uninitialized_def;
res->failed = XNEWVEC (bool, group_size);
+ if (flag_checking)
+ {
+ unsigned i;
+ for (i = 0; i < group_size; ++i)
+ if (!matches[i])
+ break;
+ gcc_assert (i < group_size);
+ }
memcpy (res->failed, matches, sizeof (bool) * group_size);
}
else
@@ -1898,10 +1906,14 @@ vect_build_slp_tree_2 (vec_info *vinfo, slp_tree node,
chains.quick_push (chain.copy ());
chain.truncate (0);
}
- if (chains.length () == group_size
- /* We cannot yet use SLP_TREE_CODE to communicate the operation. */
- && op_stmt_info)
+ if (chains.length () == group_size)
{
+ /* We cannot yet use SLP_TREE_CODE to communicate the operation. */
+ if (!op_stmt_info)
+ {
+ hard_fail = false;
+ goto out;
+ }
/* Now we have a set of chains with the same length. */
/* 1. pre-sort according to def_type and operation. */
for (unsigned lane = 0; lane < group_size; ++lane)
@@ -6272,14 +6284,15 @@ vect_get_slp_defs (vec_info *,
If ANALYZE_ONLY is TRUE, only check that it is possible to create valid
permute statements for the SLP node NODE. Store the number of vector
permute instructions in *N_PERMS and the number of vector load
- instructions in *N_LOADS. */
+ instructions in *N_LOADS. If DCE_CHAIN is true, remove all definitions
+ that were not needed. */
bool
vect_transform_slp_perm_load (vec_info *vinfo,
slp_tree node, vec<tree> dr_chain,
gimple_stmt_iterator *gsi, poly_uint64 vf,
bool analyze_only, unsigned *n_perms,
- unsigned int *n_loads)
+ unsigned int *n_loads, bool dce_chain)
{
stmt_vec_info stmt_info = SLP_TREE_SCALAR_STMTS (node)[0];
int vec_index = 0;
@@ -6358,6 +6371,7 @@ vect_transform_slp_perm_load (vec_info *vinfo,
}
auto_sbitmap used_in_lanes (in_nlanes);
bitmap_clear (used_in_lanes);
+ auto_bitmap used_defs;
unsigned int count = mask.encoded_nelts ();
mask.quick_grow (count);
@@ -6465,11 +6479,20 @@ vect_transform_slp_perm_load (vec_info *vinfo,
mask_vec);
vect_finish_stmt_generation (vinfo, stmt_info, perm_stmt,
gsi);
+ if (dce_chain)
+ {
+ bitmap_set_bit (used_defs, first_vec_index + ri);
+ bitmap_set_bit (used_defs, second_vec_index + ri);
+ }
}
else
- /* If mask was NULL_TREE generate the requested
- identity transform. */
- perm_stmt = SSA_NAME_DEF_STMT (first_vec);
+ {
+ /* If mask was NULL_TREE generate the requested
+ identity transform. */
+ perm_stmt = SSA_NAME_DEF_STMT (first_vec);
+ if (dce_chain)
+ bitmap_set_bit (used_defs, first_vec_index + ri);
+ }
/* Store the vector statement in NODE. */
SLP_TREE_VEC_STMTS (node)[vect_stmts_counter++] = perm_stmt;
@@ -6509,6 +6532,16 @@ vect_transform_slp_perm_load (vec_info *vinfo,
}
}
+ if (dce_chain)
+ for (unsigned i = 0; i < dr_chain.length (); ++i)
+ if (!bitmap_bit_p (used_defs, i))
+ {
+ gimple *stmt = SSA_NAME_DEF_STMT (dr_chain[i]);
+ gimple_stmt_iterator rgsi = gsi_for_stmt (stmt);
+ gsi_remove (&rgsi, true);
+ release_defs (stmt);
+ }
+
return true;
}
diff --git a/gcc/tree-vect-stmts.c b/gcc/tree-vect-stmts.c
index eeef96a..4ee11b2 100644
--- a/gcc/tree-vect-stmts.c
+++ b/gcc/tree-vect-stmts.c
@@ -9762,8 +9762,13 @@ vectorizable_load (vec_info *vinfo,
if (slp_perm)
{
unsigned n_perms;
+ /* For SLP we know we've seen all possible uses of dr_chain so
+ direct vect_transform_slp_perm_load to DCE the unused parts.
+ ??? This is a hack to prevent compile-time issues as seen
+ in PR101120 and friends. */
bool ok = vect_transform_slp_perm_load (vinfo, slp_node, dr_chain,
- gsi, vf, false, &n_perms);
+ gsi, vf, false, &n_perms,
+ nullptr, true);
gcc_assert (ok);
}
else
diff --git a/gcc/tree-vectorizer.h b/gcc/tree-vectorizer.h
index 04c20f8..5c71fbc 100644
--- a/gcc/tree-vectorizer.h
+++ b/gcc/tree-vectorizer.h
@@ -2012,7 +2012,7 @@ extern void vect_free_slp_instance (slp_instance);
extern bool vect_transform_slp_perm_load (vec_info *, slp_tree, vec<tree>,
gimple_stmt_iterator *, poly_uint64,
bool, unsigned *,
- unsigned * = nullptr);
+ unsigned * = nullptr, bool = false);
extern bool vect_slp_analyze_operations (vec_info *);
extern void vect_schedule_slp (vec_info *, vec<slp_instance>);
extern opt_result vect_analyze_slp (vec_info *, unsigned);
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog
index bab0964..f652c4d 100644
--- a/libstdc++-v3/ChangeLog
+++ b/libstdc++-v3/ChangeLog
@@ -1,3 +1,18 @@
+2021-06-21 Jonathan Wakely <jwakely@redhat.com>
+
+ * include/std/mutex (__try_to_lock): Move to __detail namespace.
+ (struct __try_lock_impl): Replace with ...
+ (__detail::__try_lock_impl<Idx>(tuple<Lockables...>&)): New
+ function templates to implement std::try_lock.
+ (try_lock): Use new __try_lock_impl.
+ (__detail::__lock_impl(int, int&, L0&, L1&...)): New function
+ template to implement std::lock.
+ (lock): Use __lock_impl.
+
+2021-06-21 Patrick Palka <ppalka@redhat.com>
+
+ * include/bits/ranges_cmp.h (__cpp_lib_ranges): Adjust value.
+
2021-06-20 Patrick Palka <ppalka@redhat.com>
* include/std/ranges (__non_propagating_cache::operator bool):
diff --git a/libstdc++-v3/include/bits/ranges_cmp.h b/libstdc++-v3/include/bits/ranges_cmp.h
index f859a33..1d7da30 100644
--- a/libstdc++-v3/include/bits/ranges_cmp.h
+++ b/libstdc++-v3/include/bits/ranges_cmp.h
@@ -57,7 +57,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
#ifdef __cpp_lib_concepts
// Define this here, included by all the headers that need to define it.
-#define __cpp_lib_ranges 201911L
+#define __cpp_lib_ranges 202106L
namespace ranges
{
diff --git a/libstdc++-v3/include/std/mutex b/libstdc++-v3/include/std/mutex
index d4c5d13..5f2d8f9 100644
--- a/libstdc++-v3/include/std/mutex
+++ b/libstdc++-v3/include/std/mutex
@@ -512,47 +512,44 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
#endif // _GLIBCXX_HAS_GTHREADS
/// @cond undocumented
- template<typename _Lock>
- inline unique_lock<_Lock>
- __try_to_lock(_Lock& __l)
- { return unique_lock<_Lock>{__l, try_to_lock}; }
+ namespace __detail
+ {
+ template<typename _Lockable>
+ inline unique_lock<_Lockable>
+ __try_to_lock(_Lockable& __l)
+ { return unique_lock<_Lockable>{__l, try_to_lock}; }
+
+ // Lock the last element of the tuple, after all previous ones are locked.
+ template<int _Idx, typename... _Lockables>
+ inline __enable_if_t<_Idx + 1 == sizeof...(_Lockables), int>
+ __try_lock_impl(tuple<_Lockables&...>& __lockables)
+ {
+ if (auto __lock = __detail::__try_to_lock(std::get<_Idx>(__lockables)))
+ {
+ __lock.release();
+ return -1;
+ }
+ else
+ return _Idx;
+ }
- template<int _Idx, bool _Continue = true>
- struct __try_lock_impl
- {
- template<typename... _Lock>
- static void
- __do_try_lock(tuple<_Lock&...>& __locks, int& __idx)
- {
- __idx = _Idx;
- auto __lock = std::__try_to_lock(std::get<_Idx>(__locks));
- if (__lock.owns_lock())
- {
- constexpr bool __cont = _Idx + 2 < sizeof...(_Lock);
- using __try_locker = __try_lock_impl<_Idx + 1, __cont>;
- __try_locker::__do_try_lock(__locks, __idx);
- if (__idx == -1)
- __lock.release();
- }
- }
- };
+ // Lock tuple elements starting from _Idx.
+ template<int _Idx, typename... _Lockables>
+ inline __enable_if_t<_Idx + 1 != sizeof...(_Lockables), int>
+ __try_lock_impl(tuple<_Lockables&...>& __lockables)
+ {
+ if (auto __lock = __detail::__try_to_lock(std::get<_Idx>(__lockables)))
+ {
+ int __idx = __detail::__try_lock_impl<_Idx + 1>(__lockables);
+ if (__idx == -1)
+ __lock.release();
+ return __idx;
+ }
+ else
+ return _Idx;
+ }
- template<int _Idx>
- struct __try_lock_impl<_Idx, false>
- {
- template<typename... _Lock>
- static void
- __do_try_lock(tuple<_Lock&...>& __locks, int& __idx)
- {
- __idx = _Idx;
- auto __lock = std::__try_to_lock(std::get<_Idx>(__locks));
- if (__lock.owns_lock())
- {
- __idx = -1;
- __lock.release();
- }
- }
- };
+ } // namespace __detail
/// @endcond
/** @brief Generic try_lock.
@@ -569,12 +566,52 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
int
try_lock(_Lock1& __l1, _Lock2& __l2, _Lock3&... __l3)
{
- int __idx;
- auto __locks = std::tie(__l1, __l2, __l3...);
- __try_lock_impl<0>::__do_try_lock(__locks, __idx);
- return __idx;
+ auto __lockables = std::tie(__l1, __l2, __l3...);
+ return __detail::__try_lock_impl<0>(__lockables);
}
+ /// @cond undocumented
+ namespace __detail
+ {
+ // This function can recurse up to N levels deep, for N = 1+sizeof...(L1).
+ // On each recursion the lockables are rotated left one position,
+ // e.g. depth 0: l0, l1, l2; depth 1: l1, l2, l0; depth 2: l2, l0, l1.
+ // When a call to l_i.try_lock() fails it recurses/returns to depth=i
+ // so that l_i is the first argument, and then blocks until l_i is locked.
+ template<typename _L0, typename... _L1>
+ void
+ __lock_impl(int& __i, int __depth, _L0& __l0, _L1&... __l1)
+ {
+ while (__i >= __depth)
+ {
+ if (__i == __depth)
+ {
+ int __failed = 1; // index that couldn't be locked
+ {
+ unique_lock<_L0> __first(__l0);
+ auto __rest = std::tie(__l1...);
+ __failed += __detail::__try_lock_impl<0>(__rest);
+ if (!__failed)
+ {
+ __i = -1; // finished
+ __first.release();
+ return;
+ }
+ }
+#ifdef _GLIBCXX_USE_SCHED_YIELD
+ __gthread_yield();
+#endif
+ constexpr auto __n = 1 + sizeof...(_L1);
+ __i = (__depth + __failed) % __n;
+ }
+ else // rotate left until l_i is first.
+ __detail::__lock_impl(__i, __depth + 1, __l1..., __l0);
+ }
+ }
+
+ } // namespace __detail
+ /// @endcond
+
/** @brief Generic lock.
* @param __l1 Meets Lockable requirements (try_lock() may throw).
* @param __l2 Meets Lockable requirements (try_lock() may throw).
@@ -590,19 +627,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
void
lock(_L1& __l1, _L2& __l2, _L3&... __l3)
{
- while (true)
- {
- using __try_locker = __try_lock_impl<0, sizeof...(_L3) != 0>;
- unique_lock<_L1> __first(__l1);
- int __idx;
- auto __locks = std::tie(__l2, __l3...);
- __try_locker::__do_try_lock(__locks, __idx);
- if (__idx == -1)
- {
- __first.release();
- return;
- }
- }
+ int __i = 0;
+ __detail::__lock_impl(__i, 0, __l1, __l2, __l3...);
}
#if __cplusplus >= 201703L