aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason Merrill <jason@redhat.com>2015-11-14 00:11:34 +0000
committerJason Merrill <jason@redhat.com>2015-11-14 00:11:34 +0000
commit1da6b773e737548a7ffbfc950774460433ef9bb8 (patch)
treee5f2d64459601fae812cfe90245af2831eebedb1
parent4587dbe905c7599512c23af5b55591a06bf829b9 (diff)
parentd77055b11cf7e121d66f2da7dfbc5f63347c7d7f (diff)
Merge trunk@230365.c++-delayed-folding
git-svn-id: https://gcc.gnu.org/svn/gcc/branches/c++-delayed-folding@230367 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--ChangeLog5
-rwxr-xr-xconfigure4
-rw-r--r--configure.ac4
-rw-r--r--contrib/ChangeLog5
-rw-r--r--contrib/header-tools/ChangeLog12
-rw-r--r--contrib/header-tools/README283
-rwxr-xr-xcontrib/header-tools/count-headers58
-rwxr-xr-xcontrib/header-tools/gcc-order-headers397
-rwxr-xr-xcontrib/header-tools/graph-header-logs227
-rwxr-xr-xcontrib/header-tools/graph-include-web122
-rwxr-xr-xcontrib/header-tools/headerutils.py554
-rwxr-xr-xcontrib/header-tools/included-by112
-rwxr-xr-xcontrib/header-tools/reduce-headers596
-rwxr-xr-xcontrib/header-tools/replace-header53
-rwxr-xr-xcontrib/header-tools/show-headers151
-rw-r--r--gcc/ChangeLog1038
-rw-r--r--gcc/DATESTAMP2
-rw-r--r--gcc/Makefile.in6
-rw-r--r--gcc/ada/ChangeLog633
-rw-r--r--gcc/ada/adaint.c3
-rw-r--r--gcc/ada/atree.adb9
-rw-r--r--gcc/ada/atree.ads2
-rw-r--r--gcc/ada/back_end.adb18
-rw-r--r--gcc/ada/bcheck.adb28
-rw-r--r--gcc/ada/bindgen.adb12
-rw-r--r--gcc/ada/checks.adb28
-rw-r--r--gcc/ada/checks.ads2
-rw-r--r--gcc/ada/contracts.adb56
-rw-r--r--gcc/ada/debug.ads4
-rw-r--r--gcc/ada/doc/gnat_rm/compatibility_and_porting_guide.rst4
-rw-r--r--gcc/ada/doc/gnat_rm/implementation_defined_pragmas.rst54
-rw-r--r--gcc/ada/doc/gnat_rm/representation_clauses_and_pragmas.rst33
-rw-r--r--gcc/ada/doc/gnat_rm/standard_and_implementation_defined_restrictions.rst65
-rw-r--r--gcc/ada/doc/gnat_ugn/building_executable_programs_with_gnat.rst78
-rw-r--r--gcc/ada/doc/gnat_ugn/gnat_and_program_execution.rst30
-rw-r--r--gcc/ada/doc/gnat_ugn/gnat_project_manager.rst22
-rw-r--r--gcc/ada/doc/gnat_ugn/gnat_utility_programs.rst210
-rw-r--r--gcc/ada/doc/gnat_ugn/platform_specific_information.rst307
-rw-r--r--gcc/ada/doc/gnat_ugn/the_gnat_compilation_model.rst4
-rw-r--r--gcc/ada/einfo.adb34
-rw-r--r--gcc/ada/einfo.ads26
-rw-r--r--gcc/ada/exp_aggr.adb3
-rw-r--r--gcc/ada/exp_attr.adb103
-rw-r--r--gcc/ada/exp_ch11.adb2
-rw-r--r--gcc/ada/exp_ch5.adb2
-rw-r--r--gcc/ada/exp_ch6.adb31
-rw-r--r--gcc/ada/exp_ch9.adb757
-rw-r--r--gcc/ada/exp_fixd.adb36
-rw-r--r--gcc/ada/exp_intr.adb44
-rw-r--r--gcc/ada/exp_util.adb47
-rw-r--r--gcc/ada/exp_util.ads2
-rw-r--r--gcc/ada/fmap.adb2
-rw-r--r--gcc/ada/freeze.adb88
-rw-r--r--gcc/ada/g-debpoo.adb144
-rw-r--r--gcc/ada/g-io-put.adb6
-rw-r--r--gcc/ada/gcc-interface/Makefile.in1
-rw-r--r--gcc/ada/gcc-interface/decl.c68
-rw-r--r--gcc/ada/gcc-interface/gigi.h5
-rw-r--r--gcc/ada/gcc-interface/misc.c5
-rw-r--r--gcc/ada/gcc-interface/targtyps.c13
-rw-r--r--gcc/ada/gcc-interface/trans.c47
-rw-r--r--gcc/ada/gcc-interface/utils.c12
-rw-r--r--gcc/ada/gnat1drv.adb17
-rw-r--r--gcc/ada/gnat_rm.texi1422
-rw-r--r--gcc/ada/gnat_ugn.texi686
-rw-r--r--gcc/ada/impunit.adb120
-rw-r--r--gcc/ada/impunit.ads7
-rw-r--r--gcc/ada/init.c147
-rw-r--r--gcc/ada/inline.adb2
-rw-r--r--gcc/ada/lib-xref-spark_specific.adb8
-rw-r--r--gcc/ada/lib-xref.ads2
-rw-r--r--gcc/ada/opt.ads20
-rw-r--r--gcc/ada/osint-c.adb5
-rw-r--r--gcc/ada/output.adb11
-rw-r--r--gcc/ada/output.ads14
-rw-r--r--gcc/ada/par-ch6.adb2
-rw-r--r--gcc/ada/restrict.ads3
-rw-r--r--gcc/ada/rtsfind.ads2
-rw-r--r--gcc/ada/s-gloloc.adb4
-rw-r--r--gcc/ada/s-os_lib.adb6
-rw-r--r--gcc/ada/s-os_lib.ads6
-rw-r--r--gcc/ada/s-osinte-vxworks.ads1
-rw-r--r--gcc/ada/s-rident.ads48
-rw-r--r--gcc/ada/s-stalib.ads6
-rw-r--r--gcc/ada/s-stchop-vxworks.adb33
-rw-r--r--gcc/ada/s-taprop-vxworks.adb8
-rw-r--r--gcc/ada/scos.ads5
-rw-r--r--gcc/ada/sem_attr.adb6
-rw-r--r--gcc/ada/sem_attr.ads3
-rw-r--r--gcc/ada/sem_ch10.adb5
-rw-r--r--gcc/ada/sem_ch12.adb5
-rw-r--r--gcc/ada/sem_ch13.adb202
-rw-r--r--gcc/ada/sem_ch3.adb27
-rw-r--r--gcc/ada/sem_ch4.adb113
-rw-r--r--gcc/ada/sem_ch5.adb13
-rw-r--r--gcc/ada/sem_ch6.adb278
-rw-r--r--gcc/ada/sem_ch8.adb21
-rw-r--r--gcc/ada/sem_dim.adb86
-rw-r--r--gcc/ada/sem_dim.ads4
-rw-r--r--gcc/ada/sem_elab.adb31
-rw-r--r--gcc/ada/sem_prag.adb144
-rw-r--r--gcc/ada/sem_res.adb8
-rw-r--r--gcc/ada/sem_util.adb110
-rw-r--r--gcc/ada/sem_util.ads6
-rw-r--r--gcc/ada/sem_warn.adb6
-rw-r--r--gcc/ada/sigtramp-armdroid.c6
-rw-r--r--gcc/ada/sigtramp-ios.c233
-rw-r--r--gcc/ada/sigtramp.h57
-rw-r--r--gcc/ada/sinfo.adb16
-rw-r--r--gcc/ada/sinfo.ads19
-rw-r--r--gcc/ada/sinput.ads2
-rw-r--r--gcc/ada/snames.ads-tmpl1
-rw-r--r--gcc/ada/switch-c.adb15
-rw-r--r--gcc/ada/targparm.adb11
-rw-r--r--gcc/ada/tracebak.c2
-rw-r--r--gcc/ada/types.ads7
-rw-r--r--gcc/ada/usage.adb5
-rw-r--r--gcc/c-family/ChangeLog54
-rw-r--r--gcc/c-family/array-notation-common.c2
-rw-r--r--gcc/c-family/c-ada-spec.c3
-rw-r--r--gcc/c-family/c-cilkplus.c3
-rw-r--r--gcc/c-family/c-common.c35
-rw-r--r--gcc/c-family/c-common.h1
-rw-r--r--gcc/c-family/c-cppbuiltin.c3
-rw-r--r--gcc/c-family/c-dump.c3
-rw-r--r--gcc/c-family/c-format.c3
-rw-r--r--gcc/c-family/c-gimplify.c9
-rw-r--r--gcc/c-family/c-indentation.c4
-rw-r--r--gcc/c-family/c-lex.c4
-rw-r--r--gcc/c-family/c-omp.c5
-rw-r--r--gcc/c-family/c-opts.c4
-rw-r--r--gcc/c-family/c-pch.c5
-rw-r--r--gcc/c-family/c-ppoutput.c4
-rw-r--r--gcc/c-family/c-pragma.c11
-rw-r--r--gcc/c-family/c-pragma.h5
-rw-r--r--gcc/c-family/c-pretty-print.c4
-rw-r--r--gcc/c-family/c-semantics.c7
-rw-r--r--gcc/c-family/c-ubsan.c8
-rw-r--r--gcc/c-family/cilk.c3
-rw-r--r--gcc/c-family/stub-objc.c2
-rw-r--r--gcc/c/ChangeLog88
-rw-r--r--gcc/c/c-array-notation.c3
-rw-r--r--gcc/c/c-aux-info.c3
-rw-r--r--gcc/c/c-convert.c3
-rw-r--r--gcc/c/c-decl.c31
-rw-r--r--gcc/c/c-errors.c8
-rw-r--r--gcc/c/c-lang.c5
-rw-r--r--gcc/c/c-objc-common.c2
-rw-r--r--gcc/c/c-parser.c287
-rw-r--r--gcc/c/c-tree.h19
-rw-r--r--gcc/c/c-typeck.c87
-rw-r--r--gcc/c/gccspec.c1
-rw-r--r--gcc/combine.c27
-rw-r--r--gcc/common.opt4
-rw-r--r--gcc/common/config/arc/arc-common.c34
-rw-r--r--gcc/config.gcc4
-rw-r--r--gcc/config/aarch64/aarch64-cores.def1
-rw-r--r--gcc/config/aarch64/aarch64-protos.h4
-rw-r--r--gcc/config/aarch64/aarch64-tune.md2
-rw-r--r--gcc/config/aarch64/aarch64.c36
-rw-r--r--gcc/config/alpha/alpha-protos.h3
-rw-r--r--gcc/config/alpha/alpha.c113
-rw-r--r--gcc/config/alpha/alpha.h74
-rw-r--r--gcc/config/arc/arc-opts.h4
-rw-r--r--gcc/config/arc/arc-protos.h1
-rw-r--r--gcc/config/arc/arc.c366
-rw-r--r--gcc/config/arc/arc.h46
-rw-r--r--gcc/config/arc/arc.md552
-rw-r--r--gcc/config/arc/arc.opt33
-rw-r--r--gcc/config/arc/arcEM.md93
-rw-r--r--gcc/config/arc/arcHS.md76
-rw-r--r--gcc/config/arc/constraints.md24
-rw-r--r--gcc/config/arc/predicates.md6
-rw-r--r--gcc/config/arc/t-arc-newlib17
-rw-r--r--gcc/config/arm/arm-builtins.c52
-rw-r--r--gcc/config/arm/arm-cores.def1
-rw-r--r--gcc/config/arm/arm-tables.opt3
-rw-r--r--gcc/config/arm/arm-tune.md4
-rw-r--r--gcc/config/arm/arm.c43
-rw-r--r--gcc/config/arm/arm.h6
-rw-r--r--gcc/config/arm/arm.md4
-rw-r--r--gcc/config/arm/arm.opt2
-rw-r--r--gcc/config/arm/bpabi.h2
-rw-r--r--gcc/config/arm/neon.md136
-rw-r--r--gcc/config/ft32/ft32.c2
-rw-r--r--gcc/config/ft32/ft32.md8
-rw-r--r--gcc/config/i386/i386.c27
-rw-r--r--gcc/config/i386/predicates.md5
-rw-r--r--gcc/config/mips/mips.c117
-rw-r--r--gcc/config/moxie/moxie.c4
-rw-r--r--gcc/config/nvptx/nvptx.c118
-rw-r--r--gcc/config/nvptx/nvptx.opt4
-rw-r--r--gcc/config/rs6000/aix.h18
-rw-r--r--gcc/config/rs6000/constraints.md9
-rw-r--r--gcc/config/rs6000/rs6000-protos.h2
-rw-r--r--gcc/config/rs6000/rs6000.c260
-rw-r--r--gcc/config/rs6000/rs6000.h8
-rw-r--r--gcc/config/rs6000/rs6000.md411
-rw-r--r--gcc/config/rs6000/vsx.md28
-rw-r--r--gcc/config/visium/visium-protos.h3
-rwxr-xr-xgcc/configure4
-rw-r--r--gcc/configure.ac4
-rw-r--r--gcc/cp/ChangeLog151
-rw-r--r--gcc/cp/call.c2
-rw-r--r--gcc/cp/class.c2
-rw-r--r--gcc/cp/constexpr.c5
-rw-r--r--gcc/cp/cp-array-notation.c2
-rw-r--r--gcc/cp/cp-cilkplus.c1
-rw-r--r--gcc/cp/cp-gimplify.c7
-rw-r--r--gcc/cp/cp-lang.c5
-rw-r--r--gcc/cp/cp-objcp-common.c7
-rw-r--r--gcc/cp/cp-ubsan.c14
-rw-r--r--gcc/cp/cvt.c3
-rw-r--r--gcc/cp/cxx-pretty-print.c2
-rw-r--r--gcc/cp/decl.c39
-rw-r--r--gcc/cp/decl2.c4
-rw-r--r--gcc/cp/dump.c3
-rw-r--r--gcc/cp/error.c6
-rw-r--r--gcc/cp/except.c5
-rw-r--r--gcc/cp/expr.c5
-rw-r--r--gcc/cp/friend.c4
-rw-r--r--gcc/cp/g++spec.c1
-rw-r--r--gcc/cp/init.c3
-rw-r--r--gcc/cp/lambda.c5
-rw-r--r--gcc/cp/lex.c6
-rw-r--r--gcc/cp/mangle.c4
-rw-r--r--gcc/cp/method.c4
-rw-r--r--gcc/cp/name-lookup.c5
-rw-r--r--gcc/cp/optimize.c6
-rw-r--r--gcc/cp/parser.c177
-rw-r--r--gcc/cp/parser.h2
-rw-r--r--gcc/cp/pt.c37
-rw-r--r--gcc/cp/ptree.c3
-rw-r--r--gcc/cp/repo.c4
-rw-r--r--gcc/cp/rtti.c4
-rw-r--r--gcc/cp/search.c4
-rw-r--r--gcc/cp/semantics.c7
-rw-r--r--gcc/cp/tree.c5
-rw-r--r--gcc/cp/typeck.c3
-rw-r--r--gcc/cp/typeck2.c4
-rw-r--r--gcc/cp/vtable-class-hierarchy.c1
-rw-r--r--gcc/cprop.c44
-rw-r--r--gcc/diagnostic.c34
-rw-r--r--gcc/doc/invoke.texi99
-rw-r--r--gcc/doc/md.texi65
-rw-r--r--gcc/doc/tm.texi5
-rw-r--r--gcc/doc/tm.texi.in5
-rw-r--r--gcc/expr.c3
-rw-r--r--gcc/fold-const.c103
-rw-r--r--gcc/fortran/ChangeLog54
-rw-r--r--gcc/fortran/array.c1
-rw-r--r--gcc/fortran/convert.c2
-rw-r--r--gcc/fortran/cpp.c5
-rw-r--r--gcc/fortran/decl.c22
-rw-r--r--gcc/fortran/error.c14
-rw-r--r--gcc/fortran/f95-lang.c6
-rw-r--r--gcc/fortran/frontend-passes.c2
-rw-r--r--gcc/fortran/io.c9
-rw-r--r--gcc/fortran/iresolve.c2
-rw-r--r--gcc/fortran/match.c13
-rw-r--r--gcc/fortran/module.c1
-rw-r--r--gcc/fortran/openmp.c2
-rw-r--r--gcc/fortran/options.c5
-rw-r--r--gcc/fortran/parse.c1
-rw-r--r--gcc/fortran/target-memory.c1
-rw-r--r--gcc/fortran/trans-array.c4
-rw-r--r--gcc/fortran/trans-common.c1
-rw-r--r--gcc/fortran/trans-const.c2
-rw-r--r--gcc/fortran/trans-decl.c3
-rw-r--r--gcc/fortran/trans-expr.c2
-rw-r--r--gcc/fortran/trans-intrinsic.c5
-rw-r--r--gcc/fortran/trans-io.c3
-rw-r--r--gcc/fortran/trans-openmp.c2
-rw-r--r--gcc/fortran/trans-stmt.c3
-rw-r--r--gcc/fortran/trans-types.c3
-rw-r--r--gcc/fortran/trans.c3
-rw-r--r--gcc/gcc-rich-location.c86
-rw-r--r--gcc/gcc-rich-location.h47
-rw-r--r--gcc/gcc.c61
-rw-r--r--gcc/gcse.c22
-rw-r--r--gcc/gcse.h1
-rw-r--r--gcc/gen-pass-instances.awk61
-rw-r--r--gcc/genmatch.c8
-rw-r--r--gcc/gimple-pretty-print.c3
-rw-r--r--gcc/gimple-ssa-split-paths.c270
-rw-r--r--gcc/gimple-ssa-strength-reduction.c3
-rw-r--r--gcc/gimple.h8
-rw-r--r--gcc/gimplify.c382
-rw-r--r--gcc/go/ChangeLog7
-rw-r--r--gcc/go/go-backend.c2
-rw-r--r--gcc/go/go-gcc.cc6
-rw-r--r--gcc/go/go-lang.c5
-rw-r--r--gcc/go/gofrontend/MERGE2
-rw-r--r--gcc/go/gospec.c1
-rw-r--r--gcc/graphite-isl-ast-to-gimple.c151
-rw-r--r--gcc/graphite-poly.c27
-rw-r--r--gcc/graphite-poly.h35
-rw-r--r--gcc/graphite-scop-detection.c178
-rw-r--r--gcc/graphite-sese-to-poly.c826
-rw-r--r--gcc/graphite.c14
-rw-r--r--gcc/input.c28
-rw-r--r--gcc/ipa-icf.c50
-rw-r--r--gcc/ipa-icf.h9
-rw-r--r--gcc/ira.c9
-rw-r--r--gcc/java/ChangeLog23
-rw-r--r--gcc/java/boehm.c2
-rw-r--r--gcc/java/builtins.c11
-rw-r--r--gcc/java/class.c4
-rw-r--r--gcc/java/constants.c2
-rw-r--r--gcc/java/decl.c3
-rw-r--r--gcc/java/except.c4
-rw-r--r--gcc/java/expr.c4
-rw-r--r--gcc/java/java-gimplify.c6
-rw-r--r--gcc/java/jcf-dump.c2
-rw-r--r--gcc/java/jcf-io.c4
-rw-r--r--gcc/java/jcf-parse.c5
-rw-r--r--gcc/java/jvgenmain.c4
-rw-r--r--gcc/java/lang.c4
-rw-r--r--gcc/java/mangle.c4
-rw-r--r--gcc/java/mangle_name.c4
-rw-r--r--gcc/java/resource.c6
-rw-r--r--gcc/java/typeck.c4
-rw-r--r--gcc/java/verify-glue.c2
-rw-r--r--gcc/java/verify-impl.c3
-rw-r--r--gcc/java/zextract.c1
-rw-r--r--gcc/jit/ChangeLog9
-rw-r--r--gcc/jit/dummy-frontend.c10
-rw-r--r--gcc/jit/jit-builtins.c2
-rw-r--r--gcc/jit/jit-playback.c7
-rw-r--r--gcc/jit/jit-recording.c3
-rw-r--r--gcc/jit/jit-spec.c3
-rw-r--r--gcc/jit/libgccjit.c3
-rw-r--r--gcc/lra-lives.c4
-rw-r--r--gcc/lto-wrapper.c2
-rw-r--r--gcc/lto/ChangeLog8
-rw-r--r--gcc/lto/lto-lang.c7
-rw-r--r--gcc/lto/lto-object.c10
-rw-r--r--gcc/lto/lto-partition.c7
-rw-r--r--gcc/lto/lto-symtab.c10
-rw-r--r--gcc/lto/lto.c8
-rw-r--r--gcc/match.pd31
-rw-r--r--gcc/objc/ChangeLog11
-rw-r--r--gcc/objc/objc-act.c11
-rw-r--r--gcc/objc/objc-encoding.c4
-rw-r--r--gcc/objc/objc-gnu-runtime-abi-01.c3
-rw-r--r--gcc/objc/objc-lang.c4
-rw-r--r--gcc/objc/objc-map.c2
-rw-r--r--gcc/objc/objc-next-runtime-abi-01.c4
-rw-r--r--gcc/objc/objc-next-runtime-abi-02.c5
-rw-r--r--gcc/objc/objc-runtime-shared-support.c4
-rw-r--r--gcc/objcp/ChangeLog9
-rw-r--r--gcc/objcp/objcp-decl.c4
-rw-r--r--gcc/objcp/objcp-lang.c3
-rw-r--r--gcc/omp-builtins.def2
-rw-r--r--gcc/omp-low.c183
-rw-r--r--gcc/opts.c17
-rw-r--r--gcc/opts.h1
-rw-r--r--gcc/params.def2
-rw-r--r--gcc/passes.c19
-rw-r--r--gcc/passes.def1
-rw-r--r--gcc/print-tree.c21
-rw-r--r--gcc/regrename.c7
-rw-r--r--gcc/rtl-error.c2
-rw-r--r--gcc/sese.c1543
-rw-r--r--gcc/sese.h60
-rw-r--r--gcc/simplify-rtx.c28
-rw-r--r--gcc/spellcheck-tree.c39
-rw-r--r--gcc/spellcheck.c121
-rw-r--r--gcc/spellcheck.h36
-rw-r--r--gcc/testsuite/ChangeLog4230
-rw-r--r--gcc/testsuite/c-c++-common/goacc/data-default-1.c37
-rw-r--r--gcc/testsuite/c-c++-common/goacc/declare-1.c83
-rw-r--r--gcc/testsuite/c-c++-common/goacc/declare-2.c79
-rw-r--r--gcc/testsuite/c-c++-common/goacc/loop-auto-1.c230
-rw-r--r--gcc/testsuite/c-c++-common/pr68107.c37
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/Wattributes1.C2
-rw-r--r--gcc/testsuite/g++.dg/ext/mv16.C18
-rw-r--r--gcc/testsuite/g++.dg/init/new38.C4
-rw-r--r--gcc/testsuite/g++.dg/init/new44.C238
-rw-r--r--gcc/testsuite/g++.dg/template/explicit-instantiation4.C7
-rw-r--r--gcc/testsuite/g++.dg/vect/simd-bool-comparison-1.cc21
-rw-r--r--gcc/testsuite/g++.dg/vect/simd-bool-comparison-2.cc20
-rw-r--r--gcc/testsuite/g++.dg/vect/simd-mask-store-bool.cc18
-rw-r--r--gcc/testsuite/gcc.dg/diagnostic-token-ranges.c120
-rw-r--r--gcc/testsuite/gcc.dg/diagnostic-tree-expr-ranges-2.c23
-rw-r--r--gcc/testsuite/gcc.dg/goacc/nvptx-merged-loop.c30
-rw-r--r--gcc/testsuite/gcc.dg/graphite/fuse-1.c10
-rw-r--r--gcc/testsuite/gcc.dg/graphite/fuse-2.c4
-rw-r--r--gcc/testsuite/gcc.dg/graphite/graphite.exp2
-rw-r--r--gcc/testsuite/gcc.dg/graphite/isl-ast-gen-blocks-1.c3
-rw-r--r--gcc/testsuite/gcc.dg/graphite/isl-ast-gen-blocks-2.c3
-rw-r--r--gcc/testsuite/gcc.dg/graphite/isl-ast-gen-blocks-3.c3
-rw-r--r--gcc/testsuite/gcc.dg/graphite/isl-ast-gen-blocks-4.c3
-rw-r--r--gcc/testsuite/gcc.dg/graphite/isl-ast-gen-if-1.c3
-rw-r--r--gcc/testsuite/gcc.dg/graphite/isl-ast-gen-if-2.c3
-rw-r--r--gcc/testsuite/gcc.dg/graphite/isl-ast-gen-single-loop-1.c3
-rw-r--r--gcc/testsuite/gcc.dg/graphite/isl-ast-gen-single-loop-2.c2
-rw-r--r--gcc/testsuite/gcc.dg/graphite/isl-ast-gen-single-loop-3.c2
-rw-r--r--gcc/testsuite/gcc.dg/graphite/isl-ast-gen-user-1.c12
-rw-r--r--gcc/testsuite/gcc.dg/graphite/isl-codegen-loop-dumping.c17
-rw-r--r--gcc/testsuite/gcc.dg/plugin/diagnostic-test-expressions-1.c422
-rw-r--r--gcc/testsuite/gcc.dg/plugin/diagnostic-test-show-trees-1.c65
-rw-r--r--gcc/testsuite/gcc.dg/plugin/diagnostic_plugin_show_trees.c174
-rw-r--r--gcc/testsuite/gcc.dg/plugin/diagnostic_plugin_test_show_locus.c24
-rw-r--r--gcc/testsuite/gcc.dg/plugin/diagnostic_plugin_test_tree_expression_range.c98
-rw-r--r--gcc/testsuite/gcc.dg/plugin/levenshtein-test-1.c9
-rw-r--r--gcc/testsuite/gcc.dg/plugin/levenshtein_plugin.c64
-rw-r--r--gcc/testsuite/gcc.dg/plugin/plugin.exp5
-rw-r--r--gcc/testsuite/gcc.dg/pr65521.c1
-rw-r--r--gcc/testsuite/gcc.dg/pr67784-1.c54
-rw-r--r--gcc/testsuite/gcc.dg/pr67784-2.c54
-rw-r--r--gcc/testsuite/gcc.dg/pr68286.c17
-rw-r--r--gcc/testsuite/gcc.dg/pr68306-2.c12
-rw-r--r--gcc/testsuite/gcc.dg/pr68306-3.c21
-rw-r--r--gcc/testsuite/gcc.dg/pr68306.c11
-rw-r--r--gcc/testsuite/gcc.dg/pr68320.c67
-rw-r--r--gcc/testsuite/gcc.dg/spellcheck-fields.c63
-rw-r--r--gcc/testsuite/gcc.dg/spellcheck-options-1.c4
-rw-r--r--gcc/testsuite/gcc.dg/spellcheck-options-2.c5
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr68264.c104
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/pr68234.c24
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/split-path-1.c67
-rw-r--r--gcc/testsuite/gcc.dg/vect/bb-slp-7.c10
-rw-r--r--gcc/testsuite/gcc.dg/vect/bb-slp-subgroups-1.c44
-rw-r--r--gcc/testsuite/gcc.dg/vect/bb-slp-subgroups-2.c41
-rw-r--r--gcc/testsuite/gcc.dg/vect/bb-slp-subgroups-3.c41
-rw-r--r--gcc/testsuite/gcc.dg/vect/pr65947-1.c7
-rw-r--r--gcc/testsuite/gcc.dg/vect/pr65947-10.c1
-rw-r--r--gcc/testsuite/gcc.dg/vect/pr65947-12.c41
-rw-r--r--gcc/testsuite/gcc.dg/vect/pr65947-13.c41
-rw-r--r--gcc/testsuite/gcc.dg/vect/pr65947-2.c1
-rw-r--r--gcc/testsuite/gcc.dg/vect/pr65947-3.c1
-rw-r--r--gcc/testsuite/gcc.dg/vect/pr65947-4.c1
-rw-r--r--gcc/testsuite/gcc.dg/vect/pr65947-5.c1
-rw-r--r--gcc/testsuite/gcc.dg/vect/pr65947-6.c1
-rw-r--r--gcc/testsuite/gcc.dg/vect/pr68305.c13
-rw-r--r--gcc/testsuite/gcc.target/aarch64/umaddl_combine_1.c29
-rw-r--r--gcc/testsuite/gcc.target/arm/mmx-1.c2
-rw-r--r--gcc/testsuite/gcc.target/i386/pr67265-2.c9
-rw-r--r--gcc/testsuite/gcc.target/i386/pr67265.c12
-rw-r--r--gcc/testsuite/gcc.target/i386/sse-1.c6
-rw-r--r--gcc/testsuite/gcc.target/mips/split-ds-sequence.c19
-rw-r--r--gcc/testsuite/gcc.target/powerpc/20050603-3.c12
-rw-r--r--gcc/testsuite/gcc.target/powerpc/direct-move-vector.c33
-rw-r--r--gcc/testsuite/gcc.target/powerpc/float128-hw.c18
-rw-r--r--gcc/testsuite/gcc.target/powerpc/maddld.c20
-rw-r--r--gcc/testsuite/gcc.target/powerpc/pr67789.c1
-rw-r--r--gcc/testsuite/gfortran.dg/goacc/combined_loop.f902
-rw-r--r--gcc/testsuite/gfortran.dg/goacc/private-3.f952
-rw-r--r--gcc/testsuite/gfortran.dg/module_private_2.f9034
-rw-r--r--gcc/testsuite/gfortran.dg/pr68318_1.f9018
-rw-r--r--gcc/testsuite/gfortran.dg/pr68318_2.f9022
-rw-r--r--gcc/testsuite/gfortran.dg/pr68319.f9026
-rw-r--r--gcc/testsuite/lib/target-supports.exp8
-rw-r--r--gcc/timevar.def1
-rw-r--r--gcc/toplev.c1
-rw-r--r--gcc/tracer.c33
-rw-r--r--gcc/tracer.h26
-rw-r--r--gcc/tree-call-cdce.c43
-rw-r--r--gcc/tree-cfg.c9
-rw-r--r--gcc/tree-inline.c5
-rw-r--r--gcc/tree-parloops.c49
-rw-r--r--gcc/tree-pass.h1
-rw-r--r--gcc/tree-pretty-print.c6
-rw-r--r--gcc/tree-sra.c4
-rw-r--r--gcc/tree-vect-data-refs.c330
-rw-r--r--gcc/tree-vect-generic.c12
-rw-r--r--gcc/tree-vect-loop.c178
-rw-r--r--gcc/tree-vect-slp.c308
-rw-r--r--gcc/tree-vect-stmts.c30
-rw-r--r--gcc/tree-vectorizer.c8
-rw-r--r--gcc/tree-vectorizer.h10
-rw-r--r--gcc/tree-vrp.c39
-rw-r--r--gcc/tree.c60
-rw-r--r--gcc/tree.h33
-rw-r--r--gcc/var-tracking.c2
-rw-r--r--include/ChangeLog6
-rw-r--r--include/gomp-constants.h5
-rw-r--r--libcpp/ChangeLog82
-rw-r--r--libcpp/errors.c4
-rw-r--r--libcpp/include/cpplib.h3
-rw-r--r--libcpp/include/line-map.h219
-rw-r--r--libcpp/lex.c13
-rw-r--r--libcpp/line-map.c274
-rw-r--r--libcpp/location-example.txt188
-rw-r--r--libgcc/ChangeLog16
-rw-r--r--libgcc/config/arc/dp-hack.h2
-rw-r--r--libgcc/config/arc/gmon/dcache_linesz.S2
-rw-r--r--libgcc/config/arc/gmon/profil.S11
-rw-r--r--libgcc/config/arc/ieee-754/arc-ieee-754.h7
-rw-r--r--libgcc/config/arc/ieee-754/divdf3.S37
-rw-r--r--libgcc/config/arc/ieee-754/divsf3-stdmul.S14
-rw-r--r--libgcc/config/arc/ieee-754/muldf3.S8
-rw-r--r--libgcc/config/arc/ieee-754/mulsf3.S6
-rw-r--r--libgcc/config/arc/lib1funcs.S15
-rw-r--r--libgcc/config/arc/t-arc700-uClibc4
-rwxr-xr-xlibgo/configure40
-rw-r--r--libgo/configure.ac3
-rwxr-xr-xlibgo/mksysinfo.sh20
-rw-r--r--libgomp/ChangeLog32
-rw-r--r--libgomp/libgomp.map1
-rw-r--r--libgomp/oacc-parallel.c58
-rw-r--r--libgomp/testsuite/libgomp.oacc-c++/declare-1.C31
-rw-r--r--libgomp/testsuite/libgomp.oacc-c-c++-common/collapse-2.c2
-rw-r--r--libgomp/testsuite/libgomp.oacc-c-c++-common/declare-1.c122
-rw-r--r--libgomp/testsuite/libgomp.oacc-c-c++-common/declare-2.c64
-rw-r--r--libgomp/testsuite/libgomp.oacc-c-c++-common/declare-4.c41
-rw-r--r--libgomp/testsuite/libgomp.oacc-c-c++-common/declare-5.c15
-rw-r--r--libgomp/testsuite/libgomp.oacc-c-c++-common/default-1.c87
-rw-r--r--libgomp/testsuite/libgomp.oacc-c-c++-common/firstprivate-1.c41
-rw-r--r--libgomp/testsuite/libgomp.oacc-c-c++-common/firstprivate-2.c31
-rw-r--r--libgomp/testsuite/libgomp.oacc-c-c++-common/loop-auto-1.c225
-rw-r--r--libgomp/testsuite/libgomp.oacc-c-c++-common/loop-red-v-2.c2
-rw-r--r--libgomp/testsuite/libgomp.oacc-c-c++-common/loop-red-w-2.c2
-rw-r--r--libgomp/testsuite/libgomp.oacc-c-c++-common/reduction-cplx-dbl.c52
-rw-r--r--libgomp/testsuite/libgomp.oacc-c-c++-common/reduction-cplx-flt.c52
-rw-r--r--libiberty/ChangeLog4
-rw-r--r--libiberty/Makefile.in2
-rw-r--r--libstdc++-v3/ChangeLog586
-rw-r--r--libstdc++-v3/acinclude.m4646
-rw-r--r--libstdc++-v3/config.h.in47
-rw-r--r--libstdc++-v3/config/locale/dragonfly/c_locale.h2
-rw-r--r--libstdc++-v3/config/locale/generic/c_locale.h2
-rw-r--r--libstdc++-v3/config/locale/gnu/c_locale.h2
-rw-r--r--libstdc++-v3/config/os/bsd/dragonfly/os_defines.h3
-rwxr-xr-xlibstdc++-v3/configure1201
-rw-r--r--libstdc++-v3/include/Makefile.am5
-rw-r--r--libstdc++-v3/include/Makefile.in5
-rw-r--r--libstdc++-v3/include/bits/basic_string.h12
-rw-r--r--libstdc++-v3/include/bits/c++config36
-rw-r--r--libstdc++-v3/include/bits/ios_base.h12
-rw-r--r--libstdc++-v3/include/bits/locale_facets.tcc16
-rw-r--r--libstdc++-v3/include/bits/locale_facets_nonio.tcc4
-rw-r--r--libstdc++-v3/include/bits/mutex.h6
-rw-r--r--libstdc++-v3/include/bits/stl_pair.h2
-rw-r--r--libstdc++-v3/include/bits/uses_allocator.h10
-rw-r--r--libstdc++-v3/include/c_compatibility/math.h2
-rw-r--r--libstdc++-v3/include/c_compatibility/wchar.h2
-rw-r--r--libstdc++-v3/include/c_global/cstdio4
-rw-r--r--libstdc++-v3/include/c_global/cstdlib4
-rw-r--r--libstdc++-v3/include/c_global/cwchar4
-rw-r--r--libstdc++-v3/include/c_std/cstdio2
-rw-r--r--libstdc++-v3/include/c_std/cstdlib4
-rw-r--r--libstdc++-v3/include/c_std/cwchar2
-rw-r--r--libstdc++-v3/include/experimental/bits/shared_ptr.h1197
-rw-r--r--libstdc++-v3/include/experimental/bits/string_view.tcc2
-rw-r--r--libstdc++-v3/include/experimental/deque11
-rw-r--r--libstdc++-v3/include/experimental/forward_list11
-rw-r--r--libstdc++-v3/include/experimental/list11
-rw-r--r--libstdc++-v3/include/experimental/map18
-rw-r--r--libstdc++-v3/include/experimental/memory2
-rw-r--r--libstdc++-v3/include/experimental/memory_resource385
-rw-r--r--libstdc++-v3/include/experimental/random77
-rw-r--r--libstdc++-v3/include/experimental/regex72
-rw-r--r--libstdc++-v3/include/experimental/set15
-rw-r--r--libstdc++-v3/include/experimental/string22
-rw-r--r--libstdc++-v3/include/experimental/type_traits29
-rw-r--r--libstdc++-v3/include/experimental/unordered_map20
-rw-r--r--libstdc++-v3/include/experimental/unordered_set19
-rw-r--r--libstdc++-v3/include/experimental/utility48
-rw-r--r--libstdc++-v3/include/experimental/vector11
-rw-r--r--libstdc++-v3/include/ext/vstring.h12
-rw-r--r--libstdc++-v3/include/std/complex4
-rw-r--r--libstdc++-v3/include/std/thread17
-rw-r--r--libstdc++-v3/include/std/type_traits20
-rw-r--r--libstdc++-v3/include/tr1/cstdio2
-rw-r--r--libstdc++-v3/include/tr1/cstdlib4
-rw-r--r--libstdc++-v3/include/tr1/cwchar2
-rw-r--r--libstdc++-v3/include/tr1/stdlib.h2
-rw-r--r--libstdc++-v3/libsupc++/exception_ptr.h2
-rw-r--r--libstdc++-v3/libsupc++/new7
-rw-r--r--libstdc++-v3/libsupc++/new_handler.cc2
-rw-r--r--libstdc++-v3/src/c++11/thread.cc3
-rw-r--r--libstdc++-v3/src/c++98/locale_facets.cc4
-rw-r--r--libstdc++-v3/testsuite/17_intro/tag_type_explicit_ctor.cc60
-rw-r--r--libstdc++-v3/testsuite/18_support/exception_ptr/60612-terminate.cc4
-rw-r--r--libstdc++-v3/testsuite/18_support/exception_ptr/60612-unexpected.cc4
-rw-r--r--libstdc++-v3/testsuite/18_support/exception_ptr/rethrow_exception.cc14
-rw-r--r--libstdc++-v3/testsuite/20_util/declval/requirements/1_neg.cc2
-rw-r--r--libstdc++-v3/testsuite/20_util/logical_traits/requirements/explicit_instantiation.cc30
-rw-r--r--libstdc++-v3/testsuite/20_util/logical_traits/requirements/typedefs.cc55
-rw-r--r--libstdc++-v3/testsuite/20_util/logical_traits/value.cc45
-rw-r--r--libstdc++-v3/testsuite/20_util/make_signed/requirements/typedefs_neg.cc2
-rw-r--r--libstdc++-v3/testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc4
-rw-r--r--libstdc++-v3/testsuite/21_strings/basic_string/numeric_conversions/wchar_t/stod.cc2
-rw-r--r--libstdc++-v3/testsuite/21_strings/basic_string/numeric_conversions/wchar_t/stof.cc2
-rw-r--r--libstdc++-v3/testsuite/21_strings/basic_string/numeric_conversions/wchar_t/stoi.cc2
-rw-r--r--libstdc++-v3/testsuite/21_strings/basic_string/numeric_conversions/wchar_t/stol.cc2
-rw-r--r--libstdc++-v3/testsuite/21_strings/basic_string/numeric_conversions/wchar_t/stold.cc2
-rw-r--r--libstdc++-v3/testsuite/21_strings/basic_string/numeric_conversions/wchar_t/stoll.cc2
-rw-r--r--libstdc++-v3/testsuite/21_strings/basic_string/numeric_conversions/wchar_t/stoul.cc2
-rw-r--r--libstdc++-v3/testsuite/21_strings/basic_string/numeric_conversions/wchar_t/stoull.cc2
-rw-r--r--libstdc++-v3/testsuite/21_strings/basic_string/numeric_conversions/wchar_t/to_wstring.cc2
-rw-r--r--libstdc++-v3/testsuite/22_locale/codecvt/always_noconv/char/wrapped_env.cc4
-rw-r--r--libstdc++-v3/testsuite/22_locale/codecvt/always_noconv/char/wrapped_locale.cc4
-rw-r--r--libstdc++-v3/testsuite/22_locale/codecvt/always_noconv/wchar_t/2.cc6
-rw-r--r--libstdc++-v3/testsuite/22_locale/codecvt/always_noconv/wchar_t/3.cc6
-rw-r--r--libstdc++-v3/testsuite/22_locale/codecvt/always_noconv/wchar_t/wrapped_env.cc4
-rw-r--r--libstdc++-v3/testsuite/22_locale/codecvt/always_noconv/wchar_t/wrapped_locale.cc4
-rw-r--r--libstdc++-v3/testsuite/22_locale/codecvt/encoding/char/wrapped_env.cc4
-rw-r--r--libstdc++-v3/testsuite/22_locale/codecvt/encoding/char/wrapped_locale.cc4
-rw-r--r--libstdc++-v3/testsuite/22_locale/codecvt/encoding/wchar_t/2.cc8
-rw-r--r--libstdc++-v3/testsuite/22_locale/codecvt/encoding/wchar_t/3.cc8
-rw-r--r--libstdc++-v3/testsuite/22_locale/codecvt/encoding/wchar_t/wrapped_env.cc4
-rw-r--r--libstdc++-v3/testsuite/22_locale/codecvt/encoding/wchar_t/wrapped_locale.cc4
-rw-r--r--libstdc++-v3/testsuite/22_locale/codecvt/in/char/wrapped_env.cc4
-rw-r--r--libstdc++-v3/testsuite/22_locale/codecvt/in/char/wrapped_locale.cc4
-rw-r--r--libstdc++-v3/testsuite/22_locale/codecvt/in/wchar_t/2.cc6
-rw-r--r--libstdc++-v3/testsuite/22_locale/codecvt/in/wchar_t/wrapped_env.cc4
-rw-r--r--libstdc++-v3/testsuite/22_locale/codecvt/in/wchar_t/wrapped_locale.cc4
-rw-r--r--libstdc++-v3/testsuite/22_locale/codecvt/length/char/wrapped_env.cc4
-rw-r--r--libstdc++-v3/testsuite/22_locale/codecvt/length/char/wrapped_locale.cc4
-rw-r--r--libstdc++-v3/testsuite/22_locale/codecvt/length/wchar_t/2.cc4
-rw-r--r--libstdc++-v3/testsuite/22_locale/codecvt/length/wchar_t/3.cc4
-rw-r--r--libstdc++-v3/testsuite/22_locale/codecvt/length/wchar_t/wrapped_env.cc4
-rw-r--r--libstdc++-v3/testsuite/22_locale/codecvt/length/wchar_t/wrapped_locale.cc4
-rw-r--r--libstdc++-v3/testsuite/22_locale/codecvt/max_length/char/wrapped_env.cc4
-rw-r--r--libstdc++-v3/testsuite/22_locale/codecvt/max_length/char/wrapped_locale.cc4
-rw-r--r--libstdc++-v3/testsuite/22_locale/codecvt/max_length/wchar_t/2.cc6
-rw-r--r--libstdc++-v3/testsuite/22_locale/codecvt/max_length/wchar_t/3.cc6
-rw-r--r--libstdc++-v3/testsuite/22_locale/codecvt/max_length/wchar_t/wrapped_env.cc4
-rw-r--r--libstdc++-v3/testsuite/22_locale/codecvt/max_length/wchar_t/wrapped_locale.cc4
-rw-r--r--libstdc++-v3/testsuite/22_locale/codecvt/out/char/wrapped_env.cc4
-rw-r--r--libstdc++-v3/testsuite/22_locale/codecvt/out/char/wrapped_locale.cc4
-rw-r--r--libstdc++-v3/testsuite/22_locale/codecvt/out/wchar_t/2.cc4
-rw-r--r--libstdc++-v3/testsuite/22_locale/codecvt/out/wchar_t/7.cc4
-rw-r--r--libstdc++-v3/testsuite/22_locale/codecvt/out/wchar_t/wrapped_env.cc4
-rw-r--r--libstdc++-v3/testsuite/22_locale/codecvt/out/wchar_t/wrapped_locale.cc4
-rw-r--r--libstdc++-v3/testsuite/22_locale/codecvt/unshift/char/wrapped_env.cc4
-rw-r--r--libstdc++-v3/testsuite/22_locale/codecvt/unshift/char/wrapped_locale.cc4
-rw-r--r--libstdc++-v3/testsuite/22_locale/codecvt/unshift/wchar_t/2.cc4
-rw-r--r--libstdc++-v3/testsuite/22_locale/codecvt/unshift/wchar_t/3.cc4
-rw-r--r--libstdc++-v3/testsuite/22_locale/codecvt/unshift/wchar_t/wrapped_env.cc4
-rw-r--r--libstdc++-v3/testsuite/22_locale/codecvt/unshift/wchar_t/wrapped_locale.cc4
-rw-r--r--libstdc++-v3/testsuite/22_locale/codecvt_byname/50714.cc5
-rw-r--r--libstdc++-v3/testsuite/22_locale/collate/compare/char/1.cc12
-rw-r--r--libstdc++-v3/testsuite/22_locale/collate/compare/char/2.cc14
-rw-r--r--libstdc++-v3/testsuite/22_locale/collate/compare/char/3.cc4
-rw-r--r--libstdc++-v3/testsuite/22_locale/collate/compare/char/wrapped_env.cc8
-rw-r--r--libstdc++-v3/testsuite/22_locale/collate/compare/char/wrapped_locale.cc10
-rw-r--r--libstdc++-v3/testsuite/22_locale/collate/compare/wchar_t/1.cc12
-rw-r--r--libstdc++-v3/testsuite/22_locale/collate/compare/wchar_t/2.cc14
-rw-r--r--libstdc++-v3/testsuite/22_locale/collate/compare/wchar_t/3.cc4
-rw-r--r--libstdc++-v3/testsuite/22_locale/collate/compare/wchar_t/wrapped_env.cc8
-rw-r--r--libstdc++-v3/testsuite/22_locale/collate/compare/wchar_t/wrapped_locale.cc10
-rw-r--r--libstdc++-v3/testsuite/22_locale/collate/hash/char/2.cc14
-rw-r--r--libstdc++-v3/testsuite/22_locale/collate/hash/char/wrapped_env.cc8
-rw-r--r--libstdc++-v3/testsuite/22_locale/collate/hash/char/wrapped_locale.cc10
-rw-r--r--libstdc++-v3/testsuite/22_locale/collate/hash/wchar_t/2.cc14
-rw-r--r--libstdc++-v3/testsuite/22_locale/collate/hash/wchar_t/wrapped_env.cc8
-rw-r--r--libstdc++-v3/testsuite/22_locale/collate/hash/wchar_t/wrapped_locale.cc10
-rw-r--r--libstdc++-v3/testsuite/22_locale/collate/transform/char/2.cc12
-rw-r--r--libstdc++-v3/testsuite/22_locale/collate/transform/char/3.cc4
-rw-r--r--libstdc++-v3/testsuite/22_locale/collate/transform/char/wrapped_env.cc8
-rw-r--r--libstdc++-v3/testsuite/22_locale/collate/transform/char/wrapped_locale.cc10
-rw-r--r--libstdc++-v3/testsuite/22_locale/collate/transform/wchar_t/2.cc12
-rw-r--r--libstdc++-v3/testsuite/22_locale/collate/transform/wchar_t/3.cc4
-rw-r--r--libstdc++-v3/testsuite/22_locale/collate/transform/wchar_t/wrapped_env.cc8
-rw-r--r--libstdc++-v3/testsuite/22_locale/collate/transform/wchar_t/wrapped_locale.cc10
-rw-r--r--libstdc++-v3/testsuite/22_locale/collate_byname/named_equivalence.cc8
-rw-r--r--libstdc++-v3/testsuite/22_locale/ctype/cons/char/wrapped_env.cc4
-rw-r--r--libstdc++-v3/testsuite/22_locale/ctype/cons/char/wrapped_locale.cc4
-rw-r--r--libstdc++-v3/testsuite/22_locale/ctype/is/char/2.cc6
-rw-r--r--libstdc++-v3/testsuite/22_locale/ctype/is/char/wrapped_env.cc4
-rw-r--r--libstdc++-v3/testsuite/22_locale/ctype/is/char/wrapped_locale.cc6
-rw-r--r--libstdc++-v3/testsuite/22_locale/ctype/is/wchar_t/2.cc6
-rw-r--r--libstdc++-v3/testsuite/22_locale/ctype/is/wchar_t/wrapped_env.cc4
-rw-r--r--libstdc++-v3/testsuite/22_locale/ctype/is/wchar_t/wrapped_locale.cc6
-rw-r--r--libstdc++-v3/testsuite/22_locale/ctype/narrow/char/wrapped_env.cc4
-rw-r--r--libstdc++-v3/testsuite/22_locale/ctype/narrow/char/wrapped_locale.cc4
-rw-r--r--libstdc++-v3/testsuite/22_locale/ctype/narrow/wchar_t/wrapped_env.cc4
-rw-r--r--libstdc++-v3/testsuite/22_locale/ctype/narrow/wchar_t/wrapped_locale.cc4
-rw-r--r--libstdc++-v3/testsuite/22_locale/ctype/scan/char/wrapped_env.cc4
-rw-r--r--libstdc++-v3/testsuite/22_locale/ctype/scan/char/wrapped_locale.cc4
-rw-r--r--libstdc++-v3/testsuite/22_locale/ctype/scan/wchar_t/wrapped_env.cc4
-rw-r--r--libstdc++-v3/testsuite/22_locale/ctype/scan/wchar_t/wrapped_locale.cc4
-rw-r--r--libstdc++-v3/testsuite/22_locale/ctype/to/char/wrapped_env.cc4
-rw-r--r--libstdc++-v3/testsuite/22_locale/ctype/to/char/wrapped_locale.cc4
-rw-r--r--libstdc++-v3/testsuite/22_locale/ctype/to/wchar_t/wrapped_env.cc4
-rw-r--r--libstdc++-v3/testsuite/22_locale/ctype/to/wchar_t/wrapped_locale.cc4
-rw-r--r--libstdc++-v3/testsuite/22_locale/ctype/widen/char/wrapped_env.cc4
-rw-r--r--libstdc++-v3/testsuite/22_locale/ctype/widen/char/wrapped_locale.cc4
-rw-r--r--libstdc++-v3/testsuite/22_locale/ctype/widen/wchar_t/2.cc4
-rw-r--r--libstdc++-v3/testsuite/22_locale/ctype/widen/wchar_t/wrapped_env.cc4
-rw-r--r--libstdc++-v3/testsuite/22_locale/ctype/widen/wchar_t/wrapped_locale.cc4
-rw-r--r--libstdc++-v3/testsuite/22_locale/facet/2.cc4
-rw-r--r--libstdc++-v3/testsuite/22_locale/locale/cons/12352.cc4
-rw-r--r--libstdc++-v3/testsuite/22_locale/locale/cons/12658_thread-1.cc6
-rw-r--r--libstdc++-v3/testsuite/22_locale/locale/cons/12658_thread-2.cc6
-rw-r--r--libstdc++-v3/testsuite/22_locale/locale/cons/2.cc18
-rw-r--r--libstdc++-v3/testsuite/22_locale/locale/cons/38365.cc4
-rw-r--r--libstdc++-v3/testsuite/22_locale/locale/cons/38368.cc4
-rw-r--r--libstdc++-v3/testsuite/22_locale/locale/cons/4.cc6
-rw-r--r--libstdc++-v3/testsuite/22_locale/locale/cons/40184.cc6
-rw-r--r--libstdc++-v3/testsuite/22_locale/locale/cons/7.cc6
-rw-r--r--libstdc++-v3/testsuite/22_locale/locale/global_locale_objects/14071.cc8
-rw-r--r--libstdc++-v3/testsuite/22_locale/locale/global_locale_objects/2.cc8
-rw-r--r--libstdc++-v3/testsuite/22_locale/messages/13631.cc6
-rw-r--r--libstdc++-v3/testsuite/22_locale/messages/members/char/1.cc6
-rw-r--r--libstdc++-v3/testsuite/22_locale/messages/members/char/2.cc4
-rw-r--r--libstdc++-v3/testsuite/22_locale/messages/members/char/3.cc8
-rw-r--r--libstdc++-v3/testsuite/22_locale/messages/members/char/wrapped_env.cc8
-rw-r--r--libstdc++-v3/testsuite/22_locale/messages/members/char/wrapped_locale.cc10
-rw-r--r--libstdc++-v3/testsuite/22_locale/messages_byname/named_equivalence.cc8
-rw-r--r--libstdc++-v3/testsuite/22_locale/money_get/get/char/1.cc4
-rw-r--r--libstdc++-v3/testsuite/22_locale/money_get/get/char/10.cc4
-rw-r--r--libstdc++-v3/testsuite/22_locale/money_get/get/char/11.cc4
-rw-r--r--libstdc++-v3/testsuite/22_locale/money_get/get/char/11528.cc4
-rw-r--r--libstdc++-v3/testsuite/22_locale/money_get/get/char/12.cc4
-rw-r--r--libstdc++-v3/testsuite/22_locale/money_get/get/char/13.cc4
-rw-r--r--libstdc++-v3/testsuite/22_locale/money_get/get/char/15.cc4
-rw-r--r--libstdc++-v3/testsuite/22_locale/money_get/get/char/16.cc8
-rw-r--r--libstdc++-v3/testsuite/22_locale/money_get/get/char/17.cc4
-rw-r--r--libstdc++-v3/testsuite/22_locale/money_get/get/char/18.cc4
-rw-r--r--libstdc++-v3/testsuite/22_locale/money_get/get/char/2.cc6
-rw-r--r--libstdc++-v3/testsuite/22_locale/money_get/get/char/3.cc4
-rw-r--r--libstdc++-v3/testsuite/22_locale/money_get/get/char/4.cc4
-rw-r--r--libstdc++-v3/testsuite/22_locale/money_get/get/char/wrapped_env.cc8
-rw-r--r--libstdc++-v3/testsuite/22_locale/money_get/get/char/wrapped_locale.cc8
-rw-r--r--libstdc++-v3/testsuite/22_locale/money_get/get/wchar_t/1.cc4
-rw-r--r--libstdc++-v3/testsuite/22_locale/money_get/get/wchar_t/10.cc4
-rw-r--r--libstdc++-v3/testsuite/22_locale/money_get/get/wchar_t/11.cc4
-rw-r--r--libstdc++-v3/testsuite/22_locale/money_get/get/wchar_t/11528.cc4
-rw-r--r--libstdc++-v3/testsuite/22_locale/money_get/get/wchar_t/12.cc4
-rw-r--r--libstdc++-v3/testsuite/22_locale/money_get/get/wchar_t/13.cc4
-rw-r--r--libstdc++-v3/testsuite/22_locale/money_get/get/wchar_t/15.cc4
-rw-r--r--libstdc++-v3/testsuite/22_locale/money_get/get/wchar_t/16.cc8
-rw-r--r--libstdc++-v3/testsuite/22_locale/money_get/get/wchar_t/17.cc4
-rw-r--r--libstdc++-v3/testsuite/22_locale/money_get/get/wchar_t/18.cc4
-rw-r--r--libstdc++-v3/testsuite/22_locale/money_get/get/wchar_t/2.cc6
-rw-r--r--libstdc++-v3/testsuite/22_locale/money_get/get/wchar_t/3.cc4
-rw-r--r--libstdc++-v3/testsuite/22_locale/money_get/get/wchar_t/4.cc4
-rw-r--r--libstdc++-v3/testsuite/22_locale/money_get/get/wchar_t/wrapped_env.cc8
-rw-r--r--libstdc++-v3/testsuite/22_locale/money_get/get/wchar_t/wrapped_locale.cc8
-rw-r--r--libstdc++-v3/testsuite/22_locale/money_put/put/char/1.cc4
-rw-r--r--libstdc++-v3/testsuite/22_locale/money_put/put/char/2.cc4
-rw-r--r--libstdc++-v3/testsuite/22_locale/money_put/put/char/3.cc4
-rw-r--r--libstdc++-v3/testsuite/22_locale/money_put/put/char/9780-3.cc8
-rw-r--r--libstdc++-v3/testsuite/22_locale/money_put/put/char/wrapped_env.cc8
-rw-r--r--libstdc++-v3/testsuite/22_locale/money_put/put/char/wrapped_locale.cc8
-rw-r--r--libstdc++-v3/testsuite/22_locale/money_put/put/wchar_t/1.cc4
-rw-r--r--libstdc++-v3/testsuite/22_locale/money_put/put/wchar_t/2.cc4
-rw-r--r--libstdc++-v3/testsuite/22_locale/money_put/put/wchar_t/3.cc4
-rw-r--r--libstdc++-v3/testsuite/22_locale/money_put/put/wchar_t/wrapped_env.cc8
-rw-r--r--libstdc++-v3/testsuite/22_locale/money_put/put/wchar_t/wrapped_locale.cc8
-rw-r--r--libstdc++-v3/testsuite/22_locale/moneypunct/40712.cc5
-rw-r--r--libstdc++-v3/testsuite/22_locale/moneypunct/members/char/2.cc4
-rw-r--r--libstdc++-v3/testsuite/22_locale/moneypunct/members/char/wrapped_env.cc4
-rw-r--r--libstdc++-v3/testsuite/22_locale/moneypunct/members/char/wrapped_locale.cc6
-rw-r--r--libstdc++-v3/testsuite/22_locale/moneypunct/members/wchar_t/2.cc4
-rw-r--r--libstdc++-v3/testsuite/22_locale/moneypunct/members/wchar_t/wrapped_env.cc4
-rw-r--r--libstdc++-v3/testsuite/22_locale/moneypunct/members/wchar_t/wrapped_locale.cc6
-rw-r--r--libstdc++-v3/testsuite/22_locale/moneypunct_byname/named_equivalence.cc6
-rw-r--r--libstdc++-v3/testsuite/22_locale/num_get/get/char/1.cc4
-rw-r--r--libstdc++-v3/testsuite/22_locale/num_get/get/char/3.cc4
-rw-r--r--libstdc++-v3/testsuite/22_locale/num_get/get/char/5.cc4
-rw-r--r--libstdc++-v3/testsuite/22_locale/num_get/get/char/6.cc4
-rw-r--r--libstdc++-v3/testsuite/22_locale/num_get/get/char/9.cc4
-rw-r--r--libstdc++-v3/testsuite/22_locale/num_get/get/char/wrapped_env.cc6
-rw-r--r--libstdc++-v3/testsuite/22_locale/num_get/get/char/wrapped_locale.cc8
-rw-r--r--libstdc++-v3/testsuite/22_locale/num_get/get/wchar_t/1.cc4
-rw-r--r--libstdc++-v3/testsuite/22_locale/num_get/get/wchar_t/3.cc4
-rw-r--r--libstdc++-v3/testsuite/22_locale/num_get/get/wchar_t/5.cc4
-rw-r--r--libstdc++-v3/testsuite/22_locale/num_get/get/wchar_t/6.cc4
-rw-r--r--libstdc++-v3/testsuite/22_locale/num_get/get/wchar_t/9.cc4
-rw-r--r--libstdc++-v3/testsuite/22_locale/num_get/get/wchar_t/wrapped_env.cc6
-rw-r--r--libstdc++-v3/testsuite/22_locale/num_get/get/wchar_t/wrapped_locale.cc8
-rw-r--r--libstdc++-v3/testsuite/22_locale/num_put/put/char/1.cc4
-rw-r--r--libstdc++-v3/testsuite/22_locale/num_put/put/char/20909.cc4
-rw-r--r--libstdc++-v3/testsuite/22_locale/num_put/put/char/20914.cc4
-rw-r--r--libstdc++-v3/testsuite/22_locale/num_put/put/char/3.cc4
-rw-r--r--libstdc++-v3/testsuite/22_locale/num_put/put/char/5.cc4
-rw-r--r--libstdc++-v3/testsuite/22_locale/num_put/put/char/9780-2.cc8
-rw-r--r--libstdc++-v3/testsuite/22_locale/num_put/put/char/wrapped_env.cc8
-rw-r--r--libstdc++-v3/testsuite/22_locale/num_put/put/char/wrapped_locale.cc10
-rw-r--r--libstdc++-v3/testsuite/22_locale/num_put/put/wchar_t/1.cc4
-rw-r--r--libstdc++-v3/testsuite/22_locale/num_put/put/wchar_t/20909.cc4
-rw-r--r--libstdc++-v3/testsuite/22_locale/num_put/put/wchar_t/20914.cc4
-rw-r--r--libstdc++-v3/testsuite/22_locale/num_put/put/wchar_t/3.cc4
-rw-r--r--libstdc++-v3/testsuite/22_locale/num_put/put/wchar_t/5.cc4
-rw-r--r--libstdc++-v3/testsuite/22_locale/num_put/put/wchar_t/wrapped_env.cc6
-rw-r--r--libstdc++-v3/testsuite/22_locale/num_put/put/wchar_t/wrapped_locale.cc8
-rw-r--r--libstdc++-v3/testsuite/22_locale/numpunct/members/char/2.cc12
-rw-r--r--libstdc++-v3/testsuite/22_locale/numpunct/members/char/3.cc4
-rw-r--r--libstdc++-v3/testsuite/22_locale/numpunct/members/char/wrapped_env.cc8
-rw-r--r--libstdc++-v3/testsuite/22_locale/numpunct/members/char/wrapped_locale.cc10
-rw-r--r--libstdc++-v3/testsuite/22_locale/numpunct/members/wchar_t/2.cc12
-rw-r--r--libstdc++-v3/testsuite/22_locale/numpunct/members/wchar_t/wrapped_env.cc8
-rw-r--r--libstdc++-v3/testsuite/22_locale/numpunct/members/wchar_t/wrapped_locale.cc10
-rw-r--r--libstdc++-v3/testsuite/22_locale/numpunct_byname/named_equivalence.cc6
-rw-r--r--libstdc++-v3/testsuite/22_locale/time_get/date_order/char/wrapped_env.cc4
-rw-r--r--libstdc++-v3/testsuite/22_locale/time_get/date_order/char/wrapped_locale.cc4
-rw-r--r--libstdc++-v3/testsuite/22_locale/time_get/date_order/wchar_t/wrapped_env.cc4
-rw-r--r--libstdc++-v3/testsuite/22_locale/time_get/date_order/wchar_t/wrapped_locale.cc4
-rw-r--r--libstdc++-v3/testsuite/22_locale/time_get/get/char/2.cc4
-rw-r--r--libstdc++-v3/testsuite/22_locale/time_get/get/wchar_t/2.cc4
-rw-r--r--libstdc++-v3/testsuite/22_locale/time_get/get_date/char/12750.cc4
-rw-r--r--libstdc++-v3/testsuite/22_locale/time_get/get_date/char/2.cc10
-rw-r--r--libstdc++-v3/testsuite/22_locale/time_get/get_date/char/26701.cc4
-rw-r--r--libstdc++-v3/testsuite/22_locale/time_get/get_date/char/wrapped_env.cc6
-rw-r--r--libstdc++-v3/testsuite/22_locale/time_get/get_date/char/wrapped_locale.cc8
-rw-r--r--libstdc++-v3/testsuite/22_locale/time_get/get_date/wchar_t/12750.cc4
-rw-r--r--libstdc++-v3/testsuite/22_locale/time_get/get_date/wchar_t/2.cc10
-rw-r--r--libstdc++-v3/testsuite/22_locale/time_get/get_date/wchar_t/26701.cc4
-rw-r--r--libstdc++-v3/testsuite/22_locale/time_get/get_date/wchar_t/4.cc4
-rw-r--r--libstdc++-v3/testsuite/22_locale/time_get/get_date/wchar_t/wrapped_env.cc6
-rw-r--r--libstdc++-v3/testsuite/22_locale/time_get/get_date/wchar_t/wrapped_locale.cc8
-rw-r--r--libstdc++-v3/testsuite/22_locale/time_get/get_monthname/char/2.cc10
-rw-r--r--libstdc++-v3/testsuite/22_locale/time_get/get_monthname/char/wrapped_env.cc6
-rw-r--r--libstdc++-v3/testsuite/22_locale/time_get/get_monthname/char/wrapped_locale.cc8
-rw-r--r--libstdc++-v3/testsuite/22_locale/time_get/get_monthname/wchar_t/2.cc10
-rw-r--r--libstdc++-v3/testsuite/22_locale/time_get/get_monthname/wchar_t/wrapped_env.cc6
-rw-r--r--libstdc++-v3/testsuite/22_locale/time_get/get_monthname/wchar_t/wrapped_locale.cc8
-rw-r--r--libstdc++-v3/testsuite/22_locale/time_get/get_time/char/1.cc6
-rw-r--r--libstdc++-v3/testsuite/22_locale/time_get/get_time/char/2.cc4
-rw-r--r--libstdc++-v3/testsuite/22_locale/time_get/get_time/char/wrapped_env.cc6
-rw-r--r--libstdc++-v3/testsuite/22_locale/time_get/get_time/char/wrapped_locale.cc8
-rw-r--r--libstdc++-v3/testsuite/22_locale/time_get/get_time/wchar_t/1.cc6
-rw-r--r--libstdc++-v3/testsuite/22_locale/time_get/get_time/wchar_t/2.cc4
-rw-r--r--libstdc++-v3/testsuite/22_locale/time_get/get_time/wchar_t/wrapped_env.cc6
-rw-r--r--libstdc++-v3/testsuite/22_locale/time_get/get_time/wchar_t/wrapped_locale.cc8
-rw-r--r--libstdc++-v3/testsuite/22_locale/time_get/get_weekday/char/2.cc10
-rw-r--r--libstdc++-v3/testsuite/22_locale/time_get/get_weekday/char/38081-1.cc4
-rw-r--r--libstdc++-v3/testsuite/22_locale/time_get/get_weekday/char/38081-2.cc4
-rw-r--r--libstdc++-v3/testsuite/22_locale/time_get/get_weekday/char/wrapped_env.cc6
-rw-r--r--libstdc++-v3/testsuite/22_locale/time_get/get_weekday/char/wrapped_locale.cc8
-rw-r--r--libstdc++-v3/testsuite/22_locale/time_get/get_weekday/wchar_t/2.cc10
-rw-r--r--libstdc++-v3/testsuite/22_locale/time_get/get_weekday/wchar_t/wrapped_env.cc6
-rw-r--r--libstdc++-v3/testsuite/22_locale/time_get/get_weekday/wchar_t/wrapped_locale.cc8
-rw-r--r--libstdc++-v3/testsuite/22_locale/time_get/get_year/char/wrapped_env.cc4
-rw-r--r--libstdc++-v3/testsuite/22_locale/time_get/get_year/char/wrapped_locale.cc4
-rw-r--r--libstdc++-v3/testsuite/22_locale/time_get/get_year/wchar_t/wrapped_env.cc4
-rw-r--r--libstdc++-v3/testsuite/22_locale/time_get/get_year/wchar_t/wrapped_locale.cc4
-rw-r--r--libstdc++-v3/testsuite/22_locale/time_put/put/char/17038.cc6
-rw-r--r--libstdc++-v3/testsuite/22_locale/time_put/put/char/2.cc4
-rw-r--r--libstdc++-v3/testsuite/22_locale/time_put/put/char/3.cc4
-rw-r--r--libstdc++-v3/testsuite/22_locale/time_put/put/char/4.cc4
-rw-r--r--libstdc++-v3/testsuite/22_locale/time_put/put/char/6.cc4
-rw-r--r--libstdc++-v3/testsuite/22_locale/time_put/put/char/7.cc4
-rw-r--r--libstdc++-v3/testsuite/22_locale/time_put/put/char/8.cc4
-rw-r--r--libstdc++-v3/testsuite/22_locale/time_put/put/char/9780-1.cc10
-rw-r--r--libstdc++-v3/testsuite/22_locale/time_put/put/char/wrapped_env.cc10
-rw-r--r--libstdc++-v3/testsuite/22_locale/time_put/put/char/wrapped_locale.cc10
-rw-r--r--libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/17038.cc6
-rw-r--r--libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/2.cc4
-rw-r--r--libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/3.cc4
-rw-r--r--libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/4.cc4
-rw-r--r--libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/6.cc4
-rw-r--r--libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/7.cc4
-rw-r--r--libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/8.cc4
-rw-r--r--libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/wrapped_env.cc10
-rw-r--r--libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/wrapped_locale.cc12
-rw-r--r--libstdc++-v3/testsuite/26_numerics/headers/cstdlib/13943.cc4
-rw-r--r--libstdc++-v3/testsuite/26_numerics/headers/cstdlib/types_std_c++0x.cc4
-rw-r--r--libstdc++-v3/testsuite/27_io/basic_filebuf/imbue/char/13007.cc4
-rw-r--r--libstdc++-v3/testsuite/27_io/basic_filebuf/imbue/char/13171-1.cc6
-rw-r--r--libstdc++-v3/testsuite/27_io/basic_filebuf/imbue/char/13171-2.cc8
-rw-r--r--libstdc++-v3/testsuite/27_io/basic_filebuf/imbue/char/13171-4.cc8
-rw-r--r--libstdc++-v3/testsuite/27_io/basic_filebuf/imbue/char/13582-2.cc8
-rw-r--r--libstdc++-v3/testsuite/27_io/basic_filebuf/imbue/char/14975-1.cc4
-rw-r--r--libstdc++-v3/testsuite/27_io/basic_filebuf/imbue/char/2.cc4
-rw-r--r--libstdc++-v3/testsuite/27_io/basic_filebuf/imbue/char/9322.cc8
-rw-r--r--libstdc++-v3/testsuite/27_io/basic_filebuf/imbue/wchar_t/13007.cc4
-rw-r--r--libstdc++-v3/testsuite/27_io/basic_filebuf/imbue/wchar_t/13171-3.cc26
-rw-r--r--libstdc++-v3/testsuite/27_io/basic_filebuf/imbue/wchar_t/13582-2.cc8
-rw-r--r--libstdc++-v3/testsuite/27_io/basic_filebuf/imbue/wchar_t/13582-3.cc8
-rw-r--r--libstdc++-v3/testsuite/27_io/basic_filebuf/imbue/wchar_t/14975-2.cc4
-rw-r--r--libstdc++-v3/testsuite/27_io/basic_filebuf/imbue/wchar_t/2.cc4
-rw-r--r--libstdc++-v3/testsuite/27_io/basic_filebuf/imbue/wchar_t/9322.cc8
-rw-r--r--libstdc++-v3/testsuite/27_io/basic_filebuf/underflow/wchar_t/9520.cc4
-rw-r--r--libstdc++-v3/testsuite/27_io/basic_ios/copyfmt/char/2.cc4
-rw-r--r--libstdc++-v3/testsuite/27_io/basic_ostream/inserters_arithmetic/char/2.cc4
-rw-r--r--libstdc++-v3/testsuite/27_io/basic_ostream/inserters_arithmetic/wchar_t/2.cc4
-rw-r--r--libstdc++-v3/testsuite/27_io/basic_streambuf/cons/57394.cc4
-rw-r--r--libstdc++-v3/testsuite/27_io/basic_streambuf/imbue/char/13007-2.cc4
-rw-r--r--libstdc++-v3/testsuite/27_io/basic_streambuf/imbue/char/9322.cc8
-rw-r--r--libstdc++-v3/testsuite/27_io/basic_streambuf/imbue/wchar_t/13007-2.cc4
-rw-r--r--libstdc++-v3/testsuite/27_io/basic_streambuf/imbue/wchar_t/9322.cc8
-rw-r--r--libstdc++-v3/testsuite/27_io/basic_stringbuf/imbue/char/9322.cc8
-rw-r--r--libstdc++-v3/testsuite/27_io/basic_stringbuf/imbue/wchar_t/9322.cc8
-rw-r--r--libstdc++-v3/testsuite/27_io/ios_base/types/fmtflags/case_label.cc4
-rw-r--r--libstdc++-v3/testsuite/27_io/ios_base/types/iostate/case_label.cc4
-rw-r--r--libstdc++-v3/testsuite/27_io/ios_base/types/openmode/case_label.cc4
-rw-r--r--libstdc++-v3/testsuite/27_io/manipulators/extended/get_money/char/1.cc4
-rw-r--r--libstdc++-v3/testsuite/27_io/manipulators/extended/get_money/wchar_t/1.cc4
-rw-r--r--libstdc++-v3/testsuite/27_io/manipulators/extended/get_time/char/2.cc4
-rw-r--r--libstdc++-v3/testsuite/27_io/manipulators/extended/get_time/wchar_t/2.cc4
-rw-r--r--libstdc++-v3/testsuite/27_io/manipulators/extended/put_money/char/1.cc4
-rw-r--r--libstdc++-v3/testsuite/27_io/manipulators/extended/put_money/wchar_t/1.cc4
-rw-r--r--libstdc++-v3/testsuite/27_io/manipulators/extended/put_time/char/2.cc4
-rw-r--r--libstdc++-v3/testsuite/27_io/manipulators/extended/put_time/wchar_t/2.cc4
-rw-r--r--libstdc++-v3/testsuite/27_io/objects/wchar_t/13582-1_xin.cc4
-rw-r--r--libstdc++-v3/testsuite/27_io/objects/wchar_t/9520.cc4
-rw-r--r--libstdc++-v3/testsuite/30_threads/this_thread/60421.cc64
-rw-r--r--libstdc++-v3/testsuite/experimental/memory/shared_ptr/assign/assign.cc120
-rw-r--r--libstdc++-v3/testsuite/experimental/memory/shared_ptr/cast/cast.cc44
-rw-r--r--libstdc++-v3/testsuite/experimental/memory/shared_ptr/comparison/comparison.cc84
-rw-r--r--libstdc++-v3/testsuite/experimental/memory/shared_ptr/cons/alias_ctor.cc100
-rw-r--r--libstdc++-v3/testsuite/experimental/memory/shared_ptr/cons/alloc_ctor.cc73
-rw-r--r--libstdc++-v3/testsuite/experimental/memory/shared_ptr/cons/copy_ctor.cc178
-rw-r--r--libstdc++-v3/testsuite/experimental/memory/shared_ptr/cons/copy_ctor_neg.cc59
-rw-r--r--libstdc++-v3/testsuite/experimental/memory/shared_ptr/cons/default_ctor.cc46
-rw-r--r--libstdc++-v3/testsuite/experimental/memory/shared_ptr/cons/move_ctor.cc146
-rw-r--r--libstdc++-v3/testsuite/experimental/memory/shared_ptr/cons/pointer_ctor.cc75
-rw-r--r--libstdc++-v3/testsuite/experimental/memory/shared_ptr/cons/unique_ptr_ctor.cc60
-rw-r--r--libstdc++-v3/testsuite/experimental/memory/shared_ptr/cons/weak_ptr_ctor.cc54
-rw-r--r--libstdc++-v3/testsuite/experimental/memory/shared_ptr/dest/dest.cc129
-rw-r--r--libstdc++-v3/testsuite/experimental/memory/shared_ptr/modifiers/reset.cc89
-rw-r--r--libstdc++-v3/testsuite/experimental/memory/shared_ptr/modifiers/swap.cc53
-rw-r--r--libstdc++-v3/testsuite/experimental/memory/shared_ptr/observers/bool_conv.cc74
-rw-r--r--libstdc++-v3/testsuite/experimental/memory/shared_ptr/observers/operators.cc93
-rw-r--r--libstdc++-v3/testsuite/experimental/memory/shared_ptr/observers/owner_before.cc86
-rw-r--r--libstdc++-v3/testsuite/experimental/memory/shared_ptr/observers/use_count.cc73
-rw-r--r--libstdc++-v3/testsuite/experimental/random/randint.cc84
-rw-r--r--libstdc++-v3/testsuite/experimental/type_erased_allocator/1.cc147
-rw-r--r--libstdc++-v3/testsuite/experimental/type_erased_allocator/1_neg.cc37
-rw-r--r--libstdc++-v3/testsuite/experimental/type_erased_allocator/2.cc202
-rw-r--r--libstdc++-v3/testsuite/experimental/type_erased_allocator/uses_allocator.cc22
-rw-r--r--libstdc++-v3/testsuite/experimental/type_traits/value.cc23
-rw-r--r--libstdc++-v3/testsuite/lib/libstdc++.exp33
-rw-r--r--libstdc++-v3/testsuite/tr1/8_c_compatibility/cmath/templates.cc2
-rw-r--r--libstdc++-v3/testsuite/tr1/8_c_compatibility/cstdio/functions.cc2
-rw-r--r--libstdc++-v3/testsuite/tr1/8_c_compatibility/cstdlib/functions.cc2
-rw-r--r--libstdc++-v3/testsuite/tr1/8_c_compatibility/cstdlib/types_std_tr1.cc4
-rw-r--r--libstdc++-v3/testsuite/tr1/8_c_compatibility/cwchar/functions.cc2
-rw-r--r--libstdc++-v3/testsuite/util/testsuite_fs.h2
-rw-r--r--libstdc++-v3/testsuite/util/testsuite_hooks.h7
927 files changed, 32084 insertions, 7004 deletions
diff --git a/ChangeLog b/ChangeLog
index 9ff868fcb58..f665a3d0c5f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2015-11-13 Tsvetkova Alexandra <aleksandra.tsvetkova@intel.com>
+
+ * configure.ac: Enable libmpx by default.
+ * configure: Regenerated.
+
2015-10-23 Steve Ellcey <sellcey@imgtec.com>
* MAINTAINERS: Update email address.
diff --git a/configure b/configure
index f66f42474d4..7dcaa242478 100755
--- a/configure
+++ b/configure
@@ -3320,7 +3320,7 @@ fi
# Enable libmpx on supported systems by request.
if test -d ${srcdir}/libmpx; then
- if test x$enable_libmpx = xyes; then
+ if test x$enable_libmpx = x; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for libmpx support" >&5
$as_echo_n "checking for libmpx support... " >&6; }
if (srcdir=${srcdir}/libmpx; \
@@ -3334,8 +3334,6 @@ $as_echo "no" >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
fi
- else
- noconfigdirs="$noconfigdirs target-libmpx"
fi
fi
diff --git a/configure.ac b/configure.ac
index cb6ca24458d..55f9ab0af25 100644
--- a/configure.ac
+++ b/configure.ac
@@ -660,7 +660,7 @@ fi
# Enable libmpx on supported systems by request.
if test -d ${srcdir}/libmpx; then
- if test x$enable_libmpx = xyes; then
+ if test x$enable_libmpx = x; then
AC_MSG_CHECKING([for libmpx support])
if (srcdir=${srcdir}/libmpx; \
. ${srcdir}/configure.tgt; \
@@ -671,8 +671,6 @@ if test -d ${srcdir}/libmpx; then
else
AC_MSG_RESULT([yes])
fi
- else
- noconfigdirs="$noconfigdirs target-libmpx"
fi
fi
diff --git a/contrib/ChangeLog b/contrib/ChangeLog
index 57243870b41..543e9520e02 100644
--- a/contrib/ChangeLog
+++ b/contrib/ChangeLog
@@ -1,3 +1,8 @@
+2015-11-11 Andrew MacLeod <amacleod@redhat.com>
+
+ * header-tools: New. Directory containing a set of tools for
+ manipulating header files.
+
2015-10-30 Nathan Sidwell <nathan@acm.org>
* config-list.mk (nvptx-none): Add it.
diff --git a/contrib/header-tools/ChangeLog b/contrib/header-tools/ChangeLog
new file mode 100644
index 00000000000..9baeaa6548d
--- /dev/null
+++ b/contrib/header-tools/ChangeLog
@@ -0,0 +1,12 @@
+2015-11-11 Andrew MacLeod <amacleod@redhat.com>
+
+ * count-headers: Initial file.
+ * gcc-order-headers: Initial file.
+ * graph-header-logs: Initial file.
+ * graph-include-web: Initial file.
+ * headerutils.py: Initial file.
+ * included-by: Initial file.
+ * README: Initial file.
+ * reduce-headers: Initial file.
+ * replace-header: Initial file.
+ * show-headers: Initial file.
diff --git a/contrib/header-tools/README b/contrib/header-tools/README
new file mode 100644
index 00000000000..05d3b97f62a
--- /dev/null
+++ b/contrib/header-tools/README
@@ -0,0 +1,283 @@
+Quick start documentation for the header file utilities.
+
+This isn't a full breakdown of the tools, just they typical use scenarios.
+
+- Each tool accepts -h to show it's usage. Usually no parameters will also
+trigger the help message. Help may specify additional functionality to what is
+listed here.
+
+- For all tools, option format for specifying filenames must have no spaces
+between the option and filename.
+ie.: tool -lfilename.h target.h
+
+- Many of the tools are required to be run from the core gcc source directory
+containing coretypes.h. Typically that is in gcc/gcc from a source checkout.
+For these tools to work on files not in this directory, their path needs to be
+specified on the command line.
+ie.: tool c/c-decl.c lto/lto.c
+
+- options can be intermixed with filenames anywhere on the command line
+ie. tool ssa.h rtl.h -a is equivalent to
+ tool ssa.h -a rtl.h
+
+
+
+
+
+gcc-order-headers
+-----------------
+ This will reorder any primary backend headers files known to the tool into a
+ canonical order which will resolve any hidden dependencies they may have.
+ Any unknown headers will simply be placed after the recognized files, and
+ retain the same relative ordering they had.
+
+ This tool must be run in the core gcc source directory.
+
+ Simply execute the command listing any files you wish to process on the
+ command line.
+
+ Any files which are changed are output, and the original is saved with a
+ .bak extention.
+
+ ex.: gcc-order-headers tree-ssa.c c/c-decl.c
+
+ -s will list all of the known headers in their canonical order. It does not
+ show which of those headers include other headers, just the final canonical
+ ordering.
+
+ if any header files are included within a conditional code block, the tool
+ will issue a message and not change the file. When this happens, you can
+ manually inspect the file to determine if reordering it is actually OK. Then
+ rerun the command with the -i option. This will ignore the conditional error
+ condition and perform the re-ordering anyway.
+
+ If any #include line has the beginning of a multi-line comment, it will also
+ refuse to process the file until that is resolved by terminating the comment
+ on the same line, or removing it.
+
+
+show-headers
+------------
+ This will show the include structure for any given file. Each level of nesting
+ is indented, and when any duplicate headers are seen, they have their
+ duplicate number shown
+
+ -i may be used to specify additional search directories for headers to parse.
+ -s specifies headers to look for and emphasize in the output.
+
+ This tool must be run in the core gcc source directory.
+
+ ex.: show-headers -sansidecl.h tree-ssa.c
+ tree-ssa.c
+ config.h
+ auto-host.h
+ ansidecl.h (1) <<-------
+ system.h
+ safe-ctype.h
+ filenames.h
+ hashtab.h (1)
+ ansidecl.h (2) <<-------
+ libiberty.h
+ ansidecl.h (3) <<-------
+ hwint.h
+ coretypes.h
+ machmode.h (1)
+ insn-modes.h (1)
+ signop.h
+ <...>
+
+
+
+
+count-headers
+-------------
+ simply count all the headers found in the specified files. A summary is
+ printed showing occurrences from high to low.
+
+ ex.: count-headers tree*.c
+ 86 : coretypes.h
+ 86 : config.h
+ 86 : system.h
+ 86 : tree.h
+ 82 : backend.h
+ 80 : gimple.h
+ 72 : gimple-iterator.h
+ 70 : ssa.h
+ 68 : fold-const.h
+ <...>
+
+
+
+included-by
+-----------
+ This tool will search all the .c,.cc and .h files and output a list of files
+ which include the specified header(s).
+
+ A 4 level deep 'find' of all source files is performed from the current
+ directory and each of those is inspected for a #include of the specified
+ headers. So expect a little bit of slowness.
+
+ -i limits the search to only other header files.
+ -c limits the search to .c and .cc files.
+ -a shows only source files which include all specified headers.
+ -f allows you to specify a file which contains a list of source files to
+ check rather than performing the much slower find command.
+
+ ex: included-by tree-vectorizer.h
+ config/aarch64/aarch64.c
+ config/i386/i386.c
+ config/rs6000/rs6000.c
+ tree-loop-distribution.c
+ tree-parloops.c
+ tree-ssa-loop-ivopts.c
+ tree-ssa-loop.c
+
+
+
+
+replace-header
+--------------
+ This tool simply replaces a single header file with one or more other headers.
+ -r specifies the include to replace, and one or more -f options specify the
+ replacement headers, in the order they occur.
+
+ This is commonly used in conjunction with 'included-by' to change all
+ occurrences of a header file to something else, or to insert new headers
+ before or after.
+
+ ex: to insert #include "before.h" before every occurence of tree.h in all
+ .c and .cc source files:
+
+ replace-header -rtree.h -fbefore.h -ftree.h `included-by -c tree.h`
+
+
+
+
+reduce-headers
+--------------
+
+ This tool removes any header files which are not needed from a source file.
+
+ This tool must be run for the core gcc source directory, and requires either
+ a native build and sometimes target builds, depending on what you are trying
+ to reduce.
+
+ it is good practice to run 'gcc-order-headers' on a source file before trying
+ to reduce it. This removes duplicates and performs some simplifications
+ which reduce the chances of the reduction tool missing things.
+
+ start with a completely bootstrapped native compiler.
+
+ Any desired target builds should be built in one directory using a modified
+ config-list.mk file which does not delete the build directory when it is done.
+ any target directories which do not successfully complete a 'make all-gcc'
+ may cause the tool to not reduce anything.
+ (todo - provide a config-list.mk that leaves successful target builds, but
+ deletes ones which do not compile)
+
+ The tool will examine all the target builds to determine which targets build
+ the file, and include those targets in the testing.
+
+
+
+ The tool will analyze a source file and attempt to remove each non-conditional
+ header from last to first in the file.:
+ It will first attempt to build the native all-gcc target.
+ If that succeeds, it will attempt to build any target build .o files
+ If that succeeds, it will check to see if there are any conditional
+ compilation dependencies between this header file and the source file or
+ any header which have already been determined as non-removable.
+ If all these tests are passed, the header file is determined to be removable
+ and is removed from the source file.
+ This continues until all headers have been checked.
+ At this point, a bootstrap is attempted in the native build, and if that
+ passes the file is considered reduced.
+
+ Any files from the config subdirectory require target builds to be present
+ in order to proceed.
+
+ A small subset of targets has been determined to provide excellent coverage,
+ at least as of Aug 31/15 . They were found by reducing all the files
+ contained in libbackend.a oer a full set of targets(207). All conditions
+ which disallowed removal of a header file were triggered by one or more of
+ these targets. They are also known to the tool. When building targets it
+ will check those targets before the rest.
+ This coverage can be achieved by building config-list.mk with :
+ LIST="aarch64-linux-gnu arm-netbsdelf avr-rtems c6x-elf epiphany-elf hppa2.0-hpux10.1 i686-mingw32crt i686-pc-msdosdjgpp mipsel-elf powerpc-eabisimaltivec rs6000-ibm-aix5.1.0 sh-superh-elf sparc64-elf spu-elf"
+
+ -b specifies the native bootstrapped build root directory
+ -t specifies a target build root directory that config-list.mk was run from
+ -f is used to limit the headers for consideration.
+
+ example:
+
+ mkdir gcc // checkout gcc in subdir gcc
+ mdsir build // boostrap gcc in subdir build
+ mkdir target // create target directory and run config-list.mk
+ cd gcc/gcc
+
+ reduce-headers -b../../build -t../../targets -falias.h -fexpr.h tree*.c (1)
+ # This will attempt to remove only alias.h and expr.h from tree*.c
+
+ reduce-headers -b../../build -t../../targets tree-ssa-live.c
+ # This will attempt to remove all header files from tree-ssa-live.c
+
+
+ the tool will generate a number of log files:
+
+ reduce-headers.log : All compilation failures from attempted reductions.
+ reduce-headers.sum : One line summary of what happened to each source file.
+
+ (All the remaining logs are appended to, so if the tool is run multiple times
+ these files are just added to. You must physically remove them yourself in
+ order to reset the logs.)
+
+ reduce-headers-kept.log: List of all the successful compiles that were
+ ignored because of conditional macro dependencies
+ and why it thinks that is the case
+ $src.c.log : for each failed header removal, the compilation
+ messages as to why it failed.
+ $header.h.log: The same log is put into the relevant header log as well.
+
+
+a sample output from ira.c.log:
+
+Compilation failed:
+ for shrink-wrap.h:
+
+ ============================================
+ /gcc/2015-09-09/gcc/gcc/ira.c: In function โ€˜bool split_live_ranges_for_shrink_wrap()โ€™:
+ /gcc/2015-09-09/gcc/gcc/ira.c:4839:8: error: โ€˜SHRINK_WRAPPING_ENABLEDโ€™ was not declared in this scope
+ if (!SHRINK_WRAPPING_ENABLED)
+ ^
+ make: *** [ira.o] Error 1
+
+
+the same message would be put into shrink-wrap.h.log.
+
+
+
+graph-header-logs
+-----------------
+ This tool will parse all the messages from the .C files, looking for failures
+ that show up in other headers... meaning there is a compilation dependency
+ between the 2 header files.
+
+ The tool will aggregate all these and generate a graph of the dependencies
+ exposed during compilation. Red lines indicate dependencies that are
+ present because a header file physically includes another file. Black lines
+ represent data dependencies causing compilation failures if the header is
+ not present.
+
+ ex.: graph-header-logs *.c.log
+
+
+
+graph-include-web
+-----------------
+ This tool can be used to visualize the include structure in files. It is
+ rapidly turned useless if you specify too many things, but it can be
+ useful for finding cycles and redundancies, or simply to see what a single
+ file looks like.
+
+ ex.: graph-include-web tree.c
diff --git a/contrib/header-tools/count-headers b/contrib/header-tools/count-headers
new file mode 100755
index 00000000000..7a92596a602
--- /dev/null
+++ b/contrib/header-tools/count-headers
@@ -0,0 +1,58 @@
+#! /usr/bin/python2
+import os.path
+import sys
+import shlex
+import re
+
+from headerutils import *
+
+usage = False
+src = list ()
+flist = { }
+process_h = True
+process_c = True
+verbose = False
+all_inc = True
+level = 0
+
+only_use_list = list ()
+
+for x in sys.argv[1:]:
+ if x[0:2] == "-h":
+ usage = True
+ else:
+ src.append (x)
+
+
+if not usage and len (src) > 0:
+ incl = { }
+ for fn in src:
+ src = readwholefile (fn)
+ dup = { }
+ for line in src:
+ d = find_pound_include (line, True, True)
+ if d != "" and d[-2:] ==".h":
+ if dup.get (d) == None:
+ if incl.get (d) == None:
+ incl[d] = 1
+ else:
+ incl[d] = incl[d]+ 1
+ dup[d] = 1
+
+ l = list ()
+ for i in incl:
+ l.append ((incl[i], i))
+ l.sort (key=lambda tup:tup[0], reverse=True)
+
+ for f in l:
+ print str (f[0]) + " : " + f[1]
+
+else:
+ print "count-headers file1 [filen]"
+ print "Count the number of occurrences of all includes across all listed files"
+
+
+
+
+
+
diff --git a/contrib/header-tools/gcc-order-headers b/contrib/header-tools/gcc-order-headers
new file mode 100755
index 00000000000..ee76cba4b18
--- /dev/null
+++ b/contrib/header-tools/gcc-order-headers
@@ -0,0 +1,397 @@
+#! /usr/bin/python2
+import os
+import sys
+import shlex
+import re
+
+from headerutils import *
+import Queue
+
+file_list = list ()
+usage = False
+
+ignore_conditional = False
+
+order = [
+ "system.h",
+ "coretypes.h",
+ "backend.h",
+ "target.h",
+ "rtl.h",
+ "c-family/c-target.h",
+ "c-family/c-target-def.h",
+ "tree.h",
+ "cp/cp-tree.h",
+ "c-family/c-common.h", # these must come before diagnostic.h
+ "c/c-tree.h",
+ "fortran/gfortran.h",
+ "gimple.h",
+ "cfghooks.h",
+ "df.h",
+ "tm_p.h",
+ "gimple-iterators.h",
+ "ssa.h",
+ "expmed.h",
+ "optabs.h",
+ "regs.h",
+ "ira.h",
+ "ira-int.h",
+ "gimple-streamer.h"
+
+]
+
+exclude_special = [ "bversion.h", "obstack.h", "insn-codes.h", "hooks.h" ]
+
+# includes is a dictionary indexed by a header files basename.
+# it consists of a 2 element tuple:
+# [0] - Name of header file which included this header.
+# [1] - vector of header file names included by this file.
+
+includes = { }
+
+# when a header is included multiple times, indexing this dictionary will
+# return a vector of all the headers which included it.
+dups = { }
+
+# When creating the master list, do not descend into these files for what
+# they include. Simply put the file itself in the list. This is primarily
+# required because the front end files inlcude orders tend to be at odds with
+# the order of middle end files, and its impossible to synchronize them.\
+# They are ordered such that everything resolves properly.
+exclude_processing = [ "tree-vectorizer.h" , "c-target.h", "c-target-def.h", "cp-tree.h", "c-common.h", "c-tree.h", "gfortran.h" ]
+
+master_list = list ()
+# where include file comes from in src
+h_from = { }
+
+# create the master ordering list... this is the desired order of headers
+def create_master_list (fn, verbose):
+ if fn not in exclude_processing:
+ for x in includes[fn][1]:
+ create_master_list (x, verbose)
+ if not fn in master_list:
+ # Don't put diagnostic*.h into the ordering list. It is special since
+ # various front ends have to set GCC_DIAG_STYLE before including it.
+ # for each file, we'll tailor where it belongs by looking at the include
+ # list and determine its position appropriately.
+ if fn != "diagnostic.h" and fn != "diagnostic-core.h":
+ master_list.append (fn)
+ if (verbose):
+ print fn + " included by: " + includes[fn][0]
+
+
+
+def print_dups ():
+ if dups:
+ print "\nduplicated includes"
+ for i in dups:
+ string = "dup : " + i + " : "
+ string += includes[i][0]
+ for i2 in dups[i]:
+ string += ", "+i2
+ print string
+
+
+def process_known_dups ():
+ # rtl.h gets tagged as a duplicate includer for all of coretypes.h, but that
+ # is really for only generator files
+ rtl_remove = includes["coretypes.h"][1] + ["statistics.h", "vec.h"]
+ if dups:
+ for i in rtl_remove:
+ if dups[i] and "rtl.h" in dups[i]:
+ dups[i].remove("rtl.h")
+ if not dups[i]:
+ dups.pop (i, None)
+
+ # make sure diagnostic.h is the owner of diagnostic-core.h
+ if includes["diagnostic-core.h"][0] != "diagnostic.h":
+ dups["diagnostic-core.h"].append (includes["diagnostic-core.h"][0])
+ includes["diagnostic-core.h"] = ("diagnostic.h", includes["diagnostic-core.h"][1])
+
+# This function scans back thorugh the list of headers which included other
+# headers to determine what file in HEADER_LIST brought 'HEADER' in.
+def indirectly_included (header, header_list):
+ nm = os.path.basename (header)
+ while nm and includes.get(nm):
+ if includes[nm][0] in header_list:
+ return includes[nm][0]
+ nm = includes[nm][0]
+
+ # diagnostic.h and diagnostic-core.h may not show up because we removed them
+ # from the header list to manually position in an appropriate place. They have
+ # specific requirements that they need to occur after certain FE files which
+ # may overide the definition of GCC_DIAG_STYLE.
+ # Check the dup list for whete they may have been included from and return
+ # that header.
+ if header == "diagnostic-core.h":
+ if dups.get("diagnostic-core.h"):
+ for f in dups["diagnostic-core.h"]:
+ if f in header_list:
+ return f
+ else:
+ if header in header_list:
+ return header
+ # Now check if diagnostics is included indirectly anywhere
+ header = "diagnostic.h"
+
+ if header == "diagnostic.h":
+ if dups.get("diagnostic.h"):
+ for f in dups["diagnostic.h"]:
+ if f in header_list:
+ return f
+ else:
+ if header in header_list:
+ return header
+
+ return ""
+
+
+# This function will take a list of headers from a source file and return
+# the desired new new order of the canonical headers in DESIRED_ORDER.
+def get_new_order (src_h, desired_order):
+ new_order = list ()
+ for h in desired_order:
+ if h in master_list:
+ # Create the list of nested headers which included this file.
+ iclist = list ()
+ ib = includes[h][0]
+ while ib:
+ iclist.insert(0, ib)
+ ib = includes[ib][0]
+ if iclist:
+ for x in iclist:
+ # If header is in the source code, and we are allowed to look inside
+ if x in src_h and x not in exclude_processing:
+ if x not in new_order and x[:10] != "diagnostic" and h not in exclude_special:
+ new_order.append (x)
+ break;
+ else:
+ if h not in new_order:
+ new_order.append (h)
+
+ f = ""
+ if "diagnostic.h" in src_h:
+ f = "diagnostic.h"
+ elif "diagnostic-core.h" in src_h:
+ f = "diagnostic-core.h"
+
+
+ # If either diagnostic header was directly included in the main file, check to
+ # see if its already included indirectly, or whether we need to add it to the
+ # end of the canonically orders headers.
+ if f:
+ ii = indirectly_included (f, src_h)
+ if not ii or ii == f:
+ new_order.append (f)
+
+ return new_order
+
+
+
+# stack of files to process
+process_stack = list ()
+
+def process_one (info):
+ i = info[0]
+ owner = info[1]
+ name = os.path.basename(i)
+ if os.path.exists (i):
+ if includes.get(name) == None:
+ l = find_unique_include_list (i)
+ # create a list which has just basenames in it
+ new_list = list ()
+ for x in l:
+ new_list.append (os.path.basename (x))
+ process_stack.append((x, name))
+ includes[name] = (owner, new_list)
+ elif owner:
+ if dups.get(name) == None:
+ dups[name] = [ owner ]
+ else:
+ dups[name].append (owner)
+ else:
+ # seed tm.h with options.h since it is a build file and won't be seen.
+ if not includes.get(name):
+ if name == "tm.h":
+ includes[name] = (owner, [ "options.h" ])
+ includes["options.h"] = ("tm.h", list ())
+ else:
+ includes[name] = (owner, list ())
+
+
+show_master = False
+
+for arg in sys.argv[1:]:
+ if arg[0:1] == "-":
+ if arg[0:2] == "-h":
+ usage = True
+ elif arg[0:2] == "-i":
+ ignore_conditional = True
+ elif arg[0:2] == "-v":
+ show_master = True
+ else:
+ print "Error: unrecognized option " + arg
+ elif os.path.exists(arg):
+ file_list.append (arg)
+ else:
+ print "Error: file " + arg + " Does not exist."
+ usage = True
+
+if not file_list and not show_master:
+ usage = True
+
+if not usage and not os.path.exists ("coretypes.h"):
+ usage = True
+ print "Error: Must run command in main gcc source directory containing coretypes.h\n"
+
+# process diagnostic.h first.. it's special since GCC_DIAG_STYLE can be
+# overridden by languages, but must be done so by a file included BEFORE it.
+# so make sure it isn't seen as included by one of those files by making it
+# appear to be included by the src file.
+process_stack.insert (0, ("diagnostic.h", ""))
+
+# Add the list of files in reverse order since it is processed as a stack later
+for i in order:
+ process_stack.insert (0, (i, "") )
+
+# build up the library of what header files include what other files.
+while process_stack:
+ info = process_stack.pop ()
+ process_one (info)
+
+# Now create the master ordering list
+for i in order:
+ create_master_list (os.path.basename (i), show_master)
+
+# handle warts in the duplicate list
+process_known_dups ()
+desired_order = master_list
+
+if show_master:
+ print " Canonical order of gcc include files: "
+ for x in master_list:
+ print x
+ print " "
+
+if usage:
+ print "gcc-order-headers [-i] [-v] file1 [filen]"
+ print " Ensures gcc's headers files are included in a normalized form with"
+ print " redundant headers removed. The original files are saved in filename.bak"
+ print " Outputs a list of files which changed."
+ print " -i ignore conditional compilation."
+ print " Use after examining the file to be sure includes within #ifs are safe"
+ print " Any headers within conditional sections will be ignored."
+ print " -v Show the canonical order of known headers"
+ sys.exit(0)
+
+
+didnt_do = list ()
+
+for fn in file_list:
+ nest = 0
+ src_h = list ()
+ src_line = { }
+
+ master_list = list ()
+
+ includes = { }
+ dups = { }
+
+ iinfo = process_ii_src (fn)
+ src = ii_src (iinfo)
+ include_list = ii_include_list (iinfo)
+
+ if ii_include_list_cond (iinfo):
+ if not ignore_conditional:
+ print fn + ": Cannot process due to conditional compilation of includes"
+ didnt_do.append (fn)
+ src = list ()
+
+ if not src:
+ continue
+
+ process_stack = list ()
+ # prime the stack with headers in the main ordering list so we get them in
+ # this order.
+ for d in order:
+ if d in include_list:
+ process_stack.insert (0, (d, ""))
+
+ for d in include_list:
+ nm = os.path.basename(d)
+ src_h.append (nm)
+ iname = d
+ iname2 = os.path.dirname (fn) + "/" + d
+ if not os.path.exists (d) and os.path.exists (iname2):
+ iname = iname2
+ if iname not in process_stack:
+ process_stack.insert (0, (iname, ""))
+ src_line[nm] = ii_src_line(iinfo)[d]
+ if src_line[nm].find("/*") != -1 and src_line[nm].find("*/") == -1:
+ # this means we have a multi line comment, abort!'
+ print fn + ": Cannot process due to a multi-line comment :"
+ print " " + src_line[nm]
+ if fn not in didnt_do:
+ didnt_do.append (fn)
+ src = list ()
+
+ if not src:
+ continue
+
+ # Now create the list of includes as seen by the source file.
+ while process_stack:
+ info = process_stack.pop ()
+ process_one (info)
+
+ for i in include_list:
+ create_master_list (os.path.basename (i), False)
+
+ new_src = list ()
+ header_added = list ()
+ new_order = list ()
+ for line in src:
+ d = find_pound_include (line, True, True)
+ if not d or d[-2:] != ".h":
+ new_src.append (line)
+ else:
+ if d == order[0] and not new_order:
+ new_order = get_new_order (src_h, desired_order)
+ for i in new_order:
+ new_src.append (src_line[i])
+ # if not seen, add it.
+ if i not in header_added:
+ header_added.append (i)
+ else:
+ nm = os.path.basename(d)
+ if nm not in header_added:
+ iby = indirectly_included (nm, src_h)
+ if not iby:
+ new_src.append (line)
+ header_added.append (nm)
+
+ if src != new_src:
+ os.rename (fn, fn + ".bak")
+ fl = open(fn,"w")
+ for line in new_src:
+ fl.write (line)
+ fl.close ()
+ print fn
+
+
+if didnt_do:
+ print "\n\n Did not process the following files due to conditional dependencies:"
+ str = ""
+ for x in didnt_do:
+ str += x + " "
+ print str
+ print "\n"
+ print "Please examine to see if they are safe to process, and re-try with -i. "
+ print "Safeness is determined by checking whether any of the reordered headers are"
+ print "within a conditional and could be hauled out of the conditional, thus changing"
+ print "what the compiler will see."
+ print "Multi-line comments after a #include can also cause failuer, they must be turned"
+ print "into single line comments or removed."
+
+
+
+
diff --git a/contrib/header-tools/graph-header-logs b/contrib/header-tools/graph-header-logs
new file mode 100755
index 00000000000..d4febd7f571
--- /dev/null
+++ b/contrib/header-tools/graph-header-logs
@@ -0,0 +1,227 @@
+#! /usr/bin/python2
+import os.path
+import sys
+import shlex
+import re
+
+from headerutils import *
+
+header_roots = { }
+extra_edges = list()
+verbose = False
+verbosity = 0
+nodes = list()
+
+def unpretty (name):
+ if name[-2:] == "_h":
+ name = name[:-2] + ".h"
+ return name.replace("_", "-")
+
+def pretty_name (name):
+ name = os.path.basename (name)
+ return name.replace(".","_").replace("-","_").replace("/","_").replace("+","_");
+
+depstring = ("In file included from", " from")
+
+# indentation indicates nesting levels of included files
+ignore = [ "coretypes_h",
+ "machmode_h",
+ "signop_h",
+ "wide_int_h",
+ "double_int_h",
+ "real_h",
+ "fixed_value_h",
+ "hash_table_h",
+ "statistics_h",
+ "ggc_h",
+ "vec_h",
+ "hashtab_h",
+ "inchash_h",
+ "mem_stats_traits_h",
+ "hash_map_traits_h",
+ "mem_stats_h",
+ "hash_map_h",
+ "hash_set_h",
+ "input_h",
+ "line_map_h",
+ "is_a_h",
+ "system_h",
+ "config_h" ]
+
+def process_log_file (header, logfile):
+ if header_roots.get (header) != None:
+ print "Error: already processed log file: " + header + ".log"
+ return
+ hname = pretty_name (header)
+ header_roots[hname] = { }
+
+ sline = list();
+ incfrom = list()
+ newinc = True
+ for line in logfile:
+ if len (line) > 21 and line[:21] in depstring:
+ if newinc:
+ incfrom = list()
+ newinc = False
+ fn = re.findall(ur".*/(.*?):", line)
+ if len(fn) != 1:
+ continue
+ if fn[0][-2:] != ".h":
+ continue
+ n = pretty_name (fn[0])
+ if n not in ignore:
+ incfrom.append (n)
+ continue
+ newinc = True
+ note = re.findall (ur"^.*note: (.*)", line)
+ if len(note) > 0:
+ sline.append (("note", note[0]))
+ else:
+ err_msg = re.findall (ur"^.*: error: (.*)", line)
+ if len(err_msg) == 1:
+ msg = err_msg[0]
+ if (len (re.findall("error: forward declaration", line))) != 0:
+ continue
+ path = re.findall (ur"^(.*?):.*error: ", line)
+ if len(path) != 1:
+ continue
+ if path[0][-2:] != ".h":
+ continue
+ fname = pretty_name (path[0])
+ if fname in ignore or fname[0:3] == "gt_":
+ continue
+ sline.append (("error", msg, fname, incfrom))
+
+ print str(len(sline)) + " lines to process"
+ lastline = "note"
+ for line in sline:
+ if line[0] != "note" and lastline[0] == "error":
+ fname = lastline[2]
+ msg = lastline[1]
+ incfrom = lastline[3]
+ string = ""
+ ofname = fname
+ if len(incfrom) != 0:
+ for t in incfrom:
+ string = string + t + " : "
+ ee = (fname, t)
+ if ee not in extra_edges:
+ extra_edges.append (ee)
+ fname = t
+ print string
+
+ if hname not in nodes:
+ nodes.append(hname)
+ if fname not in nodes:
+ nodes.append (ofname)
+ for y in incfrom:
+ if y not in nodes:
+ nodes.append (y)
+
+
+ if header_roots[hname].get(fname) == None:
+ header_roots[hname][fname] = list()
+ if msg not in header_roots[hname][fname]:
+ print string + ofname + " : " +msg
+ header_roots[hname][fname].append (msg)
+ lastline = line;
+
+
+dotname = "graph.dot"
+graphname = "graph.png"
+
+
+def build_dot_file (file_list):
+ output = open(dotname, "w")
+ output.write ("digraph incweb {\n");
+ for x in file_list:
+ if os.path.exists (x) and x[-4:] == ".log":
+ header = x[:-4]
+ logfile = open(x).read().splitlines()
+ process_log_file (header, logfile)
+ elif os.path.exists (x + ".log"):
+ logfile = open(x + ".log").read().splitlines()
+ process_log_file (x, logfile)
+
+ for n in nodes:
+ fn = unpretty(n)
+ label = n + " [ label = \"" + fn + "\" ];"
+ output.write (label + "\n")
+ if os.path.exists (fn):
+ h = open(fn).read().splitlines()
+ for l in h:
+ t = find_pound_include (l, True, False)
+ if t != "":
+ t = pretty_name (t)
+ if t in ignore or t[-2:] != "_h":
+ continue
+ if t not in nodes:
+ nodes.append (t)
+ ee = (t, n)
+ if ee not in extra_edges:
+ extra_edges.append (ee)
+
+ depcount = list()
+ for h in header_roots:
+ for dep in header_roots[h]:
+ label = " [ label = "+ str(len(header_roots[h][dep])) + " ];"
+ string = h + " -> " + dep + label
+ output.write (string + "\n");
+ if verbose:
+ depcount.append ((h, dep, len(header_roots[h][dep])))
+
+ for ee in extra_edges:
+ string = ee[0] + " -> " + ee[1] + "[ color=red ];"
+ output.write (string + "\n");
+
+
+ if verbose:
+ depcount.sort(key=lambda tup:tup[2])
+ for x in depcount:
+ print " ("+str(x[2])+ ") : " + x[0] + " -> " + x[1]
+ if (x[2] <= verbosity):
+ for l in header_roots[x[0]][x[1]]:
+ print " " + l
+
+ output.write ("}\n");
+
+
+files = list()
+dohelp = False
+edge_thresh = 0
+for arg in sys.argv[1:]:
+ if arg[0:2] == "-o":
+ dotname = arg[2:]+".dot"
+ graphname = arg[2:]+".png"
+ elif arg[0:2] == "-h":
+ dohelp = True
+ elif arg[0:2] == "-v":
+ verbose = True
+ if len(arg) > 2:
+ verbosity = int (arg[2:])
+ if (verbosity == 9):
+ verbosity = 9999
+ elif arg[0:1] == "-":
+ print "Unrecognized option " + arg
+ dohelp = True
+ else:
+ files.append (arg)
+
+if len(sys.argv) == 1:
+ dohelp = True
+
+if dohelp:
+ print "Parses the log files from the reduce-headers tool to generate"
+ print "dependency graphs for the include web for specified files."
+ print "Usage: [-nnum] [-h] [-v[n]] [-ooutput] file1 [[file2] ... [filen]]"
+ print " -ooutput : Specifies output to output.dot and output.png"
+ print " Defaults to 'graph.dot and graph.png"
+ print " -vn : verbose mode, shows the number of connections, and if n"
+ print " is specified, show the messages if # < n. 9 is infinity"
+ print " -h : help"
+else:
+ print files
+ build_dot_file (files)
+ os.system ("dot -Tpng " + dotname + " -o" + graphname)
+
+
diff --git a/contrib/header-tools/graph-include-web b/contrib/header-tools/graph-include-web
new file mode 100755
index 00000000000..47576a177de
--- /dev/null
+++ b/contrib/header-tools/graph-include-web
@@ -0,0 +1,122 @@
+#! /usr/bin/python2
+import os.path
+import sys
+import shlex
+import re
+
+from headerutils import *
+
+def pretty_name (name):
+ return name.replace(".","_").replace("-","_").replace("/","_").replace("+","_");
+
+
+include_files = list()
+edges = 0
+one_c = False
+clink = list()
+noterm = False
+
+def build_inclist (output, filen):
+ global edges
+ global one_c
+ global clink
+ global noterm
+ inc = build_include_list (filen)
+ if one_c and filen[-2:] == ".c":
+ pn = "all_c"
+ else:
+ pn = pretty_name(filen)
+ for nm in inc:
+ if pn == "all_c":
+ if nm not in clink:
+ if len(build_include_list(nm)) != 0 or not noterm:
+ output.write (pretty_name(nm) + " -> " + pn + ";\n")
+ edges = edges + 1
+ if nm not in include_files:
+ include_files.append(nm)
+ clink.append (nm)
+ else:
+ output.write (pretty_name(nm) + " -> " + pn + ";\n")
+ edges = edges + 1
+ if nm not in include_files:
+ include_files.append(nm)
+ return len(inc) == 0
+
+dotname = "graph.dot"
+graphname = "graph.png"
+
+def build_dot_file (file_list):
+ global one_c
+ output = open(dotname, "w")
+ output.write ("digraph incweb {\n");
+ if one_c:
+ output.write ("all_c [shape=box];\n");
+ for x in file_list:
+ if x[-2:] == ".h":
+ include_files.append (x)
+ elif os.path.exists (x):
+ build_inclist (output, x)
+ if not one_c:
+ output.write (pretty_name (x) + "[shape=box];\n")
+
+ for x in include_files:
+ term = build_inclist (output, x)
+ if term:
+ output.write (pretty_name(x) + " [style=filled];\n")
+
+ output.write ("}\n");
+
+
+files = list()
+dohelp = False
+edge_thresh = 0
+for arg in sys.argv[1:]:
+ if arg[0:2] == "-o":
+ dotname = arg[2:]+".dot"
+ graphname = arg[2:]+".png"
+ elif arg[0:2] == "-h":
+ dohelp = True
+ elif arg[0:2] == "-a":
+ one_c = True
+ if arg[0:3] == "-at":
+ noterm = True
+ elif arg[0:2] == "-f":
+ if not os.path.exists (arg[2:]):
+ print "Option " + arg +" doesn't specify a proper file"
+ dohelp = True
+ else:
+ sfile = open (arg[2:], "r")
+ srcdata = sfile.readlines()
+ sfile.close()
+ for x in srcdata:
+ files.append(x.rstrip())
+ elif arg[0:2] == "-n":
+ edge_thresh = int (arg[2:])
+ elif arg[0:1] == "-":
+ print "Unrecognized option " + arg
+ dohelp = True
+ else:
+ files.append (arg)
+
+if len(sys.argv) == 1:
+ dohelp = True
+
+if dohelp:
+ print "Generates a graph of the include web for specified files."
+ print "Usage: [-finput_file] [-h] [-ooutput] [file1 ... [filen]]"
+ print " -finput_file : Input file containing a list of files to process."
+ print " -ooutput : Specifies output to output.dot and output.png."
+ print " defaults to graph.dot and graph.png."
+ print " -nnum : Specifies the # of edges beyond which sfdp is invoked. def=0."
+ print " -a : Aggregate all .c files to 1 file. Shows only include web."
+ print " -at : Aggregate, but don't include terminal.h to .c links."
+ print " -h : Print this help."
+else:
+ print files
+ build_dot_file (files)
+ if edges > edge_thresh:
+ os.system ("sfdp -Tpng " + dotname + " -o" + graphname)
+ else:
+ os.system ("dot -Tpng " + dotname + " -o" + graphname)
+
+
diff --git a/contrib/header-tools/headerutils.py b/contrib/header-tools/headerutils.py
new file mode 100755
index 00000000000..95c47fb4b69
--- /dev/null
+++ b/contrib/header-tools/headerutils.py
@@ -0,0 +1,554 @@
+#! /usr/bin/python2
+import os.path
+import sys
+import shlex
+import re
+import subprocess
+import shutil
+import pickle
+
+import multiprocessing
+
+def find_pound_include (line, use_outside, use_slash):
+ inc = re.findall (ur"^\s*#\s*include\s*\"(.+?)\"", line)
+ if len(inc) == 1:
+ nm = inc[0]
+ if use_outside or os.path.exists (nm):
+ if use_slash or '/' not in nm:
+ return nm
+ return ""
+
+def find_system_include (line):
+ inc = re.findall (ur"^\s*#\s*include\s*<(.+?)>", line)
+ if len(inc) == 1:
+ return inc[0]
+ return ""
+
+def find_pound_define (line):
+ inc = re.findall (ur"^\s*#\s*define ([A-Za-z0-9_]+)", line)
+ if len(inc) != 0:
+ if len(inc) > 1:
+ print "What? more than 1 match in #define??"
+ print inc
+ sys.exit(5)
+ return inc[0];
+ return ""
+
+def is_pound_if (line):
+ inc = re.findall ("^\s*#\s*if\s", line)
+ if not inc:
+ inc = re.findall ("^\s*#\s*if[n]?def\s", line)
+ if inc:
+ return True
+ return False
+
+def is_pound_endif (line):
+ inc = re.findall ("^\s*#\s*endif", line)
+ if inc:
+ return True
+ return False
+
+def find_pound_if (line):
+ inc = re.findall (ur"^\s*#\s*if\s+(.*)", line)
+ if len(inc) == 0:
+ inc = re.findall (ur"^\s*#\s*elif\s+(.*)", line)
+ if len(inc) > 0:
+ inc2 = re.findall (ur"defined\s*\((.+?)\)", inc[0])
+ inc3 = re.findall (ur"defined\s+([a-zA-Z0-9_]+)", inc[0])
+ for yy in inc3:
+ inc2.append (yy)
+ return inc2
+ else:
+ inc = re.findall (ur"^\s*#\s*ifdef\s(.*)", line)
+ if len(inc) == 0:
+ inc = re.findall (ur"^\s*#\s*ifndef\s(.*)", line)
+ if len(inc) > 0:
+ inc2 = re.findall ("[A-Za-z_][A-Za-z_0-9]*", inc[0])
+ return inc2
+ if len(inc) == 0:
+ return list ()
+ print "WTF. more than one line returned for find_pound_if"
+ print inc
+ sys.exit(5)
+
+
+# IINFO - this is a vector of include information. It consists of 7 elements.
+# [0] - base name of the file
+# [1] - path leading to this file.
+# [2] - orderd list of all headers directly included by this file.
+# [3] - Ordered list of any headers included within condionally compiled code.
+# headers files are expected to have all includes one level deep due to
+# the omnipresent guards at the top of the file.
+# [4] - List of all macros which are consumed (used) within this file.
+# [5] - list of all macros which may be defined in this file.
+# [6] - The source code for this file, if cached.
+# [7] - line number info for any headers in the source file. Indexed by base
+# name, returning the line the include is on.
+
+empty_iinfo = ("", "", list(), list(), list(), list(), list())
+
+# This function will process a file and extract interesting information.
+# DO_MACROS indicates whether macros defined and used should be recorded.
+# KEEP_SRC indicates the source for the file should be cached.
+def process_include_info (filen, do_macros, keep_src):
+ header = False
+ if not os.path.exists (filen):
+ return empty_iinfo
+
+ sfile = open (filen, "r");
+ data = sfile.readlines()
+ sfile.close()
+
+ # Ignore the initial #ifdef HEADER_H in header files
+ if filen[-2:] == ".h":
+ nest = -1
+ header = True
+ else:
+ nest = 0
+
+ macout = list ()
+ macin = list()
+ incl = list()
+ cond_incl = list()
+ src_line = { }
+ guard = ""
+
+ for line in (data):
+ if is_pound_if (line):
+ nest += 1
+ elif is_pound_endif (line):
+ nest -= 1
+
+ nm = find_pound_include (line, True, True)
+ if nm != "" and nm not in incl and nm[-2:] == ".h":
+ incl.append (nm)
+ if nest > 0:
+ cond_incl.append (nm)
+ if keep_src:
+ src_line[nm] = line
+ continue
+
+ if do_macros:
+ d = find_pound_define (line)
+ if d:
+ if d not in macout:
+ macout.append (d);
+ continue
+
+ d = find_pound_if (line)
+ if d:
+ # The first #if in a header file should be the guard
+ if header and len (d) == 1 and guard == "":
+ if d[0][-2:] == "_H":
+ guard = d
+ else:
+ guard = "Guess there was no guard..."
+ else:
+ for mac in d:
+ if mac != "defined" and mac not in macin:
+ macin.append (mac);
+
+ if not keep_src:
+ data = list()
+
+ return (os.path.basename (filen), os.path.dirname (filen), incl, cond_incl,
+ macin, macout, data, src_line)
+
+# Extract header info, but no macros or source code.
+def process_ii (filen):
+ return process_include_info (filen, False, False)
+
+# Extract header information, and collect macro information.
+def process_ii_macro (filen):
+ return process_include_info (filen, True, False)
+
+# Extract header information, cache the source lines.
+def process_ii_src (filen):
+ return process_include_info (filen, False, True)
+
+# Extract header information, coolewc macro info and cache the source lines.
+def process_ii_macro_src (filen):
+ return process_include_info (filen, True, True)
+
+
+def ii_base (iinfo):
+ return iinfo[0]
+
+def ii_path (iinfo):
+ return iinfo[1]
+
+def ii_include_list (iinfo):
+ return iinfo[2]
+
+def ii_include_list_cond (iinfo):
+ return iinfo[3]
+
+def ii_include_list_non_cond (iinfo):
+ l = ii_include_list (iinfo)
+ for n in ii_include_list_cond (iinfo):
+ l.remove (n)
+ return l
+
+def ii_macro_consume (iinfo):
+ return iinfo[4]
+
+def ii_macro_define (iinfo):
+ return iinfo[5]
+
+def ii_src (iinfo):
+ return iinfo[6]
+
+def ii_src_line (iinfo):
+ return iinfo[7]
+
+def ii_read (fname):
+ f = open (fname, 'rb')
+ incl = pickle.load (f)
+ consumes = pickle.load (f)
+ defines = pickle.load (f)
+ obj = (fname,fname,incl,list(), list(), consumes, defines, list(), list())
+ return obj
+
+def ii_write (fname, obj):
+ f = open (fname, 'wb')
+ pickle.dump (obj[2], f)
+ pickle.dump (obj[4], f)
+ pickle.dump (obj[5], f)
+ f.close ()
+
+# execute a system command which returns file names
+def execute_command (command):
+ files = list()
+ f = os.popen (command)
+ for x in f:
+ if x[0:2] == "./":
+ fn = x.rstrip()[2:]
+ else:
+ fn = x.rstrip()
+ files.append(fn)
+ return files
+
+# Try to locate a build directory from PATH
+def find_gcc_bld_dir (path):
+ blddir = ""
+ # Look for blddir/gcc/tm.h
+ command = "find " + path + " -mindepth 2 -maxdepth 3 -name tm.h"
+ files = execute_command (command)
+ for y in files:
+ p = os.path.dirname (y)
+ if os.path.basename (p) == "gcc":
+ blddir = p
+ break
+ # If not found, try looking a bit deeper
+ # Dont look this deep initially because a lot of cross target builds may show
+ # up in the list before a native build... but those are better than nothing.
+ if not blddir:
+ command = "find " + path + " -mindepth 3 -maxdepth 5 -name tm.h"
+ files = execute_command (command)
+ for y in files:
+ p = os.path.dirname (y)
+ if os.path.basename (p) == "gcc":
+ blddir = p
+ break
+
+ return blddir
+
+
+# Find files matching pattern NAME, return in a list.
+# CURRENT is True if you want to include the current directory
+# DEEPER is True if you want to search 3 levels below the current directory
+# any files with testsuite diurectories are ignored
+
+def find_gcc_files (name, current, deeper):
+ files = list()
+ command = ""
+ if current:
+ if not deeper:
+ command = "find -maxdepth 1 -name " + name + " -not -path \"./testsuite/*\""
+ else:
+ command = "find -maxdepth 4 -name " + name + " -not -path \"./testsuite/*\""
+ else:
+ if deeper:
+ command = "find -maxdepth 4 -mindepth 2 -name " + name + " -not -path \"./testsuite/*\""
+
+ if command != "":
+ files = execute_command (command)
+
+ return files
+
+# find the list of unique include names found in a file.
+def find_unique_include_list_src (data):
+ found = list ()
+ for line in data:
+ d = find_pound_include (line, True, True)
+ if d and d not in found and d[-2:] == ".h":
+ found.append (d)
+ return found
+
+# find the list of unique include names found in a file.
+def find_unique_include_list (filen):
+ data = open (filen).read().splitlines()
+ return find_unique_include_list_src (data)
+
+
+# Create the macin, macout, and incl vectors for a file FILEN.
+# macin are the macros that are used in #if* conditional expressions
+# macout are the macros which are #defined
+# incl is the list of incluide files encountered
+# returned as a tuple of the filename followed by the triplet of lists
+# (filen, macin, macout, incl)
+
+def create_macro_in_out (filen):
+ sfile = open (filen, "r");
+ data = sfile.readlines()
+ sfile.close()
+
+ macout = list ()
+ macin = list()
+ incl = list()
+
+ for line in (data):
+ d = find_pound_define (line)
+ if d != "":
+ if d not in macout:
+ macout.append (d);
+ continue
+
+ d = find_pound_if (line)
+ if len(d) != 0:
+ for mac in d:
+ if mac != "defined" and mac not in macin:
+ macin.append (mac);
+ continue
+
+ nm = find_pound_include (line, True, True)
+ if nm != "" and nm not in incl:
+ incl.append (nm)
+
+ return (filen, macin, macout, incl)
+
+# create the macro information for filen, and create .macin, .macout, and .incl
+# files. Return the created macro tuple.
+def create_include_data_files (filen):
+
+ macros = create_macro_in_out (filen)
+ depends = macros[1]
+ defines = macros[2]
+ incls = macros[3]
+
+ disp_message = filen
+ if len (defines) > 0:
+ disp_message = disp_message + " " + str(len (defines)) + " #defines"
+ dfile = open (filen + ".macout", "w")
+ for x in defines:
+ dfile.write (x + "\n")
+ dfile.close ()
+
+ if len (depends) > 0:
+ disp_message = disp_message + " " + str(len (depends)) + " #if dependencies"
+ dfile = open (filen + ".macin", "w")
+ for x in depends:
+ dfile.write (x + "\n")
+ dfile.close ()
+
+ if len (incls) > 0:
+ disp_message = disp_message + " " + str(len (incls)) + " #includes"
+ dfile = open (filen + ".incl", "w")
+ for x in incls:
+ dfile.write (x + "\n")
+ dfile.close ()
+
+ return macros
+
+
+
+# extract data for include file name_h and enter it into the dictionary.
+# this does not change once read in. use_requires is True if you want to
+# prime the values with already created .requires and .provides files.
+def get_include_data (name_h, use_requires):
+ macin = list()
+ macout = list()
+ incl = list ()
+ if use_requires and os.path.exists (name_h + ".requires"):
+ macin = open (name_h + ".requires").read().splitlines()
+ elif os.path.exists (name_h + ".macin"):
+ macin = open (name_h + ".macin").read().splitlines()
+
+ if use_requires and os.path.exists (name_h + ".provides"):
+ macout = open (name_h + ".provides").read().splitlines()
+ elif os.path.exists (name_h + ".macout"):
+ macout = open (name_h + ".macout").read().splitlines()
+
+ if os.path.exists (name_h + ".incl"):
+ incl = open (name_h + ".incl").read().splitlines()
+
+ if len(macin) == 0 and len(macout) == 0 and len(incl) == 0:
+ return ()
+ data = ( name_h, macin, macout, incl )
+ return data
+
+# find FIND in src, and replace it with the list of headers in REPLACE.
+# Remove any duplicates of FIND in REPLACE, and if some of the REPLACE
+# headers occur earlier in the include chain, leave them.
+# Return the new SRC only if anything changed.
+def find_replace_include (find, replace, src):
+ res = list()
+ seen = { }
+ anything = False
+ for line in src:
+ inc = find_pound_include (line, True, True)
+ if inc == find:
+ for y in replace:
+ if seen.get(y) == None:
+ res.append("#include \""+y+"\"\n")
+ seen[y] = True
+ if y != find:
+ anything = True
+# if find isnt in the replacement list, then we are deleting FIND, so changes.
+ if find not in replace:
+ anything = True
+ else:
+ if inc in replace:
+ if seen.get(inc) == None:
+ res.append (line)
+ seen[inc] = True
+ else:
+ res.append (line)
+
+ if (anything):
+ return res
+ else:
+ return list()
+
+
+# pass in a require and provide dictionary to be read in.
+def read_require_provides (require, provide):
+ if not os.path.exists ("require-provide.master"):
+ print "require-provide.master file is not available. please run data collection."
+ sys.exit(1)
+ incl_list = open("require-provide.master").read().splitlines()
+ for f in incl_list:
+ if os.path.exists (f+".requires"):
+ require[os.path.basename (f)] = open (f + ".requires").read().splitlines()
+ else:
+ require[os.path.basename (f)] = list ()
+ if os.path.exists (f+".provides"):
+ provide[os.path.basename (f)] = open (f + ".provides").read().splitlines()
+ else:
+ provide [os.path.basename (f)] = list ()
+
+
+def build_include_list (filen):
+ include_files = list()
+ sfile = open (filen, "r")
+ data = sfile.readlines()
+ sfile.close()
+ for line in data:
+ nm = find_pound_include (line, False, False)
+ if nm != "" and nm[-2:] == ".h":
+ if nm not in include_files:
+ include_files.append(nm)
+ return include_files
+
+def build_reverse_include_list (filen):
+ include_files = list()
+ sfile = open (filen, "r")
+ data = sfile.readlines()
+ sfile.close()
+ for line in reversed(data):
+ nm = find_pound_include (line, False, False)
+ if nm != "":
+ if nm not in include_files:
+ include_files.append(nm)
+ return include_files
+
+# Get compilation return code, and compensate for a warning that we want to
+# consider an error when it comes to inlined templates.
+def get_make_rc (rc, output):
+ rc = rc % 1280
+ if rc == 0:
+ # This is not considered an error during compilation of an individual file,
+ # but it will cause an error during link if it isn't defined. If this
+ # warning is seen during compiling a file, make it a build error so we
+ # don't remove the header.
+ h = re.findall ("warning: inline function.*used but never defined", output)
+ if len(h) != 0:
+ rc = 1
+ return rc;
+
+def get_make_output (build_dir, make_opt):
+ devnull = open('/dev/null', 'w')
+ at_a_time = multiprocessing.cpu_count() * 2
+ make = "make -j"+str(at_a_time)+ " "
+ if build_dir != "":
+ command = "cd " + build_dir +"; " + make + make_opt
+ else:
+ command = make + make_opt
+ process = subprocess.Popen(command, stdout=devnull, stderr=subprocess.PIPE, shell=True)
+ output = process.communicate();
+ rc = get_make_rc (process.returncode, output[1])
+ return (rc , output[1])
+
+def spawn_makes (command_list):
+ devnull = open('/dev/null', 'w')
+ rc = (0,"", "")
+ proc_res = list()
+ text = " Trying target builds : "
+ for command_pair in command_list:
+ tname = command_pair[0]
+ command = command_pair[1]
+ text += tname + ", "
+ c = subprocess.Popen(command, bufsize=-1, stdout=devnull, stderr=subprocess.PIPE, shell=True)
+ proc_res.append ((c, tname))
+
+ print text[:-2]
+
+ for p in proc_res:
+ output = p[0].communicate()
+ ret = (get_make_rc (p[0].returncode, output[1]), output[1], p[1])
+ if (ret[0] != 0):
+ # Just record the first one.
+ if rc[0] == 0:
+ rc = ret;
+ return rc
+
+def get_make_output_parallel (targ_list, make_opt, at_a_time):
+ command = list()
+ targname = list()
+ if at_a_time == 0:
+ at_a_time = multiprocessing.cpu_count() * 2
+ proc_res = [0] * at_a_time
+ for x in targ_list:
+ if make_opt[-2:] == ".o":
+ s = "cd " + x[1] + "/gcc/; make " + make_opt
+ else:
+ s = "cd " + x[1] +"; make " + make_opt
+ command.append ((x[0],s))
+
+ num = len(command)
+ rc = (0,"", "")
+ loops = num // at_a_time
+
+ if (loops > 0):
+ for idx in range (loops):
+ ret = spawn_makes (command[idx*at_a_time:(idx+1)*at_a_time])
+ if ret[0] != 0:
+ rc = ret
+ break
+
+ if (rc[0] == 0):
+ leftover = num % at_a_time
+ if (leftover > 0):
+ ret = spawn_makes (command[-leftover:])
+ if ret[0] != 0:
+ rc = ret
+
+ return rc
+
+
+def readwholefile (src_file):
+ sfile = open (src_file, "r")
+ src_data = sfile.readlines()
+ sfile.close()
+ return src_data
+
diff --git a/contrib/header-tools/included-by b/contrib/header-tools/included-by
new file mode 100755
index 00000000000..9947fee6b2b
--- /dev/null
+++ b/contrib/header-tools/included-by
@@ -0,0 +1,112 @@
+#! /usr/bin/python2
+import os.path
+import sys
+import shlex
+import re
+
+from headerutils import *
+
+
+
+usage = False
+src = list()
+flist = { }
+process_h = False
+process_c = False
+verbose = False
+level = 0
+match_all = False
+num_match = 1
+
+file_list = list()
+current = True
+deeper = True
+scanfiles = True
+for x in sys.argv[1:]:
+ if x[0:2] == "-h":
+ usage = True
+ elif x[0:2] == "-i":
+ process_h = True
+ elif x[0:2] == "-s" or x[0:2] == "-c":
+ process_c = True
+ elif x[0:2] == "-v":
+ verbose = True
+ elif x[0:2] == "-a":
+ match_all = True
+ elif x[0:2] == "-n":
+ num_match = int(x[2:])
+ elif x[0:2] == "-1":
+ deeper = False
+ elif x[0:2] == "-2":
+ current = False
+ elif x[0:2] == "-f":
+ file_list = open (x[2:]).read().splitlines()
+ scanfiles = False
+ elif x[0] == "-":
+ print "Error: Unknown option " + x
+ usage = True
+ else:
+ src.append (x)
+
+if match_all:
+ num_match = len (src)
+
+if not process_h and not process_c:
+ process_h = True
+ process_c = True
+
+if len(src) == 0:
+ usage = True
+
+if not usage:
+ if scanfiles:
+ if process_h:
+ file_list = find_gcc_files ("\*.h", current, deeper)
+ if process_c:
+ file_list = file_list + find_gcc_files ("\*.c", current, deeper)
+ file_list = file_list + find_gcc_files ("\*.cc", current, deeper)
+ else:
+ newlist = list()
+ for x in file_list:
+ if process_h and x[-2:] == ".h":
+ newlist.append (x)
+ elif process_c and (x[-2:] == ".c" or x[-3:] == ".cc"):
+ newlist.append (x)
+ file_list = newlist;
+
+ file_list.sort()
+ for fn in file_list:
+ found = find_unique_include_list (fn)
+ careabout = list()
+ output = ""
+ for inc in found:
+ if inc in src:
+ careabout.append (inc)
+ if output == "":
+ output = fn
+ if verbose:
+ output = output + " [" + inc +"]"
+ if len (careabout) < num_match:
+ output = ""
+ if output != "":
+ print output
+else:
+ print "included-by [-h] [-i] [-c] [-v] [-a] [-nx] file1 [file2] ... [filen]"
+ print "find the list of all files in subdirectories that include any of "
+ print "the listed files. processed to a depth of 3 subdirs"
+ print " -h : Show this message"
+ print " -i : process only header files (*.h) for #include"
+ print " -c : process only source files (*.c *.cc) for #include"
+ print " If nothing is specified, defaults to -i -c"
+ print " -s : Same as -c."
+ print " -v : Show which include(s) were found"
+ print " -nx : Only list files which have at least x different matches. Default = 1"
+ print " -a : Show only files which all listed files are included"
+ print " This is equivilent to -nT where T == # of items in list"
+ print " -flistfile : Show only files contained in the list of files"
+
+
+
+
+
+
diff --git a/contrib/header-tools/reduce-headers b/contrib/header-tools/reduce-headers
new file mode 100755
index 00000000000..e4f4d7b123d
--- /dev/null
+++ b/contrib/header-tools/reduce-headers
@@ -0,0 +1,596 @@
+#! /usr/bin/python2
+import os.path
+import sys
+import shlex
+import re
+import tempfile
+import copy
+
+from headerutils import *
+
+requires = { }
+provides = { }
+
+no_remove = [ "system.h", "coretypes.h", "config.h" , "bconfig.h", "backend.h" ]
+
+# These targets are the ones which provide "coverage". Typically, if any
+# target is going to fail compilation, it's one of these. This was determined
+# during the initial runs of reduce-headers... On a full set of target builds,
+# every failure which occured was triggered by one of these.
+# This list is used during target-list construction simply to put any of these
+# *first* in the candidate list, increasing the probability that a failure is
+# found quickly.
+target_priority = [
+ "aarch64-linux-gnu",
+ "arm-netbsdelf",
+ "avr-rtems",
+ "c6x-elf",
+ "epiphany-elf",
+ "hppa2.0-hpux10.1",
+ "i686-mingw32crt",
+ "i686-pc-msdosdjgpp",
+ "mipsel-elf",
+ "powerpc-eabisimaltivec",
+ "rs6000-ibm-aix5.1.0",
+ "sh-superh-elf",
+ "sparc64-elf",
+ "spu-elf"
+]
+
+
+target_dir = ""
+build_dir = ""
+ignore_list = list()
+target_builds = list()
+
+target_dict = { }
+header_dict = { }
+search_path = [ ".", "../include", "../libcpp/include" ]
+
+remove_count = { }
+
+
+# Given a header name, normalize it. ie. cp/cp-tree.h could be in gcc, while
+# the same header could be referenced from within the cp subdirectory as
+# just cp-tree.h
+# for now, just assume basenames are unique
+
+def normalize_header (header):
+ return os.path.basename (header)
+
+
+# Adds a header file and its sub-includes to the global dictionary if they
+# aren't already there. Specify s_path since different build directories may
+# append themselves on demand to the global list.
+# return entry for the specified header, knowing all sub entries are completed
+
+def get_header_info (header, s_path):
+ global header_dict
+ global empty_iinfo
+ process_list = list ()
+ location = ""
+ bname = ""
+ bname_iinfo = empty_iinfo
+ for path in s_path:
+ if os.path.exists (path + "/" + header):
+ location = path + "/" + header
+ break
+
+ if location:
+ bname = normalize_header (location)
+ if header_dict.get (bname):
+ bname_iinfo = header_dict[bname]
+ loc2 = ii_path (bname_iinfo)+ "/" + bname
+ if loc2[:2] == "./":
+ loc2 = loc2[2:]
+ if location[:2] == "./":
+ location = location[2:]
+ if loc2 != location:
+ # Don't use the cache if it isnt the right one.
+ bname_iinfo = process_ii_macro (location)
+ return bname_iinfo
+
+ bname_iinfo = process_ii_macro (location)
+ header_dict[bname] = bname_iinfo
+ # now decend into the include tree
+ for i in ii_include_list (bname_iinfo):
+ get_header_info (i, s_path)
+ else:
+ # if the file isnt in the source directories, look in the build and target
+ # directories. If it is here, then aggregate all the versions.
+ location = build_dir + "/gcc/" + header
+ build_inc = target_inc = False
+ if os.path.exists (location):
+ build_inc = True
+ for x in target_dict:
+ location = target_dict[x] + "/gcc/" + header
+ if os.path.exists (location):
+ target_inc = True
+ break
+
+ if (build_inc or target_inc):
+ bname = normalize_header(header)
+ defines = set()
+ consumes = set()
+ incl = set()
+ if build_inc:
+ iinfo = process_ii_macro (build_dir + "/gcc/" + header)
+ defines = set (ii_macro_define (iinfo))
+ consumes = set (ii_macro_consume (iinfo))
+ incl = set (ii_include_list (iinfo))
+
+ if (target_inc):
+ for x in target_dict:
+ location = target_dict[x] + "/gcc/" + header
+ if os.path.exists (location):
+ iinfo = process_ii_macro (location)
+ defines.update (ii_macro_define (iinfo))
+ consumes.update (ii_macro_consume (iinfo))
+ incl.update (ii_include_list (iinfo))
+
+ bname_iinfo = (header, "build", list(incl), list(), list(consumes), list(defines), list(), list())
+
+ header_dict[bname] = bname_iinfo
+ for i in incl:
+ get_header_info (i, s_path)
+
+ return bname_iinfo
+
+
+# return a list of all headers brought in by this header
+def all_headers (fname):
+ global header_dict
+ headers_stack = list()
+ headers_list = list()
+ if header_dict.get (fname) == None:
+ return list ()
+ for y in ii_include_list (header_dict[fname]):
+ headers_stack.append (y)
+
+ while headers_stack:
+ h = headers_stack.pop ()
+ hn = normalize_header (h)
+ if hn not in headers_list:
+ headers_list.append (hn)
+ if header_dict.get(hn):
+ for y in ii_include_list (header_dict[hn]):
+ if normalize_header (y) not in headers_list:
+ headers_stack.append (y)
+
+ return headers_list
+
+
+
+
+# Search bld_dir for all target tuples, confirm that they have a build path with
+# bld_dir/target-tuple/gcc, and build a dictionary of build paths indexed by
+# target tuple..
+
+def build_target_dict (bld_dir, just_these):
+ global target_dict
+ target_doct = { }
+ error = False
+ if os.path.exists (bld_dir):
+ if just_these:
+ ls = just_these
+ else:
+ ls = os.listdir(bld_dir)
+ for t in ls:
+ if t.find("-") != -1:
+ target = t.strip()
+ tpath = bld_dir + "/" + target
+ if not os.path.exists (tpath + "/gcc"):
+ print "Error: gcc build directory for target " + t + " Does not exist: " + tpath + "/gcc"
+ error = True
+ else:
+ target_dict[target] = tpath
+
+ if error:
+ target_dict = { }
+
+def get_obj_name (src_file):
+ if src_file[-2:] == ".c":
+ return src_file.replace (".c", ".o")
+ elif src_file[-3:] == ".cc":
+ return src_file.replace (".cc", ".o")
+ return ""
+
+def target_obj_exists (target, obj_name):
+ global target_dict
+ # look in a subdir if src has a subdir, then check gcc base directory.
+ if target_dict.get(target):
+ obj = target_dict[target] + "/gcc/" + obj_name
+ if not os.path.exists (obj):
+ obj = target_dict[target] + "/gcc/" + os.path.basename(obj_name)
+ if os.path.exists (obj):
+ return True
+ return False
+
+# Given a src file, return a list of targets which may build this file.
+def find_targets (src_file):
+ global target_dict
+ targ_list = list()
+ obj_name = get_obj_name (src_file)
+ if not obj_name:
+ print "Error: " + src_file + " - Cannot determine object name."
+ return list()
+
+ # Put the high priority targets which tend to trigger failures first
+ for target in target_priority:
+ if target_obj_exists (target, obj_name):
+ targ_list.append ((target, target_dict[target]))
+
+ for target in target_dict:
+ if target not in target_priority and target_obj_exists (target, obj_name):
+ targ_list.append ((target, target_dict[target]))
+
+ return targ_list
+
+
+def try_to_remove (src_file, h_list, verbose):
+ global target_dict
+ global header_dict
+ global build_dir
+
+ # build from scratch each time
+ header_dict = { }
+ summary = ""
+ rmcount = 0
+
+ because = { }
+ src_info = process_ii_macro_src (src_file)
+ src_data = ii_src (src_info)
+ if src_data:
+ inclist = ii_include_list_non_cond (src_info)
+ # work is done if there are no includes to check
+ if not inclist:
+ return src_file + ": No include files to attempt to remove"
+
+ # work on the include list in reverse.
+ inclist.reverse()
+
+ # Get the target list
+ targ_list = list()
+ targ_list = find_targets (src_file)
+
+ spath = search_path
+ if os.path.dirname (src_file):
+ spath.append (os.path.dirname (src_file))
+
+ hostbuild = True
+ if src_file.find("config/") != -1:
+ # config files dont usually build on the host
+ hostbuild = False
+ obn = get_obj_name (os.path.basename (src_file))
+ if obn and os.path.exists (build_dir + "/gcc/" + obn):
+ hostbuild = True
+ if not target_dict:
+ summary = src_file + ": Target builds are required for config files. None found."
+ print summary
+ return summary
+ if not targ_list:
+ summary =src_file + ": Cannot find any targets which build this file."
+ print summary
+ return summary
+
+ if hostbuild:
+ # confirm it actually builds before we do anything
+ print "Confirming source file builds"
+ res = get_make_output (build_dir + "/gcc", "all")
+ if res[0] != 0:
+ message = "Error: " + src_file + " does not build currently."
+ summary = src_file + " does not build on host."
+ print message
+ print res[1]
+ if verbose:
+ verbose.write (message + "\n")
+ verbose.write (res[1]+ "\n")
+ return summary
+
+ src_requires = set (ii_macro_consume (src_info))
+ for macro in src_requires:
+ because[macro] = src_file
+ header_seen = list ()
+
+ os.rename (src_file, src_file + ".bak")
+ src_orig = copy.deepcopy (src_data)
+ src_tmp = copy.deepcopy (src_data)
+
+ try:
+ # process the includes from bottom to top. This is because we know that
+ # later includes have are known to be needed, so any dependency from this
+ # header is a true dependency
+ for inc_file in inclist:
+ inc_file_norm = normalize_header (inc_file)
+
+ if inc_file in no_remove:
+ continue
+ if len (h_list) != 0 and inc_file_norm not in h_list:
+ continue
+ if inc_file_norm[0:3] == "gt-":
+ continue
+ if inc_file_norm[0:6] == "gtype-":
+ continue
+ if inc_file_norm.replace(".h",".c") == os.path.basename(src_file):
+ continue
+
+ lookfor = ii_src_line(src_info)[inc_file]
+ src_tmp.remove (lookfor)
+ message = "Trying " + src_file + " without " + inc_file
+ print message
+ if verbose:
+ verbose.write (message + "\n")
+ out = open(src_file, "w")
+ for line in src_tmp:
+ out.write (line)
+ out.close()
+
+ keep = False
+ if hostbuild:
+ res = get_make_output (build_dir + "/gcc", "all")
+ else:
+ res = (0, "")
+
+ rc = res[0]
+ message = "Passed Host build"
+ if (rc != 0):
+ # host build failed
+ message = "Compilation failed:\n";
+ keep = True
+ else:
+ if targ_list:
+ objfile = get_obj_name (src_file)
+ t1 = targ_list[0]
+ if objfile and os.path.exists(t1[1] +"/gcc/"+objfile):
+ res = get_make_output_parallel (targ_list, objfile, 0)
+ else:
+ res = get_make_output_parallel (targ_list, "all-gcc", 0)
+ rc = res[0]
+ if rc != 0:
+ message = "Compilation failed on TARGET : " + res[2]
+ keep = True
+ else:
+ message = "Passed host and target builds"
+
+ if keep:
+ print message + "\n"
+
+ if (rc != 0):
+ if verbose:
+ verbose.write (message + "\n");
+ verbose.write (res[1])
+ verbose.write ("\n");
+ if os.path.exists (inc_file):
+ ilog = open(inc_file+".log","a")
+ ilog.write (message + " for " + src_file + ":\n\n");
+ ilog.write ("============================================\n");
+ ilog.write (res[1])
+ ilog.write ("\n");
+ ilog.close()
+ if os.path.exists (src_file):
+ ilog = open(src_file+".log","a")
+ ilog.write (message + " for " +inc_file + ":\n\n");
+ ilog.write ("============================================\n");
+ ilog.write (res[1])
+ ilog.write ("\n");
+ ilog.close()
+
+ # Given a sequence where :
+ # #include "tm.h"
+ # #include "target.h" // includes tm.h
+
+ # target.h was required, and when attempting to remove tm.h we'd see that
+ # all the macro defintions are "required" since they all look like:
+ # #ifndef HAVE_blah
+ # #define HAVE_blah
+ # endif
+
+ # when target.h was found to be required, tm.h will be tagged as included.
+ # so when we get this far, we know we dont have to check the macros for
+ # tm.h since we know it is already been included.
+
+ if inc_file_norm not in header_seen:
+ iinfo = get_header_info (inc_file, spath)
+ newlist = all_headers (inc_file_norm)
+ if ii_path(iinfo) == "build" and not target_dict:
+ keep = True
+ text = message + " : Will not remove a build file without some targets."
+ print text
+ ilog = open(src_file+".log","a")
+ ilog.write (text +"\n")
+ ilog.write ("============================================\n");
+ ilog.close()
+ ilog = open("reduce-headers-kept.log","a")
+ ilog.write (src_file + " " + text +"\n")
+ ilog.close()
+ else:
+ newlist = list()
+ if not keep and inc_file_norm not in header_seen:
+ # now look for any macro requirements.
+ for h in newlist:
+ if not h in header_seen:
+ if header_dict.get(h):
+ defined = ii_macro_define (header_dict[h])
+ for dep in defined:
+ if dep in src_requires and dep not in ignore_list:
+ keep = True;
+ text = message + ", but must keep " + inc_file + " because it provides " + dep
+ if because.get(dep) != None:
+ text = text + " Possibly required by " + because[dep]
+ print text
+ ilog = open(inc_file+".log","a")
+ ilog.write (because[dep]+": Requires [dep] in "+src_file+"\n")
+ ilog.write ("============================================\n");
+ ilog.close()
+ ilog = open(src_file+".log","a")
+ ilog.write (text +"\n")
+ ilog.write ("============================================\n");
+ ilog.close()
+ ilog = open("reduce-headers-kept.log","a")
+ ilog.write (src_file + " " + text +"\n")
+ ilog.close()
+ if verbose:
+ verbose.write (text + "\n")
+
+ if keep:
+ # add all headers 'consumes' to src_requires list, and mark as seen
+ for h in newlist:
+ if not h in header_seen:
+ header_seen.append (h)
+ if header_dict.get(h):
+ consume = ii_macro_consume (header_dict[h])
+ for dep in consume:
+ if dep not in src_requires:
+ src_requires.add (dep)
+ if because.get(dep) == None:
+ because[dep] = inc_file
+
+ src_tmp = copy.deepcopy (src_data)
+ else:
+ print message + " --> removing " + inc_file + "\n"
+ rmcount += 1
+ if verbose:
+ verbose.write (message + " --> removing " + inc_file + "\n")
+ if remove_count.get(inc_file) == None:
+ remove_count[inc_file] = 1
+ else:
+ remove_count[inc_file] += 1
+ src_data = copy.deepcopy (src_tmp)
+ except:
+ print "Interuption: restoring original file"
+ out = open(src_file, "w")
+ for line in src_orig:
+ out.write (line)
+ out.close()
+ raise
+
+ # copy current version, since it is the "right" one now.
+ out = open(src_file, "w")
+ for line in src_data:
+ out.write (line)
+ out.close()
+
+ # Try a final host bootstrap build to make sure everything is kosher.
+ if hostbuild:
+ res = get_make_output (build_dir, "all")
+ rc = res[0]
+ if (rc != 0):
+ # host build failed! return to original version
+ print "Error: " + src_file + " Failed to bootstrap at end!!! restoring."
+ print " Bad version at " + src_file + ".bad"
+ os.rename (src_file, src_file + ".bad")
+ out = open(src_file, "w")
+ for line in src_orig:
+ out.write (line)
+ out.close()
+ return src_file + ": failed to build after reduction. Restored original"
+
+ if src_data == src_orig:
+ summary = src_file + ": No change."
+ else:
+ summary = src_file + ": Reduction performed, "+str(rmcount)+" includes removed."
+ print summary
+ return summary
+
+only_h = list ()
+ignore_cond = False
+
+usage = False
+src = list()
+only_targs = list ()
+for x in sys.argv[1:]:
+ if x[0:2] == "-b":
+ build_dir = x[2:]
+ elif x[0:2] == "-f":
+ fn = normalize_header (x[2:])
+ if fn not in only_h:
+ only_h.append (fn)
+ elif x[0:2] == "-h":
+ usage = True
+ elif x[0:2] == "-d":
+ ignore_cond = True
+ elif x[0:2] == "-D":
+ ignore_list.append(x[2:])
+ elif x[0:2] == "-T":
+ only_targs.append(x[2:])
+ elif x[0:2] == "-t":
+ target_dir = x[2:]
+ elif x[0] == "-":
+ print "Error: Unrecognized option " + x
+ usgae = True
+ else:
+ if not os.path.exists (x):
+ print "Error: specified file " + x + " does not exist."
+ usage = True
+ else:
+ src.append (x)
+
+if target_dir:
+ build_target_dict (target_dir, only_targs)
+
+if build_dir == "" and target_dir == "":
+ print "Error: Must specify a build directory, and/or a target directory."
+ usage = True
+
+if build_dir and not os.path.exists (build_dir):
+ print "Error: specified build directory does not exist : " + build_dir
+ usage = True
+
+if target_dir and not os.path.exists (target_dir):
+ print "Error: specified target directory does not exist : " + target_dir
+ usage = True
+
+if usage:
+ print "Attempts to remove extraneous include files from source files."
+ print " "
+ print "Should be run from the main gcc source directory, and works on a target"
+ print "directory, as we attempt to make the 'all' target."
+ print " "
+ print "By default, gcc-reorder-includes is run on each file before attempting"
+ print "to remove includes. this removes duplicates and puts some headers in a"
+ print "canonical ordering"
+ print " "
+ print "The build directory should be ready to compile via make. Time is saved"
+ print "if the build is already complete, so that only changes need to be built."
+ print " "
+ print "Usage: [options] file1.c [file2.c] ... [filen.c]"
+ print " -bdir : the root build directory to attempt buiding .o files."
+ print " -tdir : the target build directory"
+ print " -d : Ignore conditional macro dependencies."
+ print " "
+ print " -Dmacro : Ignore a specific macro for dependencies"
+ print " -Ttarget : Only consider target in target directory."
+ print " -fheader : Specifies a specific .h file to be considered."
+ print " "
+ print " -D, -T, and -f can be specified mulitple times and are aggregated."
+ print " "
+ print " The original file will be in filen.bak"
+ print " "
+ sys.exit (0)
+
+if only_h:
+ print "Attempting to remove only these files:"
+ for x in only_h:
+ print x
+ print " "
+
+logfile = open("reduce-headers.log","w")
+
+for x in src:
+ msg = try_to_remove (x, only_h, logfile)
+ ilog = open("reduce-headers.sum","a")
+ ilog.write (msg + "\n")
+ ilog.close()
+
+ilog = open("reduce-headers.sum","a")
+ilog.write ("===============================================================\n")
+for x in remove_count:
+ msg = x + ": Removed " + str(remove_count[x]) + " times."
+ print msg
+ logfile.write (msg + "\n")
+ ilog.write (msg + "\n")
+
+
+
+
+
diff --git a/contrib/header-tools/replace-header b/contrib/header-tools/replace-header
new file mode 100755
index 00000000000..ce20096a453
--- /dev/null
+++ b/contrib/header-tools/replace-header
@@ -0,0 +1,53 @@
+#! /usr/bin/python2
+import os.path
+import sys
+import shlex
+import re
+
+from headerutils import *
+
+
+files = list()
+replace = list()
+find = ""
+usage = False
+
+for x in sys.argv[1:]:
+ if x[0:2] == "-h":
+ usage = True
+ elif x[0:2] == "-f" and find == "":
+ find = x[2:]
+ elif x[0:2] == "-r":
+ replace.append (x[2:])
+ elif x[0:1] == "-":
+ print "Error: unrecognized option " + x
+ usage = True
+ else:
+ files.append (x)
+
+if find == "":
+ usage = True
+
+if usage:
+ print "replace-header -fheader -rheader [-rheader] file1 [filen.]"
+ sys.exit(0)
+
+string = ""
+for x in replace:
+ string = string + " '"+x+"'"
+print "Replacing '"+find+"' with"+string
+
+for x in files:
+ src = readwholefile (x)
+ src = find_replace_include (find, replace, src)
+ if (len(src) > 0):
+ print x + ": Changed"
+ out = open(x, "w")
+ for line in src:
+ out.write (line);
+ out.close ()
+ else:
+ print x
+
+
+
diff --git a/contrib/header-tools/show-headers b/contrib/header-tools/show-headers
new file mode 100755
index 00000000000..cb949ec1f44
--- /dev/null
+++ b/contrib/header-tools/show-headers
@@ -0,0 +1,151 @@
+#! /usr/bin/python2
+import os.path
+import sys
+import shlex
+import re
+
+from headerutils import *
+
+
+tabstop = 2
+padding = " "
+seen = { }
+output = list()
+summary = list()
+sawcore = False
+
+# list of headers to emphasize
+highlight = list ()
+
+bld_dir = ""
+# search path for headers
+incl_dirs = ["../include", "../libcpp/include", "common", "c-family", "c", "cp", "config" ]
+# extra search paths to look in *after* the directory the source file is in.
+
+# append (1) to the end of the first line which includes INC in list INC.
+def append_1 (output, inc):
+ for n,t in enumerate (output):
+ idx = t.find(inc)
+ if idx != -1:
+ eos = idx + len (inc)
+ t = t[:eos] + " (1)" + t[eos+1:]
+ output[n] = t
+ return
+
+# These headers show up as duplicates in rtl.h due to conditional code arund the includes
+rtl_core = [ "machmode.h" , "signop.h" , "wide-int.h" , "double-int.h" , "real.h" , "fixed-value.h" , "statistics.h" , "vec.h" , "hash-table.h" , "hash-set.h" , "input.h" , "is-a.h" ]
+
+def find_include_data (inc):
+ global sawcore
+ for x in incl_dirs:
+ nm = x+"/"+inc
+ if os.path.exists (nm):
+ info = find_unique_include_list (nm)
+ # rtl.h mimics coretypes for GENERATOR FILES, remove if coretypes.h seen.
+ if inc == "coretypes.h":
+ sawcore = True
+ elif inc == "rtl.h" and sawcore:
+ for i in rtl_core:
+ if i in info:
+ info.remove (i)
+ return info
+ return list()
+
+def process_include (inc, indent):
+ if inc[-2:] != ".h":
+ return
+ bname = os.path.basename (inc)
+ if bname in highlight:
+ arrow = " <<-------"
+ if bname not in summary:
+ summary.append (bname)
+ else:
+ arrow = ""
+ if seen.get(inc) == None:
+ seen[inc] = 1
+ output.append (padding[:indent*tabstop] + bname + arrow)
+ info = find_include_data (inc)
+ for y in info:
+ process_include (y, indent+1)
+ else:
+ seen[inc] += 1
+ if (seen[inc] == 2):
+ append_1(output, inc)
+ output.append (padding[:indent*tabstop] + bname + " ("+str(seen[inc])+")" + arrow)
+
+
+
+extradir = list()
+usage = False
+src = list()
+
+for x in sys.argv[1:]:
+ if x[0:2] == "-i":
+ bld = x[2:]
+ extradir.append (bld)
+ elif x[0:2] == "-s":
+ highlight.append (os.path.basename (x[2:]))
+ elif x[0:2] == "-h":
+ usage = True
+ else:
+ src.append (x)
+
+if len(src) != 1:
+ usage = True
+elif not os.path.exists (src[0]):
+ print src[0] + ": Requested source file does not exist.\n"
+ usage = True
+
+if usage:
+ print "show-headers [-idir] [-sfilen] file1 "
+ print " "
+ print " Show a hierarchical visual format how many times each header file"
+ print " is included in a source file. Should be run from the source directory"
+ print " files from find-include-depends"
+ print " -s : search for a header, and point it out."
+ print " -i : Specifies additonal directories to search for includes."
+ sys.exit(0)
+
+
+
+if extradir:
+ incl_dirs = extradir + incl_dirs;
+
+blddir = find_gcc_bld_dir ("../..")
+
+if blddir:
+ print "Using build directory: " + blddir
+ incl_dirs.insert (0, blddir)
+else:
+ print "Could not find a build directory, better results if you specify one with -i"
+
+# search path is now ".", blddir, extradirs_from_-i, built_in_incl_dirs
+incl_dirs.insert (0, ".")
+
+# if source is in a subdirectory, prepend the subdirectory to the search list
+x = src[0]
+srcpath = os.path.dirname(x)
+if srcpath:
+ incl_dirs.insert (0, srcpath)
+
+output = list()
+sawcore = False
+
+data = open (x).read().splitlines()
+for line in data:
+ d = find_pound_include (line, True, True)
+ if d and d[-2:] == ".h":
+ process_include (d, 1)
+
+print "\n" + x
+for line in output:
+ print line
+
+if highlight:
+ print " "
+ for h in summary:
+ print h + " is included by source file."
+ for h in highlight:
+ if h not in summary:
+ print h + " is not included by source file."
+
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 59ef30223a5..a7abe379db8 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,1040 @@
+2015-11-13 Ajit Agarwal <ajitkum@xilinx.com>
+ Jeff Law <law@redhat.com>
+
+ * Makefile.in (OBJS): Add gimple-ssa-split-paths.o
+ * common.opt (-fsplit-paths): New flag controlling path splitting.
+ * doc/invoke.texi (fsplit-paths): Document.
+ * opts.c (default_options_table): Add -fsplit-paths to -O2.
+ * passes.def: Add split_paths pass.
+ * timevar.def (TV_SPLIT_PATHS): New timevar.
+ * tracer.c: Include "tracer.h"
+ (ignore_bb_p): No longer static.
+ (transform_duplicate): New function, broken out of tail_duplicate.
+ (tail_duplicate): Use transform_duplicate.
+ * tracer.h (ignore_bb_p): Declare
+ (transform_duplicate): Likewise.
+ * tree-pass.h (make_pass_split_paths): Declare.
+ * gimple-ssa-split-paths.c: New file.
+
+2015-11-13 Kai Tietz <ktietz70@googlemail.com>
+ Marek Polacek <polacek@redhat.com>
+ Jason Merrill <jason@redhat.com>
+
+ * convert.c (maybe_fold_build1_loc): New.
+ (maybe_fold_build2_loc): New.
+ (convert_to_pointer_1): Split out from convert_to_pointer.
+ (convert_to_pointer_nofold): New.
+ (convert_to_real_1): Split out from convert_to_real.
+ (convert_to_real_nofold): New.
+ (convert_to_integer_1): Split out from convert_to_integer.
+ (convert_to_integer_nofold): New.
+ (convert_to_complex_1): Split out from convert_to_complex.
+ (convert_to_complex_nofold): New.
+ * convert.h: Declare new functions.
+ * tree-complex.c (create_one_component_var): Break up line to
+ avoid sequence point issues.
+
+2015-11-13 Jason Merrill <jason@redhat.com>
+
+ * fold-const.c (fold_convert_const): Fold changing cv-quals on
+ VECTOR_CST.
+
+ * hash-map.h (hash_map::empty): New.
+
+2015-11-13 Nathan Sidwell <nathan@codesourcery.com>
+
+ * gcc/omp-low.c (scan_sharing_clauses): Accept INDEPENDENT, AUTO &
+ SEQ.
+ (oacc_loop_fixed_partitions): Correct return type to bool.
+ (oacc_loop_auto_partitions): New.
+ (oacc_loop_partition): Take mask argument, call
+ oacc_loop_auto_partitions.
+ (execute_oacc_device_lower): Provide mask to oacc_loop_partition.
+
+2015-11-13 Michael Meissner <meissner@linux.vnet.ibm.com>
+
+ * config/rs6000/constraints.md (we constraint): New constraint for
+ 64-bit power9 vector support.
+ (wL constraint): New constraint for the element in a vector that
+ can be addressed by the MFVSRLD instruction.
+
+ * config/rs6000/rs6000-protos.h (convert_float128_to_int): Add
+ declaration.
+ (convert_int_to_float128): Likewise.
+ (rs6000_generate_compare): Add support for ISA 3.0 (power9)
+ hardware support for IEEE 128-bit floating point.
+ (rs6000_expand_float128_convert): Likewise.
+ (convert_float128_to_int): Likewise.
+ (convert_int_to_float128): Likewise.
+
+ * config/rs6000/rs6000.md (UNSPEC_ROUND_TO_ODD): New unspecs for
+ ISA 3.0 hardware IEEE 128-bit floating point.
+ (UNSPEC_IEEE128_MOVE): Likewise.
+ (UNSPEC_IEEE128_CONVERT): Likewise.
+ (FMA_F): Add support for IEEE 128-bit floating point hardware
+ support.
+ (Ff): Add support for DImode.
+ (Fv): Likewise.
+ (any_fix code iterator): New and updated iterators for IEEE
+ 128-bit floating point hardware support.
+ (any_float code iterator): Likewise.
+ (s code attribute): Likewise.
+ (su code attribute): Likewise.
+ (az code attribute): Likewise.
+ (uns code attribute): Likewise.
+ (neg<mode>2, FLOAT128 iterator): Add support for IEEE 128-bit
+ floating point hardware support.
+ (abs<mode>2, FLOAT128 iterator): Likewise.
+ (add<mode>3, IEEE128 iterator): New insns for IEEE 128-bit
+ floating point hardware.
+ (sub<mode>3, IEEE128 iterator): Likewise.
+ (mul<mode>3, IEEE128 iterator): Likewise.
+ (div<mode>3, IEEE128 iterator): Likewise.
+ (copysign<mode>3, IEEE128 iterator): Likewise.
+ (sqrt<mode>2, IEEE128 iterator): Likewise.
+ (neg<mode>2, IEEE128 iterator): Likewise.
+ (abs<mode>2, IEEE128 iterator): Likewise.
+ (nabs<mode>2, IEEE128 iterator): Likewise.
+ (fma<mode>4_hw, IEEE128 iterator): Likewise.
+ (fms<mode>4_hw, IEEE128 iterator): Likewise.
+ (nfma<mode>4_hw, IEEE128 iterator): Likewise.
+ (nfms<mode>4_hw, IEEE128 iterator): Likewise.
+ (extend<SFDF:mode><IEEE128:mode>2_hw): Likewise.
+ (trunc<mode>df2_hw, IEEE128 iterator): Likewise.
+ (trunc<mode>sf2_hw, IEEE128 iterator): Likewise.
+ (fix_fixuns code attribute): Likewise.
+ (float_floatuns code attribute): Likewise.
+ (fix<uns>_<mode>si2_hw): Likewise.
+ (fix<uns>_<mode>di2_hw): Likewise.
+ (float<uns>_<mode>si2_hw): Likewise.
+ (float<uns>_<mode>di2_hw): Likewise.
+ (xscvqp<su>wz_<mode>): Likewise.
+ (xscvqp<su>dz_<mode>): Likewise.
+ (xscv<su>dqp_<mode): Likewise.
+ (ieee128_mfvsrd): Likewise.
+ (ieee128_mfvsrwz): Likewise.
+ (ieee128_mtvsrw): Likewise.
+ (ieee128_mtvsrd): Likewise.
+ (trunc<mode>df2_odd): Likewise.
+ (cmp<mode>_h): Likewise.
+ (128-bit GPR splitters): Don't split a 128-bit move that is a
+ direct move between GPR and vector registers using ISA 3.0 direct
+ move instructions.
+ (maddld4): Add support for the ISA 3.0 integer multiply-add
+ instruction.
+
+ * config/rs6000/rs6000.c (rs6000_debug_reg_global): Add ISA 3.0
+ debugging.
+ (rs6000_init_hard_regno_mode_ok): If ISA 3.0 and 64-bit, enable we
+ constraint. Disable the VSX<->GPR direct move helpers if we have
+ the MFVSRLD and MTVSRDD instructions.
+ (rs6000_secondary_reload_simple_move): Add support for doing
+ vector direct moves directly without additional scratch registers
+ if we have ISA 3.0 instructions.
+ (rs6000_secondary_reload_direct_move): Update comments.
+ (rs6000_output_move_128bit): Add support for ISA 3.0 vector
+ instructions.
+
+ * config/rs6000/vsx.md (vsx_mov<mode>): Add support for ISA 3.0
+ direct move instructions.
+ (vsx_movti_64bit): Likewise.
+ (vsx_extract_<mode>): Likewise.
+
+ * config/rs6000/rs6000.h (VECTOR_ELEMENT_MFVSRLD_64BIT): New
+ macros for ISA 3.0 direct move instructions.
+ (TARGET_DIRECT_MOVE_128): Likewise.
+ (TARGET_MADDLD): Add support for the ISA 3.0 integer multiply-add
+ instruction.
+
+ * doc/md.texi (RS/6000 constraints): Document we, wF, wG, wL
+ constraints. Update wa documentation to say not to use %x<n> on
+ instructions that only take Altivec registers.
+
+2015-11-13 David Malcolm <dmalcolm@redhat.com>
+
+ * Makefile.in (OBJS): Add gcc-rich-location.o.
+ * diagnostic.c (diagnostic_append_note): Pass line_table to
+ rich_location ctor.
+ (emit_diagnostic): Likewise.
+ (inform): Likewise.
+ (inform_n): Likewise.
+ (warning): Likewise.
+ (warning_at): Likewise.
+ (warning_n): Likewise.
+ (pedwarn): Likewise.
+ (permerror): Likewise.
+ (error): Likewise.
+ (error_n): Likewise.
+ (error_at): Likewise.
+ (sorry): Likewise.
+ (fatal_error): Likewise.
+ (internal_error): Likewise.
+ (internal_error_no_backtrace): Likewise.
+ (source_range::debug): Likewise.
+ * gcc-rich-location.c: New file.
+ * gcc-rich-location.h: New file.
+ * genmatch.c (fatal_at): Pass line_table to rich_location ctor.
+ (warning_at): Likewise.
+ * gimple.h (gimple_set_block): Use set_block function.
+ * input.c (dump_line_table_statistics): Dump stats on how many
+ ranges were optimized vs how many needed ad-hoc table.
+ (write_digit_row): Add "map" param; use its range_bits
+ to calculate the per-character offset.
+ (dump_location_info): Print the range and column bits for each
+ ordinary map. Use the range bits to calculate the per-character
+ offset. Pass the map as a new param to the various calls to
+ write_digit_row. Eliminate uses of
+ ORDINARY_MAP_NUMBER_OF_COLUMN_BITS.
+ * print-tree.c (print_node): Print any source range information.
+ * rtl-error.c (diagnostic_for_asm): Likewise.
+ * toplev.c (general_init): Initialize line_table's
+ default_range_bits.
+ * tree-cfg.c (move_block_to_fn): Likewise.
+ (move_block_to_fn): Likewise.
+ * tree-inline.c (copy_phis_for_bb): Likewise.
+ * tree.c (tree_set_block): Likewise.
+ (get_pure_location): New function.
+ (set_source_range): New functions.
+ (set_block): New function.
+ (set_source_range): New functions.
+ * tree.h (CAN_HAVE_RANGE_P): New.
+ (EXPR_LOCATION_RANGE): New.
+ (EXPR_HAS_RANGE): New.
+ (get_expr_source_range): New inline function.
+ (DECL_LOCATION_RANGE): New.
+ (set_source_range): New decls.
+ (get_decl_source_range): New inline function.
+
+2015-11-13 Alan Lawrence <alan.lawrence@arm.com>
+
+ PR tree-optimization/67682
+ * tree-vect-slp.c (vect_split_slp_store_group): New.
+ (vect_analyze_slp_instance): During basic block SLP, recurse on
+ subgroups if vect_build_slp_tree fails after 1st vector.
+
+2015-11-13 Christian Bruel <christian.bruel@st.com>
+
+ PR target/65837
+ * config/arm/arm.c (arm_option_override): Move NEON check...
+ (arm_option_check_internal): here
+ (arm_file_start): Move .fpu print...
+ (arm_declare_function_name): here
+ (arm_option_print): Dump current fpu name.
+ * config/arm/arm.opt (arm_fpu_index): Mark Save.
+
+2015-11-13 Segher Boessenkool <segher@kernel.crashing.org>
+ Kyrylo Tkachov <kyrylo.tkachov@arm.com>
+
+ * combine.c (subst): Don't substitute or simplify when
+ handling register-wise widening multiply.
+ (force_to_mode): Likewise.
+
+2015-11-13 Richard Sandiford <richard.sandiford@arm.com>
+
+ PR tree-optimization/68264
+ * tree-call-cdce.c (gen_one_condition): Update commentary.
+ (gen_conditions_for_pow_int_base): Invert the sense of the tests
+ passed to gen_one_condition.
+ (gen_conditions_for_domain): Likewise. Use unordered comparisons.
+ (shrink_wrap_one_built_in_call): Invert the sense of the tests,
+ using EDGE_FALSE_VALUE for edges to the call block and
+ EDGE_TRUE_VALUE for the others.
+
+2015-11-13 Nathan Sidwell <nathan@codesourcery.com>
+
+ * config/nvptx/nvptx.c (nvptx_generate_vector_shuffle): Deal with
+ complex types.
+
+2015-11-13 Nathan Sidwell <nathan@codesourcery.com>
+
+ * gimplify.c (oacc_default_clause): Use inform for enclosing scope.
+
+2015-11-13 Tom de Vries <tom@codesourcery.com>
+
+ * gen-pass-instances.awk (handle_line): Rename prefix_len var to
+ len_of_prefix.
+
+2015-11-13 Tom de Vries <tom@codesourcery.com>
+
+ * gen-pass-instances.awk (handle_line): Add args_str variable.
+
+2015-11-13 Martin Liska <mliska@suse.cz>
+
+ * graphite-poly.c (free_scop): Release scop->drs vector.
+ * graphite-scop-detection.c (scop_detection::harmful_stmt_in_region):
+ Release dom vector.
+ (try_generate_gimple_bb): Use vNULL as a default initialization
+ for vectors.
+
+2015-11-13 Martin Liska <mliska@suse.cz>
+
+ PR ipa/68311
+ * ipa-icf.c (sem_item_optimizer::traverse_congruence_split):
+ Replace array initialization (using a variable post-increment)
+ that possible triggers multiple unsequenced modifications
+ with a pair of pushes to a vector.
+
+2015-11-13 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/68306
+ * tree-vect-data-refs.c (verify_data_ref_alignment): Move
+ loop related checks ...
+ (vect_verify_datarefs_alignment): ... here.
+ (vect_slp_analyze_and_verify_node_alignment): Compute and
+ verify alignment of the single DR that it matters.
+ * tree-vect-stmts.c (vectorizable_store): Add an assert.
+ (vectorizable_load): Add a comment.
+ * tree-vect-slp.c (vect_analyze_slp_cost_1): Fix DR used
+ for determining load cost.
+
+2015-11-13 Ilya Enkovich <enkovich.gnu@gmail.com>
+
+ * tree-vect-loop.c (vect_determine_vectorization_factor): Check
+ mix of boolean and integer vectors in a single statement.
+ * tree-vect-slp.c (vect_mask_constant_operand_p): New.
+ (vect_get_constant_vectors): Use vect_mask_constant_operand_p to
+ determine constant type.
+ * tree-vect-stmts.c (vectorizable_comparison): Provide vectype
+ for loop invariants.
+
+2015-11-13 Alan Hayward <alan.hayward@arm.com>
+
+ PR tree-optimization/66558
+ * tree-vect-loop.c (is_integer_induction):Add.
+ (vectorizable_reduction): Add integer induction checks.
+
+2015-11-13 Christophe Lyon <christophe.lyon@linaro.org>
+
+ Revert [ARM] Remove neon-testgen.ml and generated tests.
+
+ 2015-11-12 Christophe Lyon <christophe.lyon@linaro.org>
+
+ [ARM] Remove neon-testgen.ml and generated tests.
+
+ * config/arm/neon-testgen.ml: Remove.
+
+2015-11-13 Richard Biener <rguenther@suse.de>
+
+ * tree-vect-loop.c (vect_analyze_loop_2): Add fatal parameter.
+ Signal fatal failure if early checks fail.
+ (vect_analyze_loop): If vect_analyze_loop_2 fails fatally
+ do not bother testing further vector sizes.
+
+2015-11-13 Uros Bizjak <ubizjak@gmail.com>
+
+ * config/i386/predicates.md (misaligned_operand): Return true if
+ operand is aligned to less than its natural alignmnet.
+
+2015-11-13 Ilya Enkovich <enkovich.gnu@gmail.com>
+
+ * doc/md.texi (vec_cmp@var{m}@var{n}): New item.
+ (vec_cmpu@var{m}@var{n}): New item.
+ (vcond@var{m}@var{n}): Specify comparison is signed.
+ (vcondu@var{m}@var{n}): New item.
+ (vcond_mask_@var{m}@var{n}): New item.
+ (maskload@var{m}@var{n}): New item.
+ (maskstore@var{m}@var{n}): New item.
+
+2015-11-13 Ilya Enkovich <enkovich.gnu@gmail.com>
+
+ * tree-vect-stmts.c (vectorizable_mask_load_store): Check
+ types of stored value and storage are compatible.
+
+2015-11-13 Andris Pavenis <andris.pavenis@iki.fi>
+
+ * gcc.c (POST_LINK_SPEC): Define if not already defined.
+ (LINK_COMMAND_SPEC): Use post_link.
+ (post_link_spec): New, initialize to POST_LINK_SPEC.
+ (post_link): Initialize new static spec.
+ * doc/tm.texi.in (POST_LINK_SPEC): Document.
+ * doc/tm.texi: Regenerated.
+
+2015-11-13 David Malcolm <dmalcolm@redhat.com>
+
+ PR driver/67613
+ * Makefile.in (GCC_OBJS): Add spellcheck.o.
+ (OBJS): Add spellcheck-tree.o.
+ * gcc.c: Include "spellcheck.h".
+ (suggest_option): New function.
+ (driver::handle_unrecognized_options): Call suggest_option to
+ provide a hint about misspelled options.
+ * spellcheck.c: Update file comment.
+ (levenshtein_distance): Convert 4-param implementation from static
+ to extern scope. Remove note about unit tests from leading
+ comment for const char * implementation. Move tree
+ implementation to...
+ * spellcheck-tree.c: New file.
+ * spellcheck.h (levenshtein_distance): Add 4-param decl.
+
+2015-11-13 David Malcolm <dmalcolm@redhat.com>
+
+ * Makefile.in (OBJS): Add spellcheck.o.
+ * spellcheck.c: New file.
+ * spellcheck.h: New file.
+
+2015-11-13 James Bowman <james.bowman@ftdichip.com>
+
+ * config/ft32/ft32.md (*sne): New insn pattern.
+
+2015-11-12 Brad Lucier <lucier@math.purdue.edu>
+
+ * gcc/cprop.c (is_too_expensive): Remove.
+ (gcse.h): Include.
+ (one_cprop_pass): Call gcse_or_cprop_is_too_expensive, not
+ is_too_expensive.
+ * gcc/gcse.h (gcse_or_cprop_is_too_expensive): Declare.
+ * gcc/gcse.c (is_too_expensive): Rename to ...
+ (gcse_or_cprop_is_too_expensive): ... this.
+ Expand warning to add required size of max-gcse-memory.
+ (one_pre_gcse_pass): Use it.
+ (one_code_hoisting_pass): Use it.
+ * gcc/params.def (max-gcse-memory): Increase from 50MB to 128MB.
+
+2015-11-12 James Norris <jnorris@codesourcery.com>
+ Joseph Myers <joseph@codesourcery.com>
+
+ * gimple-pretty-print.c (dump_gimple_omp_target): Handle
+ GF_OMP_TARGET_KIND_OACC_DECLARE.
+ * gimple.h (enum gf_mask): Add GF_OMP_TARGET_KIND_OACC_DECLARE.
+ (is_gomple_omp_oacc): Handle GF_OMP_TARGET_KIND_OACC_DECLARE.
+ * gimplify.c (oacc_declare_returns): New.
+ (gimplify_bind_expr): Prepend 'exit' stmt to cleanup.
+ (device_resident_p): New function.
+ (oacc_default_clause): Handle device_resident clause.
+ (gimplify_oacc_declare_1, gimplify_oacc_declare): New functions.
+ (gimplify_expr): Handle OACC_DECLARE.
+ * omp-builtins.def (BUILT_IN_GOACC_DECLARE): New builtin.
+ * omp-low.c (expand_omp_target): Handle
+ GF_OMP_TARGET_KIND_OACC_DECLARE and BUILTIN_GOACC_DECLARE.
+ (build_omp_regions_1): Handlde GF_OMP_TARGET_KIND_OACC_DECLARE.
+ (lower_omp_target): Handle GF_OMP_TARGET_KIND_OACC_DECLARE,
+ GOMP_MAP_DEVICE_RESIDENT and GOMP_MAP_LINK.
+ (make_gimple_omp_edges): Handle GF_OMP_TARGET_KIND_OACC_DECLARE.
+ * tree-pretty-print.c (dump_omp_clause): Handle GOMP_MAP_LINK and
+ GOMP_MAP_DEVICE_RESIDENT.
+
+2015-11-12 Christophe Lyon <christophe.lyon@linaro.org>
+
+ [ARM] Remove neon-testgen.ml and generated tests.
+
+ * config/arm/neon-testgen.ml: Remove.
+
+2015-11-12 Jim Wilson <jim.wilson@linaro.org>
+
+ * config/aarch64/aarch64-cores.def (qdf24xx): New.
+ * config/aarch64/aarch64-tune.md: Regenerated.
+ * config/arm/arm-cores.def (qdf24xx): New.
+ * config/arm/arm-tables.opt, config/arm/arm-tune.md: Regenerated.
+ * config/arm/bpabi.h (BE8_LINK_SPEC): Add qdf24xx support.
+ * doc/invoke.texi (AArch64 Options/-mtune): Add "qdf24xx".
+ (ARM Options/-mtune); Likewise.
+
+2015-11-12 Martin Liska <mliska@suse.cz>
+
+ * config/i386/i386.c (ix86_valid_target_attribute_p):
+ Finalize options at the of the function.
+ * gcc.c (driver_get_configure_time_options): Call newly
+ introduced init_opts_obstack.
+ * lto-wrapper.c (main): Likewise.
+ * opts.c (init_opts_obstack): New function.
+ (init_options_struct): Call newly
+ introduced init_opts_obstack.
+ * opts.h (init_options_struct): Declare.
+
+2015-11-12 Martin Liska <mliska@suse.cz>
+
+ PR ipa/68035
+ * ipa-icf.c (void sem_item::set_hash): New function.
+ (sem_function::get_hash): Use renamed m_hash member variable.
+ (sem_item::update_hash_by_addr_refs): Utilize get_hash.
+ (sem_item::update_hash_by_local_refs): Likewise.
+ (sem_variable::get_hash): Use renamed m_hash member variable.
+ (sem_item_optimizer::update_hash_by_addr_refs): Utilize get_hash.
+ (sem_item_optimizer::build_hash_based_classes): Utilize set_hash.
+ (sem_item_optimizer::build_graph): As the hash value of an item
+ is lazy initialized, force the calculation.
+ * ipa-icf.h (set_hash): Declare new function and rename hash member
+ variable to m_hash.
+
+2015-11-12 Richard Biener <rguenther@suse.de>
+
+ * tree-vectorizer.h (vect_slp_analyze_data_ref_dependences):
+ Rename to vect_slp_analyze_instance_dependence.
+ * tree-vect-data-refs.c (vect_slp_analyze_data_ref_dependence):
+ Remove WAR special-case.
+ (vect_slp_analyze_node_dependences): Instead add more specific
+ code here, not relying on other instances being vectorized.
+ (vect_slp_analyze_instance_dependence): Adjust accordingly.
+ * tree-vect-slp.c (vect_build_slp_tree_1): Remove excessive
+ vertical space in dump files.
+ (vect_print_slp_tree): Likewise.
+ (vect_analyze_slp_instance): Dump a header for the final SLP tree.
+ (vect_slp_analyze_bb_1): Delay computing relevant stmts and
+ not vectorized stmts until after dependence analysis removed
+ instances. Merge alignment and dependence checks.
+ * tree-vectorizer.c (pass_slp_vectorize::execute): Clear visited
+ flag on all stmts.
+
+2015-11-12 Evandro Menezes <e.menezes@samsung.com>
+
+ * config/aarch64/aarch64-protos.h (tune_params): Add new members
+ "max_case_values" and "cache_line_size".
+ * config/aarch64/aarch64.c (aarch64_case_values_threshold): New
+ function.
+ (aarch64_override_options_internal): Tune heuristics based on new
+ members in "tune_params".
+ (TARGET_CASE_VALUES_THRESHOLD): Define macro.
+
+2015-11-12 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/68306
+ * tree-vect-data-refs.c (verify_data_ref_alignment): Remove
+ relevant and vectorizable checks here.
+ (vect_verify_datarefs_alignment): Add relevant check here.
+
+2015-11-12 Nathan Sidwell <nathan@codesourcery.com>
+
+ * gimplify.c (oacc_default_clause): New.
+ (omp_notice_variable): Call it.
+
+2015-11-12 Ilya Enkovich <enkovich.gnu@gmail.com>
+
+ PR tree-optimization/68305
+ * tree-vect-slp.c (vect_get_constant_vectors): Support
+ COND_EXPR with SSA_NAME as a condition.
+
+2015-11-12 Eric Botcazou <ebotcazou@adacore.com>
+
+ * config/visium/visium-protos.h (notice_update_cc): Delete.
+ (print_operand): Likewise.
+ (print_operand_address): Likewise.
+
+2015-11-12 Uros Bizjak <ubizjak@gmail.com>
+
+ * config/alpha/alpha.h (FUNCTION_VALUE, LIBCALL_VALUE,
+ FUNCTION_VALUE_REGNO_P): Remove.
+ * config/alpha/alpha-protos.h (function_value): Remove.
+ * config/alpha/alpha.c (function_value): Rename to...
+ (alpha_function_value_1): ... this. Make static.
+ (alpha_function_value, alpha_libcall_value,
+ alpha_function_value_regno_p): New functions.
+ (TARGET_FUNCTION_VALUE, TARGET_LIBCALL_VALUE,
+ TARGET_FUNCTION_VALUE_REGNO_P): Define.
+
+2015-11-12 Uros Bizjak <ubizjak@gmail.com>
+
+ * config/alpha/alpha.h (REGISTER_MOVE_COST, MEMORY_MOVE_COST): Remove.
+ * config/alpha/alpha.c (alpha_memory_latency): Make static.
+ (alpha_register_move_cost, alpha_memory_move_cost): New functions.
+ (TARGET_REGISTER_MOVE_COST, TARGET_MEMORY_MOVE_COST): Define.
+
+2015-11-12 Eric Botcazou <ebotcazou@adacore.com>
+
+ PR target/67265
+ * config/i386/i386.c (ix86_adjust_stack_and_probe): Remove obsolete
+ assertion on the CFA register.
+
+2015-11-12 Ilya Enkovich <enkovich.gnu@gmail.com>
+
+ * expr.c (do_store_flag): Expand vector comparison as
+ VEC_COND_EXPR if vector comparison is not supported
+ by target.
+
+2015-11-12 Renlin Li <renlin.li@arm.com>
+
+ * config/arm/arm.md (addsi3_compare_op2): Make the order of
+ assembly pattern consistent with constraint order.
+
+2015-11-12 Tom de Vries <tom@codesourcery.com>
+
+ * gen-pass-instances.awk (handle_line): Simplify match regexp.
+
+2015-11-12 Tom de Vries <tom@codesourcery.com>
+
+ * gen-pass-instances.awk (handle_line): Simplify init of
+ postfix_starts_at.
+
+2015-11-12 Tom de Vries <tom@codesourcery.com>
+
+ * gen-pass-instances.awk (handle_line): Rename var where to
+ call_starts_at.
+
+2015-11-12 Claudiu Zissulescu <claziss@synopsys.com>
+
+ * config/arc/arc.c (gen_compare_reg): Swap operands also when we
+ do not expand to rtl.
+
+2015-11-12 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/58497
+ * tree-vect-generic.c: Include gimplify.h.
+ (tree_vec_extract): Lookup constant/constructor DEFs.
+ (do_cond): Unshare cond.
+
+2015-11-12 Uros Bizjak <ubizjak@gmail.com>
+
+ * config/i386/i386.c (ix86_legitimate_combined_insn): Reject
+ combined insn if the alignment of vector mode memory operand
+ is less than ssememalign.
+
+2015-11-12 Tom de Vries <tom@codesourcery.com>
+
+ * gen-pass-instances.awk (handle_line): Print parentheses and
+ pass_name explicitly.
+
+2015-11-12 Tom de Vries <tom@codesourcery.com>
+
+ * gen-pass-instances.awk (handle_line): Add pass_num, prefix
+ and postfix vars.
+
+2015-11-12 Tom de Vries <tom@codesourcery.com>
+
+ * gen-pass-instances.awk (handle_line): Add comments.
+
+2015-11-12 Tom de Vries <tom@codesourcery.com>
+
+ * gen-pass-instances.awk (handle_line): Rename len_of_end to
+ len_of_close.
+
+2015-11-12 Tom de Vries <tom@codesourcery.com>
+
+ * gen-pass-instances.awk (handle_line): Add len_of_call variable.
+
+2015-11-12 Tom de Vries <tom@codesourcery.com>
+
+ * gen-pass-instances.awk (handle_line): Restructure using early-out.
+
+2015-11-12 Tom de Vries <tom@codesourcery.com>
+
+ * gen-pass-instances.awk (handle_line): Unify semicolon use.
+
+2015-11-12 Tom de Vries <tom@codesourcery.com>
+
+ * gen-pass-instances.awk (handle_line): Remove unused var line_length.
+
+2015-11-12 Tom de Vries <tom@codesourcery.com>
+
+ * gen-pass-instances.awk: Add emacs indent setting.
+
+2015-11-12 Naveen H.S <Naveen.Hurugalawadi@caviumnetworks.com>
+
+ * fold-const.c (fold_binary_loc) : Move Convert A/B/C to A/(B*C)
+ to match.pd.
+ Move Convert A/(B/C) to (A/B)*C to match.pd.
+ Move Convert C1/(X*C2) into (C1/C2)/X to match.pd.
+ Move Optimize (X & (-A)) / A where A is a power of 2, to
+ X >> log2(A) to match.pd.
+
+ * match.pd (rdiv (rdiv:s @0 @1) @2): New simplifier.
+ (rdiv @0 (rdiv:s @1 @2)): New simplifier.
+ (div (convert? (bit_and @0 INTEGER_CST@1)) INTEGER_CST@2):
+ New simplifier.
+ (rdiv REAL_CST@0 (mult @1 REAL_CST@2)): New simplifier.
+
+2015-11-12 Charles Baylis <charles.baylis@linaro.org>
+
+ * config/arm/neon.md: (neon_vld2_lane<mode>): Remove unused max
+ variable.
+ (neon_vst2_lane<mode>): Likewise.
+ (neon_vld3_lane<mode>): Likewise.
+ (neon_vst3_lane<mode>): Likewise.
+ (neon_vld4_lane<mode>): Likewise.
+ (neon_vst4_lane<mode>): Likewise.
+
+2015-11-11 Aditya Kumar <aditya.k7@samsung.com>
+ Sebastian Pop <s.pop@samsung.com>
+
+ * graphite-isl-ast-to-gimple.c (class translate_isl_ast_to_gimple):
+ New member codegen_error
+ (translate_isl_ast_for_loop): Remove call to single_succ_edge and
+ early return.
+ (translate_isl_ast_node_user): Early return in case of error.
+ (translate_isl_ast_to_gimple::translate_isl_ast): Same.
+ (translate_isl_ast_to_gimple::translate_pending_phi_nodes): New.
+ (add_parameters_to_ivs_params): Remove macro.
+ (graphite_regenerate_ast_isl): Add if_region pointer to region.
+ * graphite-poly.c (new_poly_dr): Remove macro.
+ (print_pdr): Same.
+ (new_gimple_poly_bb): Same.
+ (free_gimple_poly_bb): Same.
+ (print_scop_params): Same.
+ * graphite-poly.h (struct poly_dr): Same.
+ (struct poly_bb): Add new_bb.
+ (gbb_from_bb): Remove dead code.
+ (pbb_from_bb): Same.
+ * graphite-scop-detection.c (parameter_index_in_region_1): Same.
+ (parameter_index_in_region): Same.
+ (find_scop_parameters): Same.
+ (build_cross_bb_scalars_def): New.
+ (build_cross_bb_scalars_use): New.
+ (graphite_find_cross_bb_scalar_vars): New
+ (try_generate_gimple_bb): Reads and Writes.
+ (build_alias_set): Move.
+ (gather_bbs::before_dom_children): Gather bbs visited.
+ (build_scops): call build_alias_set.
+ * graphite-sese-to-poly.c (phi_arg_in_outermost_loop): Delete.
+ (remove_simple_copy_phi): Delete.
+ (remove_invariant_phi): Delete.
+ (simple_copy_phi_p): Delete.
+ (reduction_phi_p): Delete.
+ (isl_id_for_dr): Remove unused param.
+ (parameter_index_in_region_1): Remove macro usage.
+ (set_scop_parameter_dim): Same.
+ (add_param_constraints): Same.
+ (add_conditions_to_constraints): Same
+ (build_scop_iteration_domain): Same.
+ (pdr_add_alias_set): Comment.
+ (add_scalar_version_numbers): New.
+ (build_poly_dr): ISL id.
+ (build_scop_drs): Move.
+ (build_poly_sr_1): Same.
+ (insert_stmts): Remove.
+ (build_poly_sr): New.
+ (new_pbb_from_pbb): Delete.
+ (insert_out_of_ssa_copy_on_edge): Delete.
+ (create_zero_dim_array): Delete.
+ (scalar_close_phi_node_p): Delete.
+ (propagate_expr_outside_region): Delete.
+ (rewrite_close_phi_out_of_ssa): Delete.
+ (rewrite_phi_out_of_ssa): Delete.
+ (rewrite_degenerate_phi): Delete.
+ (rewrite_reductions_out_of_ssa): Delete.
+ (rewrite_cross_bb_scalar_dependence): Delete.
+ (handle_scalar_deps_crossing_scop_limits):
+ (rewrite_cross_bb_scalar_deps): Delete.
+ (build_poly_scop): Remove calls to out-of-ssa functions.
+ * graphite.c (graphite_transform_loops): Early return in case of
+ codegen error.
+ * sese.c (debug_rename_map_1): Delete.
+ (debug_rename_map): Delete.
+ (sese_record_loop): Remove macro.
+ (build_sese_loop_nests): Same.
+ (new_sese_info): Same.
+ (free_sese_info): Same.
+ (sese_insert_phis_for_liveouts):
+ (is_loop_closed_ssa_use): New.
+ (number_of_phi_nodes): New.
+ (bb_contains_loop_close_phi_nodes): New.
+ (bb_contains_loop_phi_nodes): New.
+ (phi_uses_name): New.
+ (is_valid_rename):
+ (get_rename): Add old_bb and loop_phi for more precise matching of
+ exprs.
+ (set_rename): Pass region.
+ (later_of_the_two): New.
+ (gsi_insert_earliest): New.
+ (collect_all_ssa_names): New.
+ (substitute_ssa_name): New.
+ (rename_all_uses): New.
+ (get_rename_from_scev): New.
+ (rename_uses): Pass old_bb for more precise matching of exprs.
+ (get_def_bb_for_const): New.
+ (get_new_name): New.
+ (get_loc): New.
+ (get_edges): New.
+ (copy_loop_phi_args): New.
+ (copy_loop_phi_nodes): New.
+ (get_loop_init_value): New.
+ (find_init_value): New.
+ (find_init_value_close_phi): New.
+ (copy_loop_close_phi_args): New.
+ (copy_loop_close_phi_nodes): New.
+ (add_phi_arg_for_new_expr): New.
+ (copy_cond_phi_args): New.
+ (copy_cond_phi_nodes): New.
+ (copy_phi_nodes): New.
+ (should_copy_to_new_region): New.
+ (set_rename_for_each_def): New.
+ (graphite_copy_stmts_from_block): Early return in case of error.
+ (copy_bb_and_scalar_dependences): Same.
+ * sese.h (vec_find): New.
+ (SESE_PARAMS): Delete.
+ (SESE_LOOPS): Delete.
+ (SESE_LOOP_NEST): Delete.
+ (sese_contains_loop): Remove macro usage.
+ (sese_nb_params): Same.
+ (struct gimple_poly_bb): Added read_scalar_refs, write_scalar_refs.
+
+2015-11-11 Abderrazek Zaafrani <a.zaafrani@samsung.com>
+
+ * graphite-sese-to-poly.c (build_scop_original_schedule): Call
+ isl_union_map_add_map on every pbb->schedule.
+
+2015-11-11 Tom de Vries <tom@codesourcery.com>
+
+ * tree-parloops.c (create_parallel_loop): Return void.
+
+2015-11-11 Tom de Vries <tom@codesourcery.com>
+
+ * tree-parloops.c (transform_to_exit_first_loop_alt): Insert new exit
+ block only when needed.
+
+2015-11-11 Uros Bizjak <ubizjak@gmail.com>
+
+ * config/alpha/alpha-protos.h (print_operand): Remove.
+ (print_operand_address): Remove.
+ * config/alpha/alpha.h (PRINT_OPERAND): Remove.
+ (PRINT_OPERAND_ADDRESS): Remove.
+ (PRINT_OPERAND_PUNCT_VALID_P): Remove.
+ * config/alpha/alpha.c (TARGET_PRINT_OPERAND): New hook define.
+ (TARGET_PRINT_OPERAND_ADDRESS): New hook define.
+ (TARGET_PRINT_OPERAND_PUNCT_VALID_P): New hook define.
+ (print_operand_address): Rename to...
+ (alpha_print_operand_address): ...this and make static.
+ (print_operand): Rename to...
+ (alpha_print_operand): ...this and make static.
+ (alpha_print_operand_punct_valid_p): New static function.
+
+2015-11-11 Richard Biener <rguenther@suse.de>
+
+ * tree-vectorizer.h (vect_slp_analyze_and_verify_instance_alignment):
+ Declare.
+ (vect_analyze_data_refs_alignment): Make loop vect specific.
+ (vect_verify_datarefs_alignment): Likewise.
+ * tree-vect-data-refs.c (vect_slp_analyze_data_ref_dependences):
+ Add missing continue.
+ (vect_compute_data_ref_alignment): Export.
+ (vect_compute_data_refs_alignment): Merge into...
+ (vect_analyze_data_refs_alignment): ... this.
+ (verify_data_ref_alignment): Split out from ...
+ (vect_verify_datarefs_alignment): ... here.
+ (vect_slp_analyze_and_verify_node_alignment): New function.
+ (vect_slp_analyze_and_verify_instance_alignment): Likewise.
+ * tree-vect-slp.c (vect_supported_load_permutation_p): Remove
+ misplaced checks on alignment.
+ (vect_slp_analyze_bb_1): Add fatal output parameter. Do
+ alignment analysis after SLP discovery and do it per instance.
+ (vect_slp_bb): When vect_slp_analyze_bb_1 fatally failed do not
+ bother to re-try using different vector sizes.
+
+2015-11-11 Nathan Sidwell <nathan@codesourcery.com>
+ Cesar Philippidis <cesar@codesourcery.com>
+
+ * gimplify.c (enum omp_region_type): Add ORT_ACC,
+ ORT_ACC_DATA, ORT_ACC_PARALLEL, ORT_ACC_KERNELS. Adjust ORT_NONE.
+ (gimple_add_tmp_var): Add ORT_ACC checks.
+ (gimplify_var_or_parm_decl): Likewise.
+ (omp_firstprivatize_variable): Likewise. Use ORT_TARGET_DATA as a
+ mask.
+ (omp_add_variable): Look in outer contexts for openacc and allow
+ reductions with other sharing. Add ORT_ACC and ORT_TARGET_DATA
+ checks.
+ (omp_notice_variable, omp_is_private, omp_check_private): Add
+ ORT_ACC checks.
+ (gimplify_scan_omp_clauses: Treat ORT_ACC as ORT_WORKSHARE.
+ Permit private openacc reductions.
+ (gimplify_oacc_cache): Specify ORT_ACC.
+ (gimplify_omp_workshare): Adjust OpenACC region types.
+ (gimplify_omp_target_update): Likewise.
+ * omp-low.c (scan_sharing_clauses): Remove Openacc
+ firstprivate sorry.
+ (lower-rec_input_clauses): Don't handle openacc firstprivate
+ references here.
+ (lower_omp_target): Emit initializers for openacc firstprivate vars.
+
+2015-11-11 Eric Botcazou <ebotcazou@adacore.com>
+
+ PR target/67265
+ * ira.c (ira_setup_eliminable_regset): Do not necessarily create the
+ frame pointer for stack checking if non-call exceptions aren't used.
+ * config/i386/i386.c (ix86_finalize_stack_realign_flags): Likewise.
+
+2015-11-11 Segher Boessenkool <segher@kernel.crashing.org>
+
+ * simplify-rtx.c (simplify_truncation): Simplify TRUNCATE of AND of
+ [LA]SHIFTRT.
+
+2015-11-11 Martin Liska <mliska@suse.cz>
+ Richard Biener <rguenther@suse.de>
+
+ PR rtl-optimization/68287
+ * lra-lives.c (lra_create_live_ranges_1): Reserve the right
+ number of elements.
+
+2015-11-11 Simon Dardis <simon.dardis@imgtec.com>
+
+ * config/mips/mips.c (mips_breakable_sequence_p): New function.
+ (mips_break_sequence): New function.
+ (mips_reorg_process_insns): Use them. Use compact branches in selected
+ situations.
+
+2015-11-11 Alan Lawrence <alan.lawrence@arm.com>
+
+ * fold-const.c (get_array_ctor_element_at_index): Fix whitespace, typo.
+
+2015-11-11 Jiong Wang <jiong.wang@arm.com>
+ Jim Wilson <wilson@gcc.gnu.org>
+
+ PR target/67305
+ * config/arm/arm.md (neon_vector_mem_operand): Return FALSE if strict
+ be true and eliminable registers mentioned.
+
+2015-11-11 Claudiu Zissulescu <claziss@synopsys.com>
+
+ * common/config/arc/arc-common.c (arc_handle_option): Handle ARCv2
+ options.
+ * config/arc/arc-opts.h: Add ARCv2 CPUs.
+ * config/arc/arc-protos.h (arc_secondary_reload_conv): Prototype.
+ * config/arc/arc.c (arc_secondary_reload): Handle subreg (reg)
+ situation, and store instructions with large offsets.
+ (arc_secondary_reload_conv): New function.
+ (arc_init): Add ARCv2 options.
+ (arc_conditional_register_usage): Select the proper register usage
+ for ARCv2 processors.
+ (arc_handle_interrupt_attribute): ILINK2 is only valid for ARCv1
+ architecture.
+ (arc_compute_function_type): Likewise.
+ (arc_print_operand): Handle new ARCv2 punctuation characters.
+ (arc_return_in_memory): ARCv2 ABI returns in registers up to 16
+ bytes.
+ (workaround_arc_anomaly, arc_asm_insn_p, arc_loop_hazard): New
+ function.
+ (arc_reorg, arc_hazard): Use it.
+ * config/arc/arc.h (TARGET_CPU_CPP_BUILTINS): Define __HS__ and
+ __EM__.
+ (ASM_SPEC): Add ARCv2 options.
+ (TARGET_NORM): ARC HS has norm instructions by default.
+ (TARGET_OPTFPE): Use optimized floating point emulation for ARC
+ HS.
+ (TARGET_AT_DBR_CONDEXEC): Only for ARC600 family.
+ (TARGET_EM, TARGET_HS, TARGET_V2, TARGET_MPYW, TARGET_MULTI):
+ Define.
+ (SIGNED_INT16, TARGET_MPY, TARGET_ARC700_MPY, TARGET_ANY_MPY):
+ Likewise.
+ (TARGET_ARC600_FAMILY, TARGET_ARCOMPACT_FAMILY): Likewise.
+ (TARGET_LP_WR_INTERLOCK): Likewise.
+ * config/arc/arc.md
+ (commutative_binary_mult_comparison_result_used, movsicc_insn)
+ (mulsi3, mulsi3_600_lib, mulsidi3, mulsidi3_700, mulsi3_highpart)
+ (umulsi3_highpart_i, umulsi3_highpart_int, umulsi3_highpart)
+ (umulsidi3, umulsidi3_700, cstoresi4, simple_return, p_return_i):
+ Use it for ARCv2.
+ (mulhisi3, mulhisi3_imm, mulhisi3_reg, umulhisi3, umulhisi3_imm)
+ (umulhisi3_reg, umulhisi3_reg, mulsi3_v2, nopv, bswapsi2)
+ (prefetch, divsi3, udivsi3 modsi3, umodsi3, arcset, arcsetltu)
+ (arcsetgeu, arcsethi, arcsetls, reload_*_load, reload_*_store)
+ (extzvsi): New pattern.
+ * config/arc/arc.opt: New ARCv2 options.
+ * config/arc/arcEM.md: New file.
+ * config/arc/arcHS.md: Likewise.
+ * config/arc/constraints.md (C3p): New constraint, accepts 1 and 2
+ values.
+ (Cm2): A signed 9-bit integer constant constraint.
+ (C62): An unsigned 6-bit integer constant constraint.
+ (C16): A signed 16-bit integer constant constraint.
+ * config/arc/predicates.md (mult_operator): Add ARCv2 processort.
+ (short_const_int_operand): New predicate.
+ * config/arc/t-arc-newlib: Add ARCv2 multilib options.
+ * doc/invoke.texi: Add documentation for -mcpu=<archs/arcem>
+ -mcode-density and -mdiv-rem.
+
+2015-11-11 Julia Koval <julia.koval@intel.com>
+
+ * config/i386/i386.c (m_SKYLAKE_AVX512): Fix typo.
+
+2015-11-11 Julia Koval <julia.koval@intel.com>
+
+ * config/i386/i386.c: Handle "skylake" and "skylake-avx512".
+
+2015-11-11 Martin Liska <mliska@suse.cz>
+
+ * gimple-ssa-strength-reduction.c (create_phi_basis):
+ Use auto_vec.
+ * passes.c (release_dump_file_name): New function.
+ (pass_init_dump_file): Used from this function.
+ (pass_fini_dump_file): Likewise.
+ * tree-sra.c (convert_callers_for_node): Use xstrdup_for_dump.
+ * var-tracking.c (vt_initialize): Use pool_allocator.
+
+2015-11-11 Richard Biener <rguenth@gcc.gnu.org>
+ Jiong Wang <jiong.wang@arm.com>
+
+ PR tree-optimization/68234
+ * tree-vrp.c (vrp_visit_phi_node): Extend SCEV check to those loop PHI
+ node which estimiated to be VR_VARYING initially.
+
+2015-11-11 Robert Suchanek <robert.suchanek@imgtec.com>
+
+ * regname.c (scan_rtx_reg): Check the matching number of consecutive
+ registers when tying chains.
+ (build_def_use): Move terminated_this_insn earlier in the function.
+
+2015-11-10 Mike Frysinger <vapier@gentoo.org>
+
+ * configure.ac: Use = with test and not ==.
+ * configure: Regenerated.
+
+2015-11-11 David Edelsohn <dje.gcc@gmail.com>
+
+ * config/rs6000/aix.h (TARGET_OS_AIX_CPP_BUILTINS): Add cpu and
+ machine asserts. Update defines for 64 bit.
+
+2015-11-11 Charles Baylis <charles.baylis@linaro.org>
+
+ PR target/63870
+ * config/arm/neon.md (neon_vld1_lane<mode>): Remove error for invalid
+ lane number.
+ (neon_vst1_lane<mode>): Likewise.
+ (neon_vld2_lane<mode>): Likewise.
+ (neon_vst2_lane<mode>): Likewise.
+ (neon_vld3_lane<mode>): Likewise.
+ (neon_vst3_lane<mode>): Likewise.
+ (neon_vld4_lane<mode>): Likewise.
+ (neon_vst4_lane<mode>): Likewise.
+
+2015-11-11 Charles Baylis <charles.baylis@linaro.org>
+
+ PR target/63870
+ * config/arm/arm-builtins.c: (arm_load1_qualifiers) Use
+ qualifier_struct_load_store_lane_index.
+ (arm_storestruct_lane_qualifiers) Likewise.
+ * config/arm/neon.md: (neon_vld1_lane<mode>) Reverse lane numbers for
+ big-endian.
+ (neon_vst1_lane<mode>) Likewise.
+ (neon_vld2_lane<mode>) Likewise.
+ (neon_vst2_lane<mode>) Likewise.
+ (neon_vld3_lane<mode>) Likewise.
+ (neon_vst3_lane<mode>) Likewise.
+ (neon_vld4_lane<mode>) Likewise.
+ (neon_vst4_lane<mode>) Likewise.
+
+2015-11-11 Charles Baylis <charles.baylis@linaro.org>
+
+ PR target/63870
+ * config/arm/arm-builtins.c (enum arm_type_qualifiers): New enumerator
+ qualifier_struct_load_store_lane_index.
+ (builtin_arg): New enumerator NEON_ARG_STRUCT_LOAD_STORE_LANE_INDEX.
+ (arm_expand_neon_args): New parameter. Remove ellipsis. Handle NEON
+ argument qualifiers.
+ (arm_expand_neon_builtin): Handle new NEON argument qualifier.
+ * config/arm/arm.h (NEON_ENDIAN_LANE_N): New macro.
+
+2015-11-10 Nathan Sidwell <nathan@codesourcery.com>
+
+ * config/nvptx/nvptx.opt (moptimize): New flag.
+ * config/nvptx/nvptx.c (nvptx_option_override): Set nvptx_optimize
+ default.
+ (nvptx_optimize_inner): New.
+ (nvptx_process_pars): Call it when optimizing.
+ * doc/invoke.texi (Nvidia PTX Options): Document -moptimize.
+
+2015-11-10 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
+
+ * config/rs6000/rs6000.c (rs6000_secondary_reload_direct_move):
+ Remove redundant code.
+
+2015-11-10 Jeff Law <law@redhat.com>
+
+ * config/ft32/ft32.c (ft32_print_operand): Supply mode to
+ call to output_address.
+ * config/moxie/moxie.c (moxie_print_operand_address): Similarly.
+ Add unnamed machine_mode argument.
+
+2015-11-10 Michael Meissner <meissner@linux.vnet.ibm.com>
+
+ * config.gcc (powerpc*-*-*, rs6000*-*-*): Add power9 to hosts that
+ default to 64-bit.
+
2015-11-10 Uros Bizjak <ubizjak@gmail.com>
* config/i386/i386.md (*movabs<mode>_1): Add explicit
@@ -410,6 +1447,7 @@
Fix comment typo.
2015-11-09 Michael Meissner <meissner@linux.vnet.ibm.com>
+ Peter Bergner <bergner@vnet.ibm.com>
* config/rs6000/rs6000.opt (-mpower9-fusion): Add new switches for
ISA 3.0 (power9).
diff --git a/gcc/DATESTAMP b/gcc/DATESTAMP
index 7ed3ab068e1..aeec57d8253 100644
--- a/gcc/DATESTAMP
+++ b/gcc/DATESTAMP
@@ -1 +1 @@
-20151110
+20151113
diff --git a/gcc/Makefile.in b/gcc/Makefile.in
index 34d23565f89..5c294df7b8a 100644
--- a/gcc/Makefile.in
+++ b/gcc/Makefile.in
@@ -1158,7 +1158,7 @@ CXX_TARGET_OBJS=@cxx_target_objs@
FORTRAN_TARGET_OBJS=@fortran_target_objs@
# Object files for gcc many-languages driver.
-GCC_OBJS = gcc.o gcc-main.o ggc-none.o
+GCC_OBJS = gcc.o gcc-main.o ggc-none.o spellcheck.o
c-family-warn = $(STRICT_WARN)
@@ -1263,6 +1263,7 @@ OBJS = \
fold-const-call.o \
function.o \
fwprop.o \
+ gcc-rich-location.o \
gcse.o \
gcse-common.o \
ggc-common.o \
@@ -1276,6 +1277,7 @@ OBJS = \
gimple-pretty-print.o \
gimple-ssa-backprop.o \
gimple-ssa-isolate-paths.o \
+ gimple-ssa-split-paths.o \
gimple-ssa-strength-reduction.o \
gimple-streamer-in.o \
gimple-streamer-out.o \
@@ -1403,6 +1405,8 @@ OBJS = \
shrink-wrap.o \
simplify-rtx.o \
sparseset.o \
+ spellcheck.o \
+ spellcheck-tree.o \
sreal.o \
stack-ptr-mod.o \
statistics.o \
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog
index ca1cb618be6..00c044a921f 100644
--- a/gcc/ada/ChangeLog
+++ b/gcc/ada/ChangeLog
@@ -1,3 +1,636 @@
+2015-11-13 David Malcolm <dmalcolm@redhat.com>
+
+ * gcc-interface/trans.c (Sloc_to_locus): Add line_table param when
+ calling linemap_position_for_line_and_column.
+
+2015-11-13 Hristian Kirtchev <kirtchev@adacore.com>
+
+ * exp_attr.adb: Minor reformatting.
+
+2015-11-13 Pascal Obry <obry@adacore.com>
+
+ * adaint.c: Ensure that it is possible to get killed process
+ status on Windows.
+
+2015-11-13 Arnaud Charlet <charlet@adacore.com>
+
+ * gnat_rm.texi, gnat_ugn.texi, doc/gnat_ugn/gnat_project_manager.rst
+ doc/gnat_ugn/building_executable_programs_with_gnat.rst,
+ doc/gnat_ugn/platform_specific_information.rst,
+ doc/gnat_ugn/gnat_and_program_execution.rst,
+ doc/gnat_ugn/gnat_utility_programs.rst,
+ doc/gnat_ugn/the_gnat_compilation_model.rst,
+ doc/gnat_rm/compatibility_and_porting_guide.rst,
+ doc/gnat_rm/implementation_defined_pragmas.rst,
+ doc/gnat_rm/representation_clauses_and_pragmas.rst,
+ doc/gnat_rm/standard_and_implementation_defined_restrictions.rst:
+ Update documentation.
+
+2015-11-13 Eric Botcazou <ebotcazou@adacore.com>
+
+ * sigtramp-ios.c, init.c: Minor cosmetic tweaks.
+
+2015-11-13 Hristian Kirtchev <kirtchev@adacore.com>
+
+ * s-gloloc.adb, g-debpoo.adb: Minor reformatting.
+
+2015-11-13 Ed Schonberg <schonberg@adacore.com>
+
+ * sem_ch5.adb (Analyze_Iterator_Specification): Improve error
+ message for the case the iterable name (array or container)
+ is a component that depends on a discriminant.
+
+2015-11-13 Ed Schonberg <schonberg@adacore.com>
+
+ * sem_ch4.adb (Indicate_Name_And_Type): If the analysis of
+ one interpretation succeeds, set type of name in call, for
+ completeness.
+ (Try_Container_Indexing): If there are multiple indexing
+ functions, collect possible interpretations that are compatible
+ with given parameters, and add implicit dereference types when
+ present.
+ * sem_util.adb (Build_Explicit_Dereference): If the expression
+ is an overloaded function call use the given discriminant to
+ resolve the call, and set properly the type of the call and of
+ the resulting dereference.
+
+2015-11-13 Hristian Kirtchev <kirtchev@adacore.com>
+
+ * sem_prag.adb (Analyze_Pragma): Pragma Constant_After_Elaboration can
+ now apply to a variable without an initialization expression.
+
+2015-11-13 Hristian Kirtchev <kirtchev@adacore.com>
+
+ * exp_ch9.adb (Add_Matching_Formals): Parameter Actuals is now of mode
+ IN OUT. Create a new list when list Actuals is not present.
+ (Build_Contract_Wrapper): Create the wrapper
+ only when the entry has at least on checked contract case or
+ pre/postcondition. Ensure that the call to the original entry
+ lacks an actual parameter list when the entry appears without
+ formal parameters.
+ (Expand_Entry_Declaration): Code cleanup.
+
+2015-11-13 Hristian Kirtchev <kirtchev@adacore.com>
+
+ * sem_ch13.adb (Analyze_Aspect_Specifications): Continue the analysis
+ after encountering an illegal aspect Part_Of.
+
+2015-11-13 Ed Schonberg <schonberg@adacore.com>
+
+ * exp_attr.adb (Expand_N_Attribute_Reference, case
+ Overlaps_Storage): Add copies for nodes that represent the integer
+ addresses of the two actuals, to prevent identical nodes in the
+ tree, which the backend cannot handle properly.
+
+2015-11-13 Bob Duff <duff@adacore.com>
+
+ * sem_ch6.adb (Check_Private_Overriding): Change
+ name of Parent_Is_Private to be Overrides_Private_Part_Op,
+ and use Unit_Declaration_Node.
+
+2015-11-13 Bob Duff <duff@adacore.com>
+
+ * sinfo.ads: Minor comment fix.
+ * sem_ch6.adb: Minor reformatting.
+
+2015-11-13 Jerome Lambourg <lambourg@adacore.com>
+
+ * tracebak.c: Do not use the GCC Unwinder to retrieve traceback
+ for x86_64-vx7.
+
+2015-11-13 Eric Botcazou <ebotcazou@adacore.com>
+
+ * init.c [Darwin/arm64]: Fix typo.
+ * sigtramp-armios.c: Remove.
+ * sigtramp-ios.c: New file.
+
+2015-11-13 Doug Rupp <rupp@adacore.com>
+
+ * s-stchop-vxworks.adb (Set_Stack_Limit_For_Current_Task): Set stack
+ limit to 12000 decimal vice 12000 hexadecimal.
+
+2015-11-13 Hristian Kirtchev <kirtchev@adacore.com>
+
+ * exp_ch9.adb, exp_fixd.adb, exp_util.adb, g-debpoo.adb,
+ impunit.adb, scos.ads, sem_ch4.adb, sem_prag.adb,
+ s-stchop-vxworks.adb: Minor reformatting.
+
+2015-11-13 Tristan Gingold <gingold@adacore.com>
+
+ * s-rident.ads (Profile_Info): Enable Pure_Barriers for
+ GNAT_Extended_Ravenscar.
+
+2015-11-13 Bob Duff <duff@adacore.com>
+
+ * sem_ch6.adb (Check_Private_Overriding): Detect the special
+ case where the overriding subprogram is overriding a subprogram
+ that was declared in the same private part.
+
+2015-11-13 Gary Dismukes <dismukes@adacore.com>
+
+ * exp_ch9.adb: Minor reformatting and typo fixes.
+
+2015-11-13 Eric Botcazou <ebotcazou@adacore.com>
+
+ * init.c [Darwin/arm64]: Move __gnat_sigtramp implementation to...
+ (__gnat_map_signal): New function.
+ (__gnat_error_handler):
+ Adjust the context and call above function.
+ * sigtramp-armios.c: ...here. New file.
+
+2015-11-13 Arnaud Charlet <charlet@adacore.com>
+
+ * bcheck.adb (Check_Consistent_Restrictions): Do not check
+ consistency of No_Dependence for runtime units.
+
+2015-11-13 Tristan Gingold <gingold@adacore.com>
+
+ * s-rident.ads (Restriction_Id): Add Pure_Barriers.
+ * restrict.ads (Implementation_Restriction): Add Pure_Barriers.
+ * exp_ch9.adb (Expand_Entry_Barrier): Create
+ Is_Simple_Barrier_Name function, add Is_Pure_Barrier and
+ Check_Pure_Barriers.
+
+2015-11-13 Ed Schonberg <schonberg@adacore.com>
+
+ * sem_util.adb (Get_Cursor_Type): To determine whether a function
+ First is the proper Iterable primitive, use the base type of the
+ first formal rather than the type. This is needed in the unusual
+ case where the Iterable aspect is specified for an integer type.
+
+2015-11-13 Ed Schonberg <schonberg@adacore.com>
+
+ * sem_ch4.adb (Constant_Indexing_OK): If the indexing is the
+ prefix of a procedure call assume that constant indexing is
+ not chosen.
+
+2015-11-13 Eric Botcazou <ebotcazou@adacore.com>
+
+ * sigtramp.h: Fix formatting throughout, do not include other
+ headers, add missing preprocessor condition and 'extern' keywords.
+ * sigtramp-armdroid.c: Include <sys/ucontext.h>.
+ * init.c [Android]: Likewise.
+
+2015-11-13 Eric Botcazou <ebotcazou@adacore.com>
+
+ * init.c [Darwin/arm64] (__gnat_sigtramp): Do not increment PC,
+ fix CFI and add return sequence.
+
+2015-11-13 Ed Schonberg <schonberg@adacore.com>
+
+ * exp_fixd.adb (Expand_Convert_Float_To_Fixed): If the conversion
+ comes from an attribute reference 'Round, the operation must
+ round and not truncate.
+ * sem_res.adb, sem_ch6.adb: Minor editing.
+
+2015-11-12 Philippe Gil <gil@adacore.com>
+
+ * g-debpoo.adb (Print_Address): print address in hexadecimal as
+ in previous GNAT version (without secondary stack use)
+ (Deallocate): Deallocate calling once Unlock_Task.all when it
+ raise exception.
+
+2015-11-12 Ed Schonberg <schonberg@adacore.com>
+
+ * sem_ch3.adb (Analyze_Subtype_Declaration): Remove redundant
+ copying of dimensions from parent type to subtype. This is
+ properly done in Analyze_Dimension.
+ * sem_dim.adb (Analyze_Dimension_Subtype_Declaration): Add entity
+ to error message, so that reference to entity can be formatted
+ properly.
+ * opt.ads: Fix typo.
+
+2015-11-12 Bob Duff <duff@adacore.com>
+
+ * impunit.adb, lib-xref.ads, restrict.ads, scos.ads, sem_attr.ads,
+ types.ads: Get rid of some global variables.
+ * output.adb, output.ads: Move some global variables to the body.
+
+2015-11-12 Yannick Moy <moy@adacore.com>
+
+ * lib-xref-spark_specific.adb
+ (Is_Constant_Object_Without_Variable_Input): Add special case
+ for imported constants.
+
+2015-11-12 Philippe Gil <gil@adacore.com>
+
+ * g-debpoo.adb (Allocate): Avoid having allocations not handled.
+
+2015-11-12 Ed Schonberg <schonberg@adacore.com>
+
+ * checks.adb (Apply_Scalar_Range_Check): If the expression is
+ a real literal and the context type has static bounds, remove
+ range check when possible.
+
+2015-11-12 Ed Schonberg <schonberg@adacore.com>
+
+ * sem_util.adb (Collect_Primitive_Operations): If the type is
+ derived from a type declared elsewhere that has an incomplete
+ type declaration, the primitives are found in the scope of the
+ type nat that of its ancestor.
+
+2015-11-12 Arnaud Charlet <charlet@adacore.com>
+
+ * switch-c.adb, debug.adb, osint-c.adb, gnat1drv.adb: Remove -gnatd.V
+ debug switch.
+ * exp_aggr.adb, exp_util.adb: Fix typos.
+
+2015-11-12 Jerome Lambourg <lambourg@adacore.com>
+
+ * init.c: Properly adjust PC values in case of signals.
+
+2015-11-12 Bob Duff <duff@adacore.com>
+
+ * sem_prag.adb (Check_Arg_Is_Library_Level_Local_Name): A
+ pragma that comes from an aspect does not "come from source",
+ so we need to test whether it comes from an aspect.
+
+2015-11-12 Arnaud Charlet <charlet@adacore.com>
+
+ * switch-c.adb, gnat1drv.adb, opt.ads: Reserve -gnateg for generation
+ of C headers.
+
+2015-11-12 Arnaud Charlet <charlet@adacore.com>
+
+ * back_end.adb, opt.ads (Debugger_Level): Update comment.
+ (Scan_Back_End_Switches): Set Debugger_Level.
+
+2015-11-12 Bob Duff <duff@adacore.com>
+
+ * fmap.adb, debug.ads, checks.adb, exp_ch11.adb: Minor edits.
+
+2015-11-12 Doug Rupp <rupp@adacore.com>
+
+ * s-stchop-vxworks.adb (Stack_Limit): Export vice Import.
+
+2015-11-12 Gary Dismukes <dismukes@adacore.com>
+
+ * sem_dim.adb: Minor reformatting.
+
+2015-11-12 Gary Dismukes <dismukes@adacore.com>
+
+ * gnat1drv.adb, opt.ads: Minor reformatting.
+
+2015-11-12 Ed Schonberg <schonberg@adacore.com>
+
+ * sem_ch3.adb (Analyze_Number_Declaration): Call Analyze_Dimension,
+ to propagate dimension information from expression to named
+ number.
+ * sem_dim.ads: Documentation: number declaration and explicit
+ dereference can carry dimension information.
+ * sem_dim.adb (Analyze_Dimension_Number_Declaration): New
+ procedure, to propagate dimension information from expression
+ of declaration to named number, whose type becomes one of the
+ dimensioned base types rather than universal real.
+ (Analyze_Dimension_Binary_Op):
+ a) If one operand is a literal that is the value of a declared
+ constant after constant-foloding, use the dimensions of the
+ declared constant.
+ b) If an operand is a literal that is a contant-folded expression,
+ and expander is active, do not report a dimension mismatch if
+ literal does not carry them, because dimension matching will
+ have been checked previously.
+
+2015-11-12 Ed Schonberg <schonberg@adacore.com>
+
+ * sem_ch8.adb (Find_Selected_Component): In a synchronized
+ body, a reference to an operation of an object of the same
+ synchronized type was always interpreted as a reference to the
+ current instance. This is not always the case, as the prefix of
+ the reference may designate an object of the same type declared
+ in the enclosing context prior to the body.
+
+2015-11-12 Arnaud Charlet <charlet@adacore.com>
+
+ * impunit.ads, impunit.adb (Get_Kind_Of_File): New. Cleaned up
+ implementation from previous Get_Kind_Of_Unit.
+ (Get_Kind_Of_Unit): Reimplemented using Get_Kind_Of_File.
+ * debug.adb: Remove d.4 switch, no longer used.
+ * opt.ads: Update doc on Debugger_Level.
+ * gnat1drv.adb: Code clean ups.
+ * sinput.ads: minor fix in comment
+
+2015-11-12 Bob Duff <duff@adacore.com>
+
+ * sinfo.adb, sinfo.ads, sem_ch6.adb, atree.ads: Add
+ Was_Expression_Function flag, which is set in sem_ch6.adb when
+ converting an Expression_Function into a Subprogram_Body.
+
+2015-11-12 Pascal Obry <obry@adacore.com>
+
+ * usage.adb: Update overflow checking documentation.
+
+2015-11-12 Tristan Gingold <gingold@adacore.com>
+
+ * snames.ads-tmpl: Name_Gnat_Extended_Ravenscar: New identifier.
+ * s-rident.ads (Profile_Name): Add GNAT_Extended_Ravenscar.
+ (Profile_Info): Add new entry for GNAT_Extended_Ravenscar.
+ * sem_prag.adb (Set_Ravenscar_Profile): Add Profile parameter
+ to handle various ravenscar profiles. Adjust error messages.
+ (Analyze_Pragma): Handle GNAT_Extended_Ravenscar profile.
+ * targparm.adb (Get_Target_Parameters): Handle
+ GNAT_Extended_Ravenscar profile.
+
+2015-11-12 Ed Schonberg <schonberg@adacore.com>
+
+ * sem_warn.adb (Warn_On_Unreferenced_Entity): If the entity is an
+ Out_Parameter the front-end does not emit any warning on it, so
+ do not suppress warnings on the entity because the backend might
+ be able to determine an uninitialized path and warn accordingly.
+
+2015-11-12 Ed Schonberg <schonberg@adacore.com>
+
+ * sem_ch4.adb (Analyze_Selected_Component): Diagnose an attempt
+ to reference an internal entity from a synchronized type from
+ within the body of that type, when the prefix of the selected
+ component is not the current instance.
+
+2015-11-12 Ed Falis <falis@adacore.com>
+
+ * s-stchop-vxworks.adb: Clean up in stack checking code.
+
+2015-11-12 Gary Dismukes <dismukes@adacore.com>
+
+ * exp_ch6.adb (Is_Build_In_Place_Function_Call):
+ Test Expression (N) in N_Type_Conversion cases as well,
+ since conversions can occur in actual parameter contexts.
+ (Make_Build_In_Place_Call_In_Anonymous_Context): Retrieve
+ function call from Expression (Func_Call) when Nkind (Func_Call)
+ is N_Type_Conversion, since conversions are allowed in "anonymous"
+ contexts (specifically, as actual parameters).
+
+2015-11-12 Thomas Quinot <quinot@adacore.com>
+
+ * sem_ch4.adb (analyze_If_Expression): Reject IF-expression where
+ THEN-expression is overloaded and none of its interpretation is
+ compatible with the ELSE-expression.
+
+2015-11-12 Jerome Lambourg <lambourg@adacore.com>
+
+ * init.c: Do not try to mess with the MSR values in RTP mode:
+ not needed and forbidden.
+
+2015-11-12 Ed Schonberg <schonberg@adacore.com>
+
+ * exp_attr.adb (Compile_Stream_Body_In_Scope): Do not install
+ full view of a type that has pragma Stream_Convert, because
+ this indicates special processing for the stream operations of
+ the type.
+
+2015-11-12 Jerome Lambourg <lambourg@adacore.com>
+
+ * init.c: Do not try to mess with the MSR values in RTP mode:
+ not needed and forbidden.
+
+2015-11-12 Ed Schonberg <schonberg@adacore.com>
+
+ * exp_attr.adb (Compile_Stream_Body_In_Scope): Do not install
+ full view of a type that has pragma Stream_Convert, because
+ this indicates special processing for the stream operations of
+ the type.
+
+2015-11-12 Gary Dismukes <dismukes@adacore.com>
+
+ * exp_ch5.adb, sem_ch3.adb, exp_util.ads, inline.adb, freeze.adb,
+ sem_util.adb, sem_util.ads, par-ch6.adb, sem_elab.adb: Minor
+ reformatting and a typo fix.
+
+2015-11-12 Ed Schonberg <schonberg@adacore.com>
+
+ * sem_ch12.adb (Preanalyze_Actuals): Add guard on use of
+ Incomplete_Actuals, which are only stored for a package
+ instantiation, in order to place the instance in the body of
+ the enclosing unit.
+
+2015-11-12 Ed Schonberg <schonberg@adacore.com>
+
+ * exp_intr.adb: Add legality checks on calls to a
+ Generic_Dispatching_Constructor: the given tag must be defined,
+ it cannot be the tag of an abstract type, and its accessibility
+ level must not be greater than that of the constructor.
+
+2015-11-12 Ed Schonberg <schonberg@adacore.com>
+
+ * sem_ch4.adb (Try_Container_Indexing, Constant_Indexing_OK): If
+ the context is an overloaded call, assume that Constant_Indexing
+ is not OK if an interpretation has an assignable parameter
+ corresponding to the indexing expression.
+
+2015-11-12 Jerome Lambourg <lambourg@adacore.com>
+
+ * init.c (__gnat_error_handler): Force the SPE bit of the MSR
+ when executing on e500v2 CPU.
+
+2015-11-12 Hristian Kirtchev <kirtchev@adacore.com>
+
+ * sem_prag.adb (Analyze_Constituent): Stop the
+ analysis after detecting a misplaced constituent as this is a
+ critical error.
+
+2015-11-12 Hristian Kirtchev <kirtchev@adacore.com>
+
+ * sem_ch10.adb, atree.adb: Minor reformatting.
+
+2015-11-12 Hristian Kirtchev <kirtchev@adacore.com>
+
+ * sem_elab.adb (Check_A_Call): Add new variable
+ Is_DIC_Proc. Report elaboration issue in SPARK concerning calls
+ to source subprograms or nontrivial Default_Initial_Condition
+ procedures. Add specialized error message to avoid outputting
+ the internal name of the Default_Initial_Condition procedure.
+ * sem_util.ads, sem_util.adb
+ (Is_Non_Trivial_Default_Init_Cond_Procedure): New routine.
+
+2015-11-12 Hristian Kirtchev <kirtchev@adacore.com>
+
+ * contracts.adb (Analyze_Entry_Or_Subprogram_Body_Contract):
+ Remove the guard concerning entry bodies as it is spurious.
+ (Analyze_Entry_Or_Subprogram_Contract): Skip the analysis of
+ Contract_Cases when not annotating the tree.
+ * einfo.adb: Node25 is now used as Contract_Wrapper.
+ (Contract_Wrapper): New routine.
+ (PPC_Wrapper): Removed.
+ (Set_Contract_Wrapper): New routine.
+ (Set_PPC_Wrapper): Removed.
+ (Write_Field25_Name): Add output for Contract_Wrapper. Remove
+ output for PPC_Wrapper.
+ * einfo.ads: New attribute Contract_Wrapper along with usage
+ in entities. Remove attribute PPC_Wrapper along with usage in nodes.
+ (Contract_Wrapper): New routine along with pragma Inline.
+ (PPC_Wrapper): Removed along with pragma Inline.
+ (Set_Contract_Wrapper): New routine along with pragma Inline.
+ (Set_PPC_Wrapper): Removed along with pragma Inline.
+ * exp_ch9.adb (Build_Contract_Wrapper): New routine.
+ (Build_PPC_Wrapper): Removed.
+ (Build_Protected_Entry): Code cleanup.
+ (Expand_Entry_Declaration): Create a contract wrapper
+ which now verifies Contract_Cases along with pre/postconditions.
+ (Expand_N_Task_Type_Declaration): There is no need to check
+ whether an entry has pre/postconditions as this is now done
+ in Build_Contract_Wrapper.
+ * sem_ch13.adb (Analyze_Aspect_Specifications): Pragma
+ Refined_Post is now properly inserted in entry bodies.
+ (Insert_Pragma): Add circuitry to insert in an entry body. Redo
+ the instance "header" circuitry. Remove the now obsolete special
+ case of inserting pre- conditions.
+ * sem_prag.adb (Analyze_Pragma): Pragma Contract_Cases now
+ applies to entries.
+ * sem_res.adb (Resolve_Entry_Call): Update the calls to
+ PPC_Wrapper.
+
+2015-11-12 Hristian Kirtchev <kirtchev@adacore.com>
+
+ * exp_attr.adb, freeze.adb, sem_util.adb, sem_ch13.adb: Minor
+ reformatting.
+
+2015-11-12 Ed Schonberg <schonberg@adacore.com>
+
+ * exp_attr.adb (Compile_Stream_Body_In_Scope): When compiling
+ a stream operation for an array type, install the scope of the
+ component type if it is private and not in scope, to prevent
+ spurious errors if the full view of the component type has
+ defaulted discriminants.
+
+2015-11-12 Eric Botcazou <ebotcazou@adacore.com>
+
+ * sem_ch13.adb (Analyze_Attribute_Definition_Clause): For a
+ variable, if this is not an overlay, set on Treat_As_Volatile on it.
+ * gcc-interface/decl.c (E_Variable): Do not force the type to volatile
+ for address clauses. Tweak and adjust various RM references.
+
+2015-11-12 Eric Botcazou <ebotcazou@adacore.com>
+
+ * checks.ads: Minor comment fix.
+
+2015-11-12 Arnaud Charlet <charlet@adacore.com>
+
+ * gnat_rm.texi, gnat_ugn.texi,
+ doc/gnat_ugn/platform_specific_information.rst,
+ doc/gnat_ugn/gnat_and_program_execution.rst,
+ doc/gnat_ugn/the_gnat_compilation_model.rst,
+ doc/gnat_rm/standard_and_implementation_defined_restrictions.rst,
+ doc/gnat_rm/implementation_defined_pragmas.rst: Update documentation.
+
+2015-11-12 Eric Botcazou <ebotcazou@adacore.com>
+
+ * einfo.ads (Overlays_Constant): Document usage for E_Constant.
+ * freeze.adb (Warn_Overlay): Small reformatting.
+ (Check_Address_Clause): Deal specifically with deferred
+ constants. For a variable or a non-imported constant
+ overlaying a constant object and with initialization value,
+ either remove the initialization or issue a warning. Fix a
+ couple of typos.
+ * sem_util.adb (Note_Possible_Modification): Overhaul the condition for
+ the warning on modified constants and use Find_Overlaid_Entity instead
+ of doing it manually.
+ * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Compute and
+ set Overlays_Constant once on entry. Do not treat the overlaid
+ entity as volatile. Do not issue the warning on modified
+ constants here.
+ * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Constant>: Remove
+ over-restrictive condition for the special treatment of deferred
+ constants.
+ <E_Variable>: Remove obsolete associated code.
+
+2015-11-12 Eric Botcazou <ebotcazou@adacore.com>
+
+ * gcc-interface/trans.c (gnat_to_gnu) <N_Subprogram_Renaming_Decl>: Do
+ not materialize renamed subprograms if only annotating types.
+
+2015-11-12 Pierre-Marie de Rodat <derodat@adacore.com>
+
+ * gcc-interface/decl.c (gnat_to_gnu_entity): Create
+ IMPORTED_DECL nodes to describe the subprogram renamings which
+ are relevant at debug time.
+ * gcc-interface/gigi.h (get_debug_scope): Add declaration.
+ * gcc-interface/trans.c (Identifier_to_gnu): Consider
+ N_Defining_Operator_Symbol as valid entities.
+ (gnat_to_gnu): Handle N_Defining_Operator_Symbol the same way as
+ other entities. Introduce a specific handling for
+ N_Subprogram_Renaming_Declaration: call gnat_to_gnu_entity on
+ the entity defined for relevant ones.
+ (process_decls): Process subprogram renaming declarations during
+ the second pass only.
+ * gcc-interface/utils.c (get_debug_scope): Make it external.
+ Consider N_Defining_Operator_Symbol as valid entities.
+ (gnat_write_global_declarations): Output debugging information
+ for top-level imported declarations.
+
+2015-11-12 Emmanuel Briot <briot@adacore.com>
+
+2015-11-12 Emmanuel Briot <briot@adacore.com>
+
+ * s-os_lib.ads: Documentation update.
+
+2015-11-12 Arnaud Charlet <charlet@adacore.com>
+
+ * s-taprop-vxworks.adb, s-osinte-vxworks.ads: Use a single import of
+ taskDelay to avoid confusion.
+
+2015-11-12 Ed Schonberg <schonberg@adacore.com>
+
+ * exp_ch6.adb (Expand_Simple_Function_Return): If the return
+ type is class-wide and the expression is a view conversion,
+ remove the conversion to prevent overriding of the tag, which
+ must be that of the object being returned.
+
+2015-11-12 Tristan Gingold <gingold@adacore.com>
+
+ * bindgen.adb (Gen_Adainit): Code cleanup.
+
+2015-11-12 Hristian Kirtchev <kirtchev@adacore.com>
+
+ * s-stalib.ads: Code cleanup.
+
+2015-11-12 Ed Schonberg <schonberg@adacore.com>
+
+ * sem_ch3.adb (Analyze_Incomplete_Type_Decl): small optimization.
+ (Analyze_Subtype_Declaration): For floating point types,
+ inherit dimensions.
+ (OK_For_Limited_Init_In_05): Handle properly a conditional
+ expression whose condition is static, and is rewritten as the
+ branch that will be executed.
+
+2015-11-12 Ed Schonberg <schonberg@adacore.com>
+
+ * sem_attr.adb (Resolve_Attribute, case 'Access): If the context
+ type is an access constant type, do not mark the attribute
+ reference as a possible modification of the prefix.
+
+2015-11-12 Steve Baird <baird@adacore.com>
+
+ * sem_ch6.adb (Analyze_Procedure_Call) If CodePeer_Mode is True,
+ do not analyze the expression of a machine code insertion.
+ * sem_ch13.adb (Analyze_Code_Statement) If CodePeer_Mode is True,
+ mark the N_Code_Statement node as analyzed and do nothing else.
+
+2015-11-12 Ed Schonberg <schonberg@adacore.com>
+
+ * sem_ch6.adb (Check_Limited_Return): Make global to package
+ for use elsewhere.
+ (Analyze_Expression_Function): Remove duplicated code, pre-analyze
+ expression to capture names and call Check_Limited_Return so
+ that semantic checks are identical to those for regular functions
+ returning limited types.
+
+2015-11-12 Gary Dismukes <dismukes@adacore.com>
+
+ * bindgen.adb: Fix typo.
+ * sem_ch6.adb: Minor reformatting.
+
+2015-11-12 Emmanuel Briot <briot@adacore.com>
+
+ * s-os_lib.adb (Argument_String_To_List): fix handling of
+ windows separators
+
+2015-11-11 Andrew MacLeod <amacleod@redhat.com>
+
+ * gcc-interface/decl.c: Remove unused header files.
+ * gcc-interface/misc.c: Likewise.
+ * gcc-interface/targtyps.c: Likewise.
+ * gcc-interface/trans.c: Likewise.
+ * gcc-interface/utils.c: Likewise.
+
2015-11-08 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/gigi.h (set_reverse_storage_order_on_pad_type):
diff --git a/gcc/ada/adaint.c b/gcc/ada/adaint.c
index 5fef49cc4c0..1c6d323f0e7 100644
--- a/gcc/ada/adaint.c
+++ b/gcc/ada/adaint.c
@@ -3200,8 +3200,7 @@ __gnat_kill (int pid, int sig, int close ATTRIBUTE_UNUSED)
return;
if (sig == 9)
{
- TerminateProcess (h, 0);
- __gnat_win32_remove_handle (NULL, pid);
+ TerminateProcess (h, 1);
}
else if (sig == SIGINT)
GenerateConsoleCtrlEvent (CTRL_C_EVENT, pid);
diff --git a/gcc/ada/atree.adb b/gcc/ada/atree.adb
index b03da914165..1afaca6908d 100644
--- a/gcc/ada/atree.adb
+++ b/gcc/ada/atree.adb
@@ -794,7 +794,7 @@ package body Atree is
------------------------
function Copy_Separate_Tree (Source : Node_Id) return Node_Id is
- New_Id : Node_Id;
+ New_Id : Node_Id;
function Copy_Entity (E : Entity_Id) return Entity_Id;
-- Copy Entity, copying only the Ekind and Chars fields
@@ -803,8 +803,8 @@ package body Atree is
-- Copy list
function Possible_Copy (Field : Union_Id) return Union_Id;
- -- Given a field, returns a copy of the node or list if its parent
- -- is the current source node, and otherwise returns the input
+ -- Given a field, returns a copy of the node or list if its parent is
+ -- the current source node, and otherwise returns the input.
-----------------
-- Copy_Entity --
@@ -871,8 +871,7 @@ package body Atree is
begin
if Field in Node_Range then
- New_N :=
- Union_Id (Copy_Separate_Tree (Node_Id (Field)));
+ New_N := Union_Id (Copy_Separate_Tree (Node_Id (Field)));
if Parent (Node_Id (Field)) = Source then
Set_Parent (Node_Id (New_N), New_Id);
diff --git a/gcc/ada/atree.ads b/gcc/ada/atree.ads
index 56763c74d27..08ea27770c8 100644
--- a/gcc/ada/atree.ads
+++ b/gcc/ada/atree.ads
@@ -181,7 +181,7 @@ package Atree is
-- Flag10
-- Flag11 Note that Flag0-3 are stored separately in the Flags
-- Flag12 table, but that's a detail of the implementation which
- -- Flag13 is entirely hidden by the funcitonal interface.
+ -- Flag13 is entirely hidden by the functional interface.
-- Flag14
-- Flag15
-- Flag16
diff --git a/gcc/ada/back_end.adb b/gcc/ada/back_end.adb
index 7768687b269..b5d566971ce 100644
--- a/gcc/ada/back_end.adb
+++ b/gcc/ada/back_end.adb
@@ -272,6 +272,24 @@ package body Back_End is
elsif Switch_Chars (First .. Last) = "fdump-scos" then
Opt.Generate_SCO := True;
Opt.Generate_SCO_Instance_Table := True;
+
+ elsif Switch_Chars (First) = 'g' then
+ Debugger_Level := 2;
+
+ if First < Last then
+ case Switch_Chars (First + 1) is
+ when '0' =>
+ Debugger_Level := 0;
+ when '1' =>
+ Debugger_Level := 1;
+ when '2' =>
+ Debugger_Level := 2;
+ when '3' =>
+ Debugger_Level := 3;
+ when others =>
+ null;
+ end case;
+ end if;
end if;
end if;
end Scan_Back_End_Switches;
diff --git a/gcc/ada/bcheck.adb b/gcc/ada/bcheck.adb
index 2cae8402475..4170b0e8e0e 100644
--- a/gcc/ada/bcheck.adb
+++ b/gcc/ada/bcheck.adb
@@ -979,23 +979,27 @@ package body Bcheck is
for J in ALIs.First .. ALIs.Last loop
declare
A : ALIs_Record renames ALIs.Table (J);
-
begin
for K in A.First_Unit .. A.Last_Unit loop
declare
U : Unit_Record renames Units.Table (K);
begin
- for L in U.First_With .. U.Last_With loop
- if Same_Unit
- (Withs.Table (L).Uname, ND_Unit)
- then
- Error_Msg_File_1 := U.Sfile;
- Error_Msg_Name_1 := ND_Unit;
- Consistency_Error_Msg
- ("file { violates restriction " &
- "No_Dependence => %");
- end if;
- end loop;
+ -- Exclude runtime units from this check since the
+ -- user does not care how a runtime unit is
+ -- implemented.
+
+ if not Is_Internal_File_Name (U.Sfile) then
+ for L in U.First_With .. U.Last_With loop
+ if Same_Unit (Withs.Table (L).Uname, ND_Unit)
+ then
+ Error_Msg_File_1 := U.Sfile;
+ Error_Msg_Name_1 := ND_Unit;
+ Consistency_Error_Msg
+ ("file { violates restriction " &
+ "No_Dependence => %");
+ end if;
+ end loop;
+ end if;
end;
end loop;
end;
diff --git a/gcc/ada/bindgen.adb b/gcc/ada/bindgen.adb
index 098a1aeab14..c4f8c76c0cf 100644
--- a/gcc/ada/bindgen.adb
+++ b/gcc/ada/bindgen.adb
@@ -89,8 +89,8 @@ package body Bindgen is
-- elaboration policy is sequential.
System_BB_CPU_Primitives_Multiprocessors_Used : Boolean := False;
- -- Flag indicating wether the unit System.BB.CPU_Primitives.Multiprocessors
- -- is in the closure of the partiation. This is set by procedure
+ -- Flag indicating whether unit System.BB.CPU_Primitives.Multiprocessors
+ -- is in the closure of the partition. This is set by procedure
-- Resolve_Binder_Options, and it is used to call a procedure that starts
-- slave processors.
@@ -685,6 +685,14 @@ package body Bindgen is
" ""__gnat_activate_all_tasks"");");
end if;
+ -- Import procedure to start slave cpus for bareboard runtime
+
+ if System_BB_CPU_Primitives_Multiprocessors_Used then
+ WBI (" procedure Start_Slave_CPUs;");
+ WBI (" pragma Import (C, Start_Slave_CPUs," &
+ " ""__gnat_start_slave_cpus"");");
+ end if;
+
-- For restricted run-time libraries (ZFP and Ravenscar)
-- tasks are non-terminating, so we do not want finalization.
diff --git a/gcc/ada/checks.adb b/gcc/ada/checks.adb
index f992aa2097a..b5086cc38d3 100644
--- a/gcc/ada/checks.adb
+++ b/gcc/ada/checks.adb
@@ -169,7 +169,7 @@ package body Checks is
end record;
-- The following table keeps track of saved checks. Rather than use an
- -- extensible table. We just use a table of fixed size, and we discard
+ -- extensible table, we just use a table of fixed size, and we discard
-- any saved checks that do not fit. That's very unlikely to happen and
-- this is only an optimization in any case.
@@ -2878,11 +2878,35 @@ package body Checks is
-- Always do a range check if the source type includes infinities and
-- the target type does not include infinities. We do not do this if
-- range checks are killed.
+ -- If the expression is a literal and the bounds of the type are
+ -- static constants it may be possible to optimize the check.
if Has_Infinities (S_Typ)
and then not Has_Infinities (Target_Typ)
then
- Enable_Range_Check (Expr);
+ -- If the expression is a literal and the bounds of the type are
+ -- static constants it may be possible to optimize the check.
+
+ if Nkind (Expr) = N_Real_Literal then
+ declare
+ Tlo : constant Node_Id := Type_Low_Bound (Target_Typ);
+ Thi : constant Node_Id := Type_High_Bound (Target_Typ);
+
+ begin
+ if Compile_Time_Known_Value (Tlo)
+ and then Compile_Time_Known_Value (Thi)
+ and then Expr_Value_R (Expr) >= Expr_Value_R (Tlo)
+ and then Expr_Value_R (Expr) <= Expr_Value_R (Thi)
+ then
+ return;
+ else
+ Enable_Range_Check (Expr);
+ end if;
+ end;
+
+ else
+ Enable_Range_Check (Expr);
+ end if;
end if;
end if;
diff --git a/gcc/ada/checks.ads b/gcc/ada/checks.ads
index 5375eed48a2..9883c830bf2 100644
--- a/gcc/ada/checks.ads
+++ b/gcc/ada/checks.ads
@@ -573,7 +573,7 @@ package Checks is
-- For scalar types, constructs a range check action that first tests that
-- the expression is contained in the Target_Typ range. The difference
-- between this and Apply_Scalar_Range_Check is that the latter generates
- -- the actual checking code in gigi against the Etype of the expression.
+ -- the actual checking code against the Etype of the expression.
--
-- For constrained array types, construct series of range check actions
-- to check that each Expr range is properly contained in the range of
diff --git a/gcc/ada/contracts.adb b/gcc/ada/contracts.adb
index 2ab91f98fec..64960c1cac5 100644
--- a/gcc/ada/contracts.adb
+++ b/gcc/ada/contracts.adb
@@ -366,17 +366,6 @@ package body Contracts is
if Ekind (Body_Id) = E_Void then
return;
- -- Do not analyze the contract of an entry body unless annotating the
- -- original tree. It is preferable to analyze the contract after the
- -- entry body has been transformed into a subprogram body to properly
- -- handle references to unpacked formals.
-
- elsif Ekind_In (Body_Id, E_Entry, E_Entry_Family)
- and then not ASIS_Mode
- and then not GNATprove_Mode
- then
- return;
-
-- Do not analyze a contract multiple times
elsif Present (Items) then
@@ -442,11 +431,17 @@ package body Contracts is
procedure Analyze_Entry_Or_Subprogram_Contract (Subp_Id : Entity_Id) is
Items : constant Node_Id := Contract (Subp_Id);
Subp_Decl : constant Node_Id := Unit_Declaration_Node (Subp_Id);
- Depends : Node_Id := Empty;
- Global : Node_Id := Empty;
- Mode : SPARK_Mode_Type;
- Prag : Node_Id;
- Prag_Nam : Name_Id;
+
+ Skip_Assert_Exprs : constant Boolean :=
+ Ekind_In (Subp_Id, E_Entry, E_Entry_Family)
+ and then not ASIS_Mode
+ and then not GNATprove_Mode;
+
+ Depends : Node_Id := Empty;
+ Global : Node_Id := Empty;
+ Mode : SPARK_Mode_Type;
+ Prag : Node_Id;
+ Prag_Nam : Name_Id;
begin
-- Do not analyze a contract multiple times
@@ -475,17 +470,11 @@ package body Contracts is
elsif Present (Items) then
-- Do not analyze the pre/postconditions of an entry declaration
- -- unless annotating the original tree for ASIS or GNATprove.
+ -- unless annotating the original tree for ASIS or GNATprove. The
+ -- real analysis occurs when the pre/postconditons are relocated to
+ -- the contract wrapper procedure (see Build_Contract_Wrapper).
- -- ??? References to formals are causing problems during contract
- -- expansion as the references resolve to the entry formals, not
- -- the subprogram body emulating the entry body. This will have to
- -- be addressed.
-
- if Ekind_In (Subp_Id, E_Entry, E_Entry_Family)
- and then not ASIS_Mode
- and then not GNATprove_Mode
- then
+ if Skip_Assert_Exprs then
null;
-- Otherwise analyze the pre/postconditions
@@ -505,7 +494,20 @@ package body Contracts is
Prag_Nam := Pragma_Name (Prag);
if Prag_Nam = Name_Contract_Cases then
- Analyze_Contract_Cases_In_Decl_Part (Prag);
+
+ -- Do not analyze the contract cases of an entry declaration
+ -- unless annotating the original tree for ASIS or GNATprove.
+ -- The real analysis occurs when the contract cases are moved
+ -- to the contract wrapper procedure (Build_Contract_Wrapper).
+
+ if Skip_Assert_Exprs then
+ null;
+
+ -- Otherwise analyze the contract cases
+
+ else
+ Analyze_Contract_Cases_In_Decl_Part (Prag);
+ end if;
else
pragma Assert (Prag_Nam = Name_Test_Case);
Analyze_Test_Case_In_Decl_Part (Prag);
diff --git a/gcc/ada/debug.ads b/gcc/ada/debug.ads
index 9ebaa52cfb0..3ed93268188 100644
--- a/gcc/ada/debug.ads
+++ b/gcc/ada/debug.ads
@@ -6,7 +6,7 @@
-- --
-- S p e c --
-- --
--- Copyright (C) 1992-2009, Free Software Foundation, Inc. --
+-- Copyright (C) 1992-2015, 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- --
@@ -40,7 +40,7 @@ package Debug is
-- Dynamic Debug Flags --
-------------------------
- -- Flags that can be used to active various specialized debugging output
+ -- Flags that can be used to activate various specialized debugging output
-- information. The flags are preset to False, which corresponds to the
-- given output being suppressed. The individual flags can be turned on
-- using the undocumented switch dxxx where xxx is a string of letters for
diff --git a/gcc/ada/doc/gnat_rm/compatibility_and_porting_guide.rst b/gcc/ada/doc/gnat_rm/compatibility_and_porting_guide.rst
index 153d585b547..5d699f585f2 100644
--- a/gcc/ada/doc/gnat_rm/compatibility_and_porting_guide.rst
+++ b/gcc/ada/doc/gnat_rm/compatibility_and_porting_guide.rst
@@ -471,8 +471,8 @@ Elaboration order
The implementation can choose any elaboration order consistent with the unit
dependency relationship. This freedom means that some orders can result in
Program_Error being raised due to an 'Access Before Elaboration': an attempt
-to invoke a subprogram its body has been elaborated, or to instantiate a
-generic before the generic body has been elaborated. By default GNAT
+to invoke a subprogram before its body has been elaborated, or to instantiate
+a generic before the generic body has been elaborated. By default GNAT
attempts to choose a safe order (one that will not encounter access before
elaboration problems) by implicitly inserting `Elaborate` or
`Elaborate_All` pragmas where
diff --git a/gcc/ada/doc/gnat_rm/implementation_defined_pragmas.rst b/gcc/ada/doc/gnat_rm/implementation_defined_pragmas.rst
index 7bde3f38f29..aa569deda5c 100644
--- a/gcc/ada/doc/gnat_rm/implementation_defined_pragmas.rst
+++ b/gcc/ada/doc/gnat_rm/implementation_defined_pragmas.rst
@@ -283,18 +283,7 @@ The string argument, if given, is the message that will be associated
with the exception occurrence if the exception is raised. If no second
argument is given, the default message is `file`:`nnn`,
where `file` is the name of the source file containing the assert,
-and `nnn` is the line number of the assert. A pragma is not a
-statement, so if a statement sequence contains nothing but a pragma
-assert, then a null statement is required in addition, as in:
-
-.. code-block:: ada
-
- ...
- if J > 3 then
- pragma Assert (K > 3, "Bad value for K");
- null;
- end if;
-
+and `nnn` is the line number of the assert.
Note that, as with the `if` statement to which it is equivalent, the
type of the expression is either `Standard.Boolean`, or any type derived
@@ -4456,7 +4445,7 @@ the effect is identical to the following Ada 2012 code:
Dynamic_Predicate => F(Q) or G(Q);
-Note that there is are no pragmas `Dynamic_Predicate`
+Note that there are no pragmas `Dynamic_Predicate`
or `Static_Predicate`. That is
because these pragmas would affect legality and semantics of
the program and thus do not have a neutral effect if ignored.
@@ -4471,6 +4460,23 @@ fundamentally changed (for example a membership test
defined for subtype B). When following this approach, the
use of predicates should be avoided.
+Pragma Predicate_Failure
+========================
+
+Syntax:
+
+
+::
+
+ pragma Predicate_Failure
+ ([Entity =>] type_LOCAL_NAME,
+ [Message =>] String_Expression);
+
+
+The `Predicate_Failure` pragma is intended to be an exact replacement for
+the language-defined
+`Predicate_Failure` aspect, and shares its restrictions and semantics.
+
Pragma Preelaborable_Initialization
===================================
@@ -4583,14 +4589,14 @@ Syntax:
.. code-block:: ada
- pragma Profile (Ravenscar | Restricted | Rational);
+ pragma Profile (Ravenscar | Restricted | Rational | GNAT_Extended_Ravenscar);
This pragma is standard in Ada 2005, but is available in all earlier
versions of Ada as an implementation-defined pragma. This is a
configuration pragma that establishes a set of configuration pragmas
that depend on the argument. `Ravenscar` is standard in Ada 2005.
-The other two possibilities (`Restricted` or `Rational`)
+The other possibilities (`Restricted`, `Rational`, `GNAT_Extended_Ravenscar`)
are implementation-defined. The set of configuration pragmas
is defined in the following sections.
@@ -4703,6 +4709,20 @@ is defined in the following sections.
automatically causes the use of a simplified,
more efficient version of the tasking run-time library.
+* Pragma Profile (GNAT_Extended_Ravenscar)
+
+ This profile corresponds to a GNAT specific extension of the
+ Ravenscar profile. The profile may change in the future although
+ only in a compatible way: some restrictions may be removed or
+ relaxed. It is defined as a variation of the Ravenscar profile.
+
+ The ``No_Implicit_Heap_Allocations`` restriction has been replaced
+ by ``No_Implicit_Task_Allocations`` and
+ ``No_Implicit_Protected_Object_Allocations``.
+
+ The ``Simple_Barriers`` restriction has been replaced by
+ ``Pure_Barriers``.
+
* Pragma Profile (Restricted)
This profile corresponds to the GNAT restricted run time. It
@@ -6030,8 +6050,8 @@ Syntax:
This pragma specifies that the specified entity, which must be
a variable declared in a library level package, is to be marked as
"Thread Local Storage" (`TLS`). On systems supporting this (which
-include Solaris, GNU/Linux and VxWorks 6), this causes each thread
-(and hence each Ada task) to see a distinct copy of the variable.
+include Windows, Solaris, GNU/Linux and VxWorks 6), this causes each
+thread (and hence each Ada task) to see a distinct copy of the variable.
The variable may not have default initialization, and if there is
an explicit initialization, it must be either `null` for an
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 ca2744327cf..b9eee2f6c13 100644
--- a/gcc/ada/doc/gnat_rm/representation_clauses_and_pragmas.rst
+++ b/gcc/ada/doc/gnat_rm/representation_clauses_and_pragmas.rst
@@ -1662,11 +1662,10 @@ or alternatively, using the form recommended by the RM:
for B'Address use Addr;
-In both of these cases, `A`
-and `B` become aliased to one another via the
-address clause. This use of address clauses to overlay
-variables, achieving an effect similar to unchecked
-conversion was erroneous in Ada 83, but in Ada 95 and Ada 2005
+In both of these cases, `A` and `B` become aliased to one another
+via the address clause. This use of address clauses to overlay
+variables, achieving an effect similar to unchecked conversion
+was erroneous in Ada 83, but in Ada 95 and Ada 2005
the effect is implementation defined. Furthermore, the
Ada RM specifically recommends that in a situation
like this, `B` should be subject to the following
@@ -1677,10 +1676,14 @@ implementation advice (RM 13.3(19)):
optimizations based on assumptions of no aliases."
GNAT follows this recommendation, and goes further by also applying
-this recommendation to the overlaid variable (`A`
-in the above example) in this case. This means that the overlay
-works "as expected", in that a modification to one of the variables
-will affect the value of the other.
+this recommendation to the overlaid variable (`A` in the above example)
+in this case. This means that the overlay works "as expected", in that
+a modification to one of the variables will affect the value of the other.
+
+More generally, GNAT interprets this recommendation conservatively for
+address clauses: in the cases other than overlays, it considers that the
+object is effectively subject to pragma `Volatile` and implements the
+associated semantics.
Note that when address clause overlays are used in this way, there is an
issue of unintentional initialization, as shown by this example:
@@ -1803,12 +1806,9 @@ operations, for example:
Temp.A := 32;
Mem := Temp;
-For a full access (reference or modification) of the variable (Mem) in
-this case, as in the above examples, GNAT guarantees that the entire atomic
-word will be accessed. It is not clear whether the RM requires this. For
-example in the above, can the compiler reference only the Mem.A field as
-an optimization? Whatever the answer to this question is, GNAT makes the
-guarantee that for such a reference, the entire word is read or written.
+For a full access (reference or modification) of the variable (Mem) in this
+case, as in the above examples, GNAT guarantees that the entire atomic word
+will be accessed, in accordance with the RM C.6(15) clause.
A problem arises with a component access such as:
@@ -1834,6 +1834,9 @@ a warning in such a case:
It is best to be explicit in this situation, by either declaring the
components to be atomic if you want the byte store, or explicitly writing
the full word access sequence if that is what the hardware requires.
+Alternatively, if the full word access sequence is required, GNAT also
+provides the pragma `Volatile_Full_Access` which can be used in lieu of
+pragma `Atomic` and will give the additional guarantee.
.. _Effect_of_Convention_on_Representation:
diff --git a/gcc/ada/doc/gnat_rm/standard_and_implementation_defined_restrictions.rst b/gcc/ada/doc/gnat_rm/standard_and_implementation_defined_restrictions.rst
index c820cb7877d..04e3390af2a 100644
--- a/gcc/ada/doc/gnat_rm/standard_and_implementation_defined_restrictions.rst
+++ b/gcc/ada/doc/gnat_rm/standard_and_implementation_defined_restrictions.rst
@@ -261,7 +261,7 @@ The following example indicates constructs that violate this restriction.
null;
end if;
end Example;
-
+
No_Dynamic_Attachment
---------------------
@@ -319,7 +319,7 @@ must define with the following profile:
(Source_Location : System.Address; Line : Integer);
pragma Export (C, Last_Chance_Handler,
"__gnat_last_chance_handler");
-
+
The parameter is a C null-terminated string representing a message to be
associated with the exception (typically the source location of the raise
@@ -367,19 +367,19 @@ chapter 7.6 of the Ada 2005 RM as well as all form of code generation
performed by the compiler to support these features. The following types
are no longer considered controlled when this restriction is in effect:
-*
+*
`Ada.Finalization.Controlled`
-*
+*
`Ada.Finalization.Limited_Controlled`
-*
+*
Derivations from `Controlled` or `Limited_Controlled`
-*
+*
Class-wide types
-*
+*
Protected types
-*
+*
Task types
-*
+*
Array and record types with controlled components
The compiler no longer generates code to initialize, finalize or adjust an
@@ -461,14 +461,14 @@ scalar components.
No_Implicit_Protected_Object_Allocations
----------------------------------------
-.. index: No_Implicit_Protected_Object_Allocations
+.. index:: No_Implicit_Protected_Object_Allocations
[GNAT] No constructs are allowed to cause implicit heap allocation of a
protected object.
No_Implicit_Task_Allocations
----------------------------
-.. index: No_Implicit_Task_Allocations
+.. index:: No_Implicit_Task_Allocations
[GNAT] No constructs are allowed to cause implicit heap allocation of a task.
@@ -765,6 +765,29 @@ where ``Name`` is the fully qualified entity, for example ::
No_Use_Of_Entity => Ada.Text_IO.Put_Line
+Pure_Barriers
+-------------
+.. index:: Pure_Barriers
+
+[GNAT] This restriction ensures at compile time that protected entry
+barriers are restricted to:
+
+* simple boolean variables defined in the private part of the
+ protected type/object,
+* constant declarations,
+* named numbers,
+* enumeration literals,
+* integer literals,
+* real literals,
+* character literals,
+* implicitly defined comparison operators,
+* uses of the Standard."not" operator,
+* short-circuit operator
+
+This restriction is a relaxation of the Simple_Barriers restriction,
+but still ensures absence of side effects, exceptions, and recursion
+during the evaluation of the barriers.
+
Simple_Barriers
---------------
.. index:: Simple_Barriers
@@ -844,7 +867,7 @@ example, if the source contains a declaration:
.. code-block:: ada
Val : constant Integer := X;
-
+
where X is not a static constant, it may be possible, depending
on complex optimization circuitry, for the compiler to figure
@@ -857,6 +880,21 @@ Note that this the implementation of this restriction requires full
code generation. If it is used in conjunction with "semantics only"
checking, then some cases of violations may be missed.
+No_Dynamic_Sized_Objects
+------------------------
+.. index:: No_Dynamic_Sized_Objects
+
+[GNAT] This restriction disallows certain constructs that might lead to the
+creation of dynamic-sized composite objects (or array or discriminated type).
+An array subtype indication is illegal if the bounds are not static
+or references to discriminants of an enclosing type.
+A discriminated subtype indication is illegal if the type has
+discriminant-dependent array components or a variant part, and the
+discriminants are not static. In addition, array and record aggregates are
+illegal in corresponding cases. Note that this restriction does not forbid
+access discriminants. It is often a good idea to combine this restriction
+with No_Secondary_Stack.
+
No_Entry_Queue
--------------
.. index:: No_Entry_Queue
@@ -960,7 +998,7 @@ SPARK restriction have the form:
violation of restriction "SPARK_05" at <source-location>
<error message>
-
+
.. index:: SPARK
@@ -1097,4 +1135,3 @@ currently checked by the SPARK_05 restriction:
Note that if a unit is compiled in Ada 95 mode with the SPARK restriction,
violations will be reported for constructs forbidden in SPARK 95,
instead of SPARK 2005.
-
diff --git a/gcc/ada/doc/gnat_ugn/building_executable_programs_with_gnat.rst b/gcc/ada/doc/gnat_ugn/building_executable_programs_with_gnat.rst
index 9351465c538..6bcc8191618 100644
--- a/gcc/ada/doc/gnat_ugn/building_executable_programs_with_gnat.rst
+++ b/gcc/ada/doc/gnat_ugn/building_executable_programs_with_gnat.rst
@@ -1928,23 +1928,25 @@ Alphabetical List of All Switches
*3* Eliminate intermediate overflows (`ELIMINATED`)
===== ===============================================================
- If only one digit appears then it applies to all
+ If only one digit appears, then it applies to all
cases; if two digits are given, then the first applies outside
- assertions, and the second within assertions.
+ assertions, pre/postconditions, and type invariants, and the second
+ applies within assertions, pre/postconditions, and type invariants.
If no digits follow the *-gnato*, then it is equivalent to
*-gnato11*,
- causing all intermediate overflows to be handled in strict mode.
+ causing all intermediate overflows to be handled in strict
+ mode.
This switch also causes arithmetic overflow checking to be performed
- (as though `pragma Unsuppress (Overflow_Mode)` had been specified.
+ (as though `pragma Unsuppress (Overflow_Mode)` had been specified).
The default if no option *-gnato* is given is that overflow handling
is in `STRICT` mode (computations done using the base type), and that
overflow checking is enabled.
Note that division by zero is a separate check that is not
- controlled by this switch (division by zero checking is on by default).
+ controlled by this switch (divide-by-zero checking is on by default).
See also :ref:`Specifying_the_Desired_Mode`.
@@ -4038,31 +4040,64 @@ Debugging and Assertion Control
.. index:: Assert
.. index:: Debug
.. index:: Assertions
+ .. index:: Precondition
+ .. index:: Postcondition
+ .. index:: Type invariants
+ .. index:: Subtype predicates
+
+ The `-gnata` option is equivalent to the following Assertion_Policy pragma::
+
+ pragma Assertion_Policy (Check);
+
+ Which is a shorthand for::
+
+ pragma Assertion_Policy
+ (Assert => Check,
+ Static_Predicate => Check,
+ Dynamic_Predicate => Check,
+ Pre => Check,
+ Pre'Class => Check,
+ Post => Check,
+ Post'Class => Check,
+ Type_Invariant => Check,
+ Type_Invariant'Class => Check);
The pragmas `Assert` and `Debug` normally have no effect and
are ignored. This switch, where :samp:`a` stands for assert, causes
- `Assert` and `Debug` pragmas to be activated.
+ pragmas `Assert` and `Debug` to be activated. This switch also
+ causes preconditions, postconditions, subtype predicates, and
+ type invariants to be activated.
The pragmas have the form::
pragma Assert (<Boolean-expression> [, <static-string-expression>])
pragma Debug (<procedure call>)
+ pragma Type_Invariant (<type-local-name>, <Boolean-expression>)
+ pragma Predicate (<type-local-name>, <Boolean-expression>)
+ pragma Precondition (<Boolean-expression>, <string-expression>)
+ pragma Postcondition (<Boolean-expression>, <string-expression>)
+
+ The aspects have the form::
+ with [Pre|Post|Type_Invariant|Dynamic_Predicate|Static_Predicate]
+ => <Boolean-expression>;
The `Assert` pragma causes `Boolean-expression` to be tested.
If the result is `True`, the pragma has no effect (other than
possible side effects from evaluating the expression). If the result is
`False`, the exception `Assert_Failure` declared in the package
- `System.Assertions` is
- raised (passing `static-string-expression`, if present, as the
- message associated with the exception). If no string expression is
- given the default is a string giving the file name and line number
- of the pragma.
+ `System.Assertions` is raised (passing `static-string-expression`, if
+ present, as the message associated with the exception). If no string
+ expression is given, the default is a string containing the file name and
+ line number of the pragma.
The `Debug` pragma causes `procedure` to be called. Note that
`pragma Debug` may appear within a declaration sequence, allowing
debugging procedures to be called between declarations.
+ For the aspect specification, the `<Boolean-expression>` is evaluated.
+ If the result is `True`, the aspect has no effect. If the result
+ is `False`, the exception `Assert_Failure` is raised.
.. _Validity_Checking:
@@ -4871,11 +4906,11 @@ Run-Time Checks
.. index:: Checks, stack overflow checking
-By default, the following checks are suppressed: integer overflow
-checks, stack overflow checks, and checks for access before
-elaboration on subprogram calls. All other checks, including range
-checks and array bounds checks, are turned on by default. The
-following *gcc* switches refine this default behavior.
+By default, the following checks are suppressed: stack overflow
+checks, and checks for access before elaboration on subprogram
+calls. All other checks, including overflow checks, range checks and
+array bounds checks, are turned on by default. The following *gcc*
+switches refine this default behavior.
.. index:: -gnatp (gcc)
@@ -5003,13 +5038,8 @@ following *gcc* switches refine this default behavior.
checking is also quite expensive in time and space, since in general it
requires the use of double length arithmetic.
- Note again that the default is *-gnato00*,
- so overflow checking is not performed in default mode. This means that out of
- the box, with the default settings, GNAT does not do all the checks
- expected from the language description in the Ada Reference Manual.
- If you want all constraint checks to be performed, as described in this Manual,
- then you must explicitly use the *-gnato??*
- switch either on the *gnatmake* or *gcc* command.
+ Note again that the default is *-gnato11* (equivalent to *-gnato1*),
+ so overflow checking is performed in STRICT mode by default.
.. index:: -gnatE (gcc)
@@ -6897,7 +6927,7 @@ Here are some examples of `gnatbind` invovations:
Linking with *gnatlink*
=======================
-.. index: ! gnatlink
+.. index:: ! gnatlink
This chapter discusses *gnatlink*, a tool that links
an Ada program and builds an executable file. This utility
diff --git a/gcc/ada/doc/gnat_ugn/gnat_and_program_execution.rst b/gcc/ada/doc/gnat_ugn/gnat_and_program_execution.rst
index 6f33d0b4ce3..6161073367b 100644
--- a/gcc/ada/doc/gnat_ugn/gnat_and_program_execution.rst
+++ b/gcc/ada/doc/gnat_ugn/gnat_and_program_execution.rst
@@ -1447,26 +1447,20 @@ some guidelines on debugging optimized code.
Controlling Run-Time Checks
^^^^^^^^^^^^^^^^^^^^^^^^^^^
-By default, GNAT generates all run-time checks, except integer overflow
-checks, stack overflow checks, and checks for access before elaboration on
-subprogram calls. The latter are not required in default mode, because all
+By default, GNAT generates all run-time checks, except stack overflow
+checks, and checks for access before elaboration on subprogram
+calls. The latter are not required in default mode, because all
necessary checking is done at compile time.
.. index:: -gnatp (gcc)
.. index:: -gnato (gcc)
-Two gnat switches, *-gnatp* and *-gnato* allow this default to
-be modified. See :ref:`Run-Time_Checks`.
+The gnat switch, *-gnatp* allows this default to be modified. See
+:ref:`Run-Time_Checks`.
Our experience is that the default is suitable for most development
purposes.
-We treat integer overflow specially because these
-are quite expensive and in our experience are not as important as other
-run-time checks in the development process. Note that division by zero
-is not considered an overflow check, and divide by zero checks are
-generated where required by default.
-
Elaboration checks are off by default, and also not needed by default, since
GNAT uses a static elaboration analysis approach that avoids the need for
run-time checking. This manual contains a full chapter discussing the issue
@@ -1942,11 +1936,9 @@ contain a single nested loop, if it can be vectorized when considered alone:
The vectorizable operations depend on the targeted SIMD instruction set, but
the adding and some of the multiplying operators are generally supported, as
-well as the logical operators for modular types. Note that, in the former
-case, enabling overflow checks, for example with *-gnato*, totally
-disables vectorization. The other checks are not supposed to have the same
-definitive effect, although compiling with *-gnatp* might well reveal
-cases where some checks do thwart vectorization.
+well as the logical operators for modular types. Note that compiling
+with *-gnatp* might well reveal cases where some checks do thwart
+vectorization.
Type conversions may also prevent vectorization if they involve semantics that
are not directly supported by the code generator or the SIMD instruction set.
@@ -3197,10 +3189,6 @@ If no digits follow the *-gnato*, then it is equivalent to
causing all intermediate operations to be computed using the base
type (`STRICT` mode).
-In addition to setting the mode used for computation of intermediate
-results, the `-gnato` switch also enables overflow checking (which
-is suppressed by default). It thus combines the effect of using
-a pragma `Overflow_Mode` and pragma `Unsuppress`.
.. _Default_Settings:
@@ -3884,7 +3872,7 @@ execution of this erroneous program:
it to obtain accurate dynamic memory usage history at a minimal cost to the
execution speed. Note however, that `gnatmem` is not supported on all
platforms (currently, it is supported on AIX, HP-UX, GNU/Linux, Solaris and
- Windows NT/2000/XP (x86).
+ Windows.
The `gnatmem` command has the form
diff --git a/gcc/ada/doc/gnat_ugn/gnat_project_manager.rst b/gcc/ada/doc/gnat_ugn/gnat_project_manager.rst
index 1fdb1f54060..21b4b6111e8 100644
--- a/gcc/ada/doc/gnat_ugn/gnat_project_manager.rst
+++ b/gcc/ada/doc/gnat_ugn/gnat_project_manager.rst
@@ -259,7 +259,7 @@ There are several ways of defining source directories:
file names for the roots of these undesirable directory subtrees.
- .. code-block: ada-project
+ .. code-block:: gpr
for Source_Dirs use ("./**");
for Ignore_Source_Sub_Dirs use (".svn");
@@ -270,7 +270,7 @@ the project file at the toplevel directory rather than mixed with the sources,
we will create the following file
-.. code-block: ada-project
+.. code-block:: gpr
build.gpr
project Build is
@@ -420,7 +420,7 @@ the project directory, that is the directory containing the project file.
For our example, we can specify the object dir in this way:
-.. code-block: ada-project
+.. code-block:: gpr
project Build is
for Source_Dirs use ("common");
@@ -452,7 +452,7 @@ In the case of the example, let's place the executable in the root
of the hierarchy, ie the same directory as :file:`build.gpr`. Hence
the project file is now
-.. code-block: ada-project
+.. code-block:: gpr
project Build is
for Source_Dirs use ("common");
@@ -489,7 +489,7 @@ command line when invoking a builder, and editors like
*GPS* will be able to create extra menus to spawn or debug the
corresponding executables.
-.. code-block: ada-project
+.. code-block:: gpr
project Build is
for Source_Dirs use ("common");
@@ -557,7 +557,7 @@ Our example project file can be extended with the following empty packages. At
this stage, they could all be omitted since they are empty, but they show which
packages would be involved in the build process.
-.. code-block: ada-project
+.. code-block:: gpr
project Build is
for Source_Dirs use ("common");
@@ -603,7 +603,7 @@ Several attributes can be used to specify the switches:
*-O2*, and the resulting project file is as follows
(only the `Compiler` package is shown):
- .. code-block: ada-project
+ .. code-block:: gpr
package Compiler is
for Default_Switches ("Ada") use ("-O2");
@@ -621,7 +621,7 @@ Several attributes can be used to specify the switches:
switches defined by *Default_Switches*. Our project file would
become:
- .. code-block: ada-project
+ .. code-block:: gpr
package Compiler is
@@ -634,7 +634,7 @@ Several attributes can be used to specify the switches:
`Switches` may take a pattern as an index, such as in:
- .. code-block: ada-project
+ .. code-block:: gpr
package Compiler is
for Default_Switches ("Ada")
@@ -1793,7 +1793,7 @@ but, for some reason, cannot be rebuilt. For instance, it is the case when some
of the library sources are not available. Such library projects need to use the
`Externally_Built` attribute as in the example below:
-.. code-block: ada-project
+.. code-block:: gpr
library project Extern_Lib is
for Languages use ("Ada", "C");
@@ -3180,7 +3180,7 @@ The following packages are currently supported in project files
or given a file name to find out its language for proper processing.
See :ref:`Naming_Schemes`.
- .. only: PRO or GPL
+ .. only:: PRO or GPL
*Pretty_Printer*
This package specifies the options used when calling the formatting tool
diff --git a/gcc/ada/doc/gnat_ugn/gnat_utility_programs.rst b/gcc/ada/doc/gnat_ugn/gnat_utility_programs.rst
index 2694fef667d..2a92500021b 100644
--- a/gcc/ada/doc/gnat_ugn/gnat_utility_programs.rst
+++ b/gcc/ada/doc/gnat_ugn/gnat_utility_programs.rst
@@ -196,7 +196,7 @@ The GNAT Library Browser `gnatls`
=================================
.. index:: Library browser
-.. index: ! gnatls
+.. index:: ! gnatls
`gnatls` is a tool that outputs information about compiled
units. It gives the relationship between objects, unit names and source
@@ -1373,7 +1373,7 @@ Alternatively, you may run the script using the following command line:
The Ada-to-XML converter *gnat2xml*
===================================
- .. index: ! gnat2xml
+ .. index:: ! gnat2xml
.. index:: XML generation
The *gnat2xml* tool is an ASIS-based utility that converts
@@ -4178,10 +4178,10 @@ Alternatively, you may run the script using the following command line:
Generated skeletons and harnesses are based on the AUnit testing framework.
AUnit is an Ada adaptation of the xxxUnit testing frameworks, similar to JUnit
for Java or CppUnit for C++. While it is advised that gnattest users read
- the AUnit manual, deep knowledge of AUnit is not necessary for using gnattest.
+ the AUnit manual, deep knowledge of AUnit is not necessary for using *gnattest*.
For correct operation of *gnattest*, AUnit should be installed and
- aunit.gpr must be on the project path. This happens automatically when Aunit
- is installed at its default location.
+ aunit.gpr must be on the project path. Except for some special circumstances
+ (e.g. a custom run-time is used), this should normally be the case out of the box.
.. _Running_gnattest:
@@ -4200,7 +4200,7 @@ Alternatively, you may run the script using the following command line:
::
- $ gnattest `-Pprojname` [`--harness-dir=dirname`] [`switches`] [`filename`] [-cargs `gcc_switches`]
+ $ gnattest `-Pprojname` [`switches`] [`filename`] [-cargs `gcc_switches`]
where
@@ -4214,37 +4214,35 @@ Alternatively, you may run the script using the following command line:
for which a test package will be created. The file name may be given with a
path.
- * :samp:`{gcc_switches}`
- is a list of switches for
- *gcc*. These switches will be passed on to all compiler invocations
- made by *gnattest* to generate a set of ASIS trees. Here you can provide
- ``-I`` switches to form the source search path,
- use the ``-gnatec`` switch to set the configuration file,
- use the ``-gnat05`` switch if sources should be compiled in
- Ada 2005 mode, etc.
-
-
* :samp:`{switches}`
is an optional sequence of switches as described below.
+ * :samp:`{gcc_switches}`
+ is a list of additional switches for
+ *gcc* that will be passed to all compiler invocations
+ made by *gnattest* to generate a set of ASIS trees.
+
*gnattest* results can be found in two different places.
* *automatic harness*:
- This is the harness code, which is located by default in "gnattest/harness" directory
- that is created in the object directory of corresponding project file. All of
- this code is generated completely automatically and can be destroyed and
- regenerated at will. It is not recommended to modify this code manually, since
- it could easily be overridden by mistake. The entry point in the harness code is
+ This is the harness code, which is located by default in
+ "gnattest/harness" directory created in the object directory of
+ the main project file. All of this code is generated completely
+ automatically and can be destroyed and regenerated at will, with the
+ exception of the file *gnattest_common.gpr*, which is created if absent,
+ but never overwritten. It is not recommended to modify other files
+ manually, since these modifications will be lost if *gnattest* is re-run.
+ The entry point in the harness code is
the project file named *test_driver.gpr*. Tests can be compiled and run
using a command such as:
::
- $ gnatmake -P<harness-dir>/test_driver test_runner
+ $ gprbuild -P<harness-dir>/test_driver
- Note that you might need to specify the necessary values of scenario variables
- when you are not using the AUnit defaults.
+ Note that if you need to adjust any options used to compile the harness,
+ you can do so by editing the file *gnattest_common.gpr*.
* *actual unit test skeletons*:
A test skeleton for each visible subprogram is created in a separate file, if it
@@ -4297,9 +4295,8 @@ Alternatively, you may run the script using the following command line:
.. index:: -v (gnattest)
:samp:`-v`
- Verbose mode: generates version information if specified by itself on the
- command line. If specified via GNATtest_Switches, produces output
- about the execution of the tool.
+ Verbose mode: produces additional output about the execution of the tool.
+ When specified alone on the command line, prints tool version and exits.
.. index:: -r (gnattest)
@@ -4318,7 +4315,9 @@ Alternatively, you may run the script using the following command line:
:samp:`--RTS={rts-path}`
Specifies the default location of the runtime library. Same meaning as the
- equivalent *gnatmake* flag (:ref:`Switches_for_gnatmake`).
+ equivalent *gnatmake* flag (:ref:`Switches_for_gnatmake`). For restricted
+ profiles, *gnattest* takes into account the run-time limitations when
+ generating the harness.
.. index:: --additional-tests (gnattest)
@@ -4406,7 +4405,7 @@ Alternatively, you may run the script using the following command line:
:samp:`--validate-type-extensions`
Enables substitution check: run all tests from all parents in order
- to check substitutability in accordance with LSP.
+ to check substitutability in accordance with the Liskov substitution principle (LSP).
.. index:: --skeleton-default (gnattest)
@@ -4504,12 +4503,12 @@ Alternatively, you may run the script using the following command line:
Most of the command-line options can also be passed to the tool by adding
special attributes to the project file. Those attributes should be put in
- package gnattest. Here is the list of attributes:
+ package **Gnattest**. Here is the list of attributes:
* ``Tests_Root``
is used to select the same output mode as with the ``--tests-root`` option.
- This attribute cannot be used together with Subdir or Tests_Dir.
+ This attribute cannot be used together with ``Subdir`` or ``Tests_Dir``.
* ``Subdir``
is used to select the same output mode as with the ``--subdir`` option.
@@ -4534,7 +4533,7 @@ Alternatively, you may run the script using the following command line:
Each of those attributes can be overridden from the command line if needed.
Other *gnattest* switches can also be passed via the project
- file as an attribute list called GNATtest_Switches.
+ file as an attribute list called *Gnattest_Switches*.
.. _Simple_gnattest_Example:
@@ -4549,7 +4548,7 @@ Alternatively, you may run the script using the following command line:
<install_prefix>/share/examples/gnattest/simple
- This project contains a simple package containing one subprogram. By running gnattest:
+ This project contains a simple package containing one subprogram. By running *gnattest*:
::
@@ -4563,7 +4562,7 @@ Alternatively, you may run the script using the following command line:
$ gnatmake -Ptest_driver
$ test_runner
- One failed test with diagnosis ``test not implemented`` is reported.
+ One failed test with the diagnosis "test not implemented" is reported.
Since no special output option was specified, the test package ``Simple.Tests``
is located in:
@@ -4579,13 +4578,13 @@ Alternatively, you may run the script using the following command line:
bodies and are surrounded by special comment sections. Those comment sections
should not be removed or modified in order for gnattest to be able to regenerate
test packages and keep already written tests in place.
- The test routine Test_Inc_5eaee3 located at simple-test_data-tests.adb contains
- a single statement: a call to procedure Assert. It has two arguments:
+ The test routine `Test_Inc_5eaee3` located at ``simple-test_data-tests.adb`` contains
+ a single statement: a call to procedure `Assert`. It has two arguments:
the Boolean expression we want to check and the diagnosis message to display if
the condition is false.
That is where actual testing code should be written after a proper setup.
- An actual check can be performed by replacing the Assert call with:
+ An actual check can be performed by replacing the `Assert` call with:
::
@@ -4601,13 +4600,13 @@ Alternatively, you may run the script using the following command line:
---------------------------------------------------
Besides test routines themselves, each test package has a parent package
- Test_Data that has two procedures: Set_Up and Tear_Down. This package is never
- overwritten by the tool. Set_Up is called before each test routine of the
- package and Tear_Down is called after each test routine. Those two procedures
+ `Test_Data` that has two procedures: `Set_Up` and `Tear_Down`. This package is never
+ overwritten by the tool. `Set_Up` is called before each test routine of the
+ package, and `Tear_Down` is called after each test routine. Those two procedures
can be used to perform necessary initialization and finalization,
- memory allocation, etc. Test type declared in Test_Data package is parent type
+ memory allocation, etc. Test type declared in `Test_Data` package is parent type
for the test type of test package and can have user-defined components whose
- values can be set by Set_Up routine and used in test routines afterwards.
+ values can be set by `Set_Up` routine and used in test routines afterwards.
.. _Regenerating_Tests:
@@ -4615,25 +4614,25 @@ Alternatively, you may run the script using the following command line:
Regenerating Tests
------------------
- Bodies of test routines and test_data packages are never overridden after they
+ Bodies of test routines and `Test_Data` packages are never overridden after they
have been created once. As long as the name of the subprogram, full expanded Ada
- names, and the order of its parameters is the same, and comment sections are
- intact the old test routine will fit in its place and no test skeleton will be
+ names and order of its parameters are the same, and comment sections are
+ intact, the old test routine will fit in its place and no test skeleton will be
generated for the subprogram.
This can be demonstrated with the previous example. By uncommenting declaration
- and body of function Dec in simple.ads and simple.adb, running
+ and body of function Dec in ``simple.ads`` and ``simple.adb``, running
*gnattest* on the project, and then running the test driver:
::
$ gnattest --harness-dir=driver -Psimple.gpr
$ cd obj/driver
- $ gnatmake -Ptest_driver
+ $ gprbuild -Ptest_driver
$ test_runner
The old test is not replaced with a stub, nor is it lost, but a new test
- skeleton is created for function Dec.
+ skeleton is created for function `Dec`.
The only way of regenerating tests skeletons is to remove the previously created
tests together with corresponding comment sections.
@@ -4654,7 +4653,7 @@ Alternatively, you may run the script using the following command line:
*gnattest*).
The default behavior of the test driver is set with the same switch
- as passed to gnattest when generating the test driver.
+ as passed to *gnattest* when generating the test driver.
Passing it to the driver generated on the first example:
@@ -4673,10 +4672,10 @@ Alternatively, you may run the script using the following command line:
Creation of test skeletons for primitive operations of tagged types entails
a number of features. Test routines for all primitives of a given tagged type
are placed in a separate child package named according to the tagged type. For
- example, if you have tagged type T in package P, all tests for primitives
- of T will be in P.T_Test_Data.T_Tests.
+ example, if you have tagged type *T* in package *P*, all tests for primitives
+ of *T* will be in *P.T_Test_Data.T_Tests*.
- Consider running gnattest on the second example (note: actual tests for this
+ Consider running *gnattest* on the second example (note: actual tests for this
example already exist, so there's no need to worry if the tool reports that
no new stubs were generated):
@@ -4686,28 +4685,28 @@ Alternatively, you may run the script using the following command line:
$ gnattest --harness-dir=driver -Ptagged_rec.gpr
Taking a closer look at the test type declared in the test package
- Speed1.Controller_Test_Data is necessary. It is declared in:
+ *Speed1.Controller_Test_Data* is necessary. It is declared in:
::
<install_prefix>/share/examples/gnattest/tagged_rec/obj/gnattest/tests
Test types are direct or indirect descendants of
- AUnit.Test_Fixtures.Test_Fixture type. In the case of nonprimitive tested
+ *AUnit.Test_Fixtures.Test_Fixture* type. In the case of non-primitive tested
subprograms, the user doesn't need to be concerned with them. However,
when generating test packages for primitive operations, there are some things
the user needs to know.
- Type Test_Controller has components that allow assignment of various
- derivations of type Controller. And if you look at the specification of
- package Speed2.Auto_Controller, you will see that Test_Auto_Controller
- actually derives from Test_Controller rather than AUnit type Test_Fixture.
+ Type *Test_Controller* has components that allow assignment of various
+ derivations of type *Controller*. And if you look at the specification of
+ package *Speed2.Auto_Controller*, you will see that *Test_Auto_Controller*
+ actually derives from *Test_Controller* rather than AUnit type *Test_Fixture*.
Thus, test types mirror the hierarchy of tested types.
- The Set_Up procedure of Test_Data package corresponding to a test package
- of primitive operations of type T assigns to Fixture a reference to an
- object of that exact type T. Notice, however, that if the tagged type has
- discriminants, the Set_Up only has a commented template for setting
+ The *Set_Up* procedure of *Test_Data* package corresponding to a test package
+ of primitive operations of type *T* assigns to *Fixture* a reference to an
+ object of that exact type *T*. Note, however, that if the tagged type has
+ discriminants, the *Set_Up* only has a commented template for setting
up the fixture, since filling the discriminant with actual value is up
to the user.
@@ -4728,7 +4727,7 @@ Alternatively, you may run the script using the following command line:
::
$ cd obj/driver
- $ gnatmake -Ptest_driver
+ $ gprbuild -Ptest_driver
$ test_runner
There are 6 passed tests while there are only 5 testable subprograms. The test
@@ -4739,13 +4738,13 @@ Alternatively, you may run the script using the following command line:
.. _Tagged_Type_Substitutability_Testing:
Tagged Type Substitutability Testing
- -------------------------------------
+ ------------------------------------
*Tagged Type Substitutability Testing* is a way of verifying the global type
consistency by testing. Global type consistency is a principle stating that if
- S is a subtype of T (in Ada, S is a derived type of tagged type T),
- then objects of type T may be replaced with objects of type S (that is,
- objects of type S may be substituted for objects of type T), without
+ *S* is a subtype of *T* (in Ada, *S* is a derived type of tagged type *T*),
+ then objects of type *T* may be replaced with objects of type *S* (that is,
+ objects of type *S* may be substituted for objects of type *T*), without
altering any of the desirable properties of the program. When the properties
of the program are expressed in the form of subprogram preconditions and
postconditions (let's call them pre and post), the principle is formulated as
@@ -4761,25 +4760,25 @@ Alternatively, you may run the script using the following command line:
derived types.
In the example used in the previous section, there was clearly a violation of
- type consistency. The overriding primitive Adjust_Speed in package Speed2
+ type consistency. The overriding primitive *Adjust_Speed* in package *Speed2*
removes the functionality of the overridden primitive and thus doesn't respect
the consistency principle.
- Gnattest has a special option to run overridden parent tests against objects
+ *Gnattest* has a special option to run overridden parent tests against objects
of the type which have overriding primitives:
::
$ gnattest --harness-dir=driver --validate-type-extensions -Ptagged_rec.gpr
$ cd obj/driver
- $ gnatmake -Ptest_driver
+ $ gprbuild -Ptest_driver
$ test_runner
- While all the tests pass by themselves, the parent test for Adjust_Speed fails
+ While all the tests pass by themselves, the parent test for *Adjust_Speed* fails
against objects of the derived type.
Non-overridden tests are already inherited for derived test types, so the
- ``--validate-type-extensions`` enables the application of overriden tests to objects
- of derived types.
+ ``--validate-type-extensions`` enables the application of overridden tests
+ to objects of derived types.
.. _Testing_with_Contracts:
@@ -4787,13 +4786,13 @@ Alternatively, you may run the script using the following command line:
Testing with Contracts
----------------------
- *gnattest* supports pragmas Precondition, Postcondition, and Test_Case,
+ *gnattest* supports pragmas *Precondition*, *Postcondition*, and *Test_Case*,
as well as the corresponding Ada 2012 aspects.
- Test routines are generated, one per each Test_Case associated with a tested
+ Test routines are generated, one per each *Test_Case* associated with a tested
subprogram. Those test routines have special wrappers for tested functions
that have composition of pre- and postcondition of the subprogram with
- "requires" and "ensures" of the Test_Case (depending on the mode, pre and post
- either count for Nominal mode or do not count for Robustness mode).
+ "requires" and "ensures" of the *Test_Case* (depending on the mode, pre and post
+ either count for *Nominal* mode or do **not** count for *Robustness* mode).
The third example demonstrates how this works:
@@ -4821,7 +4820,7 @@ Alternatively, you may run the script using the following command line:
::
$ cd obj/driver
- $ gnatmake -Ptest_driver
+ $ gprbuild -Ptest_driver
$ test_runner
However, by changing 9.0 to 25.0 and 3.0 to 5.0, for example, you can get
@@ -4839,12 +4838,12 @@ Alternatively, you may run the script using the following command line:
*gnattest* can add user-written tests to the main suite of the test
driver. *gnattest* traverses the given packages and searches for test
routines. All procedures with a single in out parameter of a type which is
- derived from AUnit.Test_Fixtures.Test_Fixture and that are declared in package
+ derived from *AUnit.Test_Fixtures.Test_Fixture* and that are declared in package
specifications are added to the suites and are then executed by the test driver.
- (Set_Up and Tear_Down are filtered out.)
+ (*Set_Up* and *Tear_Down* are filtered out.)
An example illustrates two ways of creating test harnesses for user-written
- tests. Directory additional_tests contains an AUnit-based test driver written
+ tests. Directory `additional_tests` contains an AUnit-based test driver written
by hand.
::
@@ -4858,7 +4857,7 @@ Alternatively, you may run the script using the following command line:
gnattest -Padditional/harness/harness.gpr --harness-dir=harness_only \\
--harness-only
- gnatmake -Pharness_only/test_driver.gpr
+ gprbuild -Pharness_only/test_driver.gpr
harness_only/test_runner
Additional tests can also be executed together with generated tests:
@@ -4867,7 +4866,7 @@ Alternatively, you may run the script using the following command line:
gnattest -Psimple.gpr --additional-tests=additional/harness/harness.gpr \\
--harness-dir=mixing
- gnatmake -Pmixing/test_driver.gpr
+ gprbuild -Pmixing/test_driver.gpr
mixing/test_runner
@@ -4914,7 +4913,7 @@ Alternatively, you may run the script using the following command line:
remain intact, while their bodies are replaced, and hide the original bodies by
means of extending projects. Also, for each stubbed
package, a child package with setter routines for each subprogram declaration
- is created. These setters are meant to be used to set the behaviour of
+ is created. These setters are meant to be used to set the behavior of
stubbed subprograms from within test cases.
Note that subprograms belonging to the same package as the subprogram under
@@ -4930,8 +4929,9 @@ Alternatively, you may run the script using the following command line:
Developing a stubs-based testing campaign requires
good understanding of the infrastructure created by *gnattest* for
- this purpose. We recommend following the stubbing tutorials provided
- under :file:`<install_prefix>/share/examples/gnattest/stubbing*` before
+ this purpose. We recommend following the two stubbing tutorials
+ `simple_stubbing` and `advanced_stubbing` provided
+ under :file:`<install_prefix>/share/examples/gnattest` before
attempting to use this powerful feature.
@@ -4951,38 +4951,18 @@ Alternatively, you may run the script using the following command line:
Option ``--omit-sloc`` may be useful when putting test packages under version control.
- .. _Support_for_other_platforms/run-times:
-
- Support for other platforms/run-times
- -------------------------------------
-
- *gnattest* can be used to generate the test harness for platforms
- and run-time libraries others than the default native target with the
- default full run-time. For example, when using a limited run-time library
- such as Zero FootPrint (ZFP), a simplified harness is generated.
-
- Two variables are used to tell the underlying AUnit framework how to generate
- the test harness: `PLATFORM`, which identifies the target, and
- `RUNTIME`, used to determine the run-time library for which the harness
- is generated. Corresponding prefix should also be used when calling
- *gnattest* for non-native targets. For example, the following options
- are used to generate the AUnit test harness for a PowerPC ELF target using
- the ZFP run-time library:
-
- ::
-
- $ powerpc-elf-gnattest -Psimple.gpr -XPLATFORM=powerpc-elf -XRUNTIME=zfp
-
-
.. _Current_Limitations:
Current Limitations
-------------------
- The tool currently does not support following features:
+ The tool currently has the following limitations:
- * generic tests for nested generic packages and their instantiations
- * tests for protected subprograms and entries
- * pragma No_Run_Time
- * if pragmas for C and C++ interaction are used, manual adjustments might be
- necessary to make the test driver compilable
+ * generic tests for nested generic packages and their instantiations are
+ not supported;
+ * tests for protected subprograms and entries are not supported;
+ * pragma *No_Run_Time* is not supported;
+ * if pragmas for interfacing with foreign languages are used, manual
+ adjustments might be necessary to make the test harness compilable;
+ * use of elaboration control pragmas may result in elaboration circularities
+ in the generated harness.
diff --git a/gcc/ada/doc/gnat_ugn/platform_specific_information.rst b/gcc/ada/doc/gnat_ugn/platform_specific_information.rst
index b31670c6125..694e37baeed 100644
--- a/gcc/ada/doc/gnat_ugn/platform_specific_information.rst
+++ b/gcc/ada/doc/gnat_ugn/platform_specific_information.rst
@@ -1,7 +1,7 @@
.. -- Non-breaking space in running text
-- E.g. Ada |nbsp| 95
-.. |nbsp| unicode:: 0xA0
+.. |nbsp| unicode:: 0xA0
:trim:
.. _Platform_Specific_Information:
@@ -155,8 +155,8 @@ For example on x86-linux::
-- +--- adainclude
-- |
-- +--- adalib
-
-
+
+
If the *rts-sjlj* library is to be selected on a permanent basis,
these soft links can be modified with the following commands:
@@ -166,7 +166,7 @@ these soft links can be modified with the following commands:
$ rm -f adainclude adalib
$ ln -s rts-sjlj/adainclude adainclude
$ ln -s rts-sjlj/adalib adalib
-
+
Alternatively, you can specify :file:`rts-sjlj/adainclude` in the file
:file:`$target/ada_source_path` and :file:`rts-sjlj/adalib` in
:file:`$target/ada_object_path`.
@@ -267,7 +267,7 @@ to one of the following:
*-2* Use the default configuration (run the program on all
available processors) - this is the same as having `GNAT_PROCESSOR`
unset
- *-1* Let the run-time implementation choose one processor and run the
+ *-1* Let the run-time implementation choose one processor and run the
program on that processor
*0 .. Last_Proc* Run the program on the specified processor.
`Last_Proc` is equal to `_SC_NPROCESSORS_CONF - 1`
@@ -318,7 +318,7 @@ platforms.
the installation path and similar information, and then guides you through the
installation process. It is also possible to perform silent installations
using the command-line interface.
-
+
In order to install one of the GNAT installers from the command
line you should pass parameter `/S` (and, optionally,
`/D=<directory>`) as command-line arguments.
@@ -332,7 +332,7 @@ platforms.
::
gnatpro-7.0.2-i686-pc-mingw32-bin.exe /S
-
+
To install into a custom directory, say, `C:\\TOOLS\\GNATPRO\\7.0.2`:
::
@@ -347,7 +347,7 @@ platforms.
::
gnat-gpl-2012-i686-pc-mingw32-bin /S /D=C:\GNAT\2012
-
+
.. only:: PRO or GPL
You can use the same syntax for all installers.
@@ -436,7 +436,7 @@ called :file:`c-drive` on a machine :file:`LOKI`, the following command will
make it available:
::
-
+
$ path \\loki\c-drive\gnat\bin;%path%`
Be aware that every compilation using the network installation results in the
@@ -462,7 +462,7 @@ the *-mwindows* linker option must be specified.
::
$ gnatmake winprog -largs -mwindows
-
+
.. _Temporary_Files:
Temporary Files
@@ -542,7 +542,7 @@ setup the SEH context. For this the C main must looks like this:
adafinal();
}
-
+
Note that this is not needed on x86_64-windows where the Windows
native SEH support is used.
@@ -596,14 +596,14 @@ instance the C function:
::
int get_val (long);
-
+
should be imported from Ada as follows:
.. code-block:: ada
function Get_Val (V : Interfaces.C.long) return Interfaces.C.int;
pragma Import (C, Get_Val, External_Name => "get_val");
-
+
Note that in this particular case the `External_Name` parameter could
have been omitted since, when missing, this parameter is taken to be the
name of the Ada entity in lower case. When the `Link_Name` parameter
@@ -642,7 +642,7 @@ the compiler. For instance the Win32 function:
::
APIENTRY int get_val (long);
-
+
should be imported from Ada as follows:
.. code-block:: ada
@@ -650,7 +650,7 @@ should be imported from Ada as follows:
function Get_Val (V : Interfaces.C.long) return Interfaces.C.int;
pragma Import (Stdcall, Get_Val);
-- On the x86 a long is 4 bytes, so the Link_Name is "_get_val@4"
-
+
As for the `C` calling convention, when the `External_Name`
parameter is missing, it is taken to be the name of the Ada entity in lower
case. If instead of writing the above import pragma you write:
@@ -659,7 +659,7 @@ case. If instead of writing the above import pragma you write:
function Get_Val (V : Interfaces.C.long) return Interfaces.C.int;
pragma Import (Stdcall, Get_Val, External_Name => "retrieve_val");
-
+
then the imported routine is `_retrieve_val@4`. However, if instead
of specifying the `External_Name` parameter you specify the
`Link_Name` as in the following example:
@@ -668,7 +668,7 @@ of specifying the `External_Name` parameter you specify the
function Get_Val (V : Interfaces.C.long) return Interfaces.C.int;
pragma Import (Stdcall, Get_Val, Link_Name => "retrieve_val");
-
+
then the imported routine is `retrieve_val`, that is, there is no
decoration at all. No leading underscore and no Stdcall suffix
:samp:`@{nn}`.
@@ -684,14 +684,14 @@ variable defined as:
.. code-block:: c
int my_var;
-
+
then, to access this variable from Ada you should write:
.. code-block:: ada
My_Var : Interfaces.C.int;
pragma Import (Stdcall, My_Var);
-
+
Note that to ease building cross-platform bindings this convention
will be handled as a `C` calling convention on non-Windows platforms.
@@ -814,7 +814,7 @@ you simply issue the command
::
$ gnatmake my_ada_app -largs -lAPI
-
+
The argument *-largs -lAPI* at the end of the *gnatmake* command
tells the GNAT linker to look for an import library. The linker will
look for a library name in this specific order:
@@ -835,7 +835,7 @@ following pragma
.. code-block:: ada
pragma Linker_Options ("-lAPI");
-
+
you do not have to add *-largs -lAPI* at the end of the
*gnatmake* command.
@@ -861,7 +861,7 @@ following two definitions:
int some_var;
int get (char *);
-
+
then the equivalent Ada spec could be:
.. code-block:: ada
@@ -869,7 +869,7 @@ then the equivalent Ada spec could be:
with Interfaces.C.Strings;
package API is
use Interfaces;
-
+
Some_Var : C.int;
function Get (Str : C.Strings.Chars_Ptr) return C.int;
@@ -877,7 +877,7 @@ then the equivalent Ada spec could be:
pragma Import (C, Get);
pragma Import (DLL, Some_Var);
end API;
-
+
.. _Creating_an_Import_Library:
@@ -914,7 +914,7 @@ suffix) has the following structure:
`symbol1`
`symbol2`
...
-
+
*LIBRARY `name`*
This section, which is optional, gives the name of the DLL.
@@ -934,7 +934,7 @@ suffix) has the following structure:
EXPORTS
some_var
get
-
+
Note that you must specify the correct suffix (:samp:`@{nn}`)
(see :ref:`Windows_Calling_Conventions`) for a Stdcall
calling convention function in the exported symbols list.
@@ -943,24 +943,19 @@ There can actually be other sections in a definition file, but these
sections are not relevant to the discussion at hand.
-.. rubric:: GNAT-Style Import Library
+.. _Create_Def_File_Automatically:
-.. _GNAT-Style_Import_Library:
+.. rubric:: Creating a Definition File Automatically
-To create a static import library from :file:`API.dll` with the GNAT tools
-you should proceed as follows:
-
-* Create the definition file :file:`API.def`
- (see :ref:`The Definition File <The_Definition_File>`).
- For that use the `dll2def` tool as follows:
+You can automatically create the definition file :file:`API.def`
+(see :ref:`The Definition File <The_Definition_File>`) from a DLL.
+For that use the `dlltool` program as follows:
::
- $ dll2def API.dll > API.def
-
- `dll2def` is a very simple tool: it takes as input a DLL and prints
- to standard output the list of entry points in the DLL. Note that if
- some routines in the DLL have the `Stdcall` convention
+ $ dlltool API.dll -z API.def --export-all-symbols
+
+ Note that if some routines in the DLL have the `Stdcall` convention
(:ref:`Windows_Calling_Conventions`) with stripped :samp:`@{nn}`
suffix then you'll have to edit :file:`api.def` to add it, and specify
*-k* to *gnatdll* when creating the import library.
@@ -972,20 +967,26 @@ you should proceed as follows:
corresponding Microsoft documentation for further details).
::
-
+
$ dumpbin /exports api.lib
-
+
- If you have a message about a missing symbol at link time the compiler
tells you what symbol is expected. You just have to go back to the
definition file and add the right suffix.
-* Build the import library `libAPI.dll.a`, using `gnatdll`
- (see :ref:`Using_gnatdll`) as follows:
+
+.. _GNAT-Style_Import_Library:
+
+.. rubric:: GNAT-Style Import Library
+
+To create a static import library from :file:`API.dll` with the GNAT tools
+you should create the .def file, then use `gnatdll` tool
+(see :ref:`Using_gnatdll`) as follows:
::
$ gnatdll -e API.def -d API.dll
-
+
`gnatdll` takes as input a definition file :file:`API.def` and the
name of the DLL containing the services listed in the definition file
:file:`API.dll`. The name of the static import library generated is
@@ -997,33 +998,29 @@ you should proceed as follows:
DLL (:ref:`Using_gnatdll` for more information about `gnatdll`).
+.. _MSVS-Style_Import_Library:
+
.. rubric:: Microsoft-Style Import Library
-With GNAT you can either use a GNAT-style or Microsoft-style import
-library. A Microsoft import library is needed only if you plan to make an
+A Microsoft import library is needed only if you plan to make an
Ada DLL available to applications developed with Microsoft
tools (:ref:`Mixed-Language_Programming_on_Windows`).
To create a Microsoft-style import library for :file:`API.dll` you
-should proceed as follows:
-
-* Create the definition file :file:`API.def` from the DLL. For this use either
- the `dll2def` tool as described above or the Microsoft `dumpbin`
- tool (see the corresponding Microsoft documentation for further details).
-
-* Build the actual import library using Microsoft's `lib` utility:
+should create the .def file, then build the actual import library using
+Microsoft's `lib` utility:
::
$ lib -machine:IX86 -def:API.def -out:API.lib
-
+
If you use the above command the definition file :file:`API.def` must
contain a line giving the name of the DLL:
::
LIBRARY "API"
-
+
See the Microsoft documentation for further details about the usage of
`lib`.
@@ -1066,7 +1063,7 @@ and use DLLs with GNAT.
::
$ gcc -shared -shared-libgcc -o api.dll obj1.o obj2.o ...
-
+
It is important to note that in this case all symbols found in the
object files are automatically exported. It is possible to restrict
the set of symbols to export by passing to *gcc* a definition
@@ -1076,7 +1073,7 @@ and use DLLs with GNAT.
::
$ gcc -shared -shared-libgcc -o api.dll api.def obj1.o obj2.o ...
-
+
If you use a definition file you must export the elaboration procedures
for every package that required one. Elaboration procedures are named
using the package name followed by "_E".
@@ -1092,7 +1089,7 @@ and use DLLs with GNAT.
$ mkdir apilib
$ copy *.ads *.ali api.dll apilib
$ attrib +R apilib\\*.ali
-
+
At this point it is possible to use the DLL by directly linking
against it. Note that you must use the GNAT shared runtime when using
GNAT shared libraries. This is achieved by using *-shared* binder's
@@ -1101,7 +1098,7 @@ option.
::
$ gnatmake main -Iapilib -bargs -shared -largs -Lapilib -lAPI
-
+
.. _Building_DLLs_with_gnatdll:
@@ -1207,7 +1204,7 @@ variable:
pragma Export (C, Count);
pragma Export (C, Factorial);
end API;
-
+
.. code-block:: ada
package body API is
@@ -1235,7 +1232,7 @@ variable:
Adafinal;
end Finalize_API;
end API;
-
+
If the Ada DLL you are building will only be used by Ada applications
you do not have to export Ada entities with a `C` or `Stdcall`
convention. As an example, the previous package could be written as
@@ -1251,9 +1248,9 @@ follows:
procedure Finalize_API;
-- Initialization and Finalization routines.
end API;
-
+
.. code-block:: ada
-
+
package body API is
function Factorial (Val : Integer) return Integer is
Fact : Integer := 1;
@@ -1268,7 +1265,7 @@ follows:
...
-- The remainder of this package body is unchanged.
end API;
-
+
Note that if you do not export the Ada entities with a `C` or
`Stdcall` convention you will have to provide the mangled Ada names
in the definition file of the Ada DLL
@@ -1341,7 +1338,7 @@ the corresponding C header file could look like:
extern int *_imp__count;
#define count (*_imp__count)
int factorial (int);
-
+
It is important to understand that when building an Ada DLL to be used by
other Ada applications, you need two different specs for the packages
contained in the DLL: one for building the DLL and the other for using
@@ -1357,7 +1354,7 @@ example consider a DLL comprising the following package `API`:
...
-- Remainder of the package omitted.
end API;
-
+
After producing a DLL containing package `API`, the spec that
must be used to import `API.Count` from Ada code outside of the
DLL is:
@@ -1368,7 +1365,7 @@ DLL is:
Count : Integer;
pragma Import (DLL, Count);
end API;
-
+
.. _Creating_the_Definition_File:
@@ -1399,7 +1396,7 @@ entities, which in this case are:
api__factorial
api__finalize_api
api__initialize_api
-
+
.. _Using_gnatdll:
@@ -1417,7 +1414,7 @@ static import library for the DLL and the actual DLL. The form of the
::
$ gnatdll [`switches`] `list-of-files` [-largs `opts`]
-
+
where `list-of-files` is a list of ALI and object files. The object
file list must be the exact list of objects corresponding to the non-Ada
sources whose services are to be included in the DLL. The ALI file list
@@ -1545,7 +1542,7 @@ once :file:`api.adb` has been compiled and :file:`api.def` created is
::
$ gnatdll -d api.dll api.ali
-
+
The above command creates two files: :file:`libapi.dll.a` (the import
library) and :file:`api.dll` (the actual DLL). If you want to create
only the DLL, just type:
@@ -1553,13 +1550,13 @@ only the DLL, just type:
::
$ gnatdll -d api.dll -n api.ali
-
+
Alternatively if you want to create just the import library, type:
::
$ gnatdll -d api.dll
-
+
.. rubric:: `gnatdll` behind the Scenes
@@ -1608,7 +1605,7 @@ the following:
$ gnatbind -n api
$ gnatlink api -o api.jnk api.exp -mdll
-Wl,--base-file,api.base
-
+
* `gnatdll` builds the new export table using the new base file and
generates the DLL import library :file:`libAPI.dll.a`.
@@ -1640,7 +1637,7 @@ is
::
$ dlltool [`switches`]
-
+
`dlltool` switches include:
@@ -1766,7 +1763,7 @@ resource:
VALUE "Translation", 0x809, 1252
END
END
-
+
The value `0809` (langID) is for the U.K English language and
`04E4` (charsetID), which is equal to `1252` decimal, for
multilingual.
@@ -1812,7 +1809,7 @@ containing the resources. This is done using the Resource Compiler
::
$ windres -i myres.rc -o myres.o
-
+
By default `windres` will run *gcc* to preprocess the :file:`.rc`
file. You can specify an alternate preprocessor (usually named
:file:`cpp.exe`) using the `windres` *--preprocessor*
@@ -1828,7 +1825,7 @@ GNAT-compatible object file as follows:
::
$ windres -i myres.res -o myres.o
-
+
.. _Using_Resources:
@@ -1845,7 +1842,59 @@ option:
::
$ gnatmake myprog -largs myres.o
-
+
+
+.. _Using_GNAT_DLL_from_MSVS:
+
+Using GNAT DLLs from Microsoft Visual Studio Applications
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+.. index:: Microsoft Visual Studio, use with GNAT DLLs
+
+This section describes a common case of mixed GNAT/Microsoft Visual Studio
+application development, where the main program is developed using MSVS, and
+is linked with a DLL developed using GNAT. Such a mixed application should
+be developed following the general guidelines outlined above; below is the
+cookbook-style sequence of steps to follow:
+
+1. First develop and build the GNAT shared library using a library project
+ (let's assume the project is `mylib.gpr`, producing the library `libmylib.dll`):
+
+ ::
+
+ $ gprbuild -p mylib.gpr
+
+2. Produce a .def file for the symbols you need to interface with, either by
+ hand or automatically with possibly some manual adjustments
+ (see :ref:`Creating Definition File Automatically <Create_Def_File_Automatically>`):
+
+ ::
+
+ $ dlltool libmylib.dll -z libmylib.def --export-all-symbols
+
+3. Make sure that MSVS command-line tools are accessible on the path.
+
+4. Create the Microsoft-style import library (see :ref:`MSVS-Style Import Library <MSVS-Style_Import_Library>`):
+
+ ::
+
+ $ lib -machine:IX86 -def:libmylib.def -out:libmylib.lib
+
+If you are using a 64-bit toolchain, the above becomes...
+
+ ::
+
+ $ lib -machine:X64 -def:libmylib.def -out:libmylib.lib
+
+5. Build the C main
+
+ ::
+
+ $ cl /O2 /MD main.c libmylib.lib
+
+6. Before running the executable, make sure you have set the PATH to the DLL,
+ or copy the DLL into into the directory containing the .exe.
+
.. _Debugging_a_DLL:
@@ -1890,13 +1939,13 @@ switch). Here are the step-by-step instructions for debugging it:
::
$ gdb -nw ada_main
-
+
* Start the program and stop at the beginning of the main procedure
::
(gdb) start
-
+
This step is required to be able to set a breakpoint inside the DLL. As long
as the program is not run, the DLL is not loaded. This has the
consequence that the DLL debugging information is also not loaded, so it is not
@@ -1908,7 +1957,7 @@ switch). Here are the step-by-step instructions for debugging it:
(gdb) break ada_dll
(gdb) cont
-
+
At this stage a breakpoint is set inside the DLL. From there on
you can use the standard approach to debug the whole program
(:ref:`Running_and_Debugging_Ada_Programs`).
@@ -1943,7 +1992,7 @@ been built with debugging information (see GNAT `-g` option).
::
$ objdump --file-header main.exe
-
+
The starting address is reported on the last line. For example:
::
@@ -1952,13 +2001,13 @@ been built with debugging information (see GNAT `-g` option).
architecture: i386, flags 0x0000010a:
EXEC_P, HAS_DEBUG, D_PAGED
start address 0x00401010
-
+
* Launch the debugger on the executable.
::
$ gdb main.exe
-
+
* Set a breakpoint at the starting address, and launch the program.
::
@@ -1973,7 +2022,7 @@ been built with debugging information (see GNAT `-g` option).
::
(gdb) break ada_dll.adb:45
-
+
Or if you want to break using a symbol on the DLL, you need first to
select the Ada language (language used by the DLL).
@@ -1981,13 +2030,13 @@ been built with debugging information (see GNAT `-g` option).
(gdb) set language ada
(gdb) break ada_dll
-
+
* Continue the program.
::
(gdb) cont
-
+
This will run the program until it reaches the breakpoint that has been
set. From that point you can use the standard way to debug a program
as described in (:ref:`Running_and_Debugging_Ada_Programs`).
@@ -2010,7 +2059,7 @@ loop in the code of the DLL to meet this criterion.
::
$ main
-
+
* Use the Windows *Task Manager* to find the process ID. Let's say
that the process PID for :file:`main.exe` is 208.
@@ -2019,31 +2068,31 @@ loop in the code of the DLL to meet this criterion.
::
$ gdb
-
+
* Attach to the running process to be debugged.
::
(gdb) attach 208
-
+
* Load the process debugging information.
::
(gdb) symbol-file main.exe
-
+
* Break somewhere in the DLL.
::
(gdb) break ada_dll
-
+
* Continue process execution.
::
(gdb) cont
-
+
This last step will resume the process execution, and stop at
the breakpoint we have set. From there you can use the standard
approach to debug a program as described in
@@ -2074,7 +2123,7 @@ This setting can be done with *gnatlink* using either of the following:
::
$ gnatlink hello -Xlinker --stack=0x10000,0x1000
-
+
This sets the stack reserve size to 0x10000 bytes and the stack commit
size to 0x1000 bytes.
@@ -2084,7 +2133,7 @@ This setting can be done with *gnatlink* using either of the following:
::
$ gnatlink hello -Wl,--stack=0x1000000
-
+
This sets the stack reserve size to 0x1000000 bytes. Note that with
*-Wl* option it is not possible to set the stack commit size
because the coma is a separator for this option.
@@ -2103,7 +2152,7 @@ Under Windows systems, it is possible to specify the program heap size from
::
$ gnatlink hello -Xlinker --heap=0x10000,0x1000
-
+
This sets the heap reserve size to 0x10000 bytes and the heap commit
size to 0x1000 bytes.
@@ -2112,13 +2161,73 @@ Under Windows systems, it is possible to specify the program heap size from
::
$ gnatlink hello -Wl,--heap=0x1000000
-
+
This sets the heap reserve size to 0x1000000 bytes. Note that with
*-Wl* option it is not possible to set the heap commit size
because the coma is a separator for this option.
+.. _Win32_Specific_Addons:
+
+Windows Specific Add-Ons
+-------------------------
+
+This section describes the Windows specific add-ons.
+
+.. _Win32Ada:
+
+Win32Ada
+^^^^^^^^
+
+Win32Ada is a binding for the Microsoft Win32 API. This binding can be
+easily installed from the provided installer. To use the Win32Ada
+binding you need to use a project file, and adding a single with_clause
+will give you full access to the Win32Ada binding sources and ensure
+that the proper libraries are passed to the linker.
+
+ .. code-block:: gpr
+
+ with "win32ada";
+ project P is
+ for Sources use ...;
+ end P;
+
+To build the application you just need to call gprbuild for the
+application's project, here p.gpr:
+
+ .. code-block:: sh
+
+ gprbuild p.gpr
+
+.. _wPOSIX:
+
+wPOSIX
+^^^^^^
+
+wPOSIX is a minimal POSIX binding whose goal is to help with building
+cross-platforms applications. This binding is not complete though, as
+the Win32 API does not provide the necessary support for all POSIX APIs.
+
+To use the wPOSIX binding you need to use a project file, and adding
+a single with_clause will give you full access to the wPOSIX binding
+sources and ensure that the proper libraries are passed to the linker.
+
+ .. code-block:: gpr
+
+ with "wposix";
+ project P is
+ for Sources use ...;
+ end P;
+
+To build the application you just need to call gprbuild for the
+application's project, here p.gpr:
+
+ .. code-block:: sh
+
+ gprbuild p.gpr
+
+
.. _Mac_OS_Topics:
Mac OS Topics
@@ -2180,10 +2289,8 @@ as follow. In a Terminal, run the following command:
::
$ codesign -f -s "gdb-cert" <gnat_install_prefix>/bin/gdb
-
+
where "gdb-cert" should be replaced by the actual certificate
name chosen above, and <gnat_install_prefix> should be replaced by
the location where you installed GNAT. Also, be sure that users are
in the Unix group ``_developer``.
-
-
diff --git a/gcc/ada/doc/gnat_ugn/the_gnat_compilation_model.rst b/gcc/ada/doc/gnat_ugn/the_gnat_compilation_model.rst
index 80634d0eec7..673478a4aad 100644
--- a/gcc/ada/doc/gnat_ugn/the_gnat_compilation_model.rst
+++ b/gcc/ada/doc/gnat_ugn/the_gnat_compilation_model.rst
@@ -3629,7 +3629,7 @@ Convention identifiers are recognized by GNAT:
to perform dimensional checks:
- .. code-block: ada
+ .. code-block:: ada
type Distance is new Long_Float;
type Time is new Long_Float;
@@ -3665,7 +3665,7 @@ Convention identifiers are recognized by GNAT:
.. index:: Convention Stdcall
*Stdcall*
- This is relevant only to Windows XP/2000/NT implementations of GNAT,
+ This is relevant only to Windows implementations of GNAT,
and specifies that the `Stdcall` calling sequence will be used,
as defined by the NT API. Nevertheless, to ease building
cross-platform bindings this convention will be handled as a `C` calling
diff --git a/gcc/ada/einfo.adb b/gcc/ada/einfo.adb
index 8769631e4c2..e8ee8730f9c 100644
--- a/gcc/ada/einfo.adb
+++ b/gcc/ada/einfo.adb
@@ -216,11 +216,11 @@ package body Einfo is
-- Related_Expression Node24
-- Subps_Index Uint24
+ -- Contract_Wrapper Node25
-- Debug_Renaming_Link Node25
-- DT_Offset_To_Top_Func Node25
-- Interface_Alias Node25
-- Interfaces Elist25
- -- PPC_Wrapper Node25
-- Related_Array_Object Node25
-- Static_Discrete_Predicate List25
-- Static_Real_Or_String_Predicate Node25
@@ -1231,6 +1231,12 @@ package body Einfo is
return Node34 (Id);
end Contract;
+ function Contract_Wrapper (Id : E) return E is
+ begin
+ pragma Assert (Ekind_In (Id, E_Entry, E_Entry_Family));
+ return Node25 (Id);
+ end Contract_Wrapper;
+
function Entry_Parameters_Type (Id : E) return E is
begin
return Node15 (Id);
@@ -2876,12 +2882,6 @@ package body Einfo is
return Node14 (Id);
end Postconditions_Proc;
- function PPC_Wrapper (Id : E) return E is
- begin
- pragma Assert (Ekind_In (Id, E_Entry, E_Entry_Family));
- return Node25 (Id);
- end PPC_Wrapper;
-
function Prival (Id : E) return E is
begin
pragma Assert (Is_Protected_Component (Id));
@@ -3877,6 +3877,12 @@ package body Einfo is
Set_Node34 (Id, V);
end Set_Contract;
+ procedure Set_Contract_Wrapper (Id : E; V : E) is
+ begin
+ pragma Assert (Ekind_In (Id, E_Entry, E_Entry_Family));
+ Set_Node25 (Id, V);
+ end Set_Contract_Wrapper;
+
procedure Set_Corresponding_Concurrent_Type (Id : E; V : E) is
begin
pragma Assert
@@ -5912,12 +5918,6 @@ package body Einfo is
Set_Node14 (Id, V);
end Set_Postconditions_Proc;
- procedure Set_PPC_Wrapper (Id : E; V : E) is
- begin
- pragma Assert (Ekind_In (Id, E_Entry, E_Entry_Family));
- Set_Node25 (Id, V);
- end Set_PPC_Wrapper;
-
procedure Set_Direct_Primitive_Operations (Id : E; V : L) is
begin
pragma Assert (Is_Tagged_Type (Id));
@@ -10003,6 +10003,10 @@ package body Einfo is
E_Package =>
Write_Str ("Abstract_States");
+ when E_Entry |
+ E_Entry_Family =>
+ Write_Str ("Contract_Wrapper");
+
when E_Variable =>
Write_Str ("Debug_Renaming_Link");
@@ -10026,10 +10030,6 @@ package body Einfo is
when Task_Kind =>
Write_Str ("Task_Body_Procedure");
- when E_Entry |
- E_Entry_Family =>
- Write_Str ("PPC_Wrapper");
-
when Discrete_Kind =>
Write_Str ("Static_Discrete_Predicate");
diff --git a/gcc/ada/einfo.ads b/gcc/ada/einfo.ads
index 8b91ee4ad8f..31059fd2bc6 100644
--- a/gcc/ada/einfo.ads
+++ b/gcc/ada/einfo.ads
@@ -714,6 +714,12 @@ package Einfo is
-- variable and task type entities. Points to the contract of the entity,
-- holding various assertion items and data classifiers.
+-- Contract_Wrapper (Node25)
+-- Defined in entry and entry family entities. Set only when the entry
+-- [family] has contract cases, preconditions, and/or postconditions.
+-- Contains the entity of a wrapper procedure which encapsulates the
+-- original entry and implements precondition/postcondition semantics.
+
-- Corresponding_Concurrent_Type (Node18)
-- Defined in record types that are constructed by the expander to
-- represent task and protected types (Is_Concurrent_Record_Type flag
@@ -3638,8 +3644,9 @@ package Einfo is
-- Points to the component in the base type.
-- Overlays_Constant (Flag243)
--- Defined in all entities. Set only for a variable for which there is
--- an address clause which causes the variable to overlay a constant.
+-- Defined in all entities. Set only for E_Constant or E_Variable for
+-- which there is an address clause that causes the entity to overlay
+-- a constant object.
-- Overridden_Operation (Node26)
-- Defined in subprograms. For overriding operations, points to the
@@ -3706,11 +3713,6 @@ package Einfo is
-- to the entity of the _Postconditions procedure used to check contract
-- assertions on exit from a subprogram.
--- PPC_Wrapper (Node25)
--- Defined in entries and entry families. Set only if pre- or post-
--- conditions are present. The precondition_wrapper body is the original
--- entry call, decorated with the given precondition for the entry.
-
-- Predicate_Function (synthesized)
-- Defined in all types. Set for types for which (Has_Predicates is True)
-- and for which a predicate procedure has been built that tests that the
@@ -5757,7 +5759,7 @@ package Einfo is
-- Accept_Address (Elist21)
-- Scope_Depth_Value (Uint22)
-- Protection_Object (Node23) (protected kind)
- -- PPC_Wrapper (Node25)
+ -- Contract_Wrapper (Node25)
-- Extra_Formals (Node28)
-- Contract (Node34)
-- SPARK_Pragma (Node40) (protected kind)
@@ -6750,6 +6752,7 @@ package Einfo is
function Component_Type (Id : E) return E;
function Contains_Ignored_Ghost_Code (Id : E) return B;
function Contract (Id : E) return N;
+ function Contract_Wrapper (Id : E) return E;
function Corresponding_Concurrent_Type (Id : E) return E;
function Corresponding_Discriminant (Id : E) return E;
function Corresponding_Equality (Id : E) return E;
@@ -7088,7 +7091,6 @@ package Einfo is
function Partial_View_Has_Unknown_Discr (Id : E) return B;
function Pending_Access_Types (Id : E) return L;
function Postconditions_Proc (Id : E) return E;
- function PPC_Wrapper (Id : E) return E;
function Prival (Id : E) return E;
function Prival_Link (Id : E) return E;
function Private_Dependents (Id : E) return L;
@@ -7414,6 +7416,7 @@ package Einfo is
procedure Set_Component_Type (Id : E; V : E);
procedure Set_Contains_Ignored_Ghost_Code (Id : E; V : B := True);
procedure Set_Contract (Id : E; V : N);
+ procedure Set_Contract_Wrapper (Id : E; V : E);
procedure Set_Corresponding_Concurrent_Type (Id : E; V : E);
procedure Set_Corresponding_Discriminant (Id : E; V : E);
procedure Set_Corresponding_Equality (Id : E; V : E);
@@ -7755,7 +7758,6 @@ package Einfo is
procedure Set_Partial_View_Has_Unknown_Discr (Id : E; V : B := True);
procedure Set_Pending_Access_Types (Id : E; V : L);
procedure Set_Postconditions_Proc (Id : E; V : E);
- procedure Set_PPC_Wrapper (Id : E; V : E);
procedure Set_Prival (Id : E; V : E);
procedure Set_Prival_Link (Id : E; V : E);
procedure Set_Private_Dependents (Id : E; V : L);
@@ -8193,6 +8195,7 @@ package Einfo is
pragma Inline (Component_Type);
pragma Inline (Contains_Ignored_Ghost_Code);
pragma Inline (Contract);
+ pragma Inline (Contract_Wrapper);
pragma Inline (Corresponding_Concurrent_Type);
pragma Inline (Corresponding_Discriminant);
pragma Inline (Corresponding_Equality);
@@ -8577,7 +8580,6 @@ package Einfo is
pragma Inline (Partial_View_Has_Unknown_Discr);
pragma Inline (Pending_Access_Types);
pragma Inline (Postconditions_Proc);
- pragma Inline (PPC_Wrapper);
pragma Inline (Prival);
pragma Inline (Prival_Link);
pragma Inline (Private_Dependents);
@@ -8701,6 +8703,7 @@ package Einfo is
pragma Inline (Set_Component_Type);
pragma Inline (Set_Contains_Ignored_Ghost_Code);
pragma Inline (Set_Contract);
+ pragma Inline (Set_Contract_Wrapper);
pragma Inline (Set_Corresponding_Concurrent_Type);
pragma Inline (Set_Corresponding_Discriminant);
pragma Inline (Set_Corresponding_Equality);
@@ -9038,7 +9041,6 @@ package Einfo is
pragma Inline (Set_Partial_View_Has_Unknown_Discr);
pragma Inline (Set_Pending_Access_Types);
pragma Inline (Set_Postconditions_Proc);
- pragma Inline (Set_PPC_Wrapper);
pragma Inline (Set_Prival);
pragma Inline (Set_Prival_Link);
pragma Inline (Set_Private_Dependents);
diff --git a/gcc/ada/exp_aggr.adb b/gcc/ada/exp_aggr.adb
index dbc0d7afdf3..ad23a661b64 100644
--- a/gcc/ada/exp_aggr.adb
+++ b/gcc/ada/exp_aggr.adb
@@ -1936,8 +1936,7 @@ package body Exp_Aggr is
-- constraint associated with the type entity (which is
-- preferable, but it's not always present ???)
- if Is_Empty_Elmt_List (
- Discriminant_Constraint (Current_Typ))
+ if Is_Empty_Elmt_List (Discriminant_Constraint (Current_Typ))
then
Assoc := Get_Constraint_Association (Current_Typ);
Assoc_Elmt := No_Elmt;
diff --git a/gcc/ada/exp_attr.adb b/gcc/ada/exp_attr.adb
index cb64c39230e..abf7f1bfbcd 100644
--- a/gcc/ada/exp_attr.adb
+++ b/gcc/ada/exp_attr.adb
@@ -109,6 +109,16 @@ package body Exp_Attr is
-- If we are within an instance body all visibility has been established
-- already and there is no need to install the package.
+ -- This mechanism is now extended to the component types of the array type,
+ -- when the component type is not in scope and is private, to handle
+ -- properly the case when the full view has defaulted discriminants.
+
+ -- This special processing is ultimately caused by the fact that the
+ -- compiler lacks a well-defined phase when full views are visible
+ -- everywhere. Having such a separate pass would remove much of the
+ -- special-case code that shuffles partial and full views in the middle
+ -- of semantic analysis and expansion.
+
procedure Expand_Access_To_Protected_Op
(N : Node_Id;
Pref : Node_Id;
@@ -624,24 +634,47 @@ package body Exp_Attr is
Arr : Entity_Id;
Check : Boolean)
is
- Installed : Boolean := False;
- Scop : constant Entity_Id := Scope (Arr);
- Curr : constant Entity_Id := Current_Scope;
+ C_Type : constant Entity_Id := Base_Type (Component_Type (Arr));
+ Curr : constant Entity_Id := Current_Scope;
+ Install : Boolean := False;
+ Scop : Entity_Id := Scope (Arr);
begin
if Is_Hidden (Arr)
and then not In_Open_Scopes (Scop)
and then Ekind (Scop) = E_Package
+ then
+ Install := True;
+
+ else
+ -- The component type may be private, in which case we install its
+ -- full view to compile the subprogram.
+
+ -- The component type may be private, in which case we install its
+ -- full view to compile the subprogram. We do not do this if the
+ -- type has a Stream_Convert pragma, which indicates that there are
+ -- special stream-processing operations for that type (for example
+ -- Unbounded_String and its wide varieties).
+
+ Scop := Scope (C_Type);
+
+ if Is_Private_Type (C_Type)
+ and then Present (Full_View (C_Type))
+ and then not In_Open_Scopes (Scop)
+ and then Ekind (Scop) = E_Package
+ and then No (Get_Stream_Convert_Pragma (C_Type))
+ then
+ Install := True;
+ end if;
+ end if;
- -- If we are within an instance body, then all visibility has been
- -- established already and there is no need to install the package.
+ -- If we are within an instance body, then all visibility has been
+ -- established already and there is no need to install the package.
- and then not In_Instance_Body
- then
+ if Install and then not In_Instance_Body then
Push_Scope (Scop);
Install_Visible_Declarations (Scop);
Install_Private_Declarations (Scop);
- Installed := True;
-- The entities in the package are now visible, but the generated
-- stream entity must appear in the current scope (usually an
@@ -649,6 +682,8 @@ package body Exp_Attr is
-- scopes.
Push_Scope (Curr);
+ else
+ Install := False;
end if;
if Check then
@@ -657,7 +692,7 @@ package body Exp_Attr is
Insert_Action (N, Decl, Suppress => All_Checks);
end if;
- if Installed then
+ if Install then
-- Remove extra copy of current scope, and package itself
@@ -4427,7 +4462,7 @@ package body Exp_Attr is
X : constant Node_Id := Prefix (N);
Y : constant Node_Id := First (Expressions (N));
- -- The argumens
+ -- The arguments
X_Addr, Y_Addr : Node_Id;
-- the expressions for their integer addresses
@@ -4448,7 +4483,9 @@ package body Exp_Attr is
-- with the proper address operations. We convert addresses to
-- integer addresses to use predefined arithmetic. The size is
- -- expressed in storage units.
+ -- expressed in storage units. We add copies of X_Addr and Y_Addr
+ -- to prevent the appearance of the same node in two places in
+ -- the tree.
X_Addr :=
Unchecked_Convert_To (RTE (RE_Integer_Address),
@@ -4486,28 +4523,28 @@ package body Exp_Attr is
Right_Opnd => Y_Addr);
Rewrite (N,
- Make_If_Expression (Loc,
- New_List (
- Cond,
-
- Make_Op_Ge (Loc,
- Left_Opnd =>
- Make_Op_Add (Loc,
- Left_Opnd => X_Addr,
- Right_Opnd =>
- Make_Op_Subtract (Loc,
- Left_Opnd => X_Size,
- Right_Opnd => Make_Integer_Literal (Loc, 1))),
- Right_Opnd => Y_Addr),
-
- Make_Op_Ge (Loc,
- Make_Op_Add (Loc,
- Left_Opnd => Y_Addr,
- Right_Opnd =>
- Make_Op_Subtract (Loc,
- Left_Opnd => Y_Size,
- Right_Opnd => Make_Integer_Literal (Loc, 1))),
- Right_Opnd => X_Addr))));
+ Make_If_Expression (Loc, New_List (
+ Cond,
+
+ Make_Op_Ge (Loc,
+ Left_Opnd =>
+ Make_Op_Add (Loc,
+ Left_Opnd => New_Copy_Tree (X_Addr),
+ Right_Opnd =>
+ Make_Op_Subtract (Loc,
+ Left_Opnd => X_Size,
+ Right_Opnd => Make_Integer_Literal (Loc, 1))),
+ Right_Opnd => Y_Addr),
+
+ Make_Op_Ge (Loc,
+ Left_Opnd =>
+ Make_Op_Add (Loc,
+ Left_Opnd => New_Copy_Tree (Y_Addr),
+ Right_Opnd =>
+ Make_Op_Subtract (Loc,
+ Left_Opnd => Y_Size,
+ Right_Opnd => Make_Integer_Literal (Loc, 1))),
+ Right_Opnd => X_Addr))));
Analyze_And_Resolve (N, Standard_Boolean);
end Overlaps_Storage;
diff --git a/gcc/ada/exp_ch11.adb b/gcc/ada/exp_ch11.adb
index 814dfdd80fd..c41a95f4973 100644
--- a/gcc/ada/exp_ch11.adb
+++ b/gcc/ada/exp_ch11.adb
@@ -1995,7 +1995,7 @@ package body Exp_Ch11 is
-- Get_Local_Raise_Call_Entity --
---------------------------------
- -- Note: this is primary provided for use by the back end in generating
+ -- Note: this is primarily provided for use by the back end in generating
-- calls to Local_Raise. But it would be too late in the back end to call
-- RTE if this actually caused a load/analyze of the unit. So what we do
-- is to ensure there is a dummy call to this function during front end
diff --git a/gcc/ada/exp_ch5.adb b/gcc/ada/exp_ch5.adb
index dbefc051d47..f7433225f3b 100644
--- a/gcc/ada/exp_ch5.adb
+++ b/gcc/ada/exp_ch5.adb
@@ -4285,7 +4285,7 @@ package body Exp_Ch5 is
-- with element iterators, where debug information must be generated
-- for the temporary that holds the element value. These temporaries
-- are created within a transient block whose local declarations are
- -- transferred to the loop, which now has non-trivial local objects.
+ -- transferred to the loop, which now has nontrivial local objects.
if Nkind (N) = N_Loop_Statement
and then Present (Identifier (N))
diff --git a/gcc/ada/exp_ch6.adb b/gcc/ada/exp_ch6.adb
index 517143b9ea2..bdde498306a 100644
--- a/gcc/ada/exp_ch6.adb
+++ b/gcc/ada/exp_ch6.adb
@@ -5980,7 +5980,7 @@ package body Exp_Ch6 is
Utyp : constant Entity_Id := Underlying_Type (R_Type);
- Exp : constant Node_Id := Expression (N);
+ Exp : Node_Id := Expression (N);
pragma Assert (Present (Exp));
Exptyp : constant Entity_Id := Etype (Exp);
@@ -5996,11 +5996,24 @@ package body Exp_Ch6 is
begin
if Is_Class_Wide_Type (R_Type)
- and then not Is_Class_Wide_Type (Etype (Exp))
+ and then not Is_Class_Wide_Type (Exptyp)
+ and then Nkind (Exp) /= N_Type_Conversion
then
- Subtype_Ind := New_Occurrence_Of (Etype (Exp), Loc);
+ Subtype_Ind := New_Occurrence_Of (Exptyp, Loc);
else
Subtype_Ind := New_Occurrence_Of (R_Type, Loc);
+
+ -- If the result type is class-wide and the expression is a view
+ -- conversion, the conversion plays no role in the expansion because
+ -- it does not modify the tag of the object. Remove the conversion
+ -- altogether to prevent tag overwriting.
+
+ if Is_Class_Wide_Type (R_Type)
+ and then not Is_Class_Wide_Type (Exptyp)
+ and then Nkind (Exp) = N_Type_Conversion
+ then
+ Exp := Expression (Exp);
+ end if;
end if;
-- For the case of a simple return that does not come from an extended
@@ -6880,10 +6893,12 @@ package body Exp_Ch6 is
return False;
end if;
- -- Step past qualification or unchecked conversion (the latter can occur
- -- in cases of calls to 'Input).
+ -- Step past qualification, type conversion (which can occur in actual
+ -- parameter contexts), and unchecked conversion (which can occur in
+ -- cases of calls to 'Input).
if Nkind_In (Exp_Node, N_Qualified_Expression,
+ N_Type_Conversion,
N_Unchecked_Type_Conversion)
then
Exp_Node := Expression (N);
@@ -7412,10 +7427,12 @@ package body Exp_Ch6 is
Return_Obj_Decl : Entity_Id;
begin
- -- Step past qualification or unchecked conversion (the latter can occur
- -- in cases of calls to 'Input).
+ -- Step past qualification, type conversion (which can occur in actual
+ -- parameter contexts), and unchecked conversion (which can occur in
+ -- cases of calls to 'Input).
if Nkind_In (Func_Call, N_Qualified_Expression,
+ N_Type_Conversion,
N_Unchecked_Type_Conversion)
then
Func_Call := Expression (Func_Call);
diff --git a/gcc/ada/exp_ch9.adb b/gcc/ada/exp_ch9.adb
index 4887c707f69..bd9a2af9551 100644
--- a/gcc/ada/exp_ch9.adb
+++ b/gcc/ada/exp_ch9.adb
@@ -128,6 +128,15 @@ package body Exp_Ch9 is
-- Build a specification for a function implementing the protected entry
-- barrier of the specified entry body.
+ procedure Build_Contract_Wrapper (E : Entity_Id; Decl : Node_Id);
+ -- Build the body of a wrapper procedure for an entry or entry family that
+ -- has contract cases, preconditions, or postconditions. The body gathers
+ -- the executable contract items and expands them in the usual way, and
+ -- performs the entry call itself. This way preconditions are evaluated
+ -- before the call is queued. E is the entry in question, and Decl is the
+ -- enclosing synchronized type declaration at whose freeze point the
+ -- generated body is analyzed.
+
function Build_Corresponding_Record
(N : Node_Id;
Ctyp : Node_Id;
@@ -197,14 +206,6 @@ package body Exp_Ch9 is
-- <formalN> : AnnN;
-- end record;
- procedure Build_PPC_Wrapper (E : Entity_Id; Decl : Node_Id);
- -- Build body of wrapper procedure for an entry or entry family that has
- -- pre/postconditions. The body gathers the PPC's and expands them in the
- -- usual way, and performs the entry call itself. This way preconditions
- -- are evaluated before the call is queued. E is the entry in question,
- -- and Decl is the enclosing synchronized type declaration at whose freeze
- -- point the generated body is analyzed.
-
function Build_Protected_Entry
(N : Node_Id;
Ent : Entity_Id;
@@ -409,7 +410,7 @@ package body Exp_Ch9 is
Context_Decls : out List_Id);
-- Subsidiary routine to procedures Build_Activation_Chain_Entity and
-- Build_Master_Entity. Given an arbitrary node in the tree, find the
- -- nearest enclosing body, block, package or return statement and return
+ -- nearest enclosing body, block, package, or return statement and return
-- its constituents. Context is the enclosing construct, Context_Id is
-- the scope of Context_Id and Context_Decls is the declarative list of
-- Context.
@@ -1218,6 +1219,287 @@ package body Exp_Ch9 is
Set_Master_Id (Typ, Master_Id);
end Build_Class_Wide_Master;
+ ----------------------------
+ -- Build_Contract_Wrapper --
+ ----------------------------
+
+ procedure Build_Contract_Wrapper (E : Entity_Id; Decl : Node_Id) is
+ Conc_Typ : constant Entity_Id := Scope (E);
+ Loc : constant Source_Ptr := Sloc (E);
+
+ procedure Add_Discriminant_Renamings
+ (Obj_Id : Entity_Id;
+ Decls : List_Id);
+ -- Add renaming declarations for all discriminants of concurrent type
+ -- Conc_Typ. Obj_Id is the entity of the wrapper formal parameter which
+ -- represents the concurrent object.
+
+ procedure Add_Matching_Formals
+ (Formals : List_Id;
+ Actuals : in out List_Id);
+ -- Add formal parameters that match those of entry E to list Formals.
+ -- The routine also adds matching actuals for the new formals to list
+ -- Actuals.
+
+ procedure Transfer_Pragma (Prag : Node_Id; To : in out List_Id);
+ -- Relocate pragma Prag to list To. The routine creates a new list if
+ -- To does not exist.
+
+ --------------------------------
+ -- Add_Discriminant_Renamings --
+ --------------------------------
+
+ procedure Add_Discriminant_Renamings
+ (Obj_Id : Entity_Id;
+ Decls : List_Id)
+ is
+ Discr : Entity_Id;
+
+ begin
+ -- Inspect the discriminants of the concurrent type and generate a
+ -- renaming for each one.
+
+ if Has_Discriminants (Conc_Typ) then
+ Discr := First_Discriminant (Conc_Typ);
+ while Present (Discr) loop
+ Prepend_To (Decls,
+ Make_Object_Renaming_Declaration (Loc,
+ Defining_Identifier =>
+ Make_Defining_Identifier (Loc, Chars (Discr)),
+ Subtype_Mark =>
+ New_Occurrence_Of (Etype (Discr), Loc),
+ Name =>
+ Make_Selected_Component (Loc,
+ Prefix => New_Occurrence_Of (Obj_Id, Loc),
+ Selector_Name =>
+ Make_Identifier (Loc, Chars (Discr)))));
+
+ Next_Discriminant (Discr);
+ end loop;
+ end if;
+ end Add_Discriminant_Renamings;
+
+ --------------------------
+ -- Add_Matching_Formals --
+ --------------------------
+
+ procedure Add_Matching_Formals
+ (Formals : List_Id;
+ Actuals : in out List_Id)
+ is
+ Formal : Entity_Id;
+ New_Formal : Entity_Id;
+
+ begin
+ -- Inspect the formal parameters of the entry and generate a new
+ -- matching formal with the same name for the wrapper. A reference
+ -- to the new formal becomes an actual in the entry call.
+
+ Formal := First_Formal (E);
+ while Present (Formal) loop
+ New_Formal := Make_Defining_Identifier (Loc, Chars (Formal));
+ Append_To (Formals,
+ Make_Parameter_Specification (Loc,
+ Defining_Identifier => New_Formal,
+ In_Present => In_Present (Parent (Formal)),
+ Out_Present => Out_Present (Parent (Formal)),
+ Parameter_Type =>
+ New_Occurrence_Of (Etype (Formal), Loc)));
+
+ if No (Actuals) then
+ Actuals := New_List;
+ end if;
+
+ Append_To (Actuals, New_Occurrence_Of (New_Formal, Loc));
+ Next_Formal (Formal);
+ end loop;
+ end Add_Matching_Formals;
+
+ ---------------------
+ -- Transfer_Pragma --
+ ---------------------
+
+ procedure Transfer_Pragma (Prag : Node_Id; To : in out List_Id) is
+ New_Prag : Node_Id;
+
+ begin
+ if No (To) then
+ To := New_List;
+ end if;
+
+ New_Prag := Relocate_Node (Prag);
+
+ Set_Analyzed (New_Prag, False);
+ Append (New_Prag, To);
+ end Transfer_Pragma;
+
+ -- Local variables
+
+ Items : constant Node_Id := Contract (E);
+ Actuals : List_Id := No_List;
+ Call : Node_Id;
+ Call_Nam : Node_Id;
+ Decls : List_Id := No_List;
+ Formals : List_Id;
+ Has_Pragma : Boolean := False;
+ Index_Id : Entity_Id;
+ Obj_Id : Entity_Id;
+ Prag : Node_Id;
+ Wrapper_Id : Entity_Id;
+
+ -- Start of processing for Build_Contract_Wrapper
+
+ begin
+ -- This routine generates a specialized wrapper for a protected or task
+ -- entry [family] which implements precondition/postcondition semantics.
+ -- Preconditions and case guards of contract cases are checked before
+ -- the protected action or rendezvous takes place. Postconditions and
+ -- consequences of contract cases are checked after the protected action
+ -- or rendezvous takes place. The structure of the generated wrapper is
+ -- as follows:
+
+ -- procedure Wrapper
+ -- (Obj_Id : Conc_Typ; -- concurrent object
+ -- [Index : Index_Typ;] -- index of entry family
+ -- [Formal_1 : ...; -- parameters of original entry
+ -- Formal_N : ...])
+ -- is
+ -- [Discr_1 : ... renames Obj_Id.Discr_1; -- discriminant
+ -- Discr_N : ... renames Obj_Id.Discr_N;] -- renamings
+
+ -- <precondition checks>
+ -- <case guard checks>
+
+ -- procedure _Postconditions is
+ -- begin
+ -- <postcondition checks>
+ -- <consequence checks>
+ -- end _Postconditions;
+
+ -- begin
+ -- Entry_Call (Obj_Id, [Index,] [Formal_1, Formal_N]);
+ -- _Postconditions;
+ -- end Wrapper;
+
+ -- Create the wrapper only when the entry has at least one executable
+ -- contract item such as contract cases, precondition or postcondition.
+
+ if Present (Items) then
+
+ -- Inspect the list of pre/postconditions and transfer all available
+ -- pragmas to the declarative list of the wrapper.
+
+ Prag := Pre_Post_Conditions (Items);
+ while Present (Prag) loop
+ if Nam_In (Pragma_Name (Prag), Name_Postcondition,
+ Name_Precondition)
+ and then Is_Checked (Prag)
+ then
+ Has_Pragma := True;
+ Transfer_Pragma (Prag, To => Decls);
+ end if;
+
+ Prag := Next_Pragma (Prag);
+ end loop;
+
+ -- Inspect the list of test/contract cases and transfer only contract
+ -- cases pragmas to the declarative part of the wrapper.
+
+ Prag := Contract_Test_Cases (Items);
+ while Present (Prag) loop
+ if Pragma_Name (Prag) = Name_Contract_Cases
+ and then Is_Checked (Prag)
+ then
+ Has_Pragma := True;
+ Transfer_Pragma (Prag, To => Decls);
+ end if;
+
+ Prag := Next_Pragma (Prag);
+ end loop;
+ end if;
+
+ -- The entry lacks executable contract items and a wrapper is not needed
+
+ if not Has_Pragma then
+ return;
+ end if;
+
+ -- Create the profile of the wrapper. The first formal parameter is the
+ -- concurrent object.
+
+ Obj_Id :=
+ Make_Defining_Identifier (Loc,
+ Chars => New_External_Name (Chars (Conc_Typ), 'A'));
+
+ Formals := New_List (
+ Make_Parameter_Specification (Loc,
+ Defining_Identifier => Obj_Id,
+ Out_Present => True,
+ In_Present => True,
+ Parameter_Type => New_Occurrence_Of (Conc_Typ, Loc)));
+
+ -- Construct the call to the original entry. The call will be gradually
+ -- augmented with an optional entry index and extra parameters.
+
+ Call_Nam :=
+ Make_Selected_Component (Loc,
+ Prefix => New_Occurrence_Of (Obj_Id, Loc),
+ Selector_Name => New_Occurrence_Of (E, Loc));
+
+ -- When creating a wrapper for an entry family, the second formal is the
+ -- entry index.
+
+ if Ekind (E) = E_Entry_Family then
+ Index_Id := Make_Defining_Identifier (Loc, Name_I);
+
+ Append_To (Formals,
+ Make_Parameter_Specification (Loc,
+ Defining_Identifier => Index_Id,
+ Parameter_Type =>
+ New_Occurrence_Of (Entry_Index_Type (E), Loc)));
+
+ -- The call to the original entry becomes an indexed component to
+ -- accommodate the entry index.
+
+ Call_Nam :=
+ Make_Indexed_Component (Loc,
+ Prefix => Call_Nam,
+ Expressions => New_List (New_Occurrence_Of (Index_Id, Loc)));
+ end if;
+
+ -- Add formal parameters to match those of the entry and build actuals
+ -- for the entry call.
+
+ Add_Matching_Formals (Formals, Actuals);
+
+ Call :=
+ Make_Procedure_Call_Statement (Loc,
+ Name => Call_Nam,
+ Parameter_Associations => Actuals);
+
+ -- Add renaming declarations for the discriminants of the enclosing type
+ -- as the various contract items may reference them.
+
+ Add_Discriminant_Renamings (Obj_Id, Decls);
+
+ Wrapper_Id :=
+ Make_Defining_Identifier (Loc, New_External_Name (Chars (E), 'E'));
+ Set_Contract_Wrapper (E, Wrapper_Id);
+
+ -- The wrapper body is analyzed when the enclosing type is frozen
+
+ Append_Freeze_Action (Defining_Entity (Decl),
+ Make_Subprogram_Body (Loc,
+ Specification =>
+ Make_Procedure_Specification (Loc,
+ Defining_Unit_Name => Wrapper_Id,
+ Parameter_Specifications => Formals),
+ Declarations => Decls,
+ Handled_Statement_Sequence =>
+ Make_Handled_Sequence_Of_Statements (Loc,
+ Statements => New_List (Call))));
+ end Build_Contract_Wrapper;
+
--------------------------------
-- Build_Corresponding_Record --
--------------------------------
@@ -1925,166 +2207,6 @@ package body Exp_Ch9 is
return Decl;
end Build_Renamed_Formal_Declaration;
- -----------------------
- -- Build_PPC_Wrapper --
- -----------------------
-
- procedure Build_PPC_Wrapper (E : Entity_Id; Decl : Node_Id) is
- Items : constant Node_Id := Contract (E);
- Loc : constant Source_Ptr := Sloc (E);
- Synch_Type : constant Entity_Id := Scope (E);
- Actuals : List_Id;
- Decls : List_Id;
- Entry_Call : Node_Id;
- Entry_Name : Node_Id;
- Params : List_Id;
- Prag : Node_Id;
- Synch_Id : Entity_Id;
- Wrapper_Id : Entity_Id;
-
- begin
- -- Only build the wrapper if entry has pre/postconditions
- -- Should this be done unconditionally instead ???
-
- if Present (Items) then
- Prag := Pre_Post_Conditions (Items);
-
- if No (Prag) then
- return;
- end if;
-
- -- Transfer ppc pragmas to the declarations of the wrapper
-
- Decls := New_List;
-
- while Present (Prag) loop
- if Nam_In (Pragma_Name (Prag), Name_Precondition,
- Name_Postcondition)
- then
- Append (Relocate_Node (Prag), Decls);
- Set_Analyzed (Last (Decls), False);
- end if;
-
- Prag := Next_Pragma (Prag);
- end loop;
- else
- return;
- end if;
-
- Actuals := New_List;
- Synch_Id :=
- Make_Defining_Identifier (Loc,
- Chars => New_External_Name (Chars (Scope (E)), 'A'));
-
- -- First formal is synchronized object
-
- Params := New_List (
- Make_Parameter_Specification (Loc,
- Defining_Identifier => Synch_Id,
- Out_Present => True,
- In_Present => True,
- Parameter_Type => New_Occurrence_Of (Scope (E), Loc)));
-
- Entry_Name :=
- Make_Selected_Component (Loc,
- Prefix => New_Occurrence_Of (Synch_Id, Loc),
- Selector_Name => New_Occurrence_Of (E, Loc));
-
- -- If entity is entry family, second formal is the corresponding index,
- -- and entry name is an indexed component.
-
- if Ekind (E) = E_Entry_Family then
- declare
- Index : constant Entity_Id :=
- Make_Defining_Identifier (Loc, Name_I);
- begin
- Append_To (Params,
- Make_Parameter_Specification (Loc,
- Defining_Identifier => Index,
- Parameter_Type =>
- New_Occurrence_Of (Entry_Index_Type (E), Loc)));
-
- Entry_Name :=
- Make_Indexed_Component (Loc,
- Prefix => Entry_Name,
- Expressions => New_List (New_Occurrence_Of (Index, Loc)));
- end;
- end if;
-
- Entry_Call :=
- Make_Procedure_Call_Statement (Loc,
- Name => Entry_Name,
- Parameter_Associations => Actuals);
-
- -- Now add formals that match those of the entry, and build actuals for
- -- the nested entry call.
-
- declare
- Form : Entity_Id;
- New_Form : Entity_Id;
- Parm_Spec : Node_Id;
-
- begin
- Form := First_Formal (E);
- while Present (Form) loop
- New_Form := Make_Defining_Identifier (Loc, Chars (Form));
- Parm_Spec :=
- Make_Parameter_Specification (Loc,
- Defining_Identifier => New_Form,
- Out_Present => Out_Present (Parent (Form)),
- In_Present => In_Present (Parent (Form)),
- Parameter_Type => New_Occurrence_Of (Etype (Form), Loc));
-
- Append (Parm_Spec, Params);
- Append (New_Occurrence_Of (New_Form, Loc), Actuals);
- Next_Formal (Form);
- end loop;
- end;
-
- -- Add renaming declarations for the discriminants of the enclosing
- -- type, which may be visible in the preconditions.
-
- if Has_Discriminants (Synch_Type) then
- declare
- D : Entity_Id;
- Decl : Node_Id;
-
- begin
- D := First_Discriminant (Synch_Type);
- while Present (D) loop
- Decl :=
- Make_Object_Renaming_Declaration (Loc,
- Defining_Identifier =>
- Make_Defining_Identifier (Loc, Chars (D)),
- Subtype_Mark => New_Occurrence_Of (Etype (D), Loc),
- Name =>
- Make_Selected_Component (Loc,
- Prefix => New_Occurrence_Of (Synch_Id, Loc),
- Selector_Name => Make_Identifier (Loc, Chars (D))));
- Prepend (Decl, Decls);
- Next_Discriminant (D);
- end loop;
- end;
- end if;
-
- Wrapper_Id :=
- Make_Defining_Identifier (Loc, New_External_Name (Chars (E), 'E'));
- Set_PPC_Wrapper (E, Wrapper_Id);
-
- -- The wrapper body is analyzed when the enclosing type is frozen
-
- Append_Freeze_Action (Defining_Entity (Decl),
- Make_Subprogram_Body (Loc,
- Specification =>
- Make_Procedure_Specification (Loc,
- Defining_Unit_Name => Wrapper_Id,
- Parameter_Specifications => Params),
- Declarations => Decls,
- Handled_Statement_Sequence =>
- Make_Handled_Sequence_Of_Statements (Loc,
- Statements => New_List (Entry_Call))));
- end Build_PPC_Wrapper;
-
--------------------------
-- Build_Wrapper_Bodies --
--------------------------
@@ -3214,7 +3336,7 @@ package body Exp_Ch9 is
-- Start of processing for Build_Lock_Free_Unprotected_Subprogram_Body
begin
- -- Add renamings for the protection object, discriminals, privals and
+ -- Add renamings for the protection object, discriminals, privals, and
-- the entry index constant for use by debugger.
Debug_Private_Data_Declarations (Decls);
@@ -3619,7 +3741,7 @@ package body Exp_Ch9 is
Decls := List_Containing (Context);
-- Default case for object declarations and access types. Note that the
- -- context is updated to the nearest enclosing body, block, package or
+ -- context is updated to the nearest enclosing body, block, package, or
-- return statement.
else
@@ -3810,43 +3932,42 @@ package body Exp_Ch9 is
Ent : Entity_Id;
Pid : Node_Id) return Node_Id
is
+ Bod_Decls : constant List_Id := New_List;
+ Decls : constant List_Id := Declarations (N);
+ End_Lab : constant Node_Id :=
+ End_Label (Handled_Statement_Sequence (N));
+ End_Loc : constant Source_Ptr :=
+ Sloc (Last (Statements (Handled_Statement_Sequence (N))));
+ -- Used for the generated call to Complete_Entry_Body
+
Loc : constant Source_Ptr := Sloc (N);
- Decls : constant List_Id := Declarations (N);
- End_Lab : constant Node_Id :=
- End_Label (Handled_Statement_Sequence (N));
- End_Loc : constant Source_Ptr :=
- Sloc (Last (Statements (Handled_Statement_Sequence (N))));
- -- Used for the generated call to Complete_Entry_Body
+ Bod_Id : Entity_Id;
+ Bod_Spec : Node_Id;
+ Bod_Stmts : List_Id;
+ Complete : Node_Id;
+ Ohandle : Node_Id;
- Han_Loc : Source_Ptr;
+ EH_Loc : Source_Ptr;
-- Used for the exception handler, inserted at end of the body
- Op_Decls : constant List_Id := New_List;
- Complete : Node_Id;
- Edef : Entity_Id;
- Espec : Node_Id;
- Ohandle : Node_Id;
- Op_Stats : List_Id;
-
begin
-- Set the source location on the exception handler only when debugging
-- the expanded code (see Make_Implicit_Exception_Handler).
if Debug_Generated_Code then
- Han_Loc := End_Loc;
+ EH_Loc := End_Loc;
-- Otherwise the inserted code should not be visible to the debugger
else
- Han_Loc := No_Location;
+ EH_Loc := No_Location;
end if;
- Edef :=
+ Bod_Id :=
Make_Defining_Identifier (Loc,
Chars => Chars (Protected_Body_Subprogram (Ent)));
- Espec :=
- Build_Protected_Entry_Specification (Loc, Edef, Empty);
+ Bod_Spec := Build_Protected_Entry_Specification (Loc, Bod_Id, Empty);
-- Add the following declarations:
@@ -3856,26 +3977,25 @@ package body Exp_Ch9 is
-- where _O is the formal parameter associated with the concurrent
-- object. These declarations are needed for Complete_Entry_Body.
- Add_Object_Pointer (Loc, Pid, Op_Decls);
+ Add_Object_Pointer (Loc, Pid, Bod_Decls);
-- Add renamings for all formals, the Protection object, discriminals,
-- privals and the entry index constant for use by debugger.
- Add_Formal_Renamings (Espec, Op_Decls, Ent, Loc);
+ Add_Formal_Renamings (Bod_Spec, Bod_Decls, Ent, Loc);
Debug_Private_Data_Declarations (Decls);
-- Put the declarations and the statements from the entry
- Op_Stats :=
+ Bod_Stmts :=
New_List (
Make_Block_Statement (Loc,
- Declarations => Decls,
- Handled_Statement_Sequence =>
- Handled_Statement_Sequence (N)));
+ Declarations => Decls,
+ Handled_Statement_Sequence => Handled_Statement_Sequence (N)));
case Corresponding_Runtime_Package (Pid) is
when System_Tasking_Protected_Objects_Entries =>
- Append_To (Op_Stats,
+ Append_To (Bod_Stmts,
Make_Procedure_Call_Statement (End_Loc,
Name =>
New_Occurrence_Of (RTE (RE_Complete_Entry_Body), Loc),
@@ -3901,16 +4021,16 @@ package body Exp_Ch9 is
end case;
-- When exceptions can not be propagated, we never need to call
- -- Exception_Complete_Entry_Body
+ -- Exception_Complete_Entry_Body.
if No_Exception_Handlers_Set then
return
Make_Subprogram_Body (Loc,
- Specification => Espec,
- Declarations => Op_Decls,
+ Specification => Bod_Spec,
+ Declarations => Bod_Decls,
Handled_Statement_Sequence =>
Make_Handled_Sequence_Of_Statements (Loc,
- Statements => Op_Stats,
+ Statements => Bod_Stmts,
End_Label => End_Lab));
else
@@ -3934,39 +4054,40 @@ package body Exp_Ch9 is
-- Establish link between subprogram body entity and source entry
- Set_Corresponding_Protected_Entry (Edef, Ent);
+ Set_Corresponding_Protected_Entry (Bod_Id, Ent);
-- Create body of entry procedure. The renaming declarations are
-- placed ahead of the block that contains the actual entry body.
return
Make_Subprogram_Body (Loc,
- Specification => Espec,
- Declarations => Op_Decls,
+ Specification => Bod_Spec,
+ Declarations => Bod_Decls,
Handled_Statement_Sequence =>
Make_Handled_Sequence_Of_Statements (Loc,
- Statements => Op_Stats,
- End_Label => End_Lab,
+ Statements => Bod_Stmts,
+ End_Label => End_Lab,
Exception_Handlers => New_List (
- Make_Implicit_Exception_Handler (Han_Loc,
+ Make_Implicit_Exception_Handler (EH_Loc,
Exception_Choices => New_List (Ohandle),
- Statements => New_List (
- Make_Procedure_Call_Statement (Han_Loc,
- Name => Complete,
+ Statements => New_List (
+ Make_Procedure_Call_Statement (EH_Loc,
+ Name => Complete,
Parameter_Associations => New_List (
- Make_Attribute_Reference (Han_Loc,
- Prefix =>
- Make_Selected_Component (Han_Loc,
+ Make_Attribute_Reference (EH_Loc,
+ Prefix =>
+ Make_Selected_Component (EH_Loc,
Prefix =>
- Make_Identifier (Han_Loc, Name_uObject),
+ Make_Identifier (EH_Loc, Name_uObject),
Selector_Name =>
- Make_Identifier (Han_Loc, Name_uObject)),
- Attribute_Name => Name_Unchecked_Access),
+ Make_Identifier (EH_Loc, Name_uObject)),
+ Attribute_Name => Name_Unchecked_Access),
- Make_Function_Call (Han_Loc,
- Name => New_Occurrence_Of (
- RTE (RE_Get_GNAT_Exception), Loc)))))))));
+ Make_Function_Call (EH_Loc,
+ Name =>
+ New_Occurrence_Of
+ (RTE (RE_Get_GNAT_Exception), Loc)))))))));
end if;
end Build_Protected_Entry;
@@ -5302,7 +5423,7 @@ package body Exp_Ch9 is
Decls : constant List_Id := Declarations (N);
begin
- -- Add renamings for the Protection object, discriminals, privals and
+ -- Add renamings for the Protection object, discriminals, privals, and
-- the entry index constant for use by debugger.
Debug_Private_Data_Declarations (Decls);
@@ -5666,7 +5787,7 @@ package body Exp_Ch9 is
if Nkind_In (Decl, N_Full_Type_Declaration, N_Object_Declaration) then
Set_Debug_Info_Needed (Defining_Identifier (Decl));
- -- Declaration for the Protection object, discriminals, privals and
+ -- Declaration for the Protection object, discriminals, privals, and
-- entry index constant:
-- conc_typR : protection_typ renames _object._object;
-- discr_nameD : discr_typ renames _object.discr_name;
@@ -6196,6 +6317,14 @@ package body Exp_Ch9 is
-- Check whether entity in Barrier is external to protected type.
-- If so, barrier may not be properly synchronized.
+ function Is_Pure_Barrier (N : Node_Id) return Traverse_Result;
+ -- Check whether N follows the Pure_Barriers restriction. Return OK if
+ -- so.
+
+ function Is_Simple_Barrier_Name (N : Node_Id) return Boolean;
+ -- Check whether entity name N denotes a component of the protected
+ -- object. This is used to check the Simple_Barrier restriction.
+
----------------------
-- Is_Global_Entity --
----------------------
@@ -6246,6 +6375,82 @@ package body Exp_Ch9 is
procedure Check_Unprotected_Barrier is
new Traverse_Proc (Is_Global_Entity);
+ ----------------------------
+ -- Is_Simple_Barrier_Name --
+ ----------------------------
+
+ function Is_Simple_Barrier_Name (N : Node_Id) return Boolean is
+ Renamed : Node_Id;
+
+ begin
+ -- Check for case of _object.all.field (note that the explicit
+ -- dereference gets inserted by analyze/expand of _object.field).
+
+ if Expander_Active then
+ Renamed := Renamed_Object (Entity (N));
+
+ return
+ Present (Renamed)
+ and then Nkind (Renamed) = N_Selected_Component
+ and then Chars (Prefix (Prefix (Renamed))) = Name_uObject;
+ else
+ return Scope (Entity (N)) = Current_Scope;
+ end if;
+ end Is_Simple_Barrier_Name;
+
+ ---------------------
+ -- Is_Pure_Barrier --
+ ---------------------
+
+ function Is_Pure_Barrier (N : Node_Id) return Traverse_Result is
+ begin
+ case Nkind (N) is
+ when N_Expanded_Name |
+ N_Identifier =>
+ if No (Entity (N)) then
+ return Abandon;
+ end if;
+
+ case Ekind (Entity (N)) is
+ when E_Constant |
+ E_Discriminant |
+ E_Named_Integer |
+ E_Named_Real |
+ E_Enumeration_Literal =>
+ return OK;
+
+ when E_Variable =>
+ if Is_Simple_Barrier_Name (N) then
+ return OK;
+ end if;
+
+ when others =>
+ null;
+ end case;
+
+ when N_Integer_Literal |
+ N_Real_Literal |
+ N_Character_Literal =>
+ return OK;
+
+ when N_Op_Boolean |
+ N_Op_Not =>
+ if Ekind (Entity (N)) = E_Operator then
+ return OK;
+ end if;
+
+ when N_Short_Circuit =>
+ return OK;
+
+ when others =>
+ null;
+ end case;
+
+ return Abandon;
+ end Is_Pure_Barrier;
+
+ function Check_Pure_Barriers is new Traverse_Func (Is_Pure_Barrier);
+
-- Start of processing for Expand_Entry_Barrier
begin
@@ -6283,6 +6488,12 @@ package body Exp_Ch9 is
Analyze_And_Resolve (Cond, Any_Boolean);
end if;
+ -- Check Pure_Barriers restriction
+
+ if Check_Pure_Barriers (Cond) = Abandon then
+ Check_Restriction (Pure_Barriers, Cond);
+ end if;
+
-- The Ravenscar profile restricts barriers to simple variables declared
-- within the protected object. We also allow Boolean constants, since
-- these appear in several published examples and are also allowed by
@@ -6311,22 +6522,7 @@ package body Exp_Ch9 is
then
return;
- elsif not Expander_Active
- and then Scope (Entity (Cond)) = Current_Scope
- then
- return;
-
- -- Check for case of _object.all.field (note that the explicit
- -- dereference gets inserted by analyze/expand of _object.field)
-
- elsif Present (Renamed_Object (Entity (Cond)))
- and then
- Nkind (Renamed_Object (Entity (Cond))) = N_Selected_Component
- and then
- Chars
- (Prefix
- (Prefix (Renamed_Object (Entity (Cond))))) = Name_uObject
- then
+ elsif Is_Simple_Barrier_Name (Cond) then
return;
end if;
end if;
@@ -8845,7 +9041,6 @@ package body Exp_Ch9 is
Body_Id : Entity_Id;
Cdecls : List_Id;
Comp : Node_Id;
- Comp_Id : Entity_Id;
Current_Node : Node_Id := N;
E_Count : Int;
Entries_Aggr : Node_Id;
@@ -8853,7 +9048,6 @@ package body Exp_Ch9 is
Object_Comp : Node_Id;
Priv : Node_Id;
Rec_Decl : Node_Id;
- Sub : Node_Id;
procedure Check_Inlining (Subp : Entity_Id);
-- If the original operation has a pragma Inline, propagate the flag
@@ -8866,9 +9060,9 @@ package body Exp_Ch9 is
-- static because of a discriminant constraint we can specialize the
-- warning by mentioning discriminants explicitly.
- procedure Expand_Entry_Declaration (Comp : Entity_Id);
- -- Create the subprograms for the barrier and for the body, and append
- -- then to Entry_Bodies_Array.
+ procedure Expand_Entry_Declaration (Decl : Node_Id);
+ -- Create the entry barrier and the procedure body for entry declaration
+ -- Decl. All generated subprograms are added to Entry_Bodies_Array.
function Static_Component_Size (Comp : Entity_Id) return Boolean;
-- When compiling under the Ravenscar profile, private components must
@@ -8988,50 +9182,57 @@ package body Exp_Ch9 is
-- Expand_Entry_Declaration --
------------------------------
- procedure Expand_Entry_Declaration (Comp : Entity_Id) is
- Bdef : Entity_Id;
- Edef : Entity_Id;
+ procedure Expand_Entry_Declaration (Decl : Node_Id) is
+ Ent_Id : constant Entity_Id := Defining_Entity (Decl);
+ Bar_Id : Entity_Id;
+ Bod_Id : Entity_Id;
+ Subp : Node_Id;
begin
E_Count := E_Count + 1;
- Comp_Id := Defining_Identifier (Comp);
- Edef :=
+ -- Create the protected body subprogram
+
+ Bod_Id :=
Make_Defining_Identifier (Loc,
- Chars => Build_Selected_Name (Prot_Typ, Comp_Id, 'E'));
- Sub :=
+ Chars => Build_Selected_Name (Prot_Typ, Ent_Id, 'E'));
+ Set_Protected_Body_Subprogram (Ent_Id, Bod_Id);
+
+ Subp :=
Make_Subprogram_Declaration (Loc,
Specification =>
- Build_Protected_Entry_Specification (Loc, Edef, Comp_Id));
+ Build_Protected_Entry_Specification (Loc, Bod_Id, Ent_Id));
- Insert_After (Current_Node, Sub);
- Analyze (Sub);
+ Insert_After (Current_Node, Subp);
+ Current_Node := Subp;
- -- Build wrapper procedure for pre/postconditions
+ Analyze (Subp);
- Build_PPC_Wrapper (Comp_Id, N);
+ -- Build a wrapper procedure to handle contract cases, preconditions,
+ -- and postconditions.
- Set_Protected_Body_Subprogram
- (Defining_Identifier (Comp),
- Defining_Unit_Name (Specification (Sub)));
+ Build_Contract_Wrapper (Ent_Id, N);
- Current_Node := Sub;
+ -- Create the barrier function
- Bdef :=
+ Bar_Id :=
Make_Defining_Identifier (Loc,
- Chars => Build_Selected_Name (Prot_Typ, Comp_Id, 'B'));
- Sub :=
+ Chars => Build_Selected_Name (Prot_Typ, Ent_Id, 'B'));
+ Set_Barrier_Function (Ent_Id, Bar_Id);
+
+ Subp :=
Make_Subprogram_Declaration (Loc,
Specification =>
- Build_Barrier_Function_Specification (Loc, Bdef));
- Set_Is_Entry_Barrier_Function (Sub);
+ Build_Barrier_Function_Specification (Loc, Bar_Id));
+ Set_Is_Entry_Barrier_Function (Subp);
+
+ Insert_After (Current_Node, Subp);
+ Current_Node := Subp;
+
+ Analyze (Subp);
- Insert_After (Current_Node, Sub);
- Analyze (Sub);
- Set_Protected_Body_Subprogram (Bdef, Bdef);
- Set_Barrier_Function (Comp_Id, Bdef);
- Set_Scope (Bdef, Scope (Comp_Id));
- Current_Node := Sub;
+ Set_Protected_Body_Subprogram (Bar_Id, Bar_Id);
+ Set_Scope (Bar_Id, Scope (Ent_Id));
-- Collect pointers to the protected subprogram and the barrier
-- of the current entry, for insertion into Entry_Bodies_Array.
@@ -9040,10 +9241,10 @@ package body Exp_Ch9 is
Make_Aggregate (Loc,
Expressions => New_List (
Make_Attribute_Reference (Loc,
- Prefix => New_Occurrence_Of (Bdef, Loc),
+ Prefix => New_Occurrence_Of (Bar_Id, Loc),
Attribute_Name => Name_Unrestricted_Access),
Make_Attribute_Reference (Loc,
- Prefix => New_Occurrence_Of (Edef, Loc),
+ Prefix => New_Occurrence_Of (Bod_Id, Loc),
Attribute_Name => Name_Unrestricted_Access))));
end Expand_Entry_Declaration;
@@ -9074,6 +9275,10 @@ package body Exp_Ch9 is
Append_Freeze_Action (Prot_Proc, RTS_Call);
end Register_Handler;
+ -- Local variables
+
+ Sub : Node_Id;
+
-- Start of processing for Expand_N_Protected_Type_Declaration
begin
@@ -12113,7 +12318,8 @@ package body Exp_Ch9 is
Expand_Previous_Access_Type (Tasktyp);
- -- Create wrappers for entries that have pre/postconditions
+ -- Create wrappers for entries that have contract cases, preconditions
+ -- and postconditions.
declare
Ent : Entity_Id;
@@ -12121,11 +12327,8 @@ package body Exp_Ch9 is
begin
Ent := First_Entity (Tasktyp);
while Present (Ent) loop
- if Ekind_In (Ent, E_Entry, E_Entry_Family)
- and then Present (Contract (Ent))
- and then Present (Pre_Post_Conditions (Contract (Ent)))
- then
- Build_PPC_Wrapper (Ent, N);
+ if Ekind_In (Ent, E_Entry, E_Entry_Family) then
+ Build_Contract_Wrapper (Ent, N);
end if;
Next_Entity (Ent);
diff --git a/gcc/ada/exp_fixd.adb b/gcc/ada/exp_fixd.adb
index de4a60a8b47..89aaf26ef44 100644
--- a/gcc/ada/exp_fixd.adb
+++ b/gcc/ada/exp_fixd.adb
@@ -37,6 +37,7 @@ with Sem_Eval; use Sem_Eval;
with Sem_Res; use Sem_Res;
with Sem_Util; use Sem_Util;
with Sinfo; use Sinfo;
+with Snames; use Snames;
with Stand; use Stand;
with Tbuild; use Tbuild;
with Uintp; use Uintp;
@@ -1691,10 +1692,12 @@ package body Exp_Fixd is
-- result cases, and faster.
procedure Expand_Convert_Float_To_Fixed (N : Node_Id) is
- Rng_Check : constant Boolean := Do_Range_Check (N);
Expr : constant Node_Id := Expression (N);
+ Orig_N : constant Node_Id := Original_Node (N);
Result_Type : constant Entity_Id := Etype (N);
+ Rng_Check : constant Boolean := Do_Range_Check (N);
Small : constant Ureal := Small_Value (Result_Type);
+ Truncate : Boolean;
begin
-- Optimize small = 1, where we can avoid the multiply completely
@@ -1702,16 +1705,31 @@ package body Exp_Fixd is
if Small = Ureal_1 then
Set_Result (N, Expr, Rng_Check, Trunc => True);
- -- Normal case where multiply is required
- -- Rounding is truncating for decimal fixed point types only,
- -- see RM 4.6(29).
+ -- Normal case where multiply is required. Rounding is truncating
+ -- for decimal fixed point types only, see RM 4.6(29), except if the
+ -- conversion comes from an attribute reference 'Round (RM 3.5.10 (14)):
+ -- The attribute is implemented by means of a conversion that must
+ -- round.
else
- Set_Result (N,
- Build_Multiply (N,
- Fpt_Value (Expr),
- Real_Literal (N, Ureal_1 / Small)),
- Rng_Check, Trunc => Is_Decimal_Fixed_Point_Type (Result_Type));
+ if Is_Decimal_Fixed_Point_Type (Result_Type) then
+ Truncate :=
+ Nkind (Orig_N) /= N_Attribute_Reference
+ or else Get_Attribute_Id
+ (Attribute_Name (Orig_N)) /= Attribute_Round;
+ else
+ Truncate := False;
+ end if;
+
+ Set_Result
+ (N => N,
+ Expr =>
+ Build_Multiply
+ (N => N,
+ L => Fpt_Value (Expr),
+ R => Real_Literal (N, Ureal_1 / Small)),
+ Rchk => Rng_Check,
+ Trunc => Truncate);
end if;
end Expand_Convert_Float_To_Fixed;
diff --git a/gcc/ada/exp_intr.adb b/gcc/ada/exp_intr.adb
index bbdcf774c6a..a76486b4432 100644
--- a/gcc/ada/exp_intr.adb
+++ b/gcc/ada/exp_intr.adb
@@ -311,6 +311,31 @@ package body Exp_Intr is
Remove_Side_Effects (Tag_Arg);
+ -- Check that we have a proper tag
+
+ Insert_Action (N,
+ Make_Implicit_If_Statement (N,
+ Condition => Make_Op_Eq (Loc,
+ Left_Opnd => New_Copy_Tree (Tag_Arg),
+ Right_Opnd => New_Occurrence_Of (RTE (RE_No_Tag), Loc)),
+
+ Then_Statements => New_List (
+ Make_Raise_Statement (Loc,
+ New_Occurrence_Of (RTE (RE_Tag_Error), Loc)))));
+
+ -- Check that it is not the tag of an abstract type
+
+ Insert_Action (N,
+ Make_Implicit_If_Statement (N,
+ Condition => Make_Function_Call (Loc,
+ Name =>
+ New_Occurrence_Of (RTE (RE_Type_Is_Abstract), Loc),
+ Parameter_Associations => New_List (New_Copy_Tree (Tag_Arg))),
+
+ Then_Statements => New_List (
+ Make_Raise_Statement (Loc,
+ New_Occurrence_Of (RTE (RE_Tag_Error), Loc)))));
+
-- The subprogram is the third actual in the instantiation, and is
-- retrieved from the corresponding renaming declaration. However,
-- freeze nodes may appear before, so we retrieve the declaration
@@ -324,6 +349,22 @@ package body Exp_Intr is
Act_Constr := Entity (Name (Act_Rename));
Result_Typ := Class_Wide_Type (Etype (Act_Constr));
+ -- Check that the accessibility level of the tag is no deeper than that
+ -- of the constructor function.
+
+ Insert_Action (N,
+ Make_Implicit_If_Statement (N,
+ Condition =>
+ Make_Op_Gt (Loc,
+ Left_Opnd =>
+ Build_Get_Access_Level (Loc, New_Copy_Tree (Tag_Arg)),
+ Right_Opnd =>
+ Make_Integer_Literal (Loc, Scope_Depth (Act_Constr))),
+
+ Then_Statements => New_List (
+ Make_Raise_Statement (Loc,
+ New_Occurrence_Of (RTE (RE_Tag_Error), Loc)))));
+
if Is_Interface (Etype (Act_Constr)) then
-- If the result type is not known to be a parent of Tag_Arg then we
@@ -390,7 +431,6 @@ package body Exp_Intr is
-- conversion of the call to the actual constructor.
Rewrite (N, Convert_To (Result_Typ, Cnstr_Call));
- Analyze_And_Resolve (N, Etype (Act_Constr));
-- Do not generate a run-time check on the built object if tag
-- checks are suppressed for the result type or tagged type expansion
@@ -458,6 +498,8 @@ package body Exp_Intr is
Make_Raise_Statement (Loc,
Name => New_Occurrence_Of (RTE (RE_Tag_Error), Loc)))));
end if;
+
+ Analyze_And_Resolve (N, Etype (Act_Constr));
end Expand_Dispatching_Constructor_Call;
---------------------------
diff --git a/gcc/ada/exp_util.adb b/gcc/ada/exp_util.adb
index f2d7b59b18a..0b9543a6bea 100644
--- a/gcc/ada/exp_util.adb
+++ b/gcc/ada/exp_util.adb
@@ -1672,17 +1672,10 @@ package body Exp_Util is
function Containing_Package_With_Ext_Axioms
(E : Entity_Id) return Entity_Id
is
- Decl : Node_Id;
+ Decl : Node_Id;
+ First_Ax_Parent_Scope : Entity_Id;
begin
- if Ekind (E) = E_Package then
- if Nkind (Parent (E)) = N_Defining_Program_Unit_Name then
- Decl := Parent (Parent (E));
- else
- Decl := Parent (E);
- end if;
- end if;
-
-- E is the package or generic package which is externally axiomatized
if Ekind_In (E, E_Package, E_Generic_Package)
@@ -1691,33 +1684,35 @@ package body Exp_Util is
return E;
end if;
- -- If E's scope is axiomatized, E is axiomatized.
-
- declare
- First_Ax_Parent_Scope : Entity_Id := Empty;
+ -- If E's scope is axiomatized, E is axiomatized
- begin
- if Present (Scope (E)) then
- First_Ax_Parent_Scope :=
- Containing_Package_With_Ext_Axioms (Scope (E));
- end if;
+ if Present (Scope (E)) then
+ First_Ax_Parent_Scope :=
+ Containing_Package_With_Ext_Axioms (Scope (E));
if Present (First_Ax_Parent_Scope) then
return First_Ax_Parent_Scope;
end if;
- -- otherwise, if E is a package instance, it is axiomatized if the
- -- corresponding generic package is axiomatized.
+ end if;
+
+ -- Otherwise, if E is a package instance, it is axiomatized if the
+ -- corresponding generic package is axiomatized.
- if Ekind (E) = E_Package
- and then Present (Generic_Parent (Decl))
- then
+ if Ekind (E) = E_Package then
+ if Nkind (Parent (E)) = N_Defining_Program_Unit_Name then
+ Decl := Parent (Parent (E));
+ else
+ Decl := Parent (E);
+ end if;
+
+ if Present (Generic_Parent (Decl)) then
return
Containing_Package_With_Ext_Axioms (Generic_Parent (Decl));
- else
- return Empty;
end if;
- end;
+ end if;
+
+ return Empty;
end Containing_Package_With_Ext_Axioms;
-------------------------------
diff --git a/gcc/ada/exp_util.ads b/gcc/ada/exp_util.ads
index b6cf41d3b59..41503c6c82f 100644
--- a/gcc/ada/exp_util.ads
+++ b/gcc/ada/exp_util.ads
@@ -806,7 +806,7 @@ package Exp_Util is
(Decl : Node_Id;
Typ : Entity_Id) return Boolean;
-- Check whether the expression in an address clause is restricted to
- -- consist of constants, when the object has a non-trivial initialization
+ -- consist of constants, when the object has a nontrivial initialization
-- or is controlled.
function Needs_Finalization (T : Entity_Id) return Boolean;
diff --git a/gcc/ada/fmap.adb b/gcc/ada/fmap.adb
index 77fa6c0d78d..e618d3c7fce 100644
--- a/gcc/ada/fmap.adb
+++ b/gcc/ada/fmap.adb
@@ -50,7 +50,7 @@ package body Fmap is
Max_Buffer : constant := 1_500;
Buffer : String (1 .. Max_Buffer);
- -- Used to bufferize output when writing to a new mapping file
+ -- Used to buffer output when writing to a new mapping file
Buffer_Last : Natural := 0;
-- Index of last valid character in Buffer
diff --git a/gcc/ada/freeze.adb b/gcc/ada/freeze.adb
index 59a49ced0ae..93fd53cc377 100644
--- a/gcc/ada/freeze.adb
+++ b/gcc/ada/freeze.adb
@@ -207,10 +207,7 @@ package body Freeze is
-- this to have a Freeze_Node, so ensure it doesn't. Do the same for any
-- Full_View or Corresponding_Record_Type.
- procedure Warn_Overlay
- (Expr : Node_Id;
- Typ : Entity_Id;
- Nam : Node_Id);
+ procedure Warn_Overlay (Expr : Node_Id; Typ : Entity_Id; Nam : Node_Id);
-- Expr is the expression for an address clause for entity Nam whose type
-- is Typ. If Typ has a default initialization, and there is no explicit
-- initialization in the source declaration, check whether the address
@@ -598,16 +595,25 @@ package body Freeze is
--------------------------
procedure Check_Address_Clause (E : Entity_Id) is
- Addr : constant Node_Id := Address_Clause (E);
+ Addr : constant Node_Id := Address_Clause (E);
+ Typ : constant Entity_Id := Etype (E);
+ Decl : Node_Id;
Expr : Node_Id;
- Decl : constant Node_Id := Declaration_Node (E);
- Loc : constant Source_Ptr := Sloc (Decl);
- Typ : constant Entity_Id := Etype (E);
+ Init : Node_Id;
Lhs : Node_Id;
Tag_Assign : Node_Id;
begin
if Present (Addr) then
+
+ -- For a deferred constant, the initialization value is on full view
+
+ if Ekind (E) = E_Constant and then Present (Full_View (E)) then
+ Decl := Declaration_Node (Full_View (E));
+ else
+ Decl := Declaration_Node (E);
+ end if;
+
Expr := Expression (Addr);
if Needs_Constant_Address (Decl, Typ) then
@@ -656,29 +662,73 @@ package body Freeze is
Warn_Overlay (Expr, Typ, Name (Addr));
end if;
- if Present (Expression (Decl)) then
+ Init := Expression (Decl);
+
+ -- If a variable, or a non-imported constant, overlays a constant
+ -- object and has an initialization value, then the initialization
+ -- may end up writing into read-only memory. Detect the cases of
+ -- statically identical values and remove the initialization. In
+ -- the other cases, give a warning. We will give other warnings
+ -- later for the variable if it is assigned.
+
+ if (Ekind (E) = E_Variable
+ or else (Ekind (E) = E_Constant
+ and then not Is_Imported (E)))
+ and then Overlays_Constant (E)
+ and then Present (Init)
+ then
+ declare
+ O_Ent : Entity_Id;
+ Off : Boolean;
+
+ begin
+ Find_Overlaid_Entity (Addr, O_Ent, Off);
+
+ if Ekind (O_Ent) = E_Constant
+ and then Etype (O_Ent) = Typ
+ and then Present (Constant_Value (O_Ent))
+ and then Compile_Time_Compare
+ (Init,
+ Constant_Value (O_Ent),
+ Assume_Valid => True) = EQ
+ then
+ Set_No_Initialization (Decl);
+ return;
+
+ elsif Comes_From_Source (Init)
+ and then Address_Clause_Overlay_Warnings
+ then
+ Error_Msg_Sloc := Sloc (Addr);
+ Error_Msg_NE
+ ("??constant& may be modified via address clause#",
+ Decl, O_Ent);
+ end if;
+ end;
+ end if;
+
+ if Present (Init) then
-- Capture initialization value at point of declaration,
-- and make explicit assignment legal, because object may
-- be a constant.
- Remove_Side_Effects (Expression (Decl));
- Lhs := New_Occurrence_Of (E, Loc);
+ Remove_Side_Effects (Init);
+ Lhs := New_Occurrence_Of (E, Sloc (Decl));
Set_Assignment_OK (Lhs);
- -- Move initialization to freeze actions (once the object has
- -- been frozen, and the address clause alignment check has been
+ -- Move initialization to freeze actions, once the object has
+ -- been frozen and the address clause alignment check has been
-- performed.
Append_Freeze_Action (E,
- Make_Assignment_Statement (Loc,
+ Make_Assignment_Statement (Sloc (Decl),
Name => Lhs,
Expression => Expression (Decl)));
Set_No_Initialization (Decl);
-- If the objet is tagged, check whether the tag must be
- -- reassigned expliitly.
+ -- reassigned explicitly.
Tag_Assign := Make_Tag_Assignment (Decl);
if Present (Tag_Assign) then
@@ -1402,7 +1452,7 @@ package body Freeze is
return;
end if;
- -- The situation that is non trivial is something like
+ -- The situation that is nontrivial is something like:
-- subtype x1 is integer range -10 .. +10;
-- subtype x2 is x1 range 0 .. V1;
@@ -8128,11 +8178,7 @@ package body Freeze is
-- Warn_Overlay --
------------------
- procedure Warn_Overlay
- (Expr : Node_Id;
- Typ : Entity_Id;
- Nam : Entity_Id)
- is
+ procedure Warn_Overlay (Expr : Node_Id; Typ : Entity_Id; Nam : Entity_Id) is
Ent : constant Entity_Id := Entity (Nam);
-- The object to which the address clause applies
diff --git a/gcc/ada/g-debpoo.adb b/gcc/ada/g-debpoo.adb
index 5857094ff2b..c5664a9939d 100644
--- a/gcc/ada/g-debpoo.adb
+++ b/gcc/ada/g-debpoo.adb
@@ -31,13 +31,13 @@
with GNAT.IO; use GNAT.IO;
-with System.Address_Image;
with System.CRTL;
with System.Memory; use System.Memory;
with System.Soft_Links; use System.Soft_Links;
with System.Traceback_Entries;
+with GNAT.Debug_Utilities; use GNAT.Debug_Utilities;
with GNAT.HTable;
with GNAT.Traceback; use GNAT.Traceback;
@@ -226,8 +226,8 @@ package body GNAT.Debug_Pools is
-- data, and does not include the header of that block.
end record;
- function Header_Of (Address : System.Address)
- return Allocation_Header_Access;
+ function Header_Of
+ (Address : System.Address) return Allocation_Header_Access;
pragma Inline (Header_Of);
-- Return the header corresponding to a previously allocated address
@@ -294,7 +294,7 @@ package body GNAT.Debug_Pools is
-- up to the first one in the range:
-- Ignored_Frame_Start .. Ignored_Frame_End
- procedure Stdout_Put (S : String);
+ procedure Stdout_Put (S : String);
-- Wrapper for Put that ensures we always write to stdout instead of the
-- current output file defined in GNAT.IO.
@@ -306,8 +306,7 @@ package body GNAT.Debug_Pools is
(Output_File : File_Type;
Prefix : String;
Traceback : Traceback_Htable_Elem_Ptr);
- -- Output Prefix & Traceback & EOL.
- -- Print nothing if Traceback is null.
+ -- Output Prefix & Traceback & EOL. Print nothing if Traceback is null.
procedure Print_Address (File : File_Type; Addr : Address);
-- Output System.Address without using secondary stack.
@@ -479,11 +478,12 @@ package body GNAT.Debug_Pools is
-------------------
procedure Print_Address (File : File_Type; Addr : Address) is
- type My_Address is mod Memory_Size;
- function To_My_Address is new Ada.Unchecked_Conversion
- (System.Address, My_Address);
begin
- Put (File, My_Address'Image (To_My_Address (Addr)));
+ -- Warning: secondary stack cannot be used here. When System.Memory
+ -- implementation uses Debug_Pool, Print_Address can be called during
+ -- secondary stack creation for foreign threads.
+
+ Put (File, Image_C (Addr));
end Print_Address;
--------------
@@ -518,14 +518,20 @@ package body GNAT.Debug_Pools is
begin
if Traceback = null then
declare
- Tr : aliased Tracebacks_Array (1 .. Depth + Max_Ignored_Levels);
- Start, Len : Natural;
+ Len : Natural;
+ Start : Natural;
+ Trace : aliased Tracebacks_Array (1 .. Depth + Max_Ignored_Levels);
begin
- Call_Chain (Tr, Len);
- Skip_Levels (Depth, Tr, Start, Len,
- Ignored_Frame_Start, Ignored_Frame_End);
- Print (Tr (Start .. Len));
+ Call_Chain (Trace, Len);
+ Skip_Levels
+ (Depth => Depth,
+ Trace => Trace,
+ Start => Start,
+ Len => Len,
+ Ignored_Frame_Start => Ignored_Frame_Start,
+ Ignored_Frame_End => Ignored_Frame_End);
+ Print (Trace (Start .. Len));
end;
else
@@ -587,16 +593,24 @@ package body GNAT.Debug_Pools is
declare
Disable_Exit_Value : constant Boolean := Disable;
- Trace : aliased Tracebacks_Array
- (1 .. Integer (Pool.Stack_Trace_Depth) + Max_Ignored_Levels);
- Len, Start : Natural;
+
Elem : Traceback_Htable_Elem_Ptr;
+ Len : Natural;
+ Start : Natural;
+ Trace : aliased Tracebacks_Array
+ (1 .. Integer (Pool.Stack_Trace_Depth) +
+ Max_Ignored_Levels);
begin
Disable := True;
Call_Chain (Trace, Len);
- Skip_Levels (Pool.Stack_Trace_Depth, Trace, Start, Len,
- Ignored_Frame_Start, Ignored_Frame_End);
+ Skip_Levels
+ (Depth => Pool.Stack_Trace_Depth,
+ Trace => Trace,
+ Start => Start,
+ Len => Len,
+ Ignored_Frame_Start => Ignored_Frame_Start,
+ Ignored_Frame_End => Ignored_Frame_End);
-- Check if the traceback is already in the table
@@ -606,14 +620,16 @@ package body GNAT.Debug_Pools is
-- If not, insert it
if Elem = null then
- Elem := new Traceback_Htable_Elem'
- (Traceback => new Tracebacks_Array'(Trace (Start .. Len)),
- Count => 1,
- Kind => Kind,
- Total => Byte_Count (Size),
- Frees => 0,
- Total_Frees => 0,
- Next => null);
+ Elem :=
+ new Traceback_Htable_Elem'
+ (Traceback =>
+ new Tracebacks_Array'(Trace (Start .. Len)),
+ Count => 1,
+ Kind => Kind,
+ Total => Byte_Count (Size),
+ Frees => 0,
+ Total_Frees => 0,
+ Next => null);
Backtrace_Htable.Set (Elem);
else
@@ -648,10 +664,10 @@ package body GNAT.Debug_Pools is
Validity_Divisor : constant := Storage_Alignment * System.Storage_Unit;
Max_Validity_Byte_Index : constant :=
- Memory_Chunk_Size / Validity_Divisor;
+ Memory_Chunk_Size / Validity_Divisor;
- subtype Validity_Byte_Index is Integer_Address
- range 0 .. Max_Validity_Byte_Index - 1;
+ subtype Validity_Byte_Index is
+ Integer_Address range 0 .. Max_Validity_Byte_Index - 1;
type Byte is mod 2 ** System.Storage_Unit;
@@ -807,15 +823,20 @@ package body GNAT.Debug_Pools is
if Allow_Unhandled_Memory then
if Ptr.Handled = No_Validity_Bits_Part then
Ptr.Handled :=
- To_Pointer (Alloc (size_t (Max_Validity_Byte_Index)));
- Memset (Ptr.Handled.all'Address, 0,
- size_t (Max_Validity_Byte_Index));
+ To_Pointer (Alloc (size_t (Max_Validity_Byte_Index)));
+ Memset
+ (A => Ptr.Handled.all'Address,
+ C => 0,
+ N => size_t (Max_Validity_Byte_Index));
end if;
+
Ptr.Handled (Offset / System.Storage_Unit) :=
- Ptr.Handled (Offset / System.Storage_Unit) or Bit;
+ Ptr.Handled (Offset / System.Storage_Unit) or Bit;
end if;
end Set_Handled;
+ -- Start of processing for Set_Valid
+
begin
if Ptr = No_Validity_Bits then
@@ -825,10 +846,12 @@ package body GNAT.Debug_Pools is
if Value then
Ptr := new Validity_Bits;
Ptr.Valid :=
- To_Pointer (Alloc (size_t (Max_Validity_Byte_Index)));
+ To_Pointer (Alloc (size_t (Max_Validity_Byte_Index)));
Validy_Htable.Set (Block_Number, Ptr);
- Memset (Ptr.Valid.all'Address, 0,
- size_t (Max_Validity_Byte_Index));
+ Memset
+ (A => Ptr.Valid.all'Address,
+ C => 0,
+ N => size_t (Max_Validity_Byte_Index));
Ptr.Valid (Offset / System.Storage_Unit) := Bit;
Set_Handled;
end if;
@@ -844,7 +867,6 @@ package body GNAT.Debug_Pools is
end if;
end if;
end Set_Valid;
-
end Validity;
--------------
@@ -857,7 +879,6 @@ package body GNAT.Debug_Pools is
Size_In_Storage_Elements : Storage_Count;
Alignment : Storage_Count)
is
-
pragma Unreferenced (Alignment);
-- Ignored, we always force Storage_Alignment
@@ -874,7 +895,7 @@ package body GNAT.Debug_Pools is
P : Ptr;
Trace : Traceback_Htable_Elem_Ptr;
- Disable_Exit_Value : constant Boolean := Disable;
+ Reset_Disable_At_Exit : Boolean := False;
begin
<<Allocate_Label>>
@@ -887,6 +908,7 @@ package body GNAT.Debug_Pools is
return;
end if;
+ Reset_Disable_At_Exit := True;
Disable := True;
Pool.Alloc_Count := Pool.Alloc_Count + 1;
@@ -899,7 +921,7 @@ package body GNAT.Debug_Pools is
-- which is expensive.
if Pool.Logically_Deallocated >
- Byte_Count (Pool.Maximum_Logically_Freed_Memory)
+ Byte_Count (Pool.Maximum_Logically_Freed_Memory)
then
Free_Physically (Pool);
end if;
@@ -940,8 +962,9 @@ package body GNAT.Debug_Pools is
-- For the purpose of computing Storage_Address, we just do as if the
-- header was located first, followed by the alignment padding:
- Storage_Address := To_Address
- (Align (To_Integer (P.all'Address) + Integer_Address (Header_Offset)));
+ Storage_Address :=
+ To_Address (Align (To_Integer (P.all'Address) +
+ Integer_Address (Header_Offset)));
-- Computation is done in Integer_Address, not Storage_Offset, because
-- the range of Storage_Offset may not be large enough.
@@ -950,9 +973,13 @@ package body GNAT.Debug_Pools is
pragma Assert (Storage_Address + Size_In_Storage_Elements
<= P.all'Address + P'Length);
- Trace := Find_Or_Create_Traceback
- (Pool, Alloc, Size_In_Storage_Elements,
- Allocate_Label'Address, Code_Address_For_Allocate_End);
+ Trace :=
+ Find_Or_Create_Traceback
+ (Pool => Pool,
+ Kind => Alloc,
+ Size => Size_In_Storage_Elements,
+ Ignored_Frame_Start => Allocate_Label'Address,
+ Ignored_Frame_End => Code_Address_For_Allocate_End);
pragma Warnings (Off);
-- Turn warning on alignment for convert call off. We know that in fact
@@ -1017,13 +1044,15 @@ package body GNAT.Debug_Pools is
Pool.High_Water := Current;
end if;
- Disable := Disable_Exit_Value;
+ Disable := False;
Unlock_Task.all;
exception
when others =>
- Disable := Disable_Exit_Value;
+ if Reset_Disable_At_Exit then
+ Disable := False;
+ end if;
Unlock_Task.all;
raise;
end Allocate;
@@ -1403,6 +1432,7 @@ package body GNAT.Debug_Pools is
is
pragma Unreferenced (Alignment);
+ Unlock_Task_Required : Boolean := False;
Header : constant Allocation_Header_Access :=
Header_Of (Storage_Address);
Valid : Boolean;
@@ -1411,9 +1441,11 @@ package body GNAT.Debug_Pools is
begin
<<Deallocate_Label>>
Lock_Task.all;
+ Unlock_Task_Required := True;
Valid := Is_Valid (Storage_Address);
if not Valid then
+ Unlock_Task_Required := False;
Unlock_Task.all;
if Storage_Address = System.Null_Address then
@@ -1450,6 +1482,7 @@ package body GNAT.Debug_Pools is
end if;
elsif Header.Block_Size < 0 then
+ Unlock_Task_Required := False;
Unlock_Task.all;
if Pool.Raise_Exceptions then
raise Freeing_Deallocated_Storage;
@@ -1571,12 +1604,15 @@ package body GNAT.Debug_Pools is
-- Do not physically release the memory here, but in Alloc.
-- See comment there for details.
+ Unlock_Task_Required := False;
Unlock_Task.all;
end if;
exception
when others =>
- Unlock_Task.all;
+ if Unlock_Task_Required then
+ Unlock_Task.all;
+ end if;
raise;
end Deallocate;
@@ -1810,7 +1846,7 @@ package body GNAT.Debug_Pools is
Byte_Count'Image (Data.Total) & ") ");
for T in Data.Traceback'Range loop
- Put ("0x" & Address_Image (PC_For (Data.Traceback (T))) & ' ');
+ Put (Image_C (PC_For (Data.Traceback (T))) & ' ');
end loop;
Put_Line ("");
@@ -1836,7 +1872,7 @@ package body GNAT.Debug_Pools is
if Header.Alloc_Traceback /= null then
for T in Header.Alloc_Traceback.Traceback'Range loop
- Put ("0x" & Address_Image
+ Put (Image_C
(PC_For (Header.Alloc_Traceback.Traceback (T))) & ' ');
end loop;
end if;
@@ -1974,7 +2010,7 @@ package body GNAT.Debug_Pools is
end;
for J in Max (M).Traceback'Range loop
- Put (" 0x" & Address_Image (PC_For (Max (M).Traceback (J))));
+ Put (Image_C (PC_For (Max (M).Traceback (J))));
end loop;
New_Line;
diff --git a/gcc/ada/g-io-put.adb b/gcc/ada/g-io-put.adb
index 7c38bfd54e3..08ebdbcd64d 100644
--- a/gcc/ada/g-io-put.adb
+++ b/gcc/ada/g-io-put.adb
@@ -6,7 +6,7 @@
-- --
-- B o d y --
-- --
--- Copyright (C) 1995-2010, AdaCore --
+-- Copyright (C) 1995-2015, AdaCore --
-- --
-- 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- --
@@ -33,8 +33,8 @@
separate (GNAT.IO)
procedure Put (C : Character) is
- procedure Putchar (C : Character);
+ procedure Putchar (C : Integer);
pragma Import (C, Putchar, "putchar");
begin
- Putchar (C);
+ Putchar (Character'Pos (C));
end Put;
diff --git a/gcc/ada/gcc-interface/Makefile.in b/gcc/ada/gcc-interface/Makefile.in
index 18ce6d5c244..2400d872d8a 100644
--- a/gcc/ada/gcc-interface/Makefile.in
+++ b/gcc/ada/gcc-interface/Makefile.in
@@ -2523,6 +2523,7 @@ ADA_EXCLUDE_SRCS =\
s-bbthre.ads s-bbtiev.adb s-bbtiev.ads s-bbtime.adb s-bbtime.ads \
s-bcprmu.adb s-bcprmu.ads s-btstch.adb s-btstch.ads \
s-init.ads s-init.adb \
+ s-macres.ads \
s-stache.adb s-stache.ads \
s-thread.ads \
s-vxwext.adb s-vxwext.ads \
diff --git a/gcc/ada/gcc-interface/decl.c b/gcc/ada/gcc-interface/decl.c
index 627eace9dd2..ceeb9958617 100644
--- a/gcc/ada/gcc-interface/decl.c
+++ b/gcc/ada/gcc-interface/decl.c
@@ -26,7 +26,6 @@
#include "config.h"
#include "system.h"
#include "coretypes.h"
-#include "ggc.h"
#include "target.h"
#include "tree.h"
#include "stringpool.h"
@@ -34,8 +33,6 @@
#include "alias.h"
#include "fold-const.h"
#include "stor-layout.h"
-#include "flags.h"
-#include "toplev.h"
#include "tree-inline.h"
#include "ada.h"
@@ -46,7 +43,6 @@
#include "nlists.h"
#include "repinfo.h"
#include "snames.h"
-#include "stringt.h"
#include "uintp.h"
#include "fe.h"
#include "sinfo.h"
@@ -510,7 +506,6 @@ gnat_to_gnu_entity (Entity_Id gnat_entity, tree gnu_expr, int definition)
/* Ignore constant definitions already marked with the error node. See
the N_Object_Declaration case of gnat_to_gnu for the rationale. */
if (definition
- && gnu_expr
&& present_gnu_tree (gnat_entity)
&& get_gnu_tree (gnat_entity) == error_mark_node)
{
@@ -1073,14 +1068,12 @@ gnat_to_gnu_entity (Entity_Id gnat_entity, tree gnu_expr, int definition)
}
/* Make a volatile version of this object's type if we are to make
- the object volatile. We also interpret 13.3(19) conservatively
- and disallow any optimizations for such a non-constant object. */
+ the object volatile. We also implement RM 13.3(19) for exported
+ and imported (non-constant) objects by making them volatile. */
if ((Treat_As_Volatile (gnat_entity)
|| (!const_flag
&& gnu_type != except_type_node
- && (Is_Exported (gnat_entity)
- || imported_p
- || Present (Address_Clause (gnat_entity)))))
+ && (Is_Exported (gnat_entity) || imported_p)))
&& !TYPE_VOLATILE (gnu_type))
{
const int quals
@@ -1123,7 +1116,8 @@ gnat_to_gnu_entity (Entity_Id gnat_entity, tree gnu_expr, int definition)
gnu_expr = convert (gnu_type, gnu_expr);
/* If this is a pointer that doesn't have an initializing expression,
- initialize it to NULL, unless the object is imported. */
+ initialize it to NULL, unless the object is declared imported as
+ per RM B.1(24). */
if (definition
&& (POINTER_TYPE_P (gnu_type) || TYPE_IS_FAT_POINTER_P (gnu_type))
&& !gnu_expr
@@ -1146,7 +1140,7 @@ gnat_to_gnu_entity (Entity_Id gnat_entity, tree gnu_expr, int definition)
save_gnu_tree (gnat_entity, NULL_TREE, false);
/* Convert the type of the object to a reference type that can
- alias everything as per 13.3(19). */
+ alias everything as per RM 13.3(19). */
gnu_type
= build_reference_type_for_mode (gnu_type, ptr_mode, true);
gnu_address = convert (gnu_type, gnu_address);
@@ -1190,13 +1184,6 @@ gnat_to_gnu_entity (Entity_Id gnat_entity, tree gnu_expr, int definition)
}
}
- /* If this is a deferred constant, the initializer is attached to
- the full view. */
- if (kind == E_Constant && Present (Full_View (gnat_entity)))
- gnu_expr
- = gnat_to_gnu
- (Expression (Declaration_Node (Full_View (gnat_entity))));
-
/* If we don't have an initializing expression for the underlying
variable, the initializing expression for the pointer is the
specified address. Otherwise, we have to make a COMPOUND_EXPR
@@ -1218,11 +1205,10 @@ gnat_to_gnu_entity (Entity_Id gnat_entity, tree gnu_expr, int definition)
as an indirect object. Likewise for Stdcall objects that are
imported. */
if ((!definition && Present (Address_Clause (gnat_entity)))
- || (Is_Imported (gnat_entity)
- && Has_Stdcall_Convention (gnat_entity)))
+ || (imported_p && Has_Stdcall_Convention (gnat_entity)))
{
/* Convert the type of the object to a reference type that can
- alias everything as per 13.3(19). */
+ alias everything as per RM 13.3(19). */
gnu_type
= build_reference_type_for_mode (gnu_type, ptr_mode, true);
used_by_ref = true;
@@ -1414,10 +1400,9 @@ gnat_to_gnu_entity (Entity_Id gnat_entity, tree gnu_expr, int definition)
/* If this name is external or a name was specified, use it, but don't
use the Interface_Name with an address clause (see cd30005). */
- if ((Present (Interface_Name (gnat_entity))
- && No (Address_Clause (gnat_entity)))
- || (Is_Public (gnat_entity)
- && (!Is_Imported (gnat_entity) || Is_Exported (gnat_entity))))
+ if ((Is_Public (gnat_entity) && !Is_Imported (gnat_entity))
+ || (Present (Interface_Name (gnat_entity))
+ && No (Address_Clause (gnat_entity))))
gnu_ext_name = create_concat_name (gnat_entity, NULL);
/* If this is an aggregate constant initialized to a constant, force it
@@ -4135,6 +4120,8 @@ gnat_to_gnu_entity (Entity_Id gnat_entity, tree gnu_expr, int definition)
of its type, so we must elaborate that type now. */
if (Present (Alias (gnat_entity)))
{
+ const Entity_Id gnat_renamed = Renamed_Object (gnat_entity);
+
if (Ekind (Alias (gnat_entity)) == E_Enumeration_Literal)
gnat_to_gnu_entity (Etype (Alias (gnat_entity)), NULL_TREE, 0);
@@ -4147,6 +4134,33 @@ gnat_to_gnu_entity (Entity_Id gnat_entity, tree gnu_expr, int definition)
if (Is_Itype (Etype (gnat_temp)))
gnat_to_gnu_entity (Etype (gnat_temp), NULL_TREE, 0);
+ /* Materialize renamed subprograms in the debugging information
+ when the renamed object is compile time known. We can consider
+ such renamings as imported declarations.
+
+ Because the parameters in generics instantiation are generally
+ materialized as renamings, we ofter end up having both the
+ renamed subprogram and the renaming in the same context and with
+ the same name: in this case, renaming is both useless debug-wise
+ and potentially harmful as name resolution in the debugger could
+ return twice the same entity! So avoid this case. */
+ if (debug_info_p && !artificial_p
+ && !(get_debug_scope (gnat_entity, NULL)
+ == get_debug_scope (gnat_renamed, NULL)
+ && Name_Equals (Chars (gnat_entity),
+ Chars (gnat_renamed)))
+ && Present (gnat_renamed)
+ && (Ekind (gnat_renamed) == E_Function
+ || Ekind (gnat_renamed) == E_Procedure)
+ && gnu_decl != NULL_TREE
+ && TREE_CODE (gnu_decl) == FUNCTION_DECL)
+ {
+ tree decl = build_decl (input_location, IMPORTED_DECL,
+ gnu_entity_name, void_type_node);
+ IMPORTED_DECL_ASSOCIATED_DECL (decl) = gnu_decl;
+ gnat_pushdecl (decl, gnat_entity);
+ }
+
break;
}
@@ -4601,7 +4615,7 @@ gnat_to_gnu_entity (Entity_Id gnat_entity, tree gnu_expr, int definition)
save_gnu_tree (gnat_entity, NULL_TREE, false);
/* Convert the type of the object to a reference type that can
- alias everything as per 13.3(19). */
+ alias everything as per RM 13.3(19). */
gnu_type
= build_reference_type_for_mode (gnu_type, ptr_mode, true);
if (gnu_address)
diff --git a/gcc/ada/gcc-interface/gigi.h b/gcc/ada/gcc-interface/gigi.h
index d7a25662e80..e6fff1e777c 100644
--- a/gcc/ada/gcc-interface/gigi.h
+++ b/gcc/ada/gcc-interface/gigi.h
@@ -1004,6 +1004,11 @@ extern bool renaming_from_generic_instantiation_p (Node_Id gnat_node);
don't have a GNU translation. */
extern void process_deferred_decl_context (bool force);
+/* Return the innermost scope, starting at GNAT_NODE, we are be interested in
+ the debug info, or Empty if there is no such scope. If not NULL, set
+ IS_SUBPROGRAM to whether the returned entity is a subprogram. */
+extern Entity_Id get_debug_scope (Node_Id gnat_node, bool *is_subprogram);
+
#ifdef __cplusplus
extern "C" {
#endif
diff --git a/gcc/ada/gcc-interface/misc.c b/gcc/ada/gcc-interface/misc.c
index da724f17cfc..0e5de241075 100644
--- a/gcc/ada/gcc-interface/misc.c
+++ b/gcc/ada/gcc-interface/misc.c
@@ -26,7 +26,6 @@
#include "config.h"
#include "system.h"
#include "coretypes.h"
-#include "ggc.h"
#include "target.h"
#include "tree.h"
#include "diagnostic.h"
@@ -35,8 +34,6 @@
#include "fold-const.h"
#include "stor-layout.h"
#include "print-tree.h"
-#include "flags.h"
-#include "debug.h"
#include "toplev.h"
#include "langhooks.h"
#include "langhooks-def.h"
@@ -48,10 +45,8 @@
#include "adadecode.h"
#include "types.h"
#include "atree.h"
-#include "elists.h"
#include "namet.h"
#include "nlists.h"
-#include "stringt.h"
#include "uintp.h"
#include "fe.h"
#include "sinfo.h"
diff --git a/gcc/ada/gcc-interface/targtyps.c b/gcc/ada/gcc-interface/targtyps.c
index b5081570f03..78a9db94282 100644
--- a/gcc/ada/gcc-interface/targtyps.c
+++ b/gcc/ada/gcc-interface/targtyps.c
@@ -30,22 +30,9 @@
#include "coretypes.h"
#include "tm.h"
#include "tree.h"
-#include "tm_p.h"
-#include "alias.h"
#include "ada.h"
#include "types.h"
-#include "atree.h"
-#include "elists.h"
-#include "namet.h"
-#include "nlists.h"
-#include "snames.h"
-#include "stringt.h"
-#include "uintp.h"
-#include "urealp.h"
-#include "fe.h"
-#include "sinfo.h"
-#include "einfo.h"
#include "ada-tree.h"
#include "gigi.h"
diff --git a/gcc/ada/gcc-interface/trans.c b/gcc/ada/gcc-interface/trans.c
index 5c093fbf161..eeb2aaca5cf 100644
--- a/gcc/ada/gcc-interface/trans.c
+++ b/gcc/ada/gcc-interface/trans.c
@@ -39,7 +39,6 @@
#include "stor-layout.h"
#include "stmt.h"
#include "varasm.h"
-#include "flags.h"
#include "output.h"
#include "libfuncs.h" /* For set_stack_check_libfunc. */
#include "tree-iterator.h"
@@ -51,7 +50,6 @@
#include "adadecode.h"
#include "types.h"
#include "atree.h"
-#include "elists.h"
#include "namet.h"
#include "nlists.h"
#include "snames.h"
@@ -1029,7 +1027,8 @@ Identifier_to_gnu (Node_Id gnat_node, tree *gnu_result_type_p)
original type. Similarly, a class-wide type is equivalent to a subtype of
itself. Finally, if the types are Itypes, one may be a copy of the other,
which is also legal. */
- gnat_temp = (Nkind (gnat_node) == N_Defining_Identifier
+ gnat_temp = ((Nkind (gnat_node) == N_Defining_Identifier
+ || Nkind (gnat_node) == N_Defining_Operator_Symbol)
? gnat_node : Entity (gnat_node));
gnat_temp_type = Etype (gnat_temp);
@@ -5696,6 +5695,7 @@ gnat_to_gnu (Node_Id gnat_node)
case N_Expanded_Name:
case N_Operator_Symbol:
case N_Defining_Identifier:
+ case N_Defining_Operator_Symbol:
gnu_result = Identifier_to_gnu (gnat_node, &gnu_result_type);
/* If atomic access is required on the RHS, build the atomic load. */
@@ -5959,13 +5959,40 @@ gnat_to_gnu (Node_Id gnat_node)
}
break;
+ case N_Subprogram_Renaming_Declaration:
+ {
+ const Node_Id gnat_renaming = Defining_Entity (gnat_node);
+ const Node_Id gnat_renamed = Renamed_Entity (gnat_renaming);
+
+ gnu_result = alloc_stmt_list ();
+
+ /* Materializing renamed subprograms will only benefit the debugging
+ information as they aren't referenced in the generated code. So
+ skip them when they aren't needed. Avoid doing this if:
+
+ - there is a freeze node: in this case the renamed entity is not
+ elaborated yet,
+ - the renamed subprogram is intrinsic: it will not be available in
+ the debugging information (note that both or only one of the
+ renaming and the renamed subprograms can be intrinsic). */
+ if (!type_annotate_only
+ && Needs_Debug_Info (gnat_renaming)
+ && No (Freeze_Node (gnat_renaming))
+ && Present (gnat_renamed)
+ && (Ekind (gnat_renamed) == E_Function
+ || Ekind (gnat_renamed) == E_Procedure)
+ && !Is_Intrinsic_Subprogram (gnat_renaming)
+ && !Is_Intrinsic_Subprogram (gnat_renamed))
+ gnat_to_gnu_entity (gnat_renaming, gnat_to_gnu (gnat_renamed), 1);
+ break;
+ }
+
case N_Implicit_Label_Declaration:
gnat_to_gnu_entity (Defining_Entity (gnat_node), NULL_TREE, 1);
gnu_result = alloc_stmt_list ();
break;
case N_Number_Declaration:
- case N_Subprogram_Renaming_Declaration:
case N_Package_Renaming_Declaration:
/* These are fully handled in the front end. */
/* ??? For package renamings, find a way to use GENERIC namespaces so
@@ -8555,6 +8582,12 @@ process_decls (List_Id gnat_decls, List_Id gnat_decls2,
|| Nkind (gnat_decl) == N_Protected_Body_Stub)
;
+ /* Renamed subprograms may not be elaborated yet at this point
+ since renamings do not trigger freezing. Wait for the second
+ pass to take care of them. */
+ else if (Nkind (gnat_decl) == N_Subprogram_Renaming_Declaration)
+ ;
+
else
add_stmt (gnat_to_gnu (gnat_decl));
}
@@ -8583,6 +8616,9 @@ process_decls (List_Id gnat_decls, List_Id gnat_decls2,
else if (Nkind (gnat_decl) == N_Freeze_Entity)
process_decls (Actions (gnat_decl), Empty, Empty, false, true);
+
+ else if (Nkind (gnat_decl) == N_Subprogram_Renaming_Declaration)
+ add_stmt (gnat_to_gnu (gnat_decl));
}
}
@@ -9614,7 +9650,8 @@ Sloc_to_locus (Source_Ptr Sloc, location_t *locus, bool clear_column)
line = 1;
/* Translate the location. */
- *locus = linemap_position_for_line_and_column (map, line, column);
+ *locus = linemap_position_for_line_and_column (line_table, map,
+ line, column);
return true;
}
diff --git a/gcc/ada/gcc-interface/utils.c b/gcc/ada/gcc-interface/utils.c
index 224dc002bdb..b032ae03df7 100644
--- a/gcc/ada/gcc-interface/utils.c
+++ b/gcc/ada/gcc-interface/utils.c
@@ -26,11 +26,9 @@
#include "config.h"
#include "system.h"
#include "coretypes.h"
-#include "ggc.h"
#include "target.h"
#include "function.h"
#include "tree.h"
-#include "timevar.h"
#include "stringpool.h"
#include "cgraph.h"
#include "diagnostic.h"
@@ -39,7 +37,6 @@
#include "stor-layout.h"
#include "attribs.h"
#include "varasm.h"
-#include "flags.h"
#include "toplev.h"
#include "output.h"
#include "debug.h"
@@ -48,15 +45,11 @@
#include "langhooks.h"
#include "tree-dump.h"
#include "tree-inline.h"
-#include "tree-iterator.h"
#include "ada.h"
#include "types.h"
#include "atree.h"
-#include "elists.h"
-#include "namet.h"
#include "nlists.h"
-#include "stringt.h"
#include "uintp.h"
#include "fe.h"
#include "sinfo.h"
@@ -592,7 +585,7 @@ gnat_set_type_context (tree type, tree context)
the debug info, or Empty if there is no such scope. If not NULL, set
IS_SUBPROGRAM to whether the returned entity is a subprogram. */
-static Entity_Id
+Entity_Id
get_debug_scope (Node_Id gnat_node, bool *is_subprogram)
{
Entity_Id gnat_entity;
@@ -600,7 +593,8 @@ get_debug_scope (Node_Id gnat_node, bool *is_subprogram)
if (is_subprogram)
*is_subprogram = false;
- if (Nkind (gnat_node) == N_Defining_Identifier)
+ if (Nkind (gnat_node) == N_Defining_Identifier
+ || Nkind (gnat_node) == N_Defining_Operator_Symbol)
gnat_entity = Scope (gnat_node);
else
return Empty;
diff --git a/gcc/ada/gnat1drv.adb b/gcc/ada/gnat1drv.adb
index 586844d3a72..17e7d9c5a53 100644
--- a/gcc/ada/gnat1drv.adb
+++ b/gcc/ada/gnat1drv.adb
@@ -142,18 +142,21 @@ procedure Gnat1drv is
Modify_Tree_For_C := True;
end if;
- -- Set all flags required when generating C code (-gnatd.V)
+ -- Set all flags required when generating C code
- if Debug_Flag_Dot_VV then
- Generate_C_Code := True;
+ if Generate_C_Code then
Modify_Tree_For_C := True;
Unnest_Subprogram_Mode := True;
- Back_Annotate_Rep_Info := True;
-- Set operating mode to Generate_Code to benefit from full front-end
-- expansion (e.g. generics).
Operating_Mode := Generate_Code;
+
+ -- Suppress alignment checks since we do not have access to alignment
+ -- info on the target.
+
+ Suppress_Options.Suppress (Alignment_Check) := False;
end if;
-- -gnatd.E sets Error_To_Warning mode, causing selected error messages
@@ -213,7 +216,7 @@ procedure Gnat1drv is
-- do not expect this to happen in normal use, since both modes are
-- enabled by special tools, but it is useful to turn off these flags
-- this way when we are doing CodePeer tests on existing test suites
- -- that may have -gnatd.V set, to avoid the need for special casing.
+ -- that may have -gnateg set, to avoid the need for special casing.
Modify_Tree_For_C := False;
Generate_C_Code := False;
@@ -1346,8 +1349,8 @@ begin
Back_End.Call_Back_End (Back_End_Mode);
-- Once the backend is complete, we unlock the names table. This call
- -- allows a few extra entries, needed for example for the file name for
- -- the library file output.
+ -- allows a few extra entries, needed for example for the file name
+ -- for the library file output.
Namet.Unlock;
diff --git a/gcc/ada/gnat_rm.texi b/gcc/ada/gnat_rm.texi
index d3eb6a90c57..88bef9f0e3a 100644
--- a/gcc/ada/gnat_rm.texi
+++ b/gcc/ada/gnat_rm.texi
@@ -21,7 +21,7 @@
@copying
@quotation
-GNAT Reference Manual , October 23, 2015
+GNAT Reference Manual , November 13, 2015
AdaCore
@@ -224,6 +224,7 @@ Implementation Defined Pragmas
* Pragma Pre::
* Pragma Precondition::
* Pragma Predicate::
+* Pragma Predicate_Failure::
* Pragma Preelaborable_Initialization::
* Pragma Prefix_Exception_Messages::
* Pragma Pre_Class::
@@ -504,6 +505,7 @@ Partition-Wide Restrictions
* No_Unchecked_Conversion::
* No_Unchecked_Deallocation::
* No_Use_Of_Entity::
+* Pure_Barriers::
* Simple_Barriers::
* Static_Priorities::
* Static_Storage_Size::
@@ -511,6 +513,7 @@ Partition-Wide Restrictions
Program Unit Level Restrictions
* No_Elaboration_Code::
+* No_Dynamic_Sized_Objects::
* No_Entry_Queue::
* No_Implementation_Aspect_Specifications::
* No_Implementation_Attributes::
@@ -1272,6 +1275,7 @@ consideration, the use of these pragmas should be minimized.
* Pragma Pre::
* Pragma Precondition::
* Pragma Predicate::
+* Pragma Predicate_Failure::
* Pragma Preelaborable_Initialization::
* Pragma Prefix_Exception_Messages::
* Pragma Pre_Class::
@@ -1618,17 +1622,7 @@ The string argument, if given, is the message that will be associated
with the exception occurrence if the exception is raised. If no second
argument is given, the default message is @cite{file}:@cite{nnn},
where @cite{file} is the name of the source file containing the assert,
-and @cite{nnn} is the line number of the assert. A pragma is not a
-statement, so if a statement sequence contains nothing but a pragma
-assert, then a null statement is required in addition, as in:
-
-@example
-...
-if J > 3 then
- pragma Assert (K > 3, "Bad value for K");
- null;
-end if;
-@end example
+and @cite{nnn} is the line number of the assert.
Note that, as with the @cite{if} statement to which it is equivalent, the
type of the expression is either @cite{Standard.Boolean}, or any type derived
@@ -5815,7 +5809,7 @@ use of the pragma identifier @cite{Check}. Historically, pragma
Ada 2012, and has been retained in its original form for
compatibility purposes.
-@node Pragma Predicate,Pragma Preelaborable_Initialization,Pragma Precondition,Implementation Defined Pragmas
+@node Pragma Predicate,Pragma Predicate_Failure,Pragma Precondition,Implementation Defined Pragmas
@anchor{gnat_rm/implementation_defined_pragmas pragma-predicate}@anchor{9d}
@section Pragma Predicate
@@ -5854,7 +5848,7 @@ subtype Q is R with
Dynamic_Predicate => F(Q) or G(Q);
@end example
-Note that there is are no pragmas @cite{Dynamic_Predicate}
+Note that there are no pragmas @cite{Dynamic_Predicate}
or @cite{Static_Predicate}. That is
because these pragmas would affect legality and semantics of
the program and thus do not have a neutral effect if ignored.
@@ -5869,8 +5863,25 @@ fundamentally changed (for example a membership test
defined for subtype B). When following this approach, the
use of predicates should be avoided.
-@node Pragma Preelaborable_Initialization,Pragma Prefix_Exception_Messages,Pragma Predicate,Implementation Defined Pragmas
-@anchor{gnat_rm/implementation_defined_pragmas pragma-preelaborable-initialization}@anchor{9e}
+@node Pragma Predicate_Failure,Pragma Preelaborable_Initialization,Pragma Predicate,Implementation Defined Pragmas
+@anchor{gnat_rm/implementation_defined_pragmas pragma-predicate-failure}@anchor{9e}
+@section Pragma Predicate_Failure
+
+
+Syntax:
+
+@example
+pragma Predicate_Failure
+ ([Entity =>] type_LOCAL_NAME,
+ [Message =>] String_Expression);
+@end example
+
+The @cite{Predicate_Failure} pragma is intended to be an exact replacement for
+the language-defined
+@cite{Predicate_Failure} aspect, and shares its restrictions and semantics.
+
+@node Pragma Preelaborable_Initialization,Pragma Prefix_Exception_Messages,Pragma Predicate_Failure,Implementation Defined Pragmas
+@anchor{gnat_rm/implementation_defined_pragmas pragma-preelaborable-initialization}@anchor{9f}
@section Pragma Preelaborable_Initialization
@@ -5885,7 +5896,7 @@ versions of Ada as an implementation-defined pragma.
See Ada 2012 Reference Manual for details.
@node Pragma Prefix_Exception_Messages,Pragma Pre_Class,Pragma Preelaborable_Initialization,Implementation Defined Pragmas
-@anchor{gnat_rm/implementation_defined_pragmas pragma-prefix-exception-messages}@anchor{9f}
+@anchor{gnat_rm/implementation_defined_pragmas pragma-prefix-exception-messages}@anchor{a0}
@section Pragma Prefix_Exception_Messages
@@ -5916,7 +5927,7 @@ prefixing in this case, you can always call
@cite{GNAT.Source_Info.Enclosing_Entity} and prepend the string manually.
@node Pragma Pre_Class,Pragma Priority_Specific_Dispatching,Pragma Prefix_Exception_Messages,Implementation Defined Pragmas
-@anchor{gnat_rm/implementation_defined_pragmas pragma-pre-class}@anchor{a0}
+@anchor{gnat_rm/implementation_defined_pragmas pragma-pre-class}@anchor{a1}
@section Pragma Pre_Class
@@ -5951,7 +5962,7 @@ policy that controls this pragma is @cite{Pre'Class}, not
@cite{Pre_Class}.
@node Pragma Priority_Specific_Dispatching,Pragma Profile,Pragma Pre_Class,Implementation Defined Pragmas
-@anchor{gnat_rm/implementation_defined_pragmas pragma-priority-specific-dispatching}@anchor{a1}
+@anchor{gnat_rm/implementation_defined_pragmas pragma-priority-specific-dispatching}@anchor{a2}
@section Pragma Priority_Specific_Dispatching
@@ -5975,21 +5986,21 @@ versions of Ada as an implementation-defined pragma.
See Ada 2012 Reference Manual for details.
@node Pragma Profile,Pragma Profile_Warnings,Pragma Priority_Specific_Dispatching,Implementation Defined Pragmas
-@anchor{gnat_rm/implementation_defined_pragmas pragma-profile}@anchor{a2}
+@anchor{gnat_rm/implementation_defined_pragmas pragma-profile}@anchor{a3}
@section Pragma Profile
Syntax:
@example
-pragma Profile (Ravenscar | Restricted | Rational);
+pragma Profile (Ravenscar | Restricted | Rational | GNAT_Extended_Ravenscar);
@end example
This pragma is standard in Ada 2005, but is available in all earlier
versions of Ada as an implementation-defined pragma. This is a
configuration pragma that establishes a set of configuration pragmas
that depend on the argument. @cite{Ravenscar} is standard in Ada 2005.
-The other two possibilities (@cite{Restricted} or @cite{Rational})
+The other possibilities (@cite{Restricted}, @cite{Rational}, @cite{GNAT_Extended_Ravenscar})
are implementation-defined. The set of configuration pragmas
is defined in the following sections.
@@ -6143,6 +6154,21 @@ automatically causes the use of a simplified,
more efficient version of the tasking run-time library.
@item
+Pragma Profile (GNAT_Extended_Ravenscar)
+
+This profile corresponds to a GNAT specific extension of the
+Ravenscar profile. The profile may change in the future although
+only in a compatible way: some restrictions may be removed or
+relaxed. It is defined as a variation of the Ravenscar profile.
+
+The @code{No_Implicit_Heap_Allocations} restriction has been replaced
+by @code{No_Implicit_Task_Allocations} and
+@code{No_Implicit_Protected_Object_Allocations}.
+
+The @code{Simple_Barriers} restriction has been replaced by
+@code{Pure_Barriers}.
+
+@item
Pragma Profile (Restricted)
This profile corresponds to the GNAT restricted run time. It
@@ -6223,7 +6249,7 @@ conforming Ada constructs. The profile enables the following three pragmas:
@end itemize
@node Pragma Profile_Warnings,Pragma Propagate_Exceptions,Pragma Profile,Implementation Defined Pragmas
-@anchor{gnat_rm/implementation_defined_pragmas pragma-profile-warnings}@anchor{a3}
+@anchor{gnat_rm/implementation_defined_pragmas pragma-profile-warnings}@anchor{a4}
@section Pragma Profile_Warnings
@@ -6241,7 +6267,7 @@ violations of the profile generate warning messages instead
of error messages.
@node Pragma Propagate_Exceptions,Pragma Provide_Shift_Operators,Pragma Profile_Warnings,Implementation Defined Pragmas
-@anchor{gnat_rm/implementation_defined_pragmas pragma-propagate-exceptions}@anchor{a4}
+@anchor{gnat_rm/implementation_defined_pragmas pragma-propagate-exceptions}@anchor{a5}
@section Pragma Propagate_Exceptions
@@ -6260,7 +6286,7 @@ purposes. It used to be used in connection with optimization of
a now-obsolete mechanism for implementation of exceptions.
@node Pragma Provide_Shift_Operators,Pragma Psect_Object,Pragma Propagate_Exceptions,Implementation Defined Pragmas
-@anchor{gnat_rm/implementation_defined_pragmas pragma-provide-shift-operators}@anchor{a5}
+@anchor{gnat_rm/implementation_defined_pragmas pragma-provide-shift-operators}@anchor{a6}
@section Pragma Provide_Shift_Operators
@@ -6280,7 +6306,7 @@ including the function declarations for these five operators, together
with the pragma Import (Intrinsic, ...) statements.
@node Pragma Psect_Object,Pragma Pure_Function,Pragma Provide_Shift_Operators,Implementation Defined Pragmas
-@anchor{gnat_rm/implementation_defined_pragmas pragma-psect-object}@anchor{a6}
+@anchor{gnat_rm/implementation_defined_pragmas pragma-psect-object}@anchor{a7}
@section Pragma Psect_Object
@@ -6300,7 +6326,7 @@ EXTERNAL_SYMBOL ::=
This pragma is identical in effect to pragma @cite{Common_Object}.
@node Pragma Pure_Function,Pragma Rational,Pragma Psect_Object,Implementation Defined Pragmas
-@anchor{gnat_rm/implementation_defined_pragmas pragma-pure-function}@anchor{a7}
+@anchor{gnat_rm/implementation_defined_pragmas pragma-pure-function}@anchor{a8}
@section Pragma Pure_Function
@@ -6362,7 +6388,7 @@ unit is not a Pure unit in the categorization sense. So for example, a function
thus marked is free to @cite{with} non-pure units.
@node Pragma Rational,Pragma Ravenscar,Pragma Pure_Function,Implementation Defined Pragmas
-@anchor{gnat_rm/implementation_defined_pragmas pragma-rational}@anchor{a8}
+@anchor{gnat_rm/implementation_defined_pragmas pragma-rational}@anchor{a9}
@section Pragma Rational
@@ -6380,7 +6406,7 @@ pragma Profile (Rational);
@end example
@node Pragma Ravenscar,Pragma Refined_Depends,Pragma Rational,Implementation Defined Pragmas
-@anchor{gnat_rm/implementation_defined_pragmas pragma-ravenscar}@anchor{a9}
+@anchor{gnat_rm/implementation_defined_pragmas pragma-ravenscar}@anchor{aa}
@section Pragma Ravenscar
@@ -6400,7 +6426,7 @@ pragma Profile (Ravenscar);
which is the preferred method of setting the @cite{Ravenscar} profile.
@node Pragma Refined_Depends,Pragma Refined_Global,Pragma Ravenscar,Implementation Defined Pragmas
-@anchor{gnat_rm/implementation_defined_pragmas pragma-refined-depends}@anchor{aa}
+@anchor{gnat_rm/implementation_defined_pragmas pragma-refined-depends}@anchor{ab}
@section Pragma Refined_Depends
@@ -6408,7 +6434,7 @@ For the description of this pragma, see SPARK 2014 Reference Manual,
section 6.1.5.
@node Pragma Refined_Global,Pragma Refined_Post,Pragma Refined_Depends,Implementation Defined Pragmas
-@anchor{gnat_rm/implementation_defined_pragmas pragma-refined-global}@anchor{ab}
+@anchor{gnat_rm/implementation_defined_pragmas pragma-refined-global}@anchor{ac}
@section Pragma Refined_Global
@@ -6416,7 +6442,7 @@ For the description of this pragma, see SPARK 2014 Reference Manual,
section 6.1.4.
@node Pragma Refined_Post,Pragma Refined_State,Pragma Refined_Global,Implementation Defined Pragmas
-@anchor{gnat_rm/implementation_defined_pragmas pragma-refined-post}@anchor{ac}
+@anchor{gnat_rm/implementation_defined_pragmas pragma-refined-post}@anchor{ad}
@section Pragma Refined_Post
@@ -6424,7 +6450,7 @@ For the description of this pragma, see SPARK 2014 Reference Manual,
section 7.2.7.
@node Pragma Refined_State,Pragma Relative_Deadline,Pragma Refined_Post,Implementation Defined Pragmas
-@anchor{gnat_rm/implementation_defined_pragmas pragma-refined-state}@anchor{ad}
+@anchor{gnat_rm/implementation_defined_pragmas pragma-refined-state}@anchor{ae}
@section Pragma Refined_State
@@ -6432,7 +6458,7 @@ For the description of this pragma, see SPARK 2014 Reference Manual,
section 7.2.2.
@node Pragma Relative_Deadline,Pragma Remote_Access_Type,Pragma Refined_State,Implementation Defined Pragmas
-@anchor{gnat_rm/implementation_defined_pragmas pragma-relative-deadline}@anchor{ae}
+@anchor{gnat_rm/implementation_defined_pragmas pragma-relative-deadline}@anchor{af}
@section Pragma Relative_Deadline
@@ -6447,7 +6473,7 @@ versions of Ada as an implementation-defined pragma.
See Ada 2012 Reference Manual for details.
@node Pragma Remote_Access_Type,Pragma Restricted_Run_Time,Pragma Relative_Deadline,Implementation Defined Pragmas
-@anchor{gnat_rm/implementation_defined_pragmas pragma-remote-access-type}@anchor{af}
+@anchor{gnat_rm/implementation_defined_pragmas pragma-remote-access-type}@anchor{b0}
@section Pragma Remote_Access_Type
@@ -6473,7 +6499,7 @@ pertaining to remote access to class-wide types. At instantiation, the
actual type must be a remote access to class-wide type.
@node Pragma Restricted_Run_Time,Pragma Restriction_Warnings,Pragma Remote_Access_Type,Implementation Defined Pragmas
-@anchor{gnat_rm/implementation_defined_pragmas pragma-restricted-run-time}@anchor{b0}
+@anchor{gnat_rm/implementation_defined_pragmas pragma-restricted-run-time}@anchor{b1}
@section Pragma Restricted_Run_Time
@@ -6494,7 +6520,7 @@ which is the preferred method of setting the restricted run time
profile.
@node Pragma Restriction_Warnings,Pragma Reviewable,Pragma Restricted_Run_Time,Implementation Defined Pragmas
-@anchor{gnat_rm/implementation_defined_pragmas pragma-restriction-warnings}@anchor{b1}
+@anchor{gnat_rm/implementation_defined_pragmas pragma-restriction-warnings}@anchor{b2}
@section Pragma Restriction_Warnings
@@ -6532,7 +6558,7 @@ generating a warning, but any other use of implementation
defined pragmas will cause a warning to be generated.
@node Pragma Reviewable,Pragma Share_Generic,Pragma Restriction_Warnings,Implementation Defined Pragmas
-@anchor{gnat_rm/implementation_defined_pragmas pragma-reviewable}@anchor{b2}
+@anchor{gnat_rm/implementation_defined_pragmas pragma-reviewable}@anchor{b3}
@section Pragma Reviewable
@@ -6636,7 +6662,7 @@ comprehensive messages identifying possible problems based on this
information.
@node Pragma Share_Generic,Pragma Shared,Pragma Reviewable,Implementation Defined Pragmas
-@anchor{gnat_rm/implementation_defined_pragmas pragma-share-generic}@anchor{b3}
+@anchor{gnat_rm/implementation_defined_pragmas pragma-share-generic}@anchor{b4}
@section Pragma Share_Generic
@@ -6654,7 +6680,7 @@ than to check that the given names are all names of generic units or
generic instances.
@node Pragma Shared,Pragma Short_Circuit_And_Or,Pragma Share_Generic,Implementation Defined Pragmas
-@anchor{gnat_rm/implementation_defined_pragmas pragma-shared}@anchor{b4}
+@anchor{gnat_rm/implementation_defined_pragmas pragma-shared}@anchor{b5}
@section Pragma Shared
@@ -6662,7 +6688,7 @@ This pragma is provided for compatibility with Ada 83. The syntax and
semantics are identical to pragma Atomic.
@node Pragma Short_Circuit_And_Or,Pragma Short_Descriptors,Pragma Shared,Implementation Defined Pragmas
-@anchor{gnat_rm/implementation_defined_pragmas pragma-short-circuit-and-or}@anchor{b5}
+@anchor{gnat_rm/implementation_defined_pragmas pragma-short-circuit-and-or}@anchor{b6}
@section Pragma Short_Circuit_And_Or
@@ -6681,7 +6707,7 @@ within the file being compiled, it applies only to the file being compiled.
There is no requirement that all units in a partition use this option.
@node Pragma Short_Descriptors,Pragma Simple_Storage_Pool_Type,Pragma Short_Circuit_And_Or,Implementation Defined Pragmas
-@anchor{gnat_rm/implementation_defined_pragmas pragma-short-descriptors}@anchor{b6}
+@anchor{gnat_rm/implementation_defined_pragmas pragma-short-descriptors}@anchor{b7}
@section Pragma Short_Descriptors
@@ -6695,7 +6721,7 @@ This pragma is provided for compatibility with other Ada implementations. It
is recognized but ignored by all current versions of GNAT.
@node Pragma Simple_Storage_Pool_Type,Pragma Source_File_Name,Pragma Short_Descriptors,Implementation Defined Pragmas
-@anchor{gnat_rm/implementation_defined_pragmas pragma-simple-storage-pool-type}@anchor{b7}
+@anchor{gnat_rm/implementation_defined_pragmas pragma-simple-storage-pool-type}@anchor{b8}
@section Pragma Simple_Storage_Pool_Type
@@ -6749,7 +6775,7 @@ storage-management discipline).
An object of a simple storage pool type can be associated with an access
type by specifying the attribute
-@ref{b8,,Simple_Storage_Pool}. For example:
+@ref{b9,,Simple_Storage_Pool}. For example:
@example
My_Pool : My_Simple_Storage_Pool_Type;
@@ -6759,11 +6785,11 @@ type Acc is access My_Data_Type;
for Acc'Simple_Storage_Pool use My_Pool;
@end example
-See attribute @ref{b8,,Simple_Storage_Pool}
+See attribute @ref{b9,,Simple_Storage_Pool}
for further details.
@node Pragma Source_File_Name,Pragma Source_File_Name_Project,Pragma Simple_Storage_Pool_Type,Implementation Defined Pragmas
-@anchor{gnat_rm/implementation_defined_pragmas pragma-source-file-name}@anchor{b9}@anchor{gnat_rm/implementation_defined_pragmas id3}@anchor{ba}
+@anchor{gnat_rm/implementation_defined_pragmas pragma-source-file-name}@anchor{ba}@anchor{gnat_rm/implementation_defined_pragmas id3}@anchor{bb}
@section Pragma Source_File_Name
@@ -6855,19 +6881,19 @@ aware of these pragmas, and so other tools that use the projet file would not
be aware of the intended naming conventions. If you are using project files,
file naming is controlled by Source_File_Name_Project pragmas, which are
usually supplied automatically by the project manager. A pragma
-Source_File_Name cannot appear after a @ref{bb,,Pragma Source_File_Name_Project}.
+Source_File_Name cannot appear after a @ref{bc,,Pragma Source_File_Name_Project}.
For more details on the use of the @cite{Source_File_Name} pragma, see the
sections on @cite{Using Other File Names} and @cite{Alternative File Naming Schemes' in the :title:`GNAT User's Guide}.
@node Pragma Source_File_Name_Project,Pragma Source_Reference,Pragma Source_File_Name,Implementation Defined Pragmas
-@anchor{gnat_rm/implementation_defined_pragmas id4}@anchor{bc}@anchor{gnat_rm/implementation_defined_pragmas pragma-source-file-name-project}@anchor{bb}
+@anchor{gnat_rm/implementation_defined_pragmas id4}@anchor{bd}@anchor{gnat_rm/implementation_defined_pragmas pragma-source-file-name-project}@anchor{bc}
@section Pragma Source_File_Name_Project
This pragma has the same syntax and semantics as pragma Source_File_Name.
It is only allowed as a stand-alone configuration pragma.
-It cannot appear after a @ref{b9,,Pragma Source_File_Name}, and
+It cannot appear after a @ref{ba,,Pragma Source_File_Name}, and
most importantly, once pragma Source_File_Name_Project appears,
no further Source_File_Name pragmas are allowed.
@@ -6879,7 +6905,7 @@ Source_File_Name or Source_File_Name_Project pragmas (which would not be
known to the project manager).
@node Pragma Source_Reference,Pragma SPARK_Mode,Pragma Source_File_Name_Project,Implementation Defined Pragmas
-@anchor{gnat_rm/implementation_defined_pragmas pragma-source-reference}@anchor{bd}
+@anchor{gnat_rm/implementation_defined_pragmas pragma-source-reference}@anchor{be}
@section Pragma Source_Reference
@@ -6903,7 +6929,7 @@ string expression other than a string literal. This is because its value
is needed for error messages issued by all phases of the compiler.
@node Pragma SPARK_Mode,Pragma Static_Elaboration_Desired,Pragma Source_Reference,Implementation Defined Pragmas
-@anchor{gnat_rm/implementation_defined_pragmas pragma-spark-mode}@anchor{be}
+@anchor{gnat_rm/implementation_defined_pragmas pragma-spark-mode}@anchor{bf}
@section Pragma SPARK_Mode
@@ -6985,7 +7011,7 @@ SPARK_Mode (@cite{Off}), then that pragma will need to be repeated in
the package body.
@node Pragma Static_Elaboration_Desired,Pragma Stream_Convert,Pragma SPARK_Mode,Implementation Defined Pragmas
-@anchor{gnat_rm/implementation_defined_pragmas pragma-static-elaboration-desired}@anchor{bf}
+@anchor{gnat_rm/implementation_defined_pragmas pragma-static-elaboration-desired}@anchor{c0}
@section Pragma Static_Elaboration_Desired
@@ -7009,7 +7035,7 @@ construction of larger aggregates with static components that include an others
choice.)
@node Pragma Stream_Convert,Pragma Style_Checks,Pragma Static_Elaboration_Desired,Implementation Defined Pragmas
-@anchor{gnat_rm/implementation_defined_pragmas pragma-stream-convert}@anchor{c0}
+@anchor{gnat_rm/implementation_defined_pragmas pragma-stream-convert}@anchor{c1}
@section Pragma Stream_Convert
@@ -7086,7 +7112,7 @@ the pragma is silently ignored, and the default implementation of the stream
attributes is used instead.
@node Pragma Style_Checks,Pragma Subtitle,Pragma Stream_Convert,Implementation Defined Pragmas
-@anchor{gnat_rm/implementation_defined_pragmas pragma-style-checks}@anchor{c1}
+@anchor{gnat_rm/implementation_defined_pragmas pragma-style-checks}@anchor{c2}
@section Pragma Style_Checks
@@ -7159,7 +7185,7 @@ Rf2 : Integer := ARG; -- OK, no error
@end example
@node Pragma Subtitle,Pragma Suppress,Pragma Style_Checks,Implementation Defined Pragmas
-@anchor{gnat_rm/implementation_defined_pragmas pragma-subtitle}@anchor{c2}
+@anchor{gnat_rm/implementation_defined_pragmas pragma-subtitle}@anchor{c3}
@section Pragma Subtitle
@@ -7173,7 +7199,7 @@ This pragma is recognized for compatibility with other Ada compilers
but is ignored by GNAT.
@node Pragma Suppress,Pragma Suppress_All,Pragma Subtitle,Implementation Defined Pragmas
-@anchor{gnat_rm/implementation_defined_pragmas pragma-suppress}@anchor{c3}
+@anchor{gnat_rm/implementation_defined_pragmas pragma-suppress}@anchor{c4}
@section Pragma Suppress
@@ -7246,7 +7272,7 @@ Of course, run-time checks are omitted whenever the compiler can prove
that they will not fail, whether or not checks are suppressed.
@node Pragma Suppress_All,Pragma Suppress_Debug_Info,Pragma Suppress,Implementation Defined Pragmas
-@anchor{gnat_rm/implementation_defined_pragmas pragma-suppress-all}@anchor{c4}
+@anchor{gnat_rm/implementation_defined_pragmas pragma-suppress-all}@anchor{c5}
@section Pragma Suppress_All
@@ -7265,7 +7291,7 @@ The use of the standard Ada pragma @cite{Suppress (All_Checks)}
as a normal configuration pragma is the preferred usage in GNAT.
@node Pragma Suppress_Debug_Info,Pragma Suppress_Exception_Locations,Pragma Suppress_All,Implementation Defined Pragmas
-@anchor{gnat_rm/implementation_defined_pragmas pragma-suppress-debug-info}@anchor{c5}
+@anchor{gnat_rm/implementation_defined_pragmas pragma-suppress-debug-info}@anchor{c6}
@section Pragma Suppress_Debug_Info
@@ -7280,7 +7306,7 @@ for the specified entity. It is intended primarily for use in debugging
the debugger, and navigating around debugger problems.
@node Pragma Suppress_Exception_Locations,Pragma Suppress_Initialization,Pragma Suppress_Debug_Info,Implementation Defined Pragmas
-@anchor{gnat_rm/implementation_defined_pragmas pragma-suppress-exception-locations}@anchor{c6}
+@anchor{gnat_rm/implementation_defined_pragmas pragma-suppress-exception-locations}@anchor{c7}
@section Pragma Suppress_Exception_Locations
@@ -7303,7 +7329,7 @@ a partition, so it is fine to have some units within a partition compiled
with this pragma and others compiled in normal mode without it.
@node Pragma Suppress_Initialization,Pragma Task_Name,Pragma Suppress_Exception_Locations,Implementation Defined Pragmas
-@anchor{gnat_rm/implementation_defined_pragmas pragma-suppress-initialization}@anchor{c7}
+@anchor{gnat_rm/implementation_defined_pragmas pragma-suppress-initialization}@anchor{c8}
@section Pragma Suppress_Initialization
@@ -7348,7 +7374,7 @@ is suppressed, just as though its subtype had been given in a pragma
Suppress_Initialization, as described above.
@node Pragma Task_Name,Pragma Task_Storage,Pragma Suppress_Initialization,Implementation Defined Pragmas
-@anchor{gnat_rm/implementation_defined_pragmas pragma-task-name}@anchor{c8}
+@anchor{gnat_rm/implementation_defined_pragmas pragma-task-name}@anchor{c9}
@section Pragma Task_Name
@@ -7404,7 +7430,7 @@ end;
@end example
@node Pragma Task_Storage,Pragma Test_Case,Pragma Task_Name,Implementation Defined Pragmas
-@anchor{gnat_rm/implementation_defined_pragmas pragma-task-storage}@anchor{c9}
+@anchor{gnat_rm/implementation_defined_pragmas pragma-task-storage}@anchor{ca}
@section Pragma Task_Storage
@@ -7424,7 +7450,7 @@ created, depending on the target. This pragma can appear anywhere a
type.
@node Pragma Test_Case,Pragma Thread_Local_Storage,Pragma Task_Storage,Implementation Defined Pragmas
-@anchor{gnat_rm/implementation_defined_pragmas pragma-test-case}@anchor{ca}
+@anchor{gnat_rm/implementation_defined_pragmas pragma-test-case}@anchor{cb}
@section Pragma Test_Case
@@ -7480,7 +7506,7 @@ postcondition. Mode @cite{Robustness} indicates that the precondition and
postcondition of the subprogram should be ignored for this test case.
@node Pragma Thread_Local_Storage,Pragma Time_Slice,Pragma Test_Case,Implementation Defined Pragmas
-@anchor{gnat_rm/implementation_defined_pragmas pragma-thread-local-storage}@anchor{cb}
+@anchor{gnat_rm/implementation_defined_pragmas pragma-thread-local-storage}@anchor{cc}
@section Pragma Thread_Local_Storage
@@ -7499,8 +7525,8 @@ pragma Thread_Local_Storage ([Entity =>] LOCAL_NAME);
This pragma specifies that the specified entity, which must be
a variable declared in a library level package, is to be marked as
"Thread Local Storage" (@cite{TLS}). On systems supporting this (which
-include Solaris, GNU/Linux and VxWorks 6), this causes each thread
-(and hence each Ada task) to see a distinct copy of the variable.
+include Windows, Solaris, GNU/Linux and VxWorks 6), this causes each
+thread (and hence each Ada task) to see a distinct copy of the variable.
The variable may not have default initialization, and if there is
an explicit initialization, it must be either @cite{null} for an
@@ -7514,7 +7540,7 @@ If this pragma is used on a system where @cite{TLS} is not supported,
then an error message will be generated and the program will be rejected.
@node Pragma Time_Slice,Pragma Title,Pragma Thread_Local_Storage,Implementation Defined Pragmas
-@anchor{gnat_rm/implementation_defined_pragmas pragma-time-slice}@anchor{cc}
+@anchor{gnat_rm/implementation_defined_pragmas pragma-time-slice}@anchor{cd}
@section Pragma Time_Slice
@@ -7530,7 +7556,7 @@ It is ignored if it is used in a system that does not allow this control,
or if it appears in other than the main program unit.
@node Pragma Title,Pragma Type_Invariant,Pragma Time_Slice,Implementation Defined Pragmas
-@anchor{gnat_rm/implementation_defined_pragmas pragma-title}@anchor{cd}
+@anchor{gnat_rm/implementation_defined_pragmas pragma-title}@anchor{ce}
@section Pragma Title
@@ -7555,7 +7581,7 @@ notation is used, and named and positional notation can be mixed
following the normal rules for procedure calls in Ada.
@node Pragma Type_Invariant,Pragma Type_Invariant_Class,Pragma Title,Implementation Defined Pragmas
-@anchor{gnat_rm/implementation_defined_pragmas pragma-type-invariant}@anchor{ce}
+@anchor{gnat_rm/implementation_defined_pragmas pragma-type-invariant}@anchor{cf}
@section Pragma Type_Invariant
@@ -7576,7 +7602,7 @@ controlled by the assertion identifier @cite{Type_Invariant}
rather than @cite{Invariant}.
@node Pragma Type_Invariant_Class,Pragma Unchecked_Union,Pragma Type_Invariant,Implementation Defined Pragmas
-@anchor{gnat_rm/implementation_defined_pragmas pragma-type-invariant-class}@anchor{cf}
+@anchor{gnat_rm/implementation_defined_pragmas pragma-type-invariant-class}@anchor{d0}
@section Pragma Type_Invariant_Class
@@ -7603,7 +7629,7 @@ policy that controls this pragma is @cite{Type_Invariant'Class},
not @cite{Type_Invariant_Class}.
@node Pragma Unchecked_Union,Pragma Unevaluated_Use_Of_Old,Pragma Type_Invariant_Class,Implementation Defined Pragmas
-@anchor{gnat_rm/implementation_defined_pragmas pragma-unchecked-union}@anchor{d0}
+@anchor{gnat_rm/implementation_defined_pragmas pragma-unchecked-union}@anchor{d1}
@section Pragma Unchecked_Union
@@ -7623,7 +7649,7 @@ version in all language modes (Ada 83, Ada 95, and Ada 2005). For full
details, consult the Ada 2012 Reference Manual, section B.3.3.
@node Pragma Unevaluated_Use_Of_Old,Pragma Unimplemented_Unit,Pragma Unchecked_Union,Implementation Defined Pragmas
-@anchor{gnat_rm/implementation_defined_pragmas pragma-unevaluated-use-of-old}@anchor{d1}
+@anchor{gnat_rm/implementation_defined_pragmas pragma-unevaluated-use-of-old}@anchor{d2}
@section Pragma Unevaluated_Use_Of_Old
@@ -7678,7 +7704,7 @@ uses up to the end of the corresponding statement sequence or
sequence of package declarations.
@node Pragma Unimplemented_Unit,Pragma Universal_Aliasing,Pragma Unevaluated_Use_Of_Old,Implementation Defined Pragmas
-@anchor{gnat_rm/implementation_defined_pragmas pragma-unimplemented-unit}@anchor{d2}
+@anchor{gnat_rm/implementation_defined_pragmas pragma-unimplemented-unit}@anchor{d3}
@section Pragma Unimplemented_Unit
@@ -7698,7 +7724,7 @@ The abort only happens if code is being generated. Thus you can use
specs of unimplemented packages in syntax or semantic checking mode.
@node Pragma Universal_Aliasing,Pragma Universal_Data,Pragma Unimplemented_Unit,Implementation Defined Pragmas
-@anchor{gnat_rm/implementation_defined_pragmas pragma-universal-aliasing}@anchor{d3}
+@anchor{gnat_rm/implementation_defined_pragmas pragma-universal-aliasing}@anchor{d4}
@section Pragma Universal_Aliasing
@@ -7717,7 +7743,7 @@ situations in which it must be suppressed, see the section on
@cite{Optimization and Strict Aliasing} in the @cite{GNAT User's Guide}.
@node Pragma Universal_Data,Pragma Unmodified,Pragma Universal_Aliasing,Implementation Defined Pragmas
-@anchor{gnat_rm/implementation_defined_pragmas pragma-universal-data}@anchor{d4}
+@anchor{gnat_rm/implementation_defined_pragmas pragma-universal-data}@anchor{d5}
@section Pragma Universal_Data
@@ -7741,7 +7767,7 @@ of this pragma is also available by applying the -univ switch on the
compilations of units where universal addressing of the data is desired.
@node Pragma Unmodified,Pragma Unreferenced,Pragma Universal_Data,Implementation Defined Pragmas
-@anchor{gnat_rm/implementation_defined_pragmas pragma-unmodified}@anchor{d5}
+@anchor{gnat_rm/implementation_defined_pragmas pragma-unmodified}@anchor{d6}
@section Pragma Unmodified
@@ -7775,7 +7801,7 @@ Thus it is never necessary to use @cite{pragma Unmodified} for such
variables, though it is harmless to do so.
@node Pragma Unreferenced,Pragma Unreferenced_Objects,Pragma Unmodified,Implementation Defined Pragmas
-@anchor{gnat_rm/implementation_defined_pragmas pragma-unreferenced}@anchor{d6}
+@anchor{gnat_rm/implementation_defined_pragmas pragma-unreferenced}@anchor{d7}
@section Pragma Unreferenced
@@ -7835,7 +7861,7 @@ Thus it is never necessary to use @cite{pragma Unreferenced} for such
variables, though it is harmless to do so.
@node Pragma Unreferenced_Objects,Pragma Unreserve_All_Interrupts,Pragma Unreferenced,Implementation Defined Pragmas
-@anchor{gnat_rm/implementation_defined_pragmas pragma-unreferenced-objects}@anchor{d7}
+@anchor{gnat_rm/implementation_defined_pragmas pragma-unreferenced-objects}@anchor{d8}
@section Pragma Unreferenced_Objects
@@ -7860,7 +7886,7 @@ compiler will automatically suppress unwanted warnings about these variables
not being referenced.
@node Pragma Unreserve_All_Interrupts,Pragma Unsuppress,Pragma Unreferenced_Objects,Implementation Defined Pragmas
-@anchor{gnat_rm/implementation_defined_pragmas pragma-unreserve-all-interrupts}@anchor{d8}
+@anchor{gnat_rm/implementation_defined_pragmas pragma-unreserve-all-interrupts}@anchor{d9}
@section Pragma Unreserve_All_Interrupts
@@ -7896,7 +7922,7 @@ handled, see pragma @cite{Interrupt_State}, which subsumes the functionality
of the @cite{Unreserve_All_Interrupts} pragma.
@node Pragma Unsuppress,Pragma Use_VADS_Size,Pragma Unreserve_All_Interrupts,Implementation Defined Pragmas
-@anchor{gnat_rm/implementation_defined_pragmas pragma-unsuppress}@anchor{d9}
+@anchor{gnat_rm/implementation_defined_pragmas pragma-unsuppress}@anchor{da}
@section Pragma Unsuppress
@@ -7932,7 +7958,7 @@ number of implementation-defined check names. See the description of pragma
@cite{Suppress} for full details.
@node Pragma Use_VADS_Size,Pragma Validity_Checks,Pragma Unsuppress,Implementation Defined Pragmas
-@anchor{gnat_rm/implementation_defined_pragmas pragma-use-vads-size}@anchor{da}
+@anchor{gnat_rm/implementation_defined_pragmas pragma-use-vads-size}@anchor{db}
@section Pragma Use_VADS_Size
@@ -7956,7 +7982,7 @@ as implemented in the VADS compiler. See description of the VADS_Size
attribute for further details.
@node Pragma Validity_Checks,Pragma Volatile,Pragma Use_VADS_Size,Implementation Defined Pragmas
-@anchor{gnat_rm/implementation_defined_pragmas pragma-validity-checks}@anchor{db}
+@anchor{gnat_rm/implementation_defined_pragmas pragma-validity-checks}@anchor{dc}
@section Pragma Validity_Checks
@@ -8013,7 +8039,7 @@ A := C; -- C will be validity checked
@end example
@node Pragma Volatile,Pragma Volatile_Full_Access,Pragma Validity_Checks,Implementation Defined Pragmas
-@anchor{gnat_rm/implementation_defined_pragmas pragma-volatile}@anchor{dc}
+@anchor{gnat_rm/implementation_defined_pragmas pragma-volatile}@anchor{dd}
@section Pragma Volatile
@@ -8031,7 +8057,7 @@ implementation of pragma Volatile is upwards compatible with the
implementation in DEC Ada 83.
@node Pragma Volatile_Full_Access,Pragma Volatile_Function,Pragma Volatile,Implementation Defined Pragmas
-@anchor{gnat_rm/implementation_defined_pragmas pragma-volatile-full-access}@anchor{dd}
+@anchor{gnat_rm/implementation_defined_pragmas pragma-volatile-full-access}@anchor{de}
@section Pragma Volatile_Full_Access
@@ -8063,7 +8089,7 @@ It is not permissible to specify @cite{Volatile_Full_Access} for a composite
(record or array) type or object that has at least one @cite{Aliased} component.
@node Pragma Volatile_Function,Pragma Warning_As_Error,Pragma Volatile_Full_Access,Implementation Defined Pragmas
-@anchor{gnat_rm/implementation_defined_pragmas pragma-volatile-function}@anchor{de}
+@anchor{gnat_rm/implementation_defined_pragmas pragma-volatile-function}@anchor{df}
@section Pragma Volatile_Function
@@ -8071,7 +8097,7 @@ For the description of this pragma, see SPARK 2014 Reference Manual,
section 7.1.2.
@node Pragma Warning_As_Error,Pragma Warnings,Pragma Volatile_Function,Implementation Defined Pragmas
-@anchor{gnat_rm/implementation_defined_pragmas pragma-warning-as-error}@anchor{df}
+@anchor{gnat_rm/implementation_defined_pragmas pragma-warning-as-error}@anchor{e0}
@section Pragma Warning_As_Error
@@ -8106,7 +8132,7 @@ as shown in the example below, to treat a class of warnings as errors.
The above use of patterns to match the message applies only to warning
messages generated by the front end. This pragma can also be applied to
-warnings provided by the back end and mentioned in @ref{e0,,Pragma Warnings}.
+warnings provided by the back end and mentioned in @ref{e1,,Pragma Warnings}.
By using a single full @emph{-Wxxx} switch in the pragma, such warnings
can also be treated as errors.
@@ -8156,7 +8182,7 @@ the tag is changed from "warning:" to "error:" and the string
"[warning-as-error]" is appended to the end of the message.
@node Pragma Warnings,Pragma Weak_External,Pragma Warning_As_Error,Implementation Defined Pragmas
-@anchor{gnat_rm/implementation_defined_pragmas id5}@anchor{e1}@anchor{gnat_rm/implementation_defined_pragmas pragma-warnings}@anchor{e0}
+@anchor{gnat_rm/implementation_defined_pragmas id5}@anchor{e2}@anchor{gnat_rm/implementation_defined_pragmas pragma-warnings}@anchor{e1}
@section Pragma Warnings
@@ -8308,7 +8334,7 @@ selectively for each tool, and as a consequence to detect useless pragma
Warnings with switch @cite{-gnatw.w}.
@node Pragma Weak_External,Pragma Wide_Character_Encoding,Pragma Warnings,Implementation Defined Pragmas
-@anchor{gnat_rm/implementation_defined_pragmas pragma-weak-external}@anchor{e2}
+@anchor{gnat_rm/implementation_defined_pragmas pragma-weak-external}@anchor{e3}
@section Pragma Weak_External
@@ -8359,7 +8385,7 @@ end External_Module;
@end example
@node Pragma Wide_Character_Encoding,,Pragma Weak_External,Implementation Defined Pragmas
-@anchor{gnat_rm/implementation_defined_pragmas pragma-wide-character-encoding}@anchor{e3}
+@anchor{gnat_rm/implementation_defined_pragmas pragma-wide-character-encoding}@anchor{e4}
@section Pragma Wide_Character_Encoding
@@ -8386,7 +8412,7 @@ encoding within that file, and does not affect withed units, specs,
or subunits.
@node Implementation Defined Aspects,Implementation Defined Attributes,Implementation Defined Pragmas,Top
-@anchor{gnat_rm/implementation_defined_aspects implementation-defined-aspects}@anchor{e4}@anchor{gnat_rm/implementation_defined_aspects doc}@anchor{e5}@anchor{gnat_rm/implementation_defined_aspects id1}@anchor{e6}
+@anchor{gnat_rm/implementation_defined_aspects implementation-defined-aspects}@anchor{e5}@anchor{gnat_rm/implementation_defined_aspects doc}@anchor{e6}@anchor{gnat_rm/implementation_defined_aspects id1}@anchor{e7}
@chapter Implementation Defined Aspects
@@ -8501,7 +8527,7 @@ or attribute definition clause.
@end menu
@node Aspect Abstract_State,Annotate,,Implementation Defined Aspects
-@anchor{gnat_rm/implementation_defined_aspects aspect-abstract-state}@anchor{e7}
+@anchor{gnat_rm/implementation_defined_aspects aspect-abstract-state}@anchor{e8}
@section Aspect Abstract_State
@@ -8510,7 +8536,7 @@ or attribute definition clause.
This aspect is equivalent to pragma @cite{Abstract_State}.
@node Annotate,Aspect Async_Readers,Aspect Abstract_State,Implementation Defined Aspects
-@anchor{gnat_rm/implementation_defined_aspects annotate}@anchor{e8}
+@anchor{gnat_rm/implementation_defined_aspects annotate}@anchor{e9}
@section Annotate
@@ -8536,7 +8562,7 @@ Equivalent to @cite{pragma Annotate (ID@comma{} ID @{@comma{} ARG@}@comma{} Enti
@end table
@node Aspect Async_Readers,Aspect Async_Writers,Annotate,Implementation Defined Aspects
-@anchor{gnat_rm/implementation_defined_aspects aspect-async-readers}@anchor{e9}
+@anchor{gnat_rm/implementation_defined_aspects aspect-async-readers}@anchor{ea}
@section Aspect Async_Readers
@@ -8545,7 +8571,7 @@ Equivalent to @cite{pragma Annotate (ID@comma{} ID @{@comma{} ARG@}@comma{} Enti
This boolean aspect is equivalent to pragma @cite{Async_Readers}.
@node Aspect Async_Writers,Aspect Constant_After_Elaboration,Aspect Async_Readers,Implementation Defined Aspects
-@anchor{gnat_rm/implementation_defined_aspects aspect-async-writers}@anchor{ea}
+@anchor{gnat_rm/implementation_defined_aspects aspect-async-writers}@anchor{eb}
@section Aspect Async_Writers
@@ -8554,7 +8580,7 @@ This boolean aspect is equivalent to pragma @cite{Async_Readers}.
This boolean aspect is equivalent to pragma @cite{Async_Writers}.
@node Aspect Constant_After_Elaboration,Aspect Contract_Cases,Aspect Async_Writers,Implementation Defined Aspects
-@anchor{gnat_rm/implementation_defined_aspects aspect-constant-after-elaboration}@anchor{eb}
+@anchor{gnat_rm/implementation_defined_aspects aspect-constant-after-elaboration}@anchor{ec}
@section Aspect Constant_After_Elaboration
@@ -8563,7 +8589,7 @@ This boolean aspect is equivalent to pragma @cite{Async_Writers}.
This aspect is equivalent to pragma @cite{Constant_After_Elaboration}.
@node Aspect Contract_Cases,Aspect Depends,Aspect Constant_After_Elaboration,Implementation Defined Aspects
-@anchor{gnat_rm/implementation_defined_aspects aspect-contract-cases}@anchor{ec}
+@anchor{gnat_rm/implementation_defined_aspects aspect-contract-cases}@anchor{ed}
@section Aspect Contract_Cases
@@ -8574,7 +8600,7 @@ of clauses being enclosed in parentheses so that syntactically it is an
aggregate.
@node Aspect Depends,Aspect Default_Initial_Condition,Aspect Contract_Cases,Implementation Defined Aspects
-@anchor{gnat_rm/implementation_defined_aspects aspect-depends}@anchor{ed}
+@anchor{gnat_rm/implementation_defined_aspects aspect-depends}@anchor{ee}
@section Aspect Depends
@@ -8583,7 +8609,7 @@ aggregate.
This aspect is equivalent to pragma @cite{Depends}.
@node Aspect Default_Initial_Condition,Aspect Dimension,Aspect Depends,Implementation Defined Aspects
-@anchor{gnat_rm/implementation_defined_aspects aspect-default-initial-condition}@anchor{ee}
+@anchor{gnat_rm/implementation_defined_aspects aspect-default-initial-condition}@anchor{ef}
@section Aspect Default_Initial_Condition
@@ -8592,7 +8618,7 @@ This aspect is equivalent to pragma @cite{Depends}.
This aspect is equivalent to pragma @cite{Default_Initial_Condition}.
@node Aspect Dimension,Aspect Dimension_System,Aspect Default_Initial_Condition,Implementation Defined Aspects
-@anchor{gnat_rm/implementation_defined_aspects aspect-dimension}@anchor{ef}
+@anchor{gnat_rm/implementation_defined_aspects aspect-dimension}@anchor{f0}
@section Aspect Dimension
@@ -8628,7 +8654,7 @@ Note that when the dimensioned type is an integer type, then any
dimension value must be an integer literal.
@node Aspect Dimension_System,Aspect Disable_Controlled,Aspect Dimension,Implementation Defined Aspects
-@anchor{gnat_rm/implementation_defined_aspects aspect-dimension-system}@anchor{f0}
+@anchor{gnat_rm/implementation_defined_aspects aspect-dimension-system}@anchor{f1}
@section Aspect Dimension_System
@@ -8688,7 +8714,7 @@ See section 'Performing Dimensionality Analysis in GNAT' in the GNAT Users
Guide for detailed examples of use of the dimension system.
@node Aspect Disable_Controlled,Aspect Effective_Reads,Aspect Dimension_System,Implementation Defined Aspects
-@anchor{gnat_rm/implementation_defined_aspects aspect-disable-controlled}@anchor{f1}
+@anchor{gnat_rm/implementation_defined_aspects aspect-disable-controlled}@anchor{f2}
@section Aspect Disable_Controlled
@@ -8701,7 +8727,7 @@ where for example you might want a record to be controlled or not depending on
whether some run-time check is enabled or suppressed.
@node Aspect Effective_Reads,Aspect Effective_Writes,Aspect Disable_Controlled,Implementation Defined Aspects
-@anchor{gnat_rm/implementation_defined_aspects aspect-effective-reads}@anchor{f2}
+@anchor{gnat_rm/implementation_defined_aspects aspect-effective-reads}@anchor{f3}
@section Aspect Effective_Reads
@@ -8710,7 +8736,7 @@ whether some run-time check is enabled or suppressed.
This aspect is equivalent to pragma @cite{Effective_Reads}.
@node Aspect Effective_Writes,Aspect Extensions_Visible,Aspect Effective_Reads,Implementation Defined Aspects
-@anchor{gnat_rm/implementation_defined_aspects aspect-effective-writes}@anchor{f3}
+@anchor{gnat_rm/implementation_defined_aspects aspect-effective-writes}@anchor{f4}
@section Aspect Effective_Writes
@@ -8719,7 +8745,7 @@ This aspect is equivalent to pragma @cite{Effective_Reads}.
This aspect is equivalent to pragma @cite{Effective_Writes}.
@node Aspect Extensions_Visible,Aspect Favor_Top_Level,Aspect Effective_Writes,Implementation Defined Aspects
-@anchor{gnat_rm/implementation_defined_aspects aspect-extensions-visible}@anchor{f4}
+@anchor{gnat_rm/implementation_defined_aspects aspect-extensions-visible}@anchor{f5}
@section Aspect Extensions_Visible
@@ -8728,7 +8754,7 @@ This aspect is equivalent to pragma @cite{Effective_Writes}.
This aspect is equivalent to pragma @cite{Extensions_Visible}.
@node Aspect Favor_Top_Level,Aspect Ghost,Aspect Extensions_Visible,Implementation Defined Aspects
-@anchor{gnat_rm/implementation_defined_aspects aspect-favor-top-level}@anchor{f5}
+@anchor{gnat_rm/implementation_defined_aspects aspect-favor-top-level}@anchor{f6}
@section Aspect Favor_Top_Level
@@ -8737,7 +8763,7 @@ This aspect is equivalent to pragma @cite{Extensions_Visible}.
This boolean aspect is equivalent to pragma @cite{Favor_Top_Level}.
@node Aspect Ghost,Aspect Global,Aspect Favor_Top_Level,Implementation Defined Aspects
-@anchor{gnat_rm/implementation_defined_aspects aspect-ghost}@anchor{f6}
+@anchor{gnat_rm/implementation_defined_aspects aspect-ghost}@anchor{f7}
@section Aspect Ghost
@@ -8746,7 +8772,7 @@ This boolean aspect is equivalent to pragma @cite{Favor_Top_Level}.
This aspect is equivalent to pragma @cite{Ghost}.
@node Aspect Global,Aspect Initial_Condition,Aspect Ghost,Implementation Defined Aspects
-@anchor{gnat_rm/implementation_defined_aspects aspect-global}@anchor{f7}
+@anchor{gnat_rm/implementation_defined_aspects aspect-global}@anchor{f8}
@section Aspect Global
@@ -8755,7 +8781,7 @@ This aspect is equivalent to pragma @cite{Ghost}.
This aspect is equivalent to pragma @cite{Global}.
@node Aspect Initial_Condition,Aspect Initializes,Aspect Global,Implementation Defined Aspects
-@anchor{gnat_rm/implementation_defined_aspects aspect-initial-condition}@anchor{f8}
+@anchor{gnat_rm/implementation_defined_aspects aspect-initial-condition}@anchor{f9}
@section Aspect Initial_Condition
@@ -8764,7 +8790,7 @@ This aspect is equivalent to pragma @cite{Global}.
This aspect is equivalent to pragma @cite{Initial_Condition}.
@node Aspect Initializes,Aspect Inline_Always,Aspect Initial_Condition,Implementation Defined Aspects
-@anchor{gnat_rm/implementation_defined_aspects aspect-initializes}@anchor{f9}
+@anchor{gnat_rm/implementation_defined_aspects aspect-initializes}@anchor{fa}
@section Aspect Initializes
@@ -8773,7 +8799,7 @@ This aspect is equivalent to pragma @cite{Initial_Condition}.
This aspect is equivalent to pragma @cite{Initializes}.
@node Aspect Inline_Always,Aspect Invariant,Aspect Initializes,Implementation Defined Aspects
-@anchor{gnat_rm/implementation_defined_aspects aspect-inline-always}@anchor{fa}
+@anchor{gnat_rm/implementation_defined_aspects aspect-inline-always}@anchor{fb}
@section Aspect Inline_Always
@@ -8782,7 +8808,7 @@ This aspect is equivalent to pragma @cite{Initializes}.
This boolean aspect is equivalent to pragma @cite{Inline_Always}.
@node Aspect Invariant,Aspect Invariant'Class,Aspect Inline_Always,Implementation Defined Aspects
-@anchor{gnat_rm/implementation_defined_aspects aspect-invariant}@anchor{fb}
+@anchor{gnat_rm/implementation_defined_aspects aspect-invariant}@anchor{fc}
@section Aspect Invariant
@@ -8793,7 +8819,7 @@ synonym for the language defined aspect @cite{Type_Invariant} except
that it is separately controllable using pragma @cite{Assertion_Policy}.
@node Aspect Invariant'Class,Aspect Iterable,Aspect Invariant,Implementation Defined Aspects
-@anchor{gnat_rm/implementation_defined_aspects aspect-invariant-class}@anchor{fc}
+@anchor{gnat_rm/implementation_defined_aspects aspect-invariant-class}@anchor{fd}
@section Aspect Invariant'Class
@@ -8804,7 +8830,7 @@ synonym for the language defined aspect @cite{Type_Invariant'Class} except
that it is separately controllable using pragma @cite{Assertion_Policy}.
@node Aspect Iterable,Aspect Linker_Section,Aspect Invariant'Class,Implementation Defined Aspects
-@anchor{gnat_rm/implementation_defined_aspects aspect-iterable}@anchor{fd}
+@anchor{gnat_rm/implementation_defined_aspects aspect-iterable}@anchor{fe}
@section Aspect Iterable
@@ -8880,7 +8906,7 @@ function Get_Element (Cont : Container; Position : Cursor) return Element_Type;
This aspect is used in the GNAT-defined formal container packages.
@node Aspect Linker_Section,Aspect Lock_Free,Aspect Iterable,Implementation Defined Aspects
-@anchor{gnat_rm/implementation_defined_aspects aspect-linker-section}@anchor{fe}
+@anchor{gnat_rm/implementation_defined_aspects aspect-linker-section}@anchor{ff}
@section Aspect Linker_Section
@@ -8889,7 +8915,7 @@ This aspect is used in the GNAT-defined formal container packages.
This aspect is equivalent to an @cite{Linker_Section} pragma.
@node Aspect Lock_Free,Aspect No_Elaboration_Code_All,Aspect Linker_Section,Implementation Defined Aspects
-@anchor{gnat_rm/implementation_defined_aspects aspect-lock-free}@anchor{ff}
+@anchor{gnat_rm/implementation_defined_aspects aspect-lock-free}@anchor{100}
@section Aspect Lock_Free
@@ -8898,7 +8924,7 @@ This aspect is equivalent to an @cite{Linker_Section} pragma.
This boolean aspect is equivalent to pragma @cite{Lock_Free}.
@node Aspect No_Elaboration_Code_All,Aspect No_Tagged_Streams,Aspect Lock_Free,Implementation Defined Aspects
-@anchor{gnat_rm/implementation_defined_aspects aspect-no-elaboration-code-all}@anchor{100}
+@anchor{gnat_rm/implementation_defined_aspects aspect-no-elaboration-code-all}@anchor{101}
@section Aspect No_Elaboration_Code_All
@@ -8908,7 +8934,7 @@ This aspect is equivalent to a @cite{pragma No_Elaboration_Code_All}
statement for a program unit.
@node Aspect No_Tagged_Streams,Aspect Object_Size,Aspect No_Elaboration_Code_All,Implementation Defined Aspects
-@anchor{gnat_rm/implementation_defined_aspects aspect-no-tagged-streams}@anchor{101}
+@anchor{gnat_rm/implementation_defined_aspects aspect-no-tagged-streams}@anchor{102}
@section Aspect No_Tagged_Streams
@@ -8919,7 +8945,7 @@ argument specifying a root tagged type (thus this aspect can only be
applied to such a type).
@node Aspect Object_Size,Aspect Obsolescent,Aspect No_Tagged_Streams,Implementation Defined Aspects
-@anchor{gnat_rm/implementation_defined_aspects aspect-object-size}@anchor{102}
+@anchor{gnat_rm/implementation_defined_aspects aspect-object-size}@anchor{103}
@section Aspect Object_Size
@@ -8929,7 +8955,7 @@ This aspect is equivalent to an @cite{Object_Size} attribute definition
clause.
@node Aspect Obsolescent,Aspect Part_Of,Aspect Object_Size,Implementation Defined Aspects
-@anchor{gnat_rm/implementation_defined_aspects aspect-obsolescent}@anchor{103}
+@anchor{gnat_rm/implementation_defined_aspects aspect-obsolescent}@anchor{104}
@section Aspect Obsolescent
@@ -8940,7 +8966,7 @@ evaluation of this aspect happens at the point of occurrence, it is not
delayed until the freeze point.
@node Aspect Part_Of,Aspect Persistent_BSS,Aspect Obsolescent,Implementation Defined Aspects
-@anchor{gnat_rm/implementation_defined_aspects aspect-part-of}@anchor{104}
+@anchor{gnat_rm/implementation_defined_aspects aspect-part-of}@anchor{105}
@section Aspect Part_Of
@@ -8949,7 +8975,7 @@ delayed until the freeze point.
This aspect is equivalent to pragma @cite{Part_Of}.
@node Aspect Persistent_BSS,Aspect Predicate,Aspect Part_Of,Implementation Defined Aspects
-@anchor{gnat_rm/implementation_defined_aspects aspect-persistent-bss}@anchor{105}
+@anchor{gnat_rm/implementation_defined_aspects aspect-persistent-bss}@anchor{106}
@section Aspect Persistent_BSS
@@ -8958,7 +8984,7 @@ This aspect is equivalent to pragma @cite{Part_Of}.
This boolean aspect is equivalent to pragma @cite{Persistent_BSS}.
@node Aspect Predicate,Aspect Pure_Function,Aspect Persistent_BSS,Implementation Defined Aspects
-@anchor{gnat_rm/implementation_defined_aspects aspect-predicate}@anchor{106}
+@anchor{gnat_rm/implementation_defined_aspects aspect-predicate}@anchor{107}
@section Aspect Predicate
@@ -8972,7 +8998,7 @@ expression. It is also separately controllable using pragma
@cite{Assertion_Policy}.
@node Aspect Pure_Function,Aspect Refined_Depends,Aspect Predicate,Implementation Defined Aspects
-@anchor{gnat_rm/implementation_defined_aspects aspect-pure-function}@anchor{107}
+@anchor{gnat_rm/implementation_defined_aspects aspect-pure-function}@anchor{108}
@section Aspect Pure_Function
@@ -8981,7 +9007,7 @@ expression. It is also separately controllable using pragma
This boolean aspect is equivalent to pragma @cite{Pure_Function}.
@node Aspect Refined_Depends,Aspect Refined_Global,Aspect Pure_Function,Implementation Defined Aspects
-@anchor{gnat_rm/implementation_defined_aspects aspect-refined-depends}@anchor{108}
+@anchor{gnat_rm/implementation_defined_aspects aspect-refined-depends}@anchor{109}
@section Aspect Refined_Depends
@@ -8990,7 +9016,7 @@ This boolean aspect is equivalent to pragma @cite{Pure_Function}.
This aspect is equivalent to pragma @cite{Refined_Depends}.
@node Aspect Refined_Global,Aspect Refined_Post,Aspect Refined_Depends,Implementation Defined Aspects
-@anchor{gnat_rm/implementation_defined_aspects aspect-refined-global}@anchor{109}
+@anchor{gnat_rm/implementation_defined_aspects aspect-refined-global}@anchor{10a}
@section Aspect Refined_Global
@@ -8999,7 +9025,7 @@ This aspect is equivalent to pragma @cite{Refined_Depends}.
This aspect is equivalent to pragma @cite{Refined_Global}.
@node Aspect Refined_Post,Aspect Refined_State,Aspect Refined_Global,Implementation Defined Aspects
-@anchor{gnat_rm/implementation_defined_aspects aspect-refined-post}@anchor{10a}
+@anchor{gnat_rm/implementation_defined_aspects aspect-refined-post}@anchor{10b}
@section Aspect Refined_Post
@@ -9008,7 +9034,7 @@ This aspect is equivalent to pragma @cite{Refined_Global}.
This aspect is equivalent to pragma @cite{Refined_Post}.
@node Aspect Refined_State,Aspect Remote_Access_Type,Aspect Refined_Post,Implementation Defined Aspects
-@anchor{gnat_rm/implementation_defined_aspects aspect-refined-state}@anchor{10b}
+@anchor{gnat_rm/implementation_defined_aspects aspect-refined-state}@anchor{10c}
@section Aspect Refined_State
@@ -9017,7 +9043,7 @@ This aspect is equivalent to pragma @cite{Refined_Post}.
This aspect is equivalent to pragma @cite{Refined_State}.
@node Aspect Remote_Access_Type,Aspect Scalar_Storage_Order,Aspect Refined_State,Implementation Defined Aspects
-@anchor{gnat_rm/implementation_defined_aspects aspect-remote-access-type}@anchor{10c}
+@anchor{gnat_rm/implementation_defined_aspects aspect-remote-access-type}@anchor{10d}
@section Aspect Remote_Access_Type
@@ -9026,7 +9052,7 @@ This aspect is equivalent to pragma @cite{Refined_State}.
This aspect is equivalent to pragma @cite{Remote_Access_Type}.
@node Aspect Scalar_Storage_Order,Aspect Shared,Aspect Remote_Access_Type,Implementation Defined Aspects
-@anchor{gnat_rm/implementation_defined_aspects aspect-scalar-storage-order}@anchor{10d}
+@anchor{gnat_rm/implementation_defined_aspects aspect-scalar-storage-order}@anchor{10e}
@section Aspect Scalar_Storage_Order
@@ -9036,7 +9062,7 @@ This aspect is equivalent to a @cite{Scalar_Storage_Order}
attribute definition clause.
@node Aspect Shared,Aspect Simple_Storage_Pool,Aspect Scalar_Storage_Order,Implementation Defined Aspects
-@anchor{gnat_rm/implementation_defined_aspects aspect-shared}@anchor{10e}
+@anchor{gnat_rm/implementation_defined_aspects aspect-shared}@anchor{10f}
@section Aspect Shared
@@ -9046,7 +9072,7 @@ This boolean aspect is equivalent to pragma @cite{Shared},
and is thus a synonym for aspect @cite{Atomic}.
@node Aspect Simple_Storage_Pool,Aspect Simple_Storage_Pool_Type,Aspect Shared,Implementation Defined Aspects
-@anchor{gnat_rm/implementation_defined_aspects aspect-simple-storage-pool}@anchor{10f}
+@anchor{gnat_rm/implementation_defined_aspects aspect-simple-storage-pool}@anchor{110}
@section Aspect Simple_Storage_Pool
@@ -9056,7 +9082,7 @@ This aspect is equivalent to a @cite{Simple_Storage_Pool}
attribute definition clause.
@node Aspect Simple_Storage_Pool_Type,Aspect SPARK_Mode,Aspect Simple_Storage_Pool,Implementation Defined Aspects
-@anchor{gnat_rm/implementation_defined_aspects aspect-simple-storage-pool-type}@anchor{110}
+@anchor{gnat_rm/implementation_defined_aspects aspect-simple-storage-pool-type}@anchor{111}
@section Aspect Simple_Storage_Pool_Type
@@ -9065,7 +9091,7 @@ attribute definition clause.
This boolean aspect is equivalent to pragma @cite{Simple_Storage_Pool_Type}.
@node Aspect SPARK_Mode,Aspect Suppress_Debug_Info,Aspect Simple_Storage_Pool_Type,Implementation Defined Aspects
-@anchor{gnat_rm/implementation_defined_aspects aspect-spark-mode}@anchor{111}
+@anchor{gnat_rm/implementation_defined_aspects aspect-spark-mode}@anchor{112}
@section Aspect SPARK_Mode
@@ -9076,7 +9102,7 @@ may be specified for either or both of the specification and body
of a subprogram or package.
@node Aspect Suppress_Debug_Info,Aspect Suppress_Initialization,Aspect SPARK_Mode,Implementation Defined Aspects
-@anchor{gnat_rm/implementation_defined_aspects aspect-suppress-debug-info}@anchor{112}
+@anchor{gnat_rm/implementation_defined_aspects aspect-suppress-debug-info}@anchor{113}
@section Aspect Suppress_Debug_Info
@@ -9085,7 +9111,7 @@ of a subprogram or package.
This boolean aspect is equivalent to pragma @cite{Suppress_Debug_Info}.
@node Aspect Suppress_Initialization,Aspect Test_Case,Aspect Suppress_Debug_Info,Implementation Defined Aspects
-@anchor{gnat_rm/implementation_defined_aspects aspect-suppress-initialization}@anchor{113}
+@anchor{gnat_rm/implementation_defined_aspects aspect-suppress-initialization}@anchor{114}
@section Aspect Suppress_Initialization
@@ -9094,7 +9120,7 @@ This boolean aspect is equivalent to pragma @cite{Suppress_Debug_Info}.
This boolean aspect is equivalent to pragma @cite{Suppress_Initialization}.
@node Aspect Test_Case,Aspect Thread_Local_Storage,Aspect Suppress_Initialization,Implementation Defined Aspects
-@anchor{gnat_rm/implementation_defined_aspects aspect-test-case}@anchor{114}
+@anchor{gnat_rm/implementation_defined_aspects aspect-test-case}@anchor{115}
@section Aspect Test_Case
@@ -9103,7 +9129,7 @@ This boolean aspect is equivalent to pragma @cite{Suppress_Initialization}.
This aspect is equivalent to pragma @cite{Test_Case}.
@node Aspect Thread_Local_Storage,Aspect Universal_Aliasing,Aspect Test_Case,Implementation Defined Aspects
-@anchor{gnat_rm/implementation_defined_aspects aspect-thread-local-storage}@anchor{115}
+@anchor{gnat_rm/implementation_defined_aspects aspect-thread-local-storage}@anchor{116}
@section Aspect Thread_Local_Storage
@@ -9112,7 +9138,7 @@ This aspect is equivalent to pragma @cite{Test_Case}.
This boolean aspect is equivalent to pragma @cite{Thread_Local_Storage}.
@node Aspect Universal_Aliasing,Aspect Universal_Data,Aspect Thread_Local_Storage,Implementation Defined Aspects
-@anchor{gnat_rm/implementation_defined_aspects aspect-universal-aliasing}@anchor{116}
+@anchor{gnat_rm/implementation_defined_aspects aspect-universal-aliasing}@anchor{117}
@section Aspect Universal_Aliasing
@@ -9121,7 +9147,7 @@ This boolean aspect is equivalent to pragma @cite{Thread_Local_Storage}.
This boolean aspect is equivalent to pragma @cite{Universal_Aliasing}.
@node Aspect Universal_Data,Aspect Unmodified,Aspect Universal_Aliasing,Implementation Defined Aspects
-@anchor{gnat_rm/implementation_defined_aspects aspect-universal-data}@anchor{117}
+@anchor{gnat_rm/implementation_defined_aspects aspect-universal-data}@anchor{118}
@section Aspect Universal_Data
@@ -9130,7 +9156,7 @@ This boolean aspect is equivalent to pragma @cite{Universal_Aliasing}.
This aspect is equivalent to pragma @cite{Universal_Data}.
@node Aspect Unmodified,Aspect Unreferenced,Aspect Universal_Data,Implementation Defined Aspects
-@anchor{gnat_rm/implementation_defined_aspects aspect-unmodified}@anchor{118}
+@anchor{gnat_rm/implementation_defined_aspects aspect-unmodified}@anchor{119}
@section Aspect Unmodified
@@ -9139,7 +9165,7 @@ This aspect is equivalent to pragma @cite{Universal_Data}.
This boolean aspect is equivalent to pragma @cite{Unmodified}.
@node Aspect Unreferenced,Aspect Unreferenced_Objects,Aspect Unmodified,Implementation Defined Aspects
-@anchor{gnat_rm/implementation_defined_aspects aspect-unreferenced}@anchor{119}
+@anchor{gnat_rm/implementation_defined_aspects aspect-unreferenced}@anchor{11a}
@section Aspect Unreferenced
@@ -9150,7 +9176,7 @@ in the case of formal parameters, it is not permitted to have aspects for
a formal parameter, so in this case the pragma form must be used.
@node Aspect Unreferenced_Objects,Aspect Value_Size,Aspect Unreferenced,Implementation Defined Aspects
-@anchor{gnat_rm/implementation_defined_aspects aspect-unreferenced-objects}@anchor{11a}
+@anchor{gnat_rm/implementation_defined_aspects aspect-unreferenced-objects}@anchor{11b}
@section Aspect Unreferenced_Objects
@@ -9159,7 +9185,7 @@ a formal parameter, so in this case the pragma form must be used.
This boolean aspect is equivalent to pragma @cite{Unreferenced_Objects}.
@node Aspect Value_Size,Aspect Volatile_Full_Access,Aspect Unreferenced_Objects,Implementation Defined Aspects
-@anchor{gnat_rm/implementation_defined_aspects aspect-value-size}@anchor{11b}
+@anchor{gnat_rm/implementation_defined_aspects aspect-value-size}@anchor{11c}
@section Aspect Value_Size
@@ -9169,7 +9195,7 @@ This aspect is equivalent to a @cite{Value_Size}
attribute definition clause.
@node Aspect Volatile_Full_Access,Aspect Volatile_Function,Aspect Value_Size,Implementation Defined Aspects
-@anchor{gnat_rm/implementation_defined_aspects aspect-volatile-full-access}@anchor{11c}
+@anchor{gnat_rm/implementation_defined_aspects aspect-volatile-full-access}@anchor{11d}
@section Aspect Volatile_Full_Access
@@ -9178,7 +9204,7 @@ attribute definition clause.
This boolean aspect is equivalent to pragma @cite{Volatile_Full_Access}.
@node Aspect Volatile_Function,Aspect Warnings,Aspect Volatile_Full_Access,Implementation Defined Aspects
-@anchor{gnat_rm/implementation_defined_aspects aspect-volatile-function}@anchor{11d}
+@anchor{gnat_rm/implementation_defined_aspects aspect-volatile-function}@anchor{11e}
@section Aspect Volatile_Function
@@ -9187,7 +9213,7 @@ This boolean aspect is equivalent to pragma @cite{Volatile_Full_Access}.
This boolean aspect is equivalent to pragma @cite{Volatile_Function}.
@node Aspect Warnings,,Aspect Volatile_Function,Implementation Defined Aspects
-@anchor{gnat_rm/implementation_defined_aspects aspect-warnings}@anchor{11e}
+@anchor{gnat_rm/implementation_defined_aspects aspect-warnings}@anchor{11f}
@section Aspect Warnings
@@ -9198,7 +9224,7 @@ where the first argument is @cite{ON} or @cite{OFF} and the second argument
is the entity.
@node Implementation Defined Attributes,Standard and Implementation Defined Restrictions,Implementation Defined Aspects,Top
-@anchor{gnat_rm/implementation_defined_attributes doc}@anchor{11f}@anchor{gnat_rm/implementation_defined_attributes implementation-defined-attributes}@anchor{8}@anchor{gnat_rm/implementation_defined_attributes id1}@anchor{120}
+@anchor{gnat_rm/implementation_defined_attributes doc}@anchor{120}@anchor{gnat_rm/implementation_defined_attributes implementation-defined-attributes}@anchor{8}@anchor{gnat_rm/implementation_defined_attributes id1}@anchor{121}
@chapter Implementation Defined Attributes
@@ -9298,7 +9324,7 @@ consideration, you should minimize the use of these attributes.
@end menu
@node Attribute Abort_Signal,Attribute Address_Size,,Implementation Defined Attributes
-@anchor{gnat_rm/implementation_defined_attributes attribute-abort-signal}@anchor{121}
+@anchor{gnat_rm/implementation_defined_attributes attribute-abort-signal}@anchor{122}
@section Attribute Abort_Signal
@@ -9312,7 +9338,7 @@ completely outside the normal semantics of Ada, for a user program to
intercept the abort exception).
@node Attribute Address_Size,Attribute Asm_Input,Attribute Abort_Signal,Implementation Defined Attributes
-@anchor{gnat_rm/implementation_defined_attributes attribute-address-size}@anchor{122}
+@anchor{gnat_rm/implementation_defined_attributes attribute-address-size}@anchor{123}
@section Attribute Address_Size
@@ -9328,7 +9354,7 @@ reference to System.Address'Size is nonstatic because Address
is a private type.
@node Attribute Asm_Input,Attribute Asm_Output,Attribute Address_Size,Implementation Defined Attributes
-@anchor{gnat_rm/implementation_defined_attributes attribute-asm-input}@anchor{123}
+@anchor{gnat_rm/implementation_defined_attributes attribute-asm-input}@anchor{124}
@section Attribute Asm_Input
@@ -9342,10 +9368,10 @@ to be a static expression, and is the constraint for the parameter,
value to be used as the input argument. The possible values for the
constant are the same as those used in the RTL, and are dependent on
the configuration file used to built the GCC back end.
-@ref{124,,Machine Code Insertions}
+@ref{125,,Machine Code Insertions}
@node Attribute Asm_Output,Attribute Atomic_Always_Lock_Free,Attribute Asm_Input,Implementation Defined Attributes
-@anchor{gnat_rm/implementation_defined_attributes attribute-asm-output}@anchor{125}
+@anchor{gnat_rm/implementation_defined_attributes attribute-asm-output}@anchor{126}
@section Attribute Asm_Output
@@ -9361,10 +9387,10 @@ result. The possible values for constraint are the same as those used in
the RTL, and are dependent on the configuration file used to build the
GCC back end. If there are no output operands, then this argument may
either be omitted, or explicitly given as @cite{No_Output_Operands}.
-@ref{124,,Machine Code Insertions}
+@ref{125,,Machine Code Insertions}
@node Attribute Atomic_Always_Lock_Free,Attribute Bit,Attribute Asm_Output,Implementation Defined Attributes
-@anchor{gnat_rm/implementation_defined_attributes attribute-atomic-always-lock-free}@anchor{126}
+@anchor{gnat_rm/implementation_defined_attributes attribute-atomic-always-lock-free}@anchor{127}
@section Attribute Atomic_Always_Lock_Free
@@ -9376,7 +9402,7 @@ and False otherwise. The result indicate whether atomic operations are
supported by the target for the given type.
@node Attribute Bit,Attribute Bit_Position,Attribute Atomic_Always_Lock_Free,Implementation Defined Attributes
-@anchor{gnat_rm/implementation_defined_attributes attribute-bit}@anchor{127}
+@anchor{gnat_rm/implementation_defined_attributes attribute-bit}@anchor{128}
@section Attribute Bit
@@ -9407,7 +9433,7 @@ This attribute is designed to be compatible with the DEC Ada 83 definition
and implementation of the @cite{Bit} attribute.
@node Attribute Bit_Position,Attribute Code_Address,Attribute Bit,Implementation Defined Attributes
-@anchor{gnat_rm/implementation_defined_attributes attribute-bit-position}@anchor{128}
+@anchor{gnat_rm/implementation_defined_attributes attribute-bit-position}@anchor{129}
@section Attribute Bit_Position
@@ -9422,7 +9448,7 @@ type @cite{Universal_Integer}. The value depends only on the field
the containing record @cite{R}.
@node Attribute Code_Address,Attribute Compiler_Version,Attribute Bit_Position,Implementation Defined Attributes
-@anchor{gnat_rm/implementation_defined_attributes attribute-code-address}@anchor{129}
+@anchor{gnat_rm/implementation_defined_attributes attribute-code-address}@anchor{12a}
@section Attribute Code_Address
@@ -9465,7 +9491,7 @@ the same value as is returned by the corresponding @cite{'Address}
attribute.
@node Attribute Compiler_Version,Attribute Constrained,Attribute Code_Address,Implementation Defined Attributes
-@anchor{gnat_rm/implementation_defined_attributes attribute-compiler-version}@anchor{12a}
+@anchor{gnat_rm/implementation_defined_attributes attribute-compiler-version}@anchor{12b}
@section Attribute Compiler_Version
@@ -9476,7 +9502,7 @@ prefix) yields a static string identifying the version of the compiler
being used to compile the unit containing the attribute reference.
@node Attribute Constrained,Attribute Default_Bit_Order,Attribute Compiler_Version,Implementation Defined Attributes
-@anchor{gnat_rm/implementation_defined_attributes attribute-constrained}@anchor{12b}
+@anchor{gnat_rm/implementation_defined_attributes attribute-constrained}@anchor{12c}
@section Attribute Constrained
@@ -9491,7 +9517,7 @@ record type without discriminants is always @cite{True}. This usage is
compatible with older Ada compilers, including notably DEC Ada.
@node Attribute Default_Bit_Order,Attribute Default_Scalar_Storage_Order,Attribute Constrained,Implementation Defined Attributes
-@anchor{gnat_rm/implementation_defined_attributes attribute-default-bit-order}@anchor{12c}
+@anchor{gnat_rm/implementation_defined_attributes attribute-default-bit-order}@anchor{12d}
@section Attribute Default_Bit_Order
@@ -9508,7 +9534,7 @@ as a @cite{Pos} value (0 for @cite{High_Order_First}, 1 for
@cite{Default_Bit_Order} in package @cite{System}.
@node Attribute Default_Scalar_Storage_Order,Attribute Deref,Attribute Default_Bit_Order,Implementation Defined Attributes
-@anchor{gnat_rm/implementation_defined_attributes attribute-default-scalar-storage-order}@anchor{12d}
+@anchor{gnat_rm/implementation_defined_attributes attribute-default-scalar-storage-order}@anchor{12e}
@section Attribute Default_Scalar_Storage_Order
@@ -9525,7 +9551,7 @@ equal to @cite{Default_Bit_Order} if unspecified) as a
@cite{System.Bit_Order} value. This is a static attribute.
@node Attribute Deref,Attribute Descriptor_Size,Attribute Default_Scalar_Storage_Order,Implementation Defined Attributes
-@anchor{gnat_rm/implementation_defined_attributes attribute-deref}@anchor{12e}
+@anchor{gnat_rm/implementation_defined_attributes attribute-deref}@anchor{12f}
@section Attribute Deref
@@ -9538,7 +9564,7 @@ a named access-to-@cite{typ} type, except that it yields a variable, so it can b
used on the left side of an assignment.
@node Attribute Descriptor_Size,Attribute Elaborated,Attribute Deref,Implementation Defined Attributes
-@anchor{gnat_rm/implementation_defined_attributes attribute-descriptor-size}@anchor{12f}
+@anchor{gnat_rm/implementation_defined_attributes attribute-descriptor-size}@anchor{130}
@section Attribute Descriptor_Size
@@ -9565,7 +9591,7 @@ In the example above, the descriptor contains two values of type
a size of 31 bits and an alignment of 4, the descriptor size is @cite{2 * Positive'Size + 2} or 64 bits.
@node Attribute Elaborated,Attribute Elab_Body,Attribute Descriptor_Size,Implementation Defined Attributes
-@anchor{gnat_rm/implementation_defined_attributes attribute-elaborated}@anchor{130}
+@anchor{gnat_rm/implementation_defined_attributes attribute-elaborated}@anchor{131}
@section Attribute Elaborated
@@ -9580,7 +9606,7 @@ units has been completed. An exception is for units which need no
elaboration, the value is always False for such units.
@node Attribute Elab_Body,Attribute Elab_Spec,Attribute Elaborated,Implementation Defined Attributes
-@anchor{gnat_rm/implementation_defined_attributes attribute-elab-body}@anchor{131}
+@anchor{gnat_rm/implementation_defined_attributes attribute-elab-body}@anchor{132}
@section Attribute Elab_Body
@@ -9596,7 +9622,7 @@ e.g., if it is necessary to do selective re-elaboration to fix some
error.
@node Attribute Elab_Spec,Attribute Elab_Subp_Body,Attribute Elab_Body,Implementation Defined Attributes
-@anchor{gnat_rm/implementation_defined_attributes attribute-elab-spec}@anchor{132}
+@anchor{gnat_rm/implementation_defined_attributes attribute-elab-spec}@anchor{133}
@section Attribute Elab_Spec
@@ -9612,7 +9638,7 @@ Ada code, e.g., if it is necessary to do selective re-elaboration to fix
some error.
@node Attribute Elab_Subp_Body,Attribute Emax,Attribute Elab_Spec,Implementation Defined Attributes
-@anchor{gnat_rm/implementation_defined_attributes attribute-elab-subp-body}@anchor{133}
+@anchor{gnat_rm/implementation_defined_attributes attribute-elab-subp-body}@anchor{134}
@section Attribute Elab_Subp_Body
@@ -9626,7 +9652,7 @@ elaboration procedure by the binder in CodePeer mode only and is unrecognized
otherwise.
@node Attribute Emax,Attribute Enabled,Attribute Elab_Subp_Body,Implementation Defined Attributes
-@anchor{gnat_rm/implementation_defined_attributes attribute-emax}@anchor{134}
+@anchor{gnat_rm/implementation_defined_attributes attribute-emax}@anchor{135}
@section Attribute Emax
@@ -9639,7 +9665,7 @@ the Ada 83 reference manual for an exact description of the semantics of
this attribute.
@node Attribute Enabled,Attribute Enum_Rep,Attribute Emax,Implementation Defined Attributes
-@anchor{gnat_rm/implementation_defined_attributes attribute-enabled}@anchor{135}
+@anchor{gnat_rm/implementation_defined_attributes attribute-enabled}@anchor{136}
@section Attribute Enabled
@@ -9663,7 +9689,7 @@ a @cite{pragma Suppress} or @cite{pragma Unsuppress} before instantiating
the package or subprogram, controlling whether the check will be present.
@node Attribute Enum_Rep,Attribute Enum_Val,Attribute Enabled,Implementation Defined Attributes
-@anchor{gnat_rm/implementation_defined_attributes attribute-enum-rep}@anchor{136}
+@anchor{gnat_rm/implementation_defined_attributes attribute-enum-rep}@anchor{137}
@section Attribute Enum_Rep
@@ -9700,7 +9726,7 @@ integer calculation is done at run time, then the call to @cite{Enum_Rep}
may raise @cite{Constraint_Error}.
@node Attribute Enum_Val,Attribute Epsilon,Attribute Enum_Rep,Implementation Defined Attributes
-@anchor{gnat_rm/implementation_defined_attributes attribute-enum-val}@anchor{137}
+@anchor{gnat_rm/implementation_defined_attributes attribute-enum-val}@anchor{138}
@section Attribute Enum_Val
@@ -9723,7 +9749,7 @@ absence of an enumeration representation clause. This is a static
attribute (i.e., the result is static if the argument is static).
@node Attribute Epsilon,Attribute Fast_Math,Attribute Enum_Val,Implementation Defined Attributes
-@anchor{gnat_rm/implementation_defined_attributes attribute-epsilon}@anchor{138}
+@anchor{gnat_rm/implementation_defined_attributes attribute-epsilon}@anchor{139}
@section Attribute Epsilon
@@ -9736,7 +9762,7 @@ the Ada 83 reference manual for an exact description of the semantics of
this attribute.
@node Attribute Fast_Math,Attribute Fixed_Value,Attribute Epsilon,Implementation Defined Attributes
-@anchor{gnat_rm/implementation_defined_attributes attribute-fast-math}@anchor{139}
+@anchor{gnat_rm/implementation_defined_attributes attribute-fast-math}@anchor{13a}
@section Attribute Fast_Math
@@ -9747,7 +9773,7 @@ prefix) yields a static Boolean value that is True if pragma
@cite{Fast_Math} is active, and False otherwise.
@node Attribute Fixed_Value,Attribute From_Any,Attribute Fast_Math,Implementation Defined Attributes
-@anchor{gnat_rm/implementation_defined_attributes attribute-fixed-value}@anchor{13a}
+@anchor{gnat_rm/implementation_defined_attributes attribute-fixed-value}@anchor{13b}
@section Attribute Fixed_Value
@@ -9774,7 +9800,7 @@ This attribute is primarily intended for use in implementation of the
input-output functions for fixed-point values.
@node Attribute From_Any,Attribute Has_Access_Values,Attribute Fixed_Value,Implementation Defined Attributes
-@anchor{gnat_rm/implementation_defined_attributes attribute-from-any}@anchor{13b}
+@anchor{gnat_rm/implementation_defined_attributes attribute-from-any}@anchor{13c}
@section Attribute From_Any
@@ -9784,7 +9810,7 @@ This internal attribute is used for the generation of remote subprogram
stubs in the context of the Distributed Systems Annex.
@node Attribute Has_Access_Values,Attribute Has_Discriminants,Attribute From_Any,Implementation Defined Attributes
-@anchor{gnat_rm/implementation_defined_attributes attribute-has-access-values}@anchor{13c}
+@anchor{gnat_rm/implementation_defined_attributes attribute-has-access-values}@anchor{13d}
@section Attribute Has_Access_Values
@@ -9802,7 +9828,7 @@ definitions. If the attribute is applied to a generic private type, it
indicates whether or not the corresponding actual type has access values.
@node Attribute Has_Discriminants,Attribute Img,Attribute Has_Access_Values,Implementation Defined Attributes
-@anchor{gnat_rm/implementation_defined_attributes attribute-has-discriminants}@anchor{13d}
+@anchor{gnat_rm/implementation_defined_attributes attribute-has-discriminants}@anchor{13e}
@section Attribute Has_Discriminants
@@ -9818,7 +9844,7 @@ definitions. If the attribute is applied to a generic private type, it
indicates whether or not the corresponding actual type has discriminants.
@node Attribute Img,Attribute Integer_Value,Attribute Has_Discriminants,Implementation Defined Attributes
-@anchor{gnat_rm/implementation_defined_attributes attribute-img}@anchor{13e}
+@anchor{gnat_rm/implementation_defined_attributes attribute-img}@anchor{13f}
@section Attribute Img
@@ -9848,7 +9874,7 @@ that returns the appropriate string when called. This means that
in an instantiation as a function parameter.
@node Attribute Integer_Value,Attribute Invalid_Value,Attribute Img,Implementation Defined Attributes
-@anchor{gnat_rm/implementation_defined_attributes attribute-integer-value}@anchor{13f}
+@anchor{gnat_rm/implementation_defined_attributes attribute-integer-value}@anchor{140}
@section Attribute Integer_Value
@@ -9876,7 +9902,7 @@ This attribute is primarily intended for use in implementation of the
standard input-output functions for fixed-point values.
@node Attribute Invalid_Value,Attribute Iterable,Attribute Integer_Value,Implementation Defined Attributes
-@anchor{gnat_rm/implementation_defined_attributes attribute-invalid-value}@anchor{140}
+@anchor{gnat_rm/implementation_defined_attributes attribute-invalid-value}@anchor{141}
@section Attribute Invalid_Value
@@ -9890,7 +9916,7 @@ including the ability to modify the value with the binder -Sxx flag and
relevant environment variables at run time.
@node Attribute Iterable,Attribute Large,Attribute Invalid_Value,Implementation Defined Attributes
-@anchor{gnat_rm/implementation_defined_attributes attribute-iterable}@anchor{141}
+@anchor{gnat_rm/implementation_defined_attributes attribute-iterable}@anchor{142}
@section Attribute Iterable
@@ -9899,7 +9925,7 @@ relevant environment variables at run time.
Equivalent to Aspect Iterable.
@node Attribute Large,Attribute Library_Level,Attribute Iterable,Implementation Defined Attributes
-@anchor{gnat_rm/implementation_defined_attributes attribute-large}@anchor{142}
+@anchor{gnat_rm/implementation_defined_attributes attribute-large}@anchor{143}
@section Attribute Large
@@ -9912,7 +9938,7 @@ the Ada 83 reference manual for an exact description of the semantics of
this attribute.
@node Attribute Library_Level,Attribute Lock_Free,Attribute Large,Implementation Defined Attributes
-@anchor{gnat_rm/implementation_defined_attributes attribute-library-level}@anchor{143}
+@anchor{gnat_rm/implementation_defined_attributes attribute-library-level}@anchor{144}
@section Attribute Library_Level
@@ -9938,7 +9964,7 @@ end Gen;
@end example
@node Attribute Lock_Free,Attribute Loop_Entry,Attribute Library_Level,Implementation Defined Attributes
-@anchor{gnat_rm/implementation_defined_attributes attribute-lock-free}@anchor{144}
+@anchor{gnat_rm/implementation_defined_attributes attribute-lock-free}@anchor{145}
@section Attribute Lock_Free
@@ -9948,7 +9974,7 @@ end Gen;
pragma @cite{Lock_Free} applies to P.
@node Attribute Loop_Entry,Attribute Machine_Size,Attribute Lock_Free,Implementation Defined Attributes
-@anchor{gnat_rm/implementation_defined_attributes attribute-loop-entry}@anchor{145}
+@anchor{gnat_rm/implementation_defined_attributes attribute-loop-entry}@anchor{146}
@section Attribute Loop_Entry
@@ -9978,7 +10004,7 @@ entry. This copy is not performed if the loop is not entered, or if the
corresponding pragmas are ignored or disabled.
@node Attribute Machine_Size,Attribute Mantissa,Attribute Loop_Entry,Implementation Defined Attributes
-@anchor{gnat_rm/implementation_defined_attributes attribute-machine-size}@anchor{146}
+@anchor{gnat_rm/implementation_defined_attributes attribute-machine-size}@anchor{147}
@section Attribute Machine_Size
@@ -9988,7 +10014,7 @@ This attribute is identical to the @cite{Object_Size} attribute. It is
provided for compatibility with the DEC Ada 83 attribute of this name.
@node Attribute Mantissa,Attribute Maximum_Alignment,Attribute Machine_Size,Implementation Defined Attributes
-@anchor{gnat_rm/implementation_defined_attributes attribute-mantissa}@anchor{147}
+@anchor{gnat_rm/implementation_defined_attributes attribute-mantissa}@anchor{148}
@section Attribute Mantissa
@@ -10001,7 +10027,7 @@ the Ada 83 reference manual for an exact description of the semantics of
this attribute.
@node Attribute Maximum_Alignment,Attribute Mechanism_Code,Attribute Mantissa,Implementation Defined Attributes
-@anchor{gnat_rm/implementation_defined_attributes attribute-maximum-alignment}@anchor{148}@anchor{gnat_rm/implementation_defined_attributes id2}@anchor{149}
+@anchor{gnat_rm/implementation_defined_attributes attribute-maximum-alignment}@anchor{149}@anchor{gnat_rm/implementation_defined_attributes id2}@anchor{14a}
@section Attribute Maximum_Alignment
@@ -10017,7 +10043,7 @@ for an object, guaranteeing that it is properly aligned in all
cases.
@node Attribute Mechanism_Code,Attribute Null_Parameter,Attribute Maximum_Alignment,Implementation Defined Attributes
-@anchor{gnat_rm/implementation_defined_attributes attribute-mechanism-code}@anchor{14a}
+@anchor{gnat_rm/implementation_defined_attributes attribute-mechanism-code}@anchor{14b}
@section Attribute Mechanism_Code
@@ -10048,7 +10074,7 @@ by reference
@end table
@node Attribute Null_Parameter,Attribute Object_Size,Attribute Mechanism_Code,Implementation Defined Attributes
-@anchor{gnat_rm/implementation_defined_attributes attribute-null-parameter}@anchor{14b}
+@anchor{gnat_rm/implementation_defined_attributes attribute-null-parameter}@anchor{14c}
@section Attribute Null_Parameter
@@ -10073,7 +10099,7 @@ There is no way of indicating this without the @cite{Null_Parameter}
attribute.
@node Attribute Object_Size,Attribute Old,Attribute Null_Parameter,Implementation Defined Attributes
-@anchor{gnat_rm/implementation_defined_attributes attribute-object-size}@anchor{14c}
+@anchor{gnat_rm/implementation_defined_attributes attribute-object-size}@anchor{14d}
@section Attribute Object_Size
@@ -10143,7 +10169,7 @@ Similar additional checks are performed in other contexts requiring
statically matching subtypes.
@node Attribute Old,Attribute Passed_By_Reference,Attribute Object_Size,Implementation Defined Attributes
-@anchor{gnat_rm/implementation_defined_attributes attribute-old}@anchor{14d}
+@anchor{gnat_rm/implementation_defined_attributes attribute-old}@anchor{14e}
@section Attribute Old
@@ -10158,7 +10184,7 @@ definition are allowed under control of
implementation defined pragma @cite{Unevaluated_Use_Of_Old}.
@node Attribute Passed_By_Reference,Attribute Pool_Address,Attribute Old,Implementation Defined Attributes
-@anchor{gnat_rm/implementation_defined_attributes attribute-passed-by-reference}@anchor{14e}
+@anchor{gnat_rm/implementation_defined_attributes attribute-passed-by-reference}@anchor{14f}
@section Attribute Passed_By_Reference
@@ -10174,7 +10200,7 @@ passed by copy in calls. For scalar types, the result is always @cite{False}
and is static. For non-scalar types, the result is nonstatic.
@node Attribute Pool_Address,Attribute Range_Length,Attribute Passed_By_Reference,Implementation Defined Attributes
-@anchor{gnat_rm/implementation_defined_attributes attribute-pool-address}@anchor{14f}
+@anchor{gnat_rm/implementation_defined_attributes attribute-pool-address}@anchor{150}
@section Attribute Pool_Address
@@ -10199,7 +10225,7 @@ For an object created by @cite{new}, @code{Ptr.all'Pool_Address} is
what is passed to @cite{Allocate} and returned from @cite{Deallocate}.
@node Attribute Range_Length,Attribute Restriction_Set,Attribute Pool_Address,Implementation Defined Attributes
-@anchor{gnat_rm/implementation_defined_attributes attribute-range-length}@anchor{150}
+@anchor{gnat_rm/implementation_defined_attributes attribute-range-length}@anchor{151}
@section Attribute Range_Length
@@ -10212,7 +10238,7 @@ applied to the index subtype of a one dimensional array always gives the
same result as @cite{Length} applied to the array itself.
@node Attribute Restriction_Set,Attribute Result,Attribute Range_Length,Implementation Defined Attributes
-@anchor{gnat_rm/implementation_defined_attributes attribute-restriction-set}@anchor{151}
+@anchor{gnat_rm/implementation_defined_attributes attribute-restriction-set}@anchor{152}
@section Attribute Restriction_Set
@@ -10282,7 +10308,7 @@ Restrictions pragma, they are not analyzed semantically,
so they do not have a type.
@node Attribute Result,Attribute Safe_Emax,Attribute Restriction_Set,Implementation Defined Attributes
-@anchor{gnat_rm/implementation_defined_attributes attribute-result}@anchor{152}
+@anchor{gnat_rm/implementation_defined_attributes attribute-result}@anchor{153}
@section Attribute Result
@@ -10295,7 +10321,7 @@ For a further discussion of the use of this attribute and examples of its use,
see the description of pragma Postcondition.
@node Attribute Safe_Emax,Attribute Safe_Large,Attribute Result,Implementation Defined Attributes
-@anchor{gnat_rm/implementation_defined_attributes attribute-safe-emax}@anchor{153}
+@anchor{gnat_rm/implementation_defined_attributes attribute-safe-emax}@anchor{154}
@section Attribute Safe_Emax
@@ -10308,7 +10334,7 @@ the Ada 83 reference manual for an exact description of the semantics of
this attribute.
@node Attribute Safe_Large,Attribute Safe_Small,Attribute Safe_Emax,Implementation Defined Attributes
-@anchor{gnat_rm/implementation_defined_attributes attribute-safe-large}@anchor{154}
+@anchor{gnat_rm/implementation_defined_attributes attribute-safe-large}@anchor{155}
@section Attribute Safe_Large
@@ -10321,7 +10347,7 @@ the Ada 83 reference manual for an exact description of the semantics of
this attribute.
@node Attribute Safe_Small,Attribute Scalar_Storage_Order,Attribute Safe_Large,Implementation Defined Attributes
-@anchor{gnat_rm/implementation_defined_attributes attribute-safe-small}@anchor{155}
+@anchor{gnat_rm/implementation_defined_attributes attribute-safe-small}@anchor{156}
@section Attribute Safe_Small
@@ -10334,7 +10360,7 @@ the Ada 83 reference manual for an exact description of the semantics of
this attribute.
@node Attribute Scalar_Storage_Order,Attribute Simple_Storage_Pool,Attribute Safe_Small,Implementation Defined Attributes
-@anchor{gnat_rm/implementation_defined_attributes attribute-scalar-storage-order}@anchor{156}
+@anchor{gnat_rm/implementation_defined_attributes attribute-scalar-storage-order}@anchor{157}
@section Attribute Scalar_Storage_Order
@@ -10451,7 +10477,7 @@ representation. It has no effect on the representation used by stream
attributes.
@node Attribute Simple_Storage_Pool,Attribute Small,Attribute Scalar_Storage_Order,Implementation Defined Attributes
-@anchor{gnat_rm/implementation_defined_attributes attribute-simple-storage-pool}@anchor{b8}@anchor{gnat_rm/implementation_defined_attributes id3}@anchor{157}
+@anchor{gnat_rm/implementation_defined_attributes attribute-simple-storage-pool}@anchor{b9}@anchor{gnat_rm/implementation_defined_attributes id3}@anchor{158}
@section Attribute Simple_Storage_Pool
@@ -10514,7 +10540,7 @@ as defined in section 13.11.2 of the Ada Reference Manual, except that the
term 'simple storage pool' is substituted for 'storage pool'.
@node Attribute Small,Attribute Storage_Unit,Attribute Simple_Storage_Pool,Implementation Defined Attributes
-@anchor{gnat_rm/implementation_defined_attributes attribute-small}@anchor{158}
+@anchor{gnat_rm/implementation_defined_attributes attribute-small}@anchor{159}
@section Attribute Small
@@ -10530,7 +10556,7 @@ the Ada 83 reference manual for an exact description of the semantics of
this attribute when applied to floating-point types.
@node Attribute Storage_Unit,Attribute Stub_Type,Attribute Small,Implementation Defined Attributes
-@anchor{gnat_rm/implementation_defined_attributes attribute-storage-unit}@anchor{159}
+@anchor{gnat_rm/implementation_defined_attributes attribute-storage-unit}@anchor{15a}
@section Attribute Storage_Unit
@@ -10540,7 +10566,7 @@ this attribute when applied to floating-point types.
prefix) provides the same value as @cite{System.Storage_Unit}.
@node Attribute Stub_Type,Attribute System_Allocator_Alignment,Attribute Storage_Unit,Implementation Defined Attributes
-@anchor{gnat_rm/implementation_defined_attributes attribute-stub-type}@anchor{15a}
+@anchor{gnat_rm/implementation_defined_attributes attribute-stub-type}@anchor{15b}
@section Attribute Stub_Type
@@ -10564,7 +10590,7 @@ unit @cite{System.Partition_Interface}. Use of this attribute will create
an implicit dependency on this unit.
@node Attribute System_Allocator_Alignment,Attribute Target_Name,Attribute Stub_Type,Implementation Defined Attributes
-@anchor{gnat_rm/implementation_defined_attributes attribute-system-allocator-alignment}@anchor{15b}
+@anchor{gnat_rm/implementation_defined_attributes attribute-system-allocator-alignment}@anchor{15c}
@section Attribute System_Allocator_Alignment
@@ -10581,7 +10607,7 @@ with alignment too large or to enable a realignment circuitry if the
alignment request is larger than this value.
@node Attribute Target_Name,Attribute To_Address,Attribute System_Allocator_Alignment,Implementation Defined Attributes
-@anchor{gnat_rm/implementation_defined_attributes attribute-target-name}@anchor{15c}
+@anchor{gnat_rm/implementation_defined_attributes attribute-target-name}@anchor{15d}
@section Attribute Target_Name
@@ -10594,7 +10620,7 @@ standard gcc target name without the terminating slash (for
example, GNAT 5.0 on windows yields "i586-pc-mingw32msv").
@node Attribute To_Address,Attribute To_Any,Attribute Target_Name,Implementation Defined Attributes
-@anchor{gnat_rm/implementation_defined_attributes attribute-to-address}@anchor{15d}
+@anchor{gnat_rm/implementation_defined_attributes attribute-to-address}@anchor{15e}
@section Attribute To_Address
@@ -10617,7 +10643,7 @@ modular manner (e.g., -1 means the same as 16#FFFF_FFFF# on
a 32 bits machine).
@node Attribute To_Any,Attribute Type_Class,Attribute To_Address,Implementation Defined Attributes
-@anchor{gnat_rm/implementation_defined_attributes attribute-to-any}@anchor{15e}
+@anchor{gnat_rm/implementation_defined_attributes attribute-to-any}@anchor{15f}
@section Attribute To_Any
@@ -10627,7 +10653,7 @@ This internal attribute is used for the generation of remote subprogram
stubs in the context of the Distributed Systems Annex.
@node Attribute Type_Class,Attribute Type_Key,Attribute To_Any,Implementation Defined Attributes
-@anchor{gnat_rm/implementation_defined_attributes attribute-type-class}@anchor{15f}
+@anchor{gnat_rm/implementation_defined_attributes attribute-type-class}@anchor{160}
@section Attribute Type_Class
@@ -10657,7 +10683,7 @@ applies to all concurrent types. This attribute is designed to
be compatible with the DEC Ada 83 attribute of the same name.
@node Attribute Type_Key,Attribute TypeCode,Attribute Type_Class,Implementation Defined Attributes
-@anchor{gnat_rm/implementation_defined_attributes attribute-type-key}@anchor{160}
+@anchor{gnat_rm/implementation_defined_attributes attribute-type-key}@anchor{161}
@section Attribute Type_Key
@@ -10669,7 +10695,7 @@ about the type or subtype. This provides improved compatibility with
other implementations that support this attribute.
@node Attribute TypeCode,Attribute Unconstrained_Array,Attribute Type_Key,Implementation Defined Attributes
-@anchor{gnat_rm/implementation_defined_attributes attribute-typecode}@anchor{161}
+@anchor{gnat_rm/implementation_defined_attributes attribute-typecode}@anchor{162}
@section Attribute TypeCode
@@ -10679,7 +10705,7 @@ This internal attribute is used for the generation of remote subprogram
stubs in the context of the Distributed Systems Annex.
@node Attribute Unconstrained_Array,Attribute Universal_Literal_String,Attribute TypeCode,Implementation Defined Attributes
-@anchor{gnat_rm/implementation_defined_attributes attribute-unconstrained-array}@anchor{162}
+@anchor{gnat_rm/implementation_defined_attributes attribute-unconstrained-array}@anchor{163}
@section Attribute Unconstrained_Array
@@ -10693,7 +10719,7 @@ still static, and yields the result of applying this test to the
generic actual.
@node Attribute Universal_Literal_String,Attribute Unrestricted_Access,Attribute Unconstrained_Array,Implementation Defined Attributes
-@anchor{gnat_rm/implementation_defined_attributes attribute-universal-literal-string}@anchor{163}
+@anchor{gnat_rm/implementation_defined_attributes attribute-universal-literal-string}@anchor{164}
@section Attribute Universal_Literal_String
@@ -10721,7 +10747,7 @@ end;
@end example
@node Attribute Unrestricted_Access,Attribute Update,Attribute Universal_Literal_String,Implementation Defined Attributes
-@anchor{gnat_rm/implementation_defined_attributes attribute-unrestricted-access}@anchor{164}
+@anchor{gnat_rm/implementation_defined_attributes attribute-unrestricted-access}@anchor{165}
@section Attribute Unrestricted_Access
@@ -10908,7 +10934,7 @@ In general this is a risky approach. It may appear to "work" but such uses of
of @cite{GNAT} to another, so are best avoided if possible.
@node Attribute Update,Attribute Valid_Scalars,Attribute Unrestricted_Access,Implementation Defined Attributes
-@anchor{gnat_rm/implementation_defined_attributes attribute-update}@anchor{165}
+@anchor{gnat_rm/implementation_defined_attributes attribute-update}@anchor{166}
@section Attribute Update
@@ -10989,7 +11015,7 @@ 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{166}
+@anchor{gnat_rm/implementation_defined_attributes attribute-valid-scalars}@anchor{167}
@section Attribute Valid_Scalars
@@ -11024,7 +11050,7 @@ to 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{167}
+@anchor{gnat_rm/implementation_defined_attributes attribute-vads-size}@anchor{168}
@section Attribute VADS_Size
@@ -11044,7 +11070,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 attribute-value-size}@anchor{168}
+@anchor{gnat_rm/implementation_defined_attributes attribute-value-size}@anchor{169}
@section Attribute Value_Size
@@ -11058,7 +11084,7 @@ a value of the given subtype. It is the same as @code{type'Size},
but, unlike @cite{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{169}
+@anchor{gnat_rm/implementation_defined_attributes attribute-wchar-t-size}@anchor{16a}
@section Attribute Wchar_T_Size
@@ -11070,7 +11096,7 @@ primarily for constructing the definition of this type in
package @cite{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{16a}
+@anchor{gnat_rm/implementation_defined_attributes attribute-word-size}@anchor{16b}
@section Attribute Word_Size
@@ -11081,7 +11107,7 @@ prefix) provides the value @cite{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{16b}@anchor{gnat_rm/standard_and_implementation_defined_restrictions id1}@anchor{16c}
+@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{16c}@anchor{gnat_rm/standard_and_implementation_defined_restrictions id1}@anchor{16d}
@chapter Standard and Implementation Defined Restrictions
@@ -11110,7 +11136,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{16d}@anchor{gnat_rm/standard_and_implementation_defined_restrictions id2}@anchor{16e}
+@anchor{gnat_rm/standard_and_implementation_defined_restrictions partition-wide-restrictions}@anchor{16e}@anchor{gnat_rm/standard_and_implementation_defined_restrictions id2}@anchor{16f}
@section Partition-Wide Restrictions
@@ -11192,6 +11218,7 @@ then all compilation units in the partition must obey the restriction).
* No_Unchecked_Conversion::
* No_Unchecked_Deallocation::
* No_Use_Of_Entity::
+* Pure_Barriers::
* Simple_Barriers::
* Static_Priorities::
* Static_Storage_Size::
@@ -11199,7 +11226,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{16f}
+@anchor{gnat_rm/standard_and_implementation_defined_restrictions immediate-reclamation}@anchor{170}
@subsection Immediate_Reclamation
@@ -11211,7 +11238,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{170}
+@anchor{gnat_rm/standard_and_implementation_defined_restrictions max-asynchronous-select-nesting}@anchor{171}
@subsection Max_Asynchronous_Select_Nesting
@@ -11223,7 +11250,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{171}
+@anchor{gnat_rm/standard_and_implementation_defined_restrictions max-entry-queue-length}@anchor{172}
@subsection Max_Entry_Queue_Length
@@ -11244,7 +11271,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{172}
+@anchor{gnat_rm/standard_and_implementation_defined_restrictions max-protected-entries}@anchor{173}
@subsection Max_Protected_Entries
@@ -11255,7 +11282,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{173}
+@anchor{gnat_rm/standard_and_implementation_defined_restrictions max-select-alternatives}@anchor{174}
@subsection Max_Select_Alternatives
@@ -11264,7 +11291,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{174}
+@anchor{gnat_rm/standard_and_implementation_defined_restrictions max-storage-at-blocking}@anchor{175}
@subsection Max_Storage_At_Blocking
@@ -11275,7 +11302,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{175}
+@anchor{gnat_rm/standard_and_implementation_defined_restrictions max-task-entries}@anchor{176}
@subsection Max_Task_Entries
@@ -11288,7 +11315,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{176}
+@anchor{gnat_rm/standard_and_implementation_defined_restrictions max-tasks}@anchor{177}
@subsection Max_Tasks
@@ -11301,7 +11328,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{177}
+@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-abort-statements}@anchor{178}
@subsection No_Abort_Statements
@@ -11311,7 +11338,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{178}
+@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-access-parameter-allocators}@anchor{179}
@subsection No_Access_Parameter_Allocators
@@ -11322,7 +11349,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{179}
+@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-access-subprograms}@anchor{17a}
@subsection No_Access_Subprograms
@@ -11332,7 +11359,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{17a}
+@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-allocators}@anchor{17b}
@subsection No_Allocators
@@ -11342,7 +11369,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{17b}
+@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-anonymous-allocators}@anchor{17c}
@subsection No_Anonymous_Allocators
@@ -11352,7 +11379,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{17c}
+@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-asynchronous-control}@anchor{17d}
@subsection No_Asynchronous_Control
@@ -11362,7 +11389,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{17d}
+@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-calendar}@anchor{17e}
@subsection No_Calendar
@@ -11372,7 +11399,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{17e}
+@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-coextensions}@anchor{17f}
@subsection No_Coextensions
@@ -11382,7 +11409,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{17f}
+@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-default-initialization}@anchor{180}
@subsection No_Default_Initialization
@@ -11399,7 +11426,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{180}
+@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-delay}@anchor{181}
@subsection No_Delay
@@ -11409,7 +11436,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{181}
+@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-dependence}@anchor{182}
@subsection No_Dependence
@@ -11419,7 +11446,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{182}
+@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-direct-boolean-operators}@anchor{183}
@subsection No_Direct_Boolean_Operators
@@ -11432,7 +11459,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{183}
+@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-dispatch}@anchor{184}
@subsection No_Dispatch
@@ -11442,7 +11469,7 @@ composite boolean operations.
occurrences of @cite{T'Class}, for any (tagged) subtype @cite{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{184}
+@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-dispatching-calls}@anchor{185}
@subsection No_Dispatching_Calls
@@ -11503,7 +11530,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{185}
+@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-dynamic-attachment}@anchor{186}
@subsection No_Dynamic_Attachment
@@ -11522,7 +11549,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{186}
+@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-dynamic-priorities}@anchor{187}
@subsection No_Dynamic_Priorities
@@ -11531,7 +11558,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{187}
+@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-entry-calls-in-elaboration-code}@anchor{188}
@subsection No_Entry_Calls_In_Elaboration_Code
@@ -11543,7 +11570,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{188}
+@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-enumeration-maps}@anchor{189}
@subsection No_Enumeration_Maps
@@ -11554,7 +11581,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{189}
+@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-exception-handlers}@anchor{18a}
@subsection No_Exception_Handlers
@@ -11579,7 +11606,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{18a}
+@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-exception-propagation}@anchor{18b}
@subsection No_Exception_Propagation
@@ -11596,7 +11623,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{18b}
+@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-exception-registration}@anchor{18c}
@subsection No_Exception_Registration
@@ -11610,7 +11637,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{18c}
+@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-exceptions}@anchor{18d}
@subsection No_Exceptions
@@ -11620,7 +11647,7 @@ of exceptions when they are declared.
raise statements and no exception handlers.
@node No_Finalization,No_Fixed_Point,No_Exceptions,Partition-Wide Restrictions
-@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-finalization}@anchor{18d}
+@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-finalization}@anchor{18e}
@subsection No_Finalization
@@ -11661,7 +11688,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{18e}
+@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-fixed-point}@anchor{18f}
@subsection No_Fixed_Point
@@ -11671,7 +11698,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{18f}
+@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-floating-point}@anchor{190}
@subsection No_Floating_Point
@@ -11681,7 +11708,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{190}
+@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-implicit-conditionals}@anchor{191}
@subsection No_Implicit_Conditionals
@@ -11697,7 +11724,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{191}
+@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-implicit-dynamic-code}@anchor{192}
@subsection No_Implicit_Dynamic_Code
@@ -11727,7 +11754,7 @@ foreign-language convention; primitive operations of nested tagged
types.
@node No_Implicit_Heap_Allocations,No_Implicit_Loops,No_Implicit_Dynamic_Code,Partition-Wide Restrictions
-@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-implicit-heap-allocations}@anchor{192}
+@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-implicit-heap-allocations}@anchor{193}
@subsection No_Implicit_Heap_Allocations
@@ -11736,7 +11763,7 @@ types.
[RM D.7] No constructs are allowed to cause implicit heap allocation.
@node No_Implicit_Loops,No_Implicit_Protected_Object_Allocations,No_Implicit_Heap_Allocations,Partition-Wide Restrictions
-@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-implicit-loops}@anchor{193}
+@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-implicit-loops}@anchor{194}
@subsection No_Implicit_Loops
@@ -11753,26 +11780,26 @@ components. Otherwise, a loop is created for arrays larger than about 5000
scalar components.
@node No_Implicit_Protected_Object_Allocations,No_Implicit_Task_Allocations,No_Implicit_Loops,Partition-Wide Restrictions
-@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-implicit-protected-object-allocations}@anchor{194}
+@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-implicit-protected-object-allocations}@anchor{195}
@subsection No_Implicit_Protected_Object_Allocations
-@c index: No_Implicit_Protected_Object_Allocations
+@geindex No_Implicit_Protected_Object_Allocations
[GNAT] No constructs are allowed to cause implicit heap allocation of a
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{195}
+@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-implicit-task-allocations}@anchor{196}
@subsection No_Implicit_Task_Allocations
-@c index: No_Implicit_Task_Allocations
+@geindex No_Implicit_Task_Allocations
[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{196}
+@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-initialize-scalars}@anchor{197}
@subsection No_Initialize_Scalars
@@ -11784,7 +11811,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{197}
+@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-io}@anchor{198}
@subsection No_IO
@@ -11795,7 +11822,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{198}
+@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-local-allocators}@anchor{199}
@subsection No_Local_Allocators
@@ -11806,7 +11833,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{199}
+@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-local-protected-objects}@anchor{19a}
@subsection No_Local_Protected_Objects
@@ -11816,7 +11843,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{19a}
+@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-local-timing-events}@anchor{19b}
@subsection No_Local_Timing_Events
@@ -11826,7 +11853,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{19b}
+@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-long-long-integers}@anchor{19c}
@subsection No_Long_Long_Integers
@@ -11838,7 +11865,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{19c}
+@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-multiple-elaboration}@anchor{19d}
@subsection No_Multiple_Elaboration
@@ -11859,7 +11886,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{19d}
+@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-nested-finalization}@anchor{19e}
@subsection No_Nested_Finalization
@@ -11868,7 +11895,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{19e}
+@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-protected-type-allocators}@anchor{19f}
@subsection No_Protected_Type_Allocators
@@ -11878,7 +11905,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{19f}
+@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-protected-types}@anchor{1a0}
@subsection No_Protected_Types
@@ -11888,7 +11915,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{1a0}
+@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-recursion}@anchor{1a1}
@subsection No_Recursion
@@ -11898,7 +11925,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{1a1}
+@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-reentrancy}@anchor{1a2}
@subsection No_Reentrancy
@@ -11908,7 +11935,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{1a2}
+@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-relative-delay}@anchor{1a3}
@subsection No_Relative_Delay
@@ -11919,7 +11946,7 @@ relative statements and prevents expressions such as @cite{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{1a3}
+@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-requeue-statements}@anchor{1a4}
@subsection No_Requeue_Statements
@@ -11937,7 +11964,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{1a4}
+@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-secondary-stack}@anchor{1a5}
@subsection No_Secondary_Stack
@@ -11949,7 +11976,7 @@ stack is used to implement functions returning unconstrained objects
(arrays or records) on some targets.
@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{1a5}
+@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-select-statements}@anchor{1a6}
@subsection No_Select_Statements
@@ -11959,7 +11986,7 @@ stack is used to implement functions returning unconstrained objects
kind are permitted, that is the keyword @cite{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{1a6}
+@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-specific-termination-handlers}@anchor{1a7}
@subsection No_Specific_Termination_Handlers
@@ -11969,7 +11996,7 @@ kind are permitted, that is the keyword @cite{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{1a7}
+@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-specification-of-aspect}@anchor{1a8}
@subsection No_Specification_of_Aspect
@@ -11980,7 +12007,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{1a8}
+@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-standard-allocators-after-elaboration}@anchor{1a9}
@subsection No_Standard_Allocators_After_Elaboration
@@ -11992,7 +12019,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{1a9}
+@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-standard-storage-pools}@anchor{1aa}
@subsection No_Standard_Storage_Pools
@@ -12004,7 +12031,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{1aa}
+@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-stream-optimizations}@anchor{1ab}
@subsection No_Stream_Optimizations
@@ -12017,7 +12044,7 @@ due to their supperior 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{1ab}
+@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-streams}@anchor{1ac}
@subsection No_Streams
@@ -12038,7 +12065,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{1ac}
+@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-task-allocators}@anchor{1ad}
@subsection No_Task_Allocators
@@ -12048,7 +12075,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{1ad}
+@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-task-at-interrupt-priority}@anchor{1ae}
@subsection No_Task_At_Interrupt_Priority
@@ -12060,7 +12087,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{1ae}
+@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-task-attributes-package}@anchor{1af}
@subsection No_Task_Attributes_Package
@@ -12077,7 +12104,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{1af}
+@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-task-hierarchy}@anchor{1b0}
@subsection No_Task_Hierarchy
@@ -12087,7 +12114,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{1b0}
+@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-task-termination}@anchor{1b1}
@subsection No_Task_Termination
@@ -12096,7 +12123,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{1b1}
+@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-tasking}@anchor{1b2}
@subsection No_Tasking
@@ -12109,7 +12136,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{1b2}
+@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-terminate-alternatives}@anchor{1b3}
@subsection No_Terminate_Alternatives
@@ -12118,7 +12145,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{1b3}
+@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-unchecked-access}@anchor{1b4}
@subsection No_Unchecked_Access
@@ -12128,7 +12155,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{1b4}
+@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-unchecked-conversion}@anchor{1b5}
@subsection No_Unchecked_Conversion
@@ -12138,7 +12165,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{1b5}
+@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-unchecked-deallocation}@anchor{1b6}
@subsection No_Unchecked_Deallocation
@@ -12147,8 +12174,8 @@ dependences on the predefined generic function Unchecked_Conversion.
[RM J.13] This restriction ensures at compile time that there are no semantic
dependences on the predefined generic procedure Unchecked_Deallocation.
-@node No_Use_Of_Entity,Simple_Barriers,No_Unchecked_Deallocation,Partition-Wide Restrictions
-@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-use-of-entity}@anchor{1b6}
+@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{1b7}
@subsection No_Use_Of_Entity
@@ -12167,8 +12194,57 @@ where @code{Name} is the fully qualified entity, for example
No_Use_Of_Entity => Ada.Text_IO.Put_Line
@end example
-@node Simple_Barriers,Static_Priorities,No_Use_Of_Entity,Partition-Wide Restrictions
-@anchor{gnat_rm/standard_and_implementation_defined_restrictions simple-barriers}@anchor{1b7}
+@node Pure_Barriers,Simple_Barriers,No_Use_Of_Entity,Partition-Wide Restrictions
+@anchor{gnat_rm/standard_and_implementation_defined_restrictions pure-barriers}@anchor{1b8}
+@subsection Pure_Barriers
+
+
+@geindex Pure_Barriers
+
+[GNAT] This restriction ensures at compile time that protected entry
+barriers are restricted to:
+
+
+@itemize *
+
+@item
+simple boolean variables defined in the private part of the
+protected type/object,
+
+@item
+constant declarations,
+
+@item
+named numbers,
+
+@item
+enumeration literals,
+
+@item
+integer literals,
+
+@item
+real literals,
+
+@item
+character literals,
+
+@item
+implicitly defined comparison operators,
+
+@item
+uses of the Standard."not" operator,
+
+@item
+short-circuit operator
+@end itemize
+
+This restriction is a relaxation of the Simple_Barriers restriction,
+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{1b9}
@subsection Simple_Barriers
@@ -12187,7 +12263,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{1b8}
+@anchor{gnat_rm/standard_and_implementation_defined_restrictions static-priorities}@anchor{1ba}
@subsection Static_Priorities
@@ -12198,7 +12274,7 @@ are static, and that there are no dependences on the package
@cite{Ada.Dynamic_Priorities}.
@node Static_Storage_Size,,Static_Priorities,Partition-Wide Restrictions
-@anchor{gnat_rm/standard_and_implementation_defined_restrictions static-storage-size}@anchor{1b9}
+@anchor{gnat_rm/standard_and_implementation_defined_restrictions static-storage-size}@anchor{1bb}
@subsection Static_Storage_Size
@@ -12208,7 +12284,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{1ba}@anchor{gnat_rm/standard_and_implementation_defined_restrictions id3}@anchor{1bb}
+@anchor{gnat_rm/standard_and_implementation_defined_restrictions program-unit-level-restrictions}@anchor{1bc}@anchor{gnat_rm/standard_and_implementation_defined_restrictions id3}@anchor{1bd}
@section Program Unit Level Restrictions
@@ -12220,6 +12296,7 @@ other compilation units in the partition.
@menu
* No_Elaboration_Code::
+* No_Dynamic_Sized_Objects::
* No_Entry_Queue::
* No_Implementation_Aspect_Specifications::
* No_Implementation_Attributes::
@@ -12234,8 +12311,8 @@ other compilation units in the partition.
@end menu
-@node No_Elaboration_Code,No_Entry_Queue,,Program Unit Level Restrictions
-@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-elaboration-code}@anchor{1bc}
+@node No_Elaboration_Code,No_Dynamic_Sized_Objects,,Program Unit Level Restrictions
+@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-elaboration-code}@anchor{1be}
@subsection No_Elaboration_Code
@@ -12284,8 +12361,26 @@ Note that this the implementation of this restriction requires full
code generation. If it is used in conjunction with "semantics only"
checking, then some cases of violations may be missed.
-@node No_Entry_Queue,No_Implementation_Aspect_Specifications,No_Elaboration_Code,Program Unit Level Restrictions
-@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-entry-queue}@anchor{1bd}
+@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{1bf}
+@subsection No_Dynamic_Sized_Objects
+
+
+@geindex No_Dynamic_Sized_Objects
+
+[GNAT] This restriction disallows certain constructs that might lead to the
+creation of dynamic-sized composite objects (or array or discriminated type).
+An array subtype indication is illegal if the bounds are not static
+or references to discriminants of an enclosing type.
+A discriminated subtype indication is illegal if the type has
+discriminant-dependent array components or a variant part, and the
+discriminants are not static. In addition, array and record aggregates are
+illegal in corresponding cases. Note that this restriction does not forbid
+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{1c0}
@subsection No_Entry_Queue
@@ -12298,7 +12393,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{1be}
+@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-implementation-aspect-specifications}@anchor{1c1}
@subsection No_Implementation_Aspect_Specifications
@@ -12309,7 +12404,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{1bf}
+@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-implementation-attributes}@anchor{1c2}
@subsection No_Implementation_Attributes
@@ -12321,7 +12416,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{1c0}
+@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-implementation-identifiers}@anchor{1c3}
@subsection No_Implementation_Identifiers
@@ -12332,7 +12427,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{1c1}
+@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-implementation-pragmas}@anchor{1c4}
@subsection No_Implementation_Pragmas
@@ -12343,7 +12438,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{1c2}
+@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-implementation-restrictions}@anchor{1c5}
@subsection No_Implementation_Restrictions
@@ -12355,7 +12450,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{1c3}
+@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-implementation-units}@anchor{1c6}
@subsection No_Implementation_Units
@@ -12366,7 +12461,7 @@ mention in the context clause of any implementation-defined descendants
of packages Ada, Interfaces, or System.
@node No_Implicit_Aliasing,No_Obsolescent_Features,No_Implementation_Units,Program Unit Level Restrictions
-@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-implicit-aliasing}@anchor{1c4}
+@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-implicit-aliasing}@anchor{1c7}
@subsection No_Implicit_Aliasing
@@ -12381,7 +12476,7 @@ to be aliased, and in such cases, it can always be replaced by
the standard attribute Unchecked_Access which is preferable.
@node No_Obsolescent_Features,No_Wide_Characters,No_Implicit_Aliasing,Program Unit Level Restrictions
-@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-obsolescent-features}@anchor{1c5}
+@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-obsolescent-features}@anchor{1c8}
@subsection No_Obsolescent_Features
@@ -12391,7 +12486,7 @@ the standard attribute Unchecked_Access which is preferable.
features are used, as defined in Annex J of the Ada Reference Manual.
@node No_Wide_Characters,SPARK_05,No_Obsolescent_Features,Program Unit Level Restrictions
-@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-wide-characters}@anchor{1c6}
+@anchor{gnat_rm/standard_and_implementation_defined_restrictions no-wide-characters}@anchor{1c9}
@subsection No_Wide_Characters
@@ -12405,7 +12500,7 @@ appear in the program (that is literals representing characters not in
type @cite{Character}).
@node SPARK_05,,No_Wide_Characters,Program Unit Level Restrictions
-@anchor{gnat_rm/standard_and_implementation_defined_restrictions spark-05}@anchor{1c7}
+@anchor{gnat_rm/standard_and_implementation_defined_restrictions spark-05}@anchor{1ca}
@subsection SPARK_05
@@ -12764,7 +12859,7 @@ violations will be reported for constructs forbidden in SPARK 95,
instead of SPARK 2005.
@node Implementation Advice,Implementation Defined Characteristics,Standard and Implementation Defined Restrictions,Top
-@anchor{gnat_rm/implementation_advice doc}@anchor{1c8}@anchor{gnat_rm/implementation_advice implementation-advice}@anchor{a}@anchor{gnat_rm/implementation_advice id1}@anchor{1c9}
+@anchor{gnat_rm/implementation_advice doc}@anchor{1cb}@anchor{gnat_rm/implementation_advice implementation-advice}@anchor{a}@anchor{gnat_rm/implementation_advice id1}@anchor{1cc}
@chapter Implementation Advice
@@ -12861,7 +12956,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{1ca}
+@anchor{gnat_rm/implementation_advice rm-1-1-3-20-error-detection}@anchor{1cd}
@section RM 1.1.3(20): Error Detection
@@ -12878,7 +12973,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{1cb}
+@anchor{gnat_rm/implementation_advice rm-1-1-3-31-child-units}@anchor{1ce}
@section RM 1.1.3(31): Child Units
@@ -12894,7 +12989,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{1cc}
+@anchor{gnat_rm/implementation_advice rm-1-1-5-12-bounded-errors}@anchor{1cf}
@section RM 1.1.5(12): Bounded Errors
@@ -12911,7 +13006,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{1cd}@anchor{gnat_rm/implementation_advice rm-2-8-16-pragmas}@anchor{1ce}
+@anchor{gnat_rm/implementation_advice id2}@anchor{1d0}@anchor{gnat_rm/implementation_advice rm-2-8-16-pragmas}@anchor{1d1}
@section RM 2.8(16): Pragmas
@@ -13024,7 +13119,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{1cf}
+@anchor{gnat_rm/implementation_advice rm-2-8-17-19-pragmas}@anchor{1d2}
@section RM 2.8(17-19): Pragmas
@@ -13045,14 +13140,14 @@ replacing @cite{library_items}."
@end itemize
@end quotation
-See @ref{1ce,,RM 2.8(16); Pragmas}.
+See @ref{1d1,,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{1d0}
+@anchor{gnat_rm/implementation_advice rm-3-5-2-5-alternative-character-sets}@anchor{1d3}
@section RM 3.5.2(5): Alternative Character Sets
@@ -13080,7 +13175,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{1d1}
+@anchor{gnat_rm/implementation_advice rm-3-5-4-28-integer-types}@anchor{1d4}
@section RM 3.5.4(28): Integer Types
@@ -13099,7 +13194,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{1d2}
+@anchor{gnat_rm/implementation_advice rm-3-5-4-29-integer-types}@anchor{1d5}
@section RM 3.5.4(29): Integer Types
@@ -13115,7 +13210,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{1d3}
+@anchor{gnat_rm/implementation_advice rm-3-5-5-8-enumeration-values}@anchor{1d6}
@section RM 3.5.5(8): Enumeration Values
@@ -13135,7 +13230,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{1d4}
+@anchor{gnat_rm/implementation_advice rm-3-5-7-17-float-types}@anchor{1d7}
@section RM 3.5.7(17): Float Types
@@ -13165,7 +13260,7 @@ since this 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{1d5}
+@anchor{gnat_rm/implementation_advice rm-3-6-2-11-multidimensional-arrays}@anchor{1d8}
@section RM 3.6.2(11): Multidimensional Arrays
@@ -13183,7 +13278,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{1d6}
+@anchor{gnat_rm/implementation_advice rm-9-6-30-31-duration-small}@anchor{1d9}
@section RM 9.6(30-31): Duration'Small
@@ -13204,7 +13299,7 @@ it need not be the same time base as used for @cite{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{1d7}
+@anchor{gnat_rm/implementation_advice rm-10-2-1-12-consistent-representation}@anchor{1da}
@section RM 10.2.1(12): Consistent Representation
@@ -13226,7 +13321,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{1d8}
+@anchor{gnat_rm/implementation_advice rm-11-4-1-19-exception-information}@anchor{1db}
@section RM 11.4.1(19): Exception Information
@@ -13257,7 +13352,7 @@ Pragma @cite{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{1d9}
+@anchor{gnat_rm/implementation_advice rm-11-5-28-suppression-of-checks}@anchor{1dc}
@section RM 11.5(28): Suppression of Checks
@@ -13272,7 +13367,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{1da}
+@anchor{gnat_rm/implementation_advice rm-13-1-21-24-representation-clauses}@anchor{1dd}
@section RM 13.1 (21-24): Representation Clauses
@@ -13321,7 +13416,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{1db}
+@anchor{gnat_rm/implementation_advice rm-13-2-6-8-packed-types}@anchor{1de}
@section RM 13.2(6-8): Packed Types
@@ -13360,7 +13455,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{1dc}
+@anchor{gnat_rm/implementation_advice rm-13-3-14-19-address-clauses}@anchor{1df}
@section RM 13.3(14-19): Address Clauses
@@ -13413,7 +13508,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{1dd}
+@anchor{gnat_rm/implementation_advice rm-13-3-29-35-alignment-clauses}@anchor{1e0}
@section RM 13.3(29-35): Alignment Clauses
@@ -13470,7 +13565,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{1de}
+@anchor{gnat_rm/implementation_advice rm-13-3-42-43-size-clauses}@anchor{1e1}
@section RM 13.3(42-43): Size Clauses
@@ -13488,7 +13583,7 @@ object's @cite{Alignment} (if the @cite{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{1df}
+@anchor{gnat_rm/implementation_advice rm-13-3-50-56-size-clauses}@anchor{1e2}
@section RM 13.3(50-56): Size Clauses
@@ -13539,7 +13634,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{1e0}
+@anchor{gnat_rm/implementation_advice rm-13-3-71-73-component-size-clauses}@anchor{1e3}
@section RM 13.3(71-73): Component Size Clauses
@@ -13573,7 +13668,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{1e1}
+@anchor{gnat_rm/implementation_advice rm-13-4-9-10-enumeration-representation-clauses}@anchor{1e4}
@section RM 13.4(9-10): Enumeration Representation Clauses
@@ -13595,7 +13690,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{1e2}
+@anchor{gnat_rm/implementation_advice rm-13-5-1-17-22-record-representation-clauses}@anchor{1e5}
@section RM 13.5.1(17-22): Record Representation Clauses
@@ -13655,7 +13750,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{1e3}
+@anchor{gnat_rm/implementation_advice rm-13-5-2-5-storage-place-attributes}@anchor{1e6}
@section RM 13.5.2(5): Storage Place Attributes
@@ -13675,7 +13770,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{1e4}
+@anchor{gnat_rm/implementation_advice rm-13-5-3-7-8-bit-ordering}@anchor{1e7}
@section RM 13.5.3(7-8): Bit Ordering
@@ -13695,7 +13790,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{1e5}
+@anchor{gnat_rm/implementation_advice rm-13-7-37-address-as-private}@anchor{1e8}
@section RM 13.7(37): Address as Private
@@ -13713,7 +13808,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{1e6}
+@anchor{gnat_rm/implementation_advice rm-13-7-1-16-address-operations}@anchor{1e9}
@section RM 13.7.1(16): Address Operations
@@ -13731,7 +13826,7 @@ operation raises @cite{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{1e7}
+@anchor{gnat_rm/implementation_advice rm-13-9-14-17-unchecked-conversion}@anchor{1ea}
@section RM 13.9(14-17): Unchecked Conversion
@@ -13775,7 +13870,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{1e8}
+@anchor{gnat_rm/implementation_advice rm-13-11-23-25-implicit-heap-usage}@anchor{1eb}
@section RM 13.11(23-25): Implicit Heap Usage
@@ -13826,7 +13921,7 @@ Followed.
@geindex Unchecked deallocation
@node RM 13 11 2 17 Unchecked Deallocation,RM 13 13 2 17 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{1e9}
+@anchor{gnat_rm/implementation_advice rm-13-11-2-17-unchecked-deallocation}@anchor{1ec}
@section RM 13.11.2(17): Unchecked Deallocation
@@ -13841,7 +13936,7 @@ Followed.
@geindex Stream oriented attributes
@node RM 13 13 2 17 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-17-stream-oriented-attributes}@anchor{1ea}
+@anchor{gnat_rm/implementation_advice rm-13-13-2-17-stream-oriented-attributes}@anchor{1ed}
@section RM 13.13.2(17): Stream Oriented Attributes
@@ -13896,7 +13991,7 @@ the @cite{GNAT and Libraries} section of the @cite{GNAT User's Guide}.
@end itemize
@node RM A 1 52 Names of Predefined Numeric Types,RM A 3 2 49 Ada Characters Handling,RM 13 13 2 17 Stream Oriented Attributes,Implementation Advice
-@anchor{gnat_rm/implementation_advice rm-a-1-52-names-of-predefined-numeric-types}@anchor{1eb}
+@anchor{gnat_rm/implementation_advice rm-a-1-52-names-of-predefined-numeric-types}@anchor{1ee}
@section RM A.1(52): Names of Predefined Numeric Types
@@ -13914,7 +14009,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{1ec}
+@anchor{gnat_rm/implementation_advice rm-a-3-2-49-ada-characters-handling}@anchor{1ef}
@section RM A.3.2(49): @cite{Ada.Characters.Handling}
@@ -13931,7 +14026,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{1ed}
+@anchor{gnat_rm/implementation_advice rm-a-4-4-106-bounded-length-string-handling}@anchor{1f0}
@section RM A.4.4(106): Bounded-Length String Handling
@@ -13946,7 +14041,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{1ee}
+@anchor{gnat_rm/implementation_advice rm-a-5-2-46-47-random-number-generation}@anchor{1f1}
@section RM A.5.2(46-47): Random Number Generation
@@ -13975,7 +14070,7 @@ condition here to hold true.
@geindex Get_Immediate
@node RM A 10 7 23 Get_Immediate,RM B 1 39-41 Pragma Export,RM A 5 2 46-47 Random Number Generation,Implementation Advice
-@anchor{gnat_rm/implementation_advice rm-a-10-7-23-get-immediate}@anchor{1ef}
+@anchor{gnat_rm/implementation_advice rm-a-10-7-23-get-immediate}@anchor{1f2}
@section RM A.10.7(23): @cite{Get_Immediate}
@@ -13999,7 +14094,7 @@ this functionality.
@geindex Export
@node RM B 1 39-41 Pragma Export,RM B 2 12-13 Package Interfaces,RM A 10 7 23 Get_Immediate,Implementation Advice
-@anchor{gnat_rm/implementation_advice rm-b-1-39-41-pragma-export}@anchor{1f0}
+@anchor{gnat_rm/implementation_advice rm-b-1-39-41-pragma-export}@anchor{1f3}
@section RM B.1(39-41): Pragma @cite{Export}
@@ -14047,7 +14142,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{1f1}
+@anchor{gnat_rm/implementation_advice rm-b-2-12-13-package-interfaces}@anchor{1f4}
@section RM B.2(12-13): Package @cite{Interfaces}
@@ -14077,7 +14172,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{1f2}
+@anchor{gnat_rm/implementation_advice rm-b-3-63-71-interfacing-with-c}@anchor{1f5}
@section RM B.3(63-71): Interfacing with C
@@ -14165,7 +14260,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{1f3}
+@anchor{gnat_rm/implementation_advice rm-b-4-95-98-interfacing-with-cobol}@anchor{1f6}
@section RM B.4(95-98): Interfacing with COBOL
@@ -14206,7 +14301,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{1f4}
+@anchor{gnat_rm/implementation_advice rm-b-5-22-26-interfacing-with-fortran}@anchor{1f7}
@section RM B.5(22-26): Interfacing with Fortran
@@ -14257,7 +14352,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{1f5}
+@anchor{gnat_rm/implementation_advice rm-c-1-3-5-access-to-machine-operations}@anchor{1f8}
@section RM C.1(3-5): Access to Machine Operations
@@ -14292,7 +14387,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{1f6}
+@anchor{gnat_rm/implementation_advice rm-c-1-10-16-access-to-machine-operations}@anchor{1f9}
@section RM C.1(10-16): Access to Machine Operations
@@ -14353,7 +14448,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{1f7}
+@anchor{gnat_rm/implementation_advice rm-c-3-28-interrupt-support}@anchor{1fa}
@section RM C.3(28): Interrupt Support
@@ -14371,7 +14466,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{1f8}
+@anchor{gnat_rm/implementation_advice rm-c-3-1-20-21-protected-procedure-handlers}@anchor{1fb}
@section RM C.3.1(20-21): Protected Procedure Handlers
@@ -14397,7 +14492,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{1f9}
+@anchor{gnat_rm/implementation_advice rm-c-3-2-25-package-interrupts}@anchor{1fc}
@section RM C.3.2(25): Package @cite{Interrupts}
@@ -14415,7 +14510,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{1fa}
+@anchor{gnat_rm/implementation_advice rm-c-4-14-pre-elaboration-requirements}@anchor{1fd}
@section RM C.4(14): Pre-elaboration Requirements
@@ -14431,7 +14526,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{1fb}
+@anchor{gnat_rm/implementation_advice rm-c-5-8-pragma-discard-names}@anchor{1fe}
@section RM C.5(8): Pragma @cite{Discard_Names}
@@ -14449,7 +14544,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{1fc}
+@anchor{gnat_rm/implementation_advice rm-c-7-2-30-the-package-task-attributes}@anchor{1ff}
@section RM C.7.2(30): The Package Task_Attributes
@@ -14470,7 +14565,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{1fd}
+@anchor{gnat_rm/implementation_advice rm-d-3-17-locking-policies}@anchor{200}
@section RM D.3(17): Locking Policies
@@ -14487,7 +14582,7 @@ whose names (@cite{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{1fe}
+@anchor{gnat_rm/implementation_advice rm-d-4-16-entry-queuing-policies}@anchor{201}
@section RM D.4(16): Entry Queuing Policies
@@ -14502,7 +14597,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{1ff}
+@anchor{gnat_rm/implementation_advice rm-d-6-9-10-preemptive-abort}@anchor{202}
@section RM D.6(9-10): Preemptive Abort
@@ -14528,7 +14623,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{200}
+@anchor{gnat_rm/implementation_advice rm-d-7-21-tasking-restrictions}@anchor{203}
@section RM D.7(21): Tasking Restrictions
@@ -14547,7 +14642,7 @@ pragma @cite{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{201}
+@anchor{gnat_rm/implementation_advice rm-d-8-47-49-monotonic-time}@anchor{204}
@section RM D.8(47-49): Monotonic Time
@@ -14582,7 +14677,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{202}
+@anchor{gnat_rm/implementation_advice rm-e-5-28-29-partition-communication-subsystem}@anchor{205}
@section RM E.5(28-29): Partition Communication Subsystem
@@ -14610,7 +14705,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{203}
+@anchor{gnat_rm/implementation_advice rm-f-7-cobol-support}@anchor{206}
@section RM F(7): COBOL Support
@@ -14630,7 +14725,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{204}
+@anchor{gnat_rm/implementation_advice rm-f-1-2-decimal-radix-support}@anchor{207}
@section RM F.1(2): Decimal Radix Support
@@ -14646,7 +14741,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{205}
+@anchor{gnat_rm/implementation_advice rm-g-numerics}@anchor{208}
@section RM G: Numerics
@@ -14666,7 +14761,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{206}
+@anchor{gnat_rm/implementation_advice rm-g-1-1-56-58-complex-types}@anchor{209}
@section RM G.1.1(56-58): Complex Types
@@ -14728,7 +14823,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{207}
+@anchor{gnat_rm/implementation_advice rm-g-1-2-49-complex-elementary-functions}@anchor{20a}
@section RM G.1.2(49): Complex Elementary Functions
@@ -14750,7 +14845,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{208}
+@anchor{gnat_rm/implementation_advice rm-g-2-4-19-accuracy-requirements}@anchor{20b}
@section RM G.2.4(19): Accuracy Requirements
@@ -14774,7 +14869,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{209}
+@anchor{gnat_rm/implementation_advice rm-g-2-6-15-complex-arithmetic-accuracy}@anchor{20c}
@section RM G.2.6(15): Complex Arithmetic Accuracy
@@ -14792,7 +14887,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{20a}
+@anchor{gnat_rm/implementation_advice rm-h-6-15-2-pragma-partition-elaboration-policy}@anchor{20d}
@section RM H.6(15/2): Pragma Partition_Elaboration_Policy
@@ -14807,7 +14902,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{20b}@anchor{gnat_rm/implementation_defined_characteristics id1}@anchor{20c}
+@anchor{gnat_rm/implementation_defined_characteristics implementation-defined-characteristics}@anchor{b}@anchor{gnat_rm/implementation_defined_characteristics doc}@anchor{20e}@anchor{gnat_rm/implementation_defined_characteristics id1}@anchor{20f}
@chapter Implementation Defined Characteristics
@@ -16002,7 +16097,7 @@ When the @cite{Pattern} parameter is not the null string, it is interpreted
according to the syntax of regular expressions as defined in the
@cite{GNAT.Regexp} package.
-See @ref{20d,,GNAT.Regexp (g-regexp.ads)}.
+See @ref{210,,GNAT.Regexp (g-regexp.ads)}.
@itemize *
@@ -17044,7 +17139,7 @@ H.4(27)."
There are no restrictions on pragma @cite{Restrictions}.
@node Intrinsic Subprograms,Representation Clauses and Pragmas,Implementation Defined Characteristics,Top
-@anchor{gnat_rm/intrinsic_subprograms doc}@anchor{20e}@anchor{gnat_rm/intrinsic_subprograms intrinsic-subprograms}@anchor{c}@anchor{gnat_rm/intrinsic_subprograms id1}@anchor{20f}
+@anchor{gnat_rm/intrinsic_subprograms doc}@anchor{211}@anchor{gnat_rm/intrinsic_subprograms intrinsic-subprograms}@anchor{c}@anchor{gnat_rm/intrinsic_subprograms id1}@anchor{212}
@chapter Intrinsic Subprograms
@@ -17081,7 +17176,7 @@ Ada standard does not require Ada compilers to implement this feature.
@end menu
@node Intrinsic Operators,Compilation_Date,,Intrinsic Subprograms
-@anchor{gnat_rm/intrinsic_subprograms id2}@anchor{210}@anchor{gnat_rm/intrinsic_subprograms intrinsic-operators}@anchor{211}
+@anchor{gnat_rm/intrinsic_subprograms id2}@anchor{213}@anchor{gnat_rm/intrinsic_subprograms intrinsic-operators}@anchor{214}
@section Intrinsic Operators
@@ -17112,7 +17207,7 @@ It is also possible to specify such operators for private types, if the
full views are appropriate arithmetic types.
@node Compilation_Date,Compilation_Time,Intrinsic Operators,Intrinsic Subprograms
-@anchor{gnat_rm/intrinsic_subprograms compilation-date}@anchor{212}@anchor{gnat_rm/intrinsic_subprograms id3}@anchor{213}
+@anchor{gnat_rm/intrinsic_subprograms compilation-date}@anchor{215}@anchor{gnat_rm/intrinsic_subprograms id3}@anchor{216}
@section Compilation_Date
@@ -17126,7 +17221,7 @@ application program should simply call the function
the current compilation (in local time format MMM DD YYYY).
@node Compilation_Time,Enclosing_Entity,Compilation_Date,Intrinsic Subprograms
-@anchor{gnat_rm/intrinsic_subprograms compilation-time}@anchor{214}@anchor{gnat_rm/intrinsic_subprograms id4}@anchor{215}
+@anchor{gnat_rm/intrinsic_subprograms compilation-time}@anchor{217}@anchor{gnat_rm/intrinsic_subprograms id4}@anchor{218}
@section Compilation_Time
@@ -17140,7 +17235,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 id5}@anchor{216}@anchor{gnat_rm/intrinsic_subprograms enclosing-entity}@anchor{217}
+@anchor{gnat_rm/intrinsic_subprograms id5}@anchor{219}@anchor{gnat_rm/intrinsic_subprograms enclosing-entity}@anchor{21a}
@section Enclosing_Entity
@@ -17154,7 +17249,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 id6}@anchor{218}@anchor{gnat_rm/intrinsic_subprograms exception-information}@anchor{219}
+@anchor{gnat_rm/intrinsic_subprograms id6}@anchor{21b}@anchor{gnat_rm/intrinsic_subprograms exception-information}@anchor{21c}
@section Exception_Information
@@ -17168,7 +17263,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{21a}@anchor{gnat_rm/intrinsic_subprograms id7}@anchor{21b}
+@anchor{gnat_rm/intrinsic_subprograms exception-message}@anchor{21d}@anchor{gnat_rm/intrinsic_subprograms id7}@anchor{21e}
@section Exception_Message
@@ -17182,7 +17277,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{21c}@anchor{gnat_rm/intrinsic_subprograms id8}@anchor{21d}
+@anchor{gnat_rm/intrinsic_subprograms exception-name}@anchor{21f}@anchor{gnat_rm/intrinsic_subprograms id8}@anchor{220}
@section Exception_Name
@@ -17196,7 +17291,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 file}@anchor{21e}@anchor{gnat_rm/intrinsic_subprograms id9}@anchor{21f}
+@anchor{gnat_rm/intrinsic_subprograms file}@anchor{221}@anchor{gnat_rm/intrinsic_subprograms id9}@anchor{222}
@section File
@@ -17210,7 +17305,7 @@ application program should simply call the function
file.
@node Line,Shifts and Rotates,File,Intrinsic Subprograms
-@anchor{gnat_rm/intrinsic_subprograms id10}@anchor{220}@anchor{gnat_rm/intrinsic_subprograms line}@anchor{221}
+@anchor{gnat_rm/intrinsic_subprograms id10}@anchor{223}@anchor{gnat_rm/intrinsic_subprograms line}@anchor{224}
@section Line
@@ -17224,7 +17319,7 @@ application program should simply call the function
source line.
@node Shifts and Rotates,Source_Location,Line,Intrinsic Subprograms
-@anchor{gnat_rm/intrinsic_subprograms id11}@anchor{222}@anchor{gnat_rm/intrinsic_subprograms shifts-and-rotates}@anchor{223}
+@anchor{gnat_rm/intrinsic_subprograms id11}@anchor{225}@anchor{gnat_rm/intrinsic_subprograms shifts-and-rotates}@anchor{226}
@section Shifts and Rotates
@@ -17263,7 +17358,7 @@ the Provide_Shift_Operators pragma, which provides the function declarations
and corresponding pragma Import's for all five shift functions.
@node Source_Location,,Shifts and Rotates,Intrinsic Subprograms
-@anchor{gnat_rm/intrinsic_subprograms source-location}@anchor{224}@anchor{gnat_rm/intrinsic_subprograms id12}@anchor{225}
+@anchor{gnat_rm/intrinsic_subprograms source-location}@anchor{227}@anchor{gnat_rm/intrinsic_subprograms id12}@anchor{228}
@section Source_Location
@@ -17277,7 +17372,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{226}@anchor{gnat_rm/representation_clauses_and_pragmas id1}@anchor{227}
+@anchor{gnat_rm/representation_clauses_and_pragmas representation-clauses-and-pragmas}@anchor{d}@anchor{gnat_rm/representation_clauses_and_pragmas doc}@anchor{229}@anchor{gnat_rm/representation_clauses_and_pragmas id1}@anchor{22a}
@chapter Representation Clauses and Pragmas
@@ -17323,7 +17418,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{228}@anchor{gnat_rm/representation_clauses_and_pragmas alignment-clauses}@anchor{229}
+@anchor{gnat_rm/representation_clauses_and_pragmas id2}@anchor{22b}@anchor{gnat_rm/representation_clauses_and_pragmas alignment-clauses}@anchor{22c}
@section Alignment Clauses
@@ -17343,7 +17438,7 @@ For primitive types, the alignment is the minimum of the actual size of
objects of the type divided by @cite{Storage_Unit},
and the maximum alignment supported by the target.
(This maximum alignment is given by the GNAT-specific attribute
-@cite{Standard'Maximum_Alignment}; see @ref{148,,Attribute Maximum_Alignment}.)
+@cite{Standard'Maximum_Alignment}; see @ref{149,,Attribute Maximum_Alignment}.)
@geindex Maximum_Alignment attribute
@@ -17451,7 +17546,7 @@ assumption is non-portable, and other compilers may choose different
alignments for the subtype @cite{RS}.
@node Size Clauses,Storage_Size Clauses,Alignment Clauses,Representation Clauses and Pragmas
-@anchor{gnat_rm/representation_clauses_and_pragmas id3}@anchor{22a}@anchor{gnat_rm/representation_clauses_and_pragmas size-clauses}@anchor{22b}
+@anchor{gnat_rm/representation_clauses_and_pragmas id3}@anchor{22d}@anchor{gnat_rm/representation_clauses_and_pragmas size-clauses}@anchor{22e}
@section Size Clauses
@@ -17528,7 +17623,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{22c}@anchor{gnat_rm/representation_clauses_and_pragmas id4}@anchor{22d}
+@anchor{gnat_rm/representation_clauses_and_pragmas storage-size-clauses}@anchor{22f}@anchor{gnat_rm/representation_clauses_and_pragmas id4}@anchor{230}
@section Storage_Size Clauses
@@ -17601,7 +17696,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{22e}@anchor{gnat_rm/representation_clauses_and_pragmas size-of-variant-record-objects}@anchor{22f}
+@anchor{gnat_rm/representation_clauses_and_pragmas id5}@anchor{231}@anchor{gnat_rm/representation_clauses_and_pragmas size-of-variant-record-objects}@anchor{232}
@section Size of Variant Record Objects
@@ -17711,7 +17806,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{230}@anchor{gnat_rm/representation_clauses_and_pragmas biased-representation}@anchor{231}
+@anchor{gnat_rm/representation_clauses_and_pragmas id6}@anchor{233}@anchor{gnat_rm/representation_clauses_and_pragmas biased-representation}@anchor{234}
@section Biased Representation
@@ -17749,7 +17844,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{232}@anchor{gnat_rm/representation_clauses_and_pragmas value-size-and-object-size-clauses}@anchor{233}
+@anchor{gnat_rm/representation_clauses_and_pragmas id7}@anchor{235}@anchor{gnat_rm/representation_clauses_and_pragmas value-size-and-object-size-clauses}@anchor{236}
@section Value_Size and Object_Size Clauses
@@ -18056,7 +18151,7 @@ definition clause forces biased representation. This
warning can be turned off using @cite{-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{234}@anchor{gnat_rm/representation_clauses_and_pragmas component-size-clauses}@anchor{235}
+@anchor{gnat_rm/representation_clauses_and_pragmas id8}@anchor{237}@anchor{gnat_rm/representation_clauses_and_pragmas component-size-clauses}@anchor{238}
@section Component_Size Clauses
@@ -18103,7 +18198,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{236}@anchor{gnat_rm/representation_clauses_and_pragmas id9}@anchor{237}
+@anchor{gnat_rm/representation_clauses_and_pragmas bit-order-clauses}@anchor{239}@anchor{gnat_rm/representation_clauses_and_pragmas id9}@anchor{23a}
@section Bit_Order Clauses
@@ -18209,7 +18304,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{238}@anchor{gnat_rm/representation_clauses_and_pragmas effect-of-bit-order-on-byte-ordering}@anchor{239}
+@anchor{gnat_rm/representation_clauses_and_pragmas id10}@anchor{23b}@anchor{gnat_rm/representation_clauses_and_pragmas effect-of-bit-order-on-byte-ordering}@anchor{23c}
@section Effect of Bit_Order on Byte Ordering
@@ -18466,7 +18561,7 @@ to set the boolean constant @cite{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{23a}@anchor{gnat_rm/representation_clauses_and_pragmas id11}@anchor{23b}
+@anchor{gnat_rm/representation_clauses_and_pragmas pragma-pack-for-arrays}@anchor{23d}@anchor{gnat_rm/representation_clauses_and_pragmas id11}@anchor{23e}
@section Pragma Pack for Arrays
@@ -18582,7 +18677,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{23c}@anchor{gnat_rm/representation_clauses_and_pragmas id12}@anchor{23d}
+@anchor{gnat_rm/representation_clauses_and_pragmas pragma-pack-for-records}@anchor{23f}@anchor{gnat_rm/representation_clauses_and_pragmas id12}@anchor{240}
@section Pragma Pack for Records
@@ -18665,7 +18760,7 @@ the @cite{L6} field is aligned to the next byte 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{23e}@anchor{gnat_rm/representation_clauses_and_pragmas record-representation-clauses}@anchor{23f}
+@anchor{gnat_rm/representation_clauses_and_pragmas id13}@anchor{241}@anchor{gnat_rm/representation_clauses_and_pragmas record-representation-clauses}@anchor{242}
@section Record Representation Clauses
@@ -18750,7 +18845,7 @@ type, in particular, always starting on a byte boundary, and the length
must be a multiple of the storage unit.
@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{240}@anchor{gnat_rm/representation_clauses_and_pragmas id14}@anchor{241}
+@anchor{gnat_rm/representation_clauses_and_pragmas handling-of-records-with-holes}@anchor{243}@anchor{gnat_rm/representation_clauses_and_pragmas id14}@anchor{244}
@section Handling of Records with Holes
@@ -18827,7 +18922,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{242}@anchor{gnat_rm/representation_clauses_and_pragmas id15}@anchor{243}
+@anchor{gnat_rm/representation_clauses_and_pragmas enumeration-clauses}@anchor{245}@anchor{gnat_rm/representation_clauses_and_pragmas id15}@anchor{246}
@section Enumeration Clauses
@@ -18870,7 +18965,7 @@ the overhead of converting representation values to the corresponding
positional values, (i.e., the value delivered by the @cite{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{244}@anchor{gnat_rm/representation_clauses_and_pragmas address-clauses}@anchor{245}
+@anchor{gnat_rm/representation_clauses_and_pragmas id16}@anchor{247}@anchor{gnat_rm/representation_clauses_and_pragmas address-clauses}@anchor{248}
@section Address Clauses
@@ -19080,11 +19175,10 @@ B : Integer;
for B'Address use Addr;
@end example
-In both of these cases, @cite{A}
-and @cite{B} become aliased to one another via the
-address clause. This use of address clauses to overlay
-variables, achieving an effect similar to unchecked
-conversion was erroneous in Ada 83, but in Ada 95 and Ada 2005
+In both of these cases, @cite{A} and @cite{B} become aliased to one another
+via the address clause. This use of address clauses to overlay
+variables, achieving an effect similar to unchecked conversion
+was erroneous in Ada 83, but in Ada 95 and Ada 2005
the effect is implementation defined. Furthermore, the
Ada RM specifically recommends that in a situation
like this, @cite{B} should be subject to the following
@@ -19098,10 +19192,14 @@ optimizations based on assumptions of no aliases."
@end quotation
GNAT follows this recommendation, and goes further by also applying
-this recommendation to the overlaid variable (@cite{A}
-in the above example) in this case. This means that the overlay
-works "as expected", in that a modification to one of the variables
-will affect the value of the other.
+this recommendation to the overlaid variable (@cite{A} in the above example)
+in this case. This means that the overlay works "as expected", in that
+a modification to one of the variables will affect the value of the other.
+
+More generally, GNAT interprets this recommendation conservatively for
+address clauses: in the cases other than overlays, it considers that the
+object is effectively subject to pragma @cite{Volatile} and implements the
+associated semantics.
Note that when address clause overlays are used in this way, there is an
issue of unintentional initialization, as shown by this example:
@@ -19197,7 +19295,7 @@ then the program compiles without the warning and when run will generate
the output @cite{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{246}@anchor{gnat_rm/representation_clauses_and_pragmas use-of-address-clauses-for-memory-mapped-i-o}@anchor{247}
+@anchor{gnat_rm/representation_clauses_and_pragmas id17}@anchor{249}@anchor{gnat_rm/representation_clauses_and_pragmas use-of-address-clauses-for-memory-mapped-i-o}@anchor{24a}
@section Use of Address Clauses for Memory-Mapped I/O
@@ -19222,12 +19320,9 @@ Temp.A := 32;
Mem := Temp;
@end example
-For a full access (reference or modification) of the variable (Mem) in
-this case, as in the above examples, GNAT guarantees that the entire atomic
-word will be accessed. It is not clear whether the RM requires this. For
-example in the above, can the compiler reference only the Mem.A field as
-an optimization? Whatever the answer to this question is, GNAT makes the
-guarantee that for such a reference, the entire word is read or written.
+For a full access (reference or modification) of the variable (Mem) in this
+case, as in the above examples, GNAT guarantees that the entire atomic word
+will be accessed, in accordance with the RM C.6(15) clause.
A problem arises with a component access such as:
@@ -19253,9 +19348,12 @@ Mem.A := 32;
It is best to be explicit in this situation, by either declaring the
components to be atomic if you want the byte store, or explicitly writing
the full word access sequence if that is what the hardware requires.
+Alternatively, if the full word access sequence is required, GNAT also
+provides the pragma @cite{Volatile_Full_Access} which can be used in lieu of
+pragma @cite{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{248}@anchor{gnat_rm/representation_clauses_and_pragmas effect-of-convention-on-representation}@anchor{249}
+@anchor{gnat_rm/representation_clauses_and_pragmas id18}@anchor{24b}@anchor{gnat_rm/representation_clauses_and_pragmas effect-of-convention-on-representation}@anchor{24c}
@section Effect of Convention on Representation
@@ -19333,7 +19431,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{24a}@anchor{gnat_rm/representation_clauses_and_pragmas id19}@anchor{24b}
+@anchor{gnat_rm/representation_clauses_and_pragmas conventions-and-anonymous-access-types}@anchor{24d}@anchor{gnat_rm/representation_clauses_and_pragmas id19}@anchor{24e}
@section Conventions and Anonymous Access Types
@@ -19409,7 +19507,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{24c}@anchor{gnat_rm/representation_clauses_and_pragmas determining-the-representations-chosen-by-gnat}@anchor{24d}
+@anchor{gnat_rm/representation_clauses_and_pragmas id20}@anchor{24f}@anchor{gnat_rm/representation_clauses_and_pragmas determining-the-representations-chosen-by-gnat}@anchor{250}
@section Determining the Representations chosen by GNAT
@@ -19561,7 +19659,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{24e}@anchor{gnat_rm/standard_library_routines id1}@anchor{24f}
+@anchor{gnat_rm/standard_library_routines standard-library-routines}@anchor{e}@anchor{gnat_rm/standard_library_routines doc}@anchor{251}@anchor{gnat_rm/standard_library_routines id1}@anchor{252}
@chapter Standard Library Routines
@@ -20384,7 +20482,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{250}@anchor{gnat_rm/the_implementation_of_standard_i_o id1}@anchor{251}
+@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{253}@anchor{gnat_rm/the_implementation_of_standard_i_o id1}@anchor{254}
@chapter The Implementation of Standard I/O
@@ -20436,7 +20534,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{252}@anchor{gnat_rm/the_implementation_of_standard_i_o id2}@anchor{253}
+@anchor{gnat_rm/the_implementation_of_standard_i_o standard-i-o-packages}@anchor{255}@anchor{gnat_rm/the_implementation_of_standard_i_o id2}@anchor{256}
@section Standard I/O Packages
@@ -20507,7 +20605,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{254}@anchor{gnat_rm/the_implementation_of_standard_i_o id3}@anchor{255}
+@anchor{gnat_rm/the_implementation_of_standard_i_o form-strings}@anchor{257}@anchor{gnat_rm/the_implementation_of_standard_i_o id3}@anchor{258}
@section FORM Strings
@@ -20533,7 +20631,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{256}@anchor{gnat_rm/the_implementation_of_standard_i_o id4}@anchor{257}
+@anchor{gnat_rm/the_implementation_of_standard_i_o direct-io}@anchor{259}@anchor{gnat_rm/the_implementation_of_standard_i_o id4}@anchor{25a}
@section Direct_IO
@@ -20553,7 +20651,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{258}@anchor{gnat_rm/the_implementation_of_standard_i_o id5}@anchor{259}
+@anchor{gnat_rm/the_implementation_of_standard_i_o sequential-io}@anchor{25b}@anchor{gnat_rm/the_implementation_of_standard_i_o id5}@anchor{25c}
@section Sequential_IO
@@ -20600,7 +20698,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{25a}@anchor{gnat_rm/the_implementation_of_standard_i_o text-io}@anchor{25b}
+@anchor{gnat_rm/the_implementation_of_standard_i_o id6}@anchor{25d}@anchor{gnat_rm/the_implementation_of_standard_i_o text-io}@anchor{25e}
@section Text_IO
@@ -20683,7 +20781,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{25c}@anchor{gnat_rm/the_implementation_of_standard_i_o stream-pointer-positioning}@anchor{25d}
+@anchor{gnat_rm/the_implementation_of_standard_i_o id7}@anchor{25f}@anchor{gnat_rm/the_implementation_of_standard_i_o stream-pointer-positioning}@anchor{260}
@subsection Stream Pointer Positioning
@@ -20719,7 +20817,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{25e}@anchor{gnat_rm/the_implementation_of_standard_i_o id8}@anchor{25f}
+@anchor{gnat_rm/the_implementation_of_standard_i_o reading-and-writing-non-regular-files}@anchor{261}@anchor{gnat_rm/the_implementation_of_standard_i_o id8}@anchor{262}
@subsection Reading and Writing Non-Regular Files
@@ -20770,7 +20868,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{260}@anchor{gnat_rm/the_implementation_of_standard_i_o id9}@anchor{261}
+@anchor{gnat_rm/the_implementation_of_standard_i_o get-immediate}@anchor{263}@anchor{gnat_rm/the_implementation_of_standard_i_o id9}@anchor{264}
@subsection Get_Immediate
@@ -20788,7 +20886,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{262}@anchor{gnat_rm/the_implementation_of_standard_i_o treating-text-io-files-as-streams}@anchor{263}
+@anchor{gnat_rm/the_implementation_of_standard_i_o id10}@anchor{265}@anchor{gnat_rm/the_implementation_of_standard_i_o treating-text-io-files-as-streams}@anchor{266}
@subsection Treating Text_IO Files as Streams
@@ -20804,7 +20902,7 @@ skipped and the effect is similar to that described above for
@cite{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{264}@anchor{gnat_rm/the_implementation_of_standard_i_o text-io-extensions}@anchor{265}
+@anchor{gnat_rm/the_implementation_of_standard_i_o id11}@anchor{267}@anchor{gnat_rm/the_implementation_of_standard_i_o text-io-extensions}@anchor{268}
@subsection Text_IO Extensions
@@ -20832,7 +20930,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{266}@anchor{gnat_rm/the_implementation_of_standard_i_o id12}@anchor{267}
+@anchor{gnat_rm/the_implementation_of_standard_i_o text-io-facilities-for-unbounded-strings}@anchor{269}@anchor{gnat_rm/the_implementation_of_standard_i_o id12}@anchor{26a}
@subsection Text_IO Facilities for Unbounded Strings
@@ -20880,7 +20978,7 @@ files @code{a-szuzti.ads} and @code{a-szuzti.adb} provides similar extended
@cite{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{268}@anchor{gnat_rm/the_implementation_of_standard_i_o id13}@anchor{269}
+@anchor{gnat_rm/the_implementation_of_standard_i_o wide-text-io}@anchor{26b}@anchor{gnat_rm/the_implementation_of_standard_i_o id13}@anchor{26c}
@section Wide_Text_IO
@@ -21127,12 +21225,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{26a}@anchor{gnat_rm/the_implementation_of_standard_i_o id14}@anchor{26b}
+@anchor{gnat_rm/the_implementation_of_standard_i_o stream-pointer-positioning-1}@anchor{26d}@anchor{gnat_rm/the_implementation_of_standard_i_o id14}@anchor{26e}
@subsection Stream Pointer Positioning
@cite{Ada.Wide_Text_IO} is similar to @cite{Ada.Text_IO} in its handling
-of stream pointer positioning (@ref{25b,,Text_IO}). There is one additional
+of stream pointer positioning (@ref{25e,,Text_IO}). There is one additional
case:
If @cite{Ada.Wide_Text_IO.Look_Ahead} reads a character outside the
@@ -21151,7 +21249,7 @@ to a normal program using @cite{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{26c}@anchor{gnat_rm/the_implementation_of_standard_i_o id15}@anchor{26d}
+@anchor{gnat_rm/the_implementation_of_standard_i_o reading-and-writing-non-regular-files-1}@anchor{26f}@anchor{gnat_rm/the_implementation_of_standard_i_o id15}@anchor{270}
@subsection Reading and Writing Non-Regular Files
@@ -21162,7 +21260,7 @@ treated as data characters), and @cite{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{26e}@anchor{gnat_rm/the_implementation_of_standard_i_o wide-wide-text-io}@anchor{26f}
+@anchor{gnat_rm/the_implementation_of_standard_i_o id16}@anchor{271}@anchor{gnat_rm/the_implementation_of_standard_i_o wide-wide-text-io}@anchor{272}
@section Wide_Wide_Text_IO
@@ -21331,12 +21429,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{270}@anchor{gnat_rm/the_implementation_of_standard_i_o id17}@anchor{271}
+@anchor{gnat_rm/the_implementation_of_standard_i_o stream-pointer-positioning-2}@anchor{273}@anchor{gnat_rm/the_implementation_of_standard_i_o id17}@anchor{274}
@subsection Stream Pointer Positioning
@cite{Ada.Wide_Wide_Text_IO} is similar to @cite{Ada.Text_IO} in its handling
-of stream pointer positioning (@ref{25b,,Text_IO}). There is one additional
+of stream pointer positioning (@ref{25e,,Text_IO}). There is one additional
case:
If @cite{Ada.Wide_Wide_Text_IO.Look_Ahead} reads a character outside the
@@ -21355,7 +21453,7 @@ to a normal program using @cite{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{272}@anchor{gnat_rm/the_implementation_of_standard_i_o reading-and-writing-non-regular-files-2}@anchor{273}
+@anchor{gnat_rm/the_implementation_of_standard_i_o id18}@anchor{275}@anchor{gnat_rm/the_implementation_of_standard_i_o reading-and-writing-non-regular-files-2}@anchor{276}
@subsection Reading and Writing Non-Regular Files
@@ -21366,7 +21464,7 @@ treated as data characters), and @cite{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{274}@anchor{gnat_rm/the_implementation_of_standard_i_o stream-io}@anchor{275}
+@anchor{gnat_rm/the_implementation_of_standard_i_o id19}@anchor{277}@anchor{gnat_rm/the_implementation_of_standard_i_o stream-io}@anchor{278}
@section Stream_IO
@@ -21388,7 +21486,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{276}@anchor{gnat_rm/the_implementation_of_standard_i_o text-translation}@anchor{277}
+@anchor{gnat_rm/the_implementation_of_standard_i_o id20}@anchor{279}@anchor{gnat_rm/the_implementation_of_standard_i_o text-translation}@anchor{27a}
@section Text Translation
@@ -21422,7 +21520,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{278}@anchor{gnat_rm/the_implementation_of_standard_i_o shared-files}@anchor{279}
+@anchor{gnat_rm/the_implementation_of_standard_i_o id21}@anchor{27b}@anchor{gnat_rm/the_implementation_of_standard_i_o shared-files}@anchor{27c}
@section Shared Files
@@ -21485,7 +21583,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{27a}@anchor{gnat_rm/the_implementation_of_standard_i_o id22}@anchor{27b}
+@anchor{gnat_rm/the_implementation_of_standard_i_o filenames-encoding}@anchor{27d}@anchor{gnat_rm/the_implementation_of_standard_i_o id22}@anchor{27e}
@section Filenames encoding
@@ -21525,7 +21623,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{27c}@anchor{gnat_rm/the_implementation_of_standard_i_o id23}@anchor{27d}
+@anchor{gnat_rm/the_implementation_of_standard_i_o file-content-encoding}@anchor{27f}@anchor{gnat_rm/the_implementation_of_standard_i_o id23}@anchor{280}
@section File content encoding
@@ -21558,7 +21656,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{27e}@anchor{gnat_rm/the_implementation_of_standard_i_o id24}@anchor{27f}
+@anchor{gnat_rm/the_implementation_of_standard_i_o open-modes}@anchor{281}@anchor{gnat_rm/the_implementation_of_standard_i_o id24}@anchor{282}
@section Open Modes
@@ -21661,7 +21759,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{280}@anchor{gnat_rm/the_implementation_of_standard_i_o id25}@anchor{281}
+@anchor{gnat_rm/the_implementation_of_standard_i_o operations-on-c-streams}@anchor{283}@anchor{gnat_rm/the_implementation_of_standard_i_o id25}@anchor{284}
@section Operations on C Streams
@@ -21821,7 +21919,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{282}@anchor{gnat_rm/the_implementation_of_standard_i_o id26}@anchor{283}
+@anchor{gnat_rm/the_implementation_of_standard_i_o interfacing-to-c-streams}@anchor{285}@anchor{gnat_rm/the_implementation_of_standard_i_o id26}@anchor{286}
@section Interfacing to C Streams
@@ -21914,7 +22012,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{284}@anchor{gnat_rm/the_gnat_library id1}@anchor{285}
+@anchor{gnat_rm/the_gnat_library the-gnat-library}@anchor{10}@anchor{gnat_rm/the_gnat_library doc}@anchor{287}@anchor{gnat_rm/the_gnat_library id1}@anchor{288}
@chapter The GNAT Library
@@ -22101,7 +22199,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{286}@anchor{gnat_rm/the_gnat_library ada-characters-latin-9-a-chlat9-ads}@anchor{287}
+@anchor{gnat_rm/the_gnat_library id2}@anchor{289}@anchor{gnat_rm/the_gnat_library ada-characters-latin-9-a-chlat9-ads}@anchor{28a}
@section @cite{Ada.Characters.Latin_9} (@code{a-chlat9.ads})
@@ -22118,7 +22216,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{288}@anchor{gnat_rm/the_gnat_library id3}@anchor{289}
+@anchor{gnat_rm/the_gnat_library ada-characters-wide-latin-1-a-cwila1-ads}@anchor{28b}@anchor{gnat_rm/the_gnat_library id3}@anchor{28c}
@section @cite{Ada.Characters.Wide_Latin_1} (@code{a-cwila1.ads})
@@ -22135,7 +22233,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{28a}@anchor{gnat_rm/the_gnat_library ada-characters-wide-latin-9-a-cwila1-ads}@anchor{28b}
+@anchor{gnat_rm/the_gnat_library id4}@anchor{28d}@anchor{gnat_rm/the_gnat_library ada-characters-wide-latin-9-a-cwila1-ads}@anchor{28e}
@section @cite{Ada.Characters.Wide_Latin_9} (@code{a-cwila1.ads})
@@ -22152,7 +22250,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{28c}@anchor{gnat_rm/the_gnat_library id5}@anchor{28d}
+@anchor{gnat_rm/the_gnat_library ada-characters-wide-wide-latin-1-a-chzla1-ads}@anchor{28f}@anchor{gnat_rm/the_gnat_library id5}@anchor{290}
@section @cite{Ada.Characters.Wide_Wide_Latin_1} (@code{a-chzla1.ads})
@@ -22169,7 +22267,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{28e}@anchor{gnat_rm/the_gnat_library id6}@anchor{28f}
+@anchor{gnat_rm/the_gnat_library ada-characters-wide-wide-latin-9-a-chzla9-ads}@anchor{291}@anchor{gnat_rm/the_gnat_library id6}@anchor{292}
@section @cite{Ada.Characters.Wide_Wide_Latin_9} (@code{a-chzla9.ads})
@@ -22186,7 +22284,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{290}@anchor{gnat_rm/the_gnat_library ada-containers-formal-doubly-linked-lists-a-cfdlli-ads}@anchor{291}
+@anchor{gnat_rm/the_gnat_library id7}@anchor{293}@anchor{gnat_rm/the_gnat_library ada-containers-formal-doubly-linked-lists-a-cfdlli-ads}@anchor{294}
@section @cite{Ada.Containers.Formal_Doubly_Linked_Lists} (@code{a-cfdlli.ads})
@@ -22205,7 +22303,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{292}@anchor{gnat_rm/the_gnat_library ada-containers-formal-hashed-maps-a-cfhama-ads}@anchor{293}
+@anchor{gnat_rm/the_gnat_library id8}@anchor{295}@anchor{gnat_rm/the_gnat_library ada-containers-formal-hashed-maps-a-cfhama-ads}@anchor{296}
@section @cite{Ada.Containers.Formal_Hashed_Maps} (@code{a-cfhama.ads})
@@ -22224,7 +22322,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{294}@anchor{gnat_rm/the_gnat_library ada-containers-formal-hashed-sets-a-cfhase-ads}@anchor{295}
+@anchor{gnat_rm/the_gnat_library id9}@anchor{297}@anchor{gnat_rm/the_gnat_library ada-containers-formal-hashed-sets-a-cfhase-ads}@anchor{298}
@section @cite{Ada.Containers.Formal_Hashed_Sets} (@code{a-cfhase.ads})
@@ -22243,7 +22341,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{296}@anchor{gnat_rm/the_gnat_library ada-containers-formal-ordered-maps-a-cforma-ads}@anchor{297}
+@anchor{gnat_rm/the_gnat_library id10}@anchor{299}@anchor{gnat_rm/the_gnat_library ada-containers-formal-ordered-maps-a-cforma-ads}@anchor{29a}
@section @cite{Ada.Containers.Formal_Ordered_Maps} (@code{a-cforma.ads})
@@ -22262,7 +22360,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{298}@anchor{gnat_rm/the_gnat_library id11}@anchor{299}
+@anchor{gnat_rm/the_gnat_library ada-containers-formal-ordered-sets-a-cforse-ads}@anchor{29b}@anchor{gnat_rm/the_gnat_library id11}@anchor{29c}
@section @cite{Ada.Containers.Formal_Ordered_Sets} (@code{a-cforse.ads})
@@ -22281,7 +22379,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{29a}@anchor{gnat_rm/the_gnat_library ada-containers-formal-vectors-a-cofove-ads}@anchor{29b}
+@anchor{gnat_rm/the_gnat_library id12}@anchor{29d}@anchor{gnat_rm/the_gnat_library ada-containers-formal-vectors-a-cofove-ads}@anchor{29e}
@section @cite{Ada.Containers.Formal_Vectors} (@code{a-cofove.ads})
@@ -22300,7 +22398,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 Bounded_Holders a-coboho ads,Ada Containers Formal_Vectors a-cofove ads,The GNAT Library
-@anchor{gnat_rm/the_gnat_library id13}@anchor{29c}@anchor{gnat_rm/the_gnat_library ada-containers-formal-indefinite-vectors-a-cfinve-ads}@anchor{29d}
+@anchor{gnat_rm/the_gnat_library id13}@anchor{29f}@anchor{gnat_rm/the_gnat_library ada-containers-formal-indefinite-vectors-a-cfinve-ads}@anchor{2a0}
@section @cite{Ada.Containers.Formal_Indefinite_Vectors} (@code{a-cfinve.ads})
@@ -22319,7 +22417,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 Bounded_Holders a-coboho ads,Ada Command_Line Environment a-colien ads,Ada Containers Formal_Indefinite_Vectors a-cfinve ads,The GNAT Library
-@anchor{gnat_rm/the_gnat_library id14}@anchor{29e}@anchor{gnat_rm/the_gnat_library ada-containers-bounded-holders-a-coboho-ads}@anchor{29f}
+@anchor{gnat_rm/the_gnat_library id14}@anchor{2a1}@anchor{gnat_rm/the_gnat_library ada-containers-bounded-holders-a-coboho-ads}@anchor{2a2}
@section @cite{Ada.Containers.Bounded_Holders} (@code{a-coboho.ads})
@@ -22331,7 +22429,7 @@ This child of @cite{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{2a0}@anchor{gnat_rm/the_gnat_library id15}@anchor{2a1}
+@anchor{gnat_rm/the_gnat_library ada-command-line-environment-a-colien-ads}@anchor{2a3}@anchor{gnat_rm/the_gnat_library id15}@anchor{2a4}
@section @cite{Ada.Command_Line.Environment} (@code{a-colien.ads})
@@ -22344,7 +22442,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 id16}@anchor{2a2}@anchor{gnat_rm/the_gnat_library ada-command-line-remove-a-colire-ads}@anchor{2a3}
+@anchor{gnat_rm/the_gnat_library id16}@anchor{2a5}@anchor{gnat_rm/the_gnat_library ada-command-line-remove-a-colire-ads}@anchor{2a6}
@section @cite{Ada.Command_Line.Remove} (@code{a-colire.ads})
@@ -22362,7 +22460,7 @@ to further calls on the subprograms in @cite{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 ada-command-line-response-file-a-clrefi-ads}@anchor{2a4}@anchor{gnat_rm/the_gnat_library id17}@anchor{2a5}
+@anchor{gnat_rm/the_gnat_library ada-command-line-response-file-a-clrefi-ads}@anchor{2a7}@anchor{gnat_rm/the_gnat_library id17}@anchor{2a8}
@section @cite{Ada.Command_Line.Response_File} (@code{a-clrefi.ads})
@@ -22382,7 +22480,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 id18}@anchor{2a6}@anchor{gnat_rm/the_gnat_library ada-direct-io-c-streams-a-diocst-ads}@anchor{2a7}
+@anchor{gnat_rm/the_gnat_library id18}@anchor{2a9}@anchor{gnat_rm/the_gnat_library ada-direct-io-c-streams-a-diocst-ads}@anchor{2aa}
@section @cite{Ada.Direct_IO.C_Streams} (@code{a-diocst.ads})
@@ -22397,7 +22495,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 id19}@anchor{2a8}@anchor{gnat_rm/the_gnat_library ada-exceptions-is-null-occurrence-a-einuoc-ads}@anchor{2a9}
+@anchor{gnat_rm/the_gnat_library id19}@anchor{2ab}@anchor{gnat_rm/the_gnat_library ada-exceptions-is-null-occurrence-a-einuoc-ads}@anchor{2ac}
@section @cite{Ada.Exceptions.Is_Null_Occurrence} (@code{a-einuoc.ads})
@@ -22411,7 +22509,7 @@ exception occurrence (@cite{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 id20}@anchor{2aa}@anchor{gnat_rm/the_gnat_library ada-exceptions-last-chance-handler-a-elchha-ads}@anchor{2ab}
+@anchor{gnat_rm/the_gnat_library id20}@anchor{2ad}@anchor{gnat_rm/the_gnat_library ada-exceptions-last-chance-handler-a-elchha-ads}@anchor{2ae}
@section @cite{Ada.Exceptions.Last_Chance_Handler} (@code{a-elchha.ads})
@@ -22425,7 +22523,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{2ac}@anchor{gnat_rm/the_gnat_library id21}@anchor{2ad}
+@anchor{gnat_rm/the_gnat_library ada-exceptions-traceback-a-exctra-ads}@anchor{2af}@anchor{gnat_rm/the_gnat_library id21}@anchor{2b0}
@section @cite{Ada.Exceptions.Traceback} (@code{a-exctra.ads})
@@ -22438,7 +22536,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{2ae}@anchor{gnat_rm/the_gnat_library id22}@anchor{2af}
+@anchor{gnat_rm/the_gnat_library ada-sequential-io-c-streams-a-siocst-ads}@anchor{2b1}@anchor{gnat_rm/the_gnat_library id22}@anchor{2b2}
@section @cite{Ada.Sequential_IO.C_Streams} (@code{a-siocst.ads})
@@ -22453,7 +22551,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 id23}@anchor{2b0}@anchor{gnat_rm/the_gnat_library ada-streams-stream-io-c-streams-a-ssicst-ads}@anchor{2b1}
+@anchor{gnat_rm/the_gnat_library id23}@anchor{2b3}@anchor{gnat_rm/the_gnat_library ada-streams-stream-io-c-streams-a-ssicst-ads}@anchor{2b4}
@section @cite{Ada.Streams.Stream_IO.C_Streams} (@code{a-ssicst.ads})
@@ -22468,7 +22566,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{2b2}@anchor{gnat_rm/the_gnat_library id24}@anchor{2b3}
+@anchor{gnat_rm/the_gnat_library ada-strings-unbounded-text-io-a-suteio-ads}@anchor{2b5}@anchor{gnat_rm/the_gnat_library id24}@anchor{2b6}
@section @cite{Ada.Strings.Unbounded.Text_IO} (@code{a-suteio.ads})
@@ -22485,7 +22583,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 id25}@anchor{2b4}@anchor{gnat_rm/the_gnat_library ada-strings-wide-unbounded-wide-text-io-a-swuwti-ads}@anchor{2b5}
+@anchor{gnat_rm/the_gnat_library id25}@anchor{2b7}@anchor{gnat_rm/the_gnat_library ada-strings-wide-unbounded-wide-text-io-a-swuwti-ads}@anchor{2b8}
@section @cite{Ada.Strings.Wide_Unbounded.Wide_Text_IO} (@code{a-swuwti.ads})
@@ -22502,7 +22600,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 Text_IO C_Streams a-tiocst ads,Ada Strings Wide_Unbounded Wide_Text_IO a-swuwti ads,The GNAT Library
-@anchor{gnat_rm/the_gnat_library ada-strings-wide-wide-unbounded-wide-wide-text-io-a-szuzti-ads}@anchor{2b6}@anchor{gnat_rm/the_gnat_library id26}@anchor{2b7}
+@anchor{gnat_rm/the_gnat_library ada-strings-wide-wide-unbounded-wide-wide-text-io-a-szuzti-ads}@anchor{2b9}@anchor{gnat_rm/the_gnat_library id26}@anchor{2ba}
@section @cite{Ada.Strings.Wide_Wide_Unbounded.Wide_Wide_Text_IO} (@code{a-szuzti.ads})
@@ -22519,7 +22617,7 @@ wide wide strings, avoiding the necessity for an intermediate operation
with ordinary wide wide strings.
@node Ada Text_IO C_Streams a-tiocst ads,Ada Text_IO Reset_Standard_Files a-tirsfi ads,Ada Strings Wide_Wide_Unbounded Wide_Wide_Text_IO a-szuzti ads,The GNAT Library
-@anchor{gnat_rm/the_gnat_library ada-text-io-c-streams-a-tiocst-ads}@anchor{2b8}@anchor{gnat_rm/the_gnat_library id27}@anchor{2b9}
+@anchor{gnat_rm/the_gnat_library ada-text-io-c-streams-a-tiocst-ads}@anchor{2bb}@anchor{gnat_rm/the_gnat_library id27}@anchor{2bc}
@section @cite{Ada.Text_IO.C_Streams} (@code{a-tiocst.ads})
@@ -22534,7 +22632,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 id28}@anchor{2ba}@anchor{gnat_rm/the_gnat_library ada-text-io-reset-standard-files-a-tirsfi-ads}@anchor{2bb}
+@anchor{gnat_rm/the_gnat_library id28}@anchor{2bd}@anchor{gnat_rm/the_gnat_library ada-text-io-reset-standard-files-a-tirsfi-ads}@anchor{2be}
@section @cite{Ada.Text_IO.Reset_Standard_Files} (@code{a-tirsfi.ads})
@@ -22549,7 +22647,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 id29}@anchor{2bc}@anchor{gnat_rm/the_gnat_library ada-wide-characters-unicode-a-wichun-ads}@anchor{2bd}
+@anchor{gnat_rm/the_gnat_library id29}@anchor{2bf}@anchor{gnat_rm/the_gnat_library ada-wide-characters-unicode-a-wichun-ads}@anchor{2c0}
@section @cite{Ada.Wide_Characters.Unicode} (@code{a-wichun.ads})
@@ -22562,7 +22660,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 ada-wide-text-io-c-streams-a-wtcstr-ads}@anchor{2be}@anchor{gnat_rm/the_gnat_library id30}@anchor{2bf}
+@anchor{gnat_rm/the_gnat_library ada-wide-text-io-c-streams-a-wtcstr-ads}@anchor{2c1}@anchor{gnat_rm/the_gnat_library id30}@anchor{2c2}
@section @cite{Ada.Wide_Text_IO.C_Streams} (@code{a-wtcstr.ads})
@@ -22577,7 +22675,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{2c0}@anchor{gnat_rm/the_gnat_library id31}@anchor{2c1}
+@anchor{gnat_rm/the_gnat_library ada-wide-text-io-reset-standard-files-a-wrstfi-ads}@anchor{2c3}@anchor{gnat_rm/the_gnat_library id31}@anchor{2c4}
@section @cite{Ada.Wide_Text_IO.Reset_Standard_Files} (@code{a-wrstfi.ads})
@@ -22592,7 +22690,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 id32}@anchor{2c2}@anchor{gnat_rm/the_gnat_library ada-wide-wide-characters-unicode-a-zchuni-ads}@anchor{2c3}
+@anchor{gnat_rm/the_gnat_library id32}@anchor{2c5}@anchor{gnat_rm/the_gnat_library ada-wide-wide-characters-unicode-a-zchuni-ads}@anchor{2c6}
@section @cite{Ada.Wide_Wide_Characters.Unicode} (@code{a-zchuni.ads})
@@ -22605,7 +22703,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 id33}@anchor{2c4}@anchor{gnat_rm/the_gnat_library ada-wide-wide-text-io-c-streams-a-ztcstr-ads}@anchor{2c5}
+@anchor{gnat_rm/the_gnat_library id33}@anchor{2c7}@anchor{gnat_rm/the_gnat_library ada-wide-wide-text-io-c-streams-a-ztcstr-ads}@anchor{2c8}
@section @cite{Ada.Wide_Wide_Text_IO.C_Streams} (@code{a-ztcstr.ads})
@@ -22620,7 +22718,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 id34}@anchor{2c6}@anchor{gnat_rm/the_gnat_library ada-wide-wide-text-io-reset-standard-files-a-zrstfi-ads}@anchor{2c7}
+@anchor{gnat_rm/the_gnat_library id34}@anchor{2c9}@anchor{gnat_rm/the_gnat_library ada-wide-wide-text-io-reset-standard-files-a-zrstfi-ads}@anchor{2ca}
@section @cite{Ada.Wide_Wide_Text_IO.Reset_Standard_Files} (@code{a-zrstfi.ads})
@@ -22635,7 +22733,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{2c8}@anchor{gnat_rm/the_gnat_library id35}@anchor{2c9}
+@anchor{gnat_rm/the_gnat_library gnat-altivec-g-altive-ads}@anchor{2cb}@anchor{gnat_rm/the_gnat_library id35}@anchor{2cc}
@section @cite{GNAT.Altivec} (@code{g-altive.ads})
@@ -22648,7 +22746,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 id36}@anchor{2ca}@anchor{gnat_rm/the_gnat_library gnat-altivec-conversions-g-altcon-ads}@anchor{2cb}
+@anchor{gnat_rm/the_gnat_library id36}@anchor{2cd}@anchor{gnat_rm/the_gnat_library gnat-altivec-conversions-g-altcon-ads}@anchor{2ce}
@section @cite{GNAT.Altivec.Conversions} (@code{g-altcon.ads})
@@ -22659,7 +22757,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 id37}@anchor{2cc}@anchor{gnat_rm/the_gnat_library gnat-altivec-vector-operations-g-alveop-ads}@anchor{2cd}
+@anchor{gnat_rm/the_gnat_library id37}@anchor{2cf}@anchor{gnat_rm/the_gnat_library gnat-altivec-vector-operations-g-alveop-ads}@anchor{2d0}
@section @cite{GNAT.Altivec.Vector_Operations} (@code{g-alveop.ads})
@@ -22673,7 +22771,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{2ce}@anchor{gnat_rm/the_gnat_library id38}@anchor{2cf}
+@anchor{gnat_rm/the_gnat_library gnat-altivec-vector-types-g-alvety-ads}@anchor{2d1}@anchor{gnat_rm/the_gnat_library id38}@anchor{2d2}
@section @cite{GNAT.Altivec.Vector_Types} (@code{g-alvety.ads})
@@ -22685,7 +22783,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{2d0}@anchor{gnat_rm/the_gnat_library id39}@anchor{2d1}
+@anchor{gnat_rm/the_gnat_library gnat-altivec-vector-views-g-alvevi-ads}@anchor{2d3}@anchor{gnat_rm/the_gnat_library id39}@anchor{2d4}
@section @cite{GNAT.Altivec.Vector_Views} (@code{g-alvevi.ads})
@@ -22700,7 +22798,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{2d2}@anchor{gnat_rm/the_gnat_library id40}@anchor{2d3}
+@anchor{gnat_rm/the_gnat_library gnat-array-split-g-arrspl-ads}@anchor{2d5}@anchor{gnat_rm/the_gnat_library id40}@anchor{2d6}
@section @cite{GNAT.Array_Split} (@code{g-arrspl.ads})
@@ -22713,7 +22811,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 id41}@anchor{2d4}@anchor{gnat_rm/the_gnat_library gnat-awk-g-awk-ads}@anchor{2d5}
+@anchor{gnat_rm/the_gnat_library id41}@anchor{2d7}@anchor{gnat_rm/the_gnat_library gnat-awk-g-awk-ads}@anchor{2d8}
@section @cite{GNAT.AWK} (@code{g-awk.ads})
@@ -22728,7 +22826,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 Bounded_Buffers g-boubuf ads,GNAT AWK g-awk ads,The GNAT Library
-@anchor{gnat_rm/the_gnat_library gnat-bind-environment-g-binenv-ads}@anchor{2d6}@anchor{gnat_rm/the_gnat_library id42}@anchor{2d7}
+@anchor{gnat_rm/the_gnat_library gnat-bind-environment-g-binenv-ads}@anchor{2d9}@anchor{gnat_rm/the_gnat_library id42}@anchor{2da}
@section @cite{GNAT.Bind_Environment} (@code{g-binenv.ads})
@@ -22741,7 +22839,7 @@ These associations can be specified using the @cite{-V} binder command
line switch.
@node GNAT Bounded_Buffers g-boubuf ads,GNAT Bounded_Mailboxes g-boumai ads,GNAT Bind_Environment g-binenv ads,The GNAT Library
-@anchor{gnat_rm/the_gnat_library gnat-bounded-buffers-g-boubuf-ads}@anchor{2d8}@anchor{gnat_rm/the_gnat_library id43}@anchor{2d9}
+@anchor{gnat_rm/the_gnat_library gnat-bounded-buffers-g-boubuf-ads}@anchor{2db}@anchor{gnat_rm/the_gnat_library id43}@anchor{2dc}
@section @cite{GNAT.Bounded_Buffers} (@code{g-boubuf.ads})
@@ -22756,7 +22854,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 id44}@anchor{2da}@anchor{gnat_rm/the_gnat_library gnat-bounded-mailboxes-g-boumai-ads}@anchor{2db}
+@anchor{gnat_rm/the_gnat_library id44}@anchor{2dd}@anchor{gnat_rm/the_gnat_library gnat-bounded-mailboxes-g-boumai-ads}@anchor{2de}
@section @cite{GNAT.Bounded_Mailboxes} (@code{g-boumai.ads})
@@ -22769,7 +22867,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{2dc}@anchor{gnat_rm/the_gnat_library id45}@anchor{2dd}
+@anchor{gnat_rm/the_gnat_library gnat-bubble-sort-g-bubsor-ads}@anchor{2df}@anchor{gnat_rm/the_gnat_library id45}@anchor{2e0}
@section @cite{GNAT.Bubble_Sort} (@code{g-bubsor.ads})
@@ -22784,7 +22882,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 id46}@anchor{2de}@anchor{gnat_rm/the_gnat_library gnat-bubble-sort-a-g-busora-ads}@anchor{2df}
+@anchor{gnat_rm/the_gnat_library id46}@anchor{2e1}@anchor{gnat_rm/the_gnat_library gnat-bubble-sort-a-g-busora-ads}@anchor{2e2}
@section @cite{GNAT.Bubble_Sort_A} (@code{g-busora.ads})
@@ -22800,7 +22898,7 @@ access-to-procedure values. This is an older version, retained for
compatibility. Usually @cite{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 id47}@anchor{2e0}@anchor{gnat_rm/the_gnat_library gnat-bubble-sort-g-g-busorg-ads}@anchor{2e1}
+@anchor{gnat_rm/the_gnat_library id47}@anchor{2e3}@anchor{gnat_rm/the_gnat_library gnat-bubble-sort-g-g-busorg-ads}@anchor{2e4}
@section @cite{GNAT.Bubble_Sort_G} (@code{g-busorg.ads})
@@ -22816,7 +22914,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{2e2}@anchor{gnat_rm/the_gnat_library id48}@anchor{2e3}
+@anchor{gnat_rm/the_gnat_library gnat-byte-order-mark-g-byorma-ads}@anchor{2e5}@anchor{gnat_rm/the_gnat_library id48}@anchor{2e6}
@section @cite{GNAT.Byte_Order_Mark} (@code{g-byorma.ads})
@@ -22832,7 +22930,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{2e4}@anchor{gnat_rm/the_gnat_library id49}@anchor{2e5}
+@anchor{gnat_rm/the_gnat_library gnat-byte-swapping-g-bytswa-ads}@anchor{2e7}@anchor{gnat_rm/the_gnat_library id49}@anchor{2e8}
@section @cite{GNAT.Byte_Swapping} (@code{g-bytswa.ads})
@@ -22846,7 +22944,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 id50}@anchor{2e6}@anchor{gnat_rm/the_gnat_library gnat-calendar-g-calend-ads}@anchor{2e7}
+@anchor{gnat_rm/the_gnat_library id50}@anchor{2e9}@anchor{gnat_rm/the_gnat_library gnat-calendar-g-calend-ads}@anchor{2ea}
@section @cite{GNAT.Calendar} (@code{g-calend.ads})
@@ -22860,7 +22958,7 @@ Also provides conversion of @cite{Ada.Calendar.Time} values to and from the
C @cite{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 gnat-calendar-time-io-g-catiio-ads}@anchor{2e8}@anchor{gnat_rm/the_gnat_library id51}@anchor{2e9}
+@anchor{gnat_rm/the_gnat_library gnat-calendar-time-io-g-catiio-ads}@anchor{2eb}@anchor{gnat_rm/the_gnat_library id51}@anchor{2ec}
@section @cite{GNAT.Calendar.Time_IO} (@code{g-catiio.ads})
@@ -22871,7 +22969,7 @@ C @cite{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 id52}@anchor{2ea}@anchor{gnat_rm/the_gnat_library gnat-crc32-g-crc32-ads}@anchor{2eb}
+@anchor{gnat_rm/the_gnat_library id52}@anchor{2ed}@anchor{gnat_rm/the_gnat_library gnat-crc32-g-crc32-ads}@anchor{2ee}
@section @cite{GNAT.CRC32} (@code{g-crc32.ads})
@@ -22888,7 +22986,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 gnat-case-util-g-casuti-ads}@anchor{2ec}@anchor{gnat_rm/the_gnat_library id53}@anchor{2ed}
+@anchor{gnat_rm/the_gnat_library gnat-case-util-g-casuti-ads}@anchor{2ef}@anchor{gnat_rm/the_gnat_library id53}@anchor{2f0}
@section @cite{GNAT.Case_Util} (@code{g-casuti.ads})
@@ -22903,7 +23001,7 @@ without the overhead of the full casing tables
in @cite{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 id54}@anchor{2ee}@anchor{gnat_rm/the_gnat_library gnat-cgi-g-cgi-ads}@anchor{2ef}
+@anchor{gnat_rm/the_gnat_library id54}@anchor{2f1}@anchor{gnat_rm/the_gnat_library gnat-cgi-g-cgi-ads}@anchor{2f2}
@section @cite{GNAT.CGI} (@code{g-cgi.ads})
@@ -22918,7 +23016,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{2f0}@anchor{gnat_rm/the_gnat_library id55}@anchor{2f1}
+@anchor{gnat_rm/the_gnat_library gnat-cgi-cookie-g-cgicoo-ads}@anchor{2f3}@anchor{gnat_rm/the_gnat_library id55}@anchor{2f4}
@section @cite{GNAT.CGI.Cookie} (@code{g-cgicoo.ads})
@@ -22933,7 +23031,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{2f2}@anchor{gnat_rm/the_gnat_library id56}@anchor{2f3}
+@anchor{gnat_rm/the_gnat_library gnat-cgi-debug-g-cgideb-ads}@anchor{2f5}@anchor{gnat_rm/the_gnat_library id56}@anchor{2f6}
@section @cite{GNAT.CGI.Debug} (@code{g-cgideb.ads})
@@ -22945,7 +23043,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 id57}@anchor{2f4}@anchor{gnat_rm/the_gnat_library gnat-command-line-g-comlin-ads}@anchor{2f5}
+@anchor{gnat_rm/the_gnat_library id57}@anchor{2f7}@anchor{gnat_rm/the_gnat_library gnat-command-line-g-comlin-ads}@anchor{2f8}
@section @cite{GNAT.Command_Line} (@code{g-comlin.ads})
@@ -22958,7 +23056,7 @@ including the ability to scan for named switches with optional parameters
and expand file names using wild card 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{2f6}@anchor{gnat_rm/the_gnat_library id58}@anchor{2f7}
+@anchor{gnat_rm/the_gnat_library gnat-compiler-version-g-comver-ads}@anchor{2f9}@anchor{gnat_rm/the_gnat_library id58}@anchor{2fa}
@section @cite{GNAT.Compiler_Version} (@code{g-comver.ads})
@@ -22976,7 +23074,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 gnat-ctrl-c-g-ctrl-c-ads}@anchor{2f8}@anchor{gnat_rm/the_gnat_library id59}@anchor{2f9}
+@anchor{gnat_rm/the_gnat_library gnat-ctrl-c-g-ctrl-c-ads}@anchor{2fb}@anchor{gnat_rm/the_gnat_library id59}@anchor{2fc}
@section @cite{GNAT.Ctrl_C} (@code{g-ctrl_c.ads})
@@ -22987,7 +23085,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 id60}@anchor{2fa}@anchor{gnat_rm/the_gnat_library gnat-current-exception-g-curexc-ads}@anchor{2fb}
+@anchor{gnat_rm/the_gnat_library id60}@anchor{2fd}@anchor{gnat_rm/the_gnat_library gnat-current-exception-g-curexc-ads}@anchor{2fe}
@section @cite{GNAT.Current_Exception} (@code{g-curexc.ads})
@@ -23004,7 +23102,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{2fc}@anchor{gnat_rm/the_gnat_library id61}@anchor{2fd}
+@anchor{gnat_rm/the_gnat_library gnat-debug-pools-g-debpoo-ads}@anchor{2ff}@anchor{gnat_rm/the_gnat_library id61}@anchor{300}
@section @cite{GNAT.Debug_Pools} (@code{g-debpoo.ads})
@@ -23021,7 +23119,7 @@ problems.
See @cite{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{2fe}@anchor{gnat_rm/the_gnat_library id62}@anchor{2ff}
+@anchor{gnat_rm/the_gnat_library gnat-debug-utilities-g-debuti-ads}@anchor{301}@anchor{gnat_rm/the_gnat_library id62}@anchor{302}
@section @cite{GNAT.Debug_Utilities} (@code{g-debuti.ads})
@@ -23034,7 +23132,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{300}@anchor{gnat_rm/the_gnat_library id63}@anchor{301}
+@anchor{gnat_rm/the_gnat_library gnat-decode-string-g-decstr-ads}@anchor{303}@anchor{gnat_rm/the_gnat_library id63}@anchor{304}
@section @cite{GNAT.Decode_String} (@code{g-decstr.ads})
@@ -23058,7 +23156,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{302}@anchor{gnat_rm/the_gnat_library id64}@anchor{303}
+@anchor{gnat_rm/the_gnat_library gnat-decode-utf8-string-g-deutst-ads}@anchor{305}@anchor{gnat_rm/the_gnat_library id64}@anchor{306}
@section @cite{GNAT.Decode_UTF8_String} (@code{g-deutst.ads})
@@ -23079,7 +23177,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 id65}@anchor{304}@anchor{gnat_rm/the_gnat_library gnat-directory-operations-g-dirope-ads}@anchor{305}
+@anchor{gnat_rm/the_gnat_library id65}@anchor{307}@anchor{gnat_rm/the_gnat_library gnat-directory-operations-g-dirope-ads}@anchor{308}
@section @cite{GNAT.Directory_Operations} (@code{g-dirope.ads})
@@ -23092,7 +23190,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 id66}@anchor{306}@anchor{gnat_rm/the_gnat_library gnat-directory-operations-iteration-g-diopit-ads}@anchor{307}
+@anchor{gnat_rm/the_gnat_library id66}@anchor{309}@anchor{gnat_rm/the_gnat_library gnat-directory-operations-iteration-g-diopit-ads}@anchor{30a}
@section @cite{GNAT.Directory_Operations.Iteration} (@code{g-diopit.ads})
@@ -23104,7 +23202,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 id67}@anchor{308}@anchor{gnat_rm/the_gnat_library gnat-dynamic-htables-g-dynhta-ads}@anchor{309}
+@anchor{gnat_rm/the_gnat_library id67}@anchor{30b}@anchor{gnat_rm/the_gnat_library gnat-dynamic-htables-g-dynhta-ads}@anchor{30c}
@section @cite{GNAT.Dynamic_HTables} (@code{g-dynhta.ads})
@@ -23122,7 +23220,7 @@ dynamic instances of the hash table, while an instantiation of
@cite{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{30a}@anchor{gnat_rm/the_gnat_library id68}@anchor{30b}
+@anchor{gnat_rm/the_gnat_library gnat-dynamic-tables-g-dyntab-ads}@anchor{30d}@anchor{gnat_rm/the_gnat_library id68}@anchor{30e}
@section @cite{GNAT.Dynamic_Tables} (@code{g-dyntab.ads})
@@ -23142,7 +23240,7 @@ dynamic instances of the table, while an instantiation of
@cite{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 id69}@anchor{30c}@anchor{gnat_rm/the_gnat_library gnat-encode-string-g-encstr-ads}@anchor{30d}
+@anchor{gnat_rm/the_gnat_library id69}@anchor{30f}@anchor{gnat_rm/the_gnat_library gnat-encode-string-g-encstr-ads}@anchor{310}
@section @cite{GNAT.Encode_String} (@code{g-encstr.ads})
@@ -23164,7 +23262,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{30e}@anchor{gnat_rm/the_gnat_library id70}@anchor{30f}
+@anchor{gnat_rm/the_gnat_library gnat-encode-utf8-string-g-enutst-ads}@anchor{311}@anchor{gnat_rm/the_gnat_library id70}@anchor{312}
@section @cite{GNAT.Encode_UTF8_String} (@code{g-enutst.ads})
@@ -23185,7 +23283,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 id71}@anchor{310}@anchor{gnat_rm/the_gnat_library gnat-exception-actions-g-excact-ads}@anchor{311}
+@anchor{gnat_rm/the_gnat_library id71}@anchor{313}@anchor{gnat_rm/the_gnat_library gnat-exception-actions-g-excact-ads}@anchor{314}
@section @cite{GNAT.Exception_Actions} (@code{g-excact.ads})
@@ -23198,7 +23296,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-expect ads,GNAT Exception_Actions g-excact ads,The GNAT Library
-@anchor{gnat_rm/the_gnat_library id72}@anchor{312}@anchor{gnat_rm/the_gnat_library gnat-exception-traces-g-exctra-ads}@anchor{313}
+@anchor{gnat_rm/the_gnat_library id72}@anchor{315}@anchor{gnat_rm/the_gnat_library gnat-exception-traces-g-exctra-ads}@anchor{316}
@section @cite{GNAT.Exception_Traces} (@code{g-exctra.ads})
@@ -23212,7 +23310,7 @@ Provides an interface allowing to control automatic output upon exception
occurrences.
@node GNAT Exceptions g-expect ads,GNAT Expect g-expect ads,GNAT Exception_Traces g-exctra ads,The GNAT Library
-@anchor{gnat_rm/the_gnat_library id73}@anchor{314}@anchor{gnat_rm/the_gnat_library gnat-exceptions-g-expect-ads}@anchor{315}
+@anchor{gnat_rm/the_gnat_library id73}@anchor{317}@anchor{gnat_rm/the_gnat_library gnat-exceptions-g-expect-ads}@anchor{318}
@section @cite{GNAT.Exceptions} (@code{g-expect.ads})
@@ -23233,7 +23331,7 @@ predefined exceptions, and for example allow raising
@cite{Constraint_Error} with a message from a pure subprogram.
@node GNAT Expect g-expect ads,GNAT Expect TTY g-exptty ads,GNAT Exceptions g-expect ads,The GNAT Library
-@anchor{gnat_rm/the_gnat_library gnat-expect-g-expect-ads}@anchor{316}@anchor{gnat_rm/the_gnat_library id74}@anchor{317}
+@anchor{gnat_rm/the_gnat_library gnat-expect-g-expect-ads}@anchor{319}@anchor{gnat_rm/the_gnat_library id74}@anchor{31a}
@section @cite{GNAT.Expect} (@code{g-expect.ads})
@@ -23249,7 +23347,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 gnat-expect-tty-g-exptty-ads}@anchor{318}@anchor{gnat_rm/the_gnat_library id75}@anchor{319}
+@anchor{gnat_rm/the_gnat_library gnat-expect-tty-g-exptty-ads}@anchor{31b}@anchor{gnat_rm/the_gnat_library id75}@anchor{31c}
@section @cite{GNAT.Expect.TTY} (@code{g-exptty.ads})
@@ -23261,7 +23359,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 id76}@anchor{31a}@anchor{gnat_rm/the_gnat_library gnat-float-control-g-flocon-ads}@anchor{31b}
+@anchor{gnat_rm/the_gnat_library id76}@anchor{31d}@anchor{gnat_rm/the_gnat_library gnat-float-control-g-flocon-ads}@anchor{31e}
@section @cite{GNAT.Float_Control} (@code{g-flocon.ads})
@@ -23275,7 +23373,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 gnat-formatted-string-g-forstr-ads}@anchor{31c}@anchor{gnat_rm/the_gnat_library id77}@anchor{31d}
+@anchor{gnat_rm/the_gnat_library gnat-formatted-string-g-forstr-ads}@anchor{31f}@anchor{gnat_rm/the_gnat_library id77}@anchor{320}
@section @cite{GNAT.Formatted_String} (@code{g-forstr.ads})
@@ -23290,7 +23388,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 gnat-heap-sort-g-heasor-ads}@anchor{31e}@anchor{gnat_rm/the_gnat_library id78}@anchor{31f}
+@anchor{gnat_rm/the_gnat_library gnat-heap-sort-g-heasor-ads}@anchor{321}@anchor{gnat_rm/the_gnat_library id78}@anchor{322}
@section @cite{GNAT.Heap_Sort} (@code{g-heasor.ads})
@@ -23304,7 +23402,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 id79}@anchor{320}@anchor{gnat_rm/the_gnat_library gnat-heap-sort-a-g-hesora-ads}@anchor{321}
+@anchor{gnat_rm/the_gnat_library id79}@anchor{323}@anchor{gnat_rm/the_gnat_library gnat-heap-sort-a-g-hesora-ads}@anchor{324}
@section @cite{GNAT.Heap_Sort_A} (@code{g-hesora.ads})
@@ -23320,7 +23418,7 @@ This differs from @cite{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 id80}@anchor{322}@anchor{gnat_rm/the_gnat_library gnat-heap-sort-g-g-hesorg-ads}@anchor{323}
+@anchor{gnat_rm/the_gnat_library id80}@anchor{325}@anchor{gnat_rm/the_gnat_library gnat-heap-sort-g-g-hesorg-ads}@anchor{326}
@section @cite{GNAT.Heap_Sort_G} (@code{g-hesorg.ads})
@@ -23334,7 +23432,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 id81}@anchor{324}@anchor{gnat_rm/the_gnat_library gnat-htable-g-htable-ads}@anchor{325}
+@anchor{gnat_rm/the_gnat_library id81}@anchor{327}@anchor{gnat_rm/the_gnat_library gnat-htable-g-htable-ads}@anchor{328}
@section @cite{GNAT.HTable} (@code{g-htable.ads})
@@ -23347,7 +23445,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 id82}@anchor{326}@anchor{gnat_rm/the_gnat_library gnat-io-g-io-ads}@anchor{327}
+@anchor{gnat_rm/the_gnat_library id82}@anchor{329}@anchor{gnat_rm/the_gnat_library gnat-io-g-io-ads}@anchor{32a}
@section @cite{GNAT.IO} (@code{g-io.ads})
@@ -23363,7 +23461,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 id83}@anchor{328}@anchor{gnat_rm/the_gnat_library gnat-io-aux-g-io-aux-ads}@anchor{329}
+@anchor{gnat_rm/the_gnat_library id83}@anchor{32b}@anchor{gnat_rm/the_gnat_library gnat-io-aux-g-io-aux-ads}@anchor{32c}
@section @cite{GNAT.IO_Aux} (@code{g-io_aux.ads})
@@ -23377,7 +23475,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 gnat-lock-files-g-locfil-ads}@anchor{32a}@anchor{gnat_rm/the_gnat_library id84}@anchor{32b}
+@anchor{gnat_rm/the_gnat_library gnat-lock-files-g-locfil-ads}@anchor{32d}@anchor{gnat_rm/the_gnat_library id84}@anchor{32e}
@section @cite{GNAT.Lock_Files} (@code{g-locfil.ads})
@@ -23391,7 +23489,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 id85}@anchor{32c}@anchor{gnat_rm/the_gnat_library gnat-mbbs-discrete-random-g-mbdira-ads}@anchor{32d}
+@anchor{gnat_rm/the_gnat_library id85}@anchor{32f}@anchor{gnat_rm/the_gnat_library gnat-mbbs-discrete-random-g-mbdira-ads}@anchor{330}
@section @cite{GNAT.MBBS_Discrete_Random} (@code{g-mbdira.ads})
@@ -23403,7 +23501,7 @@ The original implementation of @cite{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 id86}@anchor{32e}@anchor{gnat_rm/the_gnat_library gnat-mbbs-float-random-g-mbflra-ads}@anchor{32f}
+@anchor{gnat_rm/the_gnat_library id86}@anchor{331}@anchor{gnat_rm/the_gnat_library gnat-mbbs-float-random-g-mbflra-ads}@anchor{332}
@section @cite{GNAT.MBBS_Float_Random} (@code{g-mbflra.ads})
@@ -23415,7 +23513,7 @@ The original implementation of @cite{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 id87}@anchor{330}@anchor{gnat_rm/the_gnat_library gnat-md5-g-md5-ads}@anchor{331}
+@anchor{gnat_rm/the_gnat_library id87}@anchor{333}@anchor{gnat_rm/the_gnat_library gnat-md5-g-md5-ads}@anchor{334}
@section @cite{GNAT.MD5} (@code{g-md5.ads})
@@ -23428,7 +23526,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 id88}@anchor{332}@anchor{gnat_rm/the_gnat_library gnat-memory-dump-g-memdum-ads}@anchor{333}
+@anchor{gnat_rm/the_gnat_library id88}@anchor{335}@anchor{gnat_rm/the_gnat_library gnat-memory-dump-g-memdum-ads}@anchor{336}
@section @cite{GNAT.Memory_Dump} (@code{g-memdum.ads})
@@ -23441,7 +23539,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 id89}@anchor{334}@anchor{gnat_rm/the_gnat_library gnat-most-recent-exception-g-moreex-ads}@anchor{335}
+@anchor{gnat_rm/the_gnat_library id89}@anchor{337}@anchor{gnat_rm/the_gnat_library gnat-most-recent-exception-g-moreex-ads}@anchor{338}
@section @cite{GNAT.Most_Recent_Exception} (@code{g-moreex.ads})
@@ -23455,7 +23553,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 id90}@anchor{336}@anchor{gnat_rm/the_gnat_library gnat-os-lib-g-os-lib-ads}@anchor{337}
+@anchor{gnat_rm/the_gnat_library id90}@anchor{339}@anchor{gnat_rm/the_gnat_library gnat-os-lib-g-os-lib-ads}@anchor{33a}
@section @cite{GNAT.OS_Lib} (@code{g-os_lib.ads})
@@ -23471,7 +23569,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{338}@anchor{gnat_rm/the_gnat_library id91}@anchor{339}
+@anchor{gnat_rm/the_gnat_library gnat-perfect-hash-generators-g-pehage-ads}@anchor{33b}@anchor{gnat_rm/the_gnat_library id91}@anchor{33c}
@section @cite{GNAT.Perfect_Hash_Generators} (@code{g-pehage.ads})
@@ -23489,7 +23587,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{33a}@anchor{gnat_rm/the_gnat_library id92}@anchor{33b}
+@anchor{gnat_rm/the_gnat_library gnat-random-numbers-g-rannum-ads}@anchor{33d}@anchor{gnat_rm/the_gnat_library id92}@anchor{33e}
@section @cite{GNAT.Random_Numbers} (@code{g-rannum.ads})
@@ -23501,7 +23599,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 gnat-regexp-g-regexp-ads}@anchor{20d}@anchor{gnat_rm/the_gnat_library id93}@anchor{33c}
+@anchor{gnat_rm/the_gnat_library gnat-regexp-g-regexp-ads}@anchor{210}@anchor{gnat_rm/the_gnat_library id93}@anchor{33f}
@section @cite{GNAT.Regexp} (@code{g-regexp.ads})
@@ -23517,7 +23615,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 id94}@anchor{33d}@anchor{gnat_rm/the_gnat_library gnat-registry-g-regist-ads}@anchor{33e}
+@anchor{gnat_rm/the_gnat_library id94}@anchor{340}@anchor{gnat_rm/the_gnat_library gnat-registry-g-regist-ads}@anchor{341}
@section @cite{GNAT.Registry} (@code{g-regist.ads})
@@ -23531,7 +23629,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 gnat-regpat-g-regpat-ads}@anchor{33f}@anchor{gnat_rm/the_gnat_library id95}@anchor{340}
+@anchor{gnat_rm/the_gnat_library gnat-regpat-g-regpat-ads}@anchor{342}@anchor{gnat_rm/the_gnat_library id95}@anchor{343}
@section @cite{GNAT.Regpat} (@code{g-regpat.ads})
@@ -23546,7 +23644,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 id96}@anchor{341}@anchor{gnat_rm/the_gnat_library gnat-rewrite-data-g-rewdat-ads}@anchor{342}
+@anchor{gnat_rm/the_gnat_library id96}@anchor{344}@anchor{gnat_rm/the_gnat_library gnat-rewrite-data-g-rewdat-ads}@anchor{345}
@section @cite{GNAT.Rewrite_Data} (@code{g-rewdat.ads})
@@ -23560,7 +23658,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{343}@anchor{gnat_rm/the_gnat_library id97}@anchor{344}
+@anchor{gnat_rm/the_gnat_library gnat-secondary-stack-info-g-sestin-ads}@anchor{346}@anchor{gnat_rm/the_gnat_library id97}@anchor{347}
@section @cite{GNAT.Secondary_Stack_Info} (@code{g-sestin.ads})
@@ -23572,7 +23670,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 id98}@anchor{345}@anchor{gnat_rm/the_gnat_library gnat-semaphores-g-semaph-ads}@anchor{346}
+@anchor{gnat_rm/the_gnat_library id98}@anchor{348}@anchor{gnat_rm/the_gnat_library gnat-semaphores-g-semaph-ads}@anchor{349}
@section @cite{GNAT.Semaphores} (@code{g-semaph.ads})
@@ -23583,7 +23681,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{347}@anchor{gnat_rm/the_gnat_library id99}@anchor{348}
+@anchor{gnat_rm/the_gnat_library gnat-serial-communications-g-sercom-ads}@anchor{34a}@anchor{gnat_rm/the_gnat_library id99}@anchor{34b}
@section @cite{GNAT.Serial_Communications} (@code{g-sercom.ads})
@@ -23595,7 +23693,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{349}@anchor{gnat_rm/the_gnat_library id100}@anchor{34a}
+@anchor{gnat_rm/the_gnat_library gnat-sha1-g-sha1-ads}@anchor{34c}@anchor{gnat_rm/the_gnat_library id100}@anchor{34d}
@section @cite{GNAT.SHA1} (@code{g-sha1.ads})
@@ -23608,7 +23706,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 id101}@anchor{34b}@anchor{gnat_rm/the_gnat_library gnat-sha224-g-sha224-ads}@anchor{34c}
+@anchor{gnat_rm/the_gnat_library id101}@anchor{34e}@anchor{gnat_rm/the_gnat_library gnat-sha224-g-sha224-ads}@anchor{34f}
@section @cite{GNAT.SHA224} (@code{g-sha224.ads})
@@ -23621,7 +23719,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 id102}@anchor{34d}@anchor{gnat_rm/the_gnat_library gnat-sha256-g-sha256-ads}@anchor{34e}
+@anchor{gnat_rm/the_gnat_library id102}@anchor{350}@anchor{gnat_rm/the_gnat_library gnat-sha256-g-sha256-ads}@anchor{351}
@section @cite{GNAT.SHA256} (@code{g-sha256.ads})
@@ -23634,7 +23732,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 id103}@anchor{34f}@anchor{gnat_rm/the_gnat_library gnat-sha384-g-sha384-ads}@anchor{350}
+@anchor{gnat_rm/the_gnat_library id103}@anchor{352}@anchor{gnat_rm/the_gnat_library gnat-sha384-g-sha384-ads}@anchor{353}
@section @cite{GNAT.SHA384} (@code{g-sha384.ads})
@@ -23647,7 +23745,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 gnat-sha512-g-sha512-ads}@anchor{351}@anchor{gnat_rm/the_gnat_library id104}@anchor{352}
+@anchor{gnat_rm/the_gnat_library gnat-sha512-g-sha512-ads}@anchor{354}@anchor{gnat_rm/the_gnat_library id104}@anchor{355}
@section @cite{GNAT.SHA512} (@code{g-sha512.ads})
@@ -23660,7 +23758,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{353}@anchor{gnat_rm/the_gnat_library id105}@anchor{354}
+@anchor{gnat_rm/the_gnat_library gnat-signals-g-signal-ads}@anchor{356}@anchor{gnat_rm/the_gnat_library id105}@anchor{357}
@section @cite{GNAT.Signals} (@code{g-signal.ads})
@@ -23672,7 +23770,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{355}@anchor{gnat_rm/the_gnat_library id106}@anchor{356}
+@anchor{gnat_rm/the_gnat_library gnat-sockets-g-socket-ads}@anchor{358}@anchor{gnat_rm/the_gnat_library id106}@anchor{359}
@section @cite{GNAT.Sockets} (@code{g-socket.ads})
@@ -23687,7 +23785,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{357}@anchor{gnat_rm/the_gnat_library id107}@anchor{358}
+@anchor{gnat_rm/the_gnat_library gnat-source-info-g-souinf-ads}@anchor{35a}@anchor{gnat_rm/the_gnat_library id107}@anchor{35b}
@section @cite{GNAT.Source_Info} (@code{g-souinf.ads})
@@ -23701,7 +23799,7 @@ subprograms yielding the date and time of the current compilation (like the
C macros @cite{__DATE__} and @cite{__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{359}@anchor{gnat_rm/the_gnat_library id108}@anchor{35a}
+@anchor{gnat_rm/the_gnat_library gnat-spelling-checker-g-speche-ads}@anchor{35c}@anchor{gnat_rm/the_gnat_library id108}@anchor{35d}
@section @cite{GNAT.Spelling_Checker} (@code{g-speche.ads})
@@ -23713,7 +23811,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 id109}@anchor{35b}@anchor{gnat_rm/the_gnat_library gnat-spelling-checker-generic-g-spchge-ads}@anchor{35c}
+@anchor{gnat_rm/the_gnat_library id109}@anchor{35e}@anchor{gnat_rm/the_gnat_library gnat-spelling-checker-generic-g-spchge-ads}@anchor{35f}
@section @cite{GNAT.Spelling_Checker_Generic} (@code{g-spchge.ads})
@@ -23726,7 +23824,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 id110}@anchor{35d}@anchor{gnat_rm/the_gnat_library gnat-spitbol-patterns-g-spipat-ads}@anchor{35e}
+@anchor{gnat_rm/the_gnat_library id110}@anchor{360}@anchor{gnat_rm/the_gnat_library gnat-spitbol-patterns-g-spipat-ads}@anchor{361}
@section @cite{GNAT.Spitbol.Patterns} (@code{g-spipat.ads})
@@ -23742,7 +23840,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 id111}@anchor{35f}@anchor{gnat_rm/the_gnat_library gnat-spitbol-g-spitbo-ads}@anchor{360}
+@anchor{gnat_rm/the_gnat_library id111}@anchor{362}@anchor{gnat_rm/the_gnat_library gnat-spitbol-g-spitbo-ads}@anchor{363}
@section @cite{GNAT.Spitbol} (@code{g-spitbo.ads})
@@ -23757,7 +23855,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 id112}@anchor{361}@anchor{gnat_rm/the_gnat_library gnat-spitbol-table-boolean-g-sptabo-ads}@anchor{362}
+@anchor{gnat_rm/the_gnat_library id112}@anchor{364}@anchor{gnat_rm/the_gnat_library gnat-spitbol-table-boolean-g-sptabo-ads}@anchor{365}
@section @cite{GNAT.Spitbol.Table_Boolean} (@code{g-sptabo.ads})
@@ -23772,7 +23870,7 @@ for type @cite{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 id113}@anchor{363}@anchor{gnat_rm/the_gnat_library gnat-spitbol-table-integer-g-sptain-ads}@anchor{364}
+@anchor{gnat_rm/the_gnat_library id113}@anchor{366}@anchor{gnat_rm/the_gnat_library gnat-spitbol-table-integer-g-sptain-ads}@anchor{367}
@section @cite{GNAT.Spitbol.Table_Integer} (@code{g-sptain.ads})
@@ -23789,7 +23887,7 @@ for type @cite{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 id114}@anchor{365}@anchor{gnat_rm/the_gnat_library gnat-spitbol-table-vstring-g-sptavs-ads}@anchor{366}
+@anchor{gnat_rm/the_gnat_library id114}@anchor{368}@anchor{gnat_rm/the_gnat_library gnat-spitbol-table-vstring-g-sptavs-ads}@anchor{369}
@section @cite{GNAT.Spitbol.Table_VString} (@code{g-sptavs.ads})
@@ -23806,7 +23904,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 id115}@anchor{367}@anchor{gnat_rm/the_gnat_library gnat-sse-g-sse-ads}@anchor{368}
+@anchor{gnat_rm/the_gnat_library id115}@anchor{36a}@anchor{gnat_rm/the_gnat_library gnat-sse-g-sse-ads}@anchor{36b}
@section @cite{GNAT.SSE} (@code{g-sse.ads})
@@ -23818,7 +23916,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 Strings g-string ads,GNAT SSE g-sse ads,The GNAT Library
-@anchor{gnat_rm/the_gnat_library gnat-sse-vector-types-g-ssvety-ads}@anchor{369}@anchor{gnat_rm/the_gnat_library id116}@anchor{36a}
+@anchor{gnat_rm/the_gnat_library gnat-sse-vector-types-g-ssvety-ads}@anchor{36c}@anchor{gnat_rm/the_gnat_library id116}@anchor{36d}
@section @cite{GNAT.SSE.Vector_Types} (@code{g-ssvety.ads})
@@ -23827,7 +23925,7 @@ introduction to the binding contents and use.
SSE vector types for use with SSE related intrinsics.
@node GNAT Strings g-string ads,GNAT String_Split g-strspl ads,GNAT SSE Vector_Types g-ssvety ads,The GNAT Library
-@anchor{gnat_rm/the_gnat_library gnat-strings-g-string-ads}@anchor{36b}@anchor{gnat_rm/the_gnat_library id117}@anchor{36c}
+@anchor{gnat_rm/the_gnat_library gnat-strings-g-string-ads}@anchor{36e}@anchor{gnat_rm/the_gnat_library id117}@anchor{36f}
@section @cite{GNAT.Strings} (@code{g-string.ads})
@@ -23837,7 +23935,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{36d}@anchor{gnat_rm/the_gnat_library id118}@anchor{36e}
+@anchor{gnat_rm/the_gnat_library gnat-string-split-g-strspl-ads}@anchor{370}@anchor{gnat_rm/the_gnat_library id118}@anchor{371}
@section @cite{GNAT.String_Split} (@code{g-strspl.ads})
@@ -23851,7 +23949,7 @@ to the resulting slices. This package is instantiated from
@cite{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 gnat-table-g-table-ads}@anchor{36f}@anchor{gnat_rm/the_gnat_library id119}@anchor{370}
+@anchor{gnat_rm/the_gnat_library gnat-table-g-table-ads}@anchor{372}@anchor{gnat_rm/the_gnat_library id119}@anchor{373}
@section @cite{GNAT.Table} (@code{g-table.ads})
@@ -23871,7 +23969,7 @@ while an instantiation of @cite{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 gnat-task-lock-g-tasloc-ads}@anchor{371}@anchor{gnat_rm/the_gnat_library id120}@anchor{372}
+@anchor{gnat_rm/the_gnat_library gnat-task-lock-g-tasloc-ads}@anchor{374}@anchor{gnat_rm/the_gnat_library id120}@anchor{375}
@section @cite{GNAT.Task_Lock} (@code{g-tasloc.ads})
@@ -23888,7 +23986,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 gnat-time-stamp-g-timsta-ads}@anchor{373}@anchor{gnat_rm/the_gnat_library id121}@anchor{374}
+@anchor{gnat_rm/the_gnat_library gnat-time-stamp-g-timsta-ads}@anchor{376}@anchor{gnat_rm/the_gnat_library id121}@anchor{377}
@section @cite{GNAT.Time_Stamp} (@code{g-timsta.ads})
@@ -23903,7 +24001,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{375}@anchor{gnat_rm/the_gnat_library id122}@anchor{376}
+@anchor{gnat_rm/the_gnat_library gnat-threads-g-thread-ads}@anchor{378}@anchor{gnat_rm/the_gnat_library id122}@anchor{379}
@section @cite{GNAT.Threads} (@code{g-thread.ads})
@@ -23920,7 +24018,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 id123}@anchor{377}@anchor{gnat_rm/the_gnat_library gnat-traceback-g-traceb-ads}@anchor{378}
+@anchor{gnat_rm/the_gnat_library id123}@anchor{37a}@anchor{gnat_rm/the_gnat_library gnat-traceback-g-traceb-ads}@anchor{37b}
@section @cite{GNAT.Traceback} (@code{g-traceb.ads})
@@ -23932,7 +24030,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 gnat-traceback-symbolic-g-trasym-ads}@anchor{379}@anchor{gnat_rm/the_gnat_library id124}@anchor{37a}
+@anchor{gnat_rm/the_gnat_library gnat-traceback-symbolic-g-trasym-ads}@anchor{37c}@anchor{gnat_rm/the_gnat_library id124}@anchor{37d}
@section @cite{GNAT.Traceback.Symbolic} (@code{g-trasym.ads})
@@ -23941,7 +24039,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 id125}@anchor{37b}@anchor{gnat_rm/the_gnat_library gnat-utf-32-g-table-ads}@anchor{37c}
+@anchor{gnat_rm/the_gnat_library id125}@anchor{37e}@anchor{gnat_rm/the_gnat_library gnat-utf-32-g-table-ads}@anchor{37f}
@section @cite{GNAT.UTF_32} (@code{g-table.ads})
@@ -23960,7 +24058,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{37d}@anchor{gnat_rm/the_gnat_library id126}@anchor{37e}
+@anchor{gnat_rm/the_gnat_library gnat-wide-spelling-checker-g-u3spch-ads}@anchor{380}@anchor{gnat_rm/the_gnat_library id126}@anchor{381}
@section @cite{GNAT.Wide_Spelling_Checker} (@code{g-u3spch.ads})
@@ -23973,7 +24071,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{37f}@anchor{gnat_rm/the_gnat_library id127}@anchor{380}
+@anchor{gnat_rm/the_gnat_library gnat-wide-spelling-checker-g-wispch-ads}@anchor{382}@anchor{gnat_rm/the_gnat_library id127}@anchor{383}
@section @cite{GNAT.Wide_Spelling_Checker} (@code{g-wispch.ads})
@@ -23985,7 +24083,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 gnat-wide-string-split-g-wistsp-ads}@anchor{381}@anchor{gnat_rm/the_gnat_library id128}@anchor{382}
+@anchor{gnat_rm/the_gnat_library gnat-wide-string-split-g-wistsp-ads}@anchor{384}@anchor{gnat_rm/the_gnat_library id128}@anchor{385}
@section @cite{GNAT.Wide_String_Split} (@code{g-wistsp.ads})
@@ -23999,7 +24097,7 @@ to the resulting slices. This package is instantiated from
@cite{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{383}@anchor{gnat_rm/the_gnat_library id129}@anchor{384}
+@anchor{gnat_rm/the_gnat_library gnat-wide-wide-spelling-checker-g-zspche-ads}@anchor{386}@anchor{gnat_rm/the_gnat_library id129}@anchor{387}
@section @cite{GNAT.Wide_Wide_Spelling_Checker} (@code{g-zspche.ads})
@@ -24011,7 +24109,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{385}@anchor{gnat_rm/the_gnat_library id130}@anchor{386}
+@anchor{gnat_rm/the_gnat_library gnat-wide-wide-string-split-g-zistsp-ads}@anchor{388}@anchor{gnat_rm/the_gnat_library id130}@anchor{389}
@section @cite{GNAT.Wide_Wide_String_Split} (@code{g-zistsp.ads})
@@ -24025,7 +24123,7 @@ to the resulting slices. This package is instantiated from
@cite{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 id131}@anchor{387}@anchor{gnat_rm/the_gnat_library interfaces-c-extensions-i-cexten-ads}@anchor{388}
+@anchor{gnat_rm/the_gnat_library id131}@anchor{38a}@anchor{gnat_rm/the_gnat_library interfaces-c-extensions-i-cexten-ads}@anchor{38b}
@section @cite{Interfaces.C.Extensions} (@code{i-cexten.ads})
@@ -24036,7 +24134,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 id132}@anchor{389}@anchor{gnat_rm/the_gnat_library interfaces-c-streams-i-cstrea-ads}@anchor{38a}
+@anchor{gnat_rm/the_gnat_library id132}@anchor{38c}@anchor{gnat_rm/the_gnat_library interfaces-c-streams-i-cstrea-ads}@anchor{38d}
@section @cite{Interfaces.C.Streams} (@code{i-cstrea.ads})
@@ -24049,7 +24147,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{38b}@anchor{gnat_rm/the_gnat_library id133}@anchor{38c}
+@anchor{gnat_rm/the_gnat_library interfaces-packed-decimal-i-pacdec-ads}@anchor{38e}@anchor{gnat_rm/the_gnat_library id133}@anchor{38f}
@section @cite{Interfaces.Packed_Decimal} (@code{i-pacdec.ads})
@@ -24064,7 +24162,7 @@ from a packed decimal format compatible with that used on IBM
mainframes.
@node Interfaces VxWorks i-vxwork ads,Interfaces VxWorks IO i-vxwoio ads,Interfaces Packed_Decimal i-pacdec ads,The GNAT Library
-@anchor{gnat_rm/the_gnat_library id134}@anchor{38d}@anchor{gnat_rm/the_gnat_library interfaces-vxworks-i-vxwork-ads}@anchor{38e}
+@anchor{gnat_rm/the_gnat_library id134}@anchor{390}@anchor{gnat_rm/the_gnat_library interfaces-vxworks-i-vxwork-ads}@anchor{391}
@section @cite{Interfaces.VxWorks} (@code{i-vxwork.ads})
@@ -24080,7 +24178,7 @@ In particular, it interfaces with the
VxWorks hardware interrupt facilities.
@node Interfaces VxWorks IO i-vxwoio ads,System Address_Image s-addima ads,Interfaces VxWorks i-vxwork ads,The GNAT Library
-@anchor{gnat_rm/the_gnat_library interfaces-vxworks-io-i-vxwoio-ads}@anchor{38f}@anchor{gnat_rm/the_gnat_library id135}@anchor{390}
+@anchor{gnat_rm/the_gnat_library interfaces-vxworks-io-i-vxwoio-ads}@anchor{392}@anchor{gnat_rm/the_gnat_library id135}@anchor{393}
@section @cite{Interfaces.VxWorks.IO} (@code{i-vxwoio.ads})
@@ -24103,7 +24201,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{391}@anchor{gnat_rm/the_gnat_library id136}@anchor{392}
+@anchor{gnat_rm/the_gnat_library system-address-image-s-addima-ads}@anchor{394}@anchor{gnat_rm/the_gnat_library id136}@anchor{395}
@section @cite{System.Address_Image} (@code{s-addima.ads})
@@ -24119,7 +24217,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 system-assertions-s-assert-ads}@anchor{393}@anchor{gnat_rm/the_gnat_library id137}@anchor{394}
+@anchor{gnat_rm/the_gnat_library system-assertions-s-assert-ads}@anchor{396}@anchor{gnat_rm/the_gnat_library id137}@anchor{397}
@section @cite{System.Assertions} (@code{s-assert.ads})
@@ -24135,7 +24233,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 id138}@anchor{395}@anchor{gnat_rm/the_gnat_library system-atomic-counters-s-atocou-ads}@anchor{396}
+@anchor{gnat_rm/the_gnat_library id138}@anchor{398}@anchor{gnat_rm/the_gnat_library system-atomic-counters-s-atocou-ads}@anchor{399}
@section @cite{System.Atomic_Counters} (@code{s-atocou.ads})
@@ -24149,7 +24247,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{397}@anchor{gnat_rm/the_gnat_library id139}@anchor{398}
+@anchor{gnat_rm/the_gnat_library system-memory-s-memory-ads}@anchor{39a}@anchor{gnat_rm/the_gnat_library id139}@anchor{39b}
@section @cite{System.Memory} (@code{s-memory.ads})
@@ -24167,7 +24265,7 @@ calls to this unit may be made for low level allocation uses (for
example see the body of @cite{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 id140}@anchor{399}@anchor{gnat_rm/the_gnat_library system-multiprocessors-s-multip-ads}@anchor{39a}
+@anchor{gnat_rm/the_gnat_library id140}@anchor{39c}@anchor{gnat_rm/the_gnat_library system-multiprocessors-s-multip-ads}@anchor{39d}
@section @cite{System.Multiprocessors} (@code{s-multip.ads})
@@ -24180,7 +24278,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{39b}@anchor{gnat_rm/the_gnat_library id141}@anchor{39c}
+@anchor{gnat_rm/the_gnat_library system-multiprocessors-dispatching-domains-s-mudido-ads}@anchor{39e}@anchor{gnat_rm/the_gnat_library id141}@anchor{39f}
@section @cite{System.Multiprocessors.Dispatching_Domains} (@code{s-mudido.ads})
@@ -24193,7 +24291,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 id142}@anchor{39d}@anchor{gnat_rm/the_gnat_library system-partition-interface-s-parint-ads}@anchor{39e}
+@anchor{gnat_rm/the_gnat_library id142}@anchor{3a0}@anchor{gnat_rm/the_gnat_library system-partition-interface-s-parint-ads}@anchor{3a1}
@section @cite{System.Partition_Interface} (@code{s-parint.ads})
@@ -24206,7 +24304,7 @@ is used primarily in a distribution context when using Annex E
with @cite{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 id143}@anchor{39f}@anchor{gnat_rm/the_gnat_library system-pool-global-s-pooglo-ads}@anchor{3a0}
+@anchor{gnat_rm/the_gnat_library id143}@anchor{3a2}@anchor{gnat_rm/the_gnat_library system-pool-global-s-pooglo-ads}@anchor{3a3}
@section @cite{System.Pool_Global} (@code{s-pooglo.ads})
@@ -24223,7 +24321,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 id144}@anchor{3a1}@anchor{gnat_rm/the_gnat_library system-pool-local-s-pooloc-ads}@anchor{3a2}
+@anchor{gnat_rm/the_gnat_library id144}@anchor{3a4}@anchor{gnat_rm/the_gnat_library system-pool-local-s-pooloc-ads}@anchor{3a5}
@section @cite{System.Pool_Local} (@code{s-pooloc.ads})
@@ -24240,7 +24338,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 id145}@anchor{3a3}@anchor{gnat_rm/the_gnat_library system-restrictions-s-restri-ads}@anchor{3a4}
+@anchor{gnat_rm/the_gnat_library id145}@anchor{3a6}@anchor{gnat_rm/the_gnat_library system-restrictions-s-restri-ads}@anchor{3a7}
@section @cite{System.Restrictions} (@code{s-restri.ads})
@@ -24256,7 +24354,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{3a5}@anchor{gnat_rm/the_gnat_library id146}@anchor{3a6}
+@anchor{gnat_rm/the_gnat_library system-rident-s-rident-ads}@anchor{3a8}@anchor{gnat_rm/the_gnat_library id146}@anchor{3a9}
@section @cite{System.Rident} (@code{s-rident.ads})
@@ -24272,7 +24370,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 id147}@anchor{3a7}@anchor{gnat_rm/the_gnat_library system-strings-stream-ops-s-ststop-ads}@anchor{3a8}
+@anchor{gnat_rm/the_gnat_library id147}@anchor{3aa}@anchor{gnat_rm/the_gnat_library system-strings-stream-ops-s-ststop-ads}@anchor{3ab}
@section @cite{System.Strings.Stream_Ops} (@code{s-ststop.ads})
@@ -24288,7 +24386,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{3a9}@anchor{gnat_rm/the_gnat_library id148}@anchor{3aa}
+@anchor{gnat_rm/the_gnat_library system-unsigned-types-s-unstyp-ads}@anchor{3ac}@anchor{gnat_rm/the_gnat_library id148}@anchor{3ad}
@section @cite{System.Unsigned_Types} (@code{s-unstyp.ads})
@@ -24301,7 +24399,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{3ab}@anchor{gnat_rm/the_gnat_library id149}@anchor{3ac}
+@anchor{gnat_rm/the_gnat_library system-wch-cnv-s-wchcnv-ads}@anchor{3ae}@anchor{gnat_rm/the_gnat_library id149}@anchor{3af}
@section @cite{System.Wch_Cnv} (@code{s-wchcnv.ads})
@@ -24322,7 +24420,7 @@ encoding method. It uses definitions in
package @cite{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 system-wch-con-s-wchcon-ads}@anchor{3ad}@anchor{gnat_rm/the_gnat_library id150}@anchor{3ae}
+@anchor{gnat_rm/the_gnat_library system-wch-con-s-wchcon-ads}@anchor{3b0}@anchor{gnat_rm/the_gnat_library id150}@anchor{3b1}
@section @cite{System.Wch_Con} (@code{s-wchcon.ads})
@@ -24334,7 +24432,7 @@ in ordinary strings. These definitions are used by
the package @cite{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{3af}@anchor{gnat_rm/interfacing_to_other_languages id1}@anchor{3b0}
+@anchor{gnat_rm/interfacing_to_other_languages interfacing-to-other-languages}@anchor{11}@anchor{gnat_rm/interfacing_to_other_languages doc}@anchor{3b2}@anchor{gnat_rm/interfacing_to_other_languages id1}@anchor{3b3}
@chapter Interfacing to Other Languages
@@ -24352,7 +24450,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{3b1}@anchor{gnat_rm/interfacing_to_other_languages id2}@anchor{3b2}
+@anchor{gnat_rm/interfacing_to_other_languages interfacing-to-c}@anchor{3b4}@anchor{gnat_rm/interfacing_to_other_languages id2}@anchor{3b5}
@section Interfacing to C
@@ -24490,7 +24588,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{3b3}@anchor{gnat_rm/interfacing_to_other_languages id3}@anchor{3f}
+@anchor{gnat_rm/interfacing_to_other_languages id4}@anchor{3b6}@anchor{gnat_rm/interfacing_to_other_languages id3}@anchor{3f}
@section Interfacing to C++
@@ -24547,7 +24645,7 @@ The @cite{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{3b4}@anchor{gnat_rm/interfacing_to_other_languages interfacing-to-cobol}@anchor{3b5}
+@anchor{gnat_rm/interfacing_to_other_languages id5}@anchor{3b7}@anchor{gnat_rm/interfacing_to_other_languages interfacing-to-cobol}@anchor{3b8}
@section Interfacing to COBOL
@@ -24555,7 +24653,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{3b6}@anchor{gnat_rm/interfacing_to_other_languages interfacing-to-fortran}@anchor{3b7}
+@anchor{gnat_rm/interfacing_to_other_languages id6}@anchor{3b9}@anchor{gnat_rm/interfacing_to_other_languages interfacing-to-fortran}@anchor{3ba}
@section Interfacing to Fortran
@@ -24565,7 +24663,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{3b8}@anchor{gnat_rm/interfacing_to_other_languages id7}@anchor{3b9}
+@anchor{gnat_rm/interfacing_to_other_languages interfacing-to-non-gnat-ada-code}@anchor{3bb}@anchor{gnat_rm/interfacing_to_other_languages id7}@anchor{3bc}
@section Interfacing to non-GNAT Ada code
@@ -24589,7 +24687,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{3ba}@anchor{gnat_rm/specialized_needs_annexes id1}@anchor{3bb}
+@anchor{gnat_rm/specialized_needs_annexes specialized-needs-annexes}@anchor{12}@anchor{gnat_rm/specialized_needs_annexes doc}@anchor{3bd}@anchor{gnat_rm/specialized_needs_annexes id1}@anchor{3be}
@chapter Specialized Needs Annexes
@@ -24630,7 +24728,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{3bc}@anchor{gnat_rm/implementation_of_specific_ada_features id1}@anchor{3bd}
+@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{3bf}@anchor{gnat_rm/implementation_of_specific_ada_features id1}@anchor{3c0}
@chapter Implementation of Specific Ada Features
@@ -24648,7 +24746,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{124}@anchor{gnat_rm/implementation_of_specific_ada_features id2}@anchor{3be}
+@anchor{gnat_rm/implementation_of_specific_ada_features machine-code-insertions}@anchor{125}@anchor{gnat_rm/implementation_of_specific_ada_features id2}@anchor{3c1}
@section Machine Code Insertions
@@ -24816,7 +24914,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{3bf}@anchor{gnat_rm/implementation_of_specific_ada_features gnat-implementation-of-tasking}@anchor{3c0}
+@anchor{gnat_rm/implementation_of_specific_ada_features id3}@anchor{3c2}@anchor{gnat_rm/implementation_of_specific_ada_features gnat-implementation-of-tasking}@anchor{3c3}
@section GNAT Implementation of Tasking
@@ -24831,7 +24929,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{3c1}@anchor{gnat_rm/implementation_of_specific_ada_features id4}@anchor{3c2}
+@anchor{gnat_rm/implementation_of_specific_ada_features mapping-ada-tasks-onto-the-underlying-kernel-threads}@anchor{3c4}@anchor{gnat_rm/implementation_of_specific_ada_features id4}@anchor{3c5}
@subsection Mapping Ada Tasks onto the Underlying Kernel Threads
@@ -24900,7 +24998,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,,Mapping Ada Tasks onto the Underlying Kernel Threads,GNAT Implementation of Tasking
-@anchor{gnat_rm/implementation_of_specific_ada_features id5}@anchor{3c3}@anchor{gnat_rm/implementation_of_specific_ada_features ensuring-compliance-with-the-real-time-annex}@anchor{3c4}
+@anchor{gnat_rm/implementation_of_specific_ada_features id5}@anchor{3c6}@anchor{gnat_rm/implementation_of_specific_ada_features ensuring-compliance-with-the-real-time-annex}@anchor{3c7}
@subsection Ensuring Compliance with the Real-Time Annex
@@ -24949,7 +25047,7 @@ that were ready to execute in the priority queue where R has been
placed at the end.
@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{3c5}@anchor{gnat_rm/implementation_of_specific_ada_features gnat-implementation-of-shared-passive-packages}@anchor{3c6}
+@anchor{gnat_rm/implementation_of_specific_ada_features id6}@anchor{3c8}@anchor{gnat_rm/implementation_of_specific_ada_features gnat-implementation-of-shared-passive-packages}@anchor{3c9}
@section GNAT Implementation of Shared Passive Packages
@@ -25050,7 +25148,7 @@ GNAT supports shared passive packages on all platforms
except for OpenVMS.
@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{3c7}@anchor{gnat_rm/implementation_of_specific_ada_features id7}@anchor{3c8}
+@anchor{gnat_rm/implementation_of_specific_ada_features code-generation-for-array-aggregates}@anchor{3ca}@anchor{gnat_rm/implementation_of_specific_ada_features id7}@anchor{3cb}
@section Code Generation for Array Aggregates
@@ -25081,7 +25179,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{3c9}@anchor{gnat_rm/implementation_of_specific_ada_features id8}@anchor{3ca}
+@anchor{gnat_rm/implementation_of_specific_ada_features static-constant-aggregates-with-static-bounds}@anchor{3cc}@anchor{gnat_rm/implementation_of_specific_ada_features id8}@anchor{3cd}
@subsection Static constant aggregates with static bounds
@@ -25128,7 +25226,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{3cb}@anchor{gnat_rm/implementation_of_specific_ada_features id9}@anchor{3cc}
+@anchor{gnat_rm/implementation_of_specific_ada_features constant-aggregates-with-unconstrained-nominal-types}@anchor{3ce}@anchor{gnat_rm/implementation_of_specific_ada_features id9}@anchor{3cf}
@subsection Constant aggregates with unconstrained nominal types
@@ -25143,7 +25241,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{3cd}@anchor{gnat_rm/implementation_of_specific_ada_features aggregates-with-static-bounds}@anchor{3ce}
+@anchor{gnat_rm/implementation_of_specific_ada_features id10}@anchor{3d0}@anchor{gnat_rm/implementation_of_specific_ada_features aggregates-with-static-bounds}@anchor{3d1}
@subsection Aggregates with static bounds
@@ -25171,7 +25269,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{3cf}@anchor{gnat_rm/implementation_of_specific_ada_features aggregates-with-nonstatic-bounds}@anchor{3d0}
+@anchor{gnat_rm/implementation_of_specific_ada_features id11}@anchor{3d2}@anchor{gnat_rm/implementation_of_specific_ada_features aggregates-with-nonstatic-bounds}@anchor{3d3}
@subsection Aggregates with nonstatic bounds
@@ -25182,7 +25280,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{3d1}@anchor{gnat_rm/implementation_of_specific_ada_features aggregates-in-assignment-statements}@anchor{3d2}
+@anchor{gnat_rm/implementation_of_specific_ada_features id12}@anchor{3d4}@anchor{gnat_rm/implementation_of_specific_ada_features aggregates-in-assignment-statements}@anchor{3d5}
@subsection Aggregates in assignment statements
@@ -25224,7 +25322,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{3d3}@anchor{gnat_rm/implementation_of_specific_ada_features the-size-of-discriminated-records-with-default-discriminants}@anchor{3d4}
+@anchor{gnat_rm/implementation_of_specific_ada_features id13}@anchor{3d6}@anchor{gnat_rm/implementation_of_specific_ada_features the-size-of-discriminated-records-with-default-discriminants}@anchor{3d7}
@section The Size of Discriminated Records with Default Discriminants
@@ -25304,7 +25402,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{3d5}@anchor{gnat_rm/implementation_of_specific_ada_features id14}@anchor{3d6}
+@anchor{gnat_rm/implementation_of_specific_ada_features strict-conformance-to-the-ada-reference-manual}@anchor{3d8}@anchor{gnat_rm/implementation_of_specific_ada_features id14}@anchor{3d9}
@section Strict Conformance to the Ada Reference Manual
@@ -25331,7 +25429,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{3d7}@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{3d8}
+@anchor{gnat_rm/implementation_of_ada_2012_features doc}@anchor{3da}@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{3db}
@chapter Implementation of Ada 2012 Features
@@ -27497,7 +27595,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{3d9}@anchor{gnat_rm/obsolescent_features doc}@anchor{3da}@anchor{gnat_rm/obsolescent_features obsolescent-features}@anchor{15}
+@anchor{gnat_rm/obsolescent_features id1}@anchor{3dc}@anchor{gnat_rm/obsolescent_features doc}@anchor{3dd}@anchor{gnat_rm/obsolescent_features obsolescent-features}@anchor{15}
@chapter Obsolescent Features
@@ -27516,7 +27614,7 @@ compatibility purposes.
@end menu
@node pragma No_Run_Time,pragma Ravenscar,,Obsolescent Features
-@anchor{gnat_rm/obsolescent_features id2}@anchor{3db}@anchor{gnat_rm/obsolescent_features pragma-no-run-time}@anchor{3dc}
+@anchor{gnat_rm/obsolescent_features id2}@anchor{3de}@anchor{gnat_rm/obsolescent_features pragma-no-run-time}@anchor{3df}
@section pragma No_Run_Time
@@ -27529,7 +27627,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{3dd}@anchor{gnat_rm/obsolescent_features pragma-ravenscar}@anchor{3de}
+@anchor{gnat_rm/obsolescent_features id3}@anchor{3e0}@anchor{gnat_rm/obsolescent_features pragma-ravenscar}@anchor{3e1}
@section pragma Ravenscar
@@ -27538,7 +27636,7 @@ The pragma @cite{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{3df}@anchor{gnat_rm/obsolescent_features id4}@anchor{3e0}
+@anchor{gnat_rm/obsolescent_features pragma-restricted-run-time}@anchor{3e2}@anchor{gnat_rm/obsolescent_features id4}@anchor{3e3}
@section pragma Restricted_Run_Time
@@ -27548,7 +27646,7 @@ preferred since the Ada 2005 pragma @cite{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{3e1}@anchor{gnat_rm/obsolescent_features id5}@anchor{3e2}
+@anchor{gnat_rm/obsolescent_features pragma-task-info}@anchor{3e4}@anchor{gnat_rm/obsolescent_features id5}@anchor{3e5}
@section pragma Task_Info
@@ -27574,7 +27672,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{3e3}@anchor{gnat_rm/obsolescent_features package-system-task-info-s-tasinf-ads}@anchor{3e4}
+@anchor{gnat_rm/obsolescent_features package-system-task-info}@anchor{3e6}@anchor{gnat_rm/obsolescent_features package-system-task-info-s-tasinf-ads}@anchor{3e7}
@section package System.Task_Info (@code{s-tasinf.ads})
@@ -27584,7 +27682,7 @@ to support the @cite{Task_Info} pragma. The predefined Ada package
standard replacement for GNAT's @cite{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{3e5}@anchor{gnat_rm/compatibility_and_porting_guide id1}@anchor{3e6}
+@anchor{gnat_rm/compatibility_and_porting_guide compatibility-and-porting-guide}@anchor{16}@anchor{gnat_rm/compatibility_and_porting_guide doc}@anchor{3e8}@anchor{gnat_rm/compatibility_and_porting_guide id1}@anchor{3e9}
@chapter Compatibility and Porting Guide
@@ -27606,7 +27704,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{3e7}@anchor{gnat_rm/compatibility_and_porting_guide writing-portable-fixed-point-declarations}@anchor{3e8}
+@anchor{gnat_rm/compatibility_and_porting_guide id2}@anchor{3ea}@anchor{gnat_rm/compatibility_and_porting_guide writing-portable-fixed-point-declarations}@anchor{3eb}
@section Writing Portable Fixed-Point Declarations
@@ -27728,7 +27826,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{3e9}@anchor{gnat_rm/compatibility_and_porting_guide id3}@anchor{3ea}
+@anchor{gnat_rm/compatibility_and_porting_guide compatibility-with-ada-83}@anchor{3ec}@anchor{gnat_rm/compatibility_and_porting_guide id3}@anchor{3ed}
@section Compatibility with Ada 83
@@ -27756,7 +27854,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{3eb}@anchor{gnat_rm/compatibility_and_porting_guide legal-ada-83-programs-that-are-illegal-in-ada-95}@anchor{3ec}
+@anchor{gnat_rm/compatibility_and_porting_guide id4}@anchor{3ee}@anchor{gnat_rm/compatibility_and_porting_guide legal-ada-83-programs-that-are-illegal-in-ada-95}@anchor{3ef}
@subsection Legal Ada 83 programs that are illegal in Ada 95
@@ -27856,7 +27954,7 @@ the fix is usually simply to add the @cite{(<>)} 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{3ed}@anchor{gnat_rm/compatibility_and_porting_guide id5}@anchor{3ee}
+@anchor{gnat_rm/compatibility_and_porting_guide more-deterministic-semantics}@anchor{3f0}@anchor{gnat_rm/compatibility_and_porting_guide id5}@anchor{3f1}
@subsection More deterministic semantics
@@ -27884,7 +27982,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{3ef}@anchor{gnat_rm/compatibility_and_porting_guide changed-semantics}@anchor{3f0}
+@anchor{gnat_rm/compatibility_and_porting_guide id6}@anchor{3f2}@anchor{gnat_rm/compatibility_and_porting_guide changed-semantics}@anchor{3f3}
@subsection Changed semantics
@@ -27926,7 +28024,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{3f1}@anchor{gnat_rm/compatibility_and_porting_guide id7}@anchor{3f2}
+@anchor{gnat_rm/compatibility_and_porting_guide other-language-compatibility-issues}@anchor{3f4}@anchor{gnat_rm/compatibility_and_porting_guide id7}@anchor{3f5}
@subsection Other language compatibility issues
@@ -27959,7 +28057,7 @@ include @cite{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{3f3}@anchor{gnat_rm/compatibility_and_porting_guide id8}@anchor{3f4}
+@anchor{gnat_rm/compatibility_and_porting_guide compatibility-between-ada-95-and-ada-2005}@anchor{3f6}@anchor{gnat_rm/compatibility_and_porting_guide id8}@anchor{3f7}
@section Compatibility between Ada 95 and Ada 2005
@@ -28031,7 +28129,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{3f5}@anchor{gnat_rm/compatibility_and_porting_guide id9}@anchor{3f6}
+@anchor{gnat_rm/compatibility_and_porting_guide implementation-dependent-characteristics}@anchor{3f8}@anchor{gnat_rm/compatibility_and_porting_guide id9}@anchor{3f9}
@section Implementation-dependent characteristics
@@ -28054,7 +28152,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{3f7}@anchor{gnat_rm/compatibility_and_porting_guide id10}@anchor{3f8}
+@anchor{gnat_rm/compatibility_and_porting_guide implementation-defined-pragmas}@anchor{3fa}@anchor{gnat_rm/compatibility_and_porting_guide id10}@anchor{3fb}
@subsection Implementation-defined pragmas
@@ -28076,7 +28174,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{3f9}@anchor{gnat_rm/compatibility_and_porting_guide implementation-defined-attributes}@anchor{3fa}
+@anchor{gnat_rm/compatibility_and_porting_guide id11}@anchor{3fc}@anchor{gnat_rm/compatibility_and_porting_guide implementation-defined-attributes}@anchor{3fd}
@subsection Implementation-defined attributes
@@ -28090,7 +28188,7 @@ Ada 83, GNAT supplies the attributes @cite{Bit}, @cite{Machine_Size} and
@cite{Type_Class}.
@node Libraries,Elaboration order,Implementation-defined attributes,Implementation-dependent characteristics
-@anchor{gnat_rm/compatibility_and_porting_guide libraries}@anchor{3fb}@anchor{gnat_rm/compatibility_and_porting_guide id12}@anchor{3fc}
+@anchor{gnat_rm/compatibility_and_porting_guide libraries}@anchor{3fe}@anchor{gnat_rm/compatibility_and_porting_guide id12}@anchor{3ff}
@subsection Libraries
@@ -28119,15 +28217,15 @@ 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{3fd}@anchor{gnat_rm/compatibility_and_porting_guide id13}@anchor{3fe}
+@anchor{gnat_rm/compatibility_and_porting_guide elaboration-order}@anchor{400}@anchor{gnat_rm/compatibility_and_porting_guide id13}@anchor{401}
@subsection Elaboration order
The implementation can choose any elaboration order consistent with the unit
dependency relationship. This freedom means that some orders can result in
Program_Error being raised due to an 'Access Before Elaboration': an attempt
-to invoke a subprogram its body has been elaborated, or to instantiate a
-generic before the generic body has been elaborated. By default GNAT
+to invoke a subprogram before its body has been elaborated, or to instantiate
+a generic before the generic body has been elaborated. By default GNAT
attempts to choose a safe order (one that will not encounter access before
elaboration problems) by implicitly inserting @cite{Elaborate} or
@cite{Elaborate_All} pragmas where
@@ -28155,7 +28253,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{3ff}@anchor{gnat_rm/compatibility_and_porting_guide id14}@anchor{400}
+@anchor{gnat_rm/compatibility_and_porting_guide target-specific-aspects}@anchor{402}@anchor{gnat_rm/compatibility_and_porting_guide id14}@anchor{403}
@subsection Target-specific aspects
@@ -28168,10 +28266,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{401,,Representation Clauses}.
+GNAT's approach to these issues is described in @ref{404,,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{402}@anchor{gnat_rm/compatibility_and_porting_guide compatibility-with-other-ada-systems}@anchor{403}
+@anchor{gnat_rm/compatibility_and_porting_guide id15}@anchor{405}@anchor{gnat_rm/compatibility_and_porting_guide compatibility-with-other-ada-systems}@anchor{406}
@section Compatibility with Other Ada Systems
@@ -28214,7 +28312,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{401}@anchor{gnat_rm/compatibility_and_porting_guide id16}@anchor{404}
+@anchor{gnat_rm/compatibility_and_porting_guide representation-clauses}@anchor{404}@anchor{gnat_rm/compatibility_and_porting_guide id16}@anchor{407}
@section Representation Clauses
@@ -28307,7 +28405,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{405}@anchor{gnat_rm/compatibility_and_porting_guide id17}@anchor{406}
+@anchor{gnat_rm/compatibility_and_porting_guide compatibility-with-hp-ada-83}@anchor{408}@anchor{gnat_rm/compatibility_and_porting_guide id17}@anchor{409}
@section Compatibility with HP Ada 83
@@ -28337,7 +28435,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{407}@anchor{share/gnu_free_documentation_license gnu-free-documentation-license}@anchor{408}
+@anchor{share/gnu_free_documentation_license gnu-fdl}@anchor{1}@anchor{share/gnu_free_documentation_license doc}@anchor{40a}@anchor{share/gnu_free_documentation_license gnu-free-documentation-license}@anchor{40b}
@chapter GNU Free Documentation License
diff --git a/gcc/ada/gnat_ugn.texi b/gcc/ada/gnat_ugn.texi
index 1f465ae6035..2505fb72592 100644
--- a/gcc/ada/gnat_ugn.texi
+++ b/gcc/ada/gnat_ugn.texi
@@ -21,7 +21,7 @@
@copying
@quotation
-GNAT User's Guide for Native Platforms , October 23, 2015
+GNAT User's Guide for Native Platforms , November 13, 2015
AdaCore
@@ -564,6 +564,7 @@ Microsoft Windows Topics
* CONSOLE and WINDOWS subsystems::
* Temporary Files::
* Mixed-Language Programming on Windows::
+* Windows Specific Add-Ons::
Mixed-Language Programming on Windows
@@ -576,6 +577,7 @@ Mixed-Language Programming on Windows
* Ada DLLs and Finalization::
* Creating a Spec for Ada DLLs::
* GNAT and Windows Resources::
+* Using GNAT DLLs from Microsoft Visual Studio Applications::
* Debugging a DLL::
* Setting Stack Size from gnatlink::
* Setting Heap Size from gnatlink::
@@ -614,6 +616,11 @@ Debugging a DLL
* Program and DLL Both Built with GCC/GNAT::
* Program Built with Foreign Tools and DLL Built with GCC/GNAT::
+Windows Specific Add-Ons
+
+* Win32Ada::
+* wPOSIX::
+
Mac OS Topics
* Codesigning the Debugger::
@@ -5713,19 +5720,19 @@ types). This simplifies the definition of operations that use type checking
to perform dimensional checks:
@end itemize
-@c code-block: ada
-@c
-@c type Distance is new Long_Float;
-@c type Time is new Long_Float;
-@c type Velocity is new Long_Float;
-@c function "/" (D : Distance; T : Time)
-@c return Velocity;
-@c pragma Import (Intrinsic, "/");
-@c
-@c This common idiom is often programmed with a generic definition and an
-@c explicit body. The pragma makes it simpler to introduce such declarations.
-@c It incurs no overhead in compilation time or code size, because it is
-@c implemented as a single machine instruction.
+@example
+ type Distance is new Long_Float;
+ type Time is new Long_Float;
+ type Velocity is new Long_Float;
+ function "/" (D : Distance; T : Time)
+ return Velocity;
+ pragma Import (Intrinsic, "/");
+
+This common idiom is often programmed with a generic definition and an
+explicit body. The pragma makes it simpler to introduce such declarations.
+It incurs no overhead in compilation time or code size, because it is
+implemented as a single machine instruction.
+@end example
@itemize *
@@ -5758,7 +5765,7 @@ expectations.
@item @emph{Stdcall}
-This is relevant only to Windows XP/2000/NT implementations of GNAT,
+This is relevant only to Windows implementations of GNAT,
and specifies that the @cite{Stdcall} calling sequence will be used,
as defined by the NT API. Nevertheless, to ease building
cross-platform bindings this convention will be handled as a @cite{C} calling
@@ -9610,23 +9617,25 @@ Eliminate intermediate overflows (@cite{ELIMINATED})
@end multitable
-If only one digit appears then it applies to all
+If only one digit appears, then it applies to all
cases; if two digits are given, then the first applies outside
-assertions, and the second within assertions.
+assertions, pre/postconditions, and type invariants, and the second
+applies within assertions, pre/postconditions, and type invariants.
If no digits follow the @emph{-gnato}, then it is equivalent to
@emph{-gnato11},
-causing all intermediate overflows to be handled in strict mode.
+causing all intermediate overflows to be handled in strict
+mode.
This switch also causes arithmetic overflow checking to be performed
-(as though @cite{pragma Unsuppress (Overflow_Mode)} had been specified.
+(as though @cite{pragma Unsuppress (Overflow_Mode)} had been specified).
The default if no option @emph{-gnato} is given is that overflow handling
is in @cite{STRICT} mode (computations done using the base type), and that
overflow checking is enabled.
Note that division by zero is a separate check that is not
-controlled by this switch (division by zero checking is on by default).
+controlled by this switch (divide-by-zero checking is on by default).
See also @ref{fd,,Specifying the Desired Mode}.
@end table
@@ -12527,30 +12536,75 @@ When no switch @emph{-gnatw} is used, this is equivalent to:
@geindex Assertions
+@geindex Precondition
+
+@geindex Postcondition
+
+@geindex Type invariants
+
+@geindex Subtype predicates
+
+The @cite{-gnata} option is equivalent to the following Assertion_Policy pragma:
+
+@example
+pragma Assertion_Policy (Check);
+@end example
+
+Which is a shorthand for:
+
+@example
+pragma Assertion_Policy
+ (Assert => Check,
+ Static_Predicate => Check,
+ Dynamic_Predicate => Check,
+ Pre => Check,
+ Pre'Class => Check,
+ Post => Check,
+ Post'Class => Check,
+ Type_Invariant => Check,
+ Type_Invariant'Class => Check);
+@end example
+
The pragmas @cite{Assert} and @cite{Debug} normally have no effect and
are ignored. This switch, where @code{a} stands for assert, causes
-@cite{Assert} and @cite{Debug} pragmas to be activated.
+pragmas @cite{Assert} and @cite{Debug} to be activated. This switch also
+causes preconditions, postconditions, subtype predicates, and
+type invariants to be activated.
The pragmas have the form:
@example
pragma Assert (<Boolean-expression> [, <static-string-expression>])
pragma Debug (<procedure call>)
+pragma Type_Invariant (<type-local-name>, <Boolean-expression>)
+pragma Predicate (<type-local-name>, <Boolean-expression>)
+pragma Precondition (<Boolean-expression>, <string-expression>)
+pragma Postcondition (<Boolean-expression>, <string-expression>)
+@end example
+
+The aspects have the form:
+
+@example
+with [Pre|Post|Type_Invariant|Dynamic_Predicate|Static_Predicate]
+ => <Boolean-expression>;
@end example
The @cite{Assert} pragma causes @cite{Boolean-expression} to be tested.
If the result is @cite{True}, the pragma has no effect (other than
possible side effects from evaluating the expression). If the result is
@cite{False}, the exception @cite{Assert_Failure} declared in the package
-@cite{System.Assertions} is
-raised (passing @cite{static-string-expression}, if present, as the
-message associated with the exception). If no string expression is
-given the default is a string giving the file name and line number
-of the pragma.
+@cite{System.Assertions} is raised (passing @cite{static-string-expression}, if
+present, as the message associated with the exception). If no string
+expression is given, the default is a string containing the file name and
+line number of the pragma.
The @cite{Debug} pragma causes @cite{procedure} to be called. Note that
@cite{pragma Debug} may appear within a declaration sequence, allowing
debugging procedures to be called between declarations.
+
+For the aspect specification, the @cite{<Boolean-expression>} is evaluated.
+If the result is @cite{True}, the aspect has no effect. If the result
+is @cite{False}, the exception @cite{Assert_Failure} is raised.
@end table
@node Validity Checking,Style Checking,Debugging and Assertion Control,Compiler Switches
@@ -13568,11 +13622,11 @@ The switch @code{-gnatyN} clears any previously set style checks.
@geindex Checks
@geindex stack overflow checking
-By default, the following checks are suppressed: integer overflow
-checks, stack overflow checks, and checks for access before
-elaboration on subprogram calls. All other checks, including range
-checks and array bounds checks, are turned on by default. The
-following @emph{gcc} switches refine this default behavior.
+By default, the following checks are suppressed: stack overflow
+checks, and checks for access before elaboration on subprogram
+calls. All other checks, including overflow checks, range checks and
+array bounds checks, are turned on by default. The following @emph{gcc}
+switches refine this default behavior.
@geindex -gnatp (gcc)
@@ -13724,13 +13778,8 @@ subscript), or a wild jump (from an out of range case value). Overflow
checking is also quite expensive in time and space, since in general it
requires the use of double length arithmetic.
-Note again that the default is @emph{-gnato00},
-so overflow checking is not performed in default mode. This means that out of
-the box, with the default settings, GNAT does not do all the checks
-expected from the language description in the Ada Reference Manual.
-If you want all constraint checks to be performed, as described in this Manual,
-then you must explicitly use the @emph{-gnato??}
-switch either on the @emph{gnatmake} or @emph{gcc} command.
+Note again that the default is @emph{-gnato11} (equivalent to @emph{-gnato1}),
+so overflow checking is performed in STRICT mode by default.
@end table
@geindex -gnatE (gcc)
@@ -16126,7 +16175,7 @@ since gnatlink will not be able to find the generated file.
@section Linking with @emph{gnatlink}
-@c index: ! gnatlink
+@geindex gnatlink
This chapter discusses @emph{gnatlink}, a tool that links
an Ada program and builds an executable file. This utility
@@ -17023,22 +17072,22 @@ subtrees rooted at subdirectories ".svn". To do that, attribute
@strong{Ignore_Source_Sub_Dirs} can be used. It specifies the list of simple
file names for the roots of these undesirable directory subtrees.
-@c code-block: ada-project
-@c
-@c for Source_Dirs use ("./**");
-@c for Ignore_Source_Sub_Dirs use (".svn");
+@example
+for Source_Dirs use ("./**");
+for Ignore_Source_Sub_Dirs use (".svn");
+@end example
@end itemize
When applied to the simple example, and because we generally prefer to have
the project file at the toplevel directory rather than mixed with the sources,
we will create the following file
-@c code-block: ada-project
-@c
-@c build.gpr
-@c project Build is
-@c for Source_Dirs use ("common"); -- <<<<
-@c end Build;
+@example
+build.gpr
+project Build is
+ for Source_Dirs use ("common"); -- <<<<
+end Build;
+@end example
Once source directories have been specified, one may need to indicate
source files of interest. By default, all source files present in the source
@@ -17192,12 +17241,12 @@ the project directory, that is the directory containing the project file.
For our example, we can specify the object dir in this way:
-@c code-block: ada-project
-@c
-@c project Build is
-@c for Source_Dirs use ("common");
-@c for Object_Dir use "obj"; -- <<<<
-@c end Build;
+@example
+project Build is
+ for Source_Dirs use ("common");
+ for Object_Dir use "obj"; -- <<<<
+end Build;
+@end example
As mentioned earlier, there is a single object directory per project. As a
result, if you have an existing system where the object files are spread across
@@ -17224,13 +17273,13 @@ In the case of the example, let's place the executable in the root
of the hierarchy, ie the same directory as @code{build.gpr}. Hence
the project file is now
-@c code-block: ada-project
-@c
-@c project Build is
-@c for Source_Dirs use ("common");
-@c for Object_Dir use "obj";
-@c for Exec_Dir use "."; -- <<<<
-@c end Build;
+@example
+project Build is
+ for Source_Dirs use ("common");
+ for Object_Dir use "obj";
+ for Exec_Dir use "."; -- <<<<
+end Build;
+@end example
@node Main Subprograms,Tools Options in Project Files,Object and Exec Directory,Building With Projects
@anchor{gnat_ugn/gnat_project_manager id6}@anchor{15c}@anchor{gnat_ugn/gnat_project_manager main-subprograms}@anchor{15d}
@@ -17260,14 +17309,14 @@ command line when invoking a builder, and editors like
@emph{GPS} will be able to create extra menus to spawn or debug the
corresponding executables.
-@c code-block: ada-project
-@c
-@c project Build is
-@c for Source_Dirs use ("common");
-@c for Object_Dir use "obj";
-@c for Exec_Dir use ".";
-@c for Main use ("proc.adb"); -- <<<<
-@c end Build;
+@example
+project Build is
+ for Source_Dirs use ("common");
+ for Object_Dir use "obj";
+ for Exec_Dir use ".";
+ for Main use ("proc.adb"); -- <<<<
+end Build;
+@end example
If this attribute is defined in the project, then spawning the builder
with a command such as
@@ -17326,26 +17375,26 @@ Our example project file can be extended with the following empty packages. At
this stage, they could all be omitted since they are empty, but they show which
packages would be involved in the build process.
-@c code-block: ada-project
-@c
-@c project Build is
-@c for Source_Dirs use ("common");
-@c for Object_Dir use "obj";
-@c for Exec_Dir use ".";
-@c for Main use ("proc.adb");
-@c
-@c package Builder is --<<< for gprbuild
-@c end Builder;
-@c
-@c package Compiler is --<<< for the compiler
-@c end Compiler;
-@c
-@c package Binder is --<<< for the binder
-@c end Binder;
-@c
-@c package Linker is --<<< for the linker
-@c end Linker;
-@c end Build;
+@example
+project Build is
+ for Source_Dirs use ("common");
+ for Object_Dir use "obj";
+ for Exec_Dir use ".";
+ for Main use ("proc.adb");
+
+ package Builder is --<<< for gprbuild
+ end Builder;
+
+ package Compiler is --<<< for the compiler
+ end Compiler;
+
+ package Binder is --<<< for the binder
+ end Binder;
+
+ package Linker is --<<< for the linker
+ end Linker;
+end Build;
+@end example
Let's first examine the compiler switches. As stated in the initial description
of the example, we want to compile all files with @emph{-O2}. This is a
@@ -17374,11 +17423,11 @@ In this example, we want to compile all Ada source files with the switch
@emph{-O2}, and the resulting project file is as follows
(only the @cite{Compiler} package is shown):
-@c code-block: ada-project
-@c
-@c package Compiler is
-@c for Default_Switches ("Ada") use ("-O2");
-@c end Compiler;
+@example
+package Compiler is
+ for Default_Switches ("Ada") use ("-O2");
+end Compiler;
+@end example
@end quotation
@geindex Switches (GNAT Project Manager)
@@ -17395,26 +17444,25 @@ attribute (indexed on the file name) can be used and will override the
switches defined by @emph{Default_Switches}. Our project file would
become:
-@c code-block: ada-project
-@c
-@c
-@c package Compiler is
-@c for Default_Switches ("Ada")
-@c use ("-O2");
-@c for Switches ("proc.adb")
-@c use ("-O0");
-@c end Compiler;
+@example
+package Compiler is
+ for Default_Switches ("Ada")
+ use ("-O2");
+ for Switches ("proc.adb")
+ use ("-O0");
+end Compiler;
+@end example
@cite{Switches} may take a pattern as an index, such as in:
-@c code-block: ada-project
-@c
-@c package Compiler is
-@c for Default_Switches ("Ada")
-@c use ("-O2");
-@c for Switches ("pkg*")
-@c use ("-O0");
-@c end Compiler;
+@example
+package Compiler is
+ for Default_Switches ("Ada")
+ use ("-O2");
+ for Switches ("pkg*")
+ use ("-O0");
+end Compiler;
+@end example
Sources @code{pkg.adb} and @code{pkg-child.adb} would be compiled with -O0,
not -O2.
@@ -18701,16 +18749,16 @@ but, for some reason, cannot be rebuilt. For instance, it is the case when some
of the library sources are not available. Such library projects need to use the
@cite{Externally_Built} attribute as in the example below:
-@c code-block: ada-project
-@c
-@c library project Extern_Lib is
-@c for Languages use ("Ada", "C");
-@c for Source_Dirs use ("lib_src");
-@c for Library_Dir use "lib2";
-@c for Library_Kind use "dynamic";
-@c for Library_Name use "l2";
-@c for Externally_Built use "true"; -- <<<<
-@c end Extern_Lib;
+@example
+library project Extern_Lib is
+ for Languages use ("Ada", "C");
+ for Source_Dirs use ("lib_src");
+ for Library_Dir use "lib2";
+ for Library_Kind use "dynamic";
+ for Library_Name use "l2";
+ for Externally_Built use "true"; -- <<<<
+end Extern_Lib;
+@end example
In the case of externally built libraries, the @cite{Object_Dir}
attribute does not need to be specified because it will never be
@@ -20248,13 +20296,6 @@ or given a file name to find out its language for proper processing.
See @ref{14b,,Naming Schemes}.
@end quotation
-@c only: PRO or GPL
-@c
-@c *Pretty_Printer*
-@c This package specifies the options used when calling the formatting tool
-@c *gnatpp* via the *gnat* driver. Its attributes
-@c **Default_Switches** and **Switches** have the same semantics as for the
-@c package `Builder`.
@item @emph{Remote}
@@ -23395,7 +23436,7 @@ where @cite{gnatclean} was invoked.
@geindex Library browser
-@c index: ! gnatls
+@geindex gnatls
@cite{gnatls} is a tool that outputs information about compiled
units. It gives the relationship between objects, unit names and source
@@ -26831,27 +26872,21 @@ some guidelines on debugging optimized code.
@subsubsection Controlling Run-Time Checks
-By default, GNAT generates all run-time checks, except integer overflow
-checks, stack overflow checks, and checks for access before elaboration on
-subprogram calls. The latter are not required in default mode, because all
+By default, GNAT generates all run-time checks, except stack overflow
+checks, and checks for access before elaboration on subprogram
+calls. The latter are not required in default mode, because all
necessary checking is done at compile time.
@geindex -gnatp (gcc)
@geindex -gnato (gcc)
-Two gnat switches, @emph{-gnatp} and @emph{-gnato} allow this default to
-be modified. See @ref{fe,,Run-Time Checks}.
+The gnat switch, @emph{-gnatp} allows this default to be modified. See
+@ref{fe,,Run-Time Checks}.
Our experience is that the default is suitable for most development
purposes.
-We treat integer overflow specially because these
-are quite expensive and in our experience are not as important as other
-run-time checks in the development process. Note that division by zero
-is not considered an overflow check, and divide by zero checks are
-generated where required by default.
-
Elaboration checks are off by default, and also not needed by default, since
GNAT uses a static elaboration analysis approach that avoids the need for
run-time checking. This manual contains a full chapter discussing the issue
@@ -27408,11 +27443,9 @@ end Sum;
The vectorizable operations depend on the targeted SIMD instruction set, but
the adding and some of the multiplying operators are generally supported, as
-well as the logical operators for modular types. Note that, in the former
-case, enabling overflow checks, for example with @emph{-gnato}, totally
-disables vectorization. The other checks are not supposed to have the same
-definitive effect, although compiling with @emph{-gnatp} might well reveal
-cases where some checks do thwart vectorization.
+well as the logical operators for modular types. Note that compiling
+with @emph{-gnatp} might well reveal cases where some checks do thwart
+vectorization.
Type conversions may also prevent vectorization if they involve semantics that
are not directly supported by the code generator or the SIMD instruction set.
@@ -28504,11 +28537,6 @@ If no digits follow the @emph{-gnato}, then it is equivalent to
causing all intermediate operations to be computed using the base
type (@cite{STRICT} mode).
-In addition to setting the mode used for computation of intermediate
-results, the @cite{-gnato} switch also enables overflow checking (which
-is suppressed by default). It thus combines the effect of using
-a pragma @cite{Overflow_Mode} and pragma @cite{Unsuppress}.
-
@node Default Settings,Implementation Notes,Specifying the Desired Mode,Overflow Check Handling in GNAT
@anchor{gnat_ugn/gnat_and_program_execution id58}@anchor{24d}@anchor{gnat_ugn/gnat_and_program_execution default-settings}@anchor{24e}
@subsection Default Settings
@@ -29878,6 +29906,7 @@ platforms.
* CONSOLE and WINDOWS subsystems::
* Temporary Files::
* Mixed-Language Programming on Windows::
+* Windows Specific Add-Ons::
@end menu
@@ -30049,7 +30078,7 @@ file will be created. This is particularly useful in networked
environments where you may not have write access to some
directories.
-@node Mixed-Language Programming on Windows,,Temporary Files,Microsoft Windows Topics
+@node Mixed-Language Programming on Windows,Windows Specific Add-Ons,Temporary Files,Microsoft Windows Topics
@anchor{gnat_ugn/platform_specific_information mixed-language-programming-on-windows}@anchor{270}@anchor{gnat_ugn/platform_specific_information id14}@anchor{271}
@subsection Mixed-Language Programming on Windows
@@ -30126,6 +30155,7 @@ native SEH support is used.
* Ada DLLs and Finalization::
* Creating a Spec for Ada DLLs::
* GNAT and Windows Resources::
+* Using GNAT DLLs from Microsoft Visual Studio Applications::
* Debugging a DLL::
* Setting Stack Size from gnatlink::
* Setting Heap Size from gnatlink::
@@ -30621,28 +30651,21 @@ calling convention function in the exported symbols list.
There can actually be other sections in a definition file, but these
sections are not relevant to the discussion at hand.
+@anchor{gnat_ugn/platform_specific_information create-def-file-automatically}@anchor{286}
+@subsubheading Creating a Definition File Automatically
-@subsubheading GNAT-Style Import Library
-
-@anchor{gnat_ugn/platform_specific_information gnat-style-import-library}@anchor{286}
-To create a static import library from @code{API.dll} with the GNAT tools
-you should proceed as follows:
+You can automatically create the definition file @code{API.def}
+(see @ref{280,,The Definition File}) from a DLL.
+For that use the @cite{dlltool} program as follows:
-@itemize *
-
-@item
-Create the definition file @code{API.def}
-(see @ref{280,,The Definition File}).
-For that use the @cite{dll2def} tool as follows:
+@quotation
@example
-$ dll2def API.dll > API.def
+$ dlltool API.dll -z API.def --export-all-symbols
@end example
-@cite{dll2def} is a very simple tool: it takes as input a DLL and prints
-to standard output the list of entry points in the DLL. Note that if
-some routines in the DLL have the @cite{Stdcall} convention
+Note that if some routines in the DLL have the @cite{Stdcall} convention
(@ref{274,,Windows Calling Conventions}) with stripped @code{@@@emph{nn}}
suffix then you'll have to edit @code{api.def} to add it, and specify
@emph{-k} to @emph{gnatdll} when creating the import library.
@@ -30666,10 +30689,16 @@ If you have a message about a missing symbol at link time the compiler
tells you what symbol is expected. You just have to go back to the
definition file and add the right suffix.
@end itemize
+@end quotation
+@anchor{gnat_ugn/platform_specific_information gnat-style-import-library}@anchor{287}
+@subsubheading GNAT-Style Import Library
-@item
-Build the import library @cite{libAPI.dll.a}, using @cite{gnatdll}
-(see @ref{287,,Using gnatdll}) as follows:
+
+To create a static import library from @code{API.dll} with the GNAT tools
+you should create the .def file, then use @cite{gnatdll} tool
+(see @ref{288,,Using gnatdll}) as follows:
+
+@quotation
@example
$ gnatdll -e API.def -d API.dll
@@ -30683,30 +30712,21 @@ definition file name is @cite{xyz`}.def`, the import library name will
be @cite{lib`@w{`}xyz`}.a`. Note that in the previous example option
@emph{-e} could have been removed because the name of the definition
file (before the '@cite{.def}' suffix) is the same as the name of the
-DLL (@ref{287,,Using gnatdll} for more information about @cite{gnatdll}).
-@end itemize
-
+DLL (@ref{288,,Using gnatdll} for more information about @cite{gnatdll}).
+@end quotation
+@anchor{gnat_ugn/platform_specific_information msvs-style-import-library}@anchor{289}
@subsubheading Microsoft-Style Import Library
-With GNAT you can either use a GNAT-style or Microsoft-style import
-library. A Microsoft import library is needed only if you plan to make an
+A Microsoft import library is needed only if you plan to make an
Ada DLL available to applications developed with Microsoft
tools (@ref{270,,Mixed-Language Programming on Windows}).
To create a Microsoft-style import library for @code{API.dll} you
-should proceed as follows:
-
-
-@itemize *
-
-@item
-Create the definition file @code{API.def} from the DLL. For this use either
-the @cite{dll2def} tool as described above or the Microsoft @cite{dumpbin}
-tool (see the corresponding Microsoft documentation for further details).
+should create the .def file, then build the actual import library using
+Microsoft's @cite{lib} utility:
-@item
-Build the actual import library using Microsoft's @cite{lib} utility:
+@quotation
@example
$ lib -machine:IX86 -def:API.def -out:API.lib
@@ -30721,10 +30741,10 @@ LIBRARY "API"
See the Microsoft documentation for further details about the usage of
@cite{lib}.
-@end itemize
+@end quotation
@node Building DLLs with GNAT Project files,Building DLLs with GNAT,Using DLLs with GNAT,Mixed-Language Programming on Windows
-@anchor{gnat_ugn/platform_specific_information id24}@anchor{288}@anchor{gnat_ugn/platform_specific_information building-dlls-with-gnat-project-files}@anchor{273}
+@anchor{gnat_ugn/platform_specific_information id24}@anchor{28a}@anchor{gnat_ugn/platform_specific_information building-dlls-with-gnat-project-files}@anchor{273}
@subsubsection Building DLLs with GNAT Project files
@@ -30739,7 +30759,7 @@ when inside the @cite{DllMain} routine which is used for auto-initialization
of shared libraries, so it is not possible to have library level tasks in SALs.
@node Building DLLs with GNAT,Building DLLs with gnatdll,Building DLLs with GNAT Project files,Mixed-Language Programming on Windows
-@anchor{gnat_ugn/platform_specific_information building-dlls-with-gnat}@anchor{289}@anchor{gnat_ugn/platform_specific_information id25}@anchor{28a}
+@anchor{gnat_ugn/platform_specific_information building-dlls-with-gnat}@anchor{28b}@anchor{gnat_ugn/platform_specific_information id25}@anchor{28c}
@subsubsection Building DLLs with GNAT
@@ -30808,7 +30828,7 @@ $ gnatmake main -Iapilib -bargs -shared -largs -Lapilib -lAPI
@end quotation
@node Building DLLs with gnatdll,Ada DLLs and Finalization,Building DLLs with GNAT,Mixed-Language Programming on Windows
-@anchor{gnat_ugn/platform_specific_information building-dlls-with-gnatdll}@anchor{28b}@anchor{gnat_ugn/platform_specific_information id26}@anchor{28c}
+@anchor{gnat_ugn/platform_specific_information building-dlls-with-gnatdll}@anchor{28d}@anchor{gnat_ugn/platform_specific_information id26}@anchor{28e}
@subsubsection Building DLLs with gnatdll
@@ -30817,7 +30837,7 @@ $ gnatmake main -Iapilib -bargs -shared -largs -Lapilib -lAPI
Note that it is preferred to use GNAT Project files
(@ref{273,,Building DLLs with GNAT Project files}) or the built-in GNAT
-DLL support (@ref{289,,Building DLLs with GNAT}) or to build DLLs.
+DLL support (@ref{28b,,Building DLLs with GNAT}) or to build DLLs.
This section explains how to build DLLs containing Ada code using
@cite{gnatdll}. These DLLs will be referred to as Ada DLLs in the
@@ -30833,20 +30853,20 @@ non-Ada applications are as follows:
You need to mark each Ada @emph{entity} exported by the DLL with a @cite{C} or
@cite{Stdcall} calling convention to avoid any Ada name mangling for the
entities exported by the DLL
-(see @ref{28d,,Exporting Ada Entities}). You can
+(see @ref{28f,,Exporting Ada Entities}). You can
skip this step if you plan to use the Ada DLL only from Ada applications.
@item
Your Ada code must export an initialization routine which calls the routine
@cite{adainit} generated by @emph{gnatbind} to perform the elaboration of
-the Ada code in the DLL (@ref{28e,,Ada DLLs and Elaboration}). The initialization
+the Ada code in the DLL (@ref{290,,Ada DLLs and Elaboration}). The initialization
routine exported by the Ada DLL must be invoked by the clients of the DLL
to initialize the DLL.
@item
When useful, the DLL should also export a finalization routine which calls
routine @cite{adafinal} generated by @emph{gnatbind} to perform the
-finalization of the Ada code in the DLL (@ref{28f,,Ada DLLs and Finalization}).
+finalization of the Ada code in the DLL (@ref{291,,Ada DLLs and Finalization}).
The finalization routine exported by the Ada DLL must be invoked by the
clients of the DLL when the DLL services are no further needed.
@@ -30860,7 +30880,7 @@ You must provide a definition file listing the exported entities
@item
Finally you must use @cite{gnatdll} to produce the DLL and the import
-library (@ref{287,,Using gnatdll}).
+library (@ref{288,,Using gnatdll}).
@end itemize
Note that a relocatable DLL stripped using the @cite{strip}
@@ -30879,7 +30899,7 @@ See @ref{8a,,Library Projects}.
@end menu
@node Limitations When Using Ada DLLs from Ada,Exporting Ada Entities,,Building DLLs with gnatdll
-@anchor{gnat_ugn/platform_specific_information limitations-when-using-ada-dlls-from-ada}@anchor{290}
+@anchor{gnat_ugn/platform_specific_information limitations-when-using-ada-dlls-from-ada}@anchor{292}
@subsubsection Limitations When Using Ada DLLs from Ada
@@ -30900,7 +30920,7 @@ It is completely safe to exchange plain elementary, array or record types,
Windows object handles, etc.
@node Exporting Ada Entities,Ada DLLs and Elaboration,Limitations When Using Ada DLLs from Ada,Building DLLs with gnatdll
-@anchor{gnat_ugn/platform_specific_information exporting-ada-entities}@anchor{28d}@anchor{gnat_ugn/platform_specific_information id27}@anchor{291}
+@anchor{gnat_ugn/platform_specific_information exporting-ada-entities}@anchor{28f}@anchor{gnat_ugn/platform_specific_information id27}@anchor{293}
@subsubsection Exporting Ada Entities
@@ -31000,10 +31020,10 @@ end API;
Note that if you do not export the Ada entities with a @cite{C} or
@cite{Stdcall} convention you will have to provide the mangled Ada names
in the definition file of the Ada DLL
-(@ref{292,,Creating the Definition File}).
+(@ref{294,,Creating the Definition File}).
@node Ada DLLs and Elaboration,,Exporting Ada Entities,Building DLLs with gnatdll
-@anchor{gnat_ugn/platform_specific_information ada-dlls-and-elaboration}@anchor{28e}@anchor{gnat_ugn/platform_specific_information id28}@anchor{293}
+@anchor{gnat_ugn/platform_specific_information ada-dlls-and-elaboration}@anchor{290}@anchor{gnat_ugn/platform_specific_information id28}@anchor{295}
@subsubsection Ada DLLs and Elaboration
@@ -31021,7 +31041,7 @@ the Ada elaboration routine @cite{adainit} generated by the GNAT binder
(@ref{ba,,Binding with Non-Ada Main Programs}). See the body of
@cite{Initialize_Api} for an example. Note that the GNAT binder is
automatically invoked during the DLL build process by the @cite{gnatdll}
-tool (@ref{287,,Using gnatdll}).
+tool (@ref{288,,Using gnatdll}).
When a DLL is loaded, Windows systematically invokes a routine called
@cite{DllMain}. It would therefore be possible to call @cite{adainit}
@@ -31034,7 +31054,7 @@ time), which means that the GNAT run time will deadlock waiting for the
newly created task to complete its initialization.
@node Ada DLLs and Finalization,Creating a Spec for Ada DLLs,Building DLLs with gnatdll,Mixed-Language Programming on Windows
-@anchor{gnat_ugn/platform_specific_information id29}@anchor{294}@anchor{gnat_ugn/platform_specific_information ada-dlls-and-finalization}@anchor{28f}
+@anchor{gnat_ugn/platform_specific_information id29}@anchor{296}@anchor{gnat_ugn/platform_specific_information ada-dlls-and-finalization}@anchor{291}
@subsubsection Ada DLLs and Finalization
@@ -31049,10 +31069,10 @@ routine @cite{adafinal} generated by the GNAT binder
See the body of @cite{Finalize_Api} for an
example. As already pointed out the GNAT binder is automatically invoked
during the DLL build process by the @cite{gnatdll} tool
-(@ref{287,,Using gnatdll}).
+(@ref{288,,Using gnatdll}).
@node Creating a Spec for Ada DLLs,GNAT and Windows Resources,Ada DLLs and Finalization,Mixed-Language Programming on Windows
-@anchor{gnat_ugn/platform_specific_information id30}@anchor{295}@anchor{gnat_ugn/platform_specific_information creating-a-spec-for-ada-dlls}@anchor{296}
+@anchor{gnat_ugn/platform_specific_information id30}@anchor{297}@anchor{gnat_ugn/platform_specific_information creating-a-spec-for-ada-dlls}@anchor{298}
@subsubsection Creating a Spec for Ada DLLs
@@ -31110,7 +31130,7 @@ end API;
@end menu
@node Creating the Definition File,Using gnatdll,,Creating a Spec for Ada DLLs
-@anchor{gnat_ugn/platform_specific_information creating-the-definition-file}@anchor{292}@anchor{gnat_ugn/platform_specific_information id31}@anchor{297}
+@anchor{gnat_ugn/platform_specific_information creating-the-definition-file}@anchor{294}@anchor{gnat_ugn/platform_specific_information id31}@anchor{299}
@subsubsection Creating the Definition File
@@ -31146,7 +31166,7 @@ EXPORTS
@end quotation
@node Using gnatdll,,Creating the Definition File,Creating a Spec for Ada DLLs
-@anchor{gnat_ugn/platform_specific_information using-gnatdll}@anchor{287}@anchor{gnat_ugn/platform_specific_information id32}@anchor{298}
+@anchor{gnat_ugn/platform_specific_information using-gnatdll}@anchor{288}@anchor{gnat_ugn/platform_specific_information id32}@anchor{29a}
@subsubsection Using @cite{gnatdll}
@@ -31357,7 +31377,7 @@ asks @emph{gnatlink} to generate the routines @cite{DllMain} and
is loaded into memory.
@item
-@cite{gnatdll} uses @cite{dlltool} (see @ref{299,,Using dlltool}) to build the
+@cite{gnatdll} uses @cite{dlltool} (see @ref{29b,,Using dlltool}) to build the
export table (@code{api.exp}). The export table contains the relocation
information in a form which can be used during the final link to ensure
that the Windows loader is able to place the DLL anywhere in memory.
@@ -31396,7 +31416,7 @@ $ gnatbind -n api
$ gnatlink api api.exp -o api.dll -mdll
@end example
@end itemize
-@anchor{gnat_ugn/platform_specific_information using-dlltool}@anchor{299}
+@anchor{gnat_ugn/platform_specific_information using-dlltool}@anchor{29b}
@subsubheading Using @cite{dlltool}
@@ -31510,8 +31530,8 @@ Verbose mode.
Use @cite{assembler-name} as the assembler. The default is @cite{as}.
@end table
-@node GNAT and Windows Resources,Debugging a DLL,Creating a Spec for Ada DLLs,Mixed-Language Programming on Windows
-@anchor{gnat_ugn/platform_specific_information gnat-and-windows-resources}@anchor{29a}@anchor{gnat_ugn/platform_specific_information id33}@anchor{29b}
+@node GNAT and Windows Resources,Using GNAT DLLs from Microsoft Visual Studio Applications,Creating a Spec for Ada DLLs,Mixed-Language Programming on Windows
+@anchor{gnat_ugn/platform_specific_information gnat-and-windows-resources}@anchor{29c}@anchor{gnat_ugn/platform_specific_information id33}@anchor{29d}
@subsubsection GNAT and Windows Resources
@@ -31606,7 +31626,7 @@ the corresponding Microsoft documentation.
@end menu
@node Building Resources,Compiling Resources,,GNAT and Windows Resources
-@anchor{gnat_ugn/platform_specific_information building-resources}@anchor{29c}@anchor{gnat_ugn/platform_specific_information id34}@anchor{29d}
+@anchor{gnat_ugn/platform_specific_information building-resources}@anchor{29e}@anchor{gnat_ugn/platform_specific_information id34}@anchor{29f}
@subsubsection Building Resources
@@ -31626,7 +31646,7 @@ complete description of the resource script language can be found in the
Microsoft documentation.
@node Compiling Resources,Using Resources,Building Resources,GNAT and Windows Resources
-@anchor{gnat_ugn/platform_specific_information compiling-resources}@anchor{29e}@anchor{gnat_ugn/platform_specific_information id35}@anchor{29f}
+@anchor{gnat_ugn/platform_specific_information compiling-resources}@anchor{2a0}@anchor{gnat_ugn/platform_specific_information id35}@anchor{2a1}
@subsubsection Compiling Resources
@@ -31668,7 +31688,7 @@ $ windres -i myres.res -o myres.o
@end quotation
@node Using Resources,,Compiling Resources,GNAT and Windows Resources
-@anchor{gnat_ugn/platform_specific_information id36}@anchor{2a0}@anchor{gnat_ugn/platform_specific_information using-resources}@anchor{2a1}
+@anchor{gnat_ugn/platform_specific_information id36}@anchor{2a2}@anchor{gnat_ugn/platform_specific_information using-resources}@anchor{2a3}
@subsubsection Using Resources
@@ -31687,8 +31707,101 @@ $ gnatmake myprog -largs myres.o
@end example
@end quotation
-@node Debugging a DLL,Setting Stack Size from gnatlink,GNAT and Windows Resources,Mixed-Language Programming on Windows
-@anchor{gnat_ugn/platform_specific_information id37}@anchor{2a2}@anchor{gnat_ugn/platform_specific_information debugging-a-dll}@anchor{2a3}
+@node Using GNAT DLLs from Microsoft Visual Studio Applications,Debugging a DLL,GNAT and Windows Resources,Mixed-Language Programming on Windows
+@anchor{gnat_ugn/platform_specific_information using-gnat-dll-from-msvs}@anchor{2a4}@anchor{gnat_ugn/platform_specific_information using-gnat-dlls-from-microsoft-visual-studio-applications}@anchor{2a5}
+@subsubsection Using GNAT DLLs from Microsoft Visual Studio Applications
+
+
+@geindex Microsoft Visual Studio
+@geindex use with GNAT DLLs
+
+This section describes a common case of mixed GNAT/Microsoft Visual Studio
+application development, where the main program is developed using MSVS, and
+is linked with a DLL developed using GNAT. Such a mixed application should
+be developed following the general guidelines outlined above; below is the
+cookbook-style sequence of steps to follow:
+
+
+@enumerate
+
+@item
+First develop and build the GNAT shared library using a library project
+(let's assume the project is @cite{mylib.gpr}, producing the library @cite{libmylib.dll}):
+@end enumerate
+
+@quotation
+
+@example
+$ gprbuild -p mylib.gpr
+@end example
+@end quotation
+
+
+@enumerate 2
+
+@item
+Produce a .def file for the symbols you need to interface with, either by
+hand or automatically with possibly some manual adjustments
+(see @ref{286,,Creating Definition File Automatically}):
+@end enumerate
+
+@quotation
+
+@example
+$ dlltool libmylib.dll -z libmylib.def --export-all-symbols
+@end example
+@end quotation
+
+
+@enumerate 3
+
+@item
+Make sure that MSVS command-line tools are accessible on the path.
+
+@item
+Create the Microsoft-style import library (see @ref{289,,MSVS-Style Import Library}):
+@end enumerate
+
+@quotation
+
+@example
+$ lib -machine:IX86 -def:libmylib.def -out:libmylib.lib
+@end example
+@end quotation
+
+If you are using a 64-bit toolchain, the above becomes...
+
+@quotation
+
+@example
+$ lib -machine:X64 -def:libmylib.def -out:libmylib.lib
+@end example
+@end quotation
+
+
+@enumerate 5
+
+@item
+Build the C main
+@end enumerate
+
+@quotation
+
+@example
+$ cl /O2 /MD main.c libmylib.lib
+@end example
+@end quotation
+
+
+@enumerate 6
+
+@item
+Before running the executable, make sure you have set the PATH to the DLL,
+or copy the DLL into into the directory containing the .exe.
+@end enumerate
+
+@node Debugging a DLL,Setting Stack Size from gnatlink,Using GNAT DLLs from Microsoft Visual Studio Applications,Mixed-Language Programming on Windows
+@anchor{gnat_ugn/platform_specific_information id37}@anchor{2a6}@anchor{gnat_ugn/platform_specific_information debugging-a-dll}@anchor{2a7}
@subsubsection Debugging a DLL
@@ -31726,7 +31839,7 @@ tools suite used to build the DLL.
@end menu
@node Program and DLL Both Built with GCC/GNAT,Program Built with Foreign Tools and DLL Built with GCC/GNAT,,Debugging a DLL
-@anchor{gnat_ugn/platform_specific_information program-and-dll-both-built-with-gcc-gnat}@anchor{2a4}@anchor{gnat_ugn/platform_specific_information id38}@anchor{2a5}
+@anchor{gnat_ugn/platform_specific_information program-and-dll-both-built-with-gcc-gnat}@anchor{2a8}@anchor{gnat_ugn/platform_specific_information id38}@anchor{2a9}
@subsubsection Program and DLL Both Built with GCC/GNAT
@@ -31776,7 +31889,7 @@ you can use the standard approach to debug the whole program
(@ref{26,,Running and Debugging Ada Programs}).
@node Program Built with Foreign Tools and DLL Built with GCC/GNAT,,Program and DLL Both Built with GCC/GNAT,Debugging a DLL
-@anchor{gnat_ugn/platform_specific_information program-built-with-foreign-tools-and-dll-built-with-gcc-gnat}@anchor{2a6}@anchor{gnat_ugn/platform_specific_information id39}@anchor{2a7}
+@anchor{gnat_ugn/platform_specific_information program-built-with-foreign-tools-and-dll-built-with-gcc-gnat}@anchor{2aa}@anchor{gnat_ugn/platform_specific_information id39}@anchor{2ab}
@subsubsection Program Built with Foreign Tools and DLL Built with GCC/GNAT
@@ -31932,7 +32045,7 @@ approach to debug a program as described in
@ref{26,,Running and Debugging Ada Programs}.
@node Setting Stack Size from gnatlink,Setting Heap Size from gnatlink,Debugging a DLL,Mixed-Language Programming on Windows
-@anchor{gnat_ugn/platform_specific_information setting-stack-size-from-gnatlink}@anchor{13a}@anchor{gnat_ugn/platform_specific_information id40}@anchor{2a8}
+@anchor{gnat_ugn/platform_specific_information setting-stack-size-from-gnatlink}@anchor{13a}@anchor{gnat_ugn/platform_specific_information id40}@anchor{2ac}
@subsubsection Setting Stack Size from @emph{gnatlink}
@@ -31975,7 +32088,7 @@ because the coma is a separator for this option.
@end itemize
@node Setting Heap Size from gnatlink,,Setting Stack Size from gnatlink,Mixed-Language Programming on Windows
-@anchor{gnat_ugn/platform_specific_information setting-heap-size-from-gnatlink}@anchor{13b}@anchor{gnat_ugn/platform_specific_information id41}@anchor{2a9}
+@anchor{gnat_ugn/platform_specific_information setting-heap-size-from-gnatlink}@anchor{13b}@anchor{gnat_ugn/platform_specific_information id41}@anchor{2ad}
@subsubsection Setting Heap Size from @emph{gnatlink}
@@ -32007,8 +32120,85 @@ This sets the heap reserve size to 0x1000000 bytes. Note that with
because the coma is a separator for this option.
@end itemize
+@node Windows Specific Add-Ons,,Mixed-Language Programming on Windows,Microsoft Windows Topics
+@anchor{gnat_ugn/platform_specific_information windows-specific-add-ons}@anchor{2ae}@anchor{gnat_ugn/platform_specific_information win32-specific-addons}@anchor{2af}
+@subsection Windows Specific Add-Ons
+
+
+This section describes the Windows specific add-ons.
+
+@menu
+* Win32Ada::
+* wPOSIX::
+
+@end menu
+
+@node Win32Ada,wPOSIX,,Windows Specific Add-Ons
+@anchor{gnat_ugn/platform_specific_information win32ada}@anchor{2b0}@anchor{gnat_ugn/platform_specific_information id42}@anchor{2b1}
+@subsubsection Win32Ada
+
+
+Win32Ada is a binding for the Microsoft Win32 API. This binding can be
+easily installed from the provided installer. To use the Win32Ada
+binding you need to use a project file, and adding a single with_clause
+will give you full access to the Win32Ada binding sources and ensure
+that the proper libraries are passed to the linker.
+
+@quotation
+
+@example
+with "win32ada";
+project P is
+ for Sources use ...;
+end P;
+@end example
+@end quotation
+
+To build the application you just need to call gprbuild for the
+application's project, here p.gpr:
+
+@quotation
+
+@example
+gprbuild p.gpr
+@end example
+@end quotation
+
+@node wPOSIX,,Win32Ada,Windows Specific Add-Ons
+@anchor{gnat_ugn/platform_specific_information id43}@anchor{2b2}@anchor{gnat_ugn/platform_specific_information wposix}@anchor{2b3}
+@subsubsection wPOSIX
+
+
+wPOSIX is a minimal POSIX binding whose goal is to help with building
+cross-platforms applications. This binding is not complete though, as
+the Win32 API does not provide the necessary support for all POSIX APIs.
+
+To use the wPOSIX binding you need to use a project file, and adding
+a single with_clause will give you full access to the wPOSIX binding
+sources and ensure that the proper libraries are passed to the linker.
+
+@quotation
+
+@example
+with "wposix";
+project P is
+ for Sources use ...;
+end P;
+@end example
+@end quotation
+
+To build the application you just need to call gprbuild for the
+application's project, here p.gpr:
+
+@quotation
+
+@example
+gprbuild p.gpr
+@end example
+@end quotation
+
@node Mac OS Topics,,Microsoft Windows Topics,Platform-Specific Information
-@anchor{gnat_ugn/platform_specific_information mac-os-topics}@anchor{2f}@anchor{gnat_ugn/platform_specific_information id42}@anchor{2aa}
+@anchor{gnat_ugn/platform_specific_information mac-os-topics}@anchor{2f}@anchor{gnat_ugn/platform_specific_information id44}@anchor{2b4}
@section Mac OS Topics
@@ -32023,7 +32213,7 @@ platform.
@end menu
@node Codesigning the Debugger,,,Mac OS Topics
-@anchor{gnat_ugn/platform_specific_information codesigning-the-debugger}@anchor{2ab}
+@anchor{gnat_ugn/platform_specific_information codesigning-the-debugger}@anchor{2b5}
@subsection Codesigning the Debugger
@@ -32104,7 +32294,7 @@ the location where you installed GNAT. Also, be sure that users are
in the Unix group @code{_developer}.
@node Example of Binder Output File,Elaboration Order Handling in GNAT,Platform-Specific Information,Top
-@anchor{gnat_ugn/example_of_binder_output example-of-binder-output-file}@anchor{10}@anchor{gnat_ugn/example_of_binder_output doc}@anchor{2ac}@anchor{gnat_ugn/example_of_binder_output id1}@anchor{2ad}
+@anchor{gnat_ugn/example_of_binder_output example-of-binder-output-file}@anchor{10}@anchor{gnat_ugn/example_of_binder_output doc}@anchor{2b6}@anchor{gnat_ugn/example_of_binder_output id1}@anchor{2b7}
@chapter Example of Binder Output File
@@ -32856,7 +33046,7 @@ elaboration code in your own application).
@c -- Example: A |withing| unit has a |with| clause, it |withs| a |withed| unit
@node Elaboration Order Handling in GNAT,Inline Assembler,Example of Binder Output File,Top
-@anchor{gnat_ugn/elaboration_order_handling_in_gnat elaboration-order-handling-in-gnat}@anchor{11}@anchor{gnat_ugn/elaboration_order_handling_in_gnat doc}@anchor{2ae}@anchor{gnat_ugn/elaboration_order_handling_in_gnat id1}@anchor{2af}
+@anchor{gnat_ugn/elaboration_order_handling_in_gnat elaboration-order-handling-in-gnat}@anchor{11}@anchor{gnat_ugn/elaboration_order_handling_in_gnat doc}@anchor{2b8}@anchor{gnat_ugn/elaboration_order_handling_in_gnat id1}@anchor{2b9}
@chapter Elaboration Order Handling in GNAT
@@ -32888,7 +33078,7 @@ features.
@end menu
@node Elaboration Code,Checking the Elaboration Order,,Elaboration Order Handling in GNAT
-@anchor{gnat_ugn/elaboration_order_handling_in_gnat elaboration-code}@anchor{2b0}@anchor{gnat_ugn/elaboration_order_handling_in_gnat id2}@anchor{2b1}
+@anchor{gnat_ugn/elaboration_order_handling_in_gnat elaboration-code}@anchor{2ba}@anchor{gnat_ugn/elaboration_order_handling_in_gnat id2}@anchor{2bb}
@section Elaboration Code
@@ -33038,7 +33228,7 @@ to figure out which of these expressions will be true, and hence it
is impossible to guarantee a safe order of elaboration at run time.
@node Checking the Elaboration Order,Controlling the Elaboration Order,Elaboration Code,Elaboration Order Handling in GNAT
-@anchor{gnat_ugn/elaboration_order_handling_in_gnat checking-the-elaboration-order}@anchor{2b2}@anchor{gnat_ugn/elaboration_order_handling_in_gnat id3}@anchor{2b3}
+@anchor{gnat_ugn/elaboration_order_handling_in_gnat checking-the-elaboration-order}@anchor{2bc}@anchor{gnat_ugn/elaboration_order_handling_in_gnat id3}@anchor{2bd}
@section Checking the Elaboration Order
@@ -33142,7 +33332,7 @@ does such optimizations, but still the easiest conceptual model is to
think of there being one variable per subprogram.
@node Controlling the Elaboration Order,Controlling Elaboration in GNAT - Internal Calls,Checking the Elaboration Order,Elaboration Order Handling in GNAT
-@anchor{gnat_ugn/elaboration_order_handling_in_gnat id4}@anchor{2b4}@anchor{gnat_ugn/elaboration_order_handling_in_gnat controlling-the-elaboration-order}@anchor{2b5}
+@anchor{gnat_ugn/elaboration_order_handling_in_gnat id4}@anchor{2be}@anchor{gnat_ugn/elaboration_order_handling_in_gnat controlling-the-elaboration-order}@anchor{2bf}
@section Controlling the Elaboration Order
@@ -33401,7 +33591,7 @@ code in the body makes calls to some other unit, so it is still necessary
to use @cite{Elaborate_All} on such units.
@node Controlling Elaboration in GNAT - Internal Calls,Controlling Elaboration in GNAT - External Calls,Controlling the Elaboration Order,Elaboration Order Handling in GNAT
-@anchor{gnat_ugn/elaboration_order_handling_in_gnat id5}@anchor{2b6}@anchor{gnat_ugn/elaboration_order_handling_in_gnat controlling-elaboration-in-gnat-internal-calls}@anchor{2b7}
+@anchor{gnat_ugn/elaboration_order_handling_in_gnat id5}@anchor{2c0}@anchor{gnat_ugn/elaboration_order_handling_in_gnat controlling-elaboration-in-gnat-internal-calls}@anchor{2c1}
@section Controlling Elaboration in GNAT - Internal Calls
@@ -33581,7 +33771,7 @@ guaranteed) for a program to be able to call a subprogram whose body
is not yet elaborated, without raising a @cite{Program_Error} exception.
@node Controlling Elaboration in GNAT - External Calls,Default Behavior in GNAT - Ensuring Safety,Controlling Elaboration in GNAT - Internal Calls,Elaboration Order Handling in GNAT
-@anchor{gnat_ugn/elaboration_order_handling_in_gnat id6}@anchor{2b8}@anchor{gnat_ugn/elaboration_order_handling_in_gnat controlling-elaboration-in-gnat-external-calls}@anchor{2b9}
+@anchor{gnat_ugn/elaboration_order_handling_in_gnat id6}@anchor{2c2}@anchor{gnat_ugn/elaboration_order_handling_in_gnat controlling-elaboration-in-gnat-external-calls}@anchor{2c3}
@section Controlling Elaboration in GNAT - External Calls
@@ -33689,7 +33879,7 @@ provides a number of facilities for assisting the programmer in
developing programs that are robust with respect to elaboration order.
@node Default Behavior in GNAT - Ensuring Safety,Treatment of Pragma Elaborate,Controlling Elaboration in GNAT - External Calls,Elaboration Order Handling in GNAT
-@anchor{gnat_ugn/elaboration_order_handling_in_gnat id7}@anchor{2ba}@anchor{gnat_ugn/elaboration_order_handling_in_gnat default-behavior-in-gnat-ensuring-safety}@anchor{2bb}
+@anchor{gnat_ugn/elaboration_order_handling_in_gnat id7}@anchor{2c4}@anchor{gnat_ugn/elaboration_order_handling_in_gnat default-behavior-in-gnat-ensuring-safety}@anchor{2c5}
@section Default Behavior in GNAT - Ensuring Safety
@@ -33791,7 +33981,7 @@ is clearly safer to rely on compile and link time checks rather than
run-time checks. However, in the case of legacy code, it may be
difficult to meet the requirements of the static model. This
issue is further discussed in
-@ref{2bc,,What to Do If the Default Elaboration Behavior Fails}.
+@ref{2c6,,What to Do If the Default Elaboration Behavior Fails}.
Note that the static model provides a strict subset of the allowed
behavior and programs of the Ada Reference Manual, so if you do
@@ -33801,7 +33991,7 @@ work using the dynamic model, providing that you remove any
pragma Elaborate statements from the source.
@node Treatment of Pragma Elaborate,Elaboration Issues for Library Tasks,Default Behavior in GNAT - Ensuring Safety,Elaboration Order Handling in GNAT
-@anchor{gnat_ugn/elaboration_order_handling_in_gnat treatment-of-pragma-elaborate}@anchor{2bd}@anchor{gnat_ugn/elaboration_order_handling_in_gnat id8}@anchor{2be}
+@anchor{gnat_ugn/elaboration_order_handling_in_gnat treatment-of-pragma-elaborate}@anchor{2c7}@anchor{gnat_ugn/elaboration_order_handling_in_gnat id8}@anchor{2c8}
@section Treatment of Pragma Elaborate
@@ -33840,7 +34030,7 @@ When using the static mode with @emph{-gnatwl}, any use of
problems.
@node Elaboration Issues for Library Tasks,Mixing Elaboration Models,Treatment of Pragma Elaborate,Elaboration Order Handling in GNAT
-@anchor{gnat_ugn/elaboration_order_handling_in_gnat elaboration-issues-for-library-tasks}@anchor{2bf}@anchor{gnat_ugn/elaboration_order_handling_in_gnat id9}@anchor{2c0}
+@anchor{gnat_ugn/elaboration_order_handling_in_gnat elaboration-issues-for-library-tasks}@anchor{2c9}@anchor{gnat_ugn/elaboration_order_handling_in_gnat id9}@anchor{2ca}
@section Elaboration Issues for Library Tasks
@@ -34203,7 +34393,7 @@ no task receives an entry call before elaboration of all units is completed.
@end itemize
@node Mixing Elaboration Models,What to Do If the Default Elaboration Behavior Fails,Elaboration Issues for Library Tasks,Elaboration Order Handling in GNAT
-@anchor{gnat_ugn/elaboration_order_handling_in_gnat id10}@anchor{2c1}@anchor{gnat_ugn/elaboration_order_handling_in_gnat mixing-elaboration-models}@anchor{2c2}
+@anchor{gnat_ugn/elaboration_order_handling_in_gnat id10}@anchor{2cb}@anchor{gnat_ugn/elaboration_order_handling_in_gnat mixing-elaboration-models}@anchor{2cc}
@section Mixing Elaboration Models
@@ -34268,7 +34458,7 @@ allowing the main application that uses this subsystem to be compiled
using the more reliable default static model.
@node What to Do If the Default Elaboration Behavior Fails,Elaboration for Indirect Calls,Mixing Elaboration Models,Elaboration Order Handling in GNAT
-@anchor{gnat_ugn/elaboration_order_handling_in_gnat id11}@anchor{2c3}@anchor{gnat_ugn/elaboration_order_handling_in_gnat what-to-do-if-the-default-elaboration-behavior-fails}@anchor{2bc}
+@anchor{gnat_ugn/elaboration_order_handling_in_gnat id11}@anchor{2cd}@anchor{gnat_ugn/elaboration_order_handling_in_gnat what-to-do-if-the-default-elaboration-behavior-fails}@anchor{2c6}
@section What to Do If the Default Elaboration Behavior Fails
@@ -34379,7 +34569,7 @@ all subprograms declared in this spec.
@item
Use Pragma Elaborate.
-As previously described in section @ref{2bd,,Treatment of Pragma Elaborate},
+As previously described in section @ref{2c7,,Treatment of Pragma Elaborate},
GNAT in static mode assumes that a @cite{pragma} Elaborate indicates correctly
that no elaboration checks are required on calls to the designated unit.
There may be cases in which the caller knows that no transitive calls
@@ -34512,7 +34702,7 @@ C-tests are indeed correct (it is less efficient, but efficiency is
not a factor in running the ACATS tests.)
@node Elaboration for Indirect Calls,Summary of Procedures for Elaboration Control,What to Do If the Default Elaboration Behavior Fails,Elaboration Order Handling in GNAT
-@anchor{gnat_ugn/elaboration_order_handling_in_gnat id12}@anchor{2c4}@anchor{gnat_ugn/elaboration_order_handling_in_gnat elaboration-for-indirect-calls}@anchor{2c5}
+@anchor{gnat_ugn/elaboration_order_handling_in_gnat id12}@anchor{2ce}@anchor{gnat_ugn/elaboration_order_handling_in_gnat elaboration-for-indirect-calls}@anchor{2cf}
@section Elaboration for Indirect Calls
@@ -34541,7 +34731,7 @@ adding an indirect call can cause erroneous behavior in the presence
of @emph{-gnatd.U}.
@node Summary of Procedures for Elaboration Control,Other Elaboration Order Considerations,Elaboration for Indirect Calls,Elaboration Order Handling in GNAT
-@anchor{gnat_ugn/elaboration_order_handling_in_gnat id13}@anchor{2c6}@anchor{gnat_ugn/elaboration_order_handling_in_gnat summary-of-procedures-for-elaboration-control}@anchor{2c7}
+@anchor{gnat_ugn/elaboration_order_handling_in_gnat id13}@anchor{2d0}@anchor{gnat_ugn/elaboration_order_handling_in_gnat summary-of-procedures-for-elaboration-control}@anchor{2d1}
@section Summary of Procedures for Elaboration Control
@@ -34565,7 +34755,7 @@ and, if you are sure there really are no elaboration problems,
use a global pragma @cite{Suppress (Elaboration_Check)}.
@node Other Elaboration Order Considerations,Determining the Chosen Elaboration Order,Summary of Procedures for Elaboration Control,Elaboration Order Handling in GNAT
-@anchor{gnat_ugn/elaboration_order_handling_in_gnat id14}@anchor{2c8}@anchor{gnat_ugn/elaboration_order_handling_in_gnat other-elaboration-order-considerations}@anchor{2c9}
+@anchor{gnat_ugn/elaboration_order_handling_in_gnat id14}@anchor{2d2}@anchor{gnat_ugn/elaboration_order_handling_in_gnat other-elaboration-order-considerations}@anchor{2d3}
@section Other Elaboration Order Considerations
@@ -34712,7 +34902,7 @@ and figuring out which is correct, and then adding the necessary
@cite{Elaborate} or @cite{Elaborate_All} pragmas to ensure the desired order.
@node Determining the Chosen Elaboration Order,,Other Elaboration Order Considerations,Elaboration Order Handling in GNAT
-@anchor{gnat_ugn/elaboration_order_handling_in_gnat determining-the-chosen-elaboration-order}@anchor{2ca}@anchor{gnat_ugn/elaboration_order_handling_in_gnat id15}@anchor{2cb}
+@anchor{gnat_ugn/elaboration_order_handling_in_gnat determining-the-chosen-elaboration-order}@anchor{2d4}@anchor{gnat_ugn/elaboration_order_handling_in_gnat id15}@anchor{2d5}
@section Determining the Chosen Elaboration Order
@@ -34852,7 +35042,7 @@ gdbstr (body)
@end example
@node Inline Assembler,GNU Free Documentation License,Elaboration Order Handling in GNAT,Top
-@anchor{gnat_ugn/inline_assembler inline-assembler}@anchor{12}@anchor{gnat_ugn/inline_assembler doc}@anchor{2cc}@anchor{gnat_ugn/inline_assembler id1}@anchor{2cd}
+@anchor{gnat_ugn/inline_assembler inline-assembler}@anchor{12}@anchor{gnat_ugn/inline_assembler doc}@anchor{2d6}@anchor{gnat_ugn/inline_assembler id1}@anchor{2d7}
@chapter Inline Assembler
@@ -34911,7 +35101,7 @@ and with assembly language programming.
@end menu
@node Basic Assembler Syntax,A Simple Example of Inline Assembler,,Inline Assembler
-@anchor{gnat_ugn/inline_assembler id2}@anchor{2ce}@anchor{gnat_ugn/inline_assembler basic-assembler-syntax}@anchor{2cf}
+@anchor{gnat_ugn/inline_assembler id2}@anchor{2d8}@anchor{gnat_ugn/inline_assembler basic-assembler-syntax}@anchor{2d9}
@section Basic Assembler Syntax
@@ -35027,7 +35217,7 @@ Intel: Destination first; for example @cite{mov eax@comma{} 4}@w{ }
@node A Simple Example of Inline Assembler,Output Variables in Inline Assembler,Basic Assembler Syntax,Inline Assembler
-@anchor{gnat_ugn/inline_assembler a-simple-example-of-inline-assembler}@anchor{2d0}@anchor{gnat_ugn/inline_assembler id3}@anchor{2d1}
+@anchor{gnat_ugn/inline_assembler a-simple-example-of-inline-assembler}@anchor{2da}@anchor{gnat_ugn/inline_assembler id3}@anchor{2db}
@section A Simple Example of Inline Assembler
@@ -35176,7 +35366,7 @@ If there are no errors, @emph{as} will generate an object file
@code{nothing.out}.
@node Output Variables in Inline Assembler,Input Variables in Inline Assembler,A Simple Example of Inline Assembler,Inline Assembler
-@anchor{gnat_ugn/inline_assembler id4}@anchor{2d2}@anchor{gnat_ugn/inline_assembler output-variables-in-inline-assembler}@anchor{2d3}
+@anchor{gnat_ugn/inline_assembler id4}@anchor{2dc}@anchor{gnat_ugn/inline_assembler output-variables-in-inline-assembler}@anchor{2dd}
@section Output Variables in Inline Assembler
@@ -35543,7 +35733,7 @@ end Get_Flags_3;
@end quotation
@node Input Variables in Inline Assembler,Inlining Inline Assembler Code,Output Variables in Inline Assembler,Inline Assembler
-@anchor{gnat_ugn/inline_assembler id5}@anchor{2d4}@anchor{gnat_ugn/inline_assembler input-variables-in-inline-assembler}@anchor{2d5}
+@anchor{gnat_ugn/inline_assembler id5}@anchor{2de}@anchor{gnat_ugn/inline_assembler input-variables-in-inline-assembler}@anchor{2df}
@section Input Variables in Inline Assembler
@@ -35632,7 +35822,7 @@ _increment__incr.1:
@end quotation
@node Inlining Inline Assembler Code,Other Asm Functionality,Input Variables in Inline Assembler,Inline Assembler
-@anchor{gnat_ugn/inline_assembler id6}@anchor{2d6}@anchor{gnat_ugn/inline_assembler inlining-inline-assembler-code}@anchor{2d7}
+@anchor{gnat_ugn/inline_assembler id6}@anchor{2e0}@anchor{gnat_ugn/inline_assembler inlining-inline-assembler-code}@anchor{2e1}
@section Inlining Inline Assembler Code
@@ -35703,7 +35893,7 @@ movl %esi,%eax
thus saving the overhead of stack frame setup and an out-of-line call.
@node Other Asm Functionality,,Inlining Inline Assembler Code,Inline Assembler
-@anchor{gnat_ugn/inline_assembler other-asm-functionality}@anchor{2d8}@anchor{gnat_ugn/inline_assembler id7}@anchor{2d9}
+@anchor{gnat_ugn/inline_assembler other-asm-functionality}@anchor{2e2}@anchor{gnat_ugn/inline_assembler id7}@anchor{2e3}
@section Other @cite{Asm} Functionality
@@ -35718,7 +35908,7 @@ and @cite{Volatile}, which inhibits unwanted optimizations.
@end menu
@node The Clobber Parameter,The Volatile Parameter,,Other Asm Functionality
-@anchor{gnat_ugn/inline_assembler the-clobber-parameter}@anchor{2da}@anchor{gnat_ugn/inline_assembler id8}@anchor{2db}
+@anchor{gnat_ugn/inline_assembler the-clobber-parameter}@anchor{2e4}@anchor{gnat_ugn/inline_assembler id8}@anchor{2e5}
@subsection The @cite{Clobber} Parameter
@@ -35782,7 +35972,7 @@ Use 'register' name @cite{memory} if you changed a memory location
@end itemize
@node The Volatile Parameter,,The Clobber Parameter,Other Asm Functionality
-@anchor{gnat_ugn/inline_assembler the-volatile-parameter}@anchor{2dc}@anchor{gnat_ugn/inline_assembler id9}@anchor{2dd}
+@anchor{gnat_ugn/inline_assembler the-volatile-parameter}@anchor{2e6}@anchor{gnat_ugn/inline_assembler id9}@anchor{2e7}
@subsection The @cite{Volatile} Parameter
@@ -35818,7 +36008,7 @@ to @cite{True} only if the compiler's optimizations have created
problems.
@node GNU Free Documentation License,Index,Inline Assembler,Top
-@anchor{share/gnu_free_documentation_license gnu-fdl}@anchor{1}@anchor{share/gnu_free_documentation_license doc}@anchor{2de}@anchor{share/gnu_free_documentation_license gnu-free-documentation-license}@anchor{2df}
+@anchor{share/gnu_free_documentation_license gnu-fdl}@anchor{1}@anchor{share/gnu_free_documentation_license doc}@anchor{2e8}@anchor{share/gnu_free_documentation_license gnu-free-documentation-license}@anchor{2e9}
@chapter GNU Free Documentation License
diff --git a/gcc/ada/impunit.adb b/gcc/ada/impunit.adb
index 6f6c9baee71..62947b4f078 100644
--- a/gcc/ada/impunit.adb
+++ b/gcc/ada/impunit.adb
@@ -604,21 +604,21 @@ package body Impunit is
type Aunit_Record is record
Fname : String (1 .. 6);
- Aname : String_Ptr;
+ Aname : String_Ptr_Const;
end record;
-- Array of alternative unit names
- Scasuti : aliased String := "GNAT.Case_Util";
- Scrc32 : aliased String := "GNAT.CRC32";
- Shtable : aliased String := "GNAT.HTable";
- Sos_lib : aliased String := "GNAT.OS_Lib";
- Sregexp : aliased String := "GNAT.Regexp";
- Sregpat : aliased String := "GNAT.Regpat";
- Sstring : aliased String := "GNAT.Strings";
- Sstusta : aliased String := "GNAT.Task_Stack_Usage";
- Stasloc : aliased String := "GNAT.Task_Lock";
- Sutf_32 : aliased String := "GNAT.UTF_32";
+ Scasuti : aliased constant String := "GNAT.Case_Util";
+ Scrc32 : aliased constant String := "GNAT.CRC32";
+ Shtable : aliased constant String := "GNAT.HTable";
+ Sos_lib : aliased constant String := "GNAT.OS_Lib";
+ Sregexp : aliased constant String := "GNAT.Regexp";
+ Sregpat : aliased constant String := "GNAT.Regpat";
+ Sstring : aliased constant String := "GNAT.Strings";
+ Sstusta : aliased constant String := "GNAT.Task_Stack_Usage";
+ Stasloc : aliased constant String := "GNAT.Task_Lock";
+ Sutf_32 : aliased constant String := "GNAT.UTF_32";
-- Array giving mapping
@@ -635,23 +635,22 @@ package body Impunit is
("utf_32", Sutf_32'Access));
----------------------
- -- Get_Kind_Of_Unit --
+ -- Get_Kind_Of_File --
----------------------
- function Get_Kind_Of_Unit (U : Unit_Number_Type) return Kind_Of_Unit is
- Fname : constant File_Name_Type := Unit_File_Name (U);
+ function Get_Kind_Of_File (File : String) return Kind_Of_Unit is
+ pragma Assert (File'First = 1);
+
+ Buffer : String (1 .. 8);
begin
Error_Msg_Strlen := 0;
- Get_Name_String (Fname);
-- Ada/System/Interfaces are all Ada 95 units
- if (Name_Len = 7 and then Name_Buffer (1 .. 7) = "ada.ads")
- or else
- (Name_Len = 10 and then Name_Buffer (1 .. 10) = "system.ads")
- or else
- (Name_Len = 12 and then Name_Buffer (1 .. 12) = "interfac.ads")
+ if File = "ada.ads"
+ or else File = "interfac.ads"
+ or else File = "system.ads"
then
return Ada_95_Unit;
end if;
@@ -659,21 +658,19 @@ package body Impunit is
-- If length of file name is greater than 12, not predefined. The value
-- 12 here is an 8 char name with extension .ads.
- if Name_Len > 12 then
+ if File'Length > 12 then
return Not_Predefined_Unit;
end if;
-- Not predefined if file name does not start with a- g- s- i-
- if Name_Len < 3
- or else Name_Buffer (2) /= '-'
- or else (Name_Buffer (1) /= 'a'
- and then
- Name_Buffer (1) /= 'g'
- and then
- Name_Buffer (1) /= 'i'
- and then
- Name_Buffer (1) /= 's')
+ if File'Length < 3
+ or else File (2) /= '-'
+ or else
+ (File (1) /= 'a'
+ and then File (1) /= 'g'
+ and then File (1) /= 'i'
+ and then File (1) /= 's')
then
return Not_Predefined_Unit;
end if;
@@ -687,25 +684,25 @@ package body Impunit is
-- this routine to detect when a construct comes from an instance of
-- a generic defined in a predefined unit.
- if Name_Buffer (Name_Len - 3 .. Name_Len) /= ".ads"
+ if File (File'Last - 3 .. File'Last) /= ".ads"
and then
- Name_Buffer (Name_Len - 3 .. Name_Len) /= ".adb"
+ File (File'Last - 3 .. File'Last) /= ".adb"
then
return Not_Predefined_Unit;
end if;
-- Otherwise normalize file name to 8 characters
- Name_Len := Name_Len - 4;
- while Name_Len < 8 loop
- Name_Len := Name_Len + 1;
- Name_Buffer (Name_Len) := ' ';
+ Buffer (1 .. File'Length - 4) := File (1 .. File'Length - 4);
+
+ for J in File'Length - 3 .. 8 loop
+ Buffer (J) := ' ';
end loop;
-- See if name is in 95 list
for J in Non_Imp_File_Names_95'Range loop
- if Name_Buffer (1 .. 8) = Non_Imp_File_Names_95 (J).Fname then
+ if Buffer = Non_Imp_File_Names_95 (J).Fname then
return Ada_95_Unit;
end if;
end loop;
@@ -713,7 +710,7 @@ package body Impunit is
-- See if name is in 2005 list
for J in Non_Imp_File_Names_05'Range loop
- if Name_Buffer (1 .. 8) = Non_Imp_File_Names_05 (J).Fname then
+ if Buffer = Non_Imp_File_Names_05 (J).Fname then
return Ada_2005_Unit;
end if;
end loop;
@@ -721,7 +718,7 @@ package body Impunit is
-- See if name is in 2012 list
for J in Non_Imp_File_Names_12'Range loop
- if Name_Buffer (1 .. 8) = Non_Imp_File_Names_12 (J).Fname then
+ if Buffer = Non_Imp_File_Names_12 (J).Fname then
return Ada_2012_Unit;
end if;
end loop;
@@ -729,22 +726,9 @@ package body Impunit is
-- Only remaining special possibilities are children of System.RPC and
-- System.Garlic and special files of the form System.Aux...
- Get_Name_String (Unit_Name (U));
-
- if Name_Len > 12
- and then Name_Buffer (1 .. 11) = "system.rpc."
- then
- return Ada_95_Unit;
- end if;
-
- if Name_Len > 15
- and then Name_Buffer (1 .. 14) = "system.garlic."
- then
- return Ada_95_Unit;
- end if;
-
- if Name_Len > 11
- and then Name_Buffer (1 .. 10) = "system.aux"
+ if File (1 .. 5) = "s-aux"
+ or else File (1 .. 5) = "s-gar"
+ or else File (1 .. 5) = "s-rpc"
then
return Ada_95_Unit;
end if;
@@ -752,18 +736,16 @@ package body Impunit is
-- All tests failed, this is definitely an implementation unit. See if
-- we have an alternative name.
- Get_Name_String (Fname);
-
- if Name_Len in 11 .. 12
- and then Name_Buffer (1 .. 2) = "s-"
- and then Name_Buffer (Name_Len - 3 .. Name_Len) = ".ads"
+ if File'Length in 11 .. 12
+ and then File (1 .. 2) = "s-"
+ and then File (File'Last - 3 .. File'Last) = ".ads"
then
for J in Map_Array'Range loop
- if (Name_Len = 12 and then
- Name_Buffer (3 .. 8) = Map_Array (J).Fname)
+ if (File'Length = 12 and then
+ File (3 .. 8) = Map_Array (J).Fname)
or else
- (Name_Len = 11 and then
- Name_Buffer (3 .. 7) = Map_Array (J).Fname (1 .. 5))
+ (File'Length = 11 and then
+ File (3 .. 7) = Map_Array (J).Fname (1 .. 5))
then
Error_Msg_Strlen := Map_Array (J).Aname'Length;
Error_Msg_String (1 .. Error_Msg_Strlen) :=
@@ -773,6 +755,16 @@ package body Impunit is
end if;
return Implementation_Unit;
+ end Get_Kind_Of_File;
+
+ ----------------------
+ -- Get_Kind_Of_Unit --
+ ----------------------
+
+ function Get_Kind_Of_Unit (U : Unit_Number_Type) return Kind_Of_Unit is
+ begin
+ Get_Name_String (Unit_File_Name (U));
+ return Get_Kind_Of_File (Name_Buffer (1 .. Name_Len));
end Get_Kind_Of_Unit;
-------------------
diff --git a/gcc/ada/impunit.ads b/gcc/ada/impunit.ads
index be3e8d3c06a..f4a11576848 100644
--- a/gcc/ada/impunit.ads
+++ b/gcc/ada/impunit.ads
@@ -6,7 +6,7 @@
-- --
-- S p e c --
-- --
--- Copyright (C) 2000-2011, Free Software Foundation, Inc. --
+-- Copyright (C) 2000-2015, 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- --
@@ -62,11 +62,14 @@ package Impunit is
function Get_Kind_Of_Unit (U : Unit_Number_Type) return Kind_Of_Unit;
-- Given the unit number of a unit, this function determines the type
-- of the unit, as defined above. If the result is Implementation_Unit,
- -- then the name of a possible atlernative equivalent unit is placed in
+ -- then the name of a possible alternative equivalent unit is placed in
-- Error_Msg_String/Slen on return. If there is no alternative name, or if
-- the result is not Implementation_Unit, then Error_Msg_Slen is zero on
-- return, indicating that no alternative name was found.
+ function Get_Kind_Of_File (File : String) return Kind_Of_Unit;
+ -- Same as Get_Kind_Of_Unit, for a given filename
+
function Is_Known_Unit (Nam : Node_Id) return Boolean;
-- Nam is the possible name of a child unit, represented as a selected
-- component node. This function determines whether the name matches one of
diff --git a/gcc/ada/init.c b/gcc/ada/init.c
index 243f3b80d57..4f7341e4e79 100644
--- a/gcc/ada/init.c
+++ b/gcc/ada/init.c
@@ -324,9 +324,7 @@ __gnat_adjust_context_for_raise (int signo ATTRIBUTE_UNUSED, void *ucontext)
propagation after the required low level adjustments. */
static void
-__gnat_error_handler (int sig,
- siginfo_t *si ATTRIBUTE_UNUSED,
- void *ucontext ATTRIBUTE_UNUSED)
+__gnat_error_handler (int sig, siginfo_t *si ATTRIBUTE_UNUSED, void *ucontext)
{
struct Exception_Data *exception;
const char *msg;
@@ -683,7 +681,7 @@ __gnat_error_handler (int sig)
}
void
-__gnat_install_handler(void)
+__gnat_install_handler (void)
{
struct sigaction act;
@@ -1911,6 +1909,40 @@ __gnat_vxsim_error_handler (int sig, siginfo_t *si, void *sc);
static int is_vxsim = 0;
#endif
+#if defined (ARMEL) && (_WRS_VXWORKS_MAJOR >= 7)
+
+/* ARM-vx7 case with arm unwinding exceptions */
+#define HAVE_GNAT_ADJUST_CONTEXT_FOR_RAISE
+
+#include <arch/../regs.h>
+#ifndef __RTP__
+#include <sigLib.h>
+#else
+#include <signal.h>
+#include <regs.h>
+#include <ucontext.h>
+#endif /* __RTP__ */
+
+void
+__gnat_adjust_context_for_raise (int signo ATTRIBUTE_UNUSED,
+ void *sc ATTRIBUTE_UNUSED)
+{
+ /* In case of ARM exceptions, the registers context have the PC pointing
+ to the instruction that raised the signal. However the unwinder expects
+ the instruction to be in the range ]PC,PC+1]. */
+ uintptr_t *pc_addr;
+#ifdef __RTP__
+ mcontext_t *mcontext = &((ucontext_t *) sc)->uc_mcontext;
+ pc_addr = (uintptr_t*)&mcontext->regs.pc;
+#else
+ struct sigcontext * sctx = (struct sigcontext *) sc;
+ pc_addr = (uintptr_t*)&sctx->sc_pregs->pc;
+#endif
+ /* ARM Bump has to be an even number because of odd/even architecture. */
+ *pc_addr += 2;
+}
+#endif /* ARMEL && _WRS_VXWORKS_MAJOR >= 7 */
+
/* Tasking and Non-tasking signal handler. Map SIGnal to Ada exception
propagation after the required low level adjustments. */
@@ -1919,11 +1951,12 @@ __gnat_error_handler (int sig, siginfo_t *si, void *sc)
{
sigset_t mask;
- /* VxWorks 7 on e500v2 clears the SPE bit of the MSR when entering CPU
+ /* VxWorks on e500v2 clears the SPE bit of the MSR when entering CPU
exception state. To allow the handler and exception to work properly
when they contain SPE instructions, we need to set it back before doing
- anything else. */
-#if (CPU == PPCE500V2) && (_WRS_VXWORKS_MAJOR == 7)
+ anything else.
+ This mechanism is only need in kernel mode. */
+#if !(defined (__RTP__) || defined (CERT)) && ((CPU == PPCE500V2) || (CPU == PPC85XX))
register unsigned msr;
/* Read the MSR value */
asm volatile ("mfmsr %0" : "=r" (msr));
@@ -1957,7 +1990,11 @@ __gnat_error_handler (int sig, siginfo_t *si, void *sc)
__gnat_vxsim_error_handler (sig, si, sc);
#endif
- #include "sigtramp.h"
+#ifdef HAVE_GNAT_ADJUST_CONTEXT_FOR_RAISE
+ __gnat_adjust_context_for_raise (sig, sc);
+#endif
+
+#include "sigtramp.h"
__gnat_sigtramp (sig, (void *)si, (void *)sc,
(__sigtramphandler_t *)&__gnat_map_signal);
@@ -2149,7 +2186,7 @@ __gnat_error_handler (int sig)
}
void
-__gnat_install_handler(void)
+__gnat_install_handler (void)
{
struct sigaction act;
@@ -2212,7 +2249,7 @@ __gnat_error_handler (int sig)
}
void
-__gnat_install_handler(void)
+__gnat_install_handler (void)
{
struct sigaction act;
@@ -2259,43 +2296,7 @@ char __gnat_alternate_stack[32 * 1024]; /* 1 * MINSIGSTKSZ */
#ifdef __arm64__
#include <sys/ucontext.h>
-
-/* Trampoline inserted before raising the exception. It modifies the
- stack so that PROC (D, M) looks to be called from the fault point. Note
- that LR may be incorrectly set. */
-void __gnat_sigtramp (struct Exception_Data *d, const char *m,
- mcontext_t ctxt,
- void (*proc)(struct Exception_Data *, const char *));
-
-asm("\n"
-" .section __TEXT,__text,regular,pure_instructions\n"
-" .align 2\n"
-"___gnat_sigtramp:\n"
-" .cfi_startproc\n"
- /* Restore callee saved registers. */
-" ldp x19, x20, [x2, #168]\n"
-" ldp x21, x22, [x2, #184]\n"
-" ldp x23, x24, [x2, #200]\n"
-" ldp x25, x26, [x2, #216]\n"
-" ldp x27, x28, [x2, #232]\n"
-" ldp q8, q9, [x2, #416]\n"
-" ldp q10, q11, [x2, #448]\n"
-" ldp q12, q13, [x2, #480]\n"
-" ldp q14, q15, [x2, #512]\n"
- /* Read FP from mcontext. */
-" ldp fp, lr, [x2, #248]\n"
- /* Read SP and PC from mcontext. */
-" ldp x6, x7, [x2, #264]\n"
-" add lr, x7, #1\n"
-" mov sp, x6\n"
- /* Create a standard frame. */
-" stp fp, lr, [sp, #-16]!\n"
-" .cfi_def_cfa w29, 16\n"
-" .cfi_offset w30, -8\n"
-" .cfi_offset w29, -16\n"
-" br x3\n"
-" .cfi_endproc\n"
-);
+#include "sigtramp.h"
#endif
/* Return true if ADDR is within a stack guard area. */
@@ -2376,23 +2377,36 @@ __gnat_adjust_context_for_raise (int signo ATTRIBUTE_UNUSED,
uc->uc_mcontext->__ss.__rbx = uc->uc_mcontext->__ss.__rdx;
uc->uc_mcontext->__ss.__rdx = t;
}
+#elif defined(__arm64__)
+ /* Even though the CFI is marked as a signal frame, we need this. */
+ ucontext_t *uc = (ucontext_t *)ucontext;
+ uc->uc_mcontext->__ss.__pc++;
#endif
}
static void
-__gnat_error_handler (int sig, siginfo_t *si, void *ucontext)
+__gnat_map_signal (int sig, siginfo_t *si, void *mcontext ATTRIBUTE_UNUSED)
{
struct Exception_Data *exception;
const char *msg;
- __gnat_adjust_context_for_raise (sig, ucontext);
-
switch (sig)
{
case SIGSEGV:
case SIGBUS:
if (__gnat_is_stack_guard ((unsigned long)si->si_addr))
{
+#ifdef __arm64__
+ /* ??? This is a kludge to make stack checking work. The problem is
+ that the trampoline doesn't restore LR and, consequently, doesn't
+ make it possible to unwind past an interrupted frame which hasn"t
+ saved LR on the stack yet. Therefore, for probes in the prologue
+ (32-bit probes as opposed to standard 64-bit probes), we make the
+ unwinder skip the not-yet-established frame altogether. */
+ mcontext_t mc = (mcontext_t)mcontext;
+ if (!(*(unsigned int *)(mc->__ss.__pc-1) & ((unsigned int)1 << 30)))
+ mc->__ss.__pc = mc->__ss.__lr;
+#endif
exception = &storage_error;
msg = "stack overflow";
}
@@ -2401,19 +2415,11 @@ __gnat_error_handler (int sig, siginfo_t *si, void *ucontext)
exception = &constraint_error;
msg = "erroneous memory access";
}
+
/* Reset the use of alt stack, so that the alt stack will be used
for the next signal delivery.
- The stack can't be used in case of stack checking. */
+ The stack can't be used in case of stack checking. */
syscall (SYS_sigreturn, NULL, UC_RESET_ALT_STACK);
-
-#ifdef __arm64__
- /* On arm64, use a trampoline so that the unwinder won't see the
- signal frame. */
- __gnat_sigtramp (exception, msg,
- ((ucontext_t *)ucontext)->uc_mcontext,
- Raise_From_Signal_Handler);
- return;
-#endif
break;
case SIGFPE:
@@ -2429,6 +2435,20 @@ __gnat_error_handler (int sig, siginfo_t *si, void *ucontext)
Raise_From_Signal_Handler (exception, msg);
}
+static void
+__gnat_error_handler (int sig, siginfo_t *si, void *ucontext)
+{
+ __gnat_adjust_context_for_raise (sig, ucontext);
+
+ /* The Darwin libc comes with a signal trampoline, except for ARM64. */
+#ifdef __arm64__
+ __gnat_sigtramp (sig, (void *)si, ucontext,
+ (__sigtramphandler_t *)&__gnat_map_signal);
+#else
+ __gnat_map_signal (sig, si, ucontext);
+#endif
+}
+
void
__gnat_install_handler (void)
{
@@ -2475,6 +2495,7 @@ __gnat_install_handler (void)
/*******************/
#include <signal.h>
+#include <sys/ucontext.h>
#include "sigtramp.h"
#define HAVE_GNAT_ADJUST_CONTEXT_FOR_RAISE
@@ -2491,7 +2512,7 @@ __gnat_adjust_context_for_raise (int signo ATTRIBUTE_UNUSED, void *ucontext)
static void
__gnat_map_signal (int sig,
siginfo_t *si ATTRIBUTE_UNUSED,
- void *ucontext ATTRIBUTE_UNUSED)
+ void *mcontext ATTRIBUTE_UNUSED)
{
struct Exception_Data *exception;
const char *msg;
@@ -2522,9 +2543,7 @@ __gnat_map_signal (int sig,
}
static void
-__gnat_error_handler (int sig,
- siginfo_t *si ATTRIBUTE_UNUSED,
- void *ucontext ATTRIBUTE_UNUSED)
+__gnat_error_handler (int sig, siginfo_t *si, void *ucontext)
{
__gnat_adjust_context_for_raise (sig, ucontext);
diff --git a/gcc/ada/inline.adb b/gcc/ada/inline.adb
index 1330df9b918..bc7bc32416d 100644
--- a/gcc/ada/inline.adb
+++ b/gcc/ada/inline.adb
@@ -193,7 +193,7 @@ package body Inline is
function Has_Initialized_Type (E : Entity_Id) return Boolean;
-- If a candidate for inlining contains type declarations for types with
- -- non-trivial initialization procedures, they are not worth inlining.
+ -- nontrivial initialization procedures, they are not worth inlining.
function Has_Single_Return (N : Node_Id) return Boolean;
-- In general we cannot inline functions that return unconstrained type.
diff --git a/gcc/ada/lib-xref-spark_specific.adb b/gcc/ada/lib-xref-spark_specific.adb
index 3280d184a15..43a023747e5 100644
--- a/gcc/ada/lib-xref-spark_specific.adb
+++ b/gcc/ada/lib-xref-spark_specific.adb
@@ -445,8 +445,12 @@ package body SPARK_Specific is
Decl := Parent (E);
end if;
- pragma Assert (Present (Expression (Decl)));
- Result := Is_Static_Expression (Expression (Decl));
+ if Is_Imported (E) then
+ Result := False;
+ else
+ pragma Assert (Present (Expression (Decl)));
+ Result := Is_Static_Expression (Expression (Decl));
+ end if;
end;
when E_Loop_Parameter | E_In_Parameter =>
diff --git a/gcc/ada/lib-xref.ads b/gcc/ada/lib-xref.ads
index 63d78c7c169..33e20ee2ae2 100644
--- a/gcc/ada/lib-xref.ads
+++ b/gcc/ada/lib-xref.ads
@@ -433,7 +433,7 @@ package Lib.Xref is
-- indicating procedures and functions. If the operation is abstract,
-- these letters are replaced in the xref by 'x' and 'y' respectively.
- Xref_Entity_Letters : array (Entity_Kind) of Character :=
+ Xref_Entity_Letters : constant array (Entity_Kind) of Character :=
(E_Abstract_State => '@',
E_Access_Attribute_Type => 'P',
E_Access_Protected_Subprogram_Type => 'P',
diff --git a/gcc/ada/opt.ads b/gcc/ada/opt.ads
index e99c6b71b25..f9e45540ea6 100644
--- a/gcc/ada/opt.ads
+++ b/gcc/ada/opt.ads
@@ -200,7 +200,7 @@ package Opt is
Alternate_Main_Name : String_Ptr := null;
-- GNATBIND
- -- Set to non null when Bind_Alternate_Main_Name is True. This value
+ -- Set to non-null when Bind_Alternate_Main_Name is True. This value
-- is modified as needed by Gnatbind.Scan_Bind_Arg.
ASIS_Mode : Boolean := False;
@@ -421,9 +421,11 @@ package Opt is
subtype Debug_Level_Value is Nat range 0 .. 3;
Debugger_Level : Debug_Level_Value := 0;
+ -- GNAT, GNATBIND
-- The value given to the -g parameter. The default value for -g with
- -- no value is 2. This is not currently used but is retained for possible
- -- future use.
+ -- no value is 2. If no -g is specified, defaults to 0.
+ -- Note that the generated code should never depend on this variable,
+ -- since we want debug info to be nonintrusive on the generate code.
Default_Exit_Status : Int := 0;
-- GNATBIND
@@ -702,7 +704,7 @@ package Opt is
Generate_C_Code : Boolean := False;
-- GNAT
-- If True, the Cprint circuitry to generate C code output is activated.
- -- Set True by use of -gnatd.V.
+ -- Set True by use of -gnateg or -gnatd.V.
Generate_CodePeer_Messages : Boolean := False;
-- GNAT
@@ -1316,8 +1318,8 @@ package Opt is
Setup_Projects : Boolean := False;
-- GNAT DRIVER
- -- Set to True for GNAT SETUP: the Project Manager creates non existing
- -- object, library and exec directories.
+ -- Set to True for GNAT SETUP: the Project Manager creates nonexistent
+ -- object, library, and exec directories.
Shared_Libgnat : Boolean;
-- GNATBIND
@@ -1374,7 +1376,7 @@ package Opt is
Style_Check_Main : Boolean := False;
-- GNAT
-- Set True if Style_Check was set for the main unit. This is used to
- -- renable style checks for units in the mail extended source that get
+ -- enable style checks for units in the main extended source that get
-- with'ed indirectly. It is set True by use of either the -gnatg or
-- -gnaty switches, but not by use of the Style_Checks pragma.
@@ -1879,7 +1881,7 @@ package Opt is
-- to date version of Ada).
Ada_Version_Pragma_Config : Node_Id;
- -- This will be set non empty if it is set by a configuration pragma
+ -- This will be set nonempty if it is set by a configuration pragma
Ada_Version_Explicit_Config : Ada_Version_Type;
-- GNAT
@@ -2056,7 +2058,7 @@ package Opt is
-- unit. This affects setting of the assert/debug pragma switches, which
-- are normally set false by default for an internal unit, except when the
-- internal unit is the main unit, in which case we use the command line
- -- settings).
+ -- settings.
procedure Restore_Opt_Config_Switches (Save : Config_Switches_Type);
-- This procedure restores a set of switch values previously saved by a
diff --git a/gcc/ada/osint-c.adb b/gcc/ada/osint-c.adb
index dcbace26fa1..a24a5a73894 100644
--- a/gcc/ada/osint-c.adb
+++ b/gcc/ada/osint-c.adb
@@ -446,7 +446,10 @@ package body Osint.C is
if NL <= EL
or else
(Name (NL - EL + Name'First .. Name'Last) /= Ext
- and then Name (NL - 2 + Name'First .. Name'Last) /= ".o")
+ and then Name (NL - 2 + Name'First .. Name'Last) /= ".o"
+ and then
+ (not Generate_C_Code
+ or else Name (NL - 2 + Name'First .. Name'Last) /= ".c"))
then
Fail ("incorrect object file extension");
end if;
diff --git a/gcc/ada/output.adb b/gcc/ada/output.adb
index 9261519b24b..fdfb7330a20 100644
--- a/gcc/ada/output.adb
+++ b/gcc/ada/output.adb
@@ -31,6 +31,17 @@
package body Output is
+ Buffer : String (1 .. Buffer_Max + 1) := (others => '*');
+ for Buffer'Alignment use 4;
+ -- Buffer used to build output line. We do line buffering because it is
+ -- needed for the support of the debug-generated-code option (-gnatD). Note
+ -- any attempt to write more output to a line than can fit in the buffer
+ -- will be silently ignored. The alignment clause improves the efficiency
+ -- of the save/restore procedures.
+
+ Next_Col : Positive range 1 .. Buffer'Length + 1 := 1;
+ -- Column about to be written
+
Current_FD : File_Descriptor := Standout;
-- File descriptor for current output
diff --git a/gcc/ada/output.ads b/gcc/ada/output.ads
index 0fe58edeeae..5fe0d44a9c2 100644
--- a/gcc/ada/output.ads
+++ b/gcc/ada/output.ads
@@ -203,20 +203,6 @@ package Output is
-- Dump contents of string followed by blank, Boolean, line return
private
- -- Note: the following buffer and column position are maintained by the
- -- subprograms defined in this package, and cannot be directly modified or
- -- accessed by a client.
-
- Buffer : String (1 .. Buffer_Max + 1) := (others => '*');
- for Buffer'Alignment use 4;
- -- Buffer used to build output line. We do line buffering because it is
- -- needed for the support of the debug-generated-code option (-gnatD). Note
- -- any attempt to write more output to a line than can fit in the buffer
- -- will be silently ignored. The alignment clause improves the efficiency
- -- of the save/restore procedures.
-
- Next_Col : Positive range 1 .. Buffer'Length + 1 := 1;
- -- Column about to be written
type Saved_Output_Buffer is record
Buffer : String (1 .. Buffer_Max + 1);
diff --git a/gcc/ada/par-ch6.adb b/gcc/ada/par-ch6.adb
index 627e657cfb6..73a0066c0a1 100644
--- a/gcc/ada/par-ch6.adb
+++ b/gcc/ada/par-ch6.adb
@@ -1878,7 +1878,7 @@ package body Ch6 is
Scan; -- past ;
Ret_Node := New_Node (N_Simple_Return_Statement, Ret_Sloc);
- -- Non-trivial case
+ -- Nontrivial case
else
-- Simple_return_statement with expression
diff --git a/gcc/ada/restrict.ads b/gcc/ada/restrict.ads
index c34113a7da7..c8c050c20a6 100644
--- a/gcc/ada/restrict.ads
+++ b/gcc/ada/restrict.ads
@@ -107,7 +107,7 @@ package Restrict is
-- to implement pragma Restrictions (No_Implementation_Restrictions) (which
-- is why this restriction itself is excluded from the list).
- Implementation_Restriction : array (All_Restrictions) of Boolean :=
+ Implementation_Restriction : constant array (All_Restrictions) of Boolean :=
(Simple_Barriers => True,
No_Calendar => True,
No_Default_Initialization => True,
@@ -147,6 +147,7 @@ package Restrict is
No_Wide_Characters => True,
Static_Priorities => True,
Static_Storage_Size => True,
+ Pure_Barriers => True,
SPARK_05 => True,
others => False);
diff --git a/gcc/ada/rtsfind.ads b/gcc/ada/rtsfind.ads
index d320639f655..1d8cd89cc4c 100644
--- a/gcc/ada/rtsfind.ads
+++ b/gcc/ada/rtsfind.ads
@@ -640,6 +640,7 @@ package Rtsfind is
RE_Max_Predef_Prims, -- Ada.Tags
RE_Needs_Finalization, -- Ada.Tags
RE_No_Dispatch_Table_Wrapper, -- Ada.Tags
+ RE_No_Tag, -- Ada.Tags
RE_NDT_Prims_Ptr, -- Ada.Tags
RE_NDT_TSD, -- Ada.Tags
RE_Num_Prims, -- Ada.Tags
@@ -1871,6 +1872,7 @@ package Rtsfind is
RE_Max_Predef_Prims => Ada_Tags,
RE_Needs_Finalization => Ada_Tags,
RE_No_Dispatch_Table_Wrapper => Ada_Tags,
+ RE_No_Tag => Ada_Tags,
RE_NDT_Prims_Ptr => Ada_Tags,
RE_NDT_TSD => Ada_Tags,
RE_Num_Prims => Ada_Tags,
diff --git a/gcc/ada/s-gloloc.adb b/gcc/ada/s-gloloc.adb
index 331e67ffb10..6dfc5277a7b 100644
--- a/gcc/ada/s-gloloc.adb
+++ b/gcc/ada/s-gloloc.adb
@@ -6,7 +6,7 @@
-- --
-- B o d y --
-- --
--- Copyright (C) 1999-2009, Free Software Foundation, Inc. --
+-- Copyright (C) 1999-2015, 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- --
@@ -51,7 +51,7 @@ package body System.Global_Locks is
File : String;
Wait : Duration := 0.1;
Retries : Natural := Natural'Last);
- -- Create a lock file File in directory Dir. If the file cannot be
+ -- Create a lock file File in directory Dir. If the file cannot be
-- locked because someone already owns the lock, this procedure
-- waits Wait seconds and retries at most Retries times. If the file
-- still cannot be locked, Lock_Error is raised. The default is to try
diff --git a/gcc/ada/s-os_lib.adb b/gcc/ada/s-os_lib.adb
index dad157861da..295ef4bae64 100644
--- a/gcc/ada/s-os_lib.adb
+++ b/gcc/ada/s-os_lib.adb
@@ -197,6 +197,10 @@ package body System.OS_Lib is
-- backslash escapes when computing the bounds for arguments. It is
-- then removing the extra backslashes from the argument.
+ Backslash_Is_Sep : constant Boolean := Directory_Separator = '\';
+ -- Whether '\' is a directory separator (as on Windows), or a way to
+ -- quote special characters.
+
begin
Idx := Arg_String'First;
@@ -246,7 +250,7 @@ package body System.OS_Lib is
-- Following character is backquoted
- elsif Arg_String (Idx) = '\' then
+ elsif not Backslash_Is_Sep and then Arg_String (Idx) = '\' then
Backqd := True;
else
diff --git a/gcc/ada/s-os_lib.ads b/gcc/ada/s-os_lib.ads
index dcc1deab687..b86d052ec55 100644
--- a/gcc/ada/s-os_lib.ads
+++ b/gcc/ada/s-os_lib.ads
@@ -731,6 +731,12 @@ package System.OS_Lib is
-- Argument_List. Note that the result is allocated on the heap, and must
-- be freed by the programmer (when it is no longer needed) to avoid
-- memory leaks.
+ -- On Windows, backslashes are used as directory separators. On Unix,
+ -- however, they are used to escape the following character, so that for
+ -- instance "-d=name\ with\ space" is a single argument. In the result
+ -- list, the backslashes have been cleaned up when needed. The previous
+ -- example will thus result a single-element array, where the element is
+ -- "-d=name with space" (Unix) or "-d=name\ with\ space" (windows).
procedure Kill (Pid : Process_Id; Hard_Kill : Boolean := True);
-- Kill the process designated by Pid. Does nothing if Pid is Invalid_Pid
diff --git a/gcc/ada/s-osinte-vxworks.ads b/gcc/ada/s-osinte-vxworks.ads
index e398084eac9..ba76dcdf347 100644
--- a/gcc/ada/s-osinte-vxworks.ads
+++ b/gcc/ada/s-osinte-vxworks.ads
@@ -303,7 +303,6 @@ package System.OS_Interface is
pragma Import (C, taskIsSuspended, "taskIsSuspended");
function taskDelay (ticks : int) return int;
- procedure taskDelay (ticks : int);
pragma Import (C, taskDelay, "taskDelay");
function sysClkRateGet return int;
diff --git a/gcc/ada/s-rident.ads b/gcc/ada/s-rident.ads
index 446ddb9f412..f8ecb674301 100644
--- a/gcc/ada/s-rident.ads
+++ b/gcc/ada/s-rident.ads
@@ -182,6 +182,7 @@ package System.Rident is
No_Elaboration_Code, -- GNAT
No_Obsolescent_Features, -- Ada 2005 AI-368
No_Wide_Characters, -- GNAT
+ Pure_Barriers, -- GNAT
SPARK_05, -- GNAT
-- The following cases require a parameter value
@@ -378,6 +379,7 @@ package System.Rident is
(No_Profile,
No_Implementation_Extensions,
Ravenscar,
+ GNAT_Extended_Ravenscar,
Restricted);
-- Names of recognized profiles. No_Profile is used to indicate that a
-- restriction came from pragma Restrictions[_Warning], as opposed to
@@ -505,6 +507,52 @@ package System.Rident is
Max_Protected_Entries => 1,
Max_Select_Alternatives => 0,
Max_Task_Entries => 0,
+ others => 0)),
+
+ GNAT_Extended_Ravenscar =>
+
+ -- Restrictions for GNAT_Extended_Ravenscar =
+ -- Restricted profile ..
+
+ (Set =>
+ (No_Abort_Statements => True,
+ No_Asynchronous_Control => True,
+ No_Dynamic_Attachment => True,
+ No_Dynamic_Priorities => True,
+ No_Entry_Queue => True,
+ No_Local_Protected_Objects => True,
+ No_Protected_Type_Allocators => True,
+ No_Requeue_Statements => True,
+ No_Task_Allocators => True,
+ No_Task_Attributes_Package => True,
+ No_Task_Hierarchy => True,
+ No_Terminate_Alternatives => True,
+ Max_Asynchronous_Select_Nesting => True,
+ Max_Protected_Entries => True,
+ Max_Select_Alternatives => True,
+ Max_Task_Entries => True,
+
+ -- plus these additional restrictions:
+
+ No_Calendar => True,
+ No_Implicit_Task_Allocations => True,
+ No_Implicit_Protected_Object_Allocations
+ => True,
+ No_Local_Timing_Events => True,
+ No_Relative_Delay => True,
+ No_Select_Statements => True,
+ No_Specific_Termination_Handlers => True,
+ No_Task_Termination => True,
+ Pure_Barriers => True,
+ others => False),
+
+ -- Value settings for Ravenscar (same as Restricted)
+
+ Value =>
+ (Max_Asynchronous_Select_Nesting => 0,
+ Max_Protected_Entries => 1,
+ Max_Select_Alternatives => 0,
+ Max_Task_Entries => 0,
others => 0)));
end System.Rident;
diff --git a/gcc/ada/s-stalib.ads b/gcc/ada/s-stalib.ads
index 5cfd6b37e03..d00d23b7942 100644
--- a/gcc/ada/s-stalib.ads
+++ b/gcc/ada/s-stalib.ads
@@ -53,9 +53,11 @@ pragma Polling (Off);
with Ada.Unchecked_Conversion;
package System.Standard_Library is
- pragma Warnings (Off);
+
+ -- Historical note: pragma Preelaborate was surrounded by a pair of pragma
+ -- Warnings (Off/On) to circumvent a bootstrap issue.
+
pragma Preelaborate;
- pragma Warnings (On);
subtype Big_String is String (1 .. Positive'Last);
pragma Suppress_Initialization (Big_String);
diff --git a/gcc/ada/s-stchop-vxworks.adb b/gcc/ada/s-stchop-vxworks.adb
index ffdba814a43..24de94d91af 100644
--- a/gcc/ada/s-stchop-vxworks.adb
+++ b/gcc/ada/s-stchop-vxworks.adb
@@ -6,7 +6,7 @@
-- --
-- B o d y --
-- --
--- Copyright (C) 1999-2009, Free Software Foundation, Inc. --
+-- Copyright (C) 1999-2015, Free Software Foundation, Inc. --
-- --
-- GNARL 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- --
@@ -29,7 +29,7 @@
-- --
------------------------------------------------------------------------------
--- This is the verson for VxWorks 5 and VxWorks MILS
+-- This is the verson for VxWorks 5, VxWorks 6 Cert and VxWorks MILS
-- This file should be kept synchronized with the general implementation
-- provided by s-stchop.adb.
@@ -47,9 +47,9 @@ package body System.Stack_Checking.Operations is
-- In order to have stack checking working appropriately on VxWorks we need
-- to extract the stack size information from the VxWorks kernel itself.
- -- For VxWorks 5 the library for showing task-related information needs to
- -- be linked into the VxWorks system, when using stack checking. The
- -- taskShow library can be linked into the VxWorks system by either:
+ -- For VxWorks 5 & 6 the library for showing task-related information
+ -- needs to be linked into the VxWorks system, when using stack checking.
+ -- The taskShow library can be linked into the VxWorks system by either:
-- * defining INCLUDE_SHOW_ROUTINES in config.h when using
-- configuration header files, or
@@ -64,6 +64,7 @@ package body System.Stack_Checking.Operations is
Boolean'Pos (Stack_Grows_Down) * Address'First
+ Boolean'Pos (not Stack_Grows_Down) * Address'Last;
pragma Export (C, Stack_Limit, "__gnat_stack_limit");
+
-- Stack_Limit contains the limit of the stack. This variable is later made
-- a task variable (by calling taskVarAdd) and then correctly set to the
-- stack limit of the task. Before being so initialized its value must be
@@ -106,11 +107,6 @@ package body System.Stack_Checking.Operations is
procedure Set_Stack_Limit_For_Current_Task is
use Interfaces.C;
- function Task_Var_Add (Tid : Interfaces.C.int; Var : Address)
- return Interfaces.C.int;
- pragma Import (C, Task_Var_Add, "taskVarAdd");
- -- Import from VxWorks
-
type OS_Stack_Info is record
Size : Interfaces.C.int;
Base : System.Address;
@@ -134,20 +130,17 @@ package body System.Stack_Checking.Operations is
Get_Stack_Info (Stack_Info'Access);
- -- In s-stchop.adb, we check for overflow in the following operations,
- -- but we have no such check in this vxworks version. Why not ???
-
if Stack_Grows_Down then
- Limit := Stack_Info.Base - Storage_Offset (Stack_Info.Size);
+ Limit :=
+ Stack_Info.Base - Storage_Offset (Stack_Info.Size) +
+ Storage_Offset'(12_000);
else
- Limit := Stack_Info.Base + Storage_Offset (Stack_Info.Size);
+ Limit :=
+ Stack_Info.Base + Storage_Offset (Stack_Info.Size) -
+ Storage_Offset'(12_000);
end if;
- -- Note: taskVarAdd implicitly calls taskVarInit if required
-
- if Task_Var_Add (0, Stack_Limit'Address) = 0 then
- Stack_Limit := Limit;
- end if;
+ Stack_Limit := Limit;
end Set_Stack_Limit_For_Current_Task;
end System.Stack_Checking.Operations;
diff --git a/gcc/ada/s-taprop-vxworks.adb b/gcc/ada/s-taprop-vxworks.adb
index 7aff4a66d6e..3b0dca37ae5 100644
--- a/gcc/ada/s-taprop-vxworks.adb
+++ b/gcc/ada/s-taprop-vxworks.adb
@@ -6,7 +6,7 @@
-- --
-- B o d y --
-- --
--- Copyright (C) 1992-2014, Free Software Foundation, Inc. --
+-- Copyright (C) 1992-2015, Free Software Foundation, Inc. --
-- --
-- GNARL 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- --
@@ -589,12 +589,12 @@ package body System.Task_Primitives.Operations is
if Single_Lock then
Result := semGive (Single_RTS_Lock.Mutex);
- taskDelay (0);
+ Result := taskDelay (0);
Result := semTake (Single_RTS_Lock.Mutex, WAIT_FOREVER);
else
Result := semGive (Self_ID.Common.LL.L.Mutex);
- taskDelay (0);
+ Result := taskDelay (0);
Result := semTake (Self_ID.Common.LL.L.Mutex, WAIT_FOREVER);
end if;
end if;
@@ -707,7 +707,7 @@ package body System.Task_Primitives.Operations is
else Self_ID.Common.LL.L.Mutex);
else
- taskDelay (0);
+ Result := taskDelay (0);
end if;
end Timed_Delay;
diff --git a/gcc/ada/scos.ads b/gcc/ada/scos.ads
index 4f5bb57d744..da5cc47c5ad 100644
--- a/gcc/ada/scos.ads
+++ b/gcc/ada/scos.ads
@@ -6,7 +6,7 @@
-- --
-- S p e c --
-- --
--- Copyright (C) 2009-2014, Free Software Foundation, Inc. --
+-- Copyright (C) 2009-2015, 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- --
@@ -360,7 +360,8 @@ package SCOs is
Col : Column_Number;
end record;
- No_Source_Location : Source_Location := (No_Line_Number, No_Column_Number);
+ No_Source_Location : constant Source_Location :=
+ (No_Line_Number, No_Column_Number);
type SCO_Table_Entry is record
From : Source_Location := No_Source_Location;
diff --git a/gcc/ada/sem_attr.adb b/gcc/ada/sem_attr.adb
index 7112869f4a8..eaaeb15f136 100644
--- a/gcc/ada/sem_attr.adb
+++ b/gcc/ada/sem_attr.adb
@@ -9993,6 +9993,9 @@ package body Sem_Attr is
-- to a missed warning (the Valid check does not really
-- modify!) If this case, Note will be reset to False.
+ -- Skip it as well if the type is an Acccess_To_Constant,
+ -- given that no use of the value can modify the prefix.
+
begin
if Attr_Id = Attribute_Unrestricted_Access
and then Nkind (PN) = N_Function_Call
@@ -10006,6 +10009,9 @@ package body Sem_Attr is
then
Note := False;
end if;
+
+ elsif Is_Access_Constant (Typ) then
+ Note := False;
end if;
if Note then
diff --git a/gcc/ada/sem_attr.ads b/gcc/ada/sem_attr.ads
index d71acb33140..a8fa47139ec 100644
--- a/gcc/ada/sem_attr.ads
+++ b/gcc/ada/sem_attr.ads
@@ -46,7 +46,8 @@ package Sem_Attr is
-- in GNAT, as well as constructing an array of flags indicating which
-- attributes these are.
- Attribute_Impl_Def : Attribute_Class_Array := Attribute_Class_Array'(
+ Attribute_Impl_Def : constant Attribute_Class_Array :=
+ Attribute_Class_Array'(
------------------
-- Abort_Signal --
diff --git a/gcc/ada/sem_ch10.adb b/gcc/ada/sem_ch10.adb
index 5de074e1f25..6ff5f9ebfbc 100644
--- a/gcc/ada/sem_ch10.adb
+++ b/gcc/ada/sem_ch10.adb
@@ -1877,9 +1877,8 @@ package body Sem_Ch10 is
-- the extended main unit.
if Generate_SCO
- and then
- In_Extended_Main_Source_Unit
- (Cunit_Entity (Current_Sem_Unit))
+ and then In_Extended_Main_Source_Unit
+ (Cunit_Entity (Current_Sem_Unit))
then
SCO_Record_Raw (Unum);
end if;
diff --git a/gcc/ada/sem_ch12.adb b/gcc/ada/sem_ch12.adb
index 61803ed290e..4dfdac958bb 100644
--- a/gcc/ada/sem_ch12.adb
+++ b/gcc/ada/sem_ch12.adb
@@ -13434,9 +13434,14 @@ package body Sem_Ch12 is
elsif Nkind (Act) /= N_Operator_Symbol then
Analyze (Act);
+ -- Within a package instance, mark actuals that are limited
+ -- views, so their use can be moved to the body of the
+ -- enclosing unit.
+
if Is_Entity_Name (Act)
and then Is_Type (Entity (Act))
and then From_Limited_With (Entity (Act))
+ and then Present (Inst)
then
Append_Elmt (Entity (Act), Incomplete_Actuals (Inst));
end if;
diff --git a/gcc/ada/sem_ch13.adb b/gcc/ada/sem_ch13.adb
index 36eb7ad5490..56b81b43dae 100644
--- a/gcc/ada/sem_ch13.adb
+++ b/gcc/ada/sem_ch13.adb
@@ -1251,22 +1251,25 @@ package body Sem_Ch13 is
(Prag : Node_Id;
Is_Instance : Boolean := False)
is
- Aux : Node_Id;
- Decl : Node_Id;
- Decls : List_Id;
- Def : Node_Id;
+ Aux : Node_Id;
+ Decl : Node_Id;
+ Decls : List_Id;
+ Def : Node_Id;
+ Inserted : Boolean := False;
begin
- -- When the aspect appears on a package, protected unit, subprogram
- -- or task unit body, insert the generated pragma at the top of the
- -- body declarations to emulate the behavior of a source pragma.
+ -- When the aspect appears on an entry, package, protected unit,
+ -- subprogram, or task unit body, insert the generated pragma at the
+ -- top of the body declarations to emulate the behavior of a source
+ -- pragma.
-- package body Pack with Aspect is
-- package body Pack is
-- pragma Prag;
- if Nkind_In (N, N_Package_Body,
+ if Nkind_In (N, N_Entry_Body,
+ N_Package_Body,
N_Protected_Body,
N_Subprogram_Body,
N_Task_Body)
@@ -1278,35 +1281,7 @@ package body Sem_Ch13 is
Set_Declarations (N, Decls);
end if;
- -- Skip other internally generated pragmas from aspects to find
- -- the proper insertion point. As a result the order of pragmas
- -- is the same as the order of aspects.
-
- -- As precondition pragmas generated from conjuncts in the
- -- precondition aspect are presented in reverse order to
- -- Insert_Pragma, insert them in the correct order here by not
- -- skipping previously inserted precondition pragmas when the
- -- current pragma is a precondition.
-
- Decl := First (Decls);
- while Present (Decl) loop
- if Nkind (Decl) = N_Pragma
- and then From_Aspect_Specification (Decl)
- and then not (Get_Pragma_Id (Decl) = Pragma_Precondition
- and then
- Get_Pragma_Id (Prag) = Pragma_Precondition)
- then
- Next (Decl);
- else
- exit;
- end if;
- end loop;
-
- if Present (Decl) then
- Insert_Before (Decl, Prag);
- else
- Append_To (Decls, Prag);
- end if;
+ Prepend_To (Decls, Prag);
-- When the aspect is associated with a [generic] package declaration
-- insert the generated pragma at the top of the visible declarations
@@ -1335,23 +1310,24 @@ package body Sem_Ch13 is
-- <first source declaration>
-- Insert the pragma before the first source declaration by
- -- skipping the instance "header".
+ -- skipping the instance "header" to ensure proper visibility of
+ -- all formals.
if Is_Instance then
Decl := First (Decls);
- while Present (Decl) and then not Comes_From_Source (Decl) loop
- Decl := Next (Decl);
+ while Present (Decl) loop
+ if Comes_From_Source (Decl) then
+ Insert_Before (Decl, Prag);
+ Inserted := True;
+ exit;
+ else
+ Next (Decl);
+ end if;
end loop;
- -- The instance "header" is followed by at least one source
- -- declaration.
-
- if Present (Decl) then
- Insert_Before (Decl, Prag);
+ -- The pragma is placed after the instance "header"
- -- Otherwise the pragma is placed after the instance "header"
-
- else
+ if not Inserted then
Append_To (Decls, Prag);
end if;
@@ -2697,7 +2673,6 @@ package body Sem_Ch13 is
Decorate (Aspect, Aitem);
Insert_Pragma (Aitem);
- goto Continue;
else
Error_Msg_NE
@@ -2706,6 +2681,8 @@ package body Sem_Ch13 is
Aspect, Id);
end if;
+ goto Continue;
+
-- SPARK_Mode
when Aspect_SPARK_Mode =>
@@ -2770,6 +2747,10 @@ package body Sem_Ch13 is
Expression => Relocate_Node (Expr))),
Pragma_Name => Name_Refined_Post);
+ Decorate (Aspect, Aitem);
+ Insert_Pragma (Aitem);
+ goto Continue;
+
-- Refined_State
when Aspect_Refined_State =>
@@ -4724,9 +4705,31 @@ package body Sem_Ch13 is
Find_Overlaid_Entity (N, O_Ent, Off);
- -- Overlaying controlled objects is erroneous.
- -- Emit warning but continue analysis because program is
- -- itself legal, and back-end must see address clause.
+ if Present (O_Ent) then
+
+ -- If the object overlays a constant object, mark it so
+
+ if Is_Constant_Object (O_Ent) then
+ Set_Overlays_Constant (U_Ent);
+ end if;
+
+ else
+ -- If this is not an overlay, mark a variable as being
+ -- volatile to prevent unwanted optimizations. It's a
+ -- conservative interpretation of RM 13.3(19) for the
+ -- cases where the compiler cannot detect potential
+ -- aliasing issues easily and it also covers the case
+ -- of an absolute address where the volatile aspect is
+ -- kind of implicit.
+
+ if Ekind (U_Ent) = E_Variable then
+ Set_Treat_As_Volatile (U_Ent);
+ end if;
+ end if;
+
+ -- Overlaying controlled objects is erroneous. Emit warning
+ -- but continue analysis because program is itself legal,
+ -- and back end must see address clause.
if Present (O_Ent)
and then (Has_Controlled_Component (Etype (O_Ent))
@@ -4743,12 +4746,12 @@ package body Sem_Ch13 is
-- Issue an unconditional warning for a constant overlaying
-- a variable. For the reverse case, we will issue it only
- -- if the variable is modified, see below.
+ -- if the variable is modified.
- elsif Address_Clause_Overlay_Warnings
+ elsif Ekind (U_Ent) = E_Constant
and then Present (O_Ent)
- and then Ekind (U_Ent) = E_Constant
- and then not Is_Constant_Object (O_Ent)
+ and then not Overlays_Constant (U_Ent)
+ and then Address_Clause_Overlay_Warnings
then
Error_Msg_N ("??constant overlays a variable", Expr);
@@ -4767,34 +4770,6 @@ package body Sem_Ch13 is
Note_Possible_Modification (Nam, Sure => False);
- -- Here we are checking for explicit overlap of one variable
- -- by another, and if we find this then mark the overlapped
- -- variable as also being volatile to prevent unwanted
- -- optimizations. This is a significant pessimization so
- -- avoid it when there is an offset, i.e. when the object
- -- is composite; they cannot be optimized easily anyway.
-
- if Present (O_Ent)
- and then Is_Object (O_Ent)
- and then not Off
-
- -- The following test is an expedient solution to what
- -- is really a problem in CodePeer. Suppressing the
- -- Set_Treat_As_Volatile call here prevents later
- -- generation (in some cases) of trees that CodePeer
- -- should, but currently does not, handle correctly.
- -- This test should probably be removed when CodePeer
- -- is improved, just because we want the tree CodePeer
- -- analyzes to match the tree for which we generate code
- -- as closely as is practical. ???
-
- and then not CodePeer_Mode
- then
- -- ??? O_Ent might not be in current unit
-
- Set_Treat_As_Volatile (O_Ent);
- end if;
-
-- Legality checks on the address clause for initialized
-- objects is deferred until the freeze point, because
-- a subsequent pragma might indicate that the object
@@ -4867,39 +4842,12 @@ package body Sem_Ch13 is
-- Furthermore, by removing the test, we handle the
-- aspect case properly.
- if Address_Clause_Overlay_Warnings
- and then Present (O_Ent)
+ if Present (O_Ent)
and then Is_Object (O_Ent)
+ and then not Is_Generic_Type (Etype (U_Ent))
+ and then Address_Clause_Overlay_Warnings
then
- if not Is_Generic_Type (Etype (U_Ent)) then
- Address_Clause_Checks.Append ((N, U_Ent, O_Ent, Off));
- end if;
-
- -- If variable overlays a constant view, and we are
- -- warning on overlays, then mark the variable as
- -- overlaying a constant and warn immediately if it
- -- is initialized. We will give other warnings later
- -- if the variable is assigned.
-
- if Is_Constant_Object (O_Ent)
- and then Ekind (U_Ent) = E_Variable
- then
- declare
- Init : constant Node_Id :=
- Expression (Declaration_Node (U_Ent));
- begin
- Set_Overlays_Constant (U_Ent);
-
- if Present (Init)
- and then Comes_From_Source (Init)
- then
- Error_Msg_Sloc := Sloc (N);
- Error_Msg_NE
- ("??constant& may be modified via address "
- & "clause#", Declaration_Node (U_Ent), O_Ent);
- end if;
- end;
- end if;
+ Address_Clause_Checks.Append ((N, U_Ent, O_Ent, Off));
end if;
end;
@@ -6043,9 +5991,17 @@ package body Sem_Ch13 is
DeclO : Node_Id;
begin
+ -- Accept foreign code statements for CodePeer. The analysis is skipped
+ -- to avoid rejecting unrecognized constructs.
+
+ if CodePeer_Mode then
+ Set_Analyzed (N);
+ return;
+ end if;
+
-- Analyze and check we get right type, note that this implements the
- -- requirement (RM 13.8(1)) that Machine_Code be with'ed, since that
- -- is the only way that Asm_Insn could possibly be visible.
+ -- requirement (RM 13.8(1)) that Machine_Code be with'ed, since that is
+ -- the only way that Asm_Insn could possibly be visible.
Analyze_And_Resolve (Expression (N));
@@ -6058,8 +6014,8 @@ package body Sem_Ch13 is
Check_Code_Statement (N);
- -- Make sure we appear in the handled statement sequence of a
- -- subprogram (RM 13.8(3)).
+ -- Make sure we appear in the handled statement sequence of a subprogram
+ -- (RM 13.8(3)).
if Nkind (HSS) /= N_Handled_Sequence_Of_Statements
or else Nkind (SBody) /= N_Subprogram_Body
@@ -6112,7 +6068,7 @@ package body Sem_Ch13 is
while Present (Stmt) loop
StmtO := Original_Node (Stmt);
- -- A procedure call transformed into a code statement is OK.
+ -- A procedure call transformed into a code statement is OK
if Ada_Version >= Ada_2012
and then Nkind (StmtO) = N_Procedure_Call_Statement
@@ -6612,7 +6568,7 @@ package body Sem_Ch13 is
-- In ASIS_Mode mode, expansion is disabled, but we must convert
-- the Mod clause into an alignment clause anyway, so that the
- -- back-end can compute and back-annotate properly the size and
+ -- back end can compute and back-annotate properly the size and
-- alignment of types that may include this record.
-- This seems dubious, this destroys the source tree in a manner
@@ -13073,7 +13029,7 @@ package body Sem_Ch13 is
end loop;
-- Reset homonym link of other entities, but do not modify link
- -- between entities in current scope, so that the back-end can
+ -- between entities in current scope, so that the back end can
-- have a proper count of local overloadings.
if No (Prev) then
@@ -13668,7 +13624,7 @@ package body Sem_Ch13 is
-- Make entry in unchecked conversion table for later processing by
-- Validate_Unchecked_Conversions, which will check sizes and alignments
- -- (using values set by the back-end where possible). This is only done
+ -- (using values set by the back end where possible). This is only done
-- if the appropriate warning is active.
if Warn_On_Unchecked_Conversion then
diff --git a/gcc/ada/sem_ch3.adb b/gcc/ada/sem_ch3.adb
index 881921d5d69..26ed179296f 100644
--- a/gcc/ada/sem_ch3.adb
+++ b/gcc/ada/sem_ch3.adb
@@ -3043,19 +3043,17 @@ package body Sem_Ch3 is
Set_Direct_Primitive_Operations (T, New_Elmt_List);
end if;
- Push_Scope (T);
-
Set_Stored_Constraint (T, No_Elist);
if Present (Discriminant_Specifications (N)) then
+ Push_Scope (T);
Process_Discriminants (N);
+ End_Scope;
end if;
- End_Scope;
-
- -- If the type has discriminants, non-trivial subtypes may be
- -- declared before the full view of the type. The full views of those
- -- subtypes will be built after the full view of the type.
+ -- If the type has discriminants, nontrivial subtypes may be declared
+ -- before the full view of the type. The full views of those subtypes
+ -- will be built after the full view of the type.
Set_Private_Dependents (T, New_Elmt_List);
Set_Is_Pure (T, F);
@@ -3272,6 +3270,8 @@ package body Sem_Ch3 is
Rewrite (E, Make_Integer_Literal (Sloc (N), 1));
Set_Etype (E, Any_Type);
end if;
+
+ Analyze_Dimension (N);
end Analyze_Number_Declaration;
--------------------------------
@@ -4834,6 +4834,9 @@ package body Sem_Ch3 is
Set_Digits_Value (Id, Digits_Value (T));
Set_Is_Constrained (Id, Is_Constrained (T));
+ -- If the floating point type has dimensions, these will be
+ -- inherited subsequently when Analyze_Dimensions is called.
+
when Signed_Integer_Kind =>
Set_Ekind (Id, E_Signed_Integer_Subtype);
Set_Scalar_Range (Id, Scalar_Range (T));
@@ -18625,6 +18628,16 @@ package body Sem_Ch3 is
-- dereference. The function may also be parameterless, in which case
-- the source node is just an identifier.
+ -- A branch of a conditional expression may have been removed if the
+ -- condition is statically known. This happens during expansion, and
+ -- thus will not happen if previous errors were encountered. The check
+ -- will have been performed on the chosen branch, which replaces the
+ -- original conditional expression.
+
+ if No (Exp) then
+ return True;
+ end if;
+
case Nkind (Original_Node (Exp)) is
when N_Aggregate | N_Extension_Aggregate | N_Function_Call | N_Op =>
return True;
diff --git a/gcc/ada/sem_ch4.adb b/gcc/ada/sem_ch4.adb
index 394029cc87b..68988d3c3b2 100644
--- a/gcc/ada/sem_ch4.adb
+++ b/gcc/ada/sem_ch4.adb
@@ -2191,6 +2191,17 @@ package body Sem_Ch4 is
Get_Next_Interp (I, It);
end loop;
+
+ -- If no valid interpretation has been found, then the type of the
+ -- ELSE expression does not match any interpretation of the THEN
+ -- expression.
+
+ if Etype (N) = Any_Type then
+ Error_Msg_N
+ ("type incompatible with that of `THEN` expression",
+ Else_Expr);
+ return;
+ end if;
end;
end if;
end Analyze_If_Expression;
@@ -3062,6 +3073,7 @@ package body Sem_Ch4 is
if not Is_Type (Nam) then
if Is_Entity_Name (Name (N)) then
Set_Entity (Name (N), Nam);
+ Set_Etype (Name (N), Etype (Nam));
elsif Nkind (Name (N)) = N_Selected_Component then
Set_Entity (Selector_Name (Name (N)), Nam);
@@ -4644,13 +4656,29 @@ package body Sem_Ch4 is
Comp = First_Private_Entity (Base_Type (Prefix_Type));
end loop;
+ -- If the scope is a current instance, the prefix cannot be an
+ -- expression of the same type (that would represent an attempt
+ -- to reach an internal operation of another synchronized object).
+ -- This is legal if prefix is an access to such type and there is
+ -- a dereference.
+
+ if In_Scope
+ and then not Is_Entity_Name (Name)
+ and then Nkind (Name) /= N_Explicit_Dereference
+ then
+ Error_Msg_NE
+ ("invalid reference to internal operation of some object of "
+ & "type &", N, Type_To_Use);
+ Set_Entity (Sel, Any_Id);
+ Set_Etype (Sel, Any_Type);
+ return;
+ end if;
+
-- If there is no visible entity with the given name or none of the
-- visible entities are plausible interpretations, check whether
-- there is some other primitive operation with that name.
- if Ada_Version >= Ada_2005
- and then Is_Tagged_Type (Prefix_Type)
- then
+ if Ada_Version >= Ada_2005 and then Is_Tagged_Type (Prefix_Type) then
if (Etype (N) = Any_Type
or else not Has_Candidate)
and then Try_Object_Operation (N)
@@ -4682,13 +4710,12 @@ package body Sem_Ch4 is
if Has_Candidate
and then Is_Concurrent_Type (Prefix_Type)
and then Nkind (Parent (N)) = N_Procedure_Call_Statement
-
+ then
-- Duplicate the call. This is required to avoid problems with
-- the tree transformations performed by Try_Object_Operation.
-- Set properly the parent of the copied call, because it is
-- about to be reanalyzed.
- then
declare
Par : constant Node_Id := New_Copy_Tree (Parent (N));
@@ -7190,10 +7217,43 @@ package body Sem_Ch4 is
begin
-- We should look for an interpretation with the proper
-- number of formals, and determine whether it is an
- -- In_Parameter, but for now assume that in the overloaded
- -- case constant indexing is legal. To be improved ???
+ -- In_Parameter, but for now we examine the formal that
+ -- corresponds to the indexing, and assume that variable
+ -- indexing is required if some interpretation has an
+ -- assignable formal at that position. Still does not
+ -- cover the most complex cases ???
if Is_Overloaded (Name (Parent (Par))) then
+ declare
+ Proc : constant Node_Id := Name (Parent (Par));
+ A : Node_Id;
+ F : Entity_Id;
+ I : Interp_Index;
+ It : Interp;
+
+ begin
+ Get_First_Interp (Proc, I, It);
+ while Present (It.Nam) loop
+ F := First_Formal (It.Nam);
+ A := First (Parameter_Associations (Parent (Par)));
+
+ while Present (F) and then Present (A) loop
+ if A = Par then
+ if Ekind (F) /= E_In_Parameter then
+ return False;
+ else
+ exit; -- interpretation is safe
+ end if;
+ end if;
+
+ Next_Formal (F);
+ Next_Actual (A);
+ end loop;
+
+ Get_Next_Interp (I, It);
+ end loop;
+ end;
+
return True;
else
@@ -7235,7 +7295,8 @@ package body Sem_Ch4 is
-- If the indexed component is a prefix it may be the first actual
-- of a prefixed call. Retrieve the called entity, if any, and
- -- check its first formal.
+ -- check its first formal. Determine if the context is a procedure
+ -- or function call.
elsif Nkind (Parent (Par)) = N_Selected_Component then
declare
@@ -7243,11 +7304,17 @@ package body Sem_Ch4 is
Nam : constant Entity_Id := Current_Entity (Sel);
begin
- if Present (Nam)
- and then Is_Overloadable (Nam)
- and then Present (First_Formal (Nam))
- then
- return Ekind (First_Formal (Nam)) = E_In_Parameter;
+ if Present (Nam) and then Is_Overloadable (Nam) then
+ if Nkind (Parent (Parent (Par))) =
+ N_Procedure_Call_Statement
+ then
+ return False;
+
+ elsif Ekind (Nam) = E_Function
+ and then Present (First_Formal (Nam))
+ then
+ return Ekind (First_Formal (Nam)) = E_In_Parameter;
+ end if;
end if;
end;
@@ -7390,6 +7457,9 @@ package body Sem_Ch4 is
end if;
else
+ -- If there are multiple indexing functions, build a function call
+ -- and analyze it for each of the possible interpretations.
+
Indexing :=
Make_Function_Call (Loc,
Name =>
@@ -7398,6 +7468,8 @@ package body Sem_Ch4 is
Set_Parent (Indexing, Parent (N));
Set_Generalized_Indexing (N, Indexing);
+ Set_Etype (N, Any_Type);
+ Set_Etype (Name (Indexing), Any_Type);
declare
I : Interp_Index;
@@ -7407,21 +7479,24 @@ package body Sem_Ch4 is
begin
Get_First_Interp (Func_Name, I, It);
Set_Etype (Indexing, Any_Type);
+
while Present (It.Nam) loop
Analyze_One_Call (Indexing, It.Nam, False, Success);
if Success then
- Set_Etype (Name (Indexing), It.Typ);
- Set_Entity (Name (Indexing), It.Nam);
- Set_Etype (N, Etype (Indexing));
- -- Add implicit dereference interpretation
+ -- Function in current interpretation is a valid candidate.
+ -- Its result type is also a potential type for the
+ -- original Indexed_Component node.
+
+ Add_One_Interp (Name (Indexing), It.Nam, It.Typ);
+ Add_One_Interp (N, It.Nam, It.Typ);
+
+ -- Add implicit dereference interpretation to original node
if Has_Discriminants (Etype (It.Nam)) then
Check_Implicit_Dereference (N, Etype (It.Nam));
end if;
-
- exit;
end if;
Get_Next_Interp (I, It);
diff --git a/gcc/ada/sem_ch5.adb b/gcc/ada/sem_ch5.adb
index 418ff13edbb..519aab41503 100644
--- a/gcc/ada/sem_ch5.adb
+++ b/gcc/ada/sem_ch5.adb
@@ -2057,19 +2057,20 @@ package body Sem_Ch5 is
Set_Is_Aliased (Def_Id, Has_Aliased_Components (Typ));
- -- AI12-0151 stipulates that the container cannot be a component
- -- that depends on a discriminant if the enclosing object is
- -- mutable, to prevent a modification of the container in the
- -- course of an iteration.
+ -- AI12-0047 stipulates that the domain (array or container)
+ -- cannot be a component that depends on a discriminant if the
+ -- enclosing object is mutable, to prevent a modification of the
+ -- dowmain of iteration in the course of an iteration.
- -- Should comment on need to go to Original_Node ???
+ -- If the object is an expression it has been captured in a
+ -- temporary, so examine original node.
if Nkind (Original_Node (Iter_Name)) = N_Selected_Component
and then Is_Dependent_Component_Of_Mutable_Object
(Original_Node (Iter_Name))
then
Error_Msg_N
- ("container cannot be a discriminant-dependent "
+ ("iterable name cannot be a discriminant-dependent "
& "component of a mutable object", N);
end if;
diff --git a/gcc/ada/sem_ch6.adb b/gcc/ada/sem_ch6.adb
index e1fe3bb73b7..3eb22f67ee5 100644
--- a/gcc/ada/sem_ch6.adb
+++ b/gcc/ada/sem_ch6.adb
@@ -153,6 +153,14 @@ package body Sem_Ch6 is
-- against a formal access-to-subprogram type so Get_Instance_Of must
-- be called.
+ procedure Check_Limited_Return
+ (N : Node_Id;
+ Expr : Node_Id;
+ R_Type : Entity_Id);
+ -- Check the appropriate (Ada 95 or Ada 2005) rules for returning limited
+ -- types. Used only for simple return statements. Expr is the expression
+ -- returned.
+
procedure Check_Subprogram_Order (N : Node_Id);
-- N is the N_Subprogram_Body node for a subprogram. This routine applies
-- the alpha ordering rule for N if this ordering requirement applicable.
@@ -326,6 +334,7 @@ package body Sem_Ch6 is
Handled_Statement_Sequence =>
Make_Handled_Sequence_Of_Statements (LocX,
Statements => New_List (Ret)));
+ Set_Was_Expression_Function (New_Body);
-- If the expression completes a generic subprogram, we must create a
-- separate node for the body, because at instantiation the original
@@ -450,6 +459,7 @@ package body Sem_Ch6 is
end if;
Analyze (N);
+ Def_Id := Defining_Entity (N);
-- If aspect SPARK_Mode was specified on the body, it needs to be
-- repeated both on the generated spec and the body.
@@ -467,16 +477,11 @@ package body Sem_Ch6 is
-- this because it is not part of the original source.
if Inside_A_Generic then
- declare
- Id : constant Entity_Id := Defining_Entity (N);
-
- begin
- Set_Has_Completion (Id);
- Push_Scope (Id);
- Install_Formals (Id);
- Preanalyze_Spec_Expression (Expr, Etype (Id));
- End_Scope;
- end;
+ Set_Has_Completion (Def_Id);
+ Push_Scope (Def_Id);
+ Install_Formals (Def_Id);
+ Preanalyze_Spec_Expression (Expr, Etype (Def_Id));
+ End_Scope;
end if;
Set_Is_Inlined (Defining_Entity (N));
@@ -500,8 +505,9 @@ package body Sem_Ch6 is
declare
Decls : List_Id := List_Containing (N);
+ Expr : constant Node_Id := Expression (Ret);
Par : constant Node_Id := Parent (Decls);
- Id : constant Entity_Id := Defining_Entity (N);
+ Typ : constant Entity_Id := Etype (Def_Id);
begin
-- If this is a wrapper created for in an instance for a formal
@@ -523,23 +529,19 @@ package body Sem_Ch6 is
end if;
Insert_After (Last (Decls), New_Body);
- Push_Scope (Id);
- Install_Formals (Id);
-- Preanalyze the expression for name capture, except in an
-- instance, where this has been done during generic analysis,
-- and will be redone when analyzing the body.
- declare
- Expr : constant Node_Id := Expression (Ret);
-
- begin
- Set_Parent (Expr, Ret);
+ Set_Parent (Expr, Ret);
+ Push_Scope (Def_Id);
+ Install_Formals (Def_Id);
- if not In_Instance then
- Preanalyze_Spec_Expression (Expr, Etype (Id));
- end if;
- end;
+ if not In_Instance then
+ Preanalyze_Spec_Expression (Expr, Typ);
+ Check_Limited_Return (Original_Node (N), Expr, Typ);
+ end if;
End_Scope;
end if;
@@ -549,8 +551,8 @@ package body Sem_Ch6 is
-- If the return expression is a static constant, we suppress warning
-- messages on unused formals, which in most cases will be noise.
- Set_Is_Trivial_Subprogram (Defining_Entity (New_Body),
- Is_OK_Static_Expression (Expr));
+ Set_Is_Trivial_Subprogram
+ (Defining_Entity (New_Body), Is_OK_Static_Expression (Expr));
end Analyze_Expression_Function;
----------------------------------------
@@ -624,11 +626,6 @@ package body Sem_Ch6 is
-- Apply legality rule of 6.5 (8.2) to the access discriminants of an
-- aggregate in a return statement.
- procedure Check_Limited_Return (Expr : Node_Id);
- -- Check the appropriate (Ada 95 or Ada 2005) rules for returning
- -- limited types. Used only for simple return statements.
- -- Expr is the expression returned.
-
procedure Check_Return_Subtype_Indication (Obj_Decl : Node_Id);
-- Check that the return_subtype_indication properly matches the result
-- subtype of the function, as required by RM-6.5(5.1/2-5.3/2).
@@ -685,87 +682,6 @@ package body Sem_Ch6 is
end if;
end Check_Aggregate_Accessibility;
- --------------------------
- -- Check_Limited_Return --
- --------------------------
-
- procedure Check_Limited_Return (Expr : Node_Id) is
- begin
- -- Ada 2005 (AI-318-02): Return-by-reference types have been
- -- removed and replaced by anonymous access results. This is an
- -- incompatibility with Ada 95. Not clear whether this should be
- -- enforced yet or perhaps controllable with special switch. ???
-
- -- A limited interface that is not immutably limited is OK.
-
- if Is_Limited_Interface (R_Type)
- and then
- not (Is_Task_Interface (R_Type)
- or else Is_Protected_Interface (R_Type)
- or else Is_Synchronized_Interface (R_Type))
- then
- null;
-
- elsif Is_Limited_Type (R_Type)
- and then not Is_Interface (R_Type)
- and then Comes_From_Source (N)
- and then not In_Instance_Body
- and then not OK_For_Limited_Init_In_05 (R_Type, Expr)
- then
- -- Error in Ada 2005
-
- if Ada_Version >= Ada_2005
- and then not Debug_Flag_Dot_L
- and then not GNAT_Mode
- then
- Error_Msg_N
- ("(Ada 2005) cannot copy object of a limited type "
- & "(RM-2005 6.5(5.5/2))", Expr);
-
- if Is_Limited_View (R_Type) then
- Error_Msg_N
- ("\return by reference not permitted in Ada 2005", Expr);
- end if;
-
- -- Warn in Ada 95 mode, to give folks a heads up about this
- -- incompatibility.
-
- -- In GNAT mode, this is just a warning, to allow it to be
- -- evilly turned off. Otherwise it is a real error.
-
- -- In a generic context, simplify the warning because it makes
- -- no sense to discuss pass-by-reference or copy.
-
- elsif Warn_On_Ada_2005_Compatibility or GNAT_Mode then
- if Inside_A_Generic then
- Error_Msg_N
- ("return of limited object not permitted in Ada 2005 "
- & "(RM-2005 6.5(5.5/2))?y?", Expr);
-
- elsif Is_Limited_View (R_Type) then
- Error_Msg_N
- ("return by reference not permitted in Ada 2005 "
- & "(RM-2005 6.5(5.5/2))?y?", Expr);
- else
- Error_Msg_N
- ("cannot copy object of a limited type in Ada 2005 "
- & "(RM-2005 6.5(5.5/2))?y?", Expr);
- end if;
-
- -- Ada 95 mode, compatibility warnings disabled
-
- else
- return; -- skip continuation messages below
- end if;
-
- if not Inside_A_Generic then
- Error_Msg_N
- ("\consider switching to return of access type", Expr);
- Explain_Limited_Type (R_Type, Expr);
- end if;
- end if;
- end Check_Limited_Return;
-
-------------------------------------
-- Check_Return_Subtype_Indication --
-------------------------------------
@@ -987,7 +903,7 @@ package body Sem_Ch6 is
end if;
Resolve (Expr, R_Type);
- Check_Limited_Return (Expr);
+ Check_Limited_Return (N, Expr, R_Type);
if Present (Expr) and then Nkind (Expr) = N_Aggregate then
Check_Aggregate_Accessibility (Expr);
@@ -1644,11 +1560,17 @@ package body Sem_Ch6 is
-- parameterless member of an entry family. Resolution of these various
-- interpretations is delicate.
- Analyze (P);
+ -- Do not analyze machine code statements to avoid rejecting them in
+ -- CodePeer mode.
- -- If this is a call of the form Obj.Op, the call may have been
- -- analyzed and possibly rewritten into a block, in which case
- -- we are done.
+ if CodePeer_Mode and then Nkind (P) = N_Qualified_Expression then
+ Set_Etype (P, Standard_Void_Type);
+ else
+ Analyze (P);
+ end if;
+
+ -- If this is a call of the form Obj.Op, the call may have been analyzed
+ -- and possibly rewritten into a block, in which case we are done.
if Analyzed (N) then
return;
@@ -1717,8 +1639,8 @@ package body Sem_Ch6 is
Analyze_Call_And_Resolve;
- -- If the prefix is the simple name of an entry family, this is
- -- a parameterless call from within the task body itself.
+ -- If the prefix is the simple name of an entry family, this is a
+ -- parameterless call from within the task body itself.
elsif Is_Entity_Name (P)
and then Nkind (P) = N_Identifier
@@ -5526,6 +5448,91 @@ package body Sem_Ch6 is
(New_Id, Old_Id, Fully_Conformant, True, Result, Err_Loc);
end Check_Fully_Conformant;
+ --------------------------
+ -- Check_Limited_Return --
+ --------------------------
+
+ procedure Check_Limited_Return
+ (N : Node_Id;
+ Expr : Node_Id;
+ R_Type : Entity_Id)
+ is
+ begin
+ -- Ada 2005 (AI-318-02): Return-by-reference types have been removed and
+ -- replaced by anonymous access results. This is an incompatibility with
+ -- Ada 95. Not clear whether this should be enforced yet or perhaps
+ -- controllable with special switch. ???
+
+ -- A limited interface that is not immutably limited is OK
+
+ if Is_Limited_Interface (R_Type)
+ and then
+ not (Is_Task_Interface (R_Type)
+ or else Is_Protected_Interface (R_Type)
+ or else Is_Synchronized_Interface (R_Type))
+ then
+ null;
+
+ elsif Is_Limited_Type (R_Type)
+ and then not Is_Interface (R_Type)
+ and then Comes_From_Source (N)
+ and then not In_Instance_Body
+ and then not OK_For_Limited_Init_In_05 (R_Type, Expr)
+ then
+ -- Error in Ada 2005
+
+ if Ada_Version >= Ada_2005
+ and then not Debug_Flag_Dot_L
+ and then not GNAT_Mode
+ then
+ Error_Msg_N
+ ("(Ada 2005) cannot copy object of a limited type "
+ & "(RM-2005 6.5(5.5/2))", Expr);
+
+ if Is_Limited_View (R_Type) then
+ Error_Msg_N
+ ("\return by reference not permitted in Ada 2005", Expr);
+ end if;
+
+ -- Warn in Ada 95 mode, to give folks a heads up about this
+ -- incompatibility.
+
+ -- In GNAT mode, this is just a warning, to allow it to be evilly
+ -- turned off. Otherwise it is a real error.
+
+ -- In a generic context, simplify the warning because it makes no
+ -- sense to discuss pass-by-reference or copy.
+
+ elsif Warn_On_Ada_2005_Compatibility or GNAT_Mode then
+ if Inside_A_Generic then
+ Error_Msg_N
+ ("return of limited object not permitted in Ada 2005 "
+ & "(RM-2005 6.5(5.5/2))?y?", Expr);
+
+ elsif Is_Limited_View (R_Type) then
+ Error_Msg_N
+ ("return by reference not permitted in Ada 2005 "
+ & "(RM-2005 6.5(5.5/2))?y?", Expr);
+ else
+ Error_Msg_N
+ ("cannot copy object of a limited type in Ada 2005 "
+ & "(RM-2005 6.5(5.5/2))?y?", Expr);
+ end if;
+
+ -- Ada 95 mode, compatibility warnings disabled
+
+ else
+ return; -- skip continuation messages below
+ end if;
+
+ if not Inside_A_Generic then
+ Error_Msg_N
+ ("\consider switching to return of access type", Expr);
+ Explain_Limited_Type (R_Type, Expr);
+ end if;
+ end if;
+ end Check_Limited_Return;
+
---------------------------
-- Check_Mode_Conformant --
---------------------------
@@ -7907,7 +7914,7 @@ package body Sem_Ch6 is
when N_Parameter_Association =>
return
- Chars (Selector_Name (E1)) = Chars (Selector_Name (E2))
+ Chars (Selector_Name (E1)) = Chars (Selector_Name (E2))
and then FCE (Explicit_Actual_Parameter (E1),
Explicit_Actual_Parameter (E2));
@@ -8746,12 +8753,39 @@ package body Sem_Ch6 is
------------------------------
procedure Check_Private_Overriding (T : Entity_Id) is
+ function Overrides_Private_Part_Op return Boolean;
+ -- This detects the special case where the overriding subprogram
+ -- is overriding a subprogram that was declared in the same
+ -- private part. That case is illegal by 3.9.3(10).
function Overrides_Visible_Function
(Partial_View : Entity_Id) return Boolean;
-- True if S overrides a function in the visible part. The
-- overridden function could be explicitly or implicitly declared.
+ -------------------------------
+ -- Overrides_Private_Part_Op --
+ -------------------------------
+
+ function Overrides_Private_Part_Op return Boolean is
+ Over_Decl : constant Node_Id :=
+ Unit_Declaration_Node (Overridden_Operation (S));
+ Subp_Decl : constant Node_Id := Unit_Declaration_Node (S);
+
+ begin
+ pragma Assert (Is_Overriding);
+ pragma Assert
+ (Nkind (Over_Decl) = N_Abstract_Subprogram_Declaration);
+ pragma Assert
+ (Nkind (Subp_Decl) = N_Abstract_Subprogram_Declaration);
+
+ return In_Same_List (Over_Decl, Subp_Decl);
+ end Overrides_Private_Part_Op;
+
+ --------------------------------
+ -- Overrides_Visible_Function --
+ --------------------------------
+
function Overrides_Visible_Function
(Partial_View : Entity_Id) return Boolean
is
@@ -8801,10 +8835,12 @@ package body Sem_Ch6 is
if Is_Abstract_Type (T)
and then Is_Abstract_Subprogram (S)
and then (not Is_Overriding
- or else not Is_Abstract_Subprogram (E))
+ or else not Is_Abstract_Subprogram (E)
+ or else Overrides_Private_Part_Op)
then
- Error_Msg_N ("abstract subprograms must be visible "
- & "(RM 3.9.3(10))!", S);
+ Error_Msg_N
+ ("abstract subprograms must be visible (RM 3.9.3(10))!",
+ S);
elsif Ekind (S) = E_Function then
declare
diff --git a/gcc/ada/sem_ch8.adb b/gcc/ada/sem_ch8.adb
index d4487124e6b..9e581e0fa52 100644
--- a/gcc/ada/sem_ch8.adb
+++ b/gcc/ada/sem_ch8.adb
@@ -6774,7 +6774,26 @@ package body Sem_Ch8 is
-- Prefix denotes an enclosing loop, block, or task, i.e. an
-- enclosing construct that is not a subprogram or accept.
- Find_Expanded_Name (N);
+ -- A special case: a protected body may call an operation
+ -- on an external object of the same type, in which case it
+ -- is not an expanded name. If the prefix is the type itself,
+ -- or the context is a single synchronized object it can only
+ -- be interpreted as an expanded name.
+
+ if Is_Concurrent_Type (Etype (P_Name)) then
+ if Is_Type (P_Name)
+ or else Present (Anonymous_Object (Etype (P_Name)))
+ then
+ Find_Expanded_Name (N);
+
+ else
+ Analyze_Selected_Component (N);
+ return;
+ end if;
+
+ else
+ Find_Expanded_Name (N);
+ end if;
elsif Ekind (P_Name) = E_Package then
Find_Expanded_Name (N);
diff --git a/gcc/ada/sem_dim.adb b/gcc/ada/sem_dim.adb
index 1706f5e96cc..50676987367 100644
--- a/gcc/ada/sem_dim.adb
+++ b/gcc/ada/sem_dim.adb
@@ -253,6 +253,11 @@ package body Sem_Dim is
-- N_Type_Conversion
-- N_Unchecked_Type_Conversion
+ procedure Analyze_Dimension_Number_Declaration (N : Node_Id);
+ -- Procedure to analyze dimension of expression in a number declaration.
+ -- This allows a named number to have nontrivial dimensions, while by
+ -- default a named number is dimensionless.
+
procedure Analyze_Dimension_Object_Declaration (N : Node_Id);
-- Subroutine of Analyze_Dimension for object declaration. Check that
-- the dimensions of the object type and the dimensions of the expression
@@ -1147,6 +1152,9 @@ package body Sem_Dim is
N_Unchecked_Type_Conversion =>
Analyze_Dimension_Has_Etype (N);
+ when N_Number_Declaration =>
+ Analyze_Dimension_Number_Declaration (N);
+
when N_Object_Declaration =>
Analyze_Dimension_Object_Declaration (N);
@@ -1308,10 +1316,30 @@ package body Sem_Dim is
procedure Analyze_Dimension_Binary_Op (N : Node_Id) is
N_Kind : constant Node_Kind := Nkind (N);
+ function Dimensions_Of_Operand (N : Node_Id) return Dimension_Type;
+ -- If the operand is a numeric literal that comes from a declared
+ -- constant, use the dimensions of the constant which were computed
+ -- from the expression of the constant declaration.
+
procedure Error_Dim_Msg_For_Binary_Op (N, L, R : Node_Id);
-- Error using Error_Msg_NE and Error_Msg_N at node N. Output the
-- dimensions of both operands.
+ ---------------------------
+ -- Dimensions_Of_Operand --
+ ---------------------------
+
+ function Dimensions_Of_Operand (N : Node_Id) return Dimension_Type is
+ begin
+ if Nkind (N) = N_Real_Literal
+ and then Present (Original_Entity (N))
+ then
+ return Dimensions_Of (Original_Entity (N));
+ else
+ return Dimensions_Of (N);
+ end if;
+ end Dimensions_Of_Operand;
+
---------------------------------
-- Error_Dim_Msg_For_Binary_Op --
---------------------------------
@@ -1334,10 +1362,12 @@ package body Sem_Dim is
then
declare
L : constant Node_Id := Left_Opnd (N);
- Dims_Of_L : constant Dimension_Type := Dimensions_Of (L);
+ Dims_Of_L : constant Dimension_Type :=
+ Dimensions_Of_Operand (L);
L_Has_Dimensions : constant Boolean := Exists (Dims_Of_L);
R : constant Node_Id := Right_Opnd (N);
- Dims_Of_R : constant Dimension_Type := Dimensions_Of (R);
+ Dims_Of_R : constant Dimension_Type :=
+ Dimensions_Of_Operand (R);
R_Has_Dimensions : constant Boolean := Exists (Dims_Of_R);
Dims_Of_N : Dimension_Type := Null_Dimension;
@@ -1453,20 +1483,40 @@ package body Sem_Dim is
-- Comparison cases
-- For relational operations, only dimension checking is
- -- performed (no propagation).
+ -- performed (no propagation). If one operand is the result
+ -- of constant folding the dimensions may have been lost
+ -- in a tree copy, so assume that pre-analysis has verified
+ -- that dimensions are correct.
elsif N_Kind in N_Op_Compare then
if (L_Has_Dimensions or R_Has_Dimensions)
and then Dims_Of_L /= Dims_Of_R
then
- Error_Dim_Msg_For_Binary_Op (N, L, R);
+ if Nkind (L) = N_Real_Literal
+ and then not (Comes_From_Source (L))
+ and then Expander_Active
+ then
+ null;
+
+ elsif Nkind (R) = N_Real_Literal
+ and then not (Comes_From_Source (R))
+ and then Expander_Active
+ then
+ null;
+
+ else
+ Error_Dim_Msg_For_Binary_Op (N, L, R);
+ end if;
end if;
end if;
- -- Removal of dimensions for each operands
+ -- If expander is active, remove dimension information from each
+ -- operand, as only dimensions of result are relevant.
- Remove_Dimensions (L);
- Remove_Dimensions (R);
+ if Expander_Active then
+ Remove_Dimensions (L);
+ Remove_Dimensions (R);
+ end if;
end;
end if;
end Analyze_Dimension_Binary_Op;
@@ -1929,7 +1979,7 @@ package body Sem_Dim is
Check_Error_Detected;
return;
- elsif Ekind (Id) = E_Constant
+ elsif Ekind_In (Id, E_Constant, E_Named_Real)
and then Exists (Dimensions_Of (Id))
then
Set_Dimensions (N, Dimensions_Of (Id));
@@ -1981,6 +2031,22 @@ package body Sem_Dim is
end Analyze_Dimension_Has_Etype;
------------------------------------------
+ -- Analyze_Dimension_Number_Declaration --
+ ------------------------------------------
+
+ procedure Analyze_Dimension_Number_Declaration (N : Node_Id) is
+ Expr : constant Node_Id := Expression (N);
+ Id : constant Entity_Id := Defining_Identifier (N);
+ Dim_Of_Expr : constant Dimension_Type := Dimensions_Of (Expr);
+
+ begin
+ if Exists (Dim_Of_Expr) then
+ Set_Dimensions (Id, Dim_Of_Expr);
+ Set_Etype (Id, Etype (Expr));
+ end if;
+ end Analyze_Dimension_Number_Declaration;
+
+ ------------------------------------------
-- Analyze_Dimension_Object_Declaration --
------------------------------------------
@@ -2161,8 +2227,8 @@ package body Sem_Dim is
-- it cannot inherit a dimension from its subtype.
if Exists (Dims_Of_Id) then
- Error_Msg_N
- ("subtype& already" & Dimensions_Msg_Of (Id, True), N);
+ Error_Msg_NE
+ ("subtype& already " & Dimensions_Msg_Of (Id, True), N, Id);
else
Set_Dimensions (Id, Dims_Of_Etyp);
Set_Symbol (Id, Symbol_Of (Etyp));
diff --git a/gcc/ada/sem_dim.ads b/gcc/ada/sem_dim.ads
index 7393bf6cadd..d1521e90826 100644
--- a/gcc/ada/sem_dim.ads
+++ b/gcc/ada/sem_dim.ads
@@ -6,7 +6,7 @@
-- --
-- S p e c --
-- --
--- Copyright (C) 2011-2013, Free Software Foundation, Inc. --
+-- Copyright (C) 2011-2015, 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- --
@@ -116,8 +116,10 @@ package Sem_Dim is
-- * compontent declaration
-- * extended return statement
-- * expanded name
+ -- * explicit dereference
-- * identifier
-- * indexed component
+ -- * number declaration
-- * object declaration
-- * object renaming declaration
-- * procedure call statement
diff --git a/gcc/ada/sem_elab.adb b/gcc/ada/sem_elab.adb
index 7f3b42a8530..cd9d5b6a2f6 100644
--- a/gcc/ada/sem_elab.adb
+++ b/gcc/ada/sem_elab.adb
@@ -597,6 +597,11 @@ package body Sem_Elab is
-- non-visible unit. This is the scope that is to be investigated to
-- see whether an elaboration check is required.
+ Is_DIC_Proc : Boolean := False;
+ -- Flag set when the call denotes the Default_Initial_Condition
+ -- procedure of a private type that wraps a nontrivial assertion
+ -- expression.
+
Issue_In_SPARK : Boolean;
-- Flag set when a source entity is called during elaboration in SPARK
@@ -966,7 +971,16 @@ package body Sem_Elab is
return;
end if;
- Issue_In_SPARK := SPARK_Mode = On and Comes_From_Source (Ent);
+ Is_DIC_Proc := Is_Nontrivial_Default_Init_Cond_Procedure (Ent);
+
+ -- Elaboration issues in SPARK are reported only for source constructs
+ -- and for nontrivial Default_Initial_Condition procedures. The latter
+ -- must be checked because the default initialization of an object of a
+ -- private type triggers the evaluation of the Default_Initial_Condition
+ -- expression, which in turn may have side effects.
+
+ Issue_In_SPARK :=
+ SPARK_Mode = On and (Comes_From_Source (Ent) or Is_DIC_Proc);
-- Now check if an Elaborate_All (or dynamic check) is needed
@@ -1016,7 +1030,20 @@ package body Sem_Elab is
Ent);
elsif Issue_In_SPARK then
- Error_Msg_NE ("call to & during elaboration in SPARK", N, Ent);
+
+ -- Emit a specialized error message when the elaboration of an
+ -- object of a private type evaluates the expression of pragma
+ -- Default_Initial_Condition. This prevents the internal name
+ -- of the procedure from appearing in the error message.
+
+ if Is_DIC_Proc then
+ Error_Msg_N
+ ("call to Default_Initial_Condition during elaboration in "
+ & "SPARK", N);
+ else
+ Error_Msg_NE
+ ("call to & during elaboration in SPARK", N, Ent);
+ end if;
else
Elab_Warning
diff --git a/gcc/ada/sem_prag.adb b/gcc/ada/sem_prag.adb
index 0e4d30d2509..d2df5d6a0ce 100644
--- a/gcc/ada/sem_prag.adb
+++ b/gcc/ada/sem_prag.adb
@@ -3737,10 +3737,11 @@ package body Sem_Prag is
-- Activate the set of configuration pragmas and permissions that make
-- up the Rational profile.
- procedure Set_Ravenscar_Profile (N : Node_Id);
+ procedure Set_Ravenscar_Profile (Profile : Profile_Name; N : Node_Id);
-- Activate the set of configuration pragmas and restrictions that make
- -- up the Ravenscar Profile. N is the corresponding pragma node, which
- -- is used for error messages on any constructs violating the profile.
+ -- up the Profile. Profile must be either GNAT_Extended_Ravencar or
+ -- Ravenscar. N is the corresponding pragma node, which is used for
+ -- error messages on any constructs violating the profile.
----------------------------------
-- Acquire_Warning_Match_String --
@@ -4327,8 +4328,12 @@ package body Sem_Prag is
begin
Check_Arg_Is_Local_Name (Arg);
+ -- If it came from an aspect, we want to give the error just as if it
+ -- came from source.
+
if not Is_Library_Level_Entity (Entity (Get_Pragma_Arg (Arg)))
- and then Comes_From_Source (N)
+ and then (Comes_From_Source (N)
+ or else Present (Corresponding_Aspect (Parent (Arg))))
then
Error_Pragma_Arg
("argument for pragma% must be library level entity", Arg);
@@ -9654,11 +9659,35 @@ package body Sem_Prag is
-- No_Dependence => Ada.Task_Attributes
-- No_Dependence => System.Multiprocessors.Dispatching_Domains
- procedure Set_Ravenscar_Profile (N : Node_Id) is
- Prefix_Entity : Entity_Id;
- Selector_Entity : Entity_Id;
- Prefix_Node : Node_Id;
- Node : Node_Id;
+ procedure Set_Ravenscar_Profile (Profile : Profile_Name; N : Node_Id) is
+ procedure Set_Error_Msg_To_Profile_Name;
+ -- Set Error_Msg_String and Error_Msg_Strlen to the name of the
+ -- profile.
+
+ -----------------------------------
+ -- Set_Error_Msg_To_Profile_Name --
+ -----------------------------------
+
+ procedure Set_Error_Msg_To_Profile_Name is
+ Prof_Nam : constant Node_Id :=
+ Get_Pragma_Arg
+ (First (Pragma_Argument_Associations (N)));
+
+ begin
+ Get_Name_String (Chars (Prof_Nam));
+ Adjust_Name_Case (Sloc (Prof_Nam));
+ Error_Msg_Strlen := Name_Len;
+ Error_Msg_String (1 .. Name_Len) := Name_Buffer (1 .. Name_Len);
+ end Set_Error_Msg_To_Profile_Name;
+
+ -- Local variables
+
+ Nod : Node_Id;
+ Pref : Node_Id;
+ Pref_Id : Node_Id;
+ Sel_Id : Node_Id;
+
+ -- Start of processing for Set_Ravenscar_Profile
begin
-- pragma Task_Dispatching_Policy (FIFO_Within_Priorities)
@@ -9667,7 +9696,8 @@ package body Sem_Prag is
and then Task_Dispatching_Policy /= 'F'
then
Error_Msg_Sloc := Task_Dispatching_Policy_Sloc;
- Error_Pragma ("Profile (Ravenscar) incompatible with policy#");
+ Set_Error_Msg_To_Profile_Name;
+ Error_Pragma ("Profile (~) incompatible with policy#");
-- Set the FIFO_Within_Priorities policy, but always preserve
-- System_Location since we like the error message with the run time
@@ -9687,7 +9717,8 @@ package body Sem_Prag is
and then Locking_Policy /= 'C'
then
Error_Msg_Sloc := Locking_Policy_Sloc;
- Error_Pragma ("Profile (Ravenscar) incompatible with policy#");
+ Set_Error_Msg_To_Profile_Name;
+ Error_Pragma ("Profile (~) incompatible with policy#");
-- Set the Ceiling_Locking policy, but preserve System_Location since
-- we like the error message with the run time name.
@@ -9707,7 +9738,7 @@ package body Sem_Prag is
-- Set the corresponding restrictions
Set_Profile_Restrictions
- (Ravenscar, N, Warn => Treat_Restrictions_As_Warnings);
+ (Profile, N, Warn => Treat_Restrictions_As_Warnings);
-- Set the No_Dependence restrictions
@@ -9721,52 +9752,56 @@ package body Sem_Prag is
-- No_Dependence => Ada.Execution_Time.Group_Budget
-- No_Dependence => Ada.Execution_Time.Timers
+ -- ??? The use of Name_Buffer here is suspicious. The names should
+ -- be registered in snames.ads-tmpl and used to build the qualified
+ -- names of units.
+
if Ada_Version >= Ada_2005 then
Name_Buffer (1 .. 3) := "ada";
Name_Len := 3;
- Prefix_Entity := Make_Identifier (Loc, Name_Find);
+ Pref_Id := Make_Identifier (Loc, Name_Find);
Name_Buffer (1 .. 14) := "execution_time";
Name_Len := 14;
- Selector_Entity := Make_Identifier (Loc, Name_Find);
+ Sel_Id := Make_Identifier (Loc, Name_Find);
- Prefix_Node :=
+ Pref :=
Make_Selected_Component
(Sloc => Loc,
- Prefix => Prefix_Entity,
- Selector_Name => Selector_Entity);
+ Prefix => Pref_Id,
+ Selector_Name => Sel_Id);
Name_Buffer (1 .. 13) := "group_budgets";
Name_Len := 13;
- Selector_Entity := Make_Identifier (Loc, Name_Find);
+ Sel_Id := Make_Identifier (Loc, Name_Find);
- Node :=
+ Nod :=
Make_Selected_Component
(Sloc => Loc,
- Prefix => Prefix_Node,
- Selector_Name => Selector_Entity);
+ Prefix => Pref,
+ Selector_Name => Sel_Id);
Set_Restriction_No_Dependence
- (Unit => Node,
+ (Unit => Nod,
Warn => Treat_Restrictions_As_Warnings,
Profile => Ravenscar);
Name_Buffer (1 .. 6) := "timers";
Name_Len := 6;
- Selector_Entity := Make_Identifier (Loc, Name_Find);
+ Sel_Id := Make_Identifier (Loc, Name_Find);
- Node :=
+ Nod :=
Make_Selected_Component
(Sloc => Loc,
- Prefix => Prefix_Node,
- Selector_Name => Selector_Entity);
+ Prefix => Pref,
+ Selector_Name => Sel_Id);
Set_Restriction_No_Dependence
- (Unit => Node,
+ (Unit => Nod,
Warn => Treat_Restrictions_As_Warnings,
Profile => Ravenscar);
end if;
@@ -9779,32 +9814,32 @@ package body Sem_Prag is
Name_Buffer (1 .. 6) := "system";
Name_Len := 6;
- Prefix_Entity := Make_Identifier (Loc, Name_Find);
+ Pref_Id := Make_Identifier (Loc, Name_Find);
Name_Buffer (1 .. 15) := "multiprocessors";
Name_Len := 15;
- Selector_Entity := Make_Identifier (Loc, Name_Find);
+ Sel_Id := Make_Identifier (Loc, Name_Find);
- Prefix_Node :=
+ Pref :=
Make_Selected_Component
(Sloc => Loc,
- Prefix => Prefix_Entity,
- Selector_Name => Selector_Entity);
+ Prefix => Pref_Id,
+ Selector_Name => Sel_Id);
Name_Buffer (1 .. 19) := "dispatching_domains";
Name_Len := 19;
- Selector_Entity := Make_Identifier (Loc, Name_Find);
+ Sel_Id := Make_Identifier (Loc, Name_Find);
- Node :=
+ Nod :=
Make_Selected_Component
(Sloc => Loc,
- Prefix => Prefix_Node,
- Selector_Name => Selector_Entity);
+ Prefix => Pref,
+ Selector_Name => Sel_Id);
Set_Restriction_No_Dependence
- (Unit => Node,
+ (Unit => Nod,
Warn => Treat_Restrictions_As_Warnings,
Profile => Ravenscar);
end if;
@@ -12569,22 +12604,15 @@ package body Sem_Prag is
Obj_Id := Defining_Entity (Obj_Decl);
- -- The object declaration must be a library-level variable with
- -- an initialization expression. The expression must depend on
- -- a variable, parameter, or another constant_after_elaboration,
- -- but the compiler cannot detect this property, as this requires
- -- full flow analysis (SPARK RM 3.3.1).
+ -- The object declaration must be a library-level variable which
+ -- is either explicitly initialized or obtains a value during the
+ -- elaboration of a package body (SPARK RM 3.3.1).
if Ekind (Obj_Id) = E_Variable then
if not Is_Library_Level_Entity (Obj_Id) then
Error_Pragma
("pragma % must apply to a library level variable");
return;
-
- elsif not Has_Init_Expression (Obj_Decl) then
- Error_Pragma
- ("pragma % must apply to a variable with initialization "
- & "expression");
end if;
-- Otherwise the pragma applies to a constant, which is illegal
@@ -12670,9 +12698,14 @@ package body Sem_Prag is
Subp_Decl :=
Find_Related_Declaration_Or_Body (N, Do_Checks => True);
+ -- Entry
+
+ if Nkind (Subp_Decl) = N_Entry_Declaration then
+ null;
+
-- Generic subprogram
- if Nkind (Subp_Decl) = N_Generic_Subprogram_Declaration then
+ elsif Nkind (Subp_Decl) = N_Generic_Subprogram_Declaration then
null;
-- Body acts as spec
@@ -18793,7 +18826,10 @@ package body Sem_Prag is
begin
if Chars (Argx) = Name_Ravenscar then
- Set_Ravenscar_Profile (N);
+ Set_Ravenscar_Profile (Ravenscar, N);
+
+ elsif Chars (Argx) = Name_Gnat_Extended_Ravenscar then
+ Set_Ravenscar_Profile (GNAT_Extended_Ravenscar, N);
elsif Chars (Argx) = Name_Restricted then
Set_Profile_Restrictions
@@ -19716,7 +19752,7 @@ package body Sem_Prag is
GNAT_Pragma;
Check_Arg_Count (0);
Check_Valid_Configuration_Pragma;
- Set_Ravenscar_Profile (N);
+ Set_Ravenscar_Profile (Ravenscar, N);
if Warn_On_Obsolescent_Feature then
Error_Msg_N
@@ -25403,6 +25439,14 @@ package body Sem_Prag is
SPARK_Msg_N
("\all constituents must be declared before body #",
N);
+
+ -- A misplaced constituent is a critical error because
+ -- pragma Refined_Depends or Refined_Global depends on
+ -- the proper link between a state and a constituent.
+ -- Stop the compilation, as this leads to a multitude
+ -- of misleading cascaded errors.
+
+ raise Program_Error;
end if;
-- The constituent is a valid state or object
diff --git a/gcc/ada/sem_res.adb b/gcc/ada/sem_res.adb
index 5ee73a938df..f6d71ce98c4 100644
--- a/gcc/ada/sem_res.adb
+++ b/gcc/ada/sem_res.adb
@@ -1635,7 +1635,7 @@ package body Sem_Res is
end if;
if Nkind (Old_Sec) = N_Parameter_Association then
- if Chars (Selector_Name (Old_Sec)) =
+ if Chars (Selector_Name (Old_Sec)) =
Chars (First_Entity (Op_Id))
then
Rewrite (Explicit_Actual_Parameter (Old_Sec),
@@ -7577,8 +7577,8 @@ package body Sem_Res is
end if;
if Ekind_In (Nam, E_Entry, E_Entry_Family)
- and then Present (PPC_Wrapper (Nam))
- and then Current_Scope /= PPC_Wrapper (Nam)
+ and then Present (Contract_Wrapper (Nam))
+ and then Current_Scope /= Contract_Wrapper (Nam)
then
-- Rewrite as call to the precondition wrapper, adding the task
-- object to the list of actuals. If the call is to a member of an
@@ -7600,7 +7600,7 @@ package body Sem_Res is
New_Call :=
Make_Procedure_Call_Statement (Loc,
Name =>
- New_Occurrence_Of (PPC_Wrapper (Nam), Loc),
+ New_Occurrence_Of (Contract_Wrapper (Nam), Loc),
Parameter_Associations => New_Actuals);
Rewrite (N, New_Call);
diff --git a/gcc/ada/sem_util.adb b/gcc/ada/sem_util.adb
index 89332c44b8c..712d03d258d 100644
--- a/gcc/ada/sem_util.adb
+++ b/gcc/ada/sem_util.adb
@@ -1732,6 +1732,8 @@ package body Sem_Util is
Disc : Entity_Id)
is
Loc : constant Source_Ptr := Sloc (Expr);
+ I : Interp_Index;
+ It : Interp;
begin
-- An entity of a type with a reference aspect is overloaded with
@@ -1744,6 +1746,29 @@ package body Sem_Util is
Set_Etype (Expr, Etype (Entity (Expr)));
elsif Nkind (Expr) = N_Function_Call then
+
+ -- If the name of the indexing function is overloaded, locate the one
+ -- whose return type has an implicit dereference on the desired
+ -- discriminant, and set entity and type of function call.
+
+ if Is_Overloaded (Name (Expr)) then
+ Get_First_Interp (Name (Expr), I, It);
+
+ while Present (It.Nam) loop
+ if Ekind ((It.Typ)) = E_Record_Type
+ and then First_Entity ((It.Typ)) = Disc
+ then
+ Set_Entity (Name (Expr), It.Nam);
+ Set_Etype (Name (Expr), Etype (It.Nam));
+ exit;
+ end if;
+
+ Get_Next_Interp (I, It);
+ end loop;
+ end if;
+
+ -- Set type of call from resolved function name.
+
Set_Etype (Expr, Etype (Name (Expr)));
end if;
@@ -4223,6 +4248,14 @@ package body Sem_Util is
then
Id := Defining_Entity (Incomplete_View (Parent (B_Type)));
+ -- If T is a derived from a type with an incomplete view declared
+ -- elsewhere, that incomplete view is irrelevant, we want the
+ -- operations in the scope of T.
+
+ if Scope (Id) /= Scope (B_Type) then
+ Id := Next_Entity (B_Type);
+ end if;
+
else
Id := Next_Entity (B_Type);
end if;
@@ -7545,13 +7578,16 @@ package body Sem_Util is
Cursor := Any_Type;
-- Locate function with desired name and profile in scope of type
+ -- In the rare case where the type is an integer type, a base type
+ -- is created for it, check that the base type of the first formal
+ -- of First matches the base type of the domain.
Func := First_Entity (Scope (Typ));
while Present (Func) loop
if Chars (Func) = Chars (First_Op)
and then Ekind (Func) = E_Function
and then Present (First_Formal (Func))
- and then Etype (First_Formal (Func)) = Typ
+ and then Base_Type (Etype (First_Formal (Func))) = Base_Type (Typ)
and then No (Next_Formal (First_Formal (Func)))
then
if Cursor /= Any_Type then
@@ -12362,12 +12398,50 @@ package body Sem_Util is
end if;
end Is_Local_Variable_Reference;
+ -----------------------------------------------
+ -- Is_Nontrivial_Default_Init_Cond_Procedure --
+ -----------------------------------------------
+
+ function Is_Nontrivial_Default_Init_Cond_Procedure
+ (Id : Entity_Id) return Boolean
+ is
+ Body_Decl : Node_Id;
+ Stmt : Node_Id;
+
+ begin
+ if Ekind (Id) = E_Procedure
+ and then Is_Default_Init_Cond_Procedure (Id)
+ then
+ Body_Decl :=
+ Unit_Declaration_Node
+ (Corresponding_Body (Unit_Declaration_Node (Id)));
+
+ -- The body of the Default_Initial_Condition procedure must contain
+ -- at least one statement, otherwise the generation of the subprogram
+ -- body failed.
+
+ pragma Assert (Present (Handled_Statement_Sequence (Body_Decl)));
+
+ -- To qualify as nontrivial, the first statement of the procedure
+ -- must be a check in the form of an if statement. If the original
+ -- Default_Initial_Condition expression was folded, then the first
+ -- statement is not a check.
+
+ Stmt := First (Statements (Handled_Statement_Sequence (Body_Decl)));
+
+ return
+ Nkind (Stmt) = N_If_Statement
+ and then Nkind (Original_Node (Stmt)) = N_Pragma;
+ end if;
+
+ return False;
+ end Is_Nontrivial_Default_Init_Cond_Procedure;
+
-------------------------
-- Is_Object_Reference --
-------------------------
function Is_Object_Reference (N : Node_Id) return Boolean is
-
function Is_Internally_Generated_Renaming (N : Node_Id) return Boolean;
-- Determine whether N is the name of an internally-generated renaming
@@ -16258,27 +16332,23 @@ package body Sem_Util is
-- If we are sure this is a modification from source, and we know
-- this modifies a constant, then give an appropriate warning.
- if Overlays_Constant (Ent)
- and then (Modification_Comes_From_Source and Sure)
+ if Sure
+ and then Modification_Comes_From_Source
+ and then Overlays_Constant (Ent)
+ and then Address_Clause_Overlay_Warnings
then
declare
- A : constant Node_Id := Address_Clause (Ent);
+ Addr : constant Node_Id := Address_Clause (Ent);
+ O_Ent : Entity_Id;
+ Off : Boolean;
+
begin
- if Present (A) then
- declare
- Exp : constant Node_Id := Expression (A);
- begin
- if Nkind (Exp) = N_Attribute_Reference
- and then Attribute_Name (Exp) = Name_Address
- and then Is_Entity_Name (Prefix (Exp))
- then
- Error_Msg_Sloc := Sloc (A);
- Error_Msg_NE
- ("constant& may be modified via address "
- & "clause#??", N, Entity (Prefix (Exp)));
- end if;
- end;
- end if;
+ Find_Overlaid_Entity (Addr, O_Ent, Off);
+
+ Error_Msg_Sloc := Sloc (Addr);
+ Error_Msg_NE
+ ("??constant& may be modified via address clause#",
+ N, O_Ent);
end;
end if;
diff --git a/gcc/ada/sem_util.ads b/gcc/ada/sem_util.ads
index 0f6dd7ceaa4..838546b91dc 100644
--- a/gcc/ada/sem_util.ads
+++ b/gcc/ada/sem_util.ads
@@ -1433,6 +1433,12 @@ package Sem_Util is
-- parameter of the current enclosing subprogram.
-- Why are OUT parameters not considered here ???
+ function Is_Nontrivial_Default_Init_Cond_Procedure
+ (Id : Entity_Id) return Boolean;
+ -- Determine whether entity Id denotes the procedure that verifies the
+ -- assertion expression of pragma Default_Initial_Condition and if it does,
+ -- the encapsulated expression is nontrivial.
+
function Is_Object_Reference (N : Node_Id) return Boolean;
-- Determines if the tree referenced by N represents an object. Both
-- variable and constant objects return True (compare Is_Variable).
diff --git a/gcc/ada/sem_warn.adb b/gcc/ada/sem_warn.adb
index 3af69c9fbd0..3b3bc2b0f8b 100644
--- a/gcc/ada/sem_warn.adb
+++ b/gcc/ada/sem_warn.adb
@@ -4217,8 +4217,12 @@ package body Sem_Warn is
end case;
-- Kill warnings on the entity on which the message has been posted
+ -- (nothing is posted on out parameters because back end might be
+ -- able to uncover an uninitialized path, and warn accordingly).
- Set_Warnings_Off (E);
+ if Ekind (E) /= E_Out_Parameter then
+ Set_Warnings_Off (E);
+ end if;
end if;
end Warn_On_Unreferenced_Entity;
diff --git a/gcc/ada/sigtramp-armdroid.c b/gcc/ada/sigtramp-armdroid.c
index fb522dfcd99..d4f61b6e4e4 100644
--- a/gcc/ada/sigtramp-armdroid.c
+++ b/gcc/ada/sigtramp-armdroid.c
@@ -6,7 +6,7 @@
* *
* Asm Implementation File *
* *
- * Copyright (C) 2014, Free Software Foundation, Inc. *
+ * Copyright (C) 2015, 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- *
@@ -33,6 +33,8 @@
* ARM-Android version of the __gnat_sigtramp service *
******************************************************/
+#include <sys/ucontext.h>
+
#include "sigtramp.h"
/* See sigtramp.h for a general explanation of functionality. */
@@ -115,7 +117,7 @@ TCR("# from bottom, restore r2 from the current vsp location, move r2 into") \
TCR("# the vsp, add 12 bytes to get the start of the register save area") \
TCR("# then restore the 15 general purpose registers of the frame which") \
TCR("# raised the signal.") \
-TCR(".save {r0, r1, r2, r3, r4, r5, r6, r7, r8, r9, r10, r11, r12, r13, r14, r15}") \
+TCR(".save {r0-r15}") \
TCR(".pad #12") \
TCR(".movsp r2") \
TCR(".save {r2}") \
diff --git a/gcc/ada/sigtramp-ios.c b/gcc/ada/sigtramp-ios.c
new file mode 100644
index 00000000000..03e798df6a5
--- /dev/null
+++ b/gcc/ada/sigtramp-ios.c
@@ -0,0 +1,233 @@
+/****************************************************************************
+ * *
+ * GNAT COMPILER COMPONENTS *
+ * *
+ * S I G T R A M P *
+ * *
+ * Asm Implementation File *
+ * *
+ * Copyright (C) 2015, 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. *
+ * *
+ * In particular, you can freely distribute your programs built with the *
+ * GNAT Pro compiler, including any required library run-time units, using *
+ * any licensing terms of your choosing. See the AdaCore Software License *
+ * for full details. *
+ * *
+ * GNAT was originally developed by the GNAT team at New York University. *
+ * Extensive contributions were provided by Ada Core Technologies Inc. *
+ * *
+ ****************************************************************************/
+
+/****************************************************
+ * ARM64/IOS version of the __gnat_sigtramp service *
+ ****************************************************/
+
+#include <sys/ucontext.h>
+
+#include "sigtramp.h"
+/* See sigtramp.h for a general explanation of functionality. */
+
+/* ----------------------
+ -- General comments --
+ ----------------------
+
+ Unfortunately the libunwind library used on this platform comes with severe
+ limitations that make the implementation convoluted:
+
+ 1. At each step, the stack pointer register SP is restored with the CFA.
+ This makes it impossible to set the CFA to an arbitrary value, for
+ example to the address of the context saved on the stack, which means
+ that the simple CFI directives cannot be used for the registers.
+
+ 2. For the ARM64 architecture (and only it), DWARF expressions are not
+ supported to compute the CFA. Only DW_CFA_def_cfa is supported, which
+ means that the CFA (modulo offset) must be loaded into a register.
+
+ 3. The return column cannot be changed (30 for the ARM64 architecture).
+ Since column 30 is that of the LR register, this makes it impossible
+ to restore both the LR register and the PC.
+
+ Therefore we need 2 distinct call-saved registers in the trampoline and
+ we resort to manual encoding of CFI byte sequences. */
+
+/* -----------------------------------------
+ -- Protypes for our internal asm stubs --
+ -----------------------------------------
+
+ Even though our symbols will remain local, the prototype claims "extern"
+ and not "static" to prevent compiler complaints about a symbol used but
+ never defined. */
+
+/* sigtramp stub providing unwind info for common registers. */
+
+extern void __gnat_sigtramp_common
+ (int signo, void *siginfo, void *sigcontext,
+ __sigtramphandler_t * handler);
+
+void __gnat_sigtramp (int signo, void *si, void *ucontext,
+ __sigtramphandler_t * handler)
+ __attribute__((optimize(2)));
+
+void __gnat_sigtramp (int signo, void *si, void *ucontext,
+ __sigtramphandler_t * handler)
+{
+ mcontext_t mcontext = ((ucontext_t *) ucontext)->uc_mcontext;
+
+ __gnat_sigtramp_common (signo, si, mcontext, handler);
+}
+
+/* asm string construction helpers. */
+
+#define STR(TEXT) #TEXT
+/* stringify expanded TEXT, surrounding it with double quotes. */
+
+#define S(E) STR(E)
+/* stringify E, which will resolve as text but may contain macros
+ still to be expanded. */
+
+/* asm (TEXT) outputs <tab>TEXT. These facilitate the output of
+ multiline contents: */
+#define TAB(S) "\t" S
+#define CR(S) S "\n"
+
+#undef TCR
+#define TCR(S) TAB(CR(S))
+
+/* Offset in uc_mcontext of the __ss structure containing the registers. */
+#define UC_MCONTEXT_SS 16
+
+#define CFA_REG 19
+#define BASE_REG 20
+
+#define DW_CFA_def_cfa 0x0c
+#define DW_CFA_expression 0x10
+
+#define DW_OP_breg(n) 0x70+(n)
+
+#define REG_REGNO_GR(n) n
+#define REG_REGNO_PC 30
+
+/* The first byte of the SLEB128 value of the offset. */
+#define REG_OFFSET_GR(n) (UC_MCONTEXT_SS + n * 8)
+#define REG_OFFSET_LONG_GR(n) (UC_MCONTEXT_SS + n * 8 + 128)
+#define REG_OFFSET_LONG128_GR(n) (UC_MCONTEXT_SS + (n - 16) * 8 + 128)
+#define REG_OFFSET_LONG256_GR(n) (UC_MCONTEXT_SS + (n - 32) * 8 + 128)
+
+#define REG_OFFSET_LONG256_PC REG_OFFSET_LONG256_GR(32)
+
+#define CFI_DEF_CFA \
+ TCR(".cfi_def_cfa " S(CFA_REG) ", 0")
+
+/* We need 4 variants depending on the offset: 0+, 64+, 128+, 256+. */
+#define COMMON_CFI(REG) \
+ ".cfi_escape " S(DW_CFA_expression) "," S(REG_REGNO_##REG) ",2," \
+ S(DW_OP_breg(BASE_REG)) "," S(REG_OFFSET_##REG)
+
+#define COMMON_LONG_CFI(REG) \
+ ".cfi_escape " S(DW_CFA_expression) "," S(REG_REGNO_##REG) ",3," \
+ S(DW_OP_breg(BASE_REG)) "," S(REG_OFFSET_LONG_##REG) ",0"
+
+#define COMMON_LONG128_CFI(REG) \
+ ".cfi_escape " S(DW_CFA_expression) "," S(REG_REGNO_##REG) ",3," \
+ S(DW_OP_breg(BASE_REG)) "," S(REG_OFFSET_LONG128_##REG) ",1"
+
+#define COMMON_LONG256_CFI(REG) \
+ ".cfi_escape " S(DW_CFA_expression) "," S(REG_REGNO_##REG) ",3," \
+ S(DW_OP_breg(BASE_REG)) "," S(REG_OFFSET_LONG256_##REG) ",2"
+
+#define CFI_COMMON_REGS \
+ CR("# CFI for common registers\n") \
+ TCR(COMMON_CFI(GR(0))) \
+ TCR(COMMON_CFI(GR(1))) \
+ TCR(COMMON_CFI(GR(2))) \
+ TCR(COMMON_CFI(GR(3))) \
+ TCR(COMMON_CFI(GR(4))) \
+ TCR(COMMON_CFI(GR(5))) \
+ TCR(COMMON_LONG_CFI(GR(6))) \
+ TCR(COMMON_LONG_CFI(GR(7))) \
+ TCR(COMMON_LONG_CFI(GR(8))) \
+ TCR(COMMON_LONG_CFI(GR(9))) \
+ TCR(COMMON_LONG_CFI(GR(10))) \
+ TCR(COMMON_LONG_CFI(GR(11))) \
+ TCR(COMMON_LONG_CFI(GR(12))) \
+ TCR(COMMON_LONG_CFI(GR(13))) \
+ TCR(COMMON_LONG128_CFI(GR(14))) \
+ TCR(COMMON_LONG128_CFI(GR(15))) \
+ TCR(COMMON_LONG128_CFI(GR(16))) \
+ TCR(COMMON_LONG128_CFI(GR(17))) \
+ TCR(COMMON_LONG128_CFI(GR(18))) \
+ TCR(COMMON_LONG128_CFI(GR(19))) \
+ TCR(COMMON_LONG128_CFI(GR(20))) \
+ TCR(COMMON_LONG128_CFI(GR(21))) \
+ TCR(COMMON_LONG128_CFI(GR(22))) \
+ TCR(COMMON_LONG128_CFI(GR(23))) \
+ TCR(COMMON_LONG128_CFI(GR(24))) \
+ TCR(COMMON_LONG128_CFI(GR(25))) \
+ TCR(COMMON_LONG128_CFI(GR(26))) \
+ TCR(COMMON_LONG128_CFI(GR(27))) \
+ TCR(COMMON_LONG128_CFI(GR(28))) \
+ TCR(COMMON_LONG128_CFI(GR(29))) \
+ TCR(COMMON_LONG256_CFI(PC))
+
+/* Trampoline body block
+ --------------------- */
+
+#define SIGTRAMP_BODY \
+ TCR("stp fp, lr, [sp, #-32]!") \
+ TCR("stp x" S(CFA_REG) ", x" S(BASE_REG) ", [sp, #16]") \
+ TCR("mov fp, sp") \
+ TCR("# Load the saved value of the stack pointer as CFA") \
+ TCR("ldr x" S(CFA_REG) ", [x2, #" S(REG_OFFSET_GR(31)) "]") \
+ TCR("# Use x" S(BASE_REG) " as base register for the CFI") \
+ TCR("mov x" S(BASE_REG) ", x2") \
+ TCR("# Call the handler") \
+ TCR("blr x3") \
+ TCR("# Release our frame and return (should never get here!).") \
+ TCR("ldp x" S(CFA_REG) ", x" S(BASE_REG)" , [sp, #16]") \
+ TCR("ldp fp, lr, [sp], 32") \
+ TCR("ret")
+
+/* -----------------------------
+ -- Symbol definition block --
+ ----------------------------- */
+
+#define SIGTRAMP_START(SYM) \
+ CR("# " S(SYM) " signal trampoline") \
+ CR(S(SYM) ":") \
+ TCR(".cfi_startproc") \
+ TCR(".cfi_signal_frame")
+
+/* ------------------------------
+ -- Symbol termination block --
+ ------------------------------ */
+
+#define SIGTRAMP_END(SYM) \
+ TCR(".cfi_endproc")
+
+/*----------------------------
+ -- And now, the real code --
+ ---------------------------- */
+
+asm(".text\n"
+ TCR(".align 2"));
+
+/* sigtramp stub for common registers. */
+
+#define TRAMP_COMMON ___gnat_sigtramp_common
+
+asm (SIGTRAMP_START(TRAMP_COMMON));
+asm (CFI_DEF_CFA);
+asm (CFI_COMMON_REGS);
+asm (SIGTRAMP_BODY);
+asm (SIGTRAMP_END(TRAMP_COMMON));
diff --git a/gcc/ada/sigtramp.h b/gcc/ada/sigtramp.h
index 7af6be3466c..930365f8d57 100644
--- a/gcc/ada/sigtramp.h
+++ b/gcc/ada/sigtramp.h
@@ -29,44 +29,35 @@
* *
****************************************************************************/
-/* On targets where this is implemented, we resort to a signal handler
- trampoline to set-up the DWARF Call Frame Information that let unwinders
- walk through the signal frame up into the interrupted application code.
- This file introduces the relevant declarations. */
-
-/* This file should only be #included on targets that do implement the
- trampoline, which needs to expose the following interface: */
+/* On targets where this is implemented, we resort to a signal trampoline to
+ set up the DWARF Call Frame Information that lets unwinders walk through
+ the signal frame up into the interrupted user code. This file introduces
+ the relevant declarations. It should only be #included on targets that do
+ implement the signal trampoline. */
#ifdef __cplusplus
extern "C" {
#endif
-#ifdef __ANDROID__
-#include <stdlib.h>
-#include <sys/ucontext.h>
-#endif
-
- /* This typedef signature sometimes conflicts with the sighandler_t from
- system headers so call it something unique. */
- typedef void __sigtramphandler_t (int signo, void *siginfo, void *sigcontext);
+/* This typedef signature sometimes conflicts with the sighandler_t from
+ system headers so call it something unique. */
+typedef void __sigtramphandler_t (int signo, void *siginfo, void *sigcontext);
-#if CPU == SIMNT || CPU == SIMPENTIUM || CPU == SIMLINUX
- /* Vxsim requires a specially compiled handler. */
- void __gnat_sigtramp_vxsim (int signo, void *siginfo, void *sigcontext,
- __sigtramphandler_t * handler);
+#if defined(__vxworks) && (CPU == SIMNT || CPU == SIMPENTIUM || CPU == SIMLINUX)
+/* Vxsim requires a specially compiled handler. */
+extern void __gnat_sigtramp_vxsim (int signo, void *siginfo, void *sigcontext,
+ __sigtramphandler_t * handler);
#else
- void __gnat_sigtramp (int signo, void *siginfo, void *sigcontext,
- __sigtramphandler_t * handler);
+extern void __gnat_sigtramp (int signo, void *siginfo, void *sigcontext,
+ __sigtramphandler_t * handler);
#endif
- /* To be called from an established signal handler. Setup the DWARF CFI
- bits letting unwinders walk through the signal frame up into the
- interrupted application code, and then call HANDLER (SIGNO, SIGINFO,
- SIGCONTEXT).
+/* The signal trampoline is to be called from an established signal handler.
+ It sets up the DWARF CFI and calls HANDLER (SIGNO, SIGINFO, SIGCONTEXT).
- The sigtramp construct makes it so that the unwinder jumps over it + the
- signal handler + the kernel frame. For a typical backtrace from the raise
- function:
+ The trampoline construct makes it so that the unwinder jumps over it + the
+ signal handler + the kernel frame. For a typical backtrace from the raise
+ function:
#0 __gnat_Unwind_RaiseException
#1 Raise_From_Signal_Handler
@@ -76,11 +67,11 @@ extern "C" {
#5 <kernel frame>
#6 interrupted function
- The unwinder will unwind frames 0, 1 and 2 as usual. But the CFI of frame
- 3 is set up as if the caller of frame 3 was frame 6 so, when frame 3 is
- unwound, the unwinder ends up in frame 6 directly. It's possible to do so
- since the kernel has saved the context of frame 6 and passed it on to
- __gnat_sigtramp. */
+ The unwinder will unwind frames 0, 1 and 2 as usual. But the CFI of frame
+ 3 is set up as if the caller of frame 3 was frame 6 so, when frame 3 is
+ unwound, the unwinder ends up in frame 6 directly. It's possible to do so
+ because the kernel has saved the context of frame 6 and passed it on to
+ __gnat_error_handler and __gnat_sigtramp. */
#ifdef __cplusplus
}
diff --git a/gcc/ada/sinfo.adb b/gcc/ada/sinfo.adb
index 5f57e8c2f75..b97fa587657 100644
--- a/gcc/ada/sinfo.adb
+++ b/gcc/ada/sinfo.adb
@@ -3286,6 +3286,14 @@ package body Sinfo is
return Elist5 (N);
end Used_Operations;
+ function Was_Expression_Function
+ (N : Node_Id) return Boolean is
+ begin
+ pragma Assert (False
+ or else NT (N).Nkind = N_Subprogram_Body);
+ return Flag18 (N);
+ end Was_Expression_Function;
+
function Was_Originally_Stub
(N : Node_Id) return Boolean is
begin
@@ -6525,6 +6533,14 @@ package body Sinfo is
Set_Elist5 (N, Val);
end Set_Used_Operations;
+ procedure Set_Was_Expression_Function
+ (N : Node_Id; Val : Boolean := True) is
+ begin
+ pragma Assert (False
+ or else NT (N).Nkind = N_Subprogram_Body);
+ Set_Flag18 (N, Val);
+ end Set_Was_Expression_Function;
+
procedure Set_Was_Originally_Stub
(N : Node_Id; Val : Boolean := True) is
begin
diff --git a/gcc/ada/sinfo.ads b/gcc/ada/sinfo.ads
index ab76d2c80ab..4ef11a31e8e 100644
--- a/gcc/ada/sinfo.ads
+++ b/gcc/ada/sinfo.ads
@@ -750,7 +750,7 @@ package Sinfo is
-- to be sure to raise an ABE. This is used to trigger special handling
-- of such cases, particularly in the instantiation case where we avoid
-- instantiating the body if this flag is set. This flag is also present
- -- in an N_Formal_Package_Declaration_Node since formal package
+ -- in an N_Formal_Package_Declaration node since formal package
-- declarations are treated like instantiations, but it is always set to
-- False in this context.
@@ -2220,6 +2220,14 @@ package Sinfo is
-- on exit from the scope of the use_type_clause, in particular in the
-- case of Use_All_Type, when those operations several scopes.
+ -- Was_Expression_Function (Flag18-Sem)
+ -- Present in N_Subprogram_Body. True if the original source had an
+ -- N_Expression_Function, which was converted to the N_Subprogram_Body
+ -- by Analyze_Expression_Function. This is needed by ASIS to correctly
+ -- recreate the expression function (for the instance body) when the
+ -- completion of a generic function declaration is an expression
+ -- function.
+
-- Was_Originally_Stub (Flag13-Sem)
-- This flag is set in the node for a proper body that replaces stub.
-- During the analysis procedure, stubs in some situations get rewritten
@@ -5212,6 +5220,7 @@ package Sinfo is
-- Is_Task_Master (Flag5-Sem)
-- Was_Originally_Stub (Flag13-Sem)
-- Has_Relative_Deadline_Pragma (Flag9-Sem)
+ -- Was_Expression_Function (Flag18-Sem)
-------------------------
-- Expression Function --
@@ -9795,6 +9804,9 @@ package Sinfo is
function Used_Operations
(N : Node_Id) return Elist_Id; -- Elist5
+ function Was_Expression_Function
+ (N : Node_Id) return Boolean; -- Flag18
+
function Was_Originally_Stub
(N : Node_Id) return Boolean; -- Flag13
@@ -10830,6 +10842,9 @@ package Sinfo is
procedure Set_Used_Operations
(N : Node_Id; Val : Elist_Id); -- Elist5
+ procedure Set_Was_Expression_Function
+ (N : Node_Id; Val : Boolean := True); -- Flag18
+
procedure Set_Was_Originally_Stub
(N : Node_Id; Val : Boolean := True); -- Flag13
@@ -12938,6 +12953,7 @@ package Sinfo is
pragma Inline (Variants);
pragma Inline (Visible_Declarations);
pragma Inline (Used_Operations);
+ pragma Inline (Was_Expression_Function);
pragma Inline (Was_Originally_Stub);
pragma Inline (Withed_Body);
@@ -13277,6 +13293,7 @@ package Sinfo is
pragma Inline (Set_Variant_Part);
pragma Inline (Set_Variants);
pragma Inline (Set_Visible_Declarations);
+ pragma Inline (Set_Was_Expression_Function);
pragma Inline (Set_Was_Originally_Stub);
pragma Inline (Set_Withed_Body);
diff --git a/gcc/ada/sinput.ads b/gcc/ada/sinput.ads
index 76ff65193e4..f1a27245afc 100644
--- a/gcc/ada/sinput.ads
+++ b/gcc/ada/sinput.ads
@@ -608,7 +608,7 @@ package Sinput is
function Num_Source_Lines (S : Source_File_Index) return Nat;
-- Returns the number of source lines (this is equivalent to reading
-- the value of Last_Source_Line, but returns Nat rather than a
- -- physical line number.
+ -- physical line number).
procedure Register_Source_Ref_Pragma
(File_Name : File_Name_Type;
diff --git a/gcc/ada/snames.ads-tmpl b/gcc/ada/snames.ads-tmpl
index ba4053dab51..10878063b79 100644
--- a/gcc/ada/snames.ads-tmpl
+++ b/gcc/ada/snames.ads-tmpl
@@ -738,6 +738,7 @@ package Snames is
Name_Gcc : constant Name_Id := N + $;
Name_General : constant Name_Id := N + $;
Name_Gnat : constant Name_Id := N + $;
+ Name_Gnat_Extended_Ravenscar : constant Name_Id := N + $;
Name_Gnatprove : constant Name_Id := N + $;
Name_GPL : constant Name_Id := N + $;
Name_High_Order_First : constant Name_Id := N + $;
diff --git a/gcc/ada/switch-c.adb b/gcc/ada/switch-c.adb
index c3ebbaab332..977d00337f8 100644
--- a/gcc/ada/switch-c.adb
+++ b/gcc/ada/switch-c.adb
@@ -387,15 +387,6 @@ package body Switch.C is
Osint.Fail
("-gnatd.b must be first if combined "
& "with other switches");
-
- -- Special check, -gnatd.V must occur after -gnatc
-
- elsif C = 'V'
- and then Operating_Mode /= Check_Semantics
- then
- Osint.Fail
- ("gnatd.V requires previous occurrence "
- & "of -gnatc");
end if;
-- Not a dotted flag
@@ -585,6 +576,12 @@ package body Switch.C is
Ptr := Ptr + 1;
Check_Float_Overflow := not Machine_Overflows_On_Target;
+ -- -gnateg (generate C code)
+
+ when 'g' =>
+ Generate_C_Code := True;
+ Ptr := Ptr + 1;
+
-- -gnateG (save preprocessor output)
when 'G' =>
diff --git a/gcc/ada/targparm.adb b/gcc/ada/targparm.adb
index 42696cf0ba2..33983c71d01 100644
--- a/gcc/ada/targparm.adb
+++ b/gcc/ada/targparm.adb
@@ -293,6 +293,17 @@ package body Targparm is
P := P + 27;
goto Line_Loop_Continue;
+ -- Test for pragma Profile (GNAT_Extended_Ravenscar);
+
+ elsif System_Text (P .. P + 40) =
+ "pragma Profile (GNAT_Extended_Ravenscar);"
+ then
+ Set_Profile_Restrictions (GNAT_Extended_Ravenscar);
+ Opt.Task_Dispatching_Policy := 'F';
+ Opt.Locking_Policy := 'C';
+ P := P + 27;
+ goto Line_Loop_Continue;
+
-- Test for pragma Profile (Restricted);
elsif System_Text (P .. P + 27) =
diff --git a/gcc/ada/tracebak.c b/gcc/ada/tracebak.c
index ff85ca5baf5..3f40ae40c18 100644
--- a/gcc/ada/tracebak.c
+++ b/gcc/ada/tracebak.c
@@ -433,7 +433,7 @@ struct layout
but our only alternative is the generic unwinder which requires
compilation forcing a frame pointer to be reliable. */
-#if (defined (__x86_64__) || defined (__linux__)) && !defined (__USING_SJLJ_EXCEPTIONS__)
+#if (defined (__x86_64__) || defined (__linux__)) && !defined (__USING_SJLJ_EXCEPTIONS__) && !defined (__vxworks)
#define USE_GCC_UNWINDER
#else
#define USE_GENERIC_UNWINDER
diff --git a/gcc/ada/types.ads b/gcc/ada/types.ads
index 8b21b10ca4d..10756075bf3 100644
--- a/gcc/ada/types.ads
+++ b/gcc/ada/types.ads
@@ -109,8 +109,9 @@ package Types is
Character range Character'Val (16#80#) .. Character'Val (16#FF#);
-- 8-bit Characters with the upper bit set
- type Character_Ptr is access all Character;
- type String_Ptr is access all String;
+ type Character_Ptr is access all Character;
+ type String_Ptr is access all String;
+ type String_Ptr_Const is access constant String;
-- Standard character and string pointers
procedure Free is new Unchecked_Deallocation (String, String_Ptr);
@@ -896,7 +897,7 @@ package Types is
type Reason_Kind is (CE_Reason, PE_Reason, SE_Reason);
-- Categorization of reason codes by exception raised
- Rkind : array (RT_Exception_Code range <>) of Reason_Kind :=
+ Rkind : constant array (RT_Exception_Code range <>) of Reason_Kind :=
(CE_Access_Check_Failed => CE_Reason,
CE_Access_Parameter_Is_Null => CE_Reason,
CE_Discriminant_Check_Failed => CE_Reason,
diff --git a/gcc/ada/usage.adb b/gcc/ada/usage.adb
index ae0981fd05c..99edf948928 100644
--- a/gcc/ada/usage.adb
+++ b/gcc/ada/usage.adb
@@ -360,8 +360,11 @@ begin
-- Line for -gnato switch
+ Write_Switch_Char ("o0");
+ Write_Line ("Disable overflow checking (on by default)");
+
Write_Switch_Char ("o");
- Write_Line ("Enable overflow checking mode to CHECKED (off by default)");
+ Write_Line ("Enable overflow checking in STRICT (-gnato1) mode (default)");
-- Lines for -gnato? switches
diff --git a/gcc/c-family/ChangeLog b/gcc/c-family/ChangeLog
index 4188535df78..7262cfd1dc3 100644
--- a/gcc/c-family/ChangeLog
+++ b/gcc/c-family/ChangeLog
@@ -1,3 +1,57 @@
+2015-11-13 Kai Tietz <ktietz70@googlemail.com>
+
+ * c-lex.c (interpret_float): Use fold_convert.
+
+2015-11-13 David Malcolm <dmalcolm@redhat.com>
+
+ * c-common.c (c_fully_fold_internal): Capture existing souce_range,
+ and store it on the result.
+ * c-opts.c (c_common_init_options): Set
+ global_dc->colorize_source_p.
+
+2015-11-12 James Norris <jnorris@codesourcery.com>
+ Joseph Myers <joseph@codesourcery.com>
+
+ * c-pragma.c (oacc_pragmas): Add entry for declare directive.
+ * c-pragma.h (enum pragma_kind): Add PRAGMA_OACC_DECLARE.
+ (enum pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT and
+ PRAGMA_OACC_CLAUSE_LINK.
+
+2015-11-11 Marek Polacek <polacek@redhat.com>
+
+ PR c/68107
+ PR c++/68266
+ * c-common.c (valid_array_size_p): New function.
+ * c-common.h (valid_array_size_p): Declare.
+
+2015-11-11 Dominique d'Humieres <dominiq@lps.ens.fr>
+
+ PR bootstrap/68271
+ * c-pragma.c (c_register_pragma_1): Update the gcc_assert to 256.
+
+2015-11-11 Andrew MacLeod <amacleod@redhat.com>
+
+ * array-notation-common.c: Remove unused header files.
+ * c-ada-spec.c: Likewise.
+ * c-cilkplus.c: Likewise.
+ * c-common.c: Likewise.
+ * c-cppbuiltin.c: Likewise.
+ * c-dump.c: Likewise.
+ * c-format.c: Likewise.
+ * c-gimplify.c: Likewise.
+ * c-indentation.c: Likewise.
+ * c-lex.c: Likewise.
+ * c-omp.c: Likewise.
+ * c-opts.c: Likewise.
+ * c-pch.c: Likewise.
+ * c-ppoutput.c: Likewise.
+ * c-pragma.c: Likewise.
+ * c-pretty-print.c: Likewise.
+ * c-semantics.c: Likewise.
+ * c-ubsan.c: Likewise.
+ * cilk.c: Likewise.
+ * stub-objc.c: Likewise.
+
2015-11-09 Thomas Schwinge <thomas@codesourcery.com>
Cesar Philippidis <cesar@codesourcery.com>
James Norris <jnorris@codesourcery.com>
diff --git a/gcc/c-family/array-notation-common.c b/gcc/c-family/array-notation-common.c
index 960b2076bb2..4f7072bda84 100644
--- a/gcc/c-family/array-notation-common.c
+++ b/gcc/c-family/array-notation-common.c
@@ -25,9 +25,7 @@ along with GCC; see the file COPYING3. If not see
#include "system.h"
#include "coretypes.h"
#include "options.h"
-#include "tree.h"
#include "c-family/c-common.h"
-#include "langhooks.h"
#include "tree-iterator.h"
/* Returns true if the function call in FNDECL is __sec_implicit_index. */
diff --git a/gcc/c-family/c-ada-spec.c b/gcc/c-family/c-ada-spec.c
index cf4c6e9f9d0..216bd6fa809 100644
--- a/gcc/c-family/c-ada-spec.c
+++ b/gcc/c-family/c-ada-spec.c
@@ -25,10 +25,7 @@ along with GCC; see the file COPYING3. If not see
#include "tm.h"
#include "tree.h"
#include "c-ada-spec.h"
-#include "alias.h"
#include "fold-const.h"
-#include "dumpfile.h"
-#include "cpplib.h"
#include "c-pragma.h"
#include "cpp-id-data.h"
diff --git a/gcc/c-family/c-cilkplus.c b/gcc/c-family/c-cilkplus.c
index 6042462657b..a73660fc862 100644
--- a/gcc/c-family/c-cilkplus.c
+++ b/gcc/c-family/c-cilkplus.c
@@ -23,10 +23,7 @@ along with GCC; see the file COPYING3. If not see
#include "config.h"
#include "system.h"
#include "coretypes.h"
-#include "options.h"
-#include "tree.h"
#include "c-common.h"
-#include "alias.h"
/* Validate the body of a _Cilk_for construct or a <#pragma simd> for
loop.
diff --git a/gcc/c-family/c-common.c b/gcc/c-family/c-common.c
index 53c1d81c0c8..89e978d16de 100644
--- a/gcc/c-family/c-common.c
+++ b/gcc/c-family/c-common.c
@@ -24,7 +24,6 @@ along with GCC; see the file COPYING3. If not see
#include "coretypes.h"
#include "target.h"
#include "function.h"
-#include "obstack.h"
#include "tree.h"
#include "c-common.h"
#include "gimple-expr.h"
@@ -38,8 +37,6 @@ along with GCC; see the file COPYING3. If not see
#include "attribs.h"
#include "varasm.h"
#include "trans-mem.h"
-#include "flags.h"
-#include "c-pragma.h"
#include "c-objc.h"
#include "common/common-target.h"
#include "langhooks.h"
@@ -1190,6 +1187,7 @@ c_fully_fold_internal (tree expr, bool in_init, bool *maybe_const_operands,
bool op0_const_self = true, op1_const_self = true, op2_const_self = true;
bool nowarning = TREE_NO_WARNING (expr);
bool unused_p;
+ source_range old_range;
/* This function is not relevant to C++ because C++ folds while
parsing, and may need changes to be correct for C++ when C++
@@ -1205,6 +1203,9 @@ c_fully_fold_internal (tree expr, bool in_init, bool *maybe_const_operands,
|| code == SAVE_EXPR)
return expr;
+ if (IS_EXPR_CODE_CLASS (kind))
+ old_range = EXPR_LOCATION_RANGE (expr);
+
/* Operands of variable-length expressions (function calls) have
already been folded, as have __builtin_* function calls, and such
expressions cannot occur in constant expressions. */
@@ -1629,7 +1630,11 @@ c_fully_fold_internal (tree expr, bool in_init, bool *maybe_const_operands,
TREE_NO_WARNING (ret) = 1;
}
if (ret != expr)
- protected_set_expr_location (ret, loc);
+ {
+ protected_set_expr_location (ret, loc);
+ if (IS_EXPR_CODE_CLASS (kind))
+ set_source_range (ret, old_range.m_start, old_range.m_finish);
+ }
return ret;
}
@@ -13110,4 +13115,26 @@ warn_duplicated_cond_add_or_warn (location_t loc, tree cond, vec<tree> **chain)
(*chain)->safe_push (cond);
}
+/* Check if array size calculations overflow or if the array covers more
+ than half of the address space. Return true if the size of the array
+ is valid, false otherwise. TYPE is the type of the array and NAME is
+ the name of the array, or NULL_TREE for unnamed arrays. */
+
+bool
+valid_array_size_p (location_t loc, tree type, tree name)
+{
+ if (type != error_mark_node
+ && COMPLETE_TYPE_P (type)
+ && TREE_CODE (TYPE_SIZE_UNIT (type)) == INTEGER_CST
+ && !valid_constant_size_p (TYPE_SIZE_UNIT (type)))
+ {
+ if (name)
+ error_at (loc, "size of array %qE is too large", name);
+ else
+ error_at (loc, "size of unnamed array is too large");
+ return false;
+ }
+ return true;
+}
+
#include "gt-c-family-c-common.h"
diff --git a/gcc/c-family/c-common.h b/gcc/c-family/c-common.h
index c82545405e4..bad8d05e620 100644
--- a/gcc/c-family/c-common.h
+++ b/gcc/c-family/c-common.h
@@ -1463,5 +1463,6 @@ extern bool check_no_cilk (tree, const char *, const char *,
location_t loc = UNKNOWN_LOCATION);
extern bool reject_gcc_builtin (const_tree, location_t = UNKNOWN_LOCATION);
extern void warn_duplicated_cond_add_or_warn (location_t, tree, vec<tree> **);
+extern bool valid_array_size_p (location_t, tree, tree);
#endif /* ! GCC_C_COMMON_H */
diff --git a/gcc/c-family/c-cppbuiltin.c b/gcc/c-family/c-cppbuiltin.c
index f7297877f97..313788d8363 100644
--- a/gcc/c-family/c-cppbuiltin.c
+++ b/gcc/c-family/c-cppbuiltin.c
@@ -21,13 +21,10 @@ along with GCC; see the file COPYING3. If not see
#include "system.h"
#include "coretypes.h"
#include "target.h"
-#include "tree.h"
#include "c-common.h"
#include "tm_p.h" /* For TARGET_CPU_CPP_BUILTINS & friends. */
#include "stringpool.h"
-#include "alias.h"
#include "stor-layout.h"
-#include "version.h"
#include "flags.h"
#include "c-pragma.h"
#include "output.h" /* For user_label_prefix. */
diff --git a/gcc/c-family/c-dump.c b/gcc/c-family/c-dump.c
index 5cebcb96a13..52a3adc9800 100644
--- a/gcc/c-family/c-dump.c
+++ b/gcc/c-family/c-dump.c
@@ -21,10 +21,7 @@ along with GCC; see the file COPYING3. If not see
#include "config.h"
#include "system.h"
#include "coretypes.h"
-#include "tm.h"
-#include "tree.h"
#include "c-common.h"
-#include "alias.h"
#include "tree-dump.h"
/* Dump any C-specific tree codes and attributes of common codes. */
diff --git a/gcc/c-family/c-format.c b/gcc/c-family/c-format.c
index c309a5450a1..6e372655cd8 100644
--- a/gcc/c-family/c-format.c
+++ b/gcc/c-family/c-format.c
@@ -22,12 +22,9 @@ along with GCC; see the file COPYING3. If not see
#include "coretypes.h"
#include "tm.h"
#include "c-target.h"
-#include "tree.h"
#include "c-common.h"
#include "alloc-pool.h"
#include "stringpool.h"
-#include "alias.h"
-#include "flags.h"
#include "c-objc.h"
#include "intl.h"
#include "langhooks.h"
diff --git a/gcc/c-family/c-gimplify.c b/gcc/c-family/c-gimplify.c
index c67db888d1c..a3d0025c63b 100644
--- a/gcc/c-family/c-gimplify.c
+++ b/gcc/c-family/c-gimplify.c
@@ -29,21 +29,12 @@ along with GCC; see the file COPYING3. If not see
#include "tm.h"
#include "function.h"
#include "basic-block.h"
-#include "hard-reg-set.h"
#include "tree.h"
-#include "c-common.h"
#include "gimple.h"
-#include "predict.h"
#include "cgraph.h"
#include "c-pretty-print.h"
-#include "alias.h"
-#include "fold-const.h"
-#include "internal-fn.h"
#include "gimplify.h"
-#include "tree-inline.h"
#include "langhooks.h"
-#include "langhooks-def.h"
-#include "flags.h"
#include "dumpfile.h"
#include "cilk.h"
#include "c-ubsan.h"
diff --git a/gcc/c-family/c-indentation.c b/gcc/c-family/c-indentation.c
index a525e9a345a..638a9cf1099 100644
--- a/gcc/c-family/c-indentation.c
+++ b/gcc/c-family/c-indentation.c
@@ -21,11 +21,7 @@ along with GCC; see the file COPYING3. If not see
#include "system.h"
#include "coretypes.h"
#include "tm.h"
-#include "tree.h"
#include "c-common.h"
-#include "stringpool.h"
-#include "alias.h"
-#include "stor-layout.h"
#include "c-indentation.h"
extern cpp_options *cpp_opts;
diff --git a/gcc/c-family/c-lex.c b/gcc/c-family/c-lex.c
index d8c7faf430e..9c86ba729ed 100644
--- a/gcc/c-family/c-lex.c
+++ b/gcc/c-family/c-lex.c
@@ -21,15 +21,11 @@ along with GCC; see the file COPYING3. If not see
#include "system.h"
#include "coretypes.h"
#include "target.h"
-#include "tree.h"
#include "c-common.h"
#include "timevar.h"
#include "stringpool.h"
-#include "alias.h"
#include "stor-layout.h"
-#include "flags.h"
#include "c-pragma.h"
-#include "intl.h"
#include "debug.h"
#include "attribs.h"
diff --git a/gcc/c-family/c-omp.c b/gcc/c-family/c-omp.c
index 3e93b590fdb..e3d41a61b55 100644
--- a/gcc/c-family/c-omp.c
+++ b/gcc/c-family/c-omp.c
@@ -24,13 +24,10 @@ along with GCC; see the file COPYING3. If not see
#include "config.h"
#include "system.h"
#include "coretypes.h"
-#include "tm.h"
-#include "tree.h"
+#include "options.h"
#include "c-common.h"
#include "gimple-expr.h"
-#include "alias.h"
#include "c-pragma.h"
-#include "langhooks.h"
#include "omp-low.h"
#include "gomp-constants.h"
diff --git a/gcc/c-family/c-opts.c b/gcc/c-family/c-opts.c
index e42b7aed345..9ae181f26ed 100644
--- a/gcc/c-family/c-opts.c
+++ b/gcc/c-family/c-opts.c
@@ -23,11 +23,9 @@ along with GCC; see the file COPYING3. If not see
#include "coretypes.h"
#include "tm.h"
#include "c-target.h"
-#include "tree.h"
#include "c-common.h"
#include "tm_p.h" /* For C_COMMON_OVERRIDE_OPTIONS. */
#include "diagnostic.h"
-#include "alias.h"
#include "c-pragma.h"
#include "flags.h"
#include "toplev.h"
@@ -247,6 +245,8 @@ c_common_init_options (unsigned int decoded_options_count,
break;
}
}
+
+ global_dc->colorize_source_p = true;
}
/* Handle switch SCODE with argument ARG. VALUE is true, unless no-
diff --git a/gcc/c-family/c-pch.c b/gcc/c-family/c-pch.c
index fa256e45066..3a84498e608 100644
--- a/gcc/c-family/c-pch.c
+++ b/gcc/c-family/c-pch.c
@@ -21,18 +21,13 @@ along with GCC; see the file COPYING3. If not see
#include "system.h"
#include "coretypes.h"
#include "target.h"
-#include "tree.h"
#include "c-common.h"
#include "timevar.h"
-#include "version.h"
-#include "cpplib.h"
-#include "alias.h"
#include "flags.h"
#include "debug.h"
#include "c-pragma.h"
#include "langhooks.h"
#include "hosthooks.h"
-#include "opts.h"
/* This is a list of flag variables that must match exactly, and their
names for the error message. The possible values for *flag_var must
diff --git a/gcc/c-family/c-ppoutput.c b/gcc/c-family/c-ppoutput.c
index 65022481bfd..9fe4aa9df0e 100644
--- a/gcc/c-family/c-ppoutput.c
+++ b/gcc/c-family/c-ppoutput.c
@@ -19,12 +19,8 @@
#include "config.h"
#include "system.h"
#include "coretypes.h"
-#include "options.h"
-#include "tree.h"
#include "c-common.h" /* For flags. */
-#include "cpplib.h"
#include "../libcpp/internal.h"
-#include "alias.h"
#include "c-pragma.h" /* For parse_in. */
/* Encapsulates state used to convert a stream of tokens into a text
diff --git a/gcc/c-family/c-pragma.c b/gcc/c-family/c-pragma.c
index 50324b82498..12c3e75ef18 100644
--- a/gcc/c-family/c-pragma.c
+++ b/gcc/c-family/c-pragma.c
@@ -22,18 +22,14 @@ along with GCC; see the file COPYING3. If not see
#include "coretypes.h"
#include "target.h"
#include "function.h" /* For cfun. */
-#include "tree.h"
#include "c-common.h"
#include "tm_p.h" /* For REGISTER_TARGET_PRAGMAS. */
#include "stringpool.h"
#include "cgraph.h"
#include "diagnostic.h"
-#include "alias.h"
#include "attribs.h"
#include "varasm.h"
-#include "cpplib.h"
#include "c-pragma.h"
-#include "flags.h"
#include "opts.h"
#include "plugin.h"
@@ -1252,6 +1248,7 @@ static const struct omp_pragma_def oacc_pragmas[] = {
{ "atomic", PRAGMA_OACC_ATOMIC },
{ "cache", PRAGMA_OACC_CACHE },
{ "data", PRAGMA_OACC_DATA },
+ { "declare", PRAGMA_OACC_DECLARE },
{ "enter", PRAGMA_OACC_ENTER_DATA },
{ "exit", PRAGMA_OACC_EXIT_DATA },
{ "kernels", PRAGMA_OACC_KERNELS },
@@ -1370,9 +1367,9 @@ c_register_pragma_1 (const char *space, const char *name,
id = registered_pragmas.length ();
id += PRAGMA_FIRST_EXTERNAL - 1;
- /* The C++ front end allocates 6 bits in cp_token; the C front end
- allocates 7 bits in c_token. At present this is sufficient. */
- gcc_assert (id < 64);
+ /* The C++ front end allocates 8 bits in cp_token; the C front end
+ allocates 8 bits in c_token. At present this is sufficient. */
+ gcc_assert (id < 256);
}
cpp_register_deferred_pragma (parse_in, space, name, id,
diff --git a/gcc/c-family/c-pragma.h b/gcc/c-family/c-pragma.h
index afeceff1edb..999ac6794d3 100644
--- a/gcc/c-family/c-pragma.h
+++ b/gcc/c-family/c-pragma.h
@@ -30,6 +30,7 @@ enum pragma_kind {
PRAGMA_OACC_ATOMIC,
PRAGMA_OACC_CACHE,
PRAGMA_OACC_DATA,
+ PRAGMA_OACC_DECLARE,
PRAGMA_OACC_ENTER_DATA,
PRAGMA_OACC_EXIT_DATA,
PRAGMA_OACC_KERNELS,
@@ -152,6 +153,7 @@ enum pragma_omp_clause {
PRAGMA_OACC_CLAUSE_CREATE,
PRAGMA_OACC_CLAUSE_DELETE,
PRAGMA_OACC_CLAUSE_DEVICEPTR,
+ PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT,
PRAGMA_OACC_CLAUSE_GANG,
PRAGMA_OACC_CLAUSE_HOST,
PRAGMA_OACC_CLAUSE_INDEPENDENT,
@@ -176,7 +178,8 @@ enum pragma_omp_clause {
PRAGMA_OACC_CLAUSE_FIRSTPRIVATE = PRAGMA_OMP_CLAUSE_FIRSTPRIVATE,
PRAGMA_OACC_CLAUSE_IF = PRAGMA_OMP_CLAUSE_IF,
PRAGMA_OACC_CLAUSE_PRIVATE = PRAGMA_OMP_CLAUSE_PRIVATE,
- PRAGMA_OACC_CLAUSE_REDUCTION = PRAGMA_OMP_CLAUSE_REDUCTION
+ PRAGMA_OACC_CLAUSE_REDUCTION = PRAGMA_OMP_CLAUSE_REDUCTION,
+ PRAGMA_OACC_CLAUSE_LINK = PRAGMA_OMP_CLAUSE_LINK
};
extern struct cpp_reader* parse_in;
diff --git a/gcc/c-family/c-pretty-print.c b/gcc/c-family/c-pretty-print.c
index 6b439ec4d3b..ea6037524df 100644
--- a/gcc/c-family/c-pretty-print.c
+++ b/gcc/c-family/c-pretty-print.c
@@ -21,16 +21,12 @@ along with GCC; see the file COPYING3. If not see
#include "config.h"
#include "system.h"
#include "coretypes.h"
-#include "tm.h"
-#include "tree.h"
#include "c-pretty-print.h"
#include "diagnostic.h"
-#include "alias.h"
#include "stor-layout.h"
#include "attribs.h"
#include "intl.h"
#include "tree-pretty-print.h"
-#include "tree-iterator.h"
/* The pretty-printer code is primarily designed to closely follow
(GNU) C and C++ grammars. That is to be contrasted with spaghetti
diff --git a/gcc/c-family/c-semantics.c b/gcc/c-family/c-semantics.c
index e481f96724a..0bbc3c99dc5 100644
--- a/gcc/c-family/c-semantics.c
+++ b/gcc/c-family/c-semantics.c
@@ -21,14 +21,7 @@ along with GCC; see the file COPYING3. If not see
#include "config.h"
#include "system.h"
#include "coretypes.h"
-#include "tm.h"
-#include "function.h"
-#include "hard-reg-set.h"
-#include "tree.h"
#include "c-common.h"
-#include "alias.h"
-#include "splay-tree.h"
-#include "flags.h"
#include "tree-iterator.h"
/* Create an empty statement tree rooted at T. */
diff --git a/gcc/c-family/c-ubsan.c b/gcc/c-family/c-ubsan.c
index f35e8eb5917..d5f71a4a461 100644
--- a/gcc/c-family/c-ubsan.c
+++ b/gcc/c-family/c-ubsan.c
@@ -22,18 +22,10 @@ along with GCC; see the file COPYING3. If not see
#include "system.h"
#include "coretypes.h"
#include "tm.h"
-#include "function.h"
-#include "hard-reg-set.h"
-#include "tree.h"
#include "c-family/c-common.h"
-#include "alloc-pool.h"
-#include "cgraph.h"
-#include "output.h"
-#include "toplev.h"
#include "ubsan.h"
#include "c-family/c-ubsan.h"
#include "asan.h"
-#include "internal-fn.h"
#include "stor-layout.h"
#include "builtins.h"
#include "gimplify.h"
diff --git a/gcc/c-family/cilk.c b/gcc/c-family/cilk.c
index 3ab7f4eff0a..e75e20c2383 100644
--- a/gcc/c-family/cilk.c
+++ b/gcc/c-family/cilk.c
@@ -25,14 +25,11 @@ along with GCC; see the file COPYING3. If not see
#include "coretypes.h"
#include "tm.h"
#include "function.h"
-#include "hard-reg-set.h"
-#include "tree.h"
#include "c-family/c-common.h"
#include "gimple-expr.h"
#include "stringpool.h"
#include "cgraph.h"
#include "diagnostic.h"
-#include "langhooks.h"
#include "gimplify.h"
#include "tree-iterator.h"
#include "tree-inline.h"
diff --git a/gcc/c-family/stub-objc.c b/gcc/c-family/stub-objc.c
index 4aa2f4d7887..5525570c6ae 100644
--- a/gcc/c-family/stub-objc.c
+++ b/gcc/c-family/stub-objc.c
@@ -23,8 +23,6 @@ along with GCC; see the file COPYING3. If not see
#include "system.h"
#include "coretypes.h"
#include "tree.h"
-#include "c-common.h"
-#include "alias.h"
#include "c-objc.h"
tree
diff --git a/gcc/c/ChangeLog b/gcc/c/ChangeLog
index 0124dcc578d..810f2c6c575 100644
--- a/gcc/c/ChangeLog
+++ b/gcc/c/ChangeLog
@@ -1,3 +1,91 @@
+2015-11-13 David Malcolm <dmalcolm@redhat.com>
+
+ * c-decl.c (warn_defaults_to): Pass line_table to
+ rich_location ctor.
+ * c-errors.c (pedwarn_c99): Likewise.
+ (pedwarn_c90): Likewise.
+ * c-parser.c (set_c_expr_source_range): New functions.
+ (c_token::get_range): New method.
+ (c_token::get_finish): New method.
+ (c_parser_expr_no_commas): Call set_c_expr_source_range on the ret
+ based on the range from the start of the LHS to the end of the
+ RHS.
+ (c_parser_conditional_expression): Likewise, based on the range
+ from the start of the cond.value to the end of exp2.value.
+ (c_parser_binary_expression): Call set_c_expr_source_range on
+ the stack values for TRUTH_ANDIF_EXPR and TRUTH_ORIF_EXPR.
+ (c_parser_cast_expression): Call set_c_expr_source_range on ret
+ based on the cast_loc through to the end of the expr.
+ (c_parser_unary_expression): Likewise, based on the
+ op_loc through to the end of op.
+ (c_parser_sizeof_expression) Likewise, based on the start of the
+ sizeof token through to either the closing paren or the end of
+ expr.
+ (c_parser_postfix_expression): Likewise, using the token range,
+ or from the open paren through to the close paren for
+ parenthesized expressions.
+ (c_parser_postfix_expression_after_primary): Likewise, for
+ various kinds of expression.
+ * c-tree.h (struct c_expr): Add field "src_range".
+ (c_expr::get_start): New method.
+ (c_expr::get_finish): New method.
+ (set_c_expr_source_range): New decls.
+ * c-typeck.c (parser_build_unary_op): Call set_c_expr_source_range
+ on ret for prefix unary ops.
+ (parser_build_binary_op): Likewise, running from the start of
+ arg1.value through to the end of arg2.value.
+
+2015-11-13 Marek Polacek <polacek@redhat.com>
+
+ PR c/68320
+ * c-parser.c (c_parser_for_statement): Treat unknown tokens as IDs.
+
+2015-11-13 David Malcolm <dmalcolm@redhat.com>
+
+ * c-typeck.c: Include spellcheck.h.
+ (lookup_field_fuzzy_find_candidates): New function.
+ (lookup_field_fuzzy): New function.
+ (build_component_ref): If the field was not found, try using
+ lookup_field_fuzzy and potentially offer a suggestion.
+
+2015-11-12 James Norris <jnorris@codesourcery.com>
+ Joseph Myers <joseph@codesourcery.com>
+
+ * c-parser.c (c_parser_pragma): Handle PRAGMA_OACC_DECLARE.
+ (c_parser_omp_clause_name): Handle 'device_resident' clause.
+ (c_parser_oacc_data_clause): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
+ and PRAGMA_OMP_CLAUSE_LINK.
+ (c_parser_oacc_all_clauses): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
+ and PRAGMA_OACC_CLAUSE_LINK.
+ (OACC_DECLARE_CLAUSE_MASK): New definition.
+ (c_parser_oacc_declare): New function.
+
+2015-11-12 Marek Polacek <polacek@redhat.com>
+
+ PR c/67784
+ * c-parser.c (c_parser_for_statement): Reclassify the token in
+ a correct scope.
+
+2015-11-11 Marek Polacek <polacek@redhat.com>
+
+ PR c/68107
+ PR c++/68266
+ * c-decl.c (grokdeclarator): Call valid_array_size_p. Remove code
+ checking the size of an array.
+
+2015-11-11 Andrew MacLeod <amacleod@redhat.com>
+
+ * c-array-notation.c: Remove unused header files.
+ * c-aux-info.c: Likewise.
+ * c-convert.c: Likewise.
+ * c-decl.c: Likewise.
+ * c-errors.c: Likewise.
+ * c-lang.c: Likewise.
+ * c-objc-common.c: Likewise.
+ * c-parser.c: Likewise.
+ * c-typeck.c: Likewise.
+ * gccspec.c: Likewise.
+
2015-11-09 Thomas Schwinge <thomas@codesourcery.com>
Cesar Philippidis <cesar@codesourcery.com>
James Norris <jnorris@codesourcery.com>
diff --git a/gcc/c/c-array-notation.c b/gcc/c/c-array-notation.c
index 0537cbc7fdd..21f8684eb4b 100644
--- a/gcc/c/c-array-notation.c
+++ b/gcc/c/c-array-notation.c
@@ -68,12 +68,9 @@
#include "config.h"
#include "system.h"
#include "coretypes.h"
-#include "tree.h"
-#include "c-family/c-common.h"
#include "c-tree.h"
#include "gimple-expr.h"
#include "tree-iterator.h"
-#include "opts.h"
/* If *VALUE is not of type INTEGER_CST, PARM_DECL or VAR_DECL, then map it
to a variable and then set *VALUE to the new variable. */
diff --git a/gcc/c/c-aux-info.c b/gcc/c/c-aux-info.c
index e8b6de64dc3..79d98518561 100644
--- a/gcc/c/c-aux-info.c
+++ b/gcc/c/c-aux-info.c
@@ -24,10 +24,7 @@ along with GCC; see the file COPYING3. If not see
#include "system.h"
#include "coretypes.h"
#include "tm.h"
-#include "tree.h"
#include "c-tree.h"
-#include "flags.h"
-#include "alias.h"
enum formals_style {
ansi,
diff --git a/gcc/c/c-convert.c b/gcc/c/c-convert.c
index 3d16ccb6eed..6476a8b01dd 100644
--- a/gcc/c/c-convert.c
+++ b/gcc/c/c-convert.c
@@ -27,10 +27,7 @@ along with GCC; see the file COPYING3. If not see
#include "system.h"
#include "coretypes.h"
#include "target.h"
-#include "tree.h"
-#include "c-family/c-common.h"
#include "c-tree.h"
-#include "flags.h"
#include "convert.h"
#include "langhooks.h"
#include "ubsan.h"
diff --git a/gcc/c/c-decl.c b/gcc/c/c-decl.c
index a3d8eada928..9a222d8f511 100644
--- a/gcc/c/c-decl.c
+++ b/gcc/c/c-decl.c
@@ -29,11 +29,8 @@ along with GCC; see the file COPYING3. If not see
#include "coretypes.h"
#include "target.h"
#include "function.h"
-#include "tree.h"
-#include "c-family/c-common.h"
#include "c-tree.h"
#include "timevar.h"
-#include "tm_p.h"
#include "stringpool.h"
#include "cgraph.h"
#include "intl.h"
@@ -41,11 +38,8 @@ along with GCC; see the file COPYING3. If not see
#include "stor-layout.h"
#include "varasm.h"
#include "attribs.h"
-#include "tree-inline.h"
-#include "flags.h"
#include "toplev.h"
#include "debug.h"
-#include "opts.h"
#include "c-family/c-objc.h"
#include "c-family/c-pragma.h"
#include "c-family/c-ubsan.h"
@@ -53,7 +47,6 @@ along with GCC; see the file COPYING3. If not see
#include "langhooks.h"
#include "tree-iterator.h"
#include "dumpfile.h"
-#include "langhooks-def.h"
#include "plugin.h"
#include "c-family/c-ada-spec.h"
#include "cilk.h"
@@ -5285,7 +5278,7 @@ warn_defaults_to (location_t location, int opt, const char *gmsgid, ...)
{
diagnostic_info diagnostic;
va_list ap;
- rich_location richloc (location);
+ rich_location richloc (line_table, location);
va_start (ap, gmsgid);
diagnostic_set_info (&diagnostic, gmsgid, &ap, &richloc,
@@ -6007,6 +6000,9 @@ grokdeclarator (const struct c_declarator *declarator,
TYPE_SIZE_UNIT (type) = size_zero_node;
SET_TYPE_STRUCTURAL_EQUALITY (type);
}
+
+ if (!valid_array_size_p (loc, type, name))
+ type = error_mark_node;
}
if (decl_context != PARM
@@ -6014,7 +6010,8 @@ grokdeclarator (const struct c_declarator *declarator,
|| array_ptr_attrs != NULL_TREE
|| array_parm_static))
{
- error_at (loc, "static or type qualifiers in non-parameter array declarator");
+ error_at (loc, "static or type qualifiers in non-parameter "
+ "array declarator");
array_ptr_quals = TYPE_UNQUALIFIED;
array_ptr_attrs = NULL_TREE;
array_parm_static = 0;
@@ -6293,22 +6290,6 @@ grokdeclarator (const struct c_declarator *declarator,
}
}
- /* Did array size calculations overflow or does the array cover more
- than half of the address-space? */
- if (TREE_CODE (type) == ARRAY_TYPE
- && COMPLETE_TYPE_P (type)
- && TREE_CODE (TYPE_SIZE_UNIT (type)) == INTEGER_CST
- && ! valid_constant_size_p (TYPE_SIZE_UNIT (type)))
- {
- if (name)
- error_at (loc, "size of array %qE is too large", name);
- else
- error_at (loc, "size of unnamed array is too large");
- /* If we proceed with the array type as it is, we'll eventually
- crash in tree_to_[su]hwi(). */
- type = error_mark_node;
- }
-
/* If this is declaring a typedef name, return a TYPE_DECL. */
if (storage_class == csc_typedef)
diff --git a/gcc/c/c-errors.c b/gcc/c/c-errors.c
index b458957474d..ee9c2b5858d 100644
--- a/gcc/c/c-errors.c
+++ b/gcc/c/c-errors.c
@@ -22,11 +22,7 @@ along with GCC; see the file COPYING3. If not see
#include "system.h"
#include "coretypes.h"
#include "tm.h"
-#include "tree.h"
#include "c-tree.h"
-#include "tm_p.h"
-#include "alias.h"
-#include "flags.h"
#include "opts.h"
/* Issue an ISO C99 pedantic warning MSGID if -pedantic outside C11 mode,
@@ -41,7 +37,7 @@ pedwarn_c99 (location_t location, int opt, const char *gmsgid, ...)
diagnostic_info diagnostic;
va_list ap;
bool warned = false;
- rich_location richloc (location);
+ rich_location richloc (line_table, location);
va_start (ap, gmsgid);
/* If desired, issue the C99/C11 compat warning, which is more specific
@@ -80,7 +76,7 @@ pedwarn_c90 (location_t location, int opt, const char *gmsgid, ...)
{
diagnostic_info diagnostic;
va_list ap;
- rich_location richloc (location);
+ rich_location richloc (line_table, location);
va_start (ap, gmsgid);
/* Warnings such as -Wvla are the most specific ones. */
diff --git a/gcc/c/c-lang.c b/gcc/c/c-lang.c
index 9728a4797e4..2ee7f91cc82 100644
--- a/gcc/c/c-lang.c
+++ b/gcc/c/c-lang.c
@@ -21,15 +21,10 @@ along with GCC; see the file COPYING3. If not see
#include "config.h"
#include "system.h"
#include "coretypes.h"
-#include "tm.h"
-#include "tree.h"
-#include "c-family/c-common.h"
#include "c-tree.h"
#include "langhooks.h"
#include "langhooks-def.h"
-#include "tree-inline.h"
#include "c-objc-common.h"
-#include "c-family/c-pragma.h"
enum c_language_kind c_language = clk_c;
diff --git a/gcc/c/c-objc-common.c b/gcc/c/c-objc-common.c
index 270b03da5ca..77a883b49b4 100644
--- a/gcc/c/c-objc-common.c
+++ b/gcc/c/c-objc-common.c
@@ -20,9 +20,7 @@ along with GCC; see the file COPYING3. If not see
#include "config.h"
#include "system.h"
#include "coretypes.h"
-#include "tree.h"
#include "c-tree.h"
-#include "alias.h"
#include "intl.h"
#include "c-family/c-pretty-print.h"
#include "tree-pretty-print.h"
diff --git a/gcc/c/c-parser.c b/gcc/c/c-parser.c
index dd4434dc7ae..943d3e58d27 100644
--- a/gcc/c/c-parser.c
+++ b/gcc/c/c-parser.c
@@ -40,18 +40,14 @@ along with GCC; see the file COPYING3. If not see
#include "coretypes.h"
#include "target.h"
#include "function.h"
-#include "tree.h"
-#include "c-family/c-common.h"
#include "c-tree.h"
#include "timevar.h"
#include "stringpool.h"
#include "cgraph.h"
-#include "flags.h"
#include "attribs.h"
#include "stor-layout.h"
#include "varasm.h"
#include "trans-mem.h"
-#include "langhooks.h"
#include "c-family/c-pragma.h"
#include "c-lang.h"
#include "c-family/c-objc.h"
@@ -63,6 +59,23 @@ along with GCC; see the file COPYING3. If not see
#include "gimple-expr.h"
#include "context.h"
+void
+set_c_expr_source_range (c_expr *expr,
+ location_t start, location_t finish)
+{
+ expr->src_range.m_start = start;
+ expr->src_range.m_finish = finish;
+ set_source_range (expr->value, start, finish);
+}
+
+void
+set_c_expr_source_range (c_expr *expr,
+ source_range src_range)
+{
+ expr->src_range = src_range;
+ set_source_range (expr->value, src_range);
+}
+
/* Initialization routine for this file. */
@@ -168,6 +181,16 @@ struct GTY (()) c_token {
location_t location;
/* The value associated with this token, if any. */
tree value;
+
+ source_range get_range () const
+ {
+ return get_range_from_loc (line_table, location);
+ }
+
+ location_t get_finish () const
+ {
+ return get_range ().m_finish;
+ }
};
/* A parser structure recording information about the state and
@@ -1232,6 +1255,7 @@ static vec<tree, va_gc> *c_parser_expr_list (c_parser *, bool, bool,
vec<tree, va_gc> **, location_t *,
tree *, vec<location_t> *,
unsigned int * = NULL);
+static void c_parser_oacc_declare (c_parser *);
static void c_parser_oacc_enter_exit_data (c_parser *, bool);
static void c_parser_oacc_update (c_parser *);
static void c_parser_omp_construct (c_parser *);
@@ -5753,6 +5777,21 @@ c_parser_for_statement (c_parser *parser, bool ivdep)
c_finish_loop (loc, cond, incr, body, c_break_label, c_cont_label, true);
add_stmt (c_end_compound_stmt (loc, block, flag_isoc99 || c_dialect_objc ()));
+ /* We might need to reclassify any previously-lexed identifier, e.g.
+ when we've left a for loop with an if-statement without else in the
+ body - we might have used a wrong scope for the token. See PR67784. */
+ if (c_parser_next_token_is (parser, CPP_NAME))
+ {
+ c_token *token = c_parser_peek_token (parser);
+ tree decl = lookup_name (token->value);
+ if (decl == NULL_TREE || VAR_P (decl))
+ /* If DECL is null, we don't know what this token might be. Treat
+ it as an ID for better diagnostics; we'll error later on. */
+ token->id_kind = C_ID_ID;
+ else if (TREE_CODE (decl) == TYPE_DECL)
+ token->id_kind = C_ID_TYPENAME;
+ }
+
token_indent_info next_tinfo
= get_token_indent_info (c_parser_peek_token (parser));
warn_for_misleading_indentation (for_tinfo, body_tinfo, next_tinfo);
@@ -6105,6 +6144,7 @@ c_parser_expr_no_commas (c_parser *parser, struct c_expr *after,
ret.value = build_modify_expr (op_location, lhs.value, lhs.original_type,
code, exp_location, rhs.value,
rhs.original_type);
+ set_c_expr_source_range (&ret, lhs.get_start (), rhs.get_finish ());
if (code == NOP_EXPR)
ret.original_code = MODIFY_EXPR;
else
@@ -6135,7 +6175,7 @@ c_parser_conditional_expression (c_parser *parser, struct c_expr *after,
tree omp_atomic_lhs)
{
struct c_expr cond, exp1, exp2, ret;
- location_t cond_loc, colon_loc, middle_loc;
+ location_t start, cond_loc, colon_loc, middle_loc;
gcc_assert (!after || c_dialect_objc ());
@@ -6143,6 +6183,10 @@ c_parser_conditional_expression (c_parser *parser, struct c_expr *after,
if (c_parser_next_token_is_not (parser, CPP_QUERY))
return cond;
+ if (cond.value != error_mark_node)
+ start = cond.get_start ();
+ else
+ start = UNKNOWN_LOCATION;
cond_loc = c_parser_peek_token (parser)->location;
cond = convert_lvalue_to_rvalue (cond_loc, cond, true, true);
c_parser_consume_token (parser);
@@ -6218,6 +6262,7 @@ c_parser_conditional_expression (c_parser *parser, struct c_expr *after,
? t1
: NULL);
}
+ set_c_expr_source_range (&ret, start, exp2.get_finish ());
return ret;
}
@@ -6370,6 +6415,7 @@ c_parser_binary_expression (c_parser *parser, struct c_expr *after,
{
enum c_parser_prec oprec;
enum tree_code ocode;
+ source_range src_range;
if (parser->error)
goto out;
switch (c_parser_peek_token (parser)->type)
@@ -6458,6 +6504,7 @@ c_parser_binary_expression (c_parser *parser, struct c_expr *after,
switch (ocode)
{
case TRUTH_ANDIF_EXPR:
+ src_range = stack[sp].expr.src_range;
stack[sp].expr
= convert_lvalue_to_rvalue (stack[sp].loc,
stack[sp].expr, true, true);
@@ -6465,8 +6512,10 @@ c_parser_binary_expression (c_parser *parser, struct c_expr *after,
(stack[sp].loc, default_conversion (stack[sp].expr.value));
c_inhibit_evaluation_warnings += (stack[sp].expr.value
== truthvalue_false_node);
+ set_c_expr_source_range (&stack[sp].expr, src_range);
break;
case TRUTH_ORIF_EXPR:
+ src_range = stack[sp].expr.src_range;
stack[sp].expr
= convert_lvalue_to_rvalue (stack[sp].loc,
stack[sp].expr, true, true);
@@ -6474,6 +6523,7 @@ c_parser_binary_expression (c_parser *parser, struct c_expr *after,
(stack[sp].loc, default_conversion (stack[sp].expr.value));
c_inhibit_evaluation_warnings += (stack[sp].expr.value
== truthvalue_true_node);
+ set_c_expr_source_range (&stack[sp].expr, src_range);
break;
default:
break;
@@ -6542,6 +6592,8 @@ c_parser_cast_expression (c_parser *parser, struct c_expr *after)
expr = convert_lvalue_to_rvalue (expr_loc, expr, true, true);
}
ret.value = c_cast_expr (cast_loc, type_name, expr.value);
+ if (ret.value && expr.value)
+ set_c_expr_source_range (&ret, cast_loc, expr.get_finish ());
ret.original_code = ERROR_MARK;
ret.original_type = NULL;
return ret;
@@ -6591,6 +6643,7 @@ c_parser_unary_expression (c_parser *parser)
struct c_expr ret, op;
location_t op_loc = c_parser_peek_token (parser)->location;
location_t exp_loc;
+ location_t finish;
ret.original_code = ERROR_MARK;
ret.original_type = NULL;
switch (c_parser_peek_token (parser)->type)
@@ -6630,8 +6683,10 @@ c_parser_unary_expression (c_parser *parser)
c_parser_consume_token (parser);
exp_loc = c_parser_peek_token (parser)->location;
op = c_parser_cast_expression (parser, NULL);
+ finish = op.get_finish ();
op = convert_lvalue_to_rvalue (exp_loc, op, true, true);
ret.value = build_indirect_ref (op_loc, op.value, RO_UNARY_STAR);
+ set_c_expr_source_range (&ret, op_loc, finish);
return ret;
case CPP_PLUS:
if (!c_dialect_objc () && !in_system_header_at (input_location))
@@ -6719,8 +6774,15 @@ static struct c_expr
c_parser_sizeof_expression (c_parser *parser)
{
struct c_expr expr;
+ struct c_expr result;
location_t expr_loc;
gcc_assert (c_parser_next_token_is_keyword (parser, RID_SIZEOF));
+
+ location_t start;
+ location_t finish = UNKNOWN_LOCATION;
+
+ start = c_parser_peek_token (parser)->location;
+
c_parser_consume_token (parser);
c_inhibit_evaluation_warnings++;
in_sizeof++;
@@ -6734,6 +6796,7 @@ c_parser_sizeof_expression (c_parser *parser)
expr_loc = c_parser_peek_token (parser)->location;
type_name = c_parser_type_name (parser);
c_parser_skip_until_found (parser, CPP_CLOSE_PAREN, "expected %<)%>");
+ finish = parser->tokens_buf[0].location;
if (type_name == NULL)
{
struct c_expr ret;
@@ -6749,17 +6812,19 @@ c_parser_sizeof_expression (c_parser *parser)
expr = c_parser_postfix_expression_after_paren_type (parser,
type_name,
expr_loc);
+ finish = expr.get_finish ();
goto sizeof_expr;
}
/* sizeof ( type-name ). */
c_inhibit_evaluation_warnings--;
in_sizeof--;
- return c_expr_sizeof_type (expr_loc, type_name);
+ result = c_expr_sizeof_type (expr_loc, type_name);
}
else
{
expr_loc = c_parser_peek_token (parser)->location;
expr = c_parser_unary_expression (parser);
+ finish = expr.get_finish ();
sizeof_expr:
c_inhibit_evaluation_warnings--;
in_sizeof--;
@@ -6767,8 +6832,11 @@ c_parser_sizeof_expression (c_parser *parser)
if (TREE_CODE (expr.value) == COMPONENT_REF
&& DECL_C_BIT_FIELD (TREE_OPERAND (expr.value, 1)))
error_at (expr_loc, "%<sizeof%> applied to a bit-field");
- return c_expr_sizeof_expr (expr_loc, expr);
+ result = c_expr_sizeof_expr (expr_loc, expr);
}
+ if (finish != UNKNOWN_LOCATION)
+ set_c_expr_source_range (&result, start, finish);
+ return result;
}
/* Parse an alignof expression. */
@@ -7188,12 +7256,14 @@ c_parser_postfix_expression (c_parser *parser)
struct c_expr expr, e1;
struct c_type_name *t1, *t2;
location_t loc = c_parser_peek_token (parser)->location;;
+ source_range tok_range = c_parser_peek_token (parser)->get_range ();
expr.original_code = ERROR_MARK;
expr.original_type = NULL;
switch (c_parser_peek_token (parser)->type)
{
case CPP_NUMBER:
expr.value = c_parser_peek_token (parser)->value;
+ set_c_expr_source_range (&expr, tok_range);
loc = c_parser_peek_token (parser)->location;
c_parser_consume_token (parser);
if (TREE_CODE (expr.value) == FIXED_CST
@@ -7208,6 +7278,7 @@ c_parser_postfix_expression (c_parser *parser)
case CPP_CHAR32:
case CPP_WCHAR:
expr.value = c_parser_peek_token (parser)->value;
+ set_c_expr_source_range (&expr, tok_range);
c_parser_consume_token (parser);
break;
case CPP_STRING:
@@ -7216,6 +7287,7 @@ c_parser_postfix_expression (c_parser *parser)
case CPP_WSTRING:
case CPP_UTF8STRING:
expr.value = c_parser_peek_token (parser)->value;
+ set_c_expr_source_range (&expr, tok_range);
expr.original_code = STRING_CST;
c_parser_consume_token (parser);
break;
@@ -7223,6 +7295,7 @@ c_parser_postfix_expression (c_parser *parser)
gcc_assert (c_dialect_objc ());
expr.value
= objc_build_string_object (c_parser_peek_token (parser)->value);
+ set_c_expr_source_range (&expr, tok_range);
c_parser_consume_token (parser);
break;
case CPP_NAME:
@@ -7236,6 +7309,7 @@ c_parser_postfix_expression (c_parser *parser)
(c_parser_peek_token (parser)->type
== CPP_OPEN_PAREN),
&expr.original_type);
+ set_c_expr_source_range (&expr, tok_range);
break;
}
case C_ID_CLASSNAME:
@@ -7324,6 +7398,7 @@ c_parser_postfix_expression (c_parser *parser)
else
{
/* A parenthesized expression. */
+ location_t loc_open_paren = c_parser_peek_token (parser)->location;
c_parser_consume_token (parser);
expr = c_parser_expression (parser);
if (TREE_CODE (expr.value) == MODIFY_EXPR)
@@ -7331,6 +7406,8 @@ c_parser_postfix_expression (c_parser *parser)
if (expr.original_code != C_MAYBE_CONST_EXPR)
expr.original_code = ERROR_MARK;
/* Don't change EXPR.ORIGINAL_TYPE. */
+ location_t loc_close_paren = c_parser_peek_token (parser)->location;
+ set_c_expr_source_range (&expr, loc_open_paren, loc_close_paren);
c_parser_skip_until_found (parser, CPP_CLOSE_PAREN,
"expected %<)%>");
}
@@ -7921,6 +7998,8 @@ c_parser_postfix_expression_after_primary (c_parser *parser,
vec<tree, va_gc> *exprlist;
vec<tree, va_gc> *origtypes = NULL;
vec<location_t> arg_loc = vNULL;
+ location_t start;
+ location_t finish;
while (true)
{
@@ -7957,7 +8036,10 @@ c_parser_postfix_expression_after_primary (c_parser *parser,
{
c_parser_skip_until_found (parser, CPP_CLOSE_SQUARE,
"expected %<]%>");
+ start = expr.get_start ();
+ finish = parser->tokens_buf[0].location;
expr.value = build_array_ref (op_loc, expr.value, idx);
+ set_c_expr_source_range (&expr, start, finish);
}
}
expr.original_code = ERROR_MARK;
@@ -8000,9 +8082,13 @@ c_parser_postfix_expression_after_primary (c_parser *parser,
"%<memset%> used with constant zero length parameter; "
"this could be due to transposed parameters");
+ start = expr.get_start ();
+ finish = parser->tokens_buf[0].get_finish ();
expr.value
= c_build_function_call_vec (expr_loc, arg_loc, expr.value,
exprlist, origtypes);
+ set_c_expr_source_range (&expr, start, finish);
+
expr.original_code = ERROR_MARK;
if (TREE_CODE (expr.value) == INTEGER_CST
&& TREE_CODE (orig_expr.value) == FUNCTION_DECL
@@ -8031,8 +8117,11 @@ c_parser_postfix_expression_after_primary (c_parser *parser,
expr.original_type = NULL;
return expr;
}
+ start = expr.get_start ();
+ finish = c_parser_peek_token (parser)->get_finish ();
c_parser_consume_token (parser);
expr.value = build_component_ref (op_loc, expr.value, ident);
+ set_c_expr_source_range (&expr, start, finish);
expr.original_code = ERROR_MARK;
if (TREE_CODE (expr.value) != COMPONENT_REF)
expr.original_type = NULL;
@@ -8060,12 +8149,15 @@ c_parser_postfix_expression_after_primary (c_parser *parser,
expr.original_type = NULL;
return expr;
}
+ start = expr.get_start ();
+ finish = c_parser_peek_token (parser)->get_finish ();
c_parser_consume_token (parser);
expr.value = build_component_ref (op_loc,
build_indirect_ref (op_loc,
expr.value,
RO_ARROW),
ident);
+ set_c_expr_source_range (&expr, start, finish);
expr.original_code = ERROR_MARK;
if (TREE_CODE (expr.value) != COMPONENT_REF)
expr.original_type = NULL;
@@ -8081,6 +8173,8 @@ c_parser_postfix_expression_after_primary (c_parser *parser,
break;
case CPP_PLUS_PLUS:
/* Postincrement. */
+ start = expr.get_start ();
+ finish = c_parser_peek_token (parser)->get_finish ();
c_parser_consume_token (parser);
/* If the expressions have array notations, we expand them. */
if (flag_cilkplus
@@ -8092,11 +8186,14 @@ c_parser_postfix_expression_after_primary (c_parser *parser,
expr.value = build_unary_op (op_loc,
POSTINCREMENT_EXPR, expr.value, 0);
}
+ set_c_expr_source_range (&expr, start, finish);
expr.original_code = ERROR_MARK;
expr.original_type = NULL;
break;
case CPP_MINUS_MINUS:
/* Postdecrement. */
+ start = expr.get_start ();
+ finish = c_parser_peek_token (parser)->get_finish ();
c_parser_consume_token (parser);
/* If the expressions have array notations, we expand them. */
if (flag_cilkplus
@@ -8108,6 +8205,7 @@ c_parser_postfix_expression_after_primary (c_parser *parser,
expr.value = build_unary_op (op_loc,
POSTDECREMENT_EXPR, expr.value, 0);
}
+ set_c_expr_source_range (&expr, start, finish);
expr.original_code = ERROR_MARK;
expr.original_type = NULL;
break;
@@ -9718,6 +9816,10 @@ c_parser_pragma (c_parser *parser, enum pragma_context context)
switch (id)
{
+ case PRAGMA_OACC_DECLARE:
+ c_parser_oacc_declare (parser);
+ return false;
+
case PRAGMA_OACC_ENTER_DATA:
c_parser_oacc_enter_exit_data (parser, true);
return false;
@@ -10007,6 +10109,8 @@ c_parser_omp_clause_name (c_parser *parser)
result = PRAGMA_OMP_CLAUSE_DEVICE;
else if (!strcmp ("deviceptr", p))
result = PRAGMA_OACC_CLAUSE_DEVICEPTR;
+ else if (!strcmp ("device_resident", p))
+ result = PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT;
else if (!strcmp ("dist_schedule", p))
result = PRAGMA_OMP_CLAUSE_DIST_SCHEDULE;
break;
@@ -10443,10 +10547,16 @@ c_parser_oacc_data_clause (c_parser *parser, pragma_omp_clause c_kind,
case PRAGMA_OACC_CLAUSE_DEVICE:
kind = GOMP_MAP_FORCE_TO;
break;
+ case PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT:
+ kind = GOMP_MAP_DEVICE_RESIDENT;
+ break;
case PRAGMA_OACC_CLAUSE_HOST:
case PRAGMA_OACC_CLAUSE_SELF:
kind = GOMP_MAP_FORCE_FROM;
break;
+ case PRAGMA_OACC_CLAUSE_LINK:
+ kind = GOMP_MAP_LINK;
+ break;
case PRAGMA_OACC_CLAUSE_PRESENT:
kind = GOMP_MAP_FORCE_PRESENT;
break;
@@ -12728,6 +12838,10 @@ c_parser_oacc_all_clauses (c_parser *parser, omp_clause_mask mask,
clauses = c_parser_oacc_data_clause_deviceptr (parser, clauses);
c_name = "deviceptr";
break;
+ case PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT:
+ clauses = c_parser_oacc_data_clause (parser, c_kind, clauses);
+ c_name = "device_resident";
+ break;
case PRAGMA_OACC_CLAUSE_FIRSTPRIVATE:
clauses = c_parser_omp_clause_firstprivate (parser, clauses);
c_name = "firstprivate";
@@ -12750,6 +12864,10 @@ c_parser_oacc_all_clauses (c_parser *parser, omp_clause_mask mask,
clauses);
c_name = "independent";
break;
+ case PRAGMA_OACC_CLAUSE_LINK:
+ clauses = c_parser_oacc_data_clause (parser, c_kind, clauses);
+ c_name = "link";
+ break;
case PRAGMA_OACC_CLAUSE_NUM_GANGS:
clauses = c_parser_omp_clause_num_gangs (parser, clauses);
c_name = "num_gangs";
@@ -13207,6 +13325,161 @@ c_parser_oacc_data (location_t loc, c_parser *parser)
}
/* OpenACC 2.0:
+ # pragma acc declare oacc-data-clause[optseq] new-line
+*/
+
+#define OACC_DECLARE_CLAUSE_MASK \
+ ( (OMP_CLAUSE_MASK_1 << PRAGMA_OACC_CLAUSE_COPY) \
+ | (OMP_CLAUSE_MASK_1 << PRAGMA_OACC_CLAUSE_COPYIN) \
+ | (OMP_CLAUSE_MASK_1 << PRAGMA_OACC_CLAUSE_COPYOUT) \
+ | (OMP_CLAUSE_MASK_1 << PRAGMA_OACC_CLAUSE_CREATE) \
+ | (OMP_CLAUSE_MASK_1 << PRAGMA_OACC_CLAUSE_DEVICEPTR) \
+ | (OMP_CLAUSE_MASK_1 << PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT) \
+ | (OMP_CLAUSE_MASK_1 << PRAGMA_OACC_CLAUSE_LINK) \
+ | (OMP_CLAUSE_MASK_1 << PRAGMA_OACC_CLAUSE_PRESENT) \
+ | (OMP_CLAUSE_MASK_1 << PRAGMA_OACC_CLAUSE_PRESENT_OR_COPY) \
+ | (OMP_CLAUSE_MASK_1 << PRAGMA_OACC_CLAUSE_PRESENT_OR_COPYIN) \
+ | (OMP_CLAUSE_MASK_1 << PRAGMA_OACC_CLAUSE_PRESENT_OR_COPYOUT) \
+ | (OMP_CLAUSE_MASK_1 << PRAGMA_OACC_CLAUSE_PRESENT_OR_CREATE) )
+
+static void
+c_parser_oacc_declare (c_parser *parser)
+{
+ location_t pragma_loc = c_parser_peek_token (parser)->location;
+ tree clauses, stmt, t, decl;
+
+ bool error = false;
+
+ c_parser_consume_pragma (parser);
+
+ clauses = c_parser_oacc_all_clauses (parser, OACC_DECLARE_CLAUSE_MASK,
+ "#pragma acc declare");
+ if (!clauses)
+ {
+ error_at (pragma_loc,
+ "no valid clauses specified in %<#pragma acc declare%>");
+ return;
+ }
+
+ for (t = clauses; t; t = OMP_CLAUSE_CHAIN (t))
+ {
+ location_t loc = OMP_CLAUSE_LOCATION (t);
+ decl = OMP_CLAUSE_DECL (t);
+ if (!DECL_P (decl))
+ {
+ error_at (loc, "array section in %<#pragma acc declare%>");
+ error = true;
+ continue;
+ }
+
+ switch (OMP_CLAUSE_MAP_KIND (t))
+ {
+ case GOMP_MAP_FORCE_ALLOC:
+ case GOMP_MAP_FORCE_TO:
+ case GOMP_MAP_FORCE_DEVICEPTR:
+ case GOMP_MAP_DEVICE_RESIDENT:
+ break;
+
+ case GOMP_MAP_POINTER:
+ /* Generated by c_finish_omp_clauses from array sections;
+ avoid spurious diagnostics. */
+ break;
+
+ case GOMP_MAP_LINK:
+ if (!global_bindings_p ()
+ && (TREE_STATIC (decl)
+ || !DECL_EXTERNAL (decl)))
+ {
+ error_at (loc,
+ "%qD must be a global variable in"
+ "%<#pragma acc declare link%>",
+ decl);
+ error = true;
+ continue;
+ }
+ break;
+
+ default:
+ if (global_bindings_p ())
+ {
+ error_at (loc, "invalid OpenACC clause at file scope");
+ error = true;
+ continue;
+ }
+ if (DECL_EXTERNAL (decl))
+ {
+ error_at (loc,
+ "invalid use of %<extern%> variable %qD "
+ "in %<#pragma acc declare%>", decl);
+ error = true;
+ continue;
+ }
+ else if (TREE_PUBLIC (decl))
+ {
+ error_at (loc,
+ "invalid use of %<global%> variable %qD "
+ "in %<#pragma acc declare%>", decl);
+ error = true;
+ continue;
+ }
+ break;
+ }
+
+ if (lookup_attribute ("omp declare target", DECL_ATTRIBUTES (decl))
+ || lookup_attribute ("omp declare target link",
+ DECL_ATTRIBUTES (decl)))
+ {
+ error_at (loc, "variable %qD used more than once with "
+ "%<#pragma acc declare%>", decl);
+ error = true;
+ continue;
+ }
+
+ if (!error)
+ {
+ tree id;
+
+ if (OMP_CLAUSE_MAP_KIND (t) == GOMP_MAP_LINK)
+ id = get_identifier ("omp declare target link");
+ else
+ id = get_identifier ("omp declare target");
+
+ DECL_ATTRIBUTES (decl)
+ = tree_cons (id, NULL_TREE, DECL_ATTRIBUTES (decl));
+
+ if (global_bindings_p ())
+ {
+ symtab_node *node = symtab_node::get (decl);
+ if (node != NULL)
+ {
+ node->offloadable = 1;
+#ifdef ENABLE_OFFLOADING
+ g->have_offload = true;
+ if (is_a <varpool_node *> (node))
+ {
+ vec_safe_push (offload_vars, decl);
+ node->force_output = 1;
+ }
+#endif
+ }
+ }
+ }
+ }
+
+ if (error || global_bindings_p ())
+ return;
+
+ stmt = make_node (OACC_DECLARE);
+ TREE_TYPE (stmt) = void_type_node;
+ OACC_DECLARE_CLAUSES (stmt) = clauses;
+ SET_EXPR_LOCATION (stmt, pragma_loc);
+
+ add_stmt (stmt);
+
+ return;
+}
+
+/* OpenACC 2.0:
# pragma acc enter data oacc-enter-data-clause[optseq] new-line
or
diff --git a/gcc/c/c-tree.h b/gcc/c/c-tree.h
index 04991f7261c..6bc216af889 100644
--- a/gcc/c/c-tree.h
+++ b/gcc/c/c-tree.h
@@ -132,6 +132,17 @@ struct c_expr
The type of an enum constant is a plain integer type, but this
field will be the enum type. */
tree original_type;
+
+ /* The source range of this expression. This is redundant
+ for node values that have locations, but not all node kinds
+ have locations (e.g. constants, and references to params, locals,
+ etc), so we stash a copy here. */
+ source_range src_range;
+
+ /* Access to the first and last locations within the source spelling
+ of this expression. */
+ location_t get_start () const { return src_range.m_start; }
+ location_t get_finish () const { return src_range.m_finish; }
};
/* Type alias for struct c_expr. This allows to use the structure
@@ -708,4 +719,12 @@ extern void pedwarn_c90 (location_t, int opt, const char *, ...)
extern bool pedwarn_c99 (location_t, int opt, const char *, ...)
ATTRIBUTE_GCC_DIAG(3,4);
+extern void
+set_c_expr_source_range (c_expr *expr,
+ location_t start, location_t finish);
+
+extern void
+set_c_expr_source_range (c_expr *expr,
+ source_range src_range);
+
#endif /* ! GCC_C_TREE_H */
diff --git a/gcc/c/c-typeck.c b/gcc/c/c-typeck.c
index 9ee26814245..4db9bbf1c3c 100644
--- a/gcc/c/c-typeck.c
+++ b/gcc/c/c-typeck.c
@@ -29,8 +29,6 @@ along with GCC; see the file COPYING3. If not see
#include "target.h"
#include "function.h"
#include "bitmap.h"
-#include "tree.h"
-#include "c-family/c-common.h"
#include "c-tree.h"
#include "gimple-expr.h"
#include "predict.h"
@@ -40,7 +38,6 @@ along with GCC; see the file COPYING3. If not see
#include "stmt.h"
#include "langhooks.h"
#include "c-lang.h"
-#include "flags.h"
#include "intl.h"
#include "tree-iterator.h"
#include "gimplify.h"
@@ -50,6 +47,7 @@ along with GCC; see the file COPYING3. If not see
#include "c-family/c-ubsan.h"
#include "cilk.h"
#include "gomp-constants.h"
+#include "spellcheck.h"
/* Possible cases of implicit bad conversions. Used to select
diagnostic messages in convert_for_assignment. */
@@ -2245,6 +2243,72 @@ lookup_field (tree type, tree component)
return tree_cons (NULL_TREE, field, NULL_TREE);
}
+/* Recursively append candidate IDENTIFIER_NODEs to CANDIDATES. */
+
+static void
+lookup_field_fuzzy_find_candidates (tree type, tree component,
+ vec<tree> *candidates)
+{
+ tree field;
+ for (field = TYPE_FIELDS (type); field; field = DECL_CHAIN (field))
+ {
+ if (DECL_NAME (field) == NULL_TREE
+ && (TREE_CODE (TREE_TYPE (field)) == RECORD_TYPE
+ || TREE_CODE (TREE_TYPE (field)) == UNION_TYPE))
+ {
+ lookup_field_fuzzy_find_candidates (TREE_TYPE (field),
+ component,
+ candidates);
+ }
+
+ if (DECL_NAME (field))
+ candidates->safe_push (DECL_NAME (field));
+ }
+}
+
+/* Like "lookup_field", but find the closest matching IDENTIFIER_NODE,
+ rather than returning a TREE_LIST for an exact match. */
+
+static tree
+lookup_field_fuzzy (tree type, tree component)
+{
+ gcc_assert (TREE_CODE (component) == IDENTIFIER_NODE);
+
+ /* First, gather a list of candidates. */
+ auto_vec <tree> candidates;
+
+ lookup_field_fuzzy_find_candidates (type, component,
+ &candidates);
+
+ /* Now determine which is closest. */
+ int i;
+ tree identifier;
+ tree best_identifier = NULL;
+ edit_distance_t best_distance = MAX_EDIT_DISTANCE;
+ FOR_EACH_VEC_ELT (candidates, i, identifier)
+ {
+ gcc_assert (TREE_CODE (identifier) == IDENTIFIER_NODE);
+ edit_distance_t dist = levenshtein_distance (component, identifier);
+ if (dist < best_distance)
+ {
+ best_distance = dist;
+ best_identifier = identifier;
+ }
+ }
+
+ /* If more than half of the letters were misspelled, the suggestion is
+ likely to be meaningless. */
+ if (best_identifier)
+ {
+ unsigned int cutoff = MAX (IDENTIFIER_LENGTH (component),
+ IDENTIFIER_LENGTH (best_identifier)) / 2;
+ if (best_distance > cutoff)
+ return NULL;
+ }
+
+ return best_identifier;
+}
+
/* Make an expression to refer to the COMPONENT field of structure or
union value DATUM. COMPONENT is an IDENTIFIER_NODE. LOC is the
location of the COMPONENT_REF. */
@@ -2280,7 +2344,12 @@ build_component_ref (location_t loc, tree datum, tree component)
if (!field)
{
- error_at (loc, "%qT has no member named %qE", type, component);
+ tree guessed_id = lookup_field_fuzzy (type, component);
+ if (guessed_id)
+ error_at (loc, "%qT has no member named %qE; did you mean %qE?",
+ type, component, guessed_id);
+ else
+ error_at (loc, "%qT has no member named %qE", type, component);
return error_mark_node;
}
@@ -3391,6 +3460,12 @@ parser_build_unary_op (location_t loc, enum tree_code code, struct c_expr arg)
overflow_warning (loc, result.value);
}
+ /* We are typically called when parsing a prefix token at LOC acting on
+ ARG. Reflect this by updating the source range of the result to
+ start at LOC and end at the end of ARG. */
+ set_c_expr_source_range (&result,
+ loc, arg.get_finish ());
+
return result;
}
@@ -3428,6 +3503,10 @@ parser_build_binary_op (location_t location, enum tree_code code,
if (location != UNKNOWN_LOCATION)
protected_set_expr_location (result.value, location);
+ set_c_expr_source_range (&result,
+ arg1.get_start (),
+ arg2.get_finish ());
+
/* Check for cases such as x+y<<z which users are likely
to misinterpret. */
if (warn_parentheses)
diff --git a/gcc/c/gccspec.c b/gcc/c/gccspec.c
index ec0845a6944..84be44674b9 100644
--- a/gcc/c/gccspec.c
+++ b/gcc/c/gccspec.c
@@ -21,7 +21,6 @@ along with GCC; see the file COPYING3. If not see
#include "system.h"
#include "coretypes.h"
#include "tm.h"
-#include "gcc.h"
#include "opts.h"
/* Filter command line before processing by the gcc driver proper. */
diff --git a/gcc/combine.c b/gcc/combine.c
index c3db2e0adf6..2a66fd5c8bd 100644
--- a/gcc/combine.c
+++ b/gcc/combine.c
@@ -5284,6 +5284,22 @@ subst (rtx x, rtx from, rtx to, int in_dest, int in_cond, int unique_copy)
|| GET_CODE (SET_DEST (x)) == PC))
fmt = "ie";
+ /* Substituting into the operands of a widening MULT is not likely
+ to create RTL matching a machine insn. */
+ if (code == MULT
+ && (GET_CODE (XEXP (x, 0)) == ZERO_EXTEND
+ || GET_CODE (XEXP (x, 0)) == SIGN_EXTEND)
+ && (GET_CODE (XEXP (x, 1)) == ZERO_EXTEND
+ || GET_CODE (XEXP (x, 1)) == SIGN_EXTEND)
+ && REG_P (XEXP (XEXP (x, 0), 0))
+ && REG_P (XEXP (XEXP (x, 1), 0)))
+ {
+ if (from == to)
+ return x;
+ else
+ return gen_rtx_CLOBBER (GET_MODE (x), const0_rtx);
+ }
+
/* Get the mode of operand 0 in case X is now a SIGN_EXTEND of a
constant. */
if (fmt[0] == 'e')
@@ -8455,6 +8471,17 @@ force_to_mode (rtx x, machine_mode mode, unsigned HOST_WIDE_INT mask,
/* ... fall through ... */
case MULT:
+ /* Substituting into the operands of a widening MULT is not likely to
+ create RTL matching a machine insn. */
+ if (code == MULT
+ && (GET_CODE (XEXP (x, 0)) == ZERO_EXTEND
+ || GET_CODE (XEXP (x, 0)) == SIGN_EXTEND)
+ && (GET_CODE (XEXP (x, 1)) == ZERO_EXTEND
+ || GET_CODE (XEXP (x, 1)) == SIGN_EXTEND)
+ && REG_P (XEXP (XEXP (x, 0), 0))
+ && REG_P (XEXP (XEXP (x, 1), 0)))
+ return gen_lowpart_or_truncate (mode, x);
+
/* For PLUS, MINUS and MULT, we need any bits less significant than the
most significant bit in MASK since carries from those bits will
affect the bits we are interested in. */
diff --git a/gcc/common.opt b/gcc/common.opt
index 757ce858735..3eb520eaef2 100644
--- a/gcc/common.opt
+++ b/gcc/common.opt
@@ -2403,6 +2403,10 @@ ftree-vrp
Common Report Var(flag_tree_vrp) Init(0) Optimization
Perform Value Range Propagation on trees.
+fsplit-paths
+Common Report Var(flag_split_paths) Init(0) Optimization
+Split paths leading to loop backedges.
+
funit-at-a-time
Common Report Var(flag_unit_at_a_time) Init(1)
Compile whole compilation unit at a time.
diff --git a/gcc/common/config/arc/arc-common.c b/gcc/common/config/arc/arc-common.c
index 489bdb22533..c06f488d285 100644
--- a/gcc/common/config/arc/arc-common.c
+++ b/gcc/common/config/arc/arc-common.c
@@ -33,7 +33,7 @@ arc_option_init_struct (struct gcc_options *opts)
{
opts->x_flag_no_common = 255; /* Mark as not user-initialized. */
- /* Which cpu we're compiling for (ARC600, ARC601, ARC700). */
+ /* Which cpu we're compiling for (ARC600, ARC601, ARC700, ARCv2). */
arc_cpu = PROCESSOR_NONE;
}
@@ -68,6 +68,7 @@ arc_handle_option (struct gcc_options *opts, struct gcc_options *opts_set,
{
size_t code = decoded->opt_index;
int value = decoded->value;
+ const char *arg = decoded->arg;
switch (code)
{
@@ -91,9 +92,40 @@ arc_handle_option (struct gcc_options *opts, struct gcc_options *opts_set,
if (! (opts_set->x_target_flags & MASK_BARREL_SHIFTER) )
opts->x_target_flags &= ~MASK_BARREL_SHIFTER;
break;
+ case PROCESSOR_ARCHS:
+ if ( !(opts_set->x_target_flags & MASK_BARREL_SHIFTER))
+ opts->x_target_flags |= MASK_BARREL_SHIFTER; /* Default: on. */
+ if ( !(opts_set->x_target_flags & MASK_CODE_DENSITY))
+ opts->x_target_flags |= MASK_CODE_DENSITY; /* Default: on. */
+ if ( !(opts_set->x_target_flags & MASK_NORM_SET))
+ opts->x_target_flags |= MASK_NORM_SET; /* Default: on. */
+ if ( !(opts_set->x_target_flags & MASK_SWAP_SET))
+ opts->x_target_flags |= MASK_SWAP_SET; /* Default: on. */
+ if ( !(opts_set->x_target_flags & MASK_DIVREM))
+ opts->x_target_flags |= MASK_DIVREM; /* Default: on. */
+ break;
+
+ case PROCESSOR_ARCEM:
+ if ( !(opts_set->x_target_flags & MASK_BARREL_SHIFTER))
+ opts->x_target_flags |= MASK_BARREL_SHIFTER; /* Default: on. */
+ if ( !(opts_set->x_target_flags & MASK_CODE_DENSITY))
+ opts->x_target_flags &= ~MASK_CODE_DENSITY; /* Default: off. */
+ if ( !(opts_set->x_target_flags & MASK_NORM_SET))
+ opts->x_target_flags &= ~MASK_NORM_SET; /* Default: off. */
+ if ( !(opts_set->x_target_flags & MASK_SWAP_SET))
+ opts->x_target_flags &= ~MASK_SWAP_SET; /* Default: off. */
+ if ( !(opts_set->x_target_flags & MASK_DIVREM))
+ opts->x_target_flags &= ~MASK_DIVREM; /* Default: off. */
+ break;
default:
gcc_unreachable ();
}
+ break;
+
+ case OPT_mmpy_option_:
+ if (value < 0 || value > 9)
+ error_at (loc, "bad value %qs for -mmpy-option switch", arg);
+ break;
}
return true;
diff --git a/gcc/config.gcc b/gcc/config.gcc
index 9cc765e2bc1..59aee2cfdcd 100644
--- a/gcc/config.gcc
+++ b/gcc/config.gcc
@@ -439,7 +439,7 @@ powerpc*-*-*)
cpu_type=rs6000
extra_headers="ppc-asm.h altivec.h spe.h ppu_intrinsics.h paired.h spu2vmx.h vec_types.h si2vmx.h htmintrin.h htmxlintrin.h"
case x$with_cpu in
- xpowerpc64|xdefault64|x6[23]0|x970|xG5|xpower[345678]|xpower6x|xrs64a|xcell|xa2|xe500mc64|xe5500|xe6500)
+ xpowerpc64|xdefault64|x6[23]0|x970|xG5|xpower[3456789]|xpower6x|xrs64a|xcell|xa2|xe500mc64|xe5500|xe6500)
cpu_is_64bit=yes
;;
esac
@@ -4131,7 +4131,7 @@ case "${target}" in
eval "with_$which=405"
;;
"" | common | native \
- | power | power[2345678] | power6x | powerpc | powerpc64 \
+ | power | power[23456789] | power6x | powerpc | powerpc64 \
| rios | rios1 | rios2 | rsc | rsc1 | rs64a \
| 401 | 403 | 405 | 405fp | 440 | 440fp | 464 | 464fp \
| 476 | 476fp | 505 | 601 | 602 | 603 | 603e | ec603e \
diff --git a/gcc/config/aarch64/aarch64-cores.def b/gcc/config/aarch64/aarch64-cores.def
index 0ab1ca839e2..4af70ca613c 100644
--- a/gcc/config/aarch64/aarch64-cores.def
+++ b/gcc/config/aarch64/aarch64-cores.def
@@ -44,6 +44,7 @@ AARCH64_CORE("cortex-a53", cortexa53, cortexa53, 8A, AARCH64_FL_FOR_ARCH8 | AA
AARCH64_CORE("cortex-a57", cortexa57, cortexa57, 8A, AARCH64_FL_FOR_ARCH8 | AARCH64_FL_CRC, cortexa57, "0x41", "0xd07")
AARCH64_CORE("cortex-a72", cortexa72, cortexa57, 8A, AARCH64_FL_FOR_ARCH8 | AARCH64_FL_CRC, cortexa72, "0x41", "0xd08")
AARCH64_CORE("exynos-m1", exynosm1, cortexa57, 8A, AARCH64_FL_FOR_ARCH8 | AARCH64_FL_CRC | AARCH64_FL_CRYPTO, cortexa72, "0x53", "0x001")
+AARCH64_CORE("qdf24xx", qdf24xx, cortexa57, 8A, AARCH64_FL_FOR_ARCH8 | AARCH64_FL_CRC | AARCH64_FL_CRYPTO, cortexa57, "0x51", "0x800")
AARCH64_CORE("thunderx", thunderx, thunderx, 8A, AARCH64_FL_FOR_ARCH8 | AARCH64_FL_CRC | AARCH64_FL_CRYPTO, thunderx, "0x43", "0x0a1")
AARCH64_CORE("xgene1", xgene1, xgene1, 8A, AARCH64_FL_FOR_ARCH8, xgene1, "0x50", "0x000")
diff --git a/gcc/config/aarch64/aarch64-protos.h b/gcc/config/aarch64/aarch64-protos.h
index 7c74f585fb8..9000d67a9d1 100644
--- a/gcc/config/aarch64/aarch64-protos.h
+++ b/gcc/config/aarch64/aarch64-protos.h
@@ -195,6 +195,10 @@ struct tune_params
int vec_reassoc_width;
int min_div_recip_mul_sf;
int min_div_recip_mul_df;
+ /* Value for aarch64_case_values_threshold; or 0 for the default. */
+ unsigned int max_case_values;
+ /* Value for PARAM_L1_CACHE_LINE_SIZE; or 0 to use the default. */
+ unsigned int cache_line_size;
/* An enum specifying how to take into account CPU autoprefetch capabilities
during instruction scheduling:
diff --git a/gcc/config/aarch64/aarch64-tune.md b/gcc/config/aarch64/aarch64-tune.md
index 7d063e45e7d..c65a12420ad 100644
--- a/gcc/config/aarch64/aarch64-tune.md
+++ b/gcc/config/aarch64/aarch64-tune.md
@@ -1,5 +1,5 @@
;; -*- buffer-read-only: t -*-
;; Generated automatically by gentune.sh from aarch64-cores.def
(define_attr "tune"
- "cortexa53,cortexa57,cortexa72,exynosm1,thunderx,xgene1,cortexa57cortexa53,cortexa72cortexa53"
+ "cortexa53,cortexa57,cortexa72,exynosm1,qdf24xx,thunderx,xgene1,cortexa57cortexa53,cortexa72cortexa53"
(const (symbol_ref "((enum attr_tune) aarch64_tune)")))
diff --git a/gcc/config/aarch64/aarch64.c b/gcc/config/aarch64/aarch64.c
index 7d6dfc342b8..5ec7f08ca96 100644
--- a/gcc/config/aarch64/aarch64.c
+++ b/gcc/config/aarch64/aarch64.c
@@ -356,6 +356,8 @@ static const struct tune_params generic_tunings =
1, /* vec_reassoc_width. */
2, /* min_div_recip_mul_sf. */
2, /* min_div_recip_mul_df. */
+ 0, /* max_case_values. */
+ 0, /* cache_line_size. */
tune_params::AUTOPREFETCHER_OFF, /* autoprefetcher_model. */
(AARCH64_EXTRA_TUNE_NONE) /* tune_flags. */
};
@@ -379,6 +381,8 @@ static const struct tune_params cortexa53_tunings =
1, /* vec_reassoc_width. */
2, /* min_div_recip_mul_sf. */
2, /* min_div_recip_mul_df. */
+ 0, /* max_case_values. */
+ 0, /* cache_line_size. */
tune_params::AUTOPREFETCHER_WEAK, /* autoprefetcher_model. */
(AARCH64_EXTRA_TUNE_NONE) /* tune_flags. */
};
@@ -402,6 +406,8 @@ static const struct tune_params cortexa57_tunings =
1, /* vec_reassoc_width. */
2, /* min_div_recip_mul_sf. */
2, /* min_div_recip_mul_df. */
+ 0, /* max_case_values. */
+ 0, /* cache_line_size. */
tune_params::AUTOPREFETCHER_WEAK, /* autoprefetcher_model. */
(AARCH64_EXTRA_TUNE_RENAME_FMA_REGS
| AARCH64_EXTRA_TUNE_RECIP_SQRT) /* tune_flags. */
@@ -426,6 +432,8 @@ static const struct tune_params cortexa72_tunings =
1, /* vec_reassoc_width. */
2, /* min_div_recip_mul_sf. */
2, /* min_div_recip_mul_df. */
+ 0, /* max_case_values. */
+ 0, /* cache_line_size. */
tune_params::AUTOPREFETCHER_OFF, /* autoprefetcher_model. */
(AARCH64_EXTRA_TUNE_NONE) /* tune_flags. */
};
@@ -448,6 +456,8 @@ static const struct tune_params thunderx_tunings =
1, /* vec_reassoc_width. */
2, /* min_div_recip_mul_sf. */
2, /* min_div_recip_mul_df. */
+ 0, /* max_case_values. */
+ 0, /* cache_line_size. */
tune_params::AUTOPREFETCHER_OFF, /* autoprefetcher_model. */
(AARCH64_EXTRA_TUNE_NONE) /* tune_flags. */
};
@@ -470,6 +480,8 @@ static const struct tune_params xgene1_tunings =
1, /* vec_reassoc_width. */
2, /* min_div_recip_mul_sf. */
2, /* min_div_recip_mul_df. */
+ 0, /* max_case_values. */
+ 0, /* cache_line_size. */
tune_params::AUTOPREFETCHER_OFF, /* autoprefetcher_model. */
(AARCH64_EXTRA_TUNE_RECIP_SQRT) /* tune_flags. */
};
@@ -3240,6 +3252,20 @@ aarch64_cannot_force_const_mem (machine_mode mode ATTRIBUTE_UNUSED, rtx x)
return aarch64_tls_referenced_p (x);
}
+/* Implement TARGET_CASE_VALUES_THRESHOLD. */
+
+static unsigned int
+aarch64_case_values_threshold (void)
+{
+ /* Use the specified limit for the number of cases before using jump
+ tables at higher optimization levels. */
+ if (optimize > 2
+ && selected_cpu->tune->max_case_values != 0)
+ return selected_cpu->tune->max_case_values;
+ else
+ return default_case_values_threshold ();
+}
+
/* Return true if register REGNO is a valid index register.
STRICT_P is true if REG_OK_STRICT is in effect. */
@@ -7782,6 +7808,13 @@ aarch64_override_options_internal (struct gcc_options *opts)
opts->x_param_values,
global_options_set.x_param_values);
+ /* Set the L1 cache line size. */
+ if (selected_cpu->tune->cache_line_size != 0)
+ maybe_set_param_value (PARAM_L1_CACHE_LINE_SIZE,
+ selected_cpu->tune->cache_line_size,
+ opts->x_param_values,
+ global_options_set.x_param_values);
+
aarch64_override_options_after_change_1 (opts);
}
@@ -13526,6 +13559,9 @@ aarch64_promoted_type (const_tree t)
#undef TARGET_CANNOT_FORCE_CONST_MEM
#define TARGET_CANNOT_FORCE_CONST_MEM aarch64_cannot_force_const_mem
+#undef TARGET_CASE_VALUES_THRESHOLD
+#define TARGET_CASE_VALUES_THRESHOLD aarch64_case_values_threshold
+
#undef TARGET_CONDITIONAL_REGISTER_USAGE
#define TARGET_CONDITIONAL_REGISTER_USAGE aarch64_conditional_register_usage
diff --git a/gcc/config/alpha/alpha-protos.h b/gcc/config/alpha/alpha-protos.h
index 25a91da55d3..cec8329225b 100644
--- a/gcc/config/alpha/alpha-protos.h
+++ b/gcc/config/alpha/alpha-protos.h
@@ -65,12 +65,9 @@ extern void alpha_expand_builtin_revert_vms_condition_handler (rtx);
extern rtx alpha_return_addr (int, rtx);
extern rtx alpha_gp_save_rtx (void);
-extern void print_operand (FILE *, rtx, int);
-extern void print_operand_address (FILE *, rtx);
extern void alpha_initialize_trampoline (rtx, rtx, rtx, int, int, int);
extern rtx alpha_va_arg (tree, tree);
-extern rtx function_value (const_tree, const_tree, machine_mode);
extern void alpha_start_function (FILE *, const char *, tree);
extern void alpha_end_function (FILE *, const char *, tree);
diff --git a/gcc/config/alpha/alpha.c b/gcc/config/alpha/alpha.c
index f2ad9d07cb3..4cfae822905 100644
--- a/gcc/config/alpha/alpha.c
+++ b/gcc/config/alpha/alpha.c
@@ -95,7 +95,7 @@ static int inside_function = FALSE;
/* The number of cycles of latency we should assume on memory reads. */
-int alpha_memory_latency = 3;
+static int alpha_memory_latency = 3;
/* Whether the function needs the GP. */
@@ -1339,6 +1339,36 @@ alpha_legitimize_reload_address (rtx x,
return NULL_RTX;
}
+/* Return the cost of moving between registers of various classes. Moving
+ between FLOAT_REGS and anything else except float regs is expensive.
+ In fact, we make it quite expensive because we really don't want to
+ do these moves unless it is clearly worth it. Optimizations may
+ reduce the impact of not being able to allocate a pseudo to a
+ hard register. */
+
+static int
+alpha_register_move_cost (machine_mode /*mode*/,
+ reg_class_t from, reg_class_t to)
+{
+ if ((from == FLOAT_REGS) == (to == FLOAT_REGS))
+ return 2;
+
+ if (TARGET_FIX)
+ return (from == FLOAT_REGS) ? 6 : 8;
+
+ return 4 + 2 * alpha_memory_latency;
+}
+
+/* Return the cost of moving data of MODE from a register to
+ or from memory. On the Alpha, bump this up a bit. */
+
+static int
+alpha_memory_move_cost (machine_mode /*mode*/, reg_class_t /*regclass*/,
+ bool /*in*/)
+{
+ return 2 * alpha_memory_latency;
+}
+
/* Compute a (partial) cost for rtx X. Return true if the complete
cost has been computed, and false if subexpressions should be
scanned. In either case, *TOTAL contains the cost result. */
@@ -5041,10 +5071,20 @@ get_round_mode_suffix (void)
gcc_unreachable ();
}
-/* Print an operand. Recognize special options, documented below. */
+/* Implement TARGET_PRINT_OPERAND_PUNCT_VALID_P. */
-void
-print_operand (FILE *file, rtx x, int code)
+static bool
+alpha_print_operand_punct_valid_p (unsigned char code)
+{
+ return (code == '/' || code == ',' || code == '-' || code == '~'
+ || code == '#' || code == '*' || code == '&');
+}
+
+/* Implement TARGET_PRINT_OPERAND. The alpha-specific
+ operand codes are documented below. */
+
+static void
+alpha_print_operand (FILE *file, rtx x, int code)
{
int i;
@@ -5064,6 +5104,8 @@ print_operand (FILE *file, rtx x, int code)
break;
case '/':
+ /* Generates the instruction suffix. The TRAP_SUFFIX and ROUND_SUFFIX
+ attributes are examined to determine what is appropriate. */
{
const char *trap = get_trap_mode_suffix ();
const char *round = get_round_mode_suffix ();
@@ -5074,12 +5116,14 @@ print_operand (FILE *file, rtx x, int code)
}
case ',':
- /* Generates single precision instruction suffix. */
+ /* Generates single precision suffix for floating point
+ instructions (s for IEEE, f for VAX). */
fputc ((TARGET_FLOAT_VAX ? 'f' : 's'), file);
break;
case '-':
- /* Generates double precision instruction suffix. */
+ /* Generates double precision suffix for floating point
+ instructions (t for IEEE, g for VAX). */
fputc ((TARGET_FLOAT_VAX ? 'g' : 't'), file);
break;
@@ -5350,8 +5394,10 @@ print_operand (FILE *file, rtx x, int code)
}
}
-void
-print_operand_address (FILE *file, rtx addr)
+/* Implement TARGET_PRINT_OPERAND_ADDRESS. */
+
+static void
+alpha_print_operand_address (FILE *file, machine_mode /*mode*/, rtx addr)
{
int basereg = 31;
HOST_WIDE_INT offset = 0;
@@ -5720,9 +5766,9 @@ alpha_pass_by_reference (cumulative_args_t ca ATTRIBUTE_UNUSED,
On Alpha the value is found in $0 for integer functions and
$f0 for floating-point functions. */
-rtx
-function_value (const_tree valtype, const_tree func ATTRIBUTE_UNUSED,
- machine_mode mode)
+static rtx
+alpha_function_value_1 (const_tree valtype, const_tree func ATTRIBUTE_UNUSED,
+ machine_mode mode)
{
unsigned int regnum, dummy ATTRIBUTE_UNUSED;
enum mode_class mclass;
@@ -5777,6 +5823,33 @@ function_value (const_tree valtype, const_tree func ATTRIBUTE_UNUSED,
return gen_rtx_REG (mode, regnum);
}
+/* Implement TARGET_FUNCTION_VALUE. */
+
+static rtx
+alpha_function_value (const_tree valtype, const_tree fn_decl_or_type,
+ bool /*outgoing*/)
+{
+ return alpha_function_value_1 (valtype, fn_decl_or_type, VOIDmode);
+}
+
+/* Implement TARGET_LIBCALL_VALUE. */
+
+static rtx
+alpha_libcall_value (machine_mode mode, const_rtx /*fun*/)
+{
+ return alpha_function_value_1 (NULL_TREE, NULL_TREE, mode);
+}
+
+/* Implement TARGET_FUNCTION_VALUE_REGNO_P.
+
+ On the Alpha, $0 $1 and $f0 $f1 are the only register thus used. */
+
+static bool
+alpha_function_value_regno_p (const unsigned int regno)
+{
+ return (regno == 0 || regno == 1 || regno == 32 || regno == 33);
+}
+
/* TCmode complex values are passed by invisible reference. We
should not split these values. */
@@ -9877,6 +9950,13 @@ alpha_atomic_assign_expand_fenv (tree *hold, tree *clear, tree *update)
#define TARGET_STDARG_OPTIMIZE_HOOK alpha_stdarg_optimize_hook
#endif
+#undef TARGET_PRINT_OPERAND
+#define TARGET_PRINT_OPERAND alpha_print_operand
+#undef TARGET_PRINT_OPERAND_ADDRESS
+#define TARGET_PRINT_OPERAND_ADDRESS alpha_print_operand_address
+#undef TARGET_PRINT_OPERAND_PUNCT_VALID_P
+#define TARGET_PRINT_OPERAND_PUNCT_VALID_P alpha_print_operand_punct_valid_p
+
/* Use 16-bits anchor. */
#undef TARGET_MIN_ANCHOR_OFFSET
#define TARGET_MIN_ANCHOR_OFFSET -0x7fff - 1
@@ -9885,6 +9965,10 @@ alpha_atomic_assign_expand_fenv (tree *hold, tree *clear, tree *update)
#undef TARGET_USE_BLOCKS_FOR_CONSTANT_P
#define TARGET_USE_BLOCKS_FOR_CONSTANT_P hook_bool_mode_const_rtx_true
+#undef TARGET_REGISTER_MOVE_COST
+#define TARGET_REGISTER_MOVE_COST alpha_register_move_cost
+#undef TARGET_MEMORY_MOVE_COST
+#define TARGET_MEMORY_MOVE_COST alpha_memory_move_cost
#undef TARGET_RTX_COSTS
#define TARGET_RTX_COSTS alpha_rtx_costs
#undef TARGET_ADDRESS_COST
@@ -9897,6 +9981,13 @@ alpha_atomic_assign_expand_fenv (tree *hold, tree *clear, tree *update)
#define TARGET_PROMOTE_FUNCTION_MODE default_promote_function_mode_always_promote
#undef TARGET_PROMOTE_PROTOTYPES
#define TARGET_PROMOTE_PROTOTYPES hook_bool_const_tree_false
+
+#undef TARGET_FUNCTION_VALUE
+#define TARGET_FUNCTION_VALUE alpha_function_value
+#undef TARGET_LIBCALL_VALUE
+#define TARGET_LIBCALL_VALUE alpha_libcall_value
+#undef TARGET_FUNCTION_VALUE_REGNO_P
+#define TARGET_FUNCTION_VALUE_REGNO_P alpha_function_value_regno_p
#undef TARGET_RETURN_IN_MEMORY
#define TARGET_RETURN_IN_MEMORY alpha_return_in_memory
#undef TARGET_PASS_BY_REFERENCE
diff --git a/gcc/config/alpha/alpha.h b/gcc/config/alpha/alpha.h
index 97f5680a8c2..5a198f79a2e 100644
--- a/gcc/config/alpha/alpha.h
+++ b/gcc/config/alpha/alpha.h
@@ -537,26 +537,6 @@ enum reg_class {
(GET_MODE_SIZE (FROM) != GET_MODE_SIZE (TO) \
? reg_classes_intersect_p (FLOAT_REGS, CLASS) : 0)
-/* Define the cost of moving between registers of various classes. Moving
- between FLOAT_REGS and anything else except float regs is expensive.
- In fact, we make it quite expensive because we really don't want to
- do these moves unless it is clearly worth it. Optimizations may
- reduce the impact of not being able to allocate a pseudo to a
- hard register. */
-
-#define REGISTER_MOVE_COST(MODE, CLASS1, CLASS2) \
- (((CLASS1) == FLOAT_REGS) == ((CLASS2) == FLOAT_REGS) ? 2 \
- : TARGET_FIX ? ((CLASS1) == FLOAT_REGS ? 6 : 8) \
- : 4+2*alpha_memory_latency)
-
-/* A C expressions returning the cost of moving data of MODE from a register to
- or from memory.
-
- On the Alpha, bump this up a bit. */
-
-extern int alpha_memory_latency;
-#define MEMORY_MOVE_COST(MODE,CLASS,IN) (2*alpha_memory_latency)
-
/* Provide the cost of a branch. Exact meaning under development. */
#define BRANCH_COST(speed_p, predictable_p) 5
@@ -626,29 +606,6 @@ extern int alpha_memory_latency;
in a register. */
/* #define REG_PARM_STACK_SPACE */
-/* Define how to find the value returned by a function.
- VALTYPE is the data type of the value (as a tree).
- If the precise function being called is known, FUNC is its FUNCTION_DECL;
- otherwise, FUNC is 0.
-
- On Alpha the value is found in $0 for integer functions and
- $f0 for floating-point functions. */
-
-#define FUNCTION_VALUE(VALTYPE, FUNC) \
- function_value (VALTYPE, FUNC, VOIDmode)
-
-/* Define how to find the value returned by a library function
- assuming the value has mode MODE. */
-
-#define LIBCALL_VALUE(MODE) \
- function_value (NULL, NULL, MODE)
-
-/* 1 if N is a possible register number for a function value
- as seen by the caller. */
-
-#define FUNCTION_VALUE_REGNO_P(N) \
- ((N) == 0 || (N) == 1 || (N) == 32 || (N) == 33)
-
/* 1 if N is a possible register number for function argument passing.
On Alpha, these are $16-$21 and $f16-$f21. */
@@ -1005,37 +962,6 @@ do { \
#define ASM_OUTPUT_ADDR_DIFF_ELT(FILE, BODY, VALUE, REL) \
fprintf (FILE, "\t.gprel32 $L%d\n", (VALUE))
-
-/* Print operand X (an rtx) in assembler syntax to file FILE.
- CODE is a letter or dot (`z' in `%z0') or 0 if no letter was specified.
- For `%' followed by punctuation, CODE is the punctuation and X is null. */
-
-#define PRINT_OPERAND(FILE, X, CODE) print_operand (FILE, X, CODE)
-
-/* Determine which codes are valid without a following integer. These must
- not be alphabetic.
-
- ~ Generates the name of the current function.
-
- / Generates the instruction suffix. The TRAP_SUFFIX and ROUND_SUFFIX
- attributes are examined to determine what is appropriate.
-
- , Generates single precision suffix for floating point
- instructions (s for IEEE, f for VAX)
-
- - Generates double precision suffix for floating point
- instructions (t for IEEE, g for VAX)
- */
-
-#define PRINT_OPERAND_PUNCT_VALID_P(CODE) \
- ((CODE) == '/' || (CODE) == ',' || (CODE) == '-' || (CODE) == '~' \
- || (CODE) == '#' || (CODE) == '*' || (CODE) == '&')
-
-/* Print a memory address as an operand to reference that memory location. */
-
-#define PRINT_OPERAND_ADDRESS(FILE, ADDR) \
- print_operand_address((FILE), (ADDR))
-
/* If we use NM, pass -g to it so it only lists globals. */
#define NM_FLAGS "-pg"
diff --git a/gcc/config/arc/arc-opts.h b/gcc/config/arc/arc-opts.h
index cca1f035636..a33f4b77521 100644
--- a/gcc/config/arc/arc-opts.h
+++ b/gcc/config/arc/arc-opts.h
@@ -23,5 +23,7 @@ enum processor_type
PROCESSOR_NONE,
PROCESSOR_ARC600,
PROCESSOR_ARC601,
- PROCESSOR_ARC700
+ PROCESSOR_ARC700,
+ PROCESSOR_ARCEM,
+ PROCESSOR_ARCHS
};
diff --git a/gcc/config/arc/arc-protos.h b/gcc/config/arc/arc-protos.h
index ff82ecf63dd..6e04351159b 100644
--- a/gcc/config/arc/arc-protos.h
+++ b/gcc/config/arc/arc-protos.h
@@ -118,3 +118,4 @@ extern bool arc_epilogue_uses (int regno);
extern int regno_clobbered_p (unsigned int, rtx_insn *, machine_mode, int);
extern int arc_return_slot_offset (void);
extern bool arc_legitimize_reload_address (rtx *, machine_mode, int, int);
+extern void arc_secondary_reload_conv (rtx, rtx, rtx, bool);
diff --git a/gcc/config/arc/arc.c b/gcc/config/arc/arc.c
index 01261bc702a..8bb0969f176 100644
--- a/gcc/config/arc/arc.c
+++ b/gcc/config/arc/arc.c
@@ -590,10 +590,26 @@ arc_sched_adjust_priority (rtx_insn *insn, int priority)
return priority;
}
+/* For ARC base register + offset addressing, the validity of the
+ address is mode-dependent for most of the offset range, as the
+ offset can be scaled by the access size.
+ We don't expose these as mode-dependent addresses in the
+ mode_dependent_address_p target hook, because that would disable
+ lots of optimizations, and most uses of these addresses are for 32
+ or 64 bit accesses anyways, which are fine.
+ However, that leaves some addresses for 8 / 16 bit values not
+ properly reloaded by the generic code, which is why we have to
+ schedule secondary reloads for these. */
+
static reg_class_t
-arc_secondary_reload (bool in_p, rtx x, reg_class_t cl, machine_mode,
- secondary_reload_info *)
+arc_secondary_reload (bool in_p,
+ rtx x,
+ reg_class_t cl,
+ machine_mode mode,
+ secondary_reload_info *sri)
{
+ enum rtx_code code = GET_CODE (x);
+
if (cl == DOUBLE_REGS)
return GENERAL_REGS;
@@ -601,9 +617,86 @@ arc_secondary_reload (bool in_p, rtx x, reg_class_t cl, machine_mode,
if ((cl == LPCOUNT_REG || cl == WRITABLE_CORE_REGS)
&& in_p && MEM_P (x))
return GENERAL_REGS;
+
+ /* If we have a subreg (reg), where reg is a pseudo (that will end in
+ a memory location), then we may need a scratch register to handle
+ the fp/sp+largeoffset address. */
+ if (code == SUBREG)
+ {
+ rtx addr = NULL_RTX;
+ x = SUBREG_REG (x);
+
+ if (REG_P (x))
+ {
+ int regno = REGNO (x);
+ if (regno >= FIRST_PSEUDO_REGISTER)
+ regno = reg_renumber[regno];
+
+ if (regno != -1)
+ return NO_REGS;
+
+ /* It is a pseudo that ends in a stack location. */
+ if (reg_equiv_mem (REGNO (x)))
+ {
+ /* Get the equivalent address and check the range of the
+ offset. */
+ rtx mem = reg_equiv_mem (REGNO (x));
+ addr = find_replacement (&XEXP (mem, 0));
+ }
+ }
+ else
+ {
+ gcc_assert (MEM_P (x));
+ addr = XEXP (x, 0);
+ addr = simplify_rtx (addr);
+ }
+ if (addr && GET_CODE (addr) == PLUS
+ && CONST_INT_P (XEXP (addr, 1))
+ && (!RTX_OK_FOR_OFFSET_P (mode, XEXP (addr, 1))))
+ {
+ switch (mode)
+ {
+ case QImode:
+ sri->icode =
+ in_p ? CODE_FOR_reload_qi_load : CODE_FOR_reload_qi_store;
+ break;
+ case HImode:
+ sri->icode =
+ in_p ? CODE_FOR_reload_hi_load : CODE_FOR_reload_hi_store;
+ break;
+ default:
+ break;
+ }
+ }
+ }
return NO_REGS;
}
+/* Convert reloads using offsets that are too large to use indirect
+ addressing. */
+
+void
+arc_secondary_reload_conv (rtx reg, rtx mem, rtx scratch, bool store_p)
+{
+ rtx addr;
+
+ gcc_assert (GET_CODE (mem) == MEM);
+ addr = XEXP (mem, 0);
+
+ /* Large offset: use a move. FIXME: ld ops accepts limms as
+ offsets. Hence, the following move insn is not required. */
+ emit_move_insn (scratch, addr);
+ mem = replace_equiv_address_nv (mem, scratch);
+
+ /* Now create the move. */
+ if (store_p)
+ emit_insn (gen_rtx_SET (mem, reg));
+ else
+ emit_insn (gen_rtx_SET (reg, mem));
+
+ return;
+}
+
static unsigned arc_ifcvt (void);
namespace {
@@ -687,23 +780,35 @@ arc_init (void)
{
enum attr_tune tune_dflt = TUNE_NONE;
- if (TARGET_ARC600)
+ switch (arc_cpu)
{
+ case PROCESSOR_ARC600:
arc_cpu_string = "ARC600";
tune_dflt = TUNE_ARC600;
- }
- else if (TARGET_ARC601)
- {
+ break;
+
+ case PROCESSOR_ARC601:
arc_cpu_string = "ARC601";
tune_dflt = TUNE_ARC600;
- }
- else if (TARGET_ARC700)
- {
+ break;
+
+ case PROCESSOR_ARC700:
arc_cpu_string = "ARC700";
tune_dflt = TUNE_ARC700_4_2_STD;
+ break;
+
+ case PROCESSOR_ARCEM:
+ arc_cpu_string = "EM";
+ break;
+
+ case PROCESSOR_ARCHS:
+ arc_cpu_string = "HS";
+ break;
+
+ default:
+ gcc_unreachable ();
}
- else
- gcc_unreachable ();
+
if (arc_tune == TUNE_NONE)
arc_tune = tune_dflt;
/* Note: arc_multcost is only used in rtx_cost if speed is true. */
@@ -737,15 +842,15 @@ arc_init (void)
}
/* Support mul64 generation only for ARC600. */
- if (TARGET_MUL64_SET && TARGET_ARC700)
- error ("-mmul64 not supported for ARC700");
+ if (TARGET_MUL64_SET && (!TARGET_ARC600_FAMILY))
+ error ("-mmul64 not supported for ARC700 or ARCv2");
- /* MPY instructions valid only for ARC700. */
- if (TARGET_NOMPY_SET && !TARGET_ARC700)
- error ("-mno-mpy supported only for ARC700");
+ /* MPY instructions valid only for ARC700 or ARCv2. */
+ if (TARGET_NOMPY_SET && TARGET_ARC600_FAMILY)
+ error ("-mno-mpy supported only for ARC700 or ARCv2");
/* mul/mac instructions only for ARC600. */
- if (TARGET_MULMAC_32BY16_SET && !(TARGET_ARC600 || TARGET_ARC601))
+ if (TARGET_MULMAC_32BY16_SET && (!TARGET_ARC600_FAMILY))
error ("-mmul32x16 supported only for ARC600 or ARC601");
if (!TARGET_DPFP && TARGET_DPFP_DISABLE_LRSR)
@@ -757,18 +862,25 @@ arc_init (void)
error ("FPX fast and compact options cannot be specified together");
/* FPX-2. No fast-spfp for arc600 or arc601. */
- if (TARGET_SPFP_FAST_SET && (TARGET_ARC600 || TARGET_ARC601))
+ if (TARGET_SPFP_FAST_SET && TARGET_ARC600_FAMILY)
error ("-mspfp_fast not available on ARC600 or ARC601");
/* FPX-3. No FPX extensions on pre-ARC600 cores. */
if ((TARGET_DPFP || TARGET_SPFP)
- && !(TARGET_ARC600 || TARGET_ARC601 || TARGET_ARC700))
+ && !TARGET_ARCOMPACT_FAMILY)
error ("FPX extensions not available on pre-ARC600 cores");
+ /* Only selected multiplier configurations are available for HS. */
+ if (TARGET_HS && ((arc_mpy_option > 2 && arc_mpy_option < 7)
+ || (arc_mpy_option == 1)))
+ error ("This multiplier configuration is not available for HS cores");
+
/* Warn for unimplemented PIC in pre-ARC700 cores, and disable flag_pic. */
- if (flag_pic && !TARGET_ARC700)
+ if (flag_pic && TARGET_ARC600_FAMILY)
{
- warning (DK_WARNING, "PIC is not supported for %s. Generating non-PIC code only..", arc_cpu_string);
+ warning (DK_WARNING,
+ "PIC is not supported for %s. Generating non-PIC code only..",
+ arc_cpu_string);
flag_pic = 0;
}
@@ -782,6 +894,8 @@ arc_init (void)
arc_punct_chars['!'] = 1;
arc_punct_chars['^'] = 1;
arc_punct_chars['&'] = 1;
+ arc_punct_chars['+'] = 1;
+ arc_punct_chars['_'] = 1;
if (optimize > 1 && !TARGET_NO_COND_EXEC)
{
@@ -825,7 +939,7 @@ arc_override_options (void)
if (flag_no_common == 255)
flag_no_common = !TARGET_NO_SDATA_SET;
- /* TARGET_COMPACT_CASESI needs the "q" register class. */ \
+ /* TARGET_COMPACT_CASESI needs the "q" register class. */
if (TARGET_MIXED_CODE)
TARGET_Q_CLASS = 1;
if (!TARGET_Q_CLASS)
@@ -1198,6 +1312,8 @@ arc_init_reg_tables (void)
char rname57[5] = "r57";
char rname58[5] = "r58";
char rname59[5] = "r59";
+ char rname29[7] = "ilink1";
+ char rname30[7] = "ilink2";
static void
arc_conditional_register_usage (void)
@@ -1206,6 +1322,14 @@ arc_conditional_register_usage (void)
int i;
int fix_start = 60, fix_end = 55;
+ if (TARGET_V2)
+ {
+ /* For ARCv2 the core register set is changed. */
+ strcpy (rname29, "ilink");
+ strcpy (rname30, "r30");
+ fixed_regs[30] = call_used_regs[30] = 1;
+ }
+
if (TARGET_MUL64_SET)
{
fix_start = 57;
@@ -1271,7 +1395,7 @@ arc_conditional_register_usage (void)
machine_dependent_reorg. */
if (TARGET_ARC600)
CLEAR_HARD_REG_BIT (reg_class_contents[SIBCALL_REGS], LP_COUNT);
- else if (!TARGET_ARC700)
+ else if (!TARGET_LP_WR_INTERLOCK)
fixed_regs[LP_COUNT] = 1;
for (regno = 0; regno < FIRST_PSEUDO_REGISTER; regno++)
if (!call_used_regs[regno])
@@ -1279,7 +1403,7 @@ arc_conditional_register_usage (void)
for (regno = 32; regno < 60; regno++)
if (!fixed_regs[regno])
SET_HARD_REG_BIT (reg_class_contents[WRITABLE_CORE_REGS], regno);
- if (TARGET_ARC700)
+ if (!TARGET_ARC600_FAMILY)
{
for (regno = 32; regno <= 60; regno++)
CLEAR_HARD_REG_BIT (reg_class_contents[CHEAP_CORE_REGS], regno);
@@ -1313,7 +1437,7 @@ arc_conditional_register_usage (void)
= (fixed_regs[i]
? (TEST_HARD_REG_BIT (reg_class_contents[CHEAP_CORE_REGS], i)
? CHEAP_CORE_REGS : ALL_CORE_REGS)
- : ((TARGET_ARC700
+ : (((!TARGET_ARC600_FAMILY)
&& TEST_HARD_REG_BIT (reg_class_contents[CHEAP_CORE_REGS], i))
? CHEAP_CORE_REGS : WRITABLE_CORE_REGS));
else
@@ -1331,7 +1455,8 @@ arc_conditional_register_usage (void)
/* Handle Special Registers. */
arc_regno_reg_class[29] = LINK_REGS; /* ilink1 register. */
- arc_regno_reg_class[30] = LINK_REGS; /* ilink2 register. */
+ if (!TARGET_V2)
+ arc_regno_reg_class[30] = LINK_REGS; /* ilink2 register. */
arc_regno_reg_class[31] = LINK_REGS; /* blink register. */
arc_regno_reg_class[60] = LPCOUNT_REG;
arc_regno_reg_class[61] = NO_REGS; /* CC_REG: must be NO_REGS. */
@@ -1413,13 +1538,23 @@ arc_handle_interrupt_attribute (tree *, tree name, tree args, int,
*no_add_attrs = true;
}
else if (strcmp (TREE_STRING_POINTER (value), "ilink1")
- && strcmp (TREE_STRING_POINTER (value), "ilink2"))
+ && strcmp (TREE_STRING_POINTER (value), "ilink2")
+ && !TARGET_V2)
{
warning (OPT_Wattributes,
"argument of %qE attribute is not \"ilink1\" or \"ilink2\"",
name);
*no_add_attrs = true;
}
+ else if (TARGET_V2
+ && strcmp (TREE_STRING_POINTER (value), "ilink"))
+ {
+ warning (OPT_Wattributes,
+ "argument of %qE attribute is not \"ilink\"",
+ name);
+ *no_add_attrs = true;
+ }
+
return NULL_TREE;
}
@@ -1555,6 +1690,7 @@ gen_compare_reg (rtx comparison, machine_mode omode)
{
rtx op0 = gen_rtx_REG (cmode, 0);
rtx op1 = gen_rtx_REG (cmode, GET_MODE_SIZE (cmode) / UNITS_PER_WORD);
+ bool swap = false;
switch (code)
{
@@ -1563,15 +1699,19 @@ gen_compare_reg (rtx comparison, machine_mode omode)
break;
case LT: case UNGE: case LE: case UNGT:
code = swap_condition (code);
- tmp = x;
- x = y;
- y = tmp;
+ swap = true;
break;
default:
gcc_unreachable ();
}
if (currently_expanding_to_rtl)
{
+ if (swap)
+ {
+ tmp = x;
+ x = y;
+ y = tmp;
+ }
emit_move_insn (op0, x);
emit_move_insn (op1, y);
}
@@ -1579,6 +1719,11 @@ gen_compare_reg (rtx comparison, machine_mode omode)
{
gcc_assert (rtx_equal_p (op0, x));
gcc_assert (rtx_equal_p (op1, y));
+ if (swap)
+ {
+ op0 = y;
+ op1 = x;
+ }
}
emit_insn (gen_cmp_float (cc_reg, gen_rtx_COMPARE (mode, op0, op1)));
}
@@ -1931,7 +2076,8 @@ arc_compute_function_type (struct function *fun)
{
tree value = TREE_VALUE (args);
- if (!strcmp (TREE_STRING_POINTER (value), "ilink1"))
+ if (!strcmp (TREE_STRING_POINTER (value), "ilink1")
+ || !strcmp (TREE_STRING_POINTER (value), "ilink"))
fn_type = ARC_FUNCTION_ILINK1;
else if (!strcmp (TREE_STRING_POINTER (value), "ilink2"))
fn_type = ARC_FUNCTION_ILINK2;
@@ -3115,6 +3261,18 @@ arc_print_operand (FILE *file, rtx x, int code)
if (TARGET_ANNOTATE_ALIGN && cfun->machine->size_reason)
fprintf (file, "; unalign: %d", cfun->machine->unalign);
return;
+ case '+':
+ if (TARGET_V2)
+ fputs ("m", file);
+ else
+ fputs ("h", file);
+ return;
+ case '_':
+ if (TARGET_V2)
+ fputs ("h", file);
+ else
+ fputs ("w", file);
+ return;
default :
/* Unknown flag. */
output_operand_lossage ("invalid operand output code");
@@ -4224,7 +4382,7 @@ arc_rtx_costs (rtx x, machine_mode mode, int outer_code,
*total= arc_multcost;
/* We do not want synth_mult sequences when optimizing
for size. */
- else if (TARGET_MUL64_SET || (TARGET_ARC700 && !TARGET_NOMPY_SET))
+ else if (TARGET_MUL64_SET || TARGET_ARC700_MPY)
*total = COSTS_N_INSNS (1);
else
*total = COSTS_N_INSNS (2);
@@ -5639,7 +5797,7 @@ arc_return_in_memory (const_tree type, const_tree fntype ATTRIBUTE_UNUSED)
else
{
HOST_WIDE_INT size = int_size_in_bytes (type);
- return (size == -1 || size > 8);
+ return (size == -1 || size > (TARGET_V2 ? 16 : 8));
}
}
@@ -5737,6 +5895,26 @@ arc_invalid_within_doloop (const rtx_insn *insn)
return NULL;
}
+/* The same functionality as arc_hazard. It is called in machine
+ reorg before any other optimization. Hence, the NOP size is taken
+ into account when doing branch shortening. */
+
+static void
+workaround_arc_anomaly (void)
+{
+ rtx_insn *insn, *succ0;
+
+ /* For any architecture: call arc_hazard here. */
+ for (insn = get_insns (); insn; insn = NEXT_INSN (insn))
+ {
+ succ0 = next_real_insn (insn);
+ if (arc_hazard (insn, succ0))
+ {
+ emit_insn_before (gen_nopv (), succ0);
+ }
+ }
+}
+
static int arc_reorg_in_progress = 0;
/* ARC's machince specific reorg function. */
@@ -5750,6 +5928,8 @@ arc_reorg (void)
long offset;
int changed;
+ workaround_arc_anomaly ();
+
cfun->machine->arc_reorg_started = 1;
arc_reorg_in_progress = 1;
@@ -7758,6 +7938,109 @@ arc600_corereg_hazard (rtx_insn *pred, rtx_insn *succ)
return 0;
}
+/* Given a rtx, check if it is an assembly instruction or not. */
+
+static int
+arc_asm_insn_p (rtx x)
+{
+ int i, j;
+
+ if (x == 0)
+ return 0;
+
+ switch (GET_CODE (x))
+ {
+ case ASM_OPERANDS:
+ case ASM_INPUT:
+ return 1;
+
+ case SET:
+ return arc_asm_insn_p (SET_SRC (x));
+
+ case PARALLEL:
+ j = 0;
+ for (i = XVECLEN (x, 0) - 1; i >= 0; i--)
+ j += arc_asm_insn_p (XVECEXP (x, 0, i));
+ if ( j > 0)
+ return 1;
+ break;
+
+ default:
+ break;
+ }
+
+ return 0;
+}
+
+/* We might have a CALL to a non-returning function before a loop end.
+ ??? Although the manual says that's OK (the target is outside the
+ loop, and the loop counter unused there), the assembler barfs on
+ this for ARC600, so we must insert a nop before such a call too.
+ For ARC700, and ARCv2 is not allowed to have the last ZOL
+ instruction a jump to a location where lp_count is modified. */
+
+static bool
+arc_loop_hazard (rtx_insn *pred, rtx_insn *succ)
+{
+ rtx_insn *jump = NULL;
+ rtx_insn *label = NULL;
+ basic_block succ_bb;
+
+ if (recog_memoized (succ) != CODE_FOR_doloop_end_i)
+ return false;
+
+ /* Phase 1: ARC600 and ARCv2HS doesn't allow any control instruction
+ (i.e., jump/call) as the last instruction of a ZOL. */
+ if (TARGET_ARC600 || TARGET_HS)
+ if (JUMP_P (pred) || CALL_P (pred)
+ || arc_asm_insn_p (PATTERN (pred))
+ || GET_CODE (PATTERN (pred)) == SEQUENCE)
+ return true;
+
+ /* Phase 2: Any architecture, it is not allowed to have the last ZOL
+ instruction a jump to a location where lp_count is modified. */
+
+ /* Phase 2a: Dig for the jump instruction. */
+ if (JUMP_P (pred))
+ jump = pred;
+ else if (GET_CODE (PATTERN (pred)) == SEQUENCE
+ && JUMP_P (XVECEXP (PATTERN (pred), 0, 0)))
+ jump = as_a <rtx_insn *> XVECEXP (PATTERN (pred), 0, 0);
+ else
+ return false;
+
+ label = JUMP_LABEL_AS_INSN (jump);
+ if (!label)
+ return false;
+
+ /* Phase 2b: Make sure is not a millicode jump. */
+ if ((GET_CODE (PATTERN (jump)) == PARALLEL)
+ && (XVECEXP (PATTERN (jump), 0, 0) == ret_rtx))
+ return false;
+
+ /* Phase 2c: Make sure is not a simple_return. */
+ if ((GET_CODE (PATTERN (jump)) == SIMPLE_RETURN)
+ || (GET_CODE (label) == SIMPLE_RETURN))
+ return false;
+
+ /* Pahse 2d: Go to the target of the jump and check for aliveness of
+ LP_COUNT register. */
+ succ_bb = BLOCK_FOR_INSN (label);
+ if (!succ_bb)
+ {
+ gcc_assert (NEXT_INSN (label));
+ if (NOTE_INSN_BASIC_BLOCK_P (NEXT_INSN (label)))
+ succ_bb = NOTE_BASIC_BLOCK (NEXT_INSN (label));
+ else
+ succ_bb = BLOCK_FOR_INSN (NEXT_INSN (label));
+ }
+
+ if (succ_bb && REGNO_REG_SET_P (df_get_live_out (succ_bb), LP_COUNT))
+ return true;
+
+ return false;
+}
+
/* For ARC600:
A write to a core reg greater or equal to 32 must not be immediately
followed by a use. Anticipate the length requirement to insert a nop
@@ -7766,19 +8049,16 @@ arc600_corereg_hazard (rtx_insn *pred, rtx_insn *succ)
int
arc_hazard (rtx_insn *pred, rtx_insn *succ)
{
- if (!TARGET_ARC600)
- return 0;
if (!pred || !INSN_P (pred) || !succ || !INSN_P (succ))
return 0;
- /* We might have a CALL to a non-returning function before a loop end.
- ??? Although the manual says that's OK (the target is outside the loop,
- and the loop counter unused there), the assembler barfs on this, so we
- must instert a nop before such a call too. */
- if (recog_memoized (succ) == CODE_FOR_doloop_end_i
- && (JUMP_P (pred) || CALL_P (pred)
- || GET_CODE (PATTERN (pred)) == SEQUENCE))
+
+ if (arc_loop_hazard (pred, succ))
return 4;
- return arc600_corereg_hazard (pred, succ);
+
+ if (TARGET_ARC600)
+ return arc600_corereg_hazard (pred, succ);
+
+ return 0;
}
/* Return length adjustment for INSN. */
diff --git a/gcc/config/arc/arc.h b/gcc/config/arc/arc.h
index e8baf5b8d79..d312f9f14a7 100644
--- a/gcc/config/arc/arc.h
+++ b/gcc/config/arc/arc.h
@@ -80,6 +80,14 @@ along with GCC; see the file COPYING3. If not see
builtin_define ("__A7__"); \
builtin_define ("__ARC700__"); \
} \
+ else if (TARGET_EM) \
+ { \
+ builtin_define ("__EM__"); \
+ } \
+ else if (TARGET_HS) \
+ { \
+ builtin_define ("__HS__"); \
+ } \
if (TARGET_NORM) \
{ \
builtin_define ("__ARC_NORM__");\
@@ -143,6 +151,8 @@ along with GCC; see the file COPYING3. If not see
%{mcpu=ARC700|!mcpu=*:%{mlock}} \
%{mcpu=ARC700|!mcpu=*:%{mswape}} \
%{mcpu=ARC700|!mcpu=*:%{mrtsc}} \
+%{mcpu=ARCHS:-mHS} \
+%{mcpu=ARCEM:-mEM} \
"
#if DEFAULT_LIBC == LIBC_UCLIBC
@@ -246,12 +256,13 @@ along with GCC; see the file COPYING3. If not see
/* Non-zero means the cpu supports norm instruction. This flag is set by
default for A7, and only for pre A7 cores when -mnorm is given. */
-#define TARGET_NORM (TARGET_ARC700 || TARGET_NORM_SET)
+#define TARGET_NORM (TARGET_ARC700 || TARGET_NORM_SET || TARGET_HS)
/* Indicate if an optimized floating point emulation library is available. */
#define TARGET_OPTFPE \
(TARGET_ARC700 \
/* We need a barrel shifter and NORM. */ \
- || (TARGET_ARC600 && TARGET_NORM_SET))
+ || (TARGET_ARC600 && TARGET_NORM_SET) \
+ || TARGET_HS)
/* Non-zero means the cpu supports swap instruction. This flag is set by
default for A7, and only for pre A7 cores when -mswap is given. */
@@ -271,11 +282,15 @@ along with GCC; see the file COPYING3. If not see
/* For an anulled-true delay slot insn for a delayed branch, should we only
use conditional execution? */
-#define TARGET_AT_DBR_CONDEXEC (!TARGET_ARC700)
+#define TARGET_AT_DBR_CONDEXEC (!TARGET_ARC700 && !TARGET_V2)
#define TARGET_ARC600 (arc_cpu == PROCESSOR_ARC600)
#define TARGET_ARC601 (arc_cpu == PROCESSOR_ARC601)
#define TARGET_ARC700 (arc_cpu == PROCESSOR_ARC700)
+#define TARGET_EM (arc_cpu == PROCESSOR_ARCEM)
+#define TARGET_HS (arc_cpu == PROCESSOR_ARCHS)
+#define TARGET_V2 \
+ ((arc_cpu == PROCESSOR_ARCHS) || (arc_cpu == PROCESSOR_ARCEM))
/* Recast the cpu class to be the cpu attribute. */
#define arc_cpu_attr ((enum attr_cpu)arc_cpu)
@@ -744,6 +759,7 @@ extern enum reg_class arc_regno_reg_class[];
((unsigned) (((X) >> (SHIFT)) + 0x100) \
< 0x200 - ((unsigned) (OFFSET) >> (SHIFT)))
#define SIGNED_INT12(X) ((unsigned) ((X) + 0x800) < 0x1000)
+#define SIGNED_INT16(X) ((unsigned) ((X) + 0x8000) < 0x10000)
#define LARGE_INT(X) \
(((X) < 0) \
? (X) >= (-(HOST_WIDE_INT) 0x7fffffff - 1) \
@@ -1305,6 +1321,7 @@ do { \
#endif
#define SET_ASM_OP "\t.set\t"
+extern char rname29[], rname30[];
extern char rname56[], rname57[], rname58[], rname59[];
/* How to refer to registers in assembler output.
This sequence is indexed by compiler's hard-register-number (see above). */
@@ -1312,7 +1329,7 @@ extern char rname56[], rname57[], rname58[], rname59[];
{ "r0", "r1", "r2", "r3", "r4", "r5", "r6", "r7", \
"r8", "r9", "r10", "r11", "r12", "r13", "r14", "r15", \
"r16", "r17", "r18", "r19", "r20", "r21", "r22", "r23", \
- "r24", "r25", "gp", "fp", "sp", "ilink1", "ilink2", "blink", \
+ "r24", "r25", "gp", "fp", "sp", rname29, rname30, "blink", \
"r32", "r33", "r34", "r35", "r36", "r37", "r38", "r39", \
"d1", "d1", "d2", "d2", "r44", "r45", "r46", "r47", \
"r48", "r49", "r50", "r51", "r52", "r53", "r54", "r55", \
@@ -1678,4 +1695,25 @@ enum
#define SFUNC_CHECK_PREDICABLE \
(GET_CODE (PATTERN (insn)) != COND_EXEC || !flag_pic || !TARGET_MEDIUM_CALLS)
+/* MPYW feature macro. Only valid for ARCHS and ARCEM cores. */
+#define TARGET_MPYW ((arc_mpy_option > 0) && TARGET_V2)
+/* Full ARCv2 multiplication feature macro. */
+#define TARGET_MULTI ((arc_mpy_option > 1) && TARGET_V2)
+/* General MPY feature macro. */
+#define TARGET_MPY ((TARGET_ARC700 && (!TARGET_NOMPY_SET)) || TARGET_MULTI)
+/* ARC700 MPY feature macro. */
+#define TARGET_ARC700_MPY (TARGET_ARC700 && (!TARGET_NOMPY_SET))
+/* Any multiplication feature macro. */
+#define TARGET_ANY_MPY \
+ (TARGET_MPY || TARGET_MUL64_SET || TARGET_MULMAC_32BY16_SET)
+
+/* ARC600 and ARC601 feature macro. */
+#define TARGET_ARC600_FAMILY (TARGET_ARC600 || TARGET_ARC601)
+/* ARC600, ARC601 and ARC700 feature macro. */
+#define TARGET_ARCOMPACT_FAMILY \
+ (TARGET_ARC600 || TARGET_ARC601 || TARGET_ARC700)
+/* Loop count register can be read in very next instruction after has
+ been written to by an ordinary instruction. */
+#define TARGET_LP_WR_INTERLOCK (!TARGET_ARC600_FAMILY)
+
#endif /* GCC_ARC_H */
diff --git a/gcc/config/arc/arc.md b/gcc/config/arc/arc.md
index e1da4d70085..1d070a30d82 100644
--- a/gcc/config/arc/arc.md
+++ b/gcc/config/arc/arc.md
@@ -84,6 +84,8 @@
;; Include DFA scheduluers
(include ("arc600.md"))
(include ("arc700.md"))
+(include ("arcEM.md"))
+(include ("arcHS.md"))
;; Predicates
@@ -124,6 +126,7 @@
(VUNSPEC_SR 26) ; blockage insn for writing to an auxiliary register
(VUNSPEC_TRAP_S 27) ; blockage insn for trap_s generation
(VUNSPEC_UNIMP_S 28) ; blockage insn for unimp_s generation
+ (VUNSPEC_NOP 29) ; volatile NOP
(R0_REG 0)
(R1_REG 1)
@@ -165,7 +168,7 @@
simd_varith_with_acc, simd_vlogic, simd_vlogic_with_acc,
simd_vcompare, simd_vpermute, simd_vpack, simd_vpack_with_acc,
simd_valign, simd_valign_with_acc, simd_vcontrol,
- simd_vspecial_3cycle, simd_vspecial_4cycle, simd_dma"
+ simd_vspecial_3cycle, simd_vspecial_4cycle, simd_dma, mul16_em, div_rem"
(cond [(eq_attr "is_sfunc" "yes")
(cond [(match_test "!TARGET_LONG_CALLS_SET && (!TARGET_MEDIUM_CALLS || GET_CODE (PATTERN (insn)) != COND_EXEC)") (const_string "call")
(match_test "flag_pic") (const_string "sfunc")]
@@ -188,7 +191,7 @@
;; Attribute describing the processor
-(define_attr "cpu" "none,ARC600,ARC700"
+(define_attr "cpu" "none,ARC600,ARC700,ARCEM,ARCHS"
(const (symbol_ref "arc_cpu_attr")))
;; true for compact instructions (those with _s suffix)
@@ -226,8 +229,21 @@
(symbol_ref "get_attr_length (NEXT_INSN (PREV_INSN (insn)))
- get_attr_length (insn)")))
+; for ARCv2 we need to disable/enable different instruction alternatives
+(define_attr "cpu_facility" "std,av1,av2"
+ (const_string "std"))
-(define_attr "enabled" "no,yes" (const_string "yes"))
+; We should consider all the instructions enabled until otherwise
+(define_attr "enabled" "no,yes"
+ (cond [(and (eq_attr "cpu_facility" "av1")
+ (match_test "TARGET_V2"))
+ (const_string "no")
+
+ (and (eq_attr "cpu_facility" "av2")
+ (not (match_test "TARGET_V2")))
+ (const_string "no")
+ ]
+ (const_string "yes")))
(define_attr "predicable" "no,yes" (const_string "no"))
;; if 'predicable' were not so brain-dead, we would specify:
@@ -580,7 +596,8 @@
stb%U0%V0 %1,%0"
[(set_attr "type" "move,move,move,move,move,move,move,load,store,load,load,store,store")
(set_attr "iscompact" "maybe,maybe,maybe,false,false,false,false,true,true,true,false,false,false")
- (set_attr "predicable" "yes,no,yes,yes,no,yes,yes,no,no,no,no,no,no")])
+ (set_attr "predicable" "yes,no,yes,yes,no,yes,yes,no,no,no,no,no,no")
+ (set_attr "cpu_facility" "*,*,av1,*,*,*,*,*,*,*,*,*,*")])
(define_expand "movhi"
[(set (match_operand:HI 0 "move_dest_operand" "")
@@ -607,15 +624,16 @@
mov%? %0,%1
mov%? %0,%S1%&
mov%? %0,%S1
- ldw%? %0,%1%&
- stw%? %1,%0%&
- ldw%U1%V1 %0,%1
- stw%U0%V0 %1,%0
- stw%U0%V0 %1,%0
- stw%U0%V0 %S1,%0"
+ ld%_%? %0,%1%&
+ st%_%? %1,%0%&
+ ld%_%U1%V1 %0,%1
+ st%_%U0%V0 %1,%0
+ st%_%U0%V0 %1,%0
+ st%_%U0%V0 %S1,%0"
[(set_attr "type" "move,move,move,move,move,move,move,move,load,store,load,store,store,store")
(set_attr "iscompact" "maybe,maybe,maybe,false,false,false,maybe_limm,false,true,true,false,false,false,false")
- (set_attr "predicable" "yes,no,yes,yes,no,yes,yes,yes,no,no,no,no,no,no")])
+ (set_attr "predicable" "yes,no,yes,yes,no,yes,yes,yes,no,no,no,no,no,no")
+ (set_attr "cpu_facility" "*,*,av1,*,*,*,*,*,*,*,*,*,*,*")])
(define_expand "movsi"
[(set (match_operand:SI 0 "move_dest_operand" "")
@@ -669,7 +687,8 @@
; Use default length for iscompact to allow for COND_EXEC. But set length
; of Crr to 4.
(set_attr "length" "*,*,*,4,4,4,4,8,8,*,8,*,*,*,*,*,*,*,*,8")
- (set_attr "predicable" "yes,no,yes,yes,no,no,yes,no,no,yes,yes,no,no,no,no,no,no,no,no,no")])
+ (set_attr "predicable" "yes,no,yes,yes,no,no,yes,no,no,yes,yes,no,no,no,no,no,no,no,no,no")
+ (set_attr "cpu_facility" "*,*,av1,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*")])
;; Sometimes generated by the epilogue code. We don't want to
;; recognize these addresses in general, because the limm is costly,
@@ -698,7 +717,7 @@
(define_insn_and_split "*movsi_set_cc_insn"
[(set (match_operand:CC_ZN 2 "cc_set_register" "")
- (match_operator 3 "zn_compare_operator"
+ (match_operator:CC_ZN 3 "zn_compare_operator"
[(match_operand:SI 1 "nonmemory_operand" "cI,cL,Cal") (const_int 0)]))
(set (match_operand:SI 0 "register_operand" "=w,w,w")
(match_dup 1))]
@@ -715,7 +734,7 @@
(define_insn "unary_comparison"
[(set (match_operand:CC_ZN 0 "cc_set_register" "")
- (match_operator 3 "zn_compare_operator"
+ (match_operator:CC_ZN 3 "zn_compare_operator"
[(match_operator:SI 2 "unary_operator"
[(match_operand:SI 1 "register_operand" "c")])
(const_int 0)]))]
@@ -779,7 +798,7 @@
(define_insn "*commutative_binary_comparison"
[(set (match_operand:CC_ZN 0 "cc_set_register" "")
- (match_operator 5 "zn_compare_operator"
+ (match_operator:CC_ZN 5 "zn_compare_operator"
[(match_operator:SI 4 "commutative_operator"
[(match_operand:SI 1 "register_operand" "%c,c,c")
(match_operand:SI 2 "nonmemory_operand" "cL,I,?Cal")])
@@ -857,7 +876,7 @@
; Make sure to use the W class to not touch LP_COUNT.
(set (match_operand:SI 0 "register_operand" "=W,W,W")
(match_dup 4))]
- "TARGET_ARC700"
+ "!TARGET_ARC600_FAMILY"
"%O4.f %0,%1,%2 ; mult commutative"
[(set_attr "type" "compare,compare,compare")
(set_attr "cond" "set_zn,set_zn,set_zn")
@@ -881,7 +900,7 @@
(define_insn "*noncommutative_binary_comparison"
[(set (match_operand:CC_ZN 0 "cc_set_register" "")
- (match_operator 5 "zn_compare_operator"
+ (match_operator:CC_ZN 5 "zn_compare_operator"
[(match_operator:SI 4 "noncommutative_operator"
[(match_operand:SI 1 "register_operand" "c,c,c")
(match_operand:SI 2 "nonmemory_operand" "cL,I,?Cal")])
@@ -1145,7 +1164,7 @@
(set (match_operand:SI 0 "dest_reg_operand" "=w,w")
(plus:SI (match_dup 1) (match_dup 2)))]
""
- "ldw.a%V4 %3,[%0,%S2]"
+ "ld%_.a%V4 %3,[%0,%S2]"
[(set_attr "type" "load,load")
(set_attr "length" "4,8")])
@@ -1157,7 +1176,7 @@
(set (match_operand:SI 0 "dest_reg_operand" "=r,r")
(plus:SI (match_dup 1) (match_dup 2)))]
""
- "ldw.a%V4 %3,[%0,%S2]"
+ "ld%_.a%V4 %3,[%0,%S2]"
[(set_attr "type" "load,load")
(set_attr "length" "4,8")])
@@ -1170,7 +1189,7 @@
(set (match_operand:SI 0 "dest_reg_operand" "=w,w")
(plus:SI (match_dup 1) (match_dup 2)))]
""
- "ldw.x.a%V4 %3,[%0,%S2]"
+ "ld%_.x.a%V4 %3,[%0,%S2]"
[(set_attr "type" "load,load")
(set_attr "length" "4,8")])
@@ -1182,7 +1201,7 @@
(set (match_operand:SI 0 "dest_reg_operand" "=w")
(plus:SI (match_dup 1) (match_dup 2)))]
""
- "stw.a%V4 %3,[%0,%2]"
+ "st%_.a%V4 %3,[%0,%2]"
[(set_attr "type" "store")
(set_attr "length" "4")])
@@ -1283,7 +1302,7 @@
&& satisfies_constraint_Rcq (operands[0]))
return "sub%?.ne %0,%0,%0";
/* ??? might be good for speed on ARC600 too, *if* properly scheduled. */
- if ((TARGET_ARC700 || optimize_size)
+ if ((optimize_size && (!TARGET_ARC600_FAMILY))
&& rtx_equal_p (operands[1], constm1_rtx)
&& GET_CODE (operands[3]) == LTU)
return "sbc.cs %0,%0,%0";
@@ -1435,13 +1454,13 @@
(zero_extend:SI (match_operand:HI 1 "nonvol_nonimm_operand" "0,q,0,c,Usd,Usd,m")))]
""
"@
- extw%? %0,%1%&
- extw%? %0,%1%&
+ ext%_%? %0,%1%&
+ ext%_%? %0,%1%&
bmsk%? %0,%1,15
- extw %0,%1
- ldw%? %0,%1%&
- ldw%U1 %0,%1
- ldw%U1%V1 %0,%1"
+ ext%_ %0,%1
+ ld%_%? %0,%1%&
+ ld%_%U1 %0,%1
+ ld%_%U1%V1 %0,%1"
[(set_attr "type" "unary,unary,unary,unary,load,load,load")
(set_attr "iscompact" "maybe,true,false,false,true,false,false")
(set_attr "predicable" "no,no,yes,no,no,no,no")])
@@ -1498,9 +1517,9 @@
(sign_extend:SI (match_operand:HI 1 "nonvol_nonimm_operand" "Rcqq,c,m")))]
""
"@
- sexw%? %0,%1%&
- sexw %0,%1
- ldw.x%U1%V1 %0,%1"
+ sex%_%? %0,%1%&
+ sex%_ %0,%1
+ ld%_.x%U1%V1 %0,%1"
[(set_attr "type" "unary,unary,load")
(set_attr "iscompact" "true,false,false")])
@@ -1604,7 +1623,88 @@
(set_attr "cond" "canuse,canuse,canuse,canuse,canuse,canuse,nocond,canuse,nocond,nocond,nocond,nocond,canuse_limm,canuse_limm,canuse,canuse,nocond")
])
-;; ARC700/ARC600 multiply
+;; ARCv2 MPYW and MPYUW
+(define_expand "mulhisi3"
+ [(set (match_operand:SI 0 "register_operand" "")
+ (mult:SI (sign_extend:SI (match_operand:HI 1 "register_operand" ""))
+ (sign_extend:SI (match_operand:HI 2 "nonmemory_operand" ""))))]
+ "TARGET_MPYW"
+ "{
+ if (CONSTANT_P (operands[2]))
+ {
+ emit_insn (gen_mulhisi3_imm (operands[0], operands[1], operands[2]));
+ DONE;
+ }
+ }"
+)
+
+(define_insn "mulhisi3_imm"
+ [(set (match_operand:SI 0 "register_operand" "=r,r,r, r, r")
+ (mult:SI (sign_extend:SI (match_operand:HI 1 "register_operand" "0,r,0, 0, r"))
+ (match_operand:HI 2 "short_const_int_operand" "L,L,I,C16,C16")))]
+ "TARGET_MPYW"
+ "mpyw%? %0,%1,%2"
+ [(set_attr "length" "4,4,4,8,8")
+ (set_attr "iscompact" "false")
+ (set_attr "type" "mul16_em")
+ (set_attr "predicable" "yes,no,no,yes,no")
+ (set_attr "cond" "canuse,nocond,nocond,canuse_limm,nocond")
+ ])
+
+(define_insn "mulhisi3_reg"
+ [(set (match_operand:SI 0 "register_operand" "=Rcqq,r,r")
+ (mult:SI (sign_extend:SI (match_operand:HI 1 "register_operand" " 0,0,r"))
+ (sign_extend:SI (match_operand:HI 2 "nonmemory_operand" "Rcqq,r,r"))))]
+ "TARGET_MPYW"
+ "mpyw%? %0,%1,%2"
+ [(set_attr "length" "*,4,4")
+ (set_attr "iscompact" "maybe,false,false")
+ (set_attr "type" "mul16_em")
+ (set_attr "predicable" "yes,yes,no")
+ (set_attr "cond" "canuse,canuse,nocond")
+ ])
+
+(define_expand "umulhisi3"
+ [(set (match_operand:SI 0 "register_operand" "")
+ (mult:SI (zero_extend:SI (match_operand:HI 1 "register_operand" ""))
+ (zero_extend:SI (match_operand:HI 2 "nonmemory_operand" ""))))]
+ "TARGET_MPYW"
+ "{
+ if (CONSTANT_P (operands[2]))
+ {
+ emit_insn (gen_umulhisi3_imm (operands[0], operands[1], operands[2]));
+ DONE;
+ }
+ }"
+)
+
+(define_insn "umulhisi3_imm"
+ [(set (match_operand:SI 0 "register_operand" "=r, r,r, r, r")
+ (mult:SI (zero_extend:SI (match_operand:HI 1 "register_operand" " 0, r,0, 0, r"))
+ (match_operand:HI 2 "short_const_int_operand" " L, L,I,C16,C16")))]
+ "TARGET_MPYW"
+ "mpyuw%? %0,%1,%2"
+ [(set_attr "length" "4,4,4,8,8")
+ (set_attr "iscompact" "false")
+ (set_attr "type" "mul16_em")
+ (set_attr "predicable" "yes,no,no,yes,no")
+ (set_attr "cond" "canuse,nocond,nocond,canuse_limm,nocond")
+ ])
+
+(define_insn "umulhisi3_reg"
+ [(set (match_operand:SI 0 "register_operand" "=Rcqq, r, r")
+ (mult:SI (zero_extend:SI (match_operand:HI 1 "register_operand" " 0, 0, r"))
+ (zero_extend:SI (match_operand:HI 2 "register_operand" " Rcqq, r, r"))))]
+ "TARGET_MPYW"
+ "mpyuw%? %0,%1,%2"
+ [(set_attr "length" "*,4,4")
+ (set_attr "iscompact" "maybe,false,false")
+ (set_attr "type" "mul16_em")
+ (set_attr "predicable" "yes,yes,no")
+ (set_attr "cond" "canuse,canuse,nocond")
+ ])
+
+;; ARC700/ARC600/V2 multiply
;; SI <- SI * SI
(define_expand "mulsi3"
@@ -1613,7 +1713,7 @@
(match_operand:SI 2 "nonmemory_operand" "")))]
""
{
- if (TARGET_ARC700 && !TARGET_NOMPY_SET)
+ if (TARGET_MPY)
{
if (!register_operand (operands[0], SImode))
{
@@ -1743,8 +1843,7 @@
(clobber (reg:SI LP_START))
(clobber (reg:SI LP_END))
(clobber (reg:CC CC_REG))]
- "!TARGET_MUL64_SET && !TARGET_MULMAC_32BY16_SET
- && (!TARGET_ARC700 || TARGET_NOMPY_SET)
+ "!TARGET_ANY_MPY
&& SFUNC_CHECK_PREDICABLE"
"*return arc_output_libcall (\"__mulsi3\");"
[(set_attr "is_sfunc" "yes")
@@ -1794,23 +1893,35 @@
[(set (match_operand:SI 0 "mpy_dest_reg_operand" "=Rcr,r,r,Rcr,r")
(mult:SI (match_operand:SI 1 "register_operand" " 0,c,0,0,c")
(match_operand:SI 2 "nonmemory_operand" "cL,cL,I,Cal,Cal")))]
-"TARGET_ARC700 && !TARGET_NOMPY_SET"
+ "TARGET_ARC700_MPY"
"mpyu%? %0,%1,%2"
[(set_attr "length" "4,4,4,8,8")
(set_attr "type" "umulti")
(set_attr "predicable" "yes,no,no,yes,no")
(set_attr "cond" "canuse,nocond,canuse_limm,canuse,nocond")])
+; ARCv2 has no penalties between mpy and mpyu. So, we use mpy because of its
+; short variant. LP_COUNT constraints are still valid.
+(define_insn "mulsi3_v2"
+ [(set (match_operand:SI 0 "mpy_dest_reg_operand" "=Rcqq,Rcr, r,r,Rcr, r")
+ (mult:SI (match_operand:SI 1 "register_operand" "%0, 0, c,0, 0, c")
+ (match_operand:SI 2 "nonmemory_operand" " Rcqq, cL,cL,I,Cal,Cal")))]
+ "TARGET_MULTI"
+ "mpy%? %0,%1,%2"
+ [(set_attr "length" "*,4,4,4,8,8")
+ (set_attr "iscompact" "maybe,false,false,false,false,false")
+ (set_attr "type" "umulti")
+ (set_attr "predicable" "no,yes,no,no,yes,no")
+ (set_attr "cond" "nocond,canuse,nocond,canuse_limm,canuse,nocond")])
+
(define_expand "mulsidi3"
[(set (match_operand:DI 0 "nonimmediate_operand" "")
(mult:DI (sign_extend:DI(match_operand:SI 1 "register_operand" ""))
(sign_extend:DI(match_operand:SI 2 "nonmemory_operand" ""))))]
- "(TARGET_ARC700 && !TARGET_NOMPY_SET)
- || TARGET_MUL64_SET
- || TARGET_MULMAC_32BY16_SET"
+ "TARGET_ANY_MPY"
"
{
- if (TARGET_ARC700 && !TARGET_NOMPY_SET)
+ if (TARGET_MPY)
{
operands[2] = force_reg (SImode, operands[2]);
if (!register_operand (operands[0], DImode))
@@ -1892,7 +2003,7 @@
[(set (match_operand:DI 0 "register_operand" "=&r")
(mult:DI (sign_extend:DI (match_operand:SI 1 "register_operand" "%c"))
(sign_extend:DI (match_operand:SI 2 "extend_operand" "cL"))))]
- "TARGET_ARC700 && !TARGET_NOMPY_SET"
+ "TARGET_MPY"
"#"
"&& reload_completed"
[(const_int 0)]
@@ -1902,7 +2013,7 @@
rtx l0 = simplify_gen_subreg (word_mode, operands[0], DImode, lo);
rtx h0 = simplify_gen_subreg (word_mode, operands[0], DImode, hi);
emit_insn (gen_mulsi3_highpart (h0, operands[1], operands[2]));
- emit_insn (gen_mulsi3_700 (l0, operands[1], operands[2]));
+ emit_insn (gen_mulsi3 (l0, operands[1], operands[2]));
DONE;
}
[(set_attr "type" "multi")
@@ -1916,8 +2027,8 @@
(sign_extend:DI (match_operand:SI 1 "register_operand" "%0,c, 0,c"))
(sign_extend:DI (match_operand:SI 2 "extend_operand" "c,c, i,i")))
(const_int 32))))]
- "TARGET_ARC700 && !TARGET_NOMPY_SET"
- "mpyh%? %0,%1,%2"
+ "TARGET_MPY"
+ "mpy%+%? %0,%1,%2"
[(set_attr "length" "4,4,8,8")
(set_attr "type" "multi")
(set_attr "predicable" "yes,no,yes,no")
@@ -1933,8 +2044,8 @@
(zero_extend:DI (match_operand:SI 1 "register_operand" "%0,c, 0,c"))
(zero_extend:DI (match_operand:SI 2 "extend_operand" "c,c, i,i")))
(const_int 32))))]
- "TARGET_ARC700 && !TARGET_NOMPY_SET"
- "mpyhu%? %0,%1,%2"
+ "TARGET_MPY"
+ "mpy%+u%? %0,%1,%2"
[(set_attr "length" "4,4,8,8")
(set_attr "type" "multi")
(set_attr "predicable" "yes,no,yes,no")
@@ -1956,8 +2067,7 @@
(clobber (reg:DI MUL64_OUT_REG))
(clobber (reg:CC CC_REG))]
"!TARGET_BIG_ENDIAN
- && !TARGET_MUL64_SET && !TARGET_MULMAC_32BY16_SET
- && (!TARGET_ARC700 || TARGET_NOMPY_SET)
+ && !TARGET_ANY_MPY
&& SFUNC_CHECK_PREDICABLE"
"*return arc_output_libcall (\"__umulsi3_highpart\");"
[(set_attr "is_sfunc" "yes")
@@ -1977,8 +2087,7 @@
(clobber (reg:DI MUL64_OUT_REG))
(clobber (reg:CC CC_REG))]
"TARGET_BIG_ENDIAN
- && !TARGET_MUL64_SET && !TARGET_MULMAC_32BY16_SET
- && (!TARGET_ARC700 || TARGET_NOMPY_SET)
+ && !TARGET_ANY_MPY
&& SFUNC_CHECK_PREDICABLE"
"*return arc_output_libcall (\"__umulsi3_highpart\");"
[(set_attr "is_sfunc" "yes")
@@ -1995,8 +2104,8 @@
(zero_extend:DI (match_operand:SI 1 "register_operand" " 0, c, 0, 0, c"))
(match_operand:DI 2 "immediate_usidi_operand" "L, L, I, Cal, Cal"))
(const_int 32))))]
- "TARGET_ARC700 && !TARGET_NOMPY_SET"
- "mpyhu%? %0,%1,%2"
+ "TARGET_MPY"
+ "mpy%+u%? %0,%1,%2"
[(set_attr "length" "4,4,4,8,8")
(set_attr "type" "multi")
(set_attr "predicable" "yes,no,no,yes,no")
@@ -2010,12 +2119,12 @@
(zero_extend:DI (match_operand:SI 1 "register_operand" ""))
(zero_extend:DI (match_operand:SI 2 "nonmemory_operand" "")))
(const_int 32))))]
- "TARGET_ARC700 || (!TARGET_MUL64_SET && !TARGET_MULMAC_32BY16_SET)"
+ "!TARGET_MUL64_SET && !TARGET_MULMAC_32BY16_SET"
"
{
rtx target = operands[0];
- if (!TARGET_ARC700 || TARGET_NOMPY_SET)
+ if (!TARGET_MPY)
{
emit_move_insn (gen_rtx_REG (SImode, 0), operands[1]);
emit_move_insn (gen_rtx_REG (SImode, 1), operands[2]);
@@ -2047,7 +2156,7 @@
(zero_extend:DI(match_operand:SI 2 "nonmemory_operand" ""))))]
""
{
- if (TARGET_ARC700 && !TARGET_NOMPY_SET)
+ if (TARGET_MPY)
{
operands[2] = force_reg (SImode, operands[2]);
if (!register_operand (operands[0], DImode))
@@ -2141,7 +2250,7 @@
[(set (match_operand:DI 0 "dest_reg_operand" "=&r")
(mult:DI (zero_extend:DI (match_operand:SI 1 "register_operand" "%c"))
(zero_extend:DI (match_operand:SI 2 "extend_operand" "cL"))))]
- "TARGET_ARC700 && !TARGET_NOMPY_SET"
+ "TARGET_MPY"
"#"
"reload_completed"
[(const_int 0)]
@@ -2151,7 +2260,7 @@
rtx l0 = operand_subword (operands[0], lo, 0, DImode);
rtx h0 = operand_subword (operands[0], hi, 0, DImode);
emit_insn (gen_umulsi3_highpart (h0, operands[1], operands[2]));
- emit_insn (gen_mulsi3_700 (l0, operands[1], operands[2]));
+ emit_insn (gen_mulsi3 (l0, operands[1], operands[2]));
DONE;
}
[(set_attr "type" "umulti")
@@ -2166,8 +2275,7 @@
(clobber (reg:SI R12_REG))
(clobber (reg:DI MUL64_OUT_REG))
(clobber (reg:CC CC_REG))]
- "!TARGET_MUL64_SET && !TARGET_MULMAC_32BY16_SET
- && (!TARGET_ARC700 || TARGET_NOMPY_SET)
+ "!TARGET_ANY_MPY
&& SFUNC_CHECK_PREDICABLE"
"*return arc_output_libcall (\"__umulsidi3\");"
[(set_attr "is_sfunc" "yes")
@@ -2183,8 +2291,7 @@
(clobber (reg:SI R12_REG))
(clobber (reg:DI MUL64_OUT_REG))
(clobber (reg:CC CC_REG))])]
- "!TARGET_MUL64_SET && !TARGET_MULMAC_32BY16_SET
- && (!TARGET_ARC700 || TARGET_NOMPY_SET)
+ "!TARGET_ANY_MPY
&& peep2_regno_dead_p (1, TARGET_BIG_ENDIAN ? R1_REG : R0_REG)"
[(pc)]
{
@@ -2350,7 +2457,7 @@
adc %0,%1,%2"
; if we have a bad schedule after sched2, split.
"reload_completed
- && !optimize_size && TARGET_ARC700
+ && !optimize_size && (!TARGET_ARC600_FAMILY)
&& arc_scheduling_not_expected ()
&& arc_sets_cc_p (prev_nonnote_insn (insn))
/* If next comes a return or other insn that needs a delay slot,
@@ -2564,7 +2671,7 @@
sbc %0,%1,%2"
; if we have a bad schedule after sched2, split.
"reload_completed
- && !optimize_size && TARGET_ARC700
+ && !optimize_size && (!TARGET_ARC600_FAMILY)
&& arc_scheduling_not_expected ()
&& arc_sets_cc_p (prev_nonnote_insn (insn))
/* If next comes a return or other insn that needs a delay slot,
@@ -2802,7 +2909,7 @@
return \"bclr%? %0,%1,%M2%&\";
case 4:
return (INTVAL (operands[2]) == 0xff
- ? \"extb%? %0,%1%&\" : \"extw%? %0,%1%&\");
+ ? \"extb%? %0,%1%&\" : \"ext%_%? %0,%1%&\");
case 9: case 14: return \"bic%? %0,%1,%n2-1\";
case 18:
if (TARGET_BIG_ENDIAN)
@@ -2813,11 +2920,11 @@
xop[1] = adjust_address (operands[1], QImode,
INTVAL (operands[2]) == 0xff ? 3 : 2);
output_asm_insn (INTVAL (operands[2]) == 0xff
- ? \"ldb %0,%1\" : \"ldw %0,%1\",
+ ? \"ldb %0,%1\" : \"ld%_ %0,%1\",
xop);
return \"\";
}
- return INTVAL (operands[2]) == 0xff ? \"ldb %0,%1\" : \"ldw %0,%1\";
+ return INTVAL (operands[2]) == 0xff ? \"ldb %0,%1\" : \"ld%_ %0,%1\";
default:
gcc_unreachable ();
}
@@ -3196,19 +3303,19 @@
;; Next come the scc insns.
(define_expand "cstoresi4"
- [(set (reg:CC CC_REG)
- (compare:CC (match_operand:SI 2 "nonmemory_operand" "")
- (match_operand:SI 3 "nonmemory_operand" "")))
- (set (match_operand:SI 0 "dest_reg_operand" "")
- (match_operator:SI 1 "ordered_comparison_operator" [(reg CC_REG)
- (const_int 0)]))]
+ [(set (match_operand:SI 0 "dest_reg_operand" "")
+ (match_operator:SI 1 "ordered_comparison_operator" [(match_operand:SI 2 "nonmemory_operand" "")
+ (match_operand:SI 3 "nonmemory_operand" "")]))]
""
{
- gcc_assert (XEXP (operands[1], 0) == operands[2]);
- gcc_assert (XEXP (operands[1], 1) == operands[3]);
- operands[1] = gen_compare_reg (operands[1], SImode);
- emit_insn (gen_scc_insn (operands[0], operands[1]));
- DONE;
+ if (!TARGET_CODE_DENSITY)
+ {
+ gcc_assert (XEXP (operands[1], 0) == operands[2]);
+ gcc_assert (XEXP (operands[1], 1) == operands[3]);
+ operands[1] = gen_compare_reg (operands[1], SImode);
+ emit_insn (gen_scc_insn (operands[0], operands[1]));
+ DONE;
+ }
})
(define_mode_iterator SDF [SF DF])
@@ -3590,8 +3697,8 @@
return \"ld.as %0,[%1,%2]%&\";
case HImode:
if (ADDR_DIFF_VEC_FLAGS (diff_vec).offset_unsigned)
- return \"ldw.as %0,[%1,%2]\";
- return \"ldw.x.as %0,[%1,%2]\";
+ return \"ld%_.as %0,[%1,%2]\";
+ return \"ld%_.x.as %0,[%1,%2]\";
case QImode:
if (ADDR_DIFF_VEC_FLAGS (diff_vec).offset_unsigned)
return \"ldb%? %0,[%1,%2]%&\";
@@ -3658,7 +3765,7 @@
2 of these are for alignment, and are anticipated in the length
of the ADDR_DIFF_VEC. */
if (unalign && !satisfies_constraint_Rcq (xop[0]))
- s = \"add2 %2,pcl,%0\n\tld_s%2,[%2,12]\";
+ s = \"add2 %2,pcl,%0\n\tld_s %2,[%2,12]\";
else if (unalign)
s = \"add_s %2,%0,2\n\tld.as %2,[pcl,%2]\";
else
@@ -3670,12 +3777,12 @@
{
if (satisfies_constraint_Rcq (xop[0]))
{
- s = \"add_s %2,%0,%1\n\tldw.as %2,[pcl,%2]\";
+ s = \"add_s %2,%0,%1\n\tld%_.as %2,[pcl,%2]\";
xop[1] = GEN_INT ((10 - unalign) / 2U);
}
else
{
- s = \"add1 %2,pcl,%0\n\tldw_s %2,[%2,%1]\";
+ s = \"add1 %2,pcl,%0\n\tld%__s %2,[%2,%1]\";
xop[1] = GEN_INT (10 + unalign);
}
}
@@ -3683,12 +3790,12 @@
{
if (satisfies_constraint_Rcq (xop[0]))
{
- s = \"add_s %2,%0,%1\n\tldw.x.as %2,[pcl,%2]\";
+ s = \"add_s %2,%0,%1\n\tld%_.x.as %2,[pcl,%2]\";
xop[1] = GEN_INT ((10 - unalign) / 2U);
}
else
{
- s = \"add1 %2,pcl,%0\n\tldw_s.x %2,[%2,%1]\";
+ s = \"add1 %2,pcl,%0\n\tld%__s.x %2,[%2,%1]\";
xop[1] = GEN_INT (10 + unalign);
}
}
@@ -3886,6 +3993,14 @@
(set_attr "cond" "canuse")
(set_attr "length" "2")])
+(define_insn "nopv"
+ [(unspec_volatile [(const_int 0)] VUNSPEC_NOP)]
+ ""
+ "nop%?"
+ [(set_attr "type" "misc")
+ (set_attr "iscompact" "true")
+ (set_attr "length" "2")])
+
;; Special pattern to flush the icache.
;; ??? Not sure what to do here. Some ARC's are known to support this.
@@ -3985,7 +4100,7 @@
(set (match_operand:SI 4 "register_operand" "")
(mult:SI (match_operand:SI 2 "register_operand")
(match_operand:SI 3 "nonmemory_operand" "")))]
- "TARGET_ARC700 && !TARGET_NOMPY_SET
+ "TARGET_ARC700_MPY
&& (rtx_equal_p (operands[0], operands[2])
|| rtx_equal_p (operands[0], operands[3]))
&& peep2_regno_dead_p (0, CC_REG)
@@ -4015,7 +4130,7 @@
(set (match_operand:SI 4 "register_operand" "")
(mult:SI (match_operand:SI 2 "register_operand")
(match_operand:SI 3 "nonmemory_operand" "")))]
- "TARGET_ARC700 && !TARGET_NOMPY_SET
+ "TARGET_ARC700_MPY
&& (rtx_equal_p (operands[0], operands[2])
|| rtx_equal_p (operands[0], operands[3]))
&& peep2_regno_dead_p (2, CC_REG)"
@@ -4068,8 +4183,8 @@
(clrsb:HI (match_operand:HI 1 "general_operand" "cL,Cal"))))]
"TARGET_NORM"
"@
- normw \t%0, %1
- normw \t%0, %S1"
+ norm%_ \t%0, %1
+ norm%_ \t%0, %S1"
[(set_attr "length" "4,8")
(set_attr "type" "two_cycle_core,two_cycle_core")])
@@ -4479,6 +4594,11 @@
= gen_rtx_REG (Pmode,
arc_return_address_regs[arc_compute_function_type (cfun)]);
+ if (arc_compute_function_type (cfun) == ARC_FUNCTION_ILINK1
+ && TARGET_V2)
+ {
+ return \"rtie\";
+ }
if (TARGET_PAD_RETURN)
arc_pad_return ();
output_asm_insn (\"j%!%* [%0]%&\", &reg);
@@ -4487,8 +4607,13 @@
[(set_attr "type" "return")
; predicable won't help here since the canonical rtl looks different
; for branches.
- (set_attr "cond" "canuse")
- (set (attr "iscompact")
+ (set (attr "cond")
+ (cond [(and (eq (symbol_ref "arc_compute_function_type (cfun)")
+ (symbol_ref "ARC_FUNCTION_ILINK1"))
+ (match_test "TARGET_V2"))
+ (const_string "nocond")]
+ (const_string "canuse")))
+ (set (attr "iscompact")
(cond [(eq (symbol_ref "arc_compute_function_type (cfun)")
(symbol_ref "ARC_FUNCTION_NORMAL"))
(const_string "maybe")]
@@ -4504,7 +4629,9 @@
(if_then_else (match_operator 0 "proper_comparison_operator"
[(reg CC_REG) (const_int 0)])
(simple_return) (pc)))]
- "reload_completed"
+ "reload_completed
+ && !(TARGET_V2
+ && arc_compute_function_type (cfun) == ARC_FUNCTION_ILINK1)"
{
rtx xop[2];
xop[0] = operands[0];
@@ -4909,7 +5036,7 @@
(define_expand "doloop_end"
[(use (match_operand 0 "register_operand" ""))
(use (label_ref (match_operand 1 "" "")))]
- "TARGET_ARC600 || TARGET_ARC700"
+ "!TARGET_ARC601"
{
/* We could do smaller bivs with biv widening, and wider bivs by having
a high-word counter in an outer loop - but punt on this for now. */
@@ -5158,6 +5285,247 @@
;; this would not work right for -0. OTOH optabs.c has already code
;; to synthesyze negate by flipping the sign bit.
+;;V2 instructions
+(define_insn "bswapsi2"
+ [(set (match_operand:SI 0 "register_operand" "= r,r")
+ (bswap:SI (match_operand:SI 1 "nonmemory_operand" "rL,Cal")))]
+ "TARGET_V2 && TARGET_SWAP"
+ "swape %0, %1"
+ [(set_attr "length" "4,8")
+ (set_attr "type" "two_cycle_core")])
+
+(define_expand "prefetch"
+ [(prefetch (match_operand:SI 0 "address_operand" "")
+ (match_operand:SI 1 "const_int_operand" "")
+ (match_operand:SI 2 "const_int_operand" ""))]
+ "TARGET_HS"
+ "")
+
+(define_insn "prefetch_1"
+ [(prefetch (match_operand:SI 0 "register_operand" "r")
+ (match_operand:SI 1 "const_int_operand" "n")
+ (match_operand:SI 2 "const_int_operand" "n"))]
+ "TARGET_HS"
+ {
+ if (INTVAL (operands[1]))
+ return "prefetchw [%0]";
+ else
+ return "prefetch [%0]";
+ }
+ [(set_attr "type" "load")
+ (set_attr "length" "4")])
+
+(define_insn "prefetch_2"
+ [(prefetch (plus:SI (match_operand:SI 0 "register_operand" "r,r,r")
+ (match_operand:SI 1 "nonmemory_operand" "r,Cm2,Cal"))
+ (match_operand:SI 2 "const_int_operand" "n,n,n")
+ (match_operand:SI 3 "const_int_operand" "n,n,n"))]
+ "TARGET_HS"
+ {
+ if (INTVAL (operands[2]))
+ return "prefetchw [%0, %1]";
+ else
+ return "prefetch [%0, %1]";
+ }
+ [(set_attr "type" "load")
+ (set_attr "length" "4,4,8")])
+
+(define_insn "prefetch_3"
+ [(prefetch (match_operand:SI 0 "address_operand" "p")
+ (match_operand:SI 1 "const_int_operand" "n")
+ (match_operand:SI 2 "const_int_operand" "n"))]
+ "TARGET_HS"
+ {
+ operands[0] = gen_rtx_MEM (SImode, operands[0]);
+ if (INTVAL (operands[1]))
+ return "prefetchw%U0 %0";
+ else
+ return "prefetch%U0 %0";
+ }
+ [(set_attr "type" "load")
+ (set_attr "length" "8")])
+
+(define_insn "divsi3"
+ [(set (match_operand:SI 0 "register_operand" "=r,r, r,r,r,r, r, r")
+ (div:SI (match_operand:SI 1 "nonmemory_operand" "0,r,Cal,0,r,0, 0, r")
+ (match_operand:SI 2 "nonmemory_operand" "r,r, r,L,L,I,Cal,Cal")))]
+ "TARGET_DIVREM"
+ "div%? %0, %1, %2"
+ [(set_attr "length" "4,4,8,4,4,4,8,8")
+ (set_attr "iscompact" "false")
+ (set_attr "type" "div_rem")
+ (set_attr "predicable" "yes,no,no,yes,no,no,yes,no")
+ (set_attr "cond" "canuse,nocond,nocond,canuse,nocond,nocond,canuse,nocond")
+ ])
+
+(define_insn "udivsi3"
+ [(set (match_operand:SI 0 "register_operand" "=r,r, r,r,r,r, r, r")
+ (udiv:SI (match_operand:SI 1 "nonmemory_operand" "0,r,Cal,0,r,0, 0, r")
+ (match_operand:SI 2 "nonmemory_operand" "r,r, r,L,L,I,Cal,Cal")))]
+ "TARGET_DIVREM"
+ "divu%? %0, %1, %2"
+ [(set_attr "length" "4,4,8,4,4,4,8,8")
+ (set_attr "iscompact" "false")
+ (set_attr "type" "div_rem")
+ (set_attr "predicable" "yes,no,no,yes,no,no,yes,no")
+ (set_attr "cond" "canuse,nocond,nocond,canuse,nocond,nocond,canuse,nocond")
+ ])
+
+(define_insn "modsi3"
+ [(set (match_operand:SI 0 "register_operand" "=r,r, r,r,r,r, r, r")
+ (mod:SI (match_operand:SI 1 "nonmemory_operand" "0,r,Cal,0,r,0, 0, r")
+ (match_operand:SI 2 "nonmemory_operand" "r,r, r,L,L,I,Cal,Cal")))]
+ "TARGET_DIVREM"
+ "rem%? %0, %1, %2"
+ [(set_attr "length" "4,4,8,4,4,4,8,8")
+ (set_attr "iscompact" "false")
+ (set_attr "type" "div_rem")
+ (set_attr "predicable" "yes,no,no,yes,no,no,yes,no")
+ (set_attr "cond" "canuse,nocond,nocond,canuse,nocond,nocond,canuse,nocond")
+ ])
+
+(define_insn "umodsi3"
+ [(set (match_operand:SI 0 "register_operand" "=r,r, r,r,r,r, r, r")
+ (umod:SI (match_operand:SI 1 "nonmemory_operand" "0,r,Cal,0,r,0, 0, r")
+ (match_operand:SI 2 "nonmemory_operand" "r,r, r,L,L,I,Cal,Cal")))]
+ "TARGET_DIVREM"
+ "remu%? %0, %1, %2"
+ [(set_attr "length" "4,4,8,4,4,4,8,8")
+ (set_attr "iscompact" "false")
+ (set_attr "type" "div_rem")
+ (set_attr "predicable" "yes,no,no,yes,no,no,yes,no")
+ (set_attr "cond" "canuse,nocond,nocond,canuse,nocond,nocond,canuse,nocond")
+ ])
+
+;; SETcc instructions
+(define_code_iterator arcCC_cond [eq ne gt lt ge le])
+
+(define_insn "arcset<code>"
+ [(set (match_operand:SI 0 "register_operand" "=r,r,r,r,r,r,r")
+ (arcCC_cond:SI (match_operand:SI 1 "nonmemory_operand" "0,r,0,r,0,0,r")
+ (match_operand:SI 2 "nonmemory_operand" "r,r,L,L,I,n,n")))]
+ "TARGET_V2 && TARGET_CODE_DENSITY"
+ "set<code>%? %0, %1, %2"
+ [(set_attr "length" "4,4,4,4,4,8,8")
+ (set_attr "iscompact" "false")
+ (set_attr "type" "compare")
+ (set_attr "predicable" "yes,no,yes,no,no,yes,no")
+ (set_attr "cond" "canuse,nocond,canuse,nocond,nocond,canuse,nocond")
+ ])
+
+(define_insn "arcsetltu"
+ [(set (match_operand:SI 0 "register_operand" "=r,r,r,r,r, r, r")
+ (ltu:SI (match_operand:SI 1 "nonmemory_operand" "0,r,0,r,0, 0, r")
+ (match_operand:SI 2 "nonmemory_operand" "r,r,L,L,I, n, n")))]
+ "TARGET_V2 && TARGET_CODE_DENSITY"
+ "setlo%? %0, %1, %2"
+ [(set_attr "length" "4,4,4,4,4,8,8")
+ (set_attr "iscompact" "false")
+ (set_attr "type" "compare")
+ (set_attr "predicable" "yes,no,yes,no,no,yes,no")
+ (set_attr "cond" "canuse,nocond,canuse,nocond,nocond,canuse,nocond")
+ ])
+
+(define_insn "arcsetgeu"
+ [(set (match_operand:SI 0 "register_operand" "=r,r,r,r,r, r, r")
+ (geu:SI (match_operand:SI 1 "nonmemory_operand" "0,r,0,r,0, 0, r")
+ (match_operand:SI 2 "nonmemory_operand" "r,r,L,L,I, n, n")))]
+ "TARGET_V2 && TARGET_CODE_DENSITY"
+ "seths%? %0, %1, %2"
+ [(set_attr "length" "4,4,4,4,4,8,8")
+ (set_attr "iscompact" "false")
+ (set_attr "type" "compare")
+ (set_attr "predicable" "yes,no,yes,no,no,yes,no")
+ (set_attr "cond" "canuse,nocond,canuse,nocond,nocond,canuse,nocond")
+ ])
+
+;; Special cases of SETCC
+(define_insn_and_split "arcsethi"
+ [(set (match_operand:SI 0 "register_operand" "=r,r, r,r")
+ (gtu:SI (match_operand:SI 1 "nonmemory_operand" "r,r, r,r")
+ (match_operand:SI 2 "nonmemory_operand" "0,r,C62,n")))]
+ "TARGET_V2 && TARGET_CODE_DENSITY"
+ "setlo%? %0, %2, %1"
+ "reload_completed
+ && CONST_INT_P (operands[2])
+ && satisfies_constraint_C62 (operands[2])"
+ [(const_int 0)]
+ "{
+ /* sethi a,b,u6 => seths a,b,u6 + 1. */
+ operands[2] = GEN_INT (INTVAL (operands[2]) + 1);
+ emit_insn (gen_arcsetgeu (operands[0], operands[1], operands[2]));
+ DONE;
+ }"
+ [(set_attr "length" "4,4,4,8")
+ (set_attr "iscompact" "false")
+ (set_attr "type" "compare")
+ (set_attr "predicable" "yes,no,no,no")
+ (set_attr "cond" "canuse,nocond,nocond,nocond")]
+)
+
+(define_insn_and_split "arcsetls"
+ [(set (match_operand:SI 0 "register_operand" "=r,r, r,r")
+ (leu:SI (match_operand:SI 1 "nonmemory_operand" "r,r, r,r")
+ (match_operand:SI 2 "nonmemory_operand" "0,r,C62,n")))]
+ "TARGET_V2 && TARGET_CODE_DENSITY"
+ "seths%? %0, %2, %1"
+ "reload_completed
+ && CONST_INT_P (operands[2])
+ && satisfies_constraint_C62 (operands[2])"
+ [(const_int 0)]
+ "{
+ /* setls a,b,u6 => setlo a,b,u6 + 1. */
+ operands[2] = GEN_INT (INTVAL (operands[2]) + 1);
+ emit_insn (gen_arcsetltu (operands[0], operands[1], operands[2]));
+ DONE;
+ }"
+ [(set_attr "length" "4,4,4,8")
+ (set_attr "iscompact" "false")
+ (set_attr "type" "compare")
+ (set_attr "predicable" "yes,no,no,no")
+ (set_attr "cond" "canuse,nocond,nocond,nocond")]
+)
+
+; Any mode that needs to be solved by secondary reload
+(define_mode_iterator SRI [QI HI])
+
+(define_expand "reload_<mode>_load"
+ [(parallel [(match_operand:SRI 0 "register_operand" "=r")
+ (match_operand:SRI 1 "memory_operand" "m")
+ (match_operand:SI 2 "register_operand" "=&r")])]
+ ""
+{
+ arc_secondary_reload_conv (operands[0], operands[1], operands[2], false);
+ DONE;
+})
+
+(define_expand "reload_<mode>_store"
+ [(parallel [(match_operand:SRI 0 "memory_operand" "=m")
+ (match_operand:SRI 1 "register_operand" "r")
+ (match_operand:SI 2 "register_operand" "=&r")])]
+ ""
+{
+ arc_secondary_reload_conv (operands[1], operands[0], operands[2], true);
+ DONE;
+})
+
+
+(define_insn "extzvsi"
+ [(set (match_operand:SI 0 "register_operand" "=r , r , r, r, r")
+ (zero_extract:SI (match_operand:SI 1 "register_operand" "0 , r , 0, 0, r")
+ (match_operand:SI 2 "const_int_operand" "C3p, C3p, i, i, i")
+ (match_operand:SI 3 "const_int_operand" "i , i , i, i, i")))]
+ "TARGET_HS && TARGET_BARREL_SHIFTER"
+ {
+ int assemble_op2 = (((INTVAL (operands[2]) - 1) & 0x1f) << 5) | (INTVAL (operands[3]) & 0x1f);
+ operands[2] = GEN_INT (assemble_op2);
+ return "xbfu%? %0,%1,%2";
+ }
+ [(set_attr "type" "shift")
+ (set_attr "iscompact" "false")
+ (set_attr "length" "4,4,4,8,8")
+ (set_attr "predicable" "yes,no,no,yes,no")
+ (set_attr "cond" "canuse,nocond,nocond,canuse,nocond")])
;; include the arc-FPX instructions
(include "fpx.md")
diff --git a/gcc/config/arc/arc.opt b/gcc/config/arc/arc.opt
index 29e89f93d15..0c10c67c4e7 100644
--- a/gcc/config/arc/arc.opt
+++ b/gcc/config/arc/arc.opt
@@ -53,6 +53,18 @@ mARC700
Target Report
Same as -mA7.
+mmpy-option=
+Target RejectNegative Joined UInteger Var(arc_mpy_option) Init(2)
+-mmpy-option={0,1,2,3,4,5,6,7,8,9} Compile ARCv2 code with a multiplier design option. Option 2 is default on.
+
+mdiv-rem
+Target Report Mask(DIVREM)
+Enable DIV-REM instructions for ARCv2
+
+mcode-density
+Target Report Mask(CODE_DENSITY)
+Enable code density instructions for ARCv2
+
mmixed-code
Target Report Mask(MIXED_CODE_SET)
Tweak register allocation to help 16-bit instruction generation.
@@ -162,11 +174,32 @@ EnumValue
Enum(processor_type) String(ARC600) Value(PROCESSOR_ARC600)
EnumValue
+Enum(processor_type) String(arc600) Value(PROCESSOR_ARC600)
+
+EnumValue
Enum(processor_type) String(ARC601) Value(PROCESSOR_ARC601)
EnumValue
+Enum(processor_type) String(arc601) Value(PROCESSOR_ARC601)
+
+EnumValue
Enum(processor_type) String(ARC700) Value(PROCESSOR_ARC700)
+EnumValue
+Enum(processor_type) String(arc700) Value(PROCESSOR_ARC700)
+
+EnumValue
+Enum(processor_type) String(ARCEM) Value(PROCESSOR_ARCEM)
+
+EnumValue
+Enum(processor_type) String(arcem) Value(PROCESSOR_ARCEM)
+
+EnumValue
+Enum(processor_type) String(ARCHS) Value(PROCESSOR_ARCHS)
+
+EnumValue
+Enum(processor_type) String(archs) Value(PROCESSOR_ARCHS)
+
msize-level=
Target RejectNegative Joined UInteger Var(arc_size_opt_level) Init(-1)
size optimization level: 0:none 1:opportunistic 2: regalloc 3:drop align, -Os.
diff --git a/gcc/config/arc/arcEM.md b/gcc/config/arc/arcEM.md
new file mode 100644
index 00000000000..a72d2504e52
--- /dev/null
+++ b/gcc/config/arc/arcEM.md
@@ -0,0 +1,93 @@
+;; DFA scheduling description of the Synopsys DesignWare ARC EM cpu
+;; for GNU C compiler
+;; Copyright (C) 2007-2015 Free Software Foundation, Inc.
+;; Contributor: Claudiu Zissulescu <claudiu.zissulescu@synopsys.com>
+
+;; This file is part of GCC.
+
+;; GCC is free software; you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation; either version 3, or (at your option)
+;; any later version.
+
+;; GCC is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+;; GNU General Public License for more details.
+
+;; You should have received a copy of the GNU General Public License
+;; along with GCC; see the file COPYING3. If not see
+;; <http://www.gnu.org/licenses/>.
+
+(define_automaton "ARCEM")
+
+(define_cpu_unit "em_issue, ld_st, mul_em, divrem_em" "ARCEM")
+
+(define_insn_reservation "em_data_load" 2
+ (and (match_test "TARGET_EM")
+ (eq_attr "type" "load"))
+ "em_issue+ld_st,nothing")
+
+(define_insn_reservation "em_data_store" 1
+ (and (match_test "TARGET_EM")
+ (eq_attr "type" "store"))
+ "em_issue+ld_st")
+
+;; Multipliers options
+(define_insn_reservation "mul_em_mpyw_1" 1
+ (and (match_test "TARGET_EM")
+ (match_test "arc_mpy_option > 0")
+ (match_test "arc_mpy_option <= 2")
+ (eq_attr "type" "mul16_em"))
+ "em_issue+mul_em")
+
+(define_insn_reservation "mul_em_mpyw_2" 2
+ (and (match_test "TARGET_EM")
+ (match_test "arc_mpy_option > 2")
+ (match_test "arc_mpy_option <= 5")
+ (eq_attr "type" "mul16_em"))
+ "em_issue+mul_em, nothing")
+
+(define_insn_reservation "mul_em_mpyw_4" 4
+ (and (match_test "TARGET_EM")
+ (match_test "arc_mpy_option == 6")
+ (eq_attr "type" "mul16_em"))
+ "em_issue+mul_em, mul_em*3")
+
+(define_insn_reservation "mul_em_multi_wlh1" 1
+ (and (match_test "TARGET_EM")
+ (match_test "arc_mpy_option == 2")
+ (eq_attr "type" "multi,umulti"))
+ "em_issue+mul_em")
+
+(define_insn_reservation "mul_em_multi_wlh2" 2
+ (and (match_test "TARGET_EM")
+ (match_test "arc_mpy_option == 3")
+ (eq_attr "type" "multi,umulti"))
+ "em_issue+mul_em, nothing")
+
+(define_insn_reservation "mul_em_multi_wlh3" 3
+ (and (match_test "TARGET_EM")
+ (match_test "arc_mpy_option == 4")
+ (eq_attr "type" "multi,umulti"))
+ "em_issue+mul_em, mul_em*2")
+
+;; FIXME! Make the difference between MPY and MPYM for WLH4
+(define_insn_reservation "mul_em_multi_wlh4" 4
+ (and (match_test "TARGET_EM")
+ (match_test "arc_mpy_option == 5")
+ (eq_attr "type" "multi,umulti"))
+ "em_issue+mul_em, mul_em*4")
+
+(define_insn_reservation "mul_em_multi_wlh5" 9
+ (and (match_test "TARGET_EM")
+ (match_test "arc_mpy_option == 6")
+ (eq_attr "type" "multi,umulti"))
+ "em_issue+mul_em, mul_em*8")
+
+;; Radix-4 divider timing
+(define_insn_reservation "em_divrem" 3
+ (and (match_test "TARGET_EM")
+ (match_test "TARGET_DIVREM")
+ (eq_attr "type" "div_rem"))
+ "em_issue+mul_em+divrem_em, (mul_em+divrem_em)*2")
diff --git a/gcc/config/arc/arcHS.md b/gcc/config/arc/arcHS.md
new file mode 100644
index 00000000000..06937445a47
--- /dev/null
+++ b/gcc/config/arc/arcHS.md
@@ -0,0 +1,76 @@
+;; DFA scheduling description of the Synopsys DesignWare ARC HS cpu
+;; for GNU C compiler
+;; Copyright (C) 2007-2015 Free Software Foundation, Inc.
+;; Contributor: Claudiu Zissulescu <claudiu.zissulescu@synopsys.com>
+
+;; This file is part of GCC.
+
+;; GCC is free software; you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation; either version 3, or (at your option)
+;; any later version.
+
+;; GCC is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+;; GNU General Public License for more details.
+
+;; You should have received a copy of the GNU General Public License
+;; along with GCC; see the file COPYING3. If not see
+;; <http://www.gnu.org/licenses/>.
+
+(define_automaton "ARCHS")
+
+(define_cpu_unit "hs_issue, hs_ld_st, divrem_hs, mul_hs, x1, x2" "ARCHS")
+
+(define_insn_reservation "hs_data_load" 4
+ (and (match_test "TARGET_HS")
+ (eq_attr "type" "load"))
+ "hs_issue+hs_ld_st,hs_ld_st,nothing*2")
+
+(define_insn_reservation "hs_data_store" 1
+ (and (match_test "TARGET_HS")
+ (eq_attr "type" "store"))
+ "hs_issue+hs_ld_st")
+
+(define_insn_reservation "hs_alu0" 2
+ (and (match_test "TARGET_HS")
+ (eq_attr "type" "cc_arith, two_cycle_core, shift, lr, sr"))
+ "hs_issue+x1,x2")
+
+(define_insn_reservation "hs_alu1" 4
+ (and (match_test "TARGET_HS")
+ (eq_attr "type" "move, cmove, unary, binary, compare, misc"))
+ "hs_issue+x1, nothing*3")
+
+(define_insn_reservation "hs_divrem" 13
+ (and (match_test "TARGET_HS")
+ (match_test "TARGET_DIVREM")
+ (eq_attr "type" "div_rem"))
+ "hs_issue+divrem_hs, (divrem_hs)*12")
+
+(define_insn_reservation "hs_mul" 3
+ (and (match_test "TARGET_HS")
+ (eq_attr "type" "mul16_em, multi, umulti"))
+ "hs_issue+mul_hs, nothing*3")
+
+;; BYPASS EALU ->
+(define_bypass 1 "hs_alu0" "hs_divrem")
+(define_bypass 1 "hs_alu0" "hs_mul")
+
+;; BYPASS BALU ->
+(define_bypass 1 "hs_alu1" "hs_alu1")
+(define_bypass 1 "hs_alu1" "hs_data_store" "store_data_bypass_p")
+
+;; BYPASS LD ->
+(define_bypass 1 "hs_data_load" "hs_alu1")
+(define_bypass 3 "hs_data_load" "hs_divrem")
+(define_bypass 3 "hs_data_load" "hs_data_load")
+(define_bypass 3 "hs_data_load" "hs_mul")
+(define_bypass 1 "hs_data_load" "hs_data_store" "store_data_bypass_p")
+
+;; BYPASS MPY ->
+;;(define_bypass 3 "hs_mul" "hs_mul")
+(define_bypass 1 "hs_mul" "hs_alu1")
+(define_bypass 3 "hs_mul" "hs_divrem")
+(define_bypass 1 "hs_mul" "hs_data_store" "store_data_bypass_p")
diff --git a/gcc/config/arc/constraints.md b/gcc/config/arc/constraints.md
index 3d0db360557..65ea44a9f13 100644
--- a/gcc/config/arc/constraints.md
+++ b/gcc/config/arc/constraints.md
@@ -127,6 +127,12 @@
(and (match_code "const_int")
(match_test "UNSIGNED_INT6 (-ival)")))
+(define_constraint "C16"
+ "@internal
+ A 16-bit signed integer constant"
+ (and (match_code "const_int")
+ (match_test "SIGNED_INT16 (ival)")))
+
(define_constraint "M"
"@internal
A 5-bit unsigned integer constant"
@@ -212,6 +218,12 @@
(and (match_code "const_int")
(match_test "ival && IS_POWEROF2_P (ival + 1)")))
+(define_constraint "C3p"
+ "@internal
+ constant int used to select xbfu a,b,u6 instruction. The values accepted are 1 and 2."
+ (and (match_code "const_int")
+ (match_test "((ival == 1) || (ival == 2))")))
+
(define_constraint "Ccp"
"@internal
constant such that ~x (one's Complement) is a power of two"
@@ -397,3 +409,15 @@
Integer constant zero"
(and (match_code "const_int")
(match_test "IS_ZERO (ival)")))
+
+(define_constraint "Cm2"
+ "@internal
+ A signed 9-bit integer constant."
+ (and (match_code "const_int")
+ (match_test "(ival >= -256) && (ival <=255)")))
+
+(define_constraint "C62"
+ "@internal
+ An unsigned 6-bit integer constant, up to 62."
+ (and (match_code "const_int")
+ (match_test "UNSIGNED_INT6 (ival - 1)")))
diff --git a/gcc/config/arc/predicates.md b/gcc/config/arc/predicates.md
index d72f097eb71..43f9474c691 100644
--- a/gcc/config/arc/predicates.md
+++ b/gcc/config/arc/predicates.md
@@ -664,7 +664,7 @@
(match_operand 0 "shiftr4_operator")))
(define_predicate "mult_operator"
- (and (match_code "mult") (match_test "TARGET_ARC700 && !TARGET_NOMPY_SET"))
+ (and (match_code "mult") (match_test "TARGET_MPY"))
)
(define_predicate "commutative_operator"
@@ -809,3 +809,7 @@
(match_test "INTVAL (op) >= 0")
(and (match_test "const_double_operand (op, mode)")
(match_test "CONST_DOUBLE_HIGH (op) == 0"))))
+
+(define_predicate "short_const_int_operand"
+ (and (match_operand 0 "const_int_operand")
+ (match_test "satisfies_constraint_C16 (op)")))
diff --git a/gcc/config/arc/t-arc-newlib b/gcc/config/arc/t-arc-newlib
index 8823805b8aa..ea43a52cdc0 100644
--- a/gcc/config/arc/t-arc-newlib
+++ b/gcc/config/arc/t-arc-newlib
@@ -17,8 +17,8 @@
# with GCC; see the file COPYING3. If not see
# <http://www.gnu.org/licenses/>.
-MULTILIB_OPTIONS=mcpu=ARC600/mcpu=ARC601 mmul64/mmul32x16 mnorm
-MULTILIB_DIRNAMES=arc600 arc601 mul64 mul32x16 norm
+MULTILIB_OPTIONS=mcpu=ARC600/mcpu=ARC601/mcpu=ARC700/mcpu=ARCEM/mcpu=ARCHS mmul64/mmul32x16 mnorm
+MULTILIB_DIRNAMES=arc600 arc601 arc700 em hs mul64 mul32x16 norm
#
# Aliases:
MULTILIB_MATCHES = mcpu?ARC600=mcpu?arc600
@@ -26,10 +26,21 @@ MULTILIB_MATCHES += mcpu?ARC600=mARC600
MULTILIB_MATCHES += mcpu?ARC600=mA6
MULTILIB_MATCHES += mcpu?ARC600=mno-mpy
MULTILIB_MATCHES += mcpu?ARC601=mcpu?arc601
+MULTILIB_MATCHES += mcpu?ARC700=mA7
+MULTILIB_MATCHES += mcpu?ARC700=mARC700
+MULTILIB_MATCHES += mcpu?ARC700=mcpu?arc700
+MULTILIB_MATCHES += mcpu?ARCEM=mcpu?arcem
+MULTILIB_MATCHES += mcpu?ARCHS=mcpu?archs
MULTILIB_MATCHES += EL=mlittle-endian
MULTILIB_MATCHES += EB=mbig-endian
#
# These don't make sense for the ARC700 default target:
-MULTILIB_EXCEPTIONS=mmul64* mmul32x16* mnorm*
+MULTILIB_EXCEPTIONS=mmul64* mmul32x16* norm*
# And neither of the -mmul* options make sense without -mnorm:
MULTILIB_EXCLUSIONS=mARC600/mmul64/!mnorm mcpu=ARC601/mmul64/!mnorm mARC600/mmul32x16/!mnorm
+# Exclusions for ARC700
+MULTILIB_EXCEPTIONS += mcpu=ARC700/mnorm* mcpu=ARC700/mmul64* mcpu=ARC700/mmul32x16*
+# Exclusions for ARCv2EM
+MULTILIB_EXCEPTIONS += mcpu=ARCEM/mmul64* mcpu=ARCEM/mmul32x16*
+# Exclusions for ARCv2HS
+MULTILIB_EXCEPTIONS += mcpu=ARCHS/mmul64* mcpu=ARCHS/mmul32x16* mcpu=ARCHS/mnorm*
diff --git a/gcc/config/arm/arm-builtins.c b/gcc/config/arm/arm-builtins.c
index bad3dc381a1..f73afc269c3 100644
--- a/gcc/config/arm/arm-builtins.c
+++ b/gcc/config/arm/arm-builtins.c
@@ -67,7 +67,9 @@ enum arm_type_qualifiers
/* Polynomial types. */
qualifier_poly = 0x100,
/* Lane indices - must be within range of previous argument = a vector. */
- qualifier_lane_index = 0x200
+ qualifier_lane_index = 0x200,
+ /* Lane indices for single lane structure loads and stores. */
+ qualifier_struct_load_store_lane_index = 0x400
};
/* The qualifier_internal allows generation of a unary builtin from
@@ -150,7 +152,7 @@ arm_load1_qualifiers[SIMD_MAX_BUILTIN_ARGS]
static enum arm_type_qualifiers
arm_load1_lane_qualifiers[SIMD_MAX_BUILTIN_ARGS]
= { qualifier_none, qualifier_const_pointer_map_mode,
- qualifier_none, qualifier_immediate };
+ qualifier_none, qualifier_struct_load_store_lane_index };
#define LOAD1LANE_QUALIFIERS (arm_load1_lane_qualifiers)
/* The first argument (return type) of a store should be void type,
@@ -169,7 +171,7 @@ arm_store1_qualifiers[SIMD_MAX_BUILTIN_ARGS]
static enum arm_type_qualifiers
arm_storestruct_lane_qualifiers[SIMD_MAX_BUILTIN_ARGS]
= { qualifier_void, qualifier_pointer_map_mode,
- qualifier_none, qualifier_immediate };
+ qualifier_none, qualifier_struct_load_store_lane_index };
#define STORE1LANE_QUALIFIERS (arm_storestruct_lane_qualifiers)
#define v8qi_UP V8QImode
@@ -1963,6 +1965,7 @@ typedef enum {
NEON_ARG_COPY_TO_REG,
NEON_ARG_CONSTANT,
NEON_ARG_LANE_INDEX,
+ NEON_ARG_STRUCT_LOAD_STORE_LANE_INDEX,
NEON_ARG_MEMORY,
NEON_ARG_STOP
} builtin_arg;
@@ -2020,9 +2023,9 @@ neon_dereference_pointer (tree exp, tree type, machine_mode mem_mode,
/* Expand a Neon builtin. */
static rtx
arm_expand_neon_args (rtx target, machine_mode map_mode, int fcode,
- int icode, int have_retval, tree exp, ...)
+ int icode, int have_retval, tree exp,
+ builtin_arg *args)
{
- va_list ap;
rtx pat;
tree arg[SIMD_MAX_BUILTIN_ARGS];
rtx op[SIMD_MAX_BUILTIN_ARGS];
@@ -2037,13 +2040,11 @@ arm_expand_neon_args (rtx target, machine_mode map_mode, int fcode,
|| !(*insn_data[icode].operand[0].predicate) (target, tmode)))
target = gen_reg_rtx (tmode);
- va_start (ap, exp);
-
formals = TYPE_ARG_TYPES (TREE_TYPE (arm_builtin_decls[fcode]));
for (;;)
{
- builtin_arg thisarg = (builtin_arg) va_arg (ap, int);
+ builtin_arg thisarg = args[argc];
if (thisarg == NEON_ARG_STOP)
break;
@@ -2079,6 +2080,18 @@ arm_expand_neon_args (rtx target, machine_mode map_mode, int fcode,
op[argc] = copy_to_mode_reg (mode[argc], op[argc]);
break;
+ case NEON_ARG_STRUCT_LOAD_STORE_LANE_INDEX:
+ gcc_assert (argc > 1);
+ if (CONST_INT_P (op[argc]))
+ {
+ neon_lane_bounds (op[argc], 0,
+ GET_MODE_NUNITS (map_mode), exp);
+ /* Keep to GCC-vector-extension lane indices in the RTL. */
+ op[argc] =
+ GEN_INT (NEON_ENDIAN_LANE_N (map_mode, INTVAL (op[argc])));
+ }
+ goto constant_arg;
+
case NEON_ARG_LANE_INDEX:
/* Previous argument must be a vector, which this indexes. */
gcc_assert (argc > 0);
@@ -2089,19 +2102,22 @@ arm_expand_neon_args (rtx target, machine_mode map_mode, int fcode,
}
/* Fall through - if the lane index isn't a constant then
the next case will error. */
+
case NEON_ARG_CONSTANT:
+constant_arg:
if (!(*insn_data[icode].operand[opno].predicate)
(op[argc], mode[argc]))
- error_at (EXPR_LOCATION (exp), "incompatible type for argument %d, "
- "expected %<const int%>", argc + 1);
+ {
+ error ("%Kargument %d must be a constant immediate",
+ exp, argc + 1);
+ return const0_rtx;
+ }
break;
+
case NEON_ARG_MEMORY:
/* Check if expand failed. */
if (op[argc] == const0_rtx)
- {
- va_end (ap);
return 0;
- }
gcc_assert (MEM_P (op[argc]));
PUT_MODE (op[argc], mode[argc]);
/* ??? arm_neon.h uses the same built-in functions for signed
@@ -2122,8 +2138,6 @@ arm_expand_neon_args (rtx target, machine_mode map_mode, int fcode,
}
}
- va_end (ap);
-
if (have_retval)
switch (argc)
{
@@ -2235,6 +2249,8 @@ arm_expand_neon_builtin (int fcode, tree exp, rtx target)
if (d->qualifiers[qualifiers_k] & qualifier_lane_index)
args[k] = NEON_ARG_LANE_INDEX;
+ else if (d->qualifiers[qualifiers_k] & qualifier_struct_load_store_lane_index)
+ args[k] = NEON_ARG_STRUCT_LOAD_STORE_LANE_INDEX;
else if (d->qualifiers[qualifiers_k] & qualifier_immediate)
args[k] = NEON_ARG_CONSTANT;
else if (d->qualifiers[qualifiers_k] & qualifier_maybe_immediate)
@@ -2260,11 +2276,7 @@ arm_expand_neon_builtin (int fcode, tree exp, rtx target)
the function is void, and a 1 if it is not. */
return arm_expand_neon_args
(target, d->mode, fcode, icode, !is_void, exp,
- args[1],
- args[2],
- args[3],
- args[4],
- NEON_ARG_STOP);
+ &args[1]);
}
/* Expand an expression EXP that calls a built-in function,
diff --git a/gcc/config/arm/arm-cores.def b/gcc/config/arm/arm-cores.def
index 4c35200b3f8..86ed0cb1dbe 100644
--- a/gcc/config/arm/arm-cores.def
+++ b/gcc/config/arm/arm-cores.def
@@ -169,6 +169,7 @@ ARM_CORE("cortex-a53", cortexa53, cortexa53, 8A, ARM_FSET_MAKE_CPU1 (FL_LDSCHED
ARM_CORE("cortex-a57", cortexa57, cortexa57, 8A, ARM_FSET_MAKE_CPU1 (FL_LDSCHED | FL_CRC32 | FL_FOR_ARCH8A), cortex_a57)
ARM_CORE("cortex-a72", cortexa72, cortexa57, 8A, ARM_FSET_MAKE_CPU1 (FL_LDSCHED | FL_CRC32 | FL_FOR_ARCH8A), cortex_a57)
ARM_CORE("exynos-m1", exynosm1, cortexa57, 8A, ARM_FSET_MAKE_CPU1 (FL_LDSCHED | FL_CRC32 | FL_FOR_ARCH8A), cortex_a57)
+ARM_CORE("qdf24xx", qdf24xx, cortexa57, 8A, ARM_FSET_MAKE_CPU1 (FL_LDSCHED | FL_CRC32 | FL_FOR_ARCH8A), cortex_a57)
ARM_CORE("xgene1", xgene1, xgene1, 8A, ARM_FSET_MAKE_CPU1 (FL_LDSCHED | FL_FOR_ARCH8A), xgene1)
/* V8 big.LITTLE implementations */
diff --git a/gcc/config/arm/arm-tables.opt b/gcc/config/arm/arm-tables.opt
index 77e44aac0b8..41bf1ff250b 100644
--- a/gcc/config/arm/arm-tables.opt
+++ b/gcc/config/arm/arm-tables.opt
@@ -316,6 +316,9 @@ EnumValue
Enum(processor_type) String(exynos-m1) Value(exynosm1)
EnumValue
+Enum(processor_type) String(qdf24xx) Value(qdf24xx)
+
+EnumValue
Enum(processor_type) String(xgene1) Value(xgene1)
EnumValue
diff --git a/gcc/config/arm/arm-tune.md b/gcc/config/arm/arm-tune.md
index 8b21d179e04..e56b5ad8cb5 100644
--- a/gcc/config/arm/arm-tune.md
+++ b/gcc/config/arm/arm-tune.md
@@ -33,6 +33,6 @@
cortexm7,cortexm4,cortexm3,
marvell_pj4,cortexa15cortexa7,cortexa17cortexa7,
cortexa53,cortexa57,cortexa72,
- exynosm1,xgene1,cortexa57cortexa53,
- cortexa72cortexa53"
+ exynosm1,qdf24xx,xgene1,
+ cortexa57cortexa53,cortexa72cortexa53"
(const (symbol_ref "((enum attr_tune) arm_tune)")))
diff --git a/gcc/config/arm/arm.c b/gcc/config/arm/arm.c
index 736e6c8f025..e31be67328d 100644
--- a/gcc/config/arm/arm.c
+++ b/gcc/config/arm/arm.c
@@ -2704,6 +2704,12 @@ static void
arm_option_check_internal (struct gcc_options *opts)
{
int flags = opts->x_target_flags;
+ const struct arm_fpu_desc *fpu_desc = &all_fpus[opts->x_arm_fpu_index];
+
+ /* iWMMXt and NEON are incompatible. */
+ if (TARGET_IWMMXT && TARGET_VFP
+ && ARM_FPU_FSET_HAS (fpu_desc->features, FPU_FL_NEON))
+ error ("iWMMXt and NEON are incompatible");
/* Make sure that the processor choice does not conflict with any of the
other command line choices. */
@@ -3154,10 +3160,6 @@ arm_option_override (void)
error ("AAPCS does not support -mcallee-super-interworking");
}
- /* iWMMXt and NEON are incompatible. */
- if (TARGET_IWMMXT && TARGET_NEON)
- error ("iWMMXt and NEON are incompatible");
-
/* __fp16 support currently assumes the core has ldrh. */
if (!arm_arch4 && arm_fp16_format != ARM_FP16_FORMAT_NONE)
sorry ("__fp16 and no ldrh");
@@ -12960,14 +12962,14 @@ neon_vector_mem_operand (rtx op, int type, bool strict)
rtx ind;
/* Reject eliminable registers. */
- if (! (reload_in_progress || reload_completed)
- && ( reg_mentioned_p (frame_pointer_rtx, op)
+ if (strict && ! (reload_in_progress || reload_completed)
+ && (reg_mentioned_p (frame_pointer_rtx, op)
|| reg_mentioned_p (arg_pointer_rtx, op)
|| reg_mentioned_p (virtual_incoming_args_rtx, op)
|| reg_mentioned_p (virtual_outgoing_args_rtx, op)
|| reg_mentioned_p (virtual_stack_dynamic_rtx, op)
|| reg_mentioned_p (virtual_stack_vars_rtx, op)))
- return !strict;
+ return FALSE;
/* Constants are converted into offsets from labels. */
if (!MEM_P (op))
@@ -25867,7 +25869,6 @@ arm_file_start (void)
if (TARGET_BPABI)
{
- const char *fpu_name;
if (arm_selected_arch)
{
/* armv7ve doesn't support any extensions. */
@@ -25911,23 +25912,14 @@ arm_file_start (void)
if (print_tune_info)
arm_print_tune_info ();
- if (TARGET_SOFT_FLOAT)
+ if (! TARGET_SOFT_FLOAT && TARGET_VFP)
{
- fpu_name = "softvfp";
- }
- else
- {
- fpu_name = arm_fpu_desc->name;
- if (arm_fpu_desc->model == ARM_FP_MODEL_VFP)
- {
- if (TARGET_HARD_FLOAT && TARGET_VFP_SINGLE)
- arm_emit_eabi_attribute ("Tag_ABI_HardFP_use", 27, 1);
+ if (TARGET_HARD_FLOAT && TARGET_VFP_SINGLE)
+ arm_emit_eabi_attribute ("Tag_ABI_HardFP_use", 27, 1);
- if (TARGET_HARD_FLOAT_ABI)
- arm_emit_eabi_attribute ("Tag_ABI_VFP_args", 28, 1);
- }
+ if (TARGET_HARD_FLOAT_ABI)
+ arm_emit_eabi_attribute ("Tag_ABI_VFP_args", 28, 1);
}
- asm_fprintf (asm_out_file, "\t.fpu %s\n", fpu_name);
/* Some of these attributes only apply when the corresponding features
are used. However we don't have any easy way of figuring this out.
@@ -29766,11 +29758,14 @@ static void
arm_option_print (FILE *file, int indent, struct cl_target_option *ptr)
{
int flags = ptr->x_target_flags;
+ const struct arm_fpu_desc *fpu_desc = &all_fpus[ptr->x_arm_fpu_index];
fprintf (file, "%*sselected arch %s\n", indent, "",
TARGET_THUMB2_P (flags) ? "thumb2" :
TARGET_THUMB_P (flags) ? "thumb1" :
"arm");
+
+ fprintf (file, "%*sselected fpu %s\n", indent, "", fpu_desc->name);
}
/* Hook to determine if one function can safely inline another. */
@@ -29979,6 +29974,9 @@ arm_declare_function_name (FILE *stream, const char *name, tree decl)
else
fprintf (stream, "\t.arm\n");
+ asm_fprintf (asm_out_file, "\t.fpu %s\n", TARGET_SOFT_FLOAT
+ ? "softvfp" : arm_fpu_desc->name);
+
if (TARGET_POKE_FUNCTION_NAME)
arm_poke_function_name (stream, (const char *) name);
}
@@ -30103,4 +30101,5 @@ arm_sched_fusion_priority (rtx_insn *insn, int max_pri,
*pri = tmp;
return;
}
+
#include "gt-arm.h"
diff --git a/gcc/config/arm/arm.h b/gcc/config/arm/arm.h
index a1a04a94ef2..313fed5b450 100644
--- a/gcc/config/arm/arm.h
+++ b/gcc/config/arm/arm.h
@@ -284,6 +284,12 @@ extern void (*arm_lang_output_object_attributes_hook)(void);
#define TARGET_BPABI false
#endif
+/* Transform lane numbers on big endian targets. This is used to allow for the
+ endianness difference between NEON architectural lane numbers and those
+ used in RTL */
+#define NEON_ENDIAN_LANE_N(mode, n) \
+ (BYTES_BIG_ENDIAN ? GET_MODE_NUNITS (mode) - 1 - n : n)
+
/* Support for a compile-time default CPU, et cetera. The rules are:
--with-arch is ignored if -march or -mcpu are specified.
--with-cpu is ignored if -march or -mcpu are specified, and is overridden
diff --git a/gcc/config/arm/arm.md b/gcc/config/arm/arm.md
index 8ebb1bfd221..73c308825c4 100644
--- a/gcc/config/arm/arm.md
+++ b/gcc/config/arm/arm.md
@@ -747,8 +747,8 @@
"TARGET_32BIT"
"@
adds%?\\t%0, %1, %2
- adds%?\\t%0, %1, %2
- subs%?\\t%0, %1, #%n2"
+ subs%?\\t%0, %1, #%n2
+ adds%?\\t%0, %1, %2"
[(set_attr "conds" "set")
(set_attr "type" "alus_imm,alus_imm,alus_sreg")]
)
diff --git a/gcc/config/arm/arm.opt b/gcc/config/arm/arm.opt
index c12f2b13a03..6f2db8f3a0d 100644
--- a/gcc/config/arm/arm.opt
+++ b/gcc/config/arm/arm.opt
@@ -144,7 +144,7 @@ EnumValue
Enum(arm_fp16_format_type) String(alternative) Value(ARM_FP16_FORMAT_ALTERNATIVE)
mfpu=
-Target RejectNegative Joined Enum(arm_fpu) Var(arm_fpu_index)
+Target RejectNegative Joined Enum(arm_fpu) Var(arm_fpu_index) Save
Specify the name of the target floating point hardware/format.
mhard-float
diff --git a/gcc/config/arm/bpabi.h b/gcc/config/arm/bpabi.h
index ceaf2cc3385..8af460549b0 100644
--- a/gcc/config/arm/bpabi.h
+++ b/gcc/config/arm/bpabi.h
@@ -74,6 +74,7 @@
|mcpu=cortex-a72 \
|mcpu=cortex-a72.cortex-a53 \
|mcpu=exynos-m1 \
+ |mcpu=qdf24xx \
|mcpu=xgene1 \
|mcpu=cortex-m1.small-multiply \
|mcpu=cortex-m0.small-multiply \
@@ -99,6 +100,7 @@
|mcpu=cortex-a72 \
|mcpu=cortex-a72.cortex-a53 \
|mcpu=exynos-m1 \
+ |mcpu=qdf24xx \
|mcpu=xgene1 \
|mcpu=cortex-m1.small-multiply \
|mcpu=cortex-m0.small-multiply \
diff --git a/gcc/config/arm/neon.md b/gcc/config/arm/neon.md
index e5a2b0f1c9a..62fb6daae99 100644
--- a/gcc/config/arm/neon.md
+++ b/gcc/config/arm/neon.md
@@ -4253,6 +4253,9 @@ if (BYTES_BIG_ENDIAN)
[(set_attr "type" "neon_load1_1reg<q>")]
)
+;; The lane numbers in the RTL are in GCC lane order, having been flipped
+;; in arm_expand_neon_args. The lane numbers are restored to architectural
+;; lane order here.
(define_insn "neon_vld1_lane<mode>"
[(set (match_operand:VDX 0 "s_register_operand" "=w")
(unspec:VDX [(match_operand:<V_elem> 1 "neon_struct_operand" "Um")
@@ -4261,10 +4264,9 @@ if (BYTES_BIG_ENDIAN)
UNSPEC_VLD1_LANE))]
"TARGET_NEON"
{
- HOST_WIDE_INT lane = INTVAL (operands[3]);
+ HOST_WIDE_INT lane = NEON_ENDIAN_LANE_N(<MODE>mode, INTVAL (operands[3]));
HOST_WIDE_INT max = GET_MODE_NUNITS (<MODE>mode);
- if (lane < 0 || lane >= max)
- error ("lane out of range");
+ operands[3] = GEN_INT (lane);
if (max == 1)
return "vld1.<V_sz_elem>\t%P0, %A1";
else
@@ -4273,6 +4275,8 @@ if (BYTES_BIG_ENDIAN)
[(set_attr "type" "neon_load1_one_lane<q>")]
)
+;; see comment on neon_vld1_lane for reason why the lane numbers are reversed
+;; here on big endian targets.
(define_insn "neon_vld1_lane<mode>"
[(set (match_operand:VQX 0 "s_register_operand" "=w")
(unspec:VQX [(match_operand:<V_elem> 1 "neon_struct_operand" "Um")
@@ -4281,12 +4285,11 @@ if (BYTES_BIG_ENDIAN)
UNSPEC_VLD1_LANE))]
"TARGET_NEON"
{
- HOST_WIDE_INT lane = INTVAL (operands[3]);
+ HOST_WIDE_INT lane = NEON_ENDIAN_LANE_N(<MODE>mode, INTVAL (operands[3]));
HOST_WIDE_INT max = GET_MODE_NUNITS (<MODE>mode);
+ operands[3] = GEN_INT (lane);
int regno = REGNO (operands[0]);
- if (lane < 0 || lane >= max)
- error ("lane out of range");
- else if (lane >= max / 2)
+ if (lane >= max / 2)
{
lane -= max / 2;
regno += 2;
@@ -4359,6 +4362,8 @@ if (BYTES_BIG_ENDIAN)
"vst1.<V_sz_elem>\t%h1, %A0"
[(set_attr "type" "neon_store1_1reg<q>")])
+;; see comment on neon_vld1_lane for reason why the lane numbers are reversed
+;; here on big endian targets.
(define_insn "neon_vst1_lane<mode>"
[(set (match_operand:<V_elem> 0 "neon_struct_operand" "=Um")
(unspec:<V_elem>
@@ -4367,10 +4372,9 @@ if (BYTES_BIG_ENDIAN)
UNSPEC_VST1_LANE))]
"TARGET_NEON"
{
- HOST_WIDE_INT lane = INTVAL (operands[2]);
+ HOST_WIDE_INT lane = NEON_ENDIAN_LANE_N(<MODE>mode, INTVAL (operands[2]));
HOST_WIDE_INT max = GET_MODE_NUNITS (<MODE>mode);
- if (lane < 0 || lane >= max)
- error ("lane out of range");
+ operands[2] = GEN_INT (lane);
if (max == 1)
return "vst1.<V_sz_elem>\t{%P1}, %A0";
else
@@ -4379,6 +4383,8 @@ if (BYTES_BIG_ENDIAN)
[(set_attr "type" "neon_store1_one_lane<q>")]
)
+;; see comment on neon_vld1_lane for reason why the lane numbers are reversed
+;; here on big endian targets.
(define_insn "neon_vst1_lane<mode>"
[(set (match_operand:<V_elem> 0 "neon_struct_operand" "=Um")
(unspec:<V_elem>
@@ -4387,17 +4393,15 @@ if (BYTES_BIG_ENDIAN)
UNSPEC_VST1_LANE))]
"TARGET_NEON"
{
- HOST_WIDE_INT lane = INTVAL (operands[2]);
+ HOST_WIDE_INT lane = NEON_ENDIAN_LANE_N(<MODE>mode, INTVAL (operands[2]));
HOST_WIDE_INT max = GET_MODE_NUNITS (<MODE>mode);
int regno = REGNO (operands[1]);
- if (lane < 0 || lane >= max)
- error ("lane out of range");
- else if (lane >= max / 2)
+ if (lane >= max / 2)
{
lane -= max / 2;
regno += 2;
- operands[2] = GEN_INT (lane);
}
+ operands[2] = GEN_INT (lane);
operands[1] = gen_rtx_REG (<V_HALF>mode, regno);
if (max == 2)
return "vst1.<V_sz_elem>\t{%P1}, %A0";
@@ -4448,6 +4452,8 @@ if (BYTES_BIG_ENDIAN)
"vld2.<V_sz_elem>\t%h0, %A1"
[(set_attr "type" "neon_load2_2reg_q")])
+;; see comment on neon_vld1_lane for reason why the lane numbers are reversed
+;; here on big endian targets.
(define_insn "neon_vld2_lane<mode>"
[(set (match_operand:TI 0 "s_register_operand" "=w")
(unspec:TI [(match_operand:<V_two_elem> 1 "neon_struct_operand" "Um")
@@ -4457,22 +4463,21 @@ if (BYTES_BIG_ENDIAN)
UNSPEC_VLD2_LANE))]
"TARGET_NEON"
{
- HOST_WIDE_INT lane = INTVAL (operands[3]);
- HOST_WIDE_INT max = GET_MODE_NUNITS (<MODE>mode);
+ HOST_WIDE_INT lane = NEON_ENDIAN_LANE_N(<MODE>mode, INTVAL (operands[3]));
int regno = REGNO (operands[0]);
rtx ops[4];
- if (lane < 0 || lane >= max)
- error ("lane out of range");
ops[0] = gen_rtx_REG (DImode, regno);
ops[1] = gen_rtx_REG (DImode, regno + 2);
ops[2] = operands[1];
- ops[3] = operands[3];
+ ops[3] = GEN_INT (lane);
output_asm_insn ("vld2.<V_sz_elem>\t{%P0[%c3], %P1[%c3]}, %A2", ops);
return "";
}
[(set_attr "type" "neon_load2_one_lane<q>")]
)
+;; see comment on neon_vld1_lane for reason why the lane numbers are reversed
+;; here on big endian targets.
(define_insn "neon_vld2_lane<mode>"
[(set (match_operand:OI 0 "s_register_operand" "=w")
(unspec:OI [(match_operand:<V_two_elem> 1 "neon_struct_operand" "Um")
@@ -4482,13 +4487,11 @@ if (BYTES_BIG_ENDIAN)
UNSPEC_VLD2_LANE))]
"TARGET_NEON"
{
- HOST_WIDE_INT lane = INTVAL (operands[3]);
+ HOST_WIDE_INT lane = NEON_ENDIAN_LANE_N(<MODE>mode, INTVAL (operands[3]));
HOST_WIDE_INT max = GET_MODE_NUNITS (<MODE>mode);
int regno = REGNO (operands[0]);
rtx ops[4];
- if (lane < 0 || lane >= max)
- error ("lane out of range");
- else if (lane >= max / 2)
+ if (lane >= max / 2)
{
lane -= max / 2;
regno += 2;
@@ -4563,6 +4566,8 @@ if (BYTES_BIG_ENDIAN)
[(set_attr "type" "neon_store2_4reg<q>")]
)
+;; see comment on neon_vld1_lane for reason why the lane numbers are reversed
+;; here on big endian targets.
(define_insn "neon_vst2_lane<mode>"
[(set (match_operand:<V_two_elem> 0 "neon_struct_operand" "=Um")
(unspec:<V_two_elem>
@@ -4572,22 +4577,21 @@ if (BYTES_BIG_ENDIAN)
UNSPEC_VST2_LANE))]
"TARGET_NEON"
{
- HOST_WIDE_INT lane = INTVAL (operands[2]);
- HOST_WIDE_INT max = GET_MODE_NUNITS (<MODE>mode);
+ HOST_WIDE_INT lane = NEON_ENDIAN_LANE_N(<MODE>mode, INTVAL (operands[2]));
int regno = REGNO (operands[1]);
rtx ops[4];
- if (lane < 0 || lane >= max)
- error ("lane out of range");
ops[0] = operands[0];
ops[1] = gen_rtx_REG (DImode, regno);
ops[2] = gen_rtx_REG (DImode, regno + 2);
- ops[3] = operands[2];
+ ops[3] = GEN_INT (lane);
output_asm_insn ("vst2.<V_sz_elem>\t{%P1[%c3], %P2[%c3]}, %A0", ops);
return "";
}
[(set_attr "type" "neon_store2_one_lane<q>")]
)
+;; see comment on neon_vld1_lane for reason why the lane numbers are reversed
+;; here on big endian targets.
(define_insn "neon_vst2_lane<mode>"
[(set (match_operand:<V_two_elem> 0 "neon_struct_operand" "=Um")
(unspec:<V_two_elem>
@@ -4597,13 +4601,11 @@ if (BYTES_BIG_ENDIAN)
UNSPEC_VST2_LANE))]
"TARGET_NEON"
{
- HOST_WIDE_INT lane = INTVAL (operands[2]);
+ HOST_WIDE_INT lane = NEON_ENDIAN_LANE_N(<MODE>mode, INTVAL (operands[2]));
HOST_WIDE_INT max = GET_MODE_NUNITS (<MODE>mode);
int regno = REGNO (operands[1]);
rtx ops[4];
- if (lane < 0 || lane >= max)
- error ("lane out of range");
- else if (lane >= max / 2)
+ if (lane >= max / 2)
{
lane -= max / 2;
regno += 2;
@@ -4707,6 +4709,8 @@ if (BYTES_BIG_ENDIAN)
[(set_attr "type" "neon_load3_3reg<q>")]
)
+;; see comment on neon_vld1_lane for reason why the lane numbers are reversed
+;; here on big endian targets.
(define_insn "neon_vld3_lane<mode>"
[(set (match_operand:EI 0 "s_register_operand" "=w")
(unspec:EI [(match_operand:<V_three_elem> 1 "neon_struct_operand" "Um")
@@ -4716,17 +4720,14 @@ if (BYTES_BIG_ENDIAN)
UNSPEC_VLD3_LANE))]
"TARGET_NEON"
{
- HOST_WIDE_INT lane = INTVAL (operands[3]);
- HOST_WIDE_INT max = GET_MODE_NUNITS (<MODE>mode);
+ HOST_WIDE_INT lane = NEON_ENDIAN_LANE_N (<MODE>mode, INTVAL (operands[3]));
int regno = REGNO (operands[0]);
rtx ops[5];
- if (lane < 0 || lane >= max)
- error ("lane out of range");
ops[0] = gen_rtx_REG (DImode, regno);
ops[1] = gen_rtx_REG (DImode, regno + 2);
ops[2] = gen_rtx_REG (DImode, regno + 4);
ops[3] = operands[1];
- ops[4] = operands[3];
+ ops[4] = GEN_INT (lane);
output_asm_insn ("vld3.<V_sz_elem>\t{%P0[%c4], %P1[%c4], %P2[%c4]}, %3",
ops);
return "";
@@ -4734,6 +4735,8 @@ if (BYTES_BIG_ENDIAN)
[(set_attr "type" "neon_load3_one_lane<q>")]
)
+;; see comment on neon_vld1_lane for reason why the lane numbers are reversed
+;; here on big endian targets.
(define_insn "neon_vld3_lane<mode>"
[(set (match_operand:CI 0 "s_register_operand" "=w")
(unspec:CI [(match_operand:<V_three_elem> 1 "neon_struct_operand" "Um")
@@ -4743,13 +4746,11 @@ if (BYTES_BIG_ENDIAN)
UNSPEC_VLD3_LANE))]
"TARGET_NEON"
{
- HOST_WIDE_INT lane = INTVAL (operands[3]);
+ HOST_WIDE_INT lane = NEON_ENDIAN_LANE_N(<MODE>mode, INTVAL (operands[3]));
HOST_WIDE_INT max = GET_MODE_NUNITS (<MODE>mode);
int regno = REGNO (operands[0]);
rtx ops[5];
- if (lane < 0 || lane >= max)
- error ("lane out of range");
- else if (lane >= max / 2)
+ if (lane >= max / 2)
{
lane -= max / 2;
regno += 2;
@@ -4879,6 +4880,8 @@ if (BYTES_BIG_ENDIAN)
[(set_attr "type" "neon_store3_3reg<q>")]
)
+;; see comment on neon_vld1_lane for reason why the lane numbers are reversed
+;; here on big endian targets.
(define_insn "neon_vst3_lane<mode>"
[(set (match_operand:<V_three_elem> 0 "neon_struct_operand" "=Um")
(unspec:<V_three_elem>
@@ -4888,17 +4891,14 @@ if (BYTES_BIG_ENDIAN)
UNSPEC_VST3_LANE))]
"TARGET_NEON"
{
- HOST_WIDE_INT lane = INTVAL (operands[2]);
- HOST_WIDE_INT max = GET_MODE_NUNITS (<MODE>mode);
+ HOST_WIDE_INT lane = NEON_ENDIAN_LANE_N(<MODE>mode, INTVAL (operands[2]));
int regno = REGNO (operands[1]);
rtx ops[5];
- if (lane < 0 || lane >= max)
- error ("lane out of range");
ops[0] = operands[0];
ops[1] = gen_rtx_REG (DImode, regno);
ops[2] = gen_rtx_REG (DImode, regno + 2);
ops[3] = gen_rtx_REG (DImode, regno + 4);
- ops[4] = operands[2];
+ ops[4] = GEN_INT (lane);
output_asm_insn ("vst3.<V_sz_elem>\t{%P1[%c4], %P2[%c4], %P3[%c4]}, %0",
ops);
return "";
@@ -4906,6 +4906,8 @@ if (BYTES_BIG_ENDIAN)
[(set_attr "type" "neon_store3_one_lane<q>")]
)
+;; see comment on neon_vld1_lane for reason why the lane numbers are reversed
+;; here on big endian targets.
(define_insn "neon_vst3_lane<mode>"
[(set (match_operand:<V_three_elem> 0 "neon_struct_operand" "=Um")
(unspec:<V_three_elem>
@@ -4915,13 +4917,11 @@ if (BYTES_BIG_ENDIAN)
UNSPEC_VST3_LANE))]
"TARGET_NEON"
{
- HOST_WIDE_INT lane = INTVAL (operands[2]);
+ HOST_WIDE_INT lane = NEON_ENDIAN_LANE_N(<MODE>mode, INTVAL (operands[2]));
HOST_WIDE_INT max = GET_MODE_NUNITS (<MODE>mode);
int regno = REGNO (operands[1]);
rtx ops[5];
- if (lane < 0 || lane >= max)
- error ("lane out of range");
- else if (lane >= max / 2)
+ if (lane >= max / 2)
{
lane -= max / 2;
regno += 2;
@@ -5029,6 +5029,8 @@ if (BYTES_BIG_ENDIAN)
[(set_attr "type" "neon_load4_4reg<q>")]
)
+;; see comment on neon_vld1_lane for reason why the lane numbers are reversed
+;; here on big endian targets.
(define_insn "neon_vld4_lane<mode>"
[(set (match_operand:OI 0 "s_register_operand" "=w")
(unspec:OI [(match_operand:<V_four_elem> 1 "neon_struct_operand" "Um")
@@ -5038,18 +5040,15 @@ if (BYTES_BIG_ENDIAN)
UNSPEC_VLD4_LANE))]
"TARGET_NEON"
{
- HOST_WIDE_INT lane = INTVAL (operands[3]);
- HOST_WIDE_INT max = GET_MODE_NUNITS (<MODE>mode);
+ HOST_WIDE_INT lane = NEON_ENDIAN_LANE_N(<MODE>mode, INTVAL (operands[3]));
int regno = REGNO (operands[0]);
rtx ops[6];
- if (lane < 0 || lane >= max)
- error ("lane out of range");
ops[0] = gen_rtx_REG (DImode, regno);
ops[1] = gen_rtx_REG (DImode, regno + 2);
ops[2] = gen_rtx_REG (DImode, regno + 4);
ops[3] = gen_rtx_REG (DImode, regno + 6);
ops[4] = operands[1];
- ops[5] = operands[3];
+ ops[5] = GEN_INT (lane);
output_asm_insn ("vld4.<V_sz_elem>\t{%P0[%c5], %P1[%c5], %P2[%c5], %P3[%c5]}, %A4",
ops);
return "";
@@ -5057,6 +5056,8 @@ if (BYTES_BIG_ENDIAN)
[(set_attr "type" "neon_load4_one_lane<q>")]
)
+;; see comment on neon_vld1_lane for reason why the lane numbers are reversed
+;; here on big endian targets.
(define_insn "neon_vld4_lane<mode>"
[(set (match_operand:XI 0 "s_register_operand" "=w")
(unspec:XI [(match_operand:<V_four_elem> 1 "neon_struct_operand" "Um")
@@ -5066,13 +5067,11 @@ if (BYTES_BIG_ENDIAN)
UNSPEC_VLD4_LANE))]
"TARGET_NEON"
{
- HOST_WIDE_INT lane = INTVAL (operands[3]);
+ HOST_WIDE_INT lane = NEON_ENDIAN_LANE_N(<MODE>mode, INTVAL (operands[3]));
HOST_WIDE_INT max = GET_MODE_NUNITS (<MODE>mode);
int regno = REGNO (operands[0]);
rtx ops[6];
- if (lane < 0 || lane >= max)
- error ("lane out of range");
- else if (lane >= max / 2)
+ if (lane >= max / 2)
{
lane -= max / 2;
regno += 2;
@@ -5209,6 +5208,8 @@ if (BYTES_BIG_ENDIAN)
[(set_attr "type" "neon_store4_4reg<q>")]
)
+;; see comment on neon_vld1_lane for reason why the lane numbers are reversed
+;; here on big endian targets.
(define_insn "neon_vst4_lane<mode>"
[(set (match_operand:<V_four_elem> 0 "neon_struct_operand" "=Um")
(unspec:<V_four_elem>
@@ -5218,18 +5219,15 @@ if (BYTES_BIG_ENDIAN)
UNSPEC_VST4_LANE))]
"TARGET_NEON"
{
- HOST_WIDE_INT lane = INTVAL (operands[2]);
- HOST_WIDE_INT max = GET_MODE_NUNITS (<MODE>mode);
+ HOST_WIDE_INT lane = NEON_ENDIAN_LANE_N(<MODE>mode, INTVAL (operands[2]));
int regno = REGNO (operands[1]);
rtx ops[6];
- if (lane < 0 || lane >= max)
- error ("lane out of range");
ops[0] = operands[0];
ops[1] = gen_rtx_REG (DImode, regno);
ops[2] = gen_rtx_REG (DImode, regno + 2);
ops[3] = gen_rtx_REG (DImode, regno + 4);
ops[4] = gen_rtx_REG (DImode, regno + 6);
- ops[5] = operands[2];
+ ops[5] = GEN_INT (lane);
output_asm_insn ("vst4.<V_sz_elem>\t{%P1[%c5], %P2[%c5], %P3[%c5], %P4[%c5]}, %A0",
ops);
return "";
@@ -5237,6 +5235,8 @@ if (BYTES_BIG_ENDIAN)
[(set_attr "type" "neon_store4_one_lane<q>")]
)
+;; see comment on neon_vld1_lane for reason why the lane numbers are reversed
+;; here on big endian targets.
(define_insn "neon_vst4_lane<mode>"
[(set (match_operand:<V_four_elem> 0 "neon_struct_operand" "=Um")
(unspec:<V_four_elem>
@@ -5246,13 +5246,11 @@ if (BYTES_BIG_ENDIAN)
UNSPEC_VST4_LANE))]
"TARGET_NEON"
{
- HOST_WIDE_INT lane = INTVAL (operands[2]);
+ HOST_WIDE_INT lane = NEON_ENDIAN_LANE_N(<MODE>mode, INTVAL (operands[2]));
HOST_WIDE_INT max = GET_MODE_NUNITS (<MODE>mode);
int regno = REGNO (operands[1]);
rtx ops[6];
- if (lane < 0 || lane >= max)
- error ("lane out of range");
- else if (lane >= max / 2)
+ if (lane >= max / 2)
{
lane -= max / 2;
regno += 2;
diff --git a/gcc/config/ft32/ft32.c b/gcc/config/ft32/ft32.c
index 85e5ba3bbe5..ab620617bf7 100644
--- a/gcc/config/ft32/ft32.c
+++ b/gcc/config/ft32/ft32.c
@@ -238,7 +238,7 @@ ft32_print_operand (FILE * file, rtx x, int code)
return;
case MEM:
- output_address (XEXP (operand, 0));
+ output_address (GET_MODE (XEXP (operand, 0)), XEXP (operand, 0));
return;
default:
diff --git a/gcc/config/ft32/ft32.md b/gcc/config/ft32/ft32.md
index 1eac74ddb79..5c1594d5e45 100644
--- a/gcc/config/ft32/ft32.md
+++ b/gcc/config/ft32/ft32.md
@@ -255,6 +255,13 @@
;; SImode
+(define_insn "*sne"
+ [(set (match_operand:SI 0 "register_operand" "=r")
+ (reg:SI CC_REG))]
+ ""
+ "bextu.l %0,$cc,32|0\;xor.l %0,%0,-1"
+)
+
;; Push a register onto the stack
(define_insn "movsi_push"
[(set (mem:SI (pre_dec:SI (reg:SI SP_REG)))
@@ -884,6 +891,7 @@
DONE;
})
+
(define_expand "epilogue"
[(return)]
""
diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c
index 9205d497f5a..805f7a88978 100644
--- a/gcc/config/i386/i386.c
+++ b/gcc/config/i386/i386.c
@@ -2175,7 +2175,7 @@ const struct processor_costs *ix86_cost = &pentium_cost;
#define m_BONNELL (1<<PROCESSOR_BONNELL)
#define m_SILVERMONT (1<<PROCESSOR_SILVERMONT)
#define m_KNL (1<<PROCESSOR_KNL)
-#define m_SKYLAKE_AVX512 (1<<PROCESSOT_SKYLAKE_AVX512)
+#define m_SKYLAKE_AVX512 (1<<PROCESSOR_SKYLAKE_AVX512)
#define m_INTEL (1<<PROCESSOR_INTEL)
#define m_GEODE (1<<PROCESSOR_GEODE)
@@ -6237,6 +6237,8 @@ ix86_valid_target_attribute_p (tree fndecl,
DECL_FUNCTION_SPECIFIC_OPTIMIZATION (fndecl) = new_optimize;
}
+ finalize_options_struct (&func_options);
+
return ret;
}
@@ -7236,11 +7238,12 @@ ix86_legitimate_combined_insn (rtx_insn *insn)
/* For pre-AVX disallow unaligned loads/stores where the
instructions don't support it. */
if (!TARGET_AVX
- && VECTOR_MODE_P (GET_MODE (op))
- && misaligned_operand (op, GET_MODE (op)))
+ && VECTOR_MODE_P (mode)
+ && misaligned_operand (op, mode))
{
- int min_align = get_attr_ssememalign (insn);
- if (min_align == 0)
+ unsigned int min_align = get_attr_ssememalign (insn);
+ if (min_align == 0
+ || MEM_ALIGN (op) < min_align)
return false;
}
@@ -12245,8 +12248,6 @@ ix86_adjust_stack_and_probe (const HOST_WIDE_INT size)
release_scratch_register_on_entry (&sr);
}
- gcc_assert (cfun->machine->fs.cfa_reg != stack_pointer_rtx);
-
/* Even if the stack pointer isn't the CFA register, we need to correctly
describe the adjustments made to it, in particular differentiate the
frame-related ones from the frame-unrelated ones. */
@@ -12470,7 +12471,11 @@ ix86_finalize_stack_realign_flags (void)
&& !crtl->accesses_prior_frames
&& !cfun->calls_alloca
&& !crtl->calls_eh_return
- && !(flag_stack_check && STACK_CHECK_MOVING_SP)
+ /* See ira_setup_eliminable_regset for the rationale. */
+ && !(STACK_CHECK_MOVING_SP
+ && flag_stack_check
+ && flag_exceptions
+ && cfun->can_throw_non_call_exceptions)
&& !ix86_frame_pointer_required ()
&& get_frame_size () == 0
&& ix86_nsaved_sseregs () == 0
@@ -36108,7 +36113,11 @@ get_builtin_code_for_version (tree decl, tree *predicate_list)
priority = P_PROC_AVX;
break;
case PROCESSOR_HASWELL:
- if (new_target->x_ix86_isa_flags & OPTION_MASK_ISA_ADX)
+ if (new_target->x_ix86_isa_flags & OPTION_MASK_ISA_AVX512VL)
+ arg_str = "skylake-avx512";
+ else if (new_target->x_ix86_isa_flags & OPTION_MASK_ISA_XSAVES)
+ arg_str = "skylake";
+ else if (new_target->x_ix86_isa_flags & OPTION_MASK_ISA_ADX)
arg_str = "broadwell";
else
arg_str = "haswell";
diff --git a/gcc/config/i386/predicates.md b/gcc/config/i386/predicates.md
index c11f2d7d228..8bdd5d88efb 100644
--- a/gcc/config/i386/predicates.md
+++ b/gcc/config/i386/predicates.md
@@ -1364,10 +1364,11 @@
(define_predicate "absneg_operator"
(match_code "abs,neg"))
-;; Return true if OP is misaligned memory operand
+;; Return true if OP is a memory operand, aligned to
+;; less than its natural alignment.
(define_predicate "misaligned_operand"
(and (match_code "mem")
- (match_test "MEM_ALIGN (op) < GET_MODE_ALIGNMENT (mode)")))
+ (match_test "MEM_ALIGN (op) < GET_MODE_BITSIZE (mode)")))
;; Return true if OP is a emms operation, known to be a PARALLEL.
(define_predicate "emms_operation"
diff --git a/gcc/config/mips/mips.c b/gcc/config/mips/mips.c
index 9880b236d6d..d3b7730486d 100644
--- a/gcc/config/mips/mips.c
+++ b/gcc/config/mips/mips.c
@@ -16824,6 +16824,34 @@ mips_avoid_hazard (rtx_insn *after, rtx_insn *insn, int *hilo_delay,
}
}
+/* A SEQUENCE is breakable iff the branch inside it has a compact form
+ and the target has compact branches. */
+
+static bool
+mips_breakable_sequence_p (rtx_insn *insn)
+{
+ return (insn && GET_CODE (PATTERN (insn)) == SEQUENCE
+ && TARGET_CB_MAYBE
+ && get_attr_compact_form (SEQ_BEGIN (insn)) != COMPACT_FORM_NEVER);
+}
+
+/* Remove a SEQUENCE and replace it with the delay slot instruction
+ followed by the branch and return the instruction in the delay slot.
+ Return the first of the two new instructions.
+ Subroutine of mips_reorg_process_insns. */
+
+static rtx_insn *
+mips_break_sequence (rtx_insn *insn)
+{
+ rtx_insn *before = PREV_INSN (insn);
+ rtx_insn *branch = SEQ_BEGIN (insn);
+ rtx_insn *ds = SEQ_END (insn);
+ remove_insn (insn);
+ add_insn_after (ds, before, NULL);
+ add_insn_after (branch, ds, NULL);
+ return ds;
+}
+
/* Go through the instruction stream and insert nops where necessary.
Also delete any high-part relocations whose partnering low parts
are now all dead. See if the whole function can then be put into
@@ -16916,6 +16944,68 @@ mips_reorg_process_insns (void)
{
if (GET_CODE (PATTERN (insn)) == SEQUENCE)
{
+ rtx_insn *next_active = next_active_insn (insn);
+ /* Undo delay slots to avoid bubbles if the next instruction can
+ be placed in a forbidden slot or the cost of adding an
+ explicit NOP in a forbidden slot is OK and if the SEQUENCE is
+ safely breakable. */
+ if (TARGET_CB_MAYBE
+ && mips_breakable_sequence_p (insn)
+ && INSN_P (SEQ_BEGIN (insn))
+ && INSN_P (SEQ_END (insn))
+ && ((next_active
+ && INSN_P (next_active)
+ && GET_CODE (PATTERN (next_active)) != SEQUENCE
+ && get_attr_can_delay (next_active) == CAN_DELAY_YES)
+ || !optimize_size))
+ {
+ /* To hide a potential pipeline bubble, if we scan backwards
+ from the current SEQUENCE and find that there is a load
+ of a value that is used in the CTI and there are no
+ dependencies between the CTI and instruction in the delay
+ slot, break the sequence so the load delay is hidden. */
+ HARD_REG_SET uses;
+ CLEAR_HARD_REG_SET (uses);
+ note_uses (&PATTERN (SEQ_BEGIN (insn)), record_hard_reg_uses,
+ &uses);
+ HARD_REG_SET delay_sets;
+ CLEAR_HARD_REG_SET (delay_sets);
+ note_stores (PATTERN (SEQ_END (insn)), record_hard_reg_sets,
+ &delay_sets);
+
+ rtx_insn *prev = prev_active_insn (insn);
+ if (prev
+ && GET_CODE (PATTERN (prev)) == SET
+ && MEM_P (SET_SRC (PATTERN (prev))))
+ {
+ HARD_REG_SET sets;
+ CLEAR_HARD_REG_SET (sets);
+ note_stores (PATTERN (prev), record_hard_reg_sets,
+ &sets);
+
+ /* Re-order if safe. */
+ if (!hard_reg_set_intersect_p (delay_sets, uses)
+ && hard_reg_set_intersect_p (uses, sets))
+ {
+ next_insn = mips_break_sequence (insn);
+ /* Need to process the hazards of the newly
+ introduced instructions. */
+ continue;
+ }
+ }
+
+ /* If we find an orphaned high-part relocation in a delay
+ slot then we can convert to a compact branch and get
+ the orphaned high part deleted. */
+ if (mips_orphaned_high_part_p (&htab, SEQ_END (insn)))
+ {
+ next_insn = mips_break_sequence (insn);
+ /* Need to process the hazards of the newly
+ introduced instructions. */
+ continue;
+ }
+ }
+
/* If we find an orphaned high-part relocation in a delay
slot, it's easier to turn that instruction into a NOP than
to delete it. The delay slot will be a NOP either way. */
@@ -16950,6 +17040,33 @@ mips_reorg_process_insns (void)
{
mips_avoid_hazard (last_insn, insn, &hilo_delay,
&delayed_reg, lo_reg, &fs_delay);
+ /* When a compact branch introduces a forbidden slot hazard
+ and the next useful instruction is a SEQUENCE of a jump
+ and a non-nop instruction in the delay slot, remove the
+ sequence and replace it with the delay slot instruction
+ then the jump to clear the forbidden slot hazard. */
+
+ if (fs_delay)
+ {
+ /* Search onwards from the current position looking for
+ a SEQUENCE. We are looking for pipeline hazards here
+ and do not need to worry about labels or barriers as
+ the optimization only undoes delay slot filling which
+ only affects the order of the branch and its delay
+ slot. */
+ rtx_insn *next = next_active_insn (insn);
+ if (next
+ && USEFUL_INSN_P (next)
+ && GET_CODE (PATTERN (next)) == SEQUENCE
+ && mips_breakable_sequence_p (next))
+ {
+ last_insn = insn;
+ next_insn = mips_break_sequence (next);
+ /* Need to process the hazards of the newly
+ introduced instructions. */
+ continue;
+ }
+ }
last_insn = insn;
}
}
diff --git a/gcc/config/moxie/moxie.c b/gcc/config/moxie/moxie.c
index a45b825ced0..756e2f74e2d 100644
--- a/gcc/config/moxie/moxie.c
+++ b/gcc/config/moxie/moxie.c
@@ -106,7 +106,7 @@ moxie_operand_lossage (const char *msgid, rtx op)
/* The PRINT_OPERAND_ADDRESS worker. */
static void
-moxie_print_operand_address (FILE *file, rtx x)
+moxie_print_operand_address (FILE *file, machine_mode, rtx x)
{
switch (GET_CODE (x))
{
@@ -183,7 +183,7 @@ moxie_print_operand (FILE *file, rtx x, int code)
return;
case MEM:
- output_address (XEXP (operand, 0));
+ output_address (GET_MODE (XEXP (operand, 0)), XEXP (operand, 0));
return;
default:
diff --git a/gcc/config/nvptx/nvptx.c b/gcc/config/nvptx/nvptx.c
index f1ac307b346..26c2e961051 100644
--- a/gcc/config/nvptx/nvptx.c
+++ b/gcc/config/nvptx/nvptx.c
@@ -137,6 +137,9 @@ nvptx_option_override (void)
write_symbols = NO_DEBUG;
debug_info_level = DINFO_LEVEL_NONE;
+ if (nvptx_optimize < 0)
+ nvptx_optimize = optimize > 0;
+
declared_fndecls_htab = hash_table<tree_hasher>::create_ggc (17);
needed_fndecls_htab = hash_table<tree_hasher>::create_ggc (17);
declared_libfuncs_htab
@@ -2942,6 +2945,69 @@ nvptx_skip_par (unsigned mask, parallel *par)
nvptx_single (mask, par->forked_block, pre_tail);
}
+/* If PAR has a single inner parallel and PAR itself only contains
+ empty entry and exit blocks, swallow the inner PAR. */
+
+static void
+nvptx_optimize_inner (parallel *par)
+{
+ parallel *inner = par->inner;
+
+ /* We mustn't be the outer dummy par. */
+ if (!par->mask)
+ return;
+
+ /* We must have a single inner par. */
+ if (!inner || inner->next)
+ return;
+
+ /* We must only contain 2 blocks ourselves -- the head and tail of
+ the inner par. */
+ if (par->blocks.length () != 2)
+ return;
+
+ /* We must be disjoint partitioning. As we only have vector and
+ worker partitioning, this is sufficient to guarantee the pars
+ have adjacent partitioning. */
+ if ((par->mask & inner->mask) & (GOMP_DIM_MASK (GOMP_DIM_MAX) - 1))
+ /* This indicates malformed code generation. */
+ return;
+
+ /* The outer forked insn should be immediately followed by the inner
+ fork insn. */
+ rtx_insn *forked = par->forked_insn;
+ rtx_insn *fork = BB_END (par->forked_block);
+
+ if (NEXT_INSN (forked) != fork)
+ return;
+ gcc_checking_assert (recog_memoized (fork) == CODE_FOR_nvptx_fork);
+
+ /* The outer joining insn must immediately follow the inner join
+ insn. */
+ rtx_insn *joining = par->joining_insn;
+ rtx_insn *join = inner->join_insn;
+ if (NEXT_INSN (join) != joining)
+ return;
+
+ /* Preconditions met. Swallow the inner par. */
+ if (dump_file)
+ fprintf (dump_file, "Merging loop %x [%d,%d] into %x [%d,%d]\n",
+ inner->mask, inner->forked_block->index,
+ inner->join_block->index,
+ par->mask, par->forked_block->index, par->join_block->index);
+
+ par->mask |= inner->mask & (GOMP_DIM_MASK (GOMP_DIM_MAX) - 1);
+
+ par->blocks.reserve (inner->blocks.length ());
+ while (inner->blocks.length ())
+ par->blocks.quick_push (inner->blocks.pop ());
+
+ par->inner = inner->inner;
+ inner->inner = NULL;
+
+ delete inner;
+}
+
/* Process the parallel PAR and all its contained
parallels. We do everything but the neutering. Return mask of
partitioned modes used within this parallel. */
@@ -2949,6 +3015,9 @@ nvptx_skip_par (unsigned mask, parallel *par)
static unsigned
nvptx_process_pars (parallel *par)
{
+ if (nvptx_optimize)
+ nvptx_optimize_inner (par);
+
unsigned inner_mask = par->mask;
/* Do the inner parallels first. */
@@ -3565,26 +3634,51 @@ nvptx_generate_vector_shuffle (location_t loc,
{
unsigned fn = NVPTX_BUILTIN_SHUFFLE;
tree_code code = NOP_EXPR;
- tree type = unsigned_type_node;
- enum machine_mode mode = TYPE_MODE (TREE_TYPE (var));
+ tree arg_type = unsigned_type_node;
+ tree var_type = TREE_TYPE (var);
+ tree dest_type = var_type;
- if (!INTEGRAL_MODE_P (mode))
+ if (TREE_CODE (var_type) == COMPLEX_TYPE)
+ var_type = TREE_TYPE (var_type);
+
+ if (TREE_CODE (var_type) == REAL_TYPE)
code = VIEW_CONVERT_EXPR;
- if (GET_MODE_SIZE (mode) == GET_MODE_SIZE (DImode))
+
+ if (TYPE_SIZE (var_type)
+ == TYPE_SIZE (long_long_unsigned_type_node))
{
fn = NVPTX_BUILTIN_SHUFFLELL;
- type = long_long_unsigned_type_node;
+ arg_type = long_long_unsigned_type_node;
}
-
+
tree call = nvptx_builtin_decl (fn, true);
- call = build_call_expr_loc
- (loc, call, 3, fold_build1 (code, type, var),
- build_int_cst (unsigned_type_node, shift),
- build_int_cst (unsigned_type_node, SHUFFLE_DOWN));
+ tree bits = build_int_cst (unsigned_type_node, shift);
+ tree kind = build_int_cst (unsigned_type_node, SHUFFLE_DOWN);
+ tree expr;
- call = fold_build1 (code, TREE_TYPE (dest_var), call);
+ if (var_type != dest_type)
+ {
+ /* Do real and imaginary parts separately. */
+ tree real = fold_build1 (REALPART_EXPR, var_type, var);
+ real = fold_build1 (code, arg_type, real);
+ real = build_call_expr_loc (loc, call, 3, real, bits, kind);
+ real = fold_build1 (code, var_type, real);
+
+ tree imag = fold_build1 (IMAGPART_EXPR, var_type, var);
+ imag = fold_build1 (code, arg_type, imag);
+ imag = build_call_expr_loc (loc, call, 3, imag, bits, kind);
+ imag = fold_build1 (code, var_type, imag);
+
+ expr = fold_build2 (COMPLEX_EXPR, dest_type, real, imag);
+ }
+ else
+ {
+ expr = fold_build1 (code, arg_type, var);
+ expr = build_call_expr_loc (loc, call, 3, expr, bits, kind);
+ expr = fold_build1 (code, dest_type, expr);
+ }
- gimplify_assign (dest_var, call, seq);
+ gimplify_assign (dest_var, expr, seq);
}
/* Insert code to locklessly update *PTR with *PTR OP VAR just before
diff --git a/gcc/config/nvptx/nvptx.opt b/gcc/config/nvptx/nvptx.opt
index 80170465bea..342915d8095 100644
--- a/gcc/config/nvptx/nvptx.opt
+++ b/gcc/config/nvptx/nvptx.opt
@@ -28,3 +28,7 @@ Generate code for a 64-bit ABI.
mmainkernel
Target Report RejectNegative
Link in code for a __main kernel.
+
+moptimize
+Target Report Var(nvptx_optimize) Init(-1)
+Optimize partition neutering
diff --git a/gcc/config/rs6000/aix.h b/gcc/config/rs6000/aix.h
index dbcfb9579cb..375a13edb27 100644
--- a/gcc/config/rs6000/aix.h
+++ b/gcc/config/rs6000/aix.h
@@ -101,8 +101,6 @@
{ \
builtin_define ("_IBMR2"); \
builtin_define ("_POWER"); \
- builtin_define ("__powerpc__"); \
- builtin_define ("__PPC__"); \
builtin_define ("__unix__"); \
builtin_define ("_AIX"); \
builtin_define ("_AIX32"); \
@@ -112,6 +110,22 @@
builtin_define ("__LONGDOUBLE128"); \
builtin_assert ("system=unix"); \
builtin_assert ("system=aix"); \
+ if (TARGET_64BIT) \
+ { \
+ builtin_define ("__PPC__"); \
+ builtin_define ("__PPC64__"); \
+ builtin_define ("__powerpc__"); \
+ builtin_define ("__powerpc64__"); \
+ builtin_assert ("cpu=powerpc64"); \
+ builtin_assert ("machine=powerpc64"); \
+ } \
+ else \
+ { \
+ builtin_define ("__PPC__"); \
+ builtin_define ("__powerpc__"); \
+ builtin_assert ("cpu=powerpc"); \
+ builtin_assert ("machine=powerpc"); \
+ } \
} \
while (0)
diff --git a/gcc/config/rs6000/constraints.md b/gcc/config/rs6000/constraints.md
index 7c69b6c9e1d..e4129453736 100644
--- a/gcc/config/rs6000/constraints.md
+++ b/gcc/config/rs6000/constraints.md
@@ -64,7 +64,8 @@
(define_register_constraint "wd" "rs6000_constraints[RS6000_CONSTRAINT_wd]"
"VSX vector register to hold vector double data or NO_REGS.")
-;; we is not currently used
+(define_register_constraint "we" "rs6000_constraints[RS6000_CONSTRAINT_we]"
+ "VSX register if the -mpower9-vector -m64 options were used or NO_REGS.")
(define_register_constraint "wf" "rs6000_constraints[RS6000_CONSTRAINT_wf]"
"VSX vector register to hold vector float data or NO_REGS.")
@@ -147,6 +148,12 @@
"Memory operand suitable for TOC fusion memory references"
(match_operand 0 "toc_fusion_mem_wrapped"))
+(define_constraint "wL"
+ "Int constant that is the element number mfvsrld accesses in a vector."
+ (and (match_code "const_int")
+ (and (match_test "TARGET_DIRECT_MOVE_128")
+ (match_test "(ival == VECTOR_ELEMENT_MFVSRLD_64BIT)"))))
+
;; Lq/stq validates the address for load/store quad
(define_memory_constraint "wQ"
"Memory operand suitable for the load/store quad instructions"
diff --git a/gcc/config/rs6000/rs6000-protos.h b/gcc/config/rs6000/rs6000-protos.h
index 9a149b9e29a..05007654787 100644
--- a/gcc/config/rs6000/rs6000-protos.h
+++ b/gcc/config/rs6000/rs6000-protos.h
@@ -55,6 +55,8 @@ extern const char *rs6000_output_move_128bit (rtx *);
extern bool rs6000_move_128bit_ok_p (rtx []);
extern bool rs6000_split_128bit_ok_p (rtx []);
extern void rs6000_expand_float128_convert (rtx, rtx, bool);
+extern void convert_float128_to_int (rtx *, enum rtx_code);
+extern void convert_int_to_float128 (rtx *, enum rtx_code);
extern void rs6000_expand_vector_init (rtx, rtx);
extern void paired_expand_vector_init (rtx, rtx);
extern void rs6000_expand_vector_set (rtx, rtx, int);
diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c
index ca93609bb6b..3e02d5cfb5c 100644
--- a/gcc/config/rs6000/rs6000.c
+++ b/gcc/config/rs6000/rs6000.c
@@ -2575,6 +2575,10 @@ rs6000_debug_reg_global (void)
if (TARGET_VSX)
fprintf (stderr, DEBUG_FMT_D, "VSX easy 64-bit scalar element",
(int)VECTOR_ELEMENT_SCALAR_64BIT);
+
+ if (TARGET_DIRECT_MOVE_128)
+ fprintf (stderr, DEBUG_FMT_D, "VSX easy 64-bit mfvsrld element",
+ (int)VECTOR_ELEMENT_MFVSRLD_64BIT);
}
@@ -2986,6 +2990,10 @@ rs6000_init_hard_regno_mode_ok (bool global_init_p)
rs6000_constraints[RS6000_CONSTRAINT_wp] = VSX_REGS; /* TFmode */
}
+ /* Support for new direct moves. */
+ if (TARGET_DIRECT_MOVE_128)
+ rs6000_constraints[RS6000_CONSTRAINT_we] = VSX_REGS;
+
/* Set up the reload helper and direct move functions. */
if (TARGET_VSX || TARGET_ALTIVEC)
{
@@ -3034,7 +3042,7 @@ rs6000_init_hard_regno_mode_ok (bool global_init_p)
reg_addr[TImode].reload_load = CODE_FOR_reload_ti_di_load;
}
- if (TARGET_DIRECT_MOVE)
+ if (TARGET_DIRECT_MOVE && !TARGET_DIRECT_MOVE_128)
{
reg_addr[TImode].reload_gpr_vsx = CODE_FOR_reload_gpr_from_vsxti;
reg_addr[V1TImode].reload_gpr_vsx = CODE_FOR_reload_gpr_from_vsxv1ti;
@@ -18081,6 +18089,11 @@ rs6000_secondary_reload_simple_move (enum rs6000_reg_type to_type,
|| (to_type == VSX_REG_TYPE && from_type == GPR_REG_TYPE)))
return true;
+ else if (TARGET_DIRECT_MOVE_128 && size == 16
+ && ((to_type == VSX_REG_TYPE && from_type == GPR_REG_TYPE)
+ || (to_type == GPR_REG_TYPE && from_type == VSX_REG_TYPE)))
+ return true;
+
else if (TARGET_MFPGPR && TARGET_POWERPC64 && size == 8
&& ((to_type == GPR_REG_TYPE && from_type == FPR_REG_TYPE)
|| (to_type == FPR_REG_TYPE && from_type == GPR_REG_TYPE)))
@@ -18094,7 +18107,7 @@ rs6000_secondary_reload_simple_move (enum rs6000_reg_type to_type,
return false;
}
-/* Power8 helper function for rs6000_secondary_reload, handle all of the
+/* Direct move helper function for rs6000_secondary_reload, handle all of the
special direct moves that involve allocating an extra register, return the
insn code of the helper function if there is such a function or
CODE_FOR_nothing if not. */
@@ -18116,8 +18129,8 @@ rs6000_secondary_reload_direct_move (enum rs6000_reg_type to_type,
if (size == 16)
{
/* Handle moving 128-bit values from GPRs to VSX point registers on
- power8 when running in 64-bit mode using XXPERMDI to glue the two
- 64-bit values back together. */
+ ISA 2.07 (power8, power9) when running in 64-bit mode using
+ XXPERMDI to glue the two 64-bit values back together. */
if (to_type == VSX_REG_TYPE && from_type == GPR_REG_TYPE)
{
cost = 3; /* 2 mtvsrd's, 1 xxpermdi. */
@@ -18125,7 +18138,7 @@ rs6000_secondary_reload_direct_move (enum rs6000_reg_type to_type,
}
/* Handle moving 128-bit values from VSX point registers to GPRs on
- power8 when running in 64-bit mode using XXPERMDI to get access to the
+ ISA 2.07 when running in 64-bit mode using XXPERMDI to get access to the
bottom 64-bit value. */
else if (to_type == GPR_REG_TYPE && from_type == VSX_REG_TYPE)
{
@@ -18153,7 +18166,7 @@ rs6000_secondary_reload_direct_move (enum rs6000_reg_type to_type,
if (TARGET_POWERPC64 && size == 16)
{
/* Handle moving 128-bit values from GPRs to VSX point registers on
- power8 when running in 64-bit mode using XXPERMDI to glue the two
+ ISA 2.07 when running in 64-bit mode using XXPERMDI to glue the two
64-bit values back together. */
if (to_type == VSX_REG_TYPE && from_type == GPR_REG_TYPE)
{
@@ -18162,7 +18175,7 @@ rs6000_secondary_reload_direct_move (enum rs6000_reg_type to_type,
}
/* Handle moving 128-bit values from VSX point registers to GPRs on
- power8 when running in 64-bit mode using XXPERMDI to get access to the
+ ISA 2.07 when running in 64-bit mode using XXPERMDI to get access to the
bottom 64-bit value. */
else if (to_type == GPR_REG_TYPE && from_type == VSX_REG_TYPE)
{
@@ -18174,8 +18187,8 @@ rs6000_secondary_reload_direct_move (enum rs6000_reg_type to_type,
else if (!TARGET_POWERPC64 && size == 8)
{
/* Handle moving 64-bit values from GPRs to floating point registers on
- power8 when running in 32-bit mode using FMRGOW to glue the two 32-bit
- values back together. Altivec register classes must be handled
+ ISA 2.07 when running in 32-bit mode using FMRGOW to glue the two
+ 32-bit values back together. Altivec register classes must be handled
specially since a different instruction is used, and the secondary
reload support requires a single instruction class in the scratch
register constraint. However, right now TFmode is not allowed in
@@ -18202,7 +18215,7 @@ rs6000_secondary_reload_direct_move (enum rs6000_reg_type to_type,
/* Return whether a move between two register classes can be done either
directly (simple move) or via a pattern that uses a single extra temporary
- (using power8's direct move in this case. */
+ (using ISA 2.07's direct move in this case. */
static bool
rs6000_secondary_reload_move (enum rs6000_reg_type to_type,
@@ -19241,6 +19254,11 @@ rs6000_output_move_128bit (rtx operands[])
if (src_gpr_p)
return "#";
+ if (TARGET_DIRECT_MOVE_128 && src_vsx_p)
+ return (WORDS_BIG_ENDIAN
+ ? "mfvsrd %0,%x1\n\tmfvsrld %L0,%x1"
+ : "mfvsrd %L0,%x1\n\tmfvsrld %0,%x1");
+
else if (TARGET_VSX && TARGET_DIRECT_MOVE && src_vsx_p)
return "#";
}
@@ -19250,6 +19268,11 @@ rs6000_output_move_128bit (rtx operands[])
if (src_vsx_p)
return "xxlor %x0,%x1,%x1";
+ else if (TARGET_DIRECT_MOVE_128 && src_gpr_p)
+ return (WORDS_BIG_ENDIAN
+ ? "mtvsrdd %x0,%1,%L1"
+ : "mtvsrdd %x0,%L1,%1");
+
else if (TARGET_DIRECT_MOVE && src_gpr_p)
return "#";
}
@@ -20511,11 +20534,12 @@ rs6000_generate_compare (rtx cmp, machine_mode mode)
emit_insn (cmp);
}
- /* IEEE 128-bit support in VSX registers. The comparison functions
- (__cmpokf2 and __cmpukf2) returns 0..15 that is laid out the same way as
- the PowerPC CR register would for a normal floating point comparison from
- the fcmpo and fcmpu instructions. */
- else if (FLOAT128_IEEE_P (mode))
+ /* IEEE 128-bit support in VSX registers. If we do not have IEEE 128-bit
+ hardware, the comparison functions (__cmpokf2 and __cmpukf2) returns 0..15
+ that is laid out the same way as the PowerPC CR register would for a
+ normal floating point comparison from the fcmpo and fcmpu
+ instructions. */
+ else if (!TARGET_FLOAT128_HW && FLOAT128_IEEE_P (mode))
{
rtx and_reg = gen_reg_rtx (SImode);
rtx dest = gen_reg_rtx (SImode);
@@ -20654,7 +20678,7 @@ rs6000_generate_compare (rtx cmp, machine_mode mode)
/* Some kinds of FP comparisons need an OR operation;
under flag_finite_math_only we don't bother. */
if (FLOAT_MODE_P (mode)
- && !FLOAT128_IEEE_P (mode)
+ && (!FLOAT128_IEEE_P (mode) || TARGET_FLOAT128_HW)
&& !flag_finite_math_only
&& !(TARGET_HARD_FLOAT && !TARGET_FPRS)
&& (code == LE || code == GE
@@ -20747,6 +20771,56 @@ rs6000_expand_float128_convert (rtx dest, rtx src, bool unsigned_p)
bool do_move = false;
rtx libfunc = NULL_RTX;
rtx dest2;
+ typedef rtx (*rtx_2func_t) (rtx, rtx);
+ rtx_2func_t hw_convert = (rtx_2func_t)0;
+ size_t kf_or_tf;
+
+ struct hw_conv_t {
+ rtx_2func_t from_df;
+ rtx_2func_t from_sf;
+ rtx_2func_t from_si_sign;
+ rtx_2func_t from_si_uns;
+ rtx_2func_t from_di_sign;
+ rtx_2func_t from_di_uns;
+ rtx_2func_t to_df;
+ rtx_2func_t to_sf;
+ rtx_2func_t to_si_sign;
+ rtx_2func_t to_si_uns;
+ rtx_2func_t to_di_sign;
+ rtx_2func_t to_di_uns;
+ } hw_conversions[2] = {
+ /* convertions to/from KFmode */
+ {
+ gen_extenddfkf2_hw, /* KFmode <- DFmode. */
+ gen_extendsfkf2_hw, /* KFmode <- SFmode. */
+ gen_float_kfsi2_hw, /* KFmode <- SImode (signed). */
+ gen_floatuns_kfsi2_hw, /* KFmode <- SImode (unsigned). */
+ gen_float_kfdi2_hw, /* KFmode <- DImode (signed). */
+ gen_floatuns_kfdi2_hw, /* KFmode <- DImode (unsigned). */
+ gen_trunckfdf2_hw, /* DFmode <- KFmode. */
+ gen_trunckfsf2_hw, /* SFmode <- KFmode. */
+ gen_fix_kfsi2_hw, /* SImode <- KFmode (signed). */
+ gen_fixuns_kfsi2_hw, /* SImode <- KFmode (unsigned). */
+ gen_fix_kfdi2_hw, /* DImode <- KFmode (signed). */
+ gen_fixuns_kfdi2_hw, /* DImode <- KFmode (unsigned). */
+ },
+
+ /* convertions to/from TFmode */
+ {
+ gen_extenddftf2_hw, /* TFmode <- DFmode. */
+ gen_extendsftf2_hw, /* TFmode <- SFmode. */
+ gen_float_tfsi2_hw, /* TFmode <- SImode (signed). */
+ gen_floatuns_tfsi2_hw, /* TFmode <- SImode (unsigned). */
+ gen_float_tfdi2_hw, /* TFmode <- DImode (signed). */
+ gen_floatuns_tfdi2_hw, /* TFmode <- DImode (unsigned). */
+ gen_trunctfdf2_hw, /* DFmode <- TFmode. */
+ gen_trunctfsf2_hw, /* SFmode <- TFmode. */
+ gen_fix_tfsi2_hw, /* SImode <- TFmode (signed). */
+ gen_fixuns_tfsi2_hw, /* SImode <- TFmode (unsigned). */
+ gen_fix_tfdi2_hw, /* DImode <- TFmode (signed). */
+ gen_fixuns_tfdi2_hw, /* DImode <- TFmode (unsigned). */
+ },
+ };
if (dest_mode == src_mode)
gcc_unreachable ();
@@ -20766,14 +20840,23 @@ rs6000_expand_float128_convert (rtx dest, rtx src, bool unsigned_p)
/* Convert to IEEE 128-bit floating point. */
if (FLOAT128_IEEE_P (dest_mode))
{
+ if (dest_mode == KFmode)
+ kf_or_tf = 0;
+ else if (dest_mode == TFmode)
+ kf_or_tf = 1;
+ else
+ gcc_unreachable ();
+
switch (src_mode)
{
case DFmode:
cvt = sext_optab;
+ hw_convert = hw_conversions[kf_or_tf].from_df;
break;
case SFmode:
cvt = sext_optab;
+ hw_convert = hw_conversions[kf_or_tf].from_sf;
break;
case KFmode:
@@ -20786,8 +20869,29 @@ rs6000_expand_float128_convert (rtx dest, rtx src, bool unsigned_p)
break;
case SImode:
+ if (unsigned_p)
+ {
+ cvt = ufloat_optab;
+ hw_convert = hw_conversions[kf_or_tf].from_si_uns;
+ }
+ else
+ {
+ cvt = sfloat_optab;
+ hw_convert = hw_conversions[kf_or_tf].from_si_sign;
+ }
+ break;
+
case DImode:
- cvt = (unsigned_p) ? ufloat_optab : sfloat_optab;
+ if (unsigned_p)
+ {
+ cvt = ufloat_optab;
+ hw_convert = hw_conversions[kf_or_tf].from_di_uns;
+ }
+ else
+ {
+ cvt = sfloat_optab;
+ hw_convert = hw_conversions[kf_or_tf].from_di_sign;
+ }
break;
default:
@@ -20798,14 +20902,23 @@ rs6000_expand_float128_convert (rtx dest, rtx src, bool unsigned_p)
/* Convert from IEEE 128-bit floating point. */
else if (FLOAT128_IEEE_P (src_mode))
{
+ if (src_mode == KFmode)
+ kf_or_tf = 0;
+ else if (src_mode == TFmode)
+ kf_or_tf = 1;
+ else
+ gcc_unreachable ();
+
switch (dest_mode)
{
case DFmode:
cvt = trunc_optab;
+ hw_convert = hw_conversions[kf_or_tf].to_df;
break;
case SFmode:
cvt = trunc_optab;
+ hw_convert = hw_conversions[kf_or_tf].to_sf;
break;
case KFmode:
@@ -20818,8 +20931,29 @@ rs6000_expand_float128_convert (rtx dest, rtx src, bool unsigned_p)
break;
case SImode:
+ if (unsigned_p)
+ {
+ cvt = ufix_optab;
+ hw_convert = hw_conversions[kf_or_tf].to_si_uns;
+ }
+ else
+ {
+ cvt = sfix_optab;
+ hw_convert = hw_conversions[kf_or_tf].to_si_sign;
+ }
+ break;
+
case DImode:
- cvt = (unsigned_p) ? ufix_optab : sfix_optab;
+ if (unsigned_p)
+ {
+ cvt = ufix_optab;
+ hw_convert = hw_conversions[kf_or_tf].to_di_uns;
+ }
+ else
+ {
+ cvt = sfix_optab;
+ hw_convert = hw_conversions[kf_or_tf].to_di_sign;
+ }
break;
default:
@@ -20838,6 +20972,10 @@ rs6000_expand_float128_convert (rtx dest, rtx src, bool unsigned_p)
if (do_move)
emit_move_insn (dest, gen_lowpart (dest_mode, src));
+ /* Handle conversion if we have hardware support. */
+ else if (TARGET_FLOAT128_HW && hw_convert)
+ emit_insn ((hw_convert) (dest, src));
+
/* Call an external function to do the conversion. */
else if (cvt != unknown_optab)
{
@@ -20858,6 +20996,92 @@ rs6000_expand_float128_convert (rtx dest, rtx src, bool unsigned_p)
return;
}
+/* Split a conversion from __float128 to an integer type into separate insns.
+ OPERANDS points to the destination, source, and V2DI temporary
+ register. CODE is either FIX or UNSIGNED_FIX. */
+
+void
+convert_float128_to_int (rtx *operands, enum rtx_code code)
+{
+ rtx dest = operands[0];
+ rtx src = operands[1];
+ rtx tmp = operands[2];
+ rtx cvt;
+ rtvec cvt_vec;
+ rtx cvt_unspec;
+ rtvec move_vec;
+ rtx move_unspec;
+
+ if (GET_CODE (tmp) == SCRATCH)
+ tmp = gen_reg_rtx (V2DImode);
+
+ if (MEM_P (dest))
+ dest = rs6000_address_for_fpconvert (dest);
+
+ /* Generate the actual convert insn of the form:
+ (set (tmp) (unspec:V2DI [(fix:SI (reg:KF))] UNSPEC_IEEE128_CONVERT)). */
+ cvt = gen_rtx_fmt_e (code, GET_MODE (dest), src);
+ cvt_vec = gen_rtvec (1, cvt);
+ cvt_unspec = gen_rtx_UNSPEC (V2DImode, cvt_vec, UNSPEC_IEEE128_CONVERT);
+ emit_insn (gen_rtx_SET (tmp, cvt_unspec));
+
+ /* Generate the move insn of the form:
+ (set (dest:SI) (unspec:SI [(tmp:V2DI))] UNSPEC_IEEE128_MOVE)). */
+ move_vec = gen_rtvec (1, tmp);
+ move_unspec = gen_rtx_UNSPEC (GET_MODE (dest), move_vec, UNSPEC_IEEE128_MOVE);
+ emit_insn (gen_rtx_SET (dest, move_unspec));
+}
+
+/* Split a conversion from an integer type to __float128 into separate insns.
+ OPERANDS points to the destination, source, and V2DI temporary
+ register. CODE is either FLOAT or UNSIGNED_FLOAT. */
+
+void
+convert_int_to_float128 (rtx *operands, enum rtx_code code)
+{
+ rtx dest = operands[0];
+ rtx src = operands[1];
+ rtx tmp = operands[2];
+ rtx cvt;
+ rtvec cvt_vec;
+ rtx cvt_unspec;
+ rtvec move_vec;
+ rtx move_unspec;
+ rtx unsigned_flag;
+
+ if (GET_CODE (tmp) == SCRATCH)
+ tmp = gen_reg_rtx (V2DImode);
+
+ if (MEM_P (src))
+ src = rs6000_address_for_fpconvert (src);
+
+ /* Generate the move of the integer into the Altivec register of the form:
+ (set (tmp:V2DI) (unspec:V2DI [(src:SI)
+ (const_int 0)] UNSPEC_IEEE128_MOVE)).
+
+ or:
+ (set (tmp:V2DI) (unspec:V2DI [(src:DI)] UNSPEC_IEEE128_MOVE)). */
+
+ if (GET_MODE (src) == SImode)
+ {
+ unsigned_flag = (code == UNSIGNED_FLOAT) ? const1_rtx : const0_rtx;
+ move_vec = gen_rtvec (2, src, unsigned_flag);
+ }
+ else
+ move_vec = gen_rtvec (1, src);
+
+ move_unspec = gen_rtx_UNSPEC (V2DImode, move_vec, UNSPEC_IEEE128_MOVE);
+ emit_insn (gen_rtx_SET (tmp, move_unspec));
+
+ /* Generate the actual convert insn of the form:
+ (set (dest:KF) (float:KF (unspec:DI [(tmp:V2DI)]
+ UNSPEC_IEEE128_CONVERT))). */
+ cvt_vec = gen_rtvec (1, tmp);
+ cvt_unspec = gen_rtx_UNSPEC (DImode, cvt_vec, UNSPEC_IEEE128_CONVERT);
+ cvt = gen_rtx_fmt_e (code, GET_MODE (dest), cvt_unspec);
+ emit_insn (gen_rtx_SET (dest, cvt));
+}
+
/* Emit the RTL for an sISEL pattern. */
diff --git a/gcc/config/rs6000/rs6000.h b/gcc/config/rs6000/rs6000.h
index 4ac4f3134d5..8c606ab0aea 100644
--- a/gcc/config/rs6000/rs6000.h
+++ b/gcc/config/rs6000/rs6000.h
@@ -516,6 +516,10 @@ extern int rs6000_vector_align[];
with scalar instructions. */
#define VECTOR_ELEMENT_SCALAR_64BIT ((BYTES_BIG_ENDIAN) ? 0 : 1)
+/* Element number of the 64-bit value in a 128-bit vector that can be accessed
+ with the ISA 3.0 MFVSRLD instructions. */
+#define VECTOR_ELEMENT_MFVSRLD_64BIT ((BYTES_BIG_ENDIAN) ? 1 : 0)
+
/* Alignment options for fields in structures for sub-targets following
AIX-like ABI.
ALIGN_POWER word-aligns FP doubles (default AIX ABI).
@@ -567,10 +571,13 @@ extern int rs6000_vector_align[];
#define TARGET_FCTIWUZ TARGET_POPCNTD
#define TARGET_CTZ TARGET_MODULO
#define TARGET_EXTSWSLI (TARGET_MODULO && TARGET_POWERPC64)
+#define TARGET_MADDLD (TARGET_MODULO && TARGET_POWERPC64)
#define TARGET_XSCVDPSPN (TARGET_DIRECT_MOVE || TARGET_P8_VECTOR)
#define TARGET_XSCVSPDPN (TARGET_DIRECT_MOVE || TARGET_P8_VECTOR)
#define TARGET_VADDUQM (TARGET_P8_VECTOR && TARGET_POWERPC64)
+#define TARGET_DIRECT_MOVE_128 (TARGET_P9_VECTOR && TARGET_DIRECT_MOVE \
+ && TARGET_POWERPC64)
/* Byte/char syncs were added as phased in for ISA 2.06B, but are not present
in power7, so conditionalize them on p8 features. TImode syncs need quad
@@ -1517,6 +1524,7 @@ enum r6000_reg_class_enum {
RS6000_CONSTRAINT_v, /* Altivec registers */
RS6000_CONSTRAINT_wa, /* Any VSX register */
RS6000_CONSTRAINT_wd, /* VSX register for V2DF */
+ RS6000_CONSTRAINT_we, /* VSX register if ISA 3.0 vector. */
RS6000_CONSTRAINT_wf, /* VSX register for V4SF */
RS6000_CONSTRAINT_wg, /* FPR register for -mmfpgpr */
RS6000_CONSTRAINT_wh, /* FPR register for direct moves. */
diff --git a/gcc/config/rs6000/rs6000.md b/gcc/config/rs6000/rs6000.md
index 49c5c98f7d5..1fdc7bbda42 100644
--- a/gcc/config/rs6000/rs6000.md
+++ b/gcc/config/rs6000/rs6000.md
@@ -143,6 +143,9 @@
UNSPEC_STACK_CHECK
UNSPEC_FUSION_P9
UNSPEC_FUSION_ADDIS
+ UNSPEC_ROUND_TO_ODD
+ UNSPEC_IEEE128_MOVE
+ UNSPEC_IEEE128_CONVERT
])
;;
@@ -381,6 +384,8 @@
(V2SF "TARGET_PAIRED_FLOAT")
(V4SF "VECTOR_UNIT_ALTIVEC_OR_VSX_P (V4SFmode)")
(V2DF "VECTOR_UNIT_ALTIVEC_OR_VSX_P (V2DFmode)")
+ (KF "TARGET_FLOAT128_HW && FLOAT128_IEEE_P (KFmode)")
+ (TF "TARGET_FLOAT128_HW && FLOAT128_IEEE_P (TFmode)")
])
; Floating point move iterators to combine binary and decimal moves
@@ -485,10 +490,10 @@
(define_mode_attr Fvsx [(SF "sp") (DF "dp")])
; SF/DF constraint for arithmetic on traditional floating point registers
-(define_mode_attr Ff [(SF "f") (DF "d")])
+(define_mode_attr Ff [(SF "f") (DF "d") (DI "d")])
; SF/DF constraint for arithmetic on VSX registers
-(define_mode_attr Fv [(SF "wy") (DF "ws")])
+(define_mode_attr Fv [(SF "wy") (DF "ws") (DI "wi")])
; SF/DF constraint for arithmetic on altivec registers
(define_mode_attr Fa [(SF "wu") (DF "wv")])
@@ -510,9 +515,31 @@
(define_code_iterator iorxor [ior xor])
; Signed/unsigned variants of ops.
-(define_code_iterator any_extend [sign_extend zero_extend])
-(define_code_attr u [(sign_extend "") (zero_extend "u")])
-(define_code_attr su [(sign_extend "s") (zero_extend "u")])
+(define_code_iterator any_extend [sign_extend zero_extend])
+(define_code_iterator any_fix [fix unsigned_fix])
+(define_code_iterator any_float [float unsigned_float])
+
+(define_code_attr u [(sign_extend "")
+ (zero_extend "u")])
+
+(define_code_attr su [(sign_extend "s")
+ (zero_extend "u")
+ (fix "s")
+ (unsigned_fix "s")
+ (float "s")
+ (unsigned_float "u")])
+
+(define_code_attr az [(sign_extend "a")
+ (zero_extend "z")
+ (fix "a")
+ (unsigned_fix "z")
+ (float "a")
+ (unsigned_float "z")])
+
+(define_code_attr uns [(fix "")
+ (unsigned_fix "uns")
+ (float "")
+ (unsigned_float "uns")])
; Various instructions that come in SI and DI forms.
; A generic w/d attribute, for things like cmpw/cmpd.
@@ -2815,6 +2842,14 @@
DONE;
})
+(define_insn "*maddld4"
+ [(set (match_operand:DI 0 "gpc_reg_operand" "=r")
+ (plus:DI (mult:DI (match_operand:DI 1 "gpc_reg_operand" "r")
+ (match_operand:DI 2 "gpc_reg_operand" "r"))
+ (match_operand:DI 3 "gpc_reg_operand" "r")))]
+ "TARGET_MADDLD"
+ "maddld %0,%1,%2,%3"
+ [(set_attr "type" "mul")])
(define_insn "udiv<mode>3"
[(set (match_operand:GPR 0 "gpc_reg_operand" "=r")
@@ -7003,7 +7038,16 @@
{
if (FLOAT128_IEEE_P (<MODE>mode))
{
- if (TARGET_FLOAT128)
+ if (TARGET_FLOAT128_HW)
+ {
+ if (<MODE>mode == TFmode)
+ emit_insn (gen_negtf2_hw (operands[0], operands[1]));
+ else if (<MODE>mode == KFmode)
+ emit_insn (gen_negkf2_hw (operands[0], operands[1]));
+ else
+ gcc_unreachable ();
+ }
+ else if (TARGET_FLOAT128)
{
if (<MODE>mode == TFmode)
emit_insn (gen_ieee_128bit_vsx_negtf2 (operands[0], operands[1]));
@@ -7053,7 +7097,17 @@
if (FLOAT128_IEEE_P (<MODE>mode))
{
- if (TARGET_FLOAT128)
+ if (TARGET_FLOAT128_HW)
+ {
+ if (<MODE>mode == TFmode)
+ emit_insn (gen_abstf2_hw (operands[0], operands[1]));
+ else if (<MODE>mode == KFmode)
+ emit_insn (gen_abskf2_hw (operands[0], operands[1]));
+ else
+ FAIL;
+ DONE;
+ }
+ else if (TARGET_FLOAT128)
{
if (<MODE>mode == TFmode)
emit_insn (gen_ieee_128bit_vsx_abstf2 (operands[0], operands[1]));
@@ -7140,7 +7194,7 @@
[(set (match_operand:IEEE128 0 "register_operand" "=wa")
(neg:IEEE128 (match_operand:IEEE128 1 "register_operand" "wa")))
(clobber (match_scratch:V16QI 2 "=v"))]
- "TARGET_FLOAT128"
+ "TARGET_FLOAT128 && !TARGET_FLOAT128_HW"
"#"
"&& 1"
[(parallel [(set (match_dup 0)
@@ -7160,7 +7214,7 @@
[(set (match_operand:IEEE128 0 "register_operand" "=wa")
(neg:IEEE128 (match_operand:IEEE128 1 "register_operand" "wa")))
(use (match_operand:V16QI 2 "register_operand" "=v"))]
- "TARGET_FLOAT128"
+ "TARGET_FLOAT128 && !TARGET_FLOAT128_HW"
"xxlxor %x0,%x1,%x2"
[(set_attr "type" "vecsimple")])
@@ -7169,7 +7223,7 @@
[(set (match_operand:IEEE128 0 "register_operand" "=wa")
(abs:IEEE128 (match_operand:IEEE128 1 "register_operand" "wa")))
(clobber (match_scratch:V16QI 2 "=v"))]
- "TARGET_FLOAT128 && FLOAT128_IEEE_P (<MODE>mode)"
+ "TARGET_FLOAT128 && !TARGET_FLOAT128_HW && FLOAT128_IEEE_P (<MODE>mode)"
"#"
"&& 1"
[(parallel [(set (match_dup 0)
@@ -7189,7 +7243,7 @@
[(set (match_operand:IEEE128 0 "register_operand" "=wa")
(abs:IEEE128 (match_operand:IEEE128 1 "register_operand" "wa")))
(use (match_operand:V16QI 2 "register_operand" "=v"))]
- "TARGET_FLOAT128"
+ "TARGET_FLOAT128 && !TARGET_FLOAT128_HW"
"xxlandc %x0,%x1,%x2"
[(set_attr "type" "vecsimple")])
@@ -7200,7 +7254,7 @@
(abs:IEEE128
(match_operand:IEEE128 1 "register_operand" "wa"))))
(clobber (match_scratch:V16QI 2 "=v"))]
- "TARGET_FLOAT128 && FLOAT128_IEEE_P (<MODE>mode)"
+ "TARGET_FLOAT128 && !TARGET_FLOAT128_HW && FLOAT128_IEEE_P (<MODE>mode)"
"#"
"&& 1"
[(parallel [(set (match_dup 0)
@@ -7222,7 +7276,7 @@
(abs:IEEE128
(match_operand:IEEE128 1 "register_operand" "wa"))))
(use (match_operand:V16QI 2 "register_operand" "=v"))]
- "TARGET_FLOAT128"
+ "TARGET_FLOAT128 && !TARGET_FLOAT128_HW"
"xxlor %x0,%x1,%x2"
[(set_attr "type" "vecsimple")])
@@ -7480,7 +7534,10 @@
(match_operand:FMOVE128_GPR 1 "input_operand" ""))]
"reload_completed
&& (int_reg_operand (operands[0], <MODE>mode)
- || int_reg_operand (operands[1], <MODE>mode))"
+ || int_reg_operand (operands[1], <MODE>mode))
+ && (!TARGET_DIRECT_MOVE_128
+ || (!vsx_register_operand (operands[0], <MODE>mode)
+ && !vsx_register_operand (operands[1], <MODE>mode)))"
[(pc)]
{ rs6000_split_multireg_move (operands[0], operands[1]); DONE; })
@@ -12998,6 +13055,332 @@
+;; ISA 2.08 IEEE 128-bit floating point support.
+
+(define_insn "add<mode>3"
+ [(set (match_operand:IEEE128 0 "altivec_register_operand" "=v")
+ (plus:IEEE128
+ (match_operand:IEEE128 1 "altivec_register_operand" "v")
+ (match_operand:IEEE128 2 "altivec_register_operand" "v")))]
+ "TARGET_FLOAT128_HW && FLOAT128_IEEE_P (<MODE>mode)"
+ "xsaddqp %0,%1,%2"
+ [(set_attr "type" "vecfloat")])
+
+(define_insn "sub<mode>3"
+ [(set (match_operand:IEEE128 0 "altivec_register_operand" "=v")
+ (minus:IEEE128
+ (match_operand:IEEE128 1 "altivec_register_operand" "v")
+ (match_operand:IEEE128 2 "altivec_register_operand" "v")))]
+ "TARGET_FLOAT128_HW && FLOAT128_IEEE_P (<MODE>mode)"
+ "xssubqp %0,%1,%2"
+ [(set_attr "type" "vecfloat")])
+
+(define_insn "mul<mode>3"
+ [(set (match_operand:IEEE128 0 "altivec_register_operand" "=v")
+ (mult:IEEE128
+ (match_operand:IEEE128 1 "altivec_register_operand" "v")
+ (match_operand:IEEE128 2 "altivec_register_operand" "v")))]
+ "TARGET_FLOAT128_HW && FLOAT128_IEEE_P (<MODE>mode)"
+ "xsmulqp %0,%1,%2"
+ [(set_attr "type" "vecfloat")])
+
+(define_insn "div<mode>3"
+ [(set (match_operand:IEEE128 0 "altivec_register_operand" "=v")
+ (div:IEEE128
+ (match_operand:IEEE128 1 "altivec_register_operand" "v")
+ (match_operand:IEEE128 2 "altivec_register_operand" "v")))]
+ "TARGET_FLOAT128_HW && FLOAT128_IEEE_P (<MODE>mode)"
+ "xsdivqp %0,%1,%2"
+ [(set_attr "type" "vecdiv")])
+
+(define_insn "sqrt<mode>2"
+ [(set (match_operand:IEEE128 0 "altivec_register_operand" "=v")
+ (sqrt:IEEE128
+ (match_operand:IEEE128 1 "altivec_register_operand" "v")))]
+ "TARGET_FLOAT128_HW && FLOAT128_IEEE_P (<MODE>mode)"
+ "xssqrtqp %0,%1"
+ [(set_attr "type" "vecdiv")])
+
+(define_insn "copysign<mode>3"
+ [(set (match_operand:IEEE128 0 "altivec_register_operand" "=v")
+ (unspec:IEEE128
+ [(match_operand:IEEE128 1 "altivec_register_operand" "v")
+ (match_operand:IEEE128 2 "altivec_register_operand" "v")]
+ UNSPEC_COPYSIGN))]
+ "TARGET_FLOAT128_HW && FLOAT128_IEEE_P (<MODE>mode)"
+ "xscpsgnqp %0,%2,%1"
+ [(set_attr "type" "vecsimple")])
+
+(define_insn "neg<mode>2_hw"
+ [(set (match_operand:IEEE128 0 "altivec_register_operand" "=v")
+ (neg:IEEE128
+ (match_operand:IEEE128 1 "altivec_register_operand" "v")))]
+ "TARGET_FLOAT128_HW && FLOAT128_IEEE_P (<MODE>mode)"
+ "xsnegqp %0,%1"
+ [(set_attr "type" "vecfloat")])
+
+
+(define_insn "abs<mode>2_hw"
+ [(set (match_operand:IEEE128 0 "altivec_register_operand" "=v")
+ (abs:IEEE128
+ (match_operand:IEEE128 1 "altivec_register_operand" "v")))]
+ "TARGET_FLOAT128_HW && FLOAT128_IEEE_P (<MODE>mode)"
+ "xsabsqp %0,%1"
+ [(set_attr "type" "vecfloat")])
+
+
+(define_insn "*nabs<mode>2_hw"
+ [(set (match_operand:IEEE128 0 "altivec_register_operand" "=v")
+ (neg:IEEE128
+ (abs:IEEE128
+ (match_operand:IEEE128 1 "altivec_register_operand" "v"))))]
+ "TARGET_FLOAT128_HW && FLOAT128_IEEE_P (<MODE>mode)"
+ "xsnabsqp %0,%1"
+ [(set_attr "type" "vecfloat")])
+
+;; Initially don't worry about doing fusion
+(define_insn "*fma<mode>4_hw"
+ [(set (match_operand:IEEE128 0 "altivec_register_operand" "=v")
+ (fma:IEEE128
+ (match_operand:IEEE128 1 "altivec_register_operand" "%v")
+ (match_operand:IEEE128 2 "altivec_register_operand" "v")
+ (match_operand:IEEE128 3 "altivec_register_operand" "0")))]
+ "TARGET_FLOAT128_HW && FLOAT128_IEEE_P (<MODE>mode)"
+ "xsmaddqp %0,%1,%2"
+ [(set_attr "type" "vecfloat")])
+
+(define_insn "*fms<mode>4_hw"
+ [(set (match_operand:IEEE128 0 "altivec_register_operand" "=v")
+ (fma:IEEE128
+ (match_operand:IEEE128 1 "altivec_register_operand" "%v")
+ (match_operand:IEEE128 2 "altivec_register_operand" "v")
+ (neg:IEEE128
+ (match_operand:IEEE128 3 "altivec_register_operand" "0"))))]
+ "TARGET_FLOAT128_HW && FLOAT128_IEEE_P (<MODE>mode)"
+ "xsmsubqp %0,%1,%2"
+ [(set_attr "type" "vecfloat")])
+
+(define_insn "*nfma<mode>4_hw"
+ [(set (match_operand:IEEE128 0 "altivec_register_operand" "=v")
+ (neg:IEEE128
+ (fma:IEEE128
+ (match_operand:IEEE128 1 "altivec_register_operand" "%v")
+ (match_operand:IEEE128 2 "altivec_register_operand" "v")
+ (match_operand:IEEE128 3 "altivec_register_operand" "0"))))]
+ "TARGET_FLOAT128_HW && FLOAT128_IEEE_P (<MODE>mode)"
+ "xsnmaddqp %0,%1,%2"
+ [(set_attr "type" "vecfloat")])
+
+(define_insn "*nfms<mode>4_hw"
+ [(set (match_operand:IEEE128 0 "altivec_register_operand" "=v")
+ (neg:IEEE128
+ (fma:IEEE128
+ (match_operand:IEEE128 1 "altivec_register_operand" "%v")
+ (match_operand:IEEE128 2 "altivec_register_operand" "v")
+ (neg:IEEE128
+ (match_operand:IEEE128 3 "altivec_register_operand" "0")))))]
+ "TARGET_FLOAT128_HW && FLOAT128_IEEE_P (<MODE>mode)"
+ "xsnmsubqp %0,%1,%2"
+ [(set_attr "type" "vecfloat")])
+
+(define_insn "extend<SFDF:mode><IEEE128:mode>2_hw"
+ [(set (match_operand:IEEE128 0 "altivec_register_operand" "=v")
+ (float_extend:IEEE128
+ (match_operand:SFDF 1 "altivec_register_operand" "v")))]
+ "TARGET_FLOAT128_HW && FLOAT128_IEEE_P (<IEEE128:MODE>mode)"
+ "xscvdpqp %0,%1"
+ [(set_attr "type" "vecfloat")])
+
+(define_insn "trunc<mode>df2_hw"
+ [(set (match_operand:DF 0 "altivec_register_operand" "=v")
+ (float_truncate:DF
+ (match_operand:IEEE128 1 "altivec_register_operand" "v")))]
+ "TARGET_FLOAT128_HW && FLOAT128_IEEE_P (<MODE>mode)"
+ "xscvqpdp %0,%1"
+ [(set_attr "type" "vecfloat")])
+
+;; There is no KFmode -> SFmode instruction. Preserve the accuracy by doing
+;; the KFmode -> DFmode conversion using round to odd rather than the normal
+;; conversion
+(define_insn_and_split "trunc<mode>sf2_hw"
+ [(set (match_operand:SF 0 "vsx_register_operand" "=wy")
+ (float_truncate:SF
+ (match_operand:IEEE128 1 "altivec_register_operand" "v")))
+ (clobber (match_scratch:DF 2 "=v"))]
+ "TARGET_FLOAT128_HW && FLOAT128_IEEE_P (<MODE>mode)"
+ "#"
+ "&& 1"
+ [(set (match_dup 2)
+ (unspec:DF [(match_dup 1)] UNSPEC_ROUND_TO_ODD))
+ (set (match_dup 0)
+ (float_truncate:SF (match_dup 2)))]
+{
+ if (GET_CODE (operands[2]) == SCRATCH)
+ operands[2] = gen_reg_rtx (DFmode);
+}
+ [(set_attr "type" "vecfloat")
+ (set_attr "length" "8")])
+
+;; At present SImode is not allowed in VSX registers at all, and DImode is only
+;; allowed in the traditional floating point registers. Use V2DImode so that
+;; we can get a value in an Altivec register.
+
+(define_insn_and_split "fix<uns>_<mode>si2_hw"
+ [(set (match_operand:SI 0 "nonimmediate_operand" "=r,Z")
+ (any_fix:SI (match_operand:IEEE128 1 "altivec_register_operand" "v,v")))
+ (clobber (match_scratch:V2DI 2 "=v,v"))]
+ "TARGET_FLOAT128_HW && FLOAT128_IEEE_P (<MODE>mode)"
+ "#"
+ "&& 1"
+ [(pc)]
+{
+ convert_float128_to_int (operands, <CODE>);
+ DONE;
+}
+ [(set_attr "length" "8")
+ (set_attr "type" "mftgpr,fpstore")])
+
+(define_insn_and_split "fix<uns>_<mode>di2_hw"
+ [(set (match_operand:DI 0 "nonimmediate_operand" "=wr,wi,Z")
+ (any_fix:DI (match_operand:IEEE128 1 "altivec_register_operand" "v,v,v")))
+ (clobber (match_scratch:V2DI 2 "=v,v,v"))]
+ "TARGET_FLOAT128_HW && FLOAT128_IEEE_P (<MODE>mode)"
+ "#"
+ "&& 1"
+ [(pc)]
+{
+ convert_float128_to_int (operands, <CODE>);
+ DONE;
+}
+ [(set_attr "length" "8")
+ (set_attr "type" "mftgpr,vecsimple,fpstore")])
+
+(define_insn_and_split "float<uns>_<mode>si2_hw"
+ [(set (match_operand:IEEE128 0 "altivec_register_operand" "=v,v")
+ (any_float:IEEE128 (match_operand:SI 1 "nonimmediate_operand" "r,Z")))
+ (clobber (match_scratch:V2DI 2 "=v,v"))]
+ "TARGET_FLOAT128_HW && FLOAT128_IEEE_P (<MODE>mode)"
+ "#"
+ "&& 1"
+ [(pc)]
+{
+ convert_int_to_float128 (operands, <CODE>);
+ DONE;
+}
+ [(set_attr "length" "8")
+ (set_attr "type" "vecfloat")])
+
+(define_insn_and_split "float<uns>_<mode>di2_hw"
+ [(set (match_operand:IEEE128 0 "altivec_register_operand" "=v,v,v")
+ (any_float:IEEE128 (match_operand:DI 1 "nonimmediate_operand" "wi,wr,Z")))
+ (clobber (match_scratch:V2DI 2 "=v,v,v"))]
+ "TARGET_FLOAT128_HW && FLOAT128_IEEE_P (<MODE>mode)"
+ "#"
+ "&& 1"
+ [(pc)]
+{
+ convert_int_to_float128 (operands, <CODE>);
+ DONE;
+}
+ [(set_attr "length" "8")
+ (set_attr "type" "vecfloat")])
+
+;; Integer conversion instructions, using V2DImode to get an Altivec register
+(define_insn "*xscvqp<su>wz_<mode>"
+ [(set (match_operand:V2DI 0 "altivec_register_operand" "=v")
+ (unspec:V2DI
+ [(any_fix:SI
+ (match_operand:IEEE128 1 "altivec_register_operand" "v"))]
+ UNSPEC_IEEE128_CONVERT))]
+ "TARGET_FLOAT128_HW && FLOAT128_IEEE_P (<MODE>mode)"
+ "xscvqp<su>wz %0,%1"
+ [(set_attr "type" "vecfloat")])
+
+(define_insn "*xscvqp<su>dz_<mode>"
+ [(set (match_operand:V2DI 0 "altivec_register_operand" "=v")
+ (unspec:V2DI
+ [(any_fix:DI
+ (match_operand:IEEE128 1 "altivec_register_operand" "v"))]
+ UNSPEC_IEEE128_CONVERT))]
+ "TARGET_FLOAT128_HW && FLOAT128_IEEE_P (<MODE>mode)"
+ "xscvqp<su>dz %0,%1"
+ [(set_attr "type" "vecfloat")])
+
+(define_insn "*xscv<su>dqp_<mode>"
+ [(set (match_operand:IEEE128 0 "altivec_register_operand" "=v")
+ (any_float:IEEE128
+ (unspec:DI [(match_operand:V2DI 1 "altivec_register_operand" "v")]
+ UNSPEC_IEEE128_CONVERT)))]
+ "TARGET_FLOAT128_HW && FLOAT128_IEEE_P (<MODE>mode)"
+ "xscv<su>dqp %0,%1"
+ [(set_attr "type" "vecfloat")])
+
+(define_insn "*ieee128_mfvsrd"
+ [(set (match_operand:DI 0 "reg_or_indexed_operand" "=wr,Z,wi")
+ (unspec:DI [(match_operand:V2DI 1 "altivec_register_operand" "v,v,v")]
+ UNSPEC_IEEE128_MOVE))]
+ "TARGET_FLOAT128_HW && TARGET_POWERPC64"
+ "@
+ mfvsrd %0,%x1
+ stxsdx %x1,%y0
+ xxlor %x0,%x1,%x1"
+ [(set_attr "type" "mftgpr,vecsimple,fpstore")])
+
+(define_insn "*ieee128_mfvsrwz"
+ [(set (match_operand:SI 0 "reg_or_indexed_operand" "=r,Z")
+ (unspec:SI [(match_operand:V2DI 1 "altivec_register_operand" "v,v")]
+ UNSPEC_IEEE128_MOVE))]
+ "TARGET_FLOAT128_HW"
+ "@
+ mfvsrwz %0,%x1
+ stxsiwx %x1,%y0"
+ [(set_attr "type" "mftgpr,fpstore")])
+
+;; 0 says do sign-extension, 1 says zero-extension
+(define_insn "*ieee128_mtvsrw"
+ [(set (match_operand:V2DI 0 "altivec_register_operand" "=v,v,v,v")
+ (unspec:V2DI [(match_operand:SI 1 "nonimmediate_operand" "r,Z,r,Z")
+ (match_operand:SI 2 "const_0_to_1_operand" "O,O,n,n")]
+ UNSPEC_IEEE128_MOVE))]
+ "TARGET_FLOAT128_HW"
+ "@
+ mtvsrwa %x0,%1
+ lxsiwax %x0,%y1
+ mtvsrwz %x0,%1
+ lxsiwzx %x0,%y1"
+ [(set_attr "type" "mffgpr,fpload,mffgpr,fpload")])
+
+
+(define_insn "*ieee128_mtvsrd"
+ [(set (match_operand:V2DI 0 "altivec_register_operand" "=v,v,v")
+ (unspec:V2DI [(match_operand:DI 1 "nonimmediate_operand" "wr,Z,wi")]
+ UNSPEC_IEEE128_MOVE))]
+ "TARGET_FLOAT128_HW"
+ "@
+ mtvsrd %x0,%1
+ lxsdx %x0,%y1
+ xxlor %x0,%x1,%x1"
+ [(set_attr "type" "mffgpr,fpload,vecsimple")])
+
+;; IEEE 128-bit instructions with round to odd semantics
+(define_insn "*trunc<mode>df2_odd"
+ [(set (match_operand:DF 0 "vsx_register_operand" "=v")
+ (unspec:DF [(match_operand:IEEE128 1 "altivec_register_operand" "v")]
+ UNSPEC_ROUND_TO_ODD))]
+ "TARGET_FLOAT128_HW && FLOAT128_IEEE_P (<MODE>mode)"
+ "xscvqpdpo %0,%1"
+ [(set_attr "type" "vecfloat")])
+
+;; IEEE 128-bit comparisons
+(define_insn "*cmp<mode>_hw"
+ [(set (match_operand:CCFP 0 "cc_reg_operand" "=y")
+ (compare:CCFP (match_operand:IEEE128 1 "altivec_register_operand" "v")
+ (match_operand:IEEE128 2 "altivec_register_operand" "v")))]
+ "TARGET_FLOAT128_HW && FLOAT128_IEEE_P (<MODE>mode)"
+ "xscmpuqp %0,%1,%2"
+ [(set_attr "type" "fpcompare")])
+
+
(include "sync.md")
(include "vector.md")
diff --git a/gcc/config/rs6000/vsx.md b/gcc/config/rs6000/vsx.md
index 0e110ae2f7f..596b11d01ab 100644
--- a/gcc/config/rs6000/vsx.md
+++ b/gcc/config/rs6000/vsx.md
@@ -760,31 +760,31 @@
"")
(define_insn "*vsx_mov<mode>"
- [(set (match_operand:VSX_M 0 "nonimmediate_operand" "=Z,<VSr>,<VSr>,?Z,?<VSa>,?<VSa>,wQ,?&r,??Y,??r,??r,<VSr>,?<VSa>,*r,v,wZ, v")
- (match_operand:VSX_M 1 "input_operand" "<VSr>,Z,<VSr>,<VSa>,Z,<VSa>,r,wQ,r,Y,r,j,j,j,W,v,wZ"))]
+ [(set (match_operand:VSX_M 0 "nonimmediate_operand" "=Z,<VSr>,<VSr>,?Z,?<VSa>,?<VSa>,r,we,wQ,?&r,??Y,??r,??r,<VSr>,?<VSa>,*r,v,wZ,v")
+ (match_operand:VSX_M 1 "input_operand" "<VSr>,Z,<VSr>,<VSa>,Z,<VSa>,we,b,r,wQ,r,Y,r,j,j,j,W,v,wZ"))]
"VECTOR_MEM_VSX_P (<MODE>mode)
&& (register_operand (operands[0], <MODE>mode)
|| register_operand (operands[1], <MODE>mode))"
{
return rs6000_output_move_128bit (operands);
}
- [(set_attr "type" "vecstore,vecload,vecsimple,vecstore,vecload,vecsimple,load,store,store,load, *,vecsimple,vecsimple,*, *,vecstore,vecload")
- (set_attr "length" "4,4,4,4,4,4,12,12,12,12,16,4,4,*,16,4,4")])
+ [(set_attr "type" "vecstore,vecload,vecsimple,vecstore,vecload,vecsimple,mffgpr,mftgpr,load,store,store,load, *,vecsimple,vecsimple,*, *,vecstore,vecload")
+ (set_attr "length" "4,4,4,4,4,4,8,4,12,12,12,12,16,4,4,*,16,4,4")])
;; Unlike other VSX moves, allow the GPRs even for reloading, since a normal
;; use of TImode is for unions. However for plain data movement, slightly
;; favor the vector loads
(define_insn "*vsx_movti_64bit"
- [(set (match_operand:TI 0 "nonimmediate_operand" "=Z,wa,wa,wa,v,v,wZ,wQ,&r,Y,r,r,?r")
- (match_operand:TI 1 "input_operand" "wa,Z,wa,O,W,wZ,v,r,wQ,r,Y,r,n"))]
+ [(set (match_operand:TI 0 "nonimmediate_operand" "=Z,wa,wa,wa,r,we,v,v,wZ,wQ,&r,Y,r,r,?r")
+ (match_operand:TI 1 "input_operand" "wa,Z,wa,O,we,b,W,wZ,v,r,wQ,r,Y,r,n"))]
"TARGET_POWERPC64 && VECTOR_MEM_VSX_P (TImode)
&& (register_operand (operands[0], TImode)
|| register_operand (operands[1], TImode))"
{
return rs6000_output_move_128bit (operands);
}
- [(set_attr "type" "vecstore,vecload,vecsimple,vecsimple,vecsimple,vecstore,vecload,store,load,store,load,*,*")
- (set_attr "length" "4,4,4,4,16,4,4,8,8,8,8,8,8")])
+ [(set_attr "type" "vecstore,vecload,vecsimple,vecsimple,mffgpr,mftgpr,vecsimple,vecstore,vecload,store,load,store,load,*,*")
+ (set_attr "length" "4,4,4,4,8,4,16,4,4,8,8,8,8,8,8")])
(define_insn "*vsx_movti_32bit"
[(set (match_operand:TI 0 "nonimmediate_operand" "=Z,wa,wa,wa,v, v,wZ,Q,Y,????r,????r,????r,r")
@@ -1909,11 +1909,11 @@
;; Optimize cases were we can do a simple or direct move.
;; Or see if we can avoid doing the move at all
(define_insn "*vsx_extract_<mode>_internal1"
- [(set (match_operand:<VS_scalar> 0 "register_operand" "=d,<VS_64reg>,r")
+ [(set (match_operand:<VS_scalar> 0 "register_operand" "=d,<VS_64reg>,r,r")
(vec_select:<VS_scalar>
- (match_operand:VSX_D 1 "register_operand" "d,<VS_64reg>,<VS_64dm>")
+ (match_operand:VSX_D 1 "register_operand" "d,<VS_64reg>,<VS_64dm>,<VS_64dm>")
(parallel
- [(match_operand:QI 2 "vsx_scalar_64bit" "wD,wD,wD")])))]
+ [(match_operand:QI 2 "vsx_scalar_64bit" "wD,wD,wD,wL")])))]
"VECTOR_MEM_VSX_P (<MODE>mode) && TARGET_POWERPC64 && TARGET_DIRECT_MOVE"
{
int op0_regno = REGNO (operands[0]);
@@ -1923,14 +1923,16 @@
return "nop";
if (INT_REGNO_P (op0_regno))
- return "mfvsrd %0,%x1";
+ return ((INTVAL (operands[2]) == VECTOR_ELEMENT_MFVSRLD_64BIT)
+ ? "mfvsrdl %0,%x1"
+ : "mfvsrd %0,%x1");
if (FP_REGNO_P (op0_regno) && FP_REGNO_P (op1_regno))
return "fmr %0,%1";
return "xxlor %x0,%x1,%x1";
}
- [(set_attr "type" "fp,vecsimple,mftgpr")
+ [(set_attr "type" "fp,vecsimple,mftgpr,mftgpr")
(set_attr "length" "4")])
(define_insn "*vsx_extract_<mode>_internal2"
diff --git a/gcc/config/visium/visium-protos.h b/gcc/config/visium/visium-protos.h
index 5f36f285f31..147af552a96 100644
--- a/gcc/config/visium/visium-protos.h
+++ b/gcc/config/visium/visium-protos.h
@@ -49,9 +49,6 @@ extern void visium_split_cbranch (enum rtx_code, rtx, rtx, rtx);
extern const char *output_ubranch (rtx, rtx_insn *);
extern const char *output_cbranch (rtx, enum rtx_code, enum machine_mode, int,
rtx_insn *);
-extern void notice_update_cc (rtx, rtx);
-extern void print_operand (FILE *, rtx, int);
-extern void print_operand_address (FILE *, rtx);
extern void split_double_move (rtx *, enum machine_mode);
extern void visium_expand_copysign (rtx *, enum machine_mode);
extern void visium_expand_int_cstore (rtx *, enum machine_mode);
diff --git a/gcc/configure b/gcc/configure
index 0cd85fb8646..4b4e72457a7 100755
--- a/gcc/configure
+++ b/gcc/configure
@@ -28329,7 +28329,7 @@ else
enable_default_ssp=no
fi
-if test x$enable_default_ssp == xyes ; then
+if test x$enable_default_ssp = xyes ; then
$as_echo "#define ENABLE_DEFAULT_SSP 1" >>confdefs.h
@@ -29181,7 +29181,7 @@ else
enable_default_pie=no
fi
-if test x$enable_default_pie == xyes ; then
+if test x$enable_default_pie = xyes ; then
$as_echo "#define ENABLE_DEFAULT_PIE 1" >>confdefs.h
diff --git a/gcc/configure.ac b/gcc/configure.ac
index ed2e665b40c..42d8f136e9c 100644
--- a/gcc/configure.ac
+++ b/gcc/configure.ac
@@ -5463,7 +5463,7 @@ else
enable_default_ssp=no
fi],
enable_default_ssp=no)
-if test x$enable_default_ssp == xyes ; then
+if test x$enable_default_ssp = xyes ; then
AC_DEFINE(ENABLE_DEFAULT_SSP, 1,
[Define if your target supports default stack protector and it is enabled.])
fi
@@ -6028,7 +6028,7 @@ AC_ARG_ENABLE(default-pie,
[enable Position Independent Executable as default])],
enable_default_pie=$enableval,
enable_default_pie=no)
-if test x$enable_default_pie == xyes ; then
+if test x$enable_default_pie = xyes ; then
AC_DEFINE(ENABLE_DEFAULT_PIE, 1,
[Define if your target supports default PIE and it is enabled.])
fi
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index 859f3783e4f..2ea5448f08e 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,154 @@
+2015-11-13 Kai Tietz <ktietz70@googlemail.com>
+ Marek Polacek <polacek@redhat.com>
+ Jason Merrill <jason@redhat.com>
+
+ * call.c (build_conditional_expr_1, convert_like_real)
+ (convert_arg_to_ellipsis, convert_for_arg_passing): Don't fold.
+ (build_new_op_1, build_over_call, build_cxx_call): Fold for warnings.
+ * class.c (build_base_path, determine_primary_bases)
+ (update_vtable_entry_for_fn, check_bitfield_decl)
+ (layout_nonempty_base_or_field, layout_empty_base)
+ (propagate_binfo_offsets, include_empty_classes)
+ (layout_class_type, build_vbase_offset_vtbl_entries): Use
+ fold_convert.
+ * constexpr.c (cxx_eval_builtin_function_call): Fold away the NOP_EXPR.
+ (cxx_eval_call_expression): Handle MEM_REF.
+ (cxx_eval_pointer_plus_expression): Fold the second operand.
+ (cxx_eval_constant_expression): Handle MEM_REF, UNARY_PLUS_EXPR.
+ (fold_simple_1, fold_simple): New.
+ (maybe_constant_value_1): Factor out from maybe_constant_value.
+ (cv_cache, maybe_constant_value): Cache results.
+ (maybe_constant_init): Handle null input.
+ (potential_constant_expression_1): Handle RESULT_DECL, EMPTY_CLASS_EXPR.
+ * cp-array-notation.c (build_array_notation_ref): Fold operands.
+ * cp-gimplify.c (cp_fold_r, cp_fold): New.
+ (cp_genericize_r): Use fold_convert. Don't fold SIZEOF_EXPR.
+ (cp_genericize): Fold everything.
+ (contains_label_1, contains_label_p): New.
+ (cp_fold, cp_fully_fold): New.
+ * cp-tree.h (class cache_map): New.
+ * cvt.c (cp_convert_to_pointer, ocp_convert): Use convert_to_*_nofold.
+ (cp_convert_and_check): Use cp_fully_fold.
+ (convert, convert_force): Don't fold.
+ * decl.c (fold_sizeof_expr): Change from fold_sizeof_expr_r.
+ (compute_array_index_type): Use cp_fully_fold.
+ (build_enumerator): Use fold_convert.
+ * decl2.c (get_guard_cond, set_guard): Use fold_convert.
+ * init.c (build_zero_init_1): Fold zero-initializers.
+ (build_new_1): Fold nelts calculations.
+ (build_vec_delete_1): Fold conversions.
+ (build_vec_init): Fold maxindex.
+ * parser.c (cp_parser_binary_expression): Fold LHS of || and &&.
+ (cp_parser_question_colon_clause): Fold LHS.
+ * pt.c (convert_nontype_argument): Fold nullptr conversion.
+ * semantics.c (finish_unary_op_expr): Fold for warnings.
+ (handle_omp_array_sections_1): Fold length and low bound.
+ (handle_omp_for_class_iterator): Fold various things.
+ * tree.c (builtin_valid_in_constant_expr_p): Add
+ BUILT_IN_ATOMIC_ALWAYS_LOCK_FREE.
+ (convert_bitfield_to_declared_type): Don't fold.
+ (handle_init_priority_attribute): Fold.
+ (fold_if_not_in_template): Remove.
+ * typeck.c (decay_conversion, build_class_member_access_expr)
+ (build_simple_component_ref, cp_build_array_ref, build_vec_cmp)
+ (cp_pointer_int_sum, pointer_diff): Don't fold.
+ (cp_build_binary_op): Fold for warnings and PMF ops.
+ (cp_build_unary_op): Fold negation of a constant, nothing else.
+ (expand_ptrmemfunc_cst): Fold operations.
+ * typeck2.c (split_nonconstant_init): Fold initializer.
+ (store_init_value): Likewise.
+ (check_narrowing): Try folding.
+ * config-lang.in (gtfiles): Add cp-gimplify.c.
+
+2015-11-13 David Malcolm <dmalcolm@redhat.com>
+
+ * error.c (pedwarn_cxx98): Pass line_table to rich_location ctor.
+
+2015-11-12 James Norris <jnorris@codesourcery.com>
+
+ * parser.c (cp_parser_oacc_declare): Remove unused.
+
+2015-11-12 James Norris <jnorris@codesourcery.com>
+ Joseph Myers <joseph@codesourcery.com>
+
+ * parser.c (cp_parser_omp_clause_name): Handle 'device_resident'
+ clause.
+ (cp_parser_oacc_data_clause): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
+ and PRAGMA_OMP_CLAUSE_LINK.
+ (cp_paser_oacc_all_clauses): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
+ and PRAGMA_OMP_CLAUSE_LINK.
+ (OACC_DECLARE_CLAUSE_MASK): New definition.
+ (cp_parser_oacc_declare): New function.
+ (cp_parser_pragma): Handle PRAGMA_OACC_DECLARE.
+ * pt.c (tsubst_expr): Handle OACC_DECLARE.
+
+2015-11-12 Jason Merrill <jason@redhat.com>
+
+ * pt.c (check_explicit_specialization): Check the namespace after
+ we choose a template.
+
+2015-11-11 Jason Merrill <jason@redhat.com>
+
+ * decl.c (duplicate_decls): When combining typedefs, remove the
+ new type from the variants list.
+
+2015-11-11 Jason Merrill <jason@redhat.com>
+
+ * pt.c (instantiate_class_template_1): Set function_depth around
+ instantiation of lambda op().
+
+2015-11-11 Marek Polacek <polacek@redhat.com>
+
+ PR c/68107
+ PR c++/68266
+ * decl.c (grokdeclarator): Call valid_array_size_p. Remove code
+ checking the size of an array.
+
+2015-11-11 Dominique d'Humieres <dominiq@lps.ens.fr>
+
+ PR bootstrap/68271
+ * parser.h (cp_token): Update pragma_kind to 8.
+
+2015-11-11 Andrew MacLeod <amacleod@redhat.com>
+
+ * call.c: Remove unused header files.
+ * class.c: Likewise.
+ * constexpr.c: Likewise.
+ * cp-array-notation.c: Likewise.
+ * cp-cilkplus.c: Likewise.
+ * cp-gimplify.c: Likewise.
+ * cp-lang.c: Likewise.
+ * cp-objcp-common.c: Likewise.
+ * cp-ubsan.c: Likewise.
+ * cvt.c: Likewise.
+ * cxx-pretty-print.c: Likewise.
+ * decl.c: Likewise.
+ * decl2.c: Likewise.
+ * dump.c: Likewise.
+ * error.c: Likewise.
+ * except.c: Likewise.
+ * expr.c: Likewise.
+ * friend.c: Likewise.
+ * g++spec.c: Likewise.
+ * init.c: Likewise.
+ * lambda.c: Likewise.
+ * lex.c: Likewise.
+ * mangle.c: Likewise.
+ * method.c: Likewise.
+ * name-lookup.c: Likewise.
+ * optimize.c: Likewise.
+ * parser.c: Likewise.
+ * pt.c: Likewise.
+ * ptree.c: Likewise.
+ * repo.c: Likewise.
+ * rtti.c: Likewise.
+ * search.c: Likewise.
+ * semantics.c: Likewise.
+ * tree.c: Likewise.
+ * typeck.c: Likewise.
+ * typeck2.c: Likewise.
+ * vtable-class-hierarchy.c: Likewise.
+
2015-11-09 Cesar Philippidis <cesar@codesourcery.com>
* parser.c (cp_finalize_oacc_routine): New boolean first argument.
diff --git a/gcc/cp/call.c b/gcc/cp/call.c
index ce5aeeaf4af..77c29366b13 100644
--- a/gcc/cp/call.c
+++ b/gcc/cp/call.c
@@ -26,12 +26,10 @@ along with GCC; see the file COPYING3. If not see
#include "system.h"
#include "coretypes.h"
#include "target.h"
-#include "tree.h"
#include "cp-tree.h"
#include "timevar.h"
#include "stringpool.h"
#include "cgraph.h"
-#include "alias.h"
#include "stor-layout.h"
#include "trans-mem.h"
#include "flags.h"
diff --git a/gcc/cp/class.c b/gcc/cp/class.c
index b5cf99638a6..216a30141d4 100644
--- a/gcc/cp/class.c
+++ b/gcc/cp/class.c
@@ -25,11 +25,9 @@ along with GCC; see the file COPYING3. If not see
#include "system.h"
#include "coretypes.h"
#include "target.h"
-#include "tree.h"
#include "cp-tree.h"
#include "stringpool.h"
#include "cgraph.h"
-#include "alias.h"
#include "stor-layout.h"
#include "attribs.h"
#include "flags.h"
diff --git a/gcc/cp/constexpr.c b/gcc/cp/constexpr.c
index 5bff17b941e..aabb9809154 100644
--- a/gcc/cp/constexpr.c
+++ b/gcc/cp/constexpr.c
@@ -23,9 +23,7 @@ along with GCC; see the file COPYING3. If not see
#include "config.h"
#include "system.h"
#include "coretypes.h"
-#include "tree.h"
#include "cp-tree.h"
-#include "alias.h"
#include "varasm.h"
#include "c-family/c-objc.h"
#include "tree-iterator.h"
@@ -1283,7 +1281,8 @@ cxx_eval_call_expression (const constexpr_ctx *ctx, tree t,
&& TREE_CODE (t) != AGGR_INIT_EXPR)
{
/* convert_to_void stripped our AGGR_INIT_EXPR, in which case we don't
- care about a constant value. */
+ care about a constant value. ??? we could still optimize away the
+ call. */
gcc_assert (ctx->quiet && !ctx->object);
*non_constant_p = true;
return t;
diff --git a/gcc/cp/cp-array-notation.c b/gcc/cp/cp-array-notation.c
index e967c72b344..84d79258fdb 100644
--- a/gcc/cp/cp-array-notation.c
+++ b/gcc/cp/cp-array-notation.c
@@ -53,9 +53,7 @@
#include "config.h"
#include "system.h"
#include "coretypes.h"
-#include "tree.h"
#include "cp-tree.h"
-#include "c-family/c-common.h"
#include "tree-iterator.h"
/* Creates a FOR_STMT with INIT, COND, INCR and BODY as the initializer,
diff --git a/gcc/cp/cp-cilkplus.c b/gcc/cp/cp-cilkplus.c
index 42af45f81db..2b3a5510b44 100644
--- a/gcc/cp/cp-cilkplus.c
+++ b/gcc/cp/cp-cilkplus.c
@@ -25,7 +25,6 @@
#include "coretypes.h"
#include "cp-tree.h"
#include "tree-iterator.h"
-#include "tree-inline.h" /* for copy_tree_body_r. */
#include "cilk.h"
/* Callback for cp_walk_tree to validate the body of a pragma simd loop
diff --git a/gcc/cp/cp-gimplify.c b/gcc/cp/cp-gimplify.c
index 9b4bb626c25..5f5cd367f58 100644
--- a/gcc/cp/cp-gimplify.c
+++ b/gcc/cp/cp-gimplify.c
@@ -23,18 +23,13 @@ along with GCC; see the file COPYING3. If not see
#include "system.h"
#include "coretypes.h"
#include "target.h"
-#include "function.h"
#include "basic-block.h"
-#include "tree.h"
#include "cp-tree.h"
-#include "c-family/c-common.h"
#include "gimple.h"
#include "predict.h"
#include "stor-layout.h"
#include "tree-iterator.h"
-#include "internal-fn.h"
#include "gimplify.h"
-#include "flags.h"
#include "c-family/c-ubsan.h"
#include "cilk.h"
@@ -1470,6 +1465,8 @@ cp_genericize (tree fndecl)
{
tree t;
+ /* Fold ALL the trees! FIXME we should be able to remove this, but
+ apparently that still causes optimization regressions. */
cp_walk_tree (&DECL_SAVED_TREE (fndecl), cp_fold_r, NULL, NULL);
/* Fix up the types of parms passed by invisible reference. */
diff --git a/gcc/cp/cp-lang.c b/gcc/cp/cp-lang.c
index 451e03b9f81..048108d4f02 100644
--- a/gcc/cp/cp-lang.c
+++ b/gcc/cp/cp-lang.c
@@ -21,16 +21,11 @@ along with GCC; see the file COPYING3. If not see
#include "config.h"
#include "system.h"
#include "coretypes.h"
-#include "target.h"
-#include "tree.h"
#include "cp-tree.h"
-#include "c-family/c-common.h"
#include "stor-layout.h"
#include "langhooks.h"
#include "langhooks-def.h"
-#include "debug.h"
#include "cp-objcp-common.h"
-#include "parser.h"
enum c_language_kind c_language = clk_cxx;
static void cp_init_ts (void);
diff --git a/gcc/cp/cp-objcp-common.c b/gcc/cp/cp-objcp-common.c
index e5fe83703af..2758252aea0 100644
--- a/gcc/cp/cp-objcp-common.c
+++ b/gcc/cp/cp-objcp-common.c
@@ -21,14 +21,7 @@ along with GCC; see the file COPYING3. If not see
#include "config.h"
#include "system.h"
#include "coretypes.h"
-#include "tm.h"
-#include "tree.h"
#include "cp-tree.h"
-#include "c-family/c-common.h"
-#include "langhooks.h"
-#include "langhooks-def.h"
-#include "debug.h"
-#include "cxx-pretty-print.h"
#include "cp-objcp-common.h"
/* Special routine to get the alias set for C++. */
diff --git a/gcc/cp/cp-ubsan.c b/gcc/cp/cp-ubsan.c
index 86af6c7e55f..0aaf0af23cd 100644
--- a/gcc/cp/cp-ubsan.c
+++ b/gcc/cp/cp-ubsan.c
@@ -21,22 +21,8 @@ along with GCC; see the file COPYING3. If not see
#include "config.h"
#include "system.h"
#include "coretypes.h"
-#include "basic-block.h"
-#include "tree.h"
#include "cp-tree.h"
-#include "c-family/c-common.h"
-#include "gimple.h"
-#include "predict.h"
-#include "stringpool.h"
-#include "cgraph.h"
-#include "output.h"
-#include "toplev.h"
#include "ubsan.h"
-#include "c-family/c-ubsan.h"
-#include "asan.h"
-#include "internal-fn.h"
-#include "stor-layout.h"
-#include "builtins.h"
/* Test if we should instrument vptr access. */
diff --git a/gcc/cp/cvt.c b/gcc/cp/cvt.c
index c18dc8bad95..0231efc9527 100644
--- a/gcc/cp/cvt.c
+++ b/gcc/cp/cvt.c
@@ -28,14 +28,11 @@ along with GCC; see the file COPYING3. If not see
#include "system.h"
#include "coretypes.h"
#include "target.h"
-#include "tree.h"
#include "cp-tree.h"
-#include "alias.h"
#include "stor-layout.h"
#include "flags.h"
#include "intl.h"
#include "convert.h"
-#include "decl.h"
static tree cp_convert_to_pointer (tree, tree, tsubst_flags_t);
static tree convert_to_pointer_force (tree, tree, tsubst_flags_t);
diff --git a/gcc/cp/cxx-pretty-print.c b/gcc/cp/cxx-pretty-print.c
index 72bbfc5c318..5004e8f0284 100644
--- a/gcc/cp/cxx-pretty-print.c
+++ b/gcc/cp/cxx-pretty-print.c
@@ -21,9 +21,7 @@ along with GCC; see the file COPYING3. If not see
#include "config.h"
#include "system.h"
#include "coretypes.h"
-#include "tm.h"
#include "cp-tree.h"
-#include "intl.h"
#include "cxx-pretty-print.h"
#include "tree-pretty-print.h"
diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c
index d1c1d3e976f..675342efcd9 100644
--- a/gcc/cp/decl.c
+++ b/gcc/cp/decl.c
@@ -31,21 +31,15 @@ along with GCC; see the file COPYING3. If not see
#include "coretypes.h"
#include "target.h"
#include "c-family/c-target.h"
-#include "tree.h"
#include "cp-tree.h"
-#include "c-family/c-common.h"
#include "timevar.h"
-#include "tm_p.h"
#include "stringpool.h"
#include "cgraph.h"
-#include "tree-hasher.h"
#include "stor-layout.h"
#include "varasm.h"
#include "attribs.h"
-#include "calls.h"
#include "flags.h"
#include "tree-iterator.h"
-#include "tree-inline.h"
#include "decl.h"
#include "intl.h"
#include "toplev.h"
@@ -2020,7 +2014,22 @@ duplicate_decls (tree newdecl, tree olddecl, bool newdecl_is_friend)
/* For typedefs use the old type, as the new type's DECL_NAME points
at newdecl, which will be ggc_freed. */
if (TREE_CODE (newdecl) == TYPE_DECL)
- newtype = oldtype;
+ {
+ newtype = oldtype;
+
+ /* And remove the new type from the variants list. */
+ if (TYPE_NAME (TREE_TYPE (newdecl)) == newdecl)
+ {
+ tree remove = TREE_TYPE (newdecl);
+ for (tree t = TYPE_MAIN_VARIANT (remove); ;
+ t = TYPE_NEXT_VARIANT (t))
+ if (TYPE_NEXT_VARIANT (t) == remove)
+ {
+ TYPE_NEXT_VARIANT (t) = TYPE_NEXT_VARIANT (remove);
+ break;
+ }
+ }
+ }
else
/* Merge the data types specified in the two decls. */
newtype = merge_types (TREE_TYPE (newdecl), TREE_TYPE (olddecl));
@@ -9935,6 +9944,9 @@ grokdeclarator (const cp_declarator *declarator,
case cdk_array:
type = create_array_type_for_decl (dname, type,
declarator->u.array.bounds);
+ if (!valid_array_size_p (input_location, type, dname))
+ type = error_mark_node;
+
if (declarator->std_attributes)
/* [dcl.array]/1:
@@ -10498,19 +10510,6 @@ grokdeclarator (const cp_declarator *declarator,
error ("non-parameter %qs cannot be a parameter pack", name);
}
- /* Did array size calculations overflow or does the array cover more
- than half of the address-space? */
- if (TREE_CODE (type) == ARRAY_TYPE
- && COMPLETE_TYPE_P (type)
- && TREE_CODE (TYPE_SIZE_UNIT (type)) == INTEGER_CST
- && ! valid_constant_size_p (TYPE_SIZE_UNIT (type)))
- {
- error ("size of array %qs is too large", name);
- /* If we proceed with the array type as it is, we'll eventually
- crash in tree_to_[su]hwi(). */
- type = error_mark_node;
- }
-
if ((decl_context == FIELD || decl_context == PARM)
&& !processing_template_decl
&& variably_modified_type_p (type, NULL_TREE))
diff --git a/gcc/cp/decl2.c b/gcc/cp/decl2.c
index f1644ffb28d..47c9ec96d24 100644
--- a/gcc/cp/decl2.c
+++ b/gcc/cp/decl2.c
@@ -30,7 +30,6 @@ along with GCC; see the file COPYING3. If not see
#include "system.h"
#include "coretypes.h"
#include "target.h"
-#include "tree.h"
#include "cp-tree.h"
#include "c-family/c-common.h"
#include "timevar.h"
@@ -40,15 +39,12 @@ along with GCC; see the file COPYING3. If not see
#include "attribs.h"
#include "stor-layout.h"
#include "calls.h"
-#include "flags.h"
#include "decl.h"
#include "toplev.h"
#include "c-family/c-objc.h"
-#include "tree-inline.h"
#include "c-family/c-pragma.h"
#include "dumpfile.h"
#include "intl.h"
-#include "langhooks.h"
#include "c-family/c-ada-spec.h"
#include "asan.h"
diff --git a/gcc/cp/dump.c b/gcc/cp/dump.c
index 471e124551a..8f8fa4f1e7b 100644
--- a/gcc/cp/dump.c
+++ b/gcc/cp/dump.c
@@ -21,10 +21,7 @@ along with GCC; see the file COPYING3. If not see
#include "config.h"
#include "system.h"
#include "coretypes.h"
-#include "tm.h"
-#include "tree.h"
#include "cp-tree.h"
-#include "alias.h"
#include "tree-dump.h"
static void dump_access (dump_info_p, tree);
diff --git a/gcc/cp/error.c b/gcc/cp/error.c
index 286389c8aea..38548c72fe0 100644
--- a/gcc/cp/error.c
+++ b/gcc/cp/error.c
@@ -20,12 +20,8 @@ along with GCC; see the file COPYING3. If not see
#include "config.h"
#include "system.h"
#include "coretypes.h"
-#include "tm.h"
-#include "tree.h"
#include "cp-tree.h"
#include "stringpool.h"
-#include "alias.h"
-#include "flags.h"
#include "tree-diagnostic.h"
#include "langhooks-def.h"
#include "intl.h"
@@ -3677,7 +3673,7 @@ pedwarn_cxx98 (location_t location, int opt, const char *gmsgid, ...)
diagnostic_info diagnostic;
va_list ap;
bool ret;
- rich_location richloc (location);
+ rich_location richloc (line_table, location);
va_start (ap, gmsgid);
diagnostic_set_info (&diagnostic, gmsgid, &ap, &richloc,
diff --git a/gcc/cp/except.c b/gcc/cp/except.c
index abcfde889d2..9b2450d026f 100644
--- a/gcc/cp/except.c
+++ b/gcc/cp/except.c
@@ -24,15 +24,10 @@ along with GCC; see the file COPYING3. If not see
#include "config.h"
#include "system.h"
#include "coretypes.h"
-#include "target.h"
-#include "tree.h"
#include "cp-tree.h"
#include "stringpool.h"
-#include "alias.h"
#include "trans-mem.h"
#include "attribs.h"
-#include "flags.h"
-#include "tree-inline.h"
#include "tree-iterator.h"
static void push_eh_cleanup (tree);
diff --git a/gcc/cp/expr.c b/gcc/cp/expr.c
index 946ad89cdd2..0155872e7e5 100644
--- a/gcc/cp/expr.c
+++ b/gcc/cp/expr.c
@@ -22,12 +22,7 @@ along with GCC; see the file COPYING3. If not see
#include "config.h"
#include "system.h"
#include "coretypes.h"
-#include "tm.h"
-#include "tree.h"
#include "cp-tree.h"
-#include "tm_p.h"
-#include "alias.h"
-#include "flags.h"
/* Expand C++-specific constants. Currently, this means PTRMEM_CST. */
diff --git a/gcc/cp/friend.c b/gcc/cp/friend.c
index 9d58efcc1c0..5d067bd8392 100644
--- a/gcc/cp/friend.c
+++ b/gcc/cp/friend.c
@@ -20,11 +20,7 @@ along with GCC; see the file COPYING3. If not see
#include "config.h"
#include "system.h"
#include "coretypes.h"
-#include "tm.h"
-#include "tree.h"
#include "cp-tree.h"
-#include "alias.h"
-#include "flags.h"
/* Friend data structures are described in cp-tree.h. */
diff --git a/gcc/cp/g++spec.c b/gcc/cp/g++spec.c
index 6536d7e776f..35d8cbc5d7f 100644
--- a/gcc/cp/g++spec.c
+++ b/gcc/cp/g++spec.c
@@ -21,7 +21,6 @@ along with GCC; see the file COPYING3. If not see
#include "system.h"
#include "coretypes.h"
#include "tm.h"
-#include "gcc.h"
#include "opts.h"
/* This bit is set if we saw a `-xfoo' language specification. */
diff --git a/gcc/cp/init.c b/gcc/cp/init.c
index 586eaab55de..fccd2896a87 100644
--- a/gcc/cp/init.c
+++ b/gcc/cp/init.c
@@ -24,12 +24,9 @@ along with GCC; see the file COPYING3. If not see
#include "system.h"
#include "coretypes.h"
#include "target.h"
-#include "tree.h"
#include "cp-tree.h"
#include "stringpool.h"
-#include "alias.h"
#include "varasm.h"
-#include "flags.h"
#include "gimplify.h"
#include "c-family/c-ubsan.h"
diff --git a/gcc/cp/lambda.c b/gcc/cp/lambda.c
index d10fff2ce63..5fe34731e4f 100644
--- a/gcc/cp/lambda.c
+++ b/gcc/cp/lambda.c
@@ -24,14 +24,9 @@ along with GCC; see the file COPYING3. If not see
#include "config.h"
#include "system.h"
#include "coretypes.h"
-#include "tm.h"
-#include "function.h"
-#include "hard-reg-set.h"
-#include "tree.h"
#include "cp-tree.h"
#include "stringpool.h"
#include "cgraph.h"
-#include "alias.h"
#include "tree-iterator.h"
#include "toplev.h"
diff --git a/gcc/cp/lex.c b/gcc/cp/lex.c
index 3dc11553c5f..936542325c9 100644
--- a/gcc/cp/lex.c
+++ b/gcc/cp/lex.c
@@ -24,14 +24,8 @@ along with GCC; see the file COPYING3. If not see
#include "config.h"
#include "system.h"
#include "coretypes.h"
-#include "tm.h"
-#include "tree.h"
#include "cp-tree.h"
-#include "timevar.h"
-#include "tm_p.h"
#include "stringpool.h"
-#include "alias.h"
-#include "flags.h"
#include "c-family/c-pragma.h"
#include "c-family/c-objc.h"
diff --git a/gcc/cp/mangle.c b/gcc/cp/mangle.c
index 182e6055b63..6f8bf68d951 100644
--- a/gcc/cp/mangle.c
+++ b/gcc/cp/mangle.c
@@ -49,13 +49,9 @@ along with GCC; see the file COPYING3. If not see
#include "coretypes.h"
#include "target.h"
#include "vtable-verify.h"
-#include "tree.h"
#include "cp-tree.h"
-#include "tm_p.h"
#include "stringpool.h"
#include "cgraph.h"
-#include "alias.h"
-#include "tree-hasher.h"
#include "stor-layout.h"
#include "flags.h"
#include "attribs.h"
diff --git a/gcc/cp/method.c b/gcc/cp/method.c
index 97643b7f4f0..533ae0eae2d 100644
--- a/gcc/cp/method.c
+++ b/gcc/cp/method.c
@@ -25,14 +25,10 @@ along with GCC; see the file COPYING3. If not see
#include "system.h"
#include "coretypes.h"
#include "target.h"
-#include "tree.h"
#include "cp-tree.h"
-#include "tm_p.h"
#include "stringpool.h"
#include "cgraph.h"
-#include "alias.h"
#include "varasm.h"
-#include "flags.h"
#include "toplev.h"
#include "common/common-target.h"
diff --git a/gcc/cp/name-lookup.c b/gcc/cp/name-lookup.c
index 8744fff5c56..cebe57ead77 100644
--- a/gcc/cp/name-lookup.c
+++ b/gcc/cp/name-lookup.c
@@ -21,16 +21,11 @@ along with GCC; see the file COPYING3. If not see
#include "config.h"
#include "system.h"
#include "coretypes.h"
-#include "tm.h"
-#include "tree.h"
#include "cp-tree.h"
#include "timevar.h"
#include "stringpool.h"
-#include "flags.h"
-#include "alias.h"
#include "print-tree.h"
#include "attribs.h"
-#include "intl.h"
#include "debug.h"
#include "c-family/c-pragma.h"
#include "params.h"
diff --git a/gcc/cp/optimize.c b/gcc/cp/optimize.c
index f947d09a6d0..c4e70206f21 100644
--- a/gcc/cp/optimize.c
+++ b/gcc/cp/optimize.c
@@ -22,17 +22,11 @@ along with GCC; see the file COPYING3. If not see
#include "system.h"
#include "coretypes.h"
#include "target.h"
-#include "tree.h"
#include "cp-tree.h"
#include "stringpool.h"
#include "cgraph.h"
-#include "alias.h"
-#include "params.h"
#include "debug.h"
#include "tree-inline.h"
-#include "flags.h"
-#include "langhooks.h"
-#include "dumpfile.h"
#include "tree-iterator.h"
/* Prototypes. */
diff --git a/gcc/cp/parser.c b/gcc/cp/parser.c
index b303cede927..4ca79830712 100644
--- a/gcc/cp/parser.c
+++ b/gcc/cp/parser.c
@@ -21,8 +21,6 @@ along with GCC; see the file COPYING3. If not see
#include "config.h"
#include "system.h"
#include "coretypes.h"
-#include "target.h"
-#include "tree.h"
#include "cp-tree.h"
#include "c-family/c-common.h"
#include "timevar.h"
@@ -32,14 +30,11 @@ along with GCC; see the file COPYING3. If not see
#include "attribs.h"
#include "trans-mem.h"
#include "intl.h"
-#include "c-family/c-pragma.h"
#include "decl.h"
-#include "flags.h"
#include "c-family/c-objc.h"
#include "plugin.h"
#include "tree-pretty-print.h"
#include "parser.h"
-#include "type-utils.h"
#include "omp-low.h"
#include "gomp-constants.h"
#include "c-family/c-indentation.h"
@@ -29140,6 +29135,8 @@ cp_parser_omp_clause_name (cp_parser *parser)
result = PRAGMA_OMP_CLAUSE_DEVICE;
else if (!strcmp ("deviceptr", p))
result = PRAGMA_OACC_CLAUSE_DEVICEPTR;
+ else if (!strcmp ("device_resident", p))
+ result = PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT;
else if (!strcmp ("dist_schedule", p))
result = PRAGMA_OMP_CLAUSE_DIST_SCHEDULE;
break;
@@ -29553,10 +29550,16 @@ cp_parser_oacc_data_clause (cp_parser *parser, pragma_omp_clause c_kind,
case PRAGMA_OACC_CLAUSE_DEVICE:
kind = GOMP_MAP_FORCE_TO;
break;
+ case PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT:
+ kind = GOMP_MAP_DEVICE_RESIDENT;
+ break;
case PRAGMA_OACC_CLAUSE_HOST:
case PRAGMA_OACC_CLAUSE_SELF:
kind = GOMP_MAP_FORCE_FROM;
break;
+ case PRAGMA_OACC_CLAUSE_LINK:
+ kind = GOMP_MAP_LINK;
+ break;
case PRAGMA_OACC_CLAUSE_PRESENT:
kind = GOMP_MAP_FORCE_PRESENT;
break;
@@ -31557,6 +31560,10 @@ cp_parser_oacc_all_clauses (cp_parser *parser, omp_clause_mask mask,
clauses = cp_parser_oacc_data_clause_deviceptr (parser, clauses);
c_name = "deviceptr";
break;
+ case PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT:
+ clauses = cp_parser_oacc_data_clause (parser, c_kind, clauses);
+ c_name = "device_resident";
+ break;
case PRAGMA_OACC_CLAUSE_FIRSTPRIVATE:
clauses = cp_parser_omp_var_list (parser, OMP_CLAUSE_FIRSTPRIVATE,
clauses);
@@ -31581,6 +31588,10 @@ cp_parser_oacc_all_clauses (cp_parser *parser, omp_clause_mask mask,
clauses, here);
c_name = "independent";
break;
+ case PRAGMA_OACC_CLAUSE_LINK:
+ clauses = cp_parser_oacc_data_clause (parser, c_kind, clauses);
+ c_name = "link";
+ break;
case PRAGMA_OACC_CLAUSE_NUM_GANGS:
code = OMP_CLAUSE_NUM_GANGS;
c_name = "num_gangs";
@@ -34538,6 +34549,158 @@ cp_parser_oacc_data (cp_parser *parser, cp_token *pragma_tok)
}
/* OpenACC 2.0:
+ # pragma acc declare oacc-data-clause[optseq] new-line
+*/
+
+#define OACC_DECLARE_CLAUSE_MASK \
+ ( (OMP_CLAUSE_MASK_1 << PRAGMA_OACC_CLAUSE_COPY) \
+ | (OMP_CLAUSE_MASK_1 << PRAGMA_OACC_CLAUSE_COPYIN) \
+ | (OMP_CLAUSE_MASK_1 << PRAGMA_OACC_CLAUSE_COPYOUT) \
+ | (OMP_CLAUSE_MASK_1 << PRAGMA_OACC_CLAUSE_CREATE) \
+ | (OMP_CLAUSE_MASK_1 << PRAGMA_OACC_CLAUSE_DEVICEPTR) \
+ | (OMP_CLAUSE_MASK_1 << PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT) \
+ | (OMP_CLAUSE_MASK_1 << PRAGMA_OACC_CLAUSE_LINK) \
+ | (OMP_CLAUSE_MASK_1 << PRAGMA_OACC_CLAUSE_PRESENT) \
+ | (OMP_CLAUSE_MASK_1 << PRAGMA_OACC_CLAUSE_PRESENT_OR_COPY) \
+ | (OMP_CLAUSE_MASK_1 << PRAGMA_OACC_CLAUSE_PRESENT_OR_COPYIN) \
+ | (OMP_CLAUSE_MASK_1 << PRAGMA_OACC_CLAUSE_PRESENT_OR_COPYOUT) \
+ | (OMP_CLAUSE_MASK_1 << PRAGMA_OACC_CLAUSE_PRESENT_OR_CREATE))
+
+static tree
+cp_parser_oacc_declare (cp_parser *parser, cp_token *pragma_tok)
+{
+ tree clauses, stmt;
+ bool error = false;
+
+ clauses = cp_parser_oacc_all_clauses (parser, OACC_DECLARE_CLAUSE_MASK,
+ "#pragma acc declare", pragma_tok, true);
+
+
+ if (find_omp_clause (clauses, OMP_CLAUSE_MAP) == NULL_TREE)
+ {
+ error_at (pragma_tok->location,
+ "no valid clauses specified in %<#pragma acc declare%>");
+ return NULL_TREE;
+ }
+
+ for (tree t = clauses; t; t = OMP_CLAUSE_CHAIN (t))
+ {
+ location_t loc = OMP_CLAUSE_LOCATION (t);
+ tree decl = OMP_CLAUSE_DECL (t);
+ if (!DECL_P (decl))
+ {
+ error_at (loc, "array section in %<#pragma acc declare%>");
+ error = true;
+ continue;
+ }
+ gcc_assert (OMP_CLAUSE_CODE (t) == OMP_CLAUSE_MAP);
+ switch (OMP_CLAUSE_MAP_KIND (t))
+ {
+ case GOMP_MAP_FORCE_ALLOC:
+ case GOMP_MAP_FORCE_TO:
+ case GOMP_MAP_FORCE_DEVICEPTR:
+ case GOMP_MAP_DEVICE_RESIDENT:
+ break;
+
+ case GOMP_MAP_POINTER:
+ /* Generated by c_finish_omp_clauses from array sections;
+ avoid spurious diagnostics. */
+ break;
+
+ case GOMP_MAP_LINK:
+ if (!global_bindings_p ()
+ && (TREE_STATIC (decl)
+ || !DECL_EXTERNAL (decl)))
+ {
+ error_at (loc,
+ "%qD must be a global variable in"
+ "%<#pragma acc declare link%>",
+ decl);
+ error = true;
+ continue;
+ }
+ break;
+
+ default:
+ if (global_bindings_p ())
+ {
+ error_at (loc, "invalid OpenACC clause at file scope");
+ error = true;
+ continue;
+ }
+ if (DECL_EXTERNAL (decl))
+ {
+ error_at (loc,
+ "invalid use of %<extern%> variable %qD "
+ "in %<#pragma acc declare%>", decl);
+ error = true;
+ continue;
+ }
+ else if (TREE_PUBLIC (decl))
+ {
+ error_at (loc,
+ "invalid use of %<global%> variable %qD "
+ "in %<#pragma acc declare%>", decl);
+ error = true;
+ continue;
+ }
+ break;
+ }
+
+ if (lookup_attribute ("omp declare target", DECL_ATTRIBUTES (decl))
+ || lookup_attribute ("omp declare target link",
+ DECL_ATTRIBUTES (decl)))
+ {
+ error_at (loc, "variable %qD used more than once with "
+ "%<#pragma acc declare%>", decl);
+ error = true;
+ continue;
+ }
+
+ if (!error)
+ {
+ tree id;
+
+ if (OMP_CLAUSE_MAP_KIND (t) == GOMP_MAP_LINK)
+ id = get_identifier ("omp declare target link");
+ else
+ id = get_identifier ("omp declare target");
+
+ DECL_ATTRIBUTES (decl)
+ = tree_cons (id, NULL_TREE, DECL_ATTRIBUTES (decl));
+ if (global_bindings_p ())
+ {
+ symtab_node *node = symtab_node::get (decl);
+ if (node != NULL)
+ {
+ node->offloadable = 1;
+#ifdef ENABLE_OFFLOADING
+ g->have_offload = true;
+ if (is_a <varpool_node *> (node))
+ {
+ vec_safe_push (offload_vars, decl);
+ node->force_output = 1;
+ }
+#endif
+ }
+ }
+ }
+ }
+
+ if (error || global_bindings_p ())
+ return NULL_TREE;
+
+ stmt = make_node (OACC_DECLARE);
+ TREE_TYPE (stmt) = void_type_node;
+ OACC_DECLARE_CLAUSES (stmt) = clauses;
+ SET_EXPR_LOCATION (stmt, pragma_tok->location);
+
+ add_stmt (stmt);
+
+ return NULL_TREE;
+}
+
+/* OpenACC 2.0:
# pragma acc enter data oacc-enter-data-clause[optseq] new-line
or
@@ -36366,6 +36529,10 @@ cp_parser_pragma (cp_parser *parser, enum pragma_context context)
cp_parser_omp_declare (parser, pragma_tok, context);
return false;
+ case PRAGMA_OACC_DECLARE:
+ cp_parser_oacc_declare (parser, pragma_tok);
+ return false;
+
case PRAGMA_OACC_ROUTINE:
cp_parser_oacc_routine (parser, pragma_tok, context);
return false;
diff --git a/gcc/cp/parser.h b/gcc/cp/parser.h
index fdbff6664ef..022d03787a8 100644
--- a/gcc/cp/parser.h
+++ b/gcc/cp/parser.h
@@ -48,7 +48,7 @@ struct GTY (()) cp_token {
/* Token flags. */
unsigned char flags;
/* Identifier for the pragma. */
- ENUM_BITFIELD (pragma_kind) pragma_kind : 6;
+ ENUM_BITFIELD (pragma_kind) pragma_kind : 8;
/* True if this token is from a context where it is implicitly extern "C" */
BOOL_BITFIELD implicit_extern_c : 1;
/* True if an error has already been reported for this token, such as a
diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c
index fb9cdf896f0..29046572b2c 100644
--- a/gcc/cp/pt.c
+++ b/gcc/cp/pt.c
@@ -27,21 +27,15 @@ along with GCC; see the file COPYING3. If not see
#include "config.h"
#include "system.h"
#include "coretypes.h"
-#include "tm.h"
-#include "tree.h"
#include "cp-tree.h"
-#include "c-family/c-common.h"
#include "timevar.h"
#include "stringpool.h"
#include "varasm.h"
#include "attribs.h"
#include "stor-layout.h"
#include "intl.h"
-#include "flags.h"
#include "c-family/c-objc.h"
#include "cp-objcp-common.h"
-#include "tree-inline.h"
-#include "decl.h"
#include "toplev.h"
#include "tree-iterator.h"
#include "type-utils.h"
@@ -2806,14 +2800,6 @@ check_explicit_specialization (tree declarator,
error ("%qD is not a template function", dname);
fns = error_mark_node;
}
- else
- {
- tree fn = OVL_CURRENT (fns);
- if (!is_associated_namespace (CP_DECL_CONTEXT (decl),
- CP_DECL_CONTEXT (fn)))
- error ("%qD is not declared in %qD",
- decl, current_namespace);
- }
}
declarator = lookup_template_function (fns, NULL_TREE);
@@ -2947,6 +2933,14 @@ check_explicit_specialization (tree declarator,
return error_mark_node;
else
{
+ if (!ctype && !was_template_id
+ && (specialization || member_specialization
+ || explicit_instantiation)
+ && !is_associated_namespace (CP_DECL_CONTEXT (decl),
+ CP_DECL_CONTEXT (tmpl)))
+ error ("%qD is not declared in %qD",
+ tmpl, current_namespace);
+
tree gen_tmpl = most_general_template (tmpl);
if (explicit_instantiation)
@@ -10168,7 +10162,12 @@ instantiate_class_template_1 (tree type)
{
if (!DECL_TEMPLATE_INFO (decl)
|| DECL_TEMPLATE_RESULT (DECL_TI_TEMPLATE (decl)) != decl)
- instantiate_decl (decl, false, false);
+ {
+ /* Set function_depth to avoid garbage collection. */
+ ++function_depth;
+ instantiate_decl (decl, false, false);
+ --function_depth;
+ }
/* We need to instantiate the capture list from the template
after we've instantiated the closure members, but before we
@@ -15409,6 +15408,14 @@ tsubst_expr (tree t, tree args, tsubst_flags_t complain, tree in_decl,
add_stmt (t);
break;
+ case OACC_DECLARE:
+ t = copy_node (t);
+ tmp = tsubst_omp_clauses (OACC_DECLARE_CLAUSES (t), false, false,
+ args, complain, in_decl);
+ OACC_DECLARE_CLAUSES (t) = tmp;
+ add_stmt (t);
+ break;
+
case OMP_TARGET_UPDATE:
case OMP_TARGET_ENTER_DATA:
case OMP_TARGET_EXIT_DATA:
diff --git a/gcc/cp/ptree.c b/gcc/cp/ptree.c
index d01e8caab72..a9b3987f067 100644
--- a/gcc/cp/ptree.c
+++ b/gcc/cp/ptree.c
@@ -22,10 +22,7 @@ along with GCC; see the file COPYING3. If not see
#include "config.h"
#include "system.h"
#include "coretypes.h"
-#include "tm.h"
-#include "tree.h"
#include "cp-tree.h"
-#include "alias.h"
#include "print-tree.h"
void
diff --git a/gcc/cp/repo.c b/gcc/cp/repo.c
index 2978198f45a..2d5c5da7cdd 100644
--- a/gcc/cp/repo.c
+++ b/gcc/cp/repo.c
@@ -27,13 +27,9 @@ along with GCC; see the file COPYING3. If not see
#include "config.h"
#include "system.h"
#include "coretypes.h"
-#include "tm.h"
-#include "tree.h"
#include "cp-tree.h"
#include "stringpool.h"
-#include "alias.h"
#include "toplev.h"
-#include "flags.h"
static const char *extract_string (const char **);
static const char *get_base_filename (const char *);
diff --git a/gcc/cp/rtti.c b/gcc/cp/rtti.c
index be25be4e07d..b397b55b78c 100644
--- a/gcc/cp/rtti.c
+++ b/gcc/cp/rtti.c
@@ -22,15 +22,11 @@ along with GCC; see the file COPYING3. If not see
#include "system.h"
#include "coretypes.h"
#include "target.h"
-#include "tree.h"
#include "cp-tree.h"
#include "tm_p.h"
#include "stringpool.h"
#include "intl.h"
-#include "alias.h"
#include "stor-layout.h"
-#include "flags.h"
-#include "convert.h"
#include "c-family/c-pragma.h"
/* C++ returns type information to the user in struct type_info
diff --git a/gcc/cp/search.c b/gcc/cp/search.c
index 93054bda5d8..94502f6322f 100644
--- a/gcc/cp/search.c
+++ b/gcc/cp/search.c
@@ -24,12 +24,8 @@ along with GCC; see the file COPYING3. If not see
#include "config.h"
#include "system.h"
#include "coretypes.h"
-#include "target.h"
-#include "tree.h"
#include "cp-tree.h"
-#include "alias.h"
#include "intl.h"
-#include "flags.h"
#include "toplev.h"
static int is_subobject_of_p (tree, tree);
diff --git a/gcc/cp/semantics.c b/gcc/cp/semantics.c
index 42fe14cb09f..67f8590f638 100644
--- a/gcc/cp/semantics.c
+++ b/gcc/cp/semantics.c
@@ -28,10 +28,7 @@ along with GCC; see the file COPYING3. If not see
#include "coretypes.h"
#include "target.h"
#include "bitmap.h"
-#include "tree.h"
#include "cp-tree.h"
-#include "c-family/c-common.h"
-#include "timevar.h"
#include "stringpool.h"
#include "cgraph.h"
#include "stmt.h"
@@ -40,12 +37,8 @@ along with GCC; see the file COPYING3. If not see
#include "c-family/c-objc.h"
#include "tree-inline.h"
#include "intl.h"
-#include "toplev.h"
-#include "flags.h"
#include "tree-iterator.h"
-#include "gimplify.h"
#include "omp-low.h"
-#include "builtins.h"
#include "convert.h"
#include "gomp-constants.h"
diff --git a/gcc/cp/tree.c b/gcc/cp/tree.c
index dd4daed9a8d..d2db31a628a 100644
--- a/gcc/cp/tree.c
+++ b/gcc/cp/tree.c
@@ -21,18 +21,13 @@ along with GCC; see the file COPYING3. If not see
#include "config.h"
#include "system.h"
#include "coretypes.h"
-#include "tm.h"
#include "tree.h"
#include "cp-tree.h"
#include "gimple-expr.h"
#include "cgraph.h"
-#include "alias.h"
-#include "fold-const.h"
-#include "tree-hasher.h"
#include "stor-layout.h"
#include "print-tree.h"
#include "tree-iterator.h"
-#include "flags.h"
#include "tree-inline.h"
#include "debug.h"
#include "convert.h"
diff --git a/gcc/cp/typeck.c b/gcc/cp/typeck.c
index 4e7ef584a08..6541e97cca5 100644
--- a/gcc/cp/typeck.c
+++ b/gcc/cp/typeck.c
@@ -28,12 +28,9 @@ along with GCC; see the file COPYING3. If not see
#include "system.h"
#include "coretypes.h"
#include "target.h"
-#include "tree.h"
#include "cp-tree.h"
-#include "c-family/c-common.h"
#include "stor-layout.h"
#include "varasm.h"
-#include "flags.h"
#include "intl.h"
#include "convert.h"
#include "c-family/c-objc.h"
diff --git a/gcc/cp/typeck2.c b/gcc/cp/typeck2.c
index 7544333f21e..839091c565e 100644
--- a/gcc/cp/typeck2.c
+++ b/gcc/cp/typeck2.c
@@ -28,14 +28,10 @@ along with GCC; see the file COPYING3. If not see
#include "config.h"
#include "system.h"
#include "coretypes.h"
-#include "tm.h"
-#include "tree.h"
#include "cp-tree.h"
-#include "alias.h"
#include "stor-layout.h"
#include "varasm.h"
#include "intl.h"
-#include "flags.h"
static tree
process_init_constructor (tree type, tree init, tsubst_flags_t complain);
diff --git a/gcc/cp/vtable-class-hierarchy.c b/gcc/cp/vtable-class-hierarchy.c
index d5c31e8ce07..752345d7ea4 100644
--- a/gcc/cp/vtable-class-hierarchy.c
+++ b/gcc/cp/vtable-class-hierarchy.c
@@ -113,7 +113,6 @@ along with GCC; see the file COPYING3. If not see
#include "config.h"
#include "system.h"
#include "coretypes.h"
-#include "tm.h"
#include "vtable-verify.h"
#include "cp-tree.h"
#include "stringpool.h"
diff --git a/gcc/cprop.c b/gcc/cprop.c
index 082f9fd2c88..7f1acc09eb0 100644
--- a/gcc/cprop.c
+++ b/gcc/cprop.c
@@ -39,6 +39,7 @@ along with GCC; see the file COPYING3. If not see
#include "tree-pass.h"
#include "dbgcnt.h"
#include "cfgloop.h"
+#include "gcse.h"
/* An obstack for our working variables. */
@@ -1724,47 +1725,6 @@ bypass_conditional_jumps (void)
return changed;
}
-/* Return true if the graph is too expensive to optimize. PASS is the
- optimization about to be performed. */
-
-static bool
-is_too_expensive (const char *pass)
-{
- /* Trying to perform global optimizations on flow graphs which have
- a high connectivity will take a long time and is unlikely to be
- particularly useful.
-
- In normal circumstances a cfg should have about twice as many
- edges as blocks. But we do not want to punish small functions
- which have a couple switch statements. Rather than simply
- threshold the number of blocks, uses something with a more
- graceful degradation. */
- if (n_edges_for_fn (cfun) > 20000 + n_basic_blocks_for_fn (cfun) * 4)
- {
- warning (OPT_Wdisabled_optimization,
- "%s: %d basic blocks and %d edges/basic block",
- pass, n_basic_blocks_for_fn (cfun),
- n_edges_for_fn (cfun) / n_basic_blocks_for_fn (cfun));
-
- return true;
- }
-
- /* If allocating memory for the cprop bitmap would take up too much
- storage it's better just to disable the optimization. */
- if ((n_basic_blocks_for_fn (cfun)
- * SBITMAP_SET_SIZE (max_reg_num ())
- * sizeof (SBITMAP_ELT_TYPE)) > MAX_GCSE_MEMORY)
- {
- warning (OPT_Wdisabled_optimization,
- "%s: %d basic blocks and %d registers",
- pass, n_basic_blocks_for_fn (cfun), max_reg_num ());
-
- return true;
- }
-
- return false;
-}
-
/* Main function for the CPROP pass. */
static int
@@ -1775,7 +1735,7 @@ one_cprop_pass (void)
/* Return if there's nothing to do, or it is too expensive. */
if (n_basic_blocks_for_fn (cfun) <= NUM_FIXED_BLOCKS + 1
- || is_too_expensive (_ ("const/copy propagation disabled")))
+ || gcse_or_cprop_is_too_expensive (_ ("const/copy propagation disabled")))
return 0;
global_const_prop_count = local_const_prop_count = 0;
diff --git a/gcc/diagnostic.c b/gcc/diagnostic.c
index ee034e77170..b4d3a7d59ce 100644
--- a/gcc/diagnostic.c
+++ b/gcc/diagnostic.c
@@ -867,7 +867,7 @@ diagnostic_append_note (diagnostic_context *context,
diagnostic_info diagnostic;
va_list ap;
const char *saved_prefix;
- rich_location richloc (location);
+ rich_location richloc (line_table, location);
va_start (ap, gmsgid);
diagnostic_set_info (&diagnostic, gmsgid, &ap, &richloc, DK_NOTE);
@@ -925,7 +925,7 @@ emit_diagnostic (diagnostic_t kind, location_t location, int opt,
diagnostic_info diagnostic;
va_list ap;
bool ret;
- rich_location richloc (location);
+ rich_location richloc (line_table, location);
va_start (ap, gmsgid);
if (kind == DK_PERMERROR)
@@ -952,7 +952,7 @@ inform (location_t location, const char *gmsgid, ...)
{
diagnostic_info diagnostic;
va_list ap;
- rich_location richloc (location);
+ rich_location richloc (line_table, location);
va_start (ap, gmsgid);
diagnostic_set_info (&diagnostic, gmsgid, &ap, &richloc, DK_NOTE);
@@ -981,7 +981,7 @@ inform_n (location_t location, int n, const char *singular_gmsgid,
{
diagnostic_info diagnostic;
va_list ap;
- rich_location richloc (location);
+ rich_location richloc (line_table, location);
va_start (ap, plural_gmsgid);
diagnostic_set_info_translated (&diagnostic,
@@ -1000,7 +1000,7 @@ warning (int opt, const char *gmsgid, ...)
diagnostic_info diagnostic;
va_list ap;
bool ret;
- rich_location richloc (input_location);
+ rich_location richloc (line_table, input_location);
va_start (ap, gmsgid);
diagnostic_set_info (&diagnostic, gmsgid, &ap, &richloc, DK_WARNING);
@@ -1021,7 +1021,7 @@ warning_at (location_t location, int opt, const char *gmsgid, ...)
diagnostic_info diagnostic;
va_list ap;
bool ret;
- rich_location richloc (location);
+ rich_location richloc (line_table, location);
va_start (ap, gmsgid);
diagnostic_set_info (&diagnostic, gmsgid, &ap, &richloc, DK_WARNING);
@@ -1059,7 +1059,7 @@ warning_n (location_t location, int opt, int n, const char *singular_gmsgid,
diagnostic_info diagnostic;
va_list ap;
bool ret;
- rich_location richloc (location);
+ rich_location richloc (line_table, location);
va_start (ap, plural_gmsgid);
diagnostic_set_info_translated (&diagnostic,
@@ -1091,7 +1091,7 @@ pedwarn (location_t location, int opt, const char *gmsgid, ...)
diagnostic_info diagnostic;
va_list ap;
bool ret;
- rich_location richloc (location);
+ rich_location richloc (line_table, location);
va_start (ap, gmsgid);
diagnostic_set_info (&diagnostic, gmsgid, &ap, &richloc, DK_PEDWARN);
@@ -1114,7 +1114,7 @@ permerror (location_t location, const char *gmsgid, ...)
diagnostic_info diagnostic;
va_list ap;
bool ret;
- rich_location richloc (location);
+ rich_location richloc (line_table, location);
va_start (ap, gmsgid);
diagnostic_set_info (&diagnostic, gmsgid, &ap, &richloc,
@@ -1150,7 +1150,7 @@ error (const char *gmsgid, ...)
{
diagnostic_info diagnostic;
va_list ap;
- rich_location richloc (input_location);
+ rich_location richloc (line_table, input_location);
va_start (ap, gmsgid);
diagnostic_set_info (&diagnostic, gmsgid, &ap, &richloc, DK_ERROR);
@@ -1166,7 +1166,7 @@ error_n (location_t location, int n, const char *singular_gmsgid,
{
diagnostic_info diagnostic;
va_list ap;
- rich_location richloc (location);
+ rich_location richloc (line_table, location);
va_start (ap, plural_gmsgid);
diagnostic_set_info_translated (&diagnostic,
@@ -1182,7 +1182,7 @@ error_at (location_t loc, const char *gmsgid, ...)
{
diagnostic_info diagnostic;
va_list ap;
- rich_location richloc (loc);
+ rich_location richloc (line_table, loc);
va_start (ap, gmsgid);
diagnostic_set_info (&diagnostic, gmsgid, &ap, &richloc, DK_ERROR);
@@ -1213,7 +1213,7 @@ sorry (const char *gmsgid, ...)
{
diagnostic_info diagnostic;
va_list ap;
- rich_location richloc (input_location);
+ rich_location richloc (line_table, input_location);
va_start (ap, gmsgid);
diagnostic_set_info (&diagnostic, gmsgid, &ap, &richloc, DK_SORRY);
@@ -1237,7 +1237,7 @@ fatal_error (location_t loc, const char *gmsgid, ...)
{
diagnostic_info diagnostic;
va_list ap;
- rich_location richloc (loc);
+ rich_location richloc (line_table, loc);
va_start (ap, gmsgid);
diagnostic_set_info (&diagnostic, gmsgid, &ap, &richloc, DK_FATAL);
@@ -1256,7 +1256,7 @@ internal_error (const char *gmsgid, ...)
{
diagnostic_info diagnostic;
va_list ap;
- rich_location richloc (input_location);
+ rich_location richloc (line_table, input_location);
va_start (ap, gmsgid);
diagnostic_set_info (&diagnostic, gmsgid, &ap, &richloc, DK_ICE);
@@ -1274,7 +1274,7 @@ internal_error_no_backtrace (const char *gmsgid, ...)
{
diagnostic_info diagnostic;
va_list ap;
- rich_location richloc (input_location);
+ rich_location richloc (line_table, input_location);
va_start (ap, gmsgid);
diagnostic_set_info (&diagnostic, gmsgid, &ap, &richloc, DK_ICE_NOBT);
@@ -1351,7 +1351,7 @@ real_abort (void)
DEBUG_FUNCTION void
source_range::debug (const char *msg) const
{
- rich_location richloc (m_start);
+ rich_location richloc (line_table, m_start);
richloc.add_range (m_start, m_finish, false);
inform_at_rich_loc (&richloc, "%s", msg);
}
diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
index e2620a57c8b..eeb79e65c0e 100644
--- a/gcc/doc/invoke.texi
+++ b/gcc/doc/invoke.texi
@@ -354,6 +354,7 @@ Objective-C and Objective-C++ Dialects}.
-fdump-tree-fre@r{[}-@var{n}@r{]} @gol
-fdump-tree-vtable-verify @gol
-fdump-tree-vrp@r{[}-@var{n}@r{]} @gol
+-fdump-tree-split-paths@r{[}-@var{n}@r{]} @gol
-fdump-tree-storeccp@r{[}-@var{n}@r{]} @gol
-fdump-final-insns=@var{file} @gol
-fcompare-debug@r{[}=@var{opts}@r{]} -fcompare-debug-second @gol
@@ -448,6 +449,7 @@ Objective-C and Objective-C++ Dialects}.
-fsel-sched-pipelining -fsel-sched-pipelining-outer-loops @gol
-fsemantic-interposition -fshrink-wrap -fsignaling-nans @gol
-fsingle-precision-constant -fsplit-ivs-in-unroller @gol
+-fsplit-paths @gol
-fsplit-wide-types -fssa-backprop -fssa-phiopt @gol
-fstack-protector -fstack-protector-all -fstack-protector-strong @gol
-fstack-protector-explicit -fstdarg-opt -fstrict-aliasing @gol
@@ -549,7 +551,9 @@ Objective-C and Objective-C++ Dialects}.
-mexpand-adddi -mindexed-loads -mlra -mlra-priority-none @gol
-mlra-priority-compact mlra-priority-noncompact -mno-millicode @gol
-mmixed-code -mq-class -mRcq -mRcw -msize-level=@var{level} @gol
--mtune=@var{cpu} -mmultcost=@var{num} -munalign-prob-threshold=@var{probability}}
+-mtune=@var{cpu} -mmultcost=@var{num} @gol
+-munalign-prob-threshold=@var{probability} -mmpy-option=@var{multo} @gol
+-mdiv-rem -mcode-density}
@emph{ARM Options}
@gccoptlist{-mapcs-frame -mno-apcs-frame @gol
@@ -873,7 +877,7 @@ Objective-C and Objective-C++ Dialects}.
-march=@var{arch} -mbmx -mno-bmx -mcdx -mno-cdx}
@emph{Nvidia PTX Options}
-@gccoptlist{-m32 -m64 -mmainkernel}
+@gccoptlist{-m32 -m64 -mmainkernel -moptimize}
@emph{PDP-11 Options}
@gccoptlist{-mfpu -msoft-float -mac0 -mno-ac0 -m40 -m45 -m10 @gol
@@ -7169,6 +7173,11 @@ output on to @file{stderr}. If two conflicting dump filenames are
given for the same pass, then the latter option overrides the earlier
one.
+@item split-paths
+@opindex fdump-tree-split-paths
+Dump each function after splitting paths to loop backedges. The file
+name is made by appending @file{.split-paths} to the source file name.
+
@item all
Turn on all options, except @option{raw}, @option{slim}, @option{verbose}
and @option{lineno}.
@@ -7806,6 +7815,7 @@ also turns on the following optimization flags:
-frerun-cse-after-loop @gol
-fsched-interblock -fsched-spec @gol
-fschedule-insns -fschedule-insns2 @gol
+-fsplit-paths @gol
-fstrict-aliasing -fstrict-overflow @gol
-ftree-builtin-call-dce @gol
-ftree-switch-conversion -ftree-tail-merge @gol
@@ -8819,7 +8829,7 @@ currently enabled, but may be enabled by @option{-O2} in the future.
@item -ftree-sink
@opindex ftree-sink
-Perform forward store motion on trees. This flag is
+Perform forward store motion on trees. This flag is
enabled by default at @option{-O} and higher.
@item -ftree-bit-ccp
@@ -9125,6 +9135,12 @@ enabled by default at @option{-O2} and higher. Null pointer check
elimination is only done if @option{-fdelete-null-pointer-checks} is
enabled.
+@item -fsplit-paths
+@opindex fsplit-paths
+Split paths leading to loop backedges. This can improve dead code
+elimination and common subexpression elimination. This is enabled by
+default at @option{-O2} and above.
+
@item -fsplit-ivs-in-unroller
@opindex fsplit-ivs-in-unroller
Enables expression of values of induction variables in later iterations
@@ -12575,7 +12591,7 @@ processors implementing the target architecture.
Specify the name of the target processor for which GCC should tune the
performance of the code. Permissible values for this option are:
@samp{generic}, @samp{cortex-a53}, @samp{cortex-a57}, @samp{cortex-a72},
-@samp{exynos-m1}, @samp{thunderx}, @samp{xgene1}.
+@samp{exynos-m1}, @samp{qdf24xx}, @samp{thunderx}, @samp{xgene1}.
Additionally, this option can specify that GCC should tune the performance
of the code for a big.LITTLE system. Permissible values for this
@@ -12841,7 +12857,7 @@ is being compiled:
@item -mbarrel-shifter
@opindex mbarrel-shifter
Generate instructions supported by barrel shifter. This is the default
-unless @option{-mcpu=ARC601} is in effect.
+unless @option{-mcpu=ARC601} or @samp{-mcpu=ARCEM} is in effect.
@item -mcpu=@var{cpu}
@opindex mcpu
@@ -12854,17 +12870,28 @@ values for @var{cpu} are
@opindex mA6
@opindex mARC600
@item ARC600
+@item arc600
Compile for ARC600. Aliases: @option{-mA6}, @option{-mARC600}.
@item ARC601
+@item arc601
@opindex mARC601
Compile for ARC601. Alias: @option{-mARC601}.
@item ARC700
+@item arc700
@opindex mA7
@opindex mARC700
Compile for ARC700. Aliases: @option{-mA7}, @option{-mARC700}.
This is the default when configured with @option{--with-cpu=arc700}@.
+
+@item ARCEM
+@item arcem
+Compile for ARC EM.
+
+@item ARCHS
+@item archs
+Compile for ARC HS.
@end table
@item -mdpfp
@@ -12935,6 +12962,62 @@ can overridden by FPX options; @samp{mspfp}, @samp{mspfp-compact}, or
@opindex mswap
Generate swap instructions.
+@item -mdiv-rem
+@opindex mdiv-rem
+Enable DIV/REM instructions for ARCv2 cores.
+
+@item -mcode-density
+@opindex mcode-density
+Enable code density instructions for ARC EM, default on for ARC HS.
+
+@item -mmpy-option=@var{multo}
+@opindex mmpy-option
+Compile ARCv2 code with a multiplier design option. @samp{wlh1} is
+the default value. The recognized values for @var{multo} are:
+
+@table @samp
+@item 0
+No multiplier available.
+
+@item 1
+@opindex w
+The multiply option is set to w: 16x16 multiplier, fully pipelined.
+The following instructions are enabled: MPYW, and MPYUW.
+
+@item 2
+@opindex wlh1
+The multiply option is set to wlh1: 32x32 multiplier, fully
+pipelined (1 stage). The following instructions are additionaly
+enabled: MPY, MPYU, MPYM, MPYMU, and MPY_S.
+
+@item 3
+@opindex wlh2
+The multiply option is set to wlh2: 32x32 multiplier, fully pipelined
+(2 stages). The following instructions are additionaly enabled: MPY,
+MPYU, MPYM, MPYMU, and MPY_S.
+
+@item 4
+@opindex wlh3
+The multiply option is set to wlh3: Two 16x16 multiplier, blocking,
+sequential. The following instructions are additionaly enabled: MPY,
+MPYU, MPYM, MPYMU, and MPY_S.
+
+@item 5
+@opindex wlh4
+The multiply option is set to wlh4: One 16x16 multiplier, blocking,
+sequential. The following instructions are additionaly enabled: MPY,
+MPYU, MPYM, MPYMU, and MPY_S.
+
+@item 6
+@opindex wlh5
+The multiply option is set to wlh5: One 32x4 multiplier, blocking,
+sequential. The following instructions are additionaly enabled: MPY,
+MPYU, MPYM, MPYMU, and MPY_S.
+
+@end table
+
+This option is only available for ARCv2 cores@.
+
@end table
The following options are passed through to the assembler, and also
@@ -13495,6 +13578,7 @@ Permissible names are: @samp{arm2}, @samp{arm250},
@samp{cortex-m0.small-multiply},
@samp{cortex-m0plus.small-multiply},
@samp{exynos-m1},
+@samp{qdf24xx},
@samp{marvell-pj4},
@samp{xscale}, @samp{iwmmxt}, @samp{iwmmxt2}, @samp{ep9312},
@samp{fa526}, @samp{fa626},
@@ -18960,6 +19044,11 @@ Generate code for 32-bit or 64-bit ABI.
Link in code for a __main kernel. This is for stand-alone instead of
offloading execution.
+@item -moptimize
+@opindex moptimize
+Apply partitioned execution optimizations. This is the default when any
+level of optimization is selected.
+
@end table
@node PDP-11 Options
diff --git a/gcc/doc/md.texi b/gcc/doc/md.texi
index 71a2791a602..80a1f64a61f 100644
--- a/gcc/doc/md.texi
+++ b/gcc/doc/md.texi
@@ -3121,9 +3121,28 @@ asm ("xvadddp %0,%1,%2" : "=wa" (v1) : "wa" (v2), "wa" (v3));
is not correct.
+If an instruction only takes Altivec registers, you do not want to use
+@code{%x<n>}.
+
+@smallexample
+asm ("xsaddqp %0,%1,%2" : "=v" (v1) : "v" (v2), "v" (v3));
+@end smallexample
+
+is correct because the @code{xsaddqp} instruction only takes Altivec
+registers, while:
+
+@smallexample
+asm ("xsaddqp %x0,%x1,%x2" : "=v" (v1) : "v" (v2), "v" (v3));
+@end smallexample
+
+is incorrect.
+
@item wd
VSX vector register to hold vector double data or NO_REGS.
+@item we
+VSX register if the -mpower9-vector -m64 options were used or NO_REGS.
+
@item wf
VSX vector register to hold vector float data or NO_REGS.
@@ -3187,6 +3206,16 @@ Floating point register if the LFIWZX instruction is enabled or NO_REGS.
@item wD
Int constant that is the element number of the 64-bit scalar in a vector.
+@item wF
+Memory operand suitable for power9 fusion load/stores.
+
+@item wG
+Memory operand suitable for TOC fusion memory references.
+
+@item wL
+Int constant that is the element number that the MFVSRLD instruction
+targets.
+
@item wQ
A memory address that will work with the @code{lq} and @code{stq}
instructions.
@@ -4749,17 +4778,51 @@ specify field index and operand 0 place to store value into.
Initialize the vector to given values. Operand 0 is the vector to initialize
and operand 1 is parallel containing values for individual fields.
+@cindex @code{vec_cmp@var{m}@var{n}} instruction pattern
+@item @samp{vec_cmp@var{m}@var{n}}
+Output a vector comparison. Operand 0 of mode @var{n} is the destination for
+predicate in operand 1 which is a signed vector comparison with operands of
+mode @var{m} in operands 2 and 3. Predicate is computed by element-wise
+evaluation of the vector comparison with a truth value of all-ones and a false
+value of all-zeros.
+
+@cindex @code{vec_cmpu@var{m}@var{n}} instruction pattern
+@item @samp{vec_cmpu@var{m}@var{n}}
+Similar to @code{vec_cmp@var{m}@var{n}} but perform unsigned vector comparison.
+
@cindex @code{vcond@var{m}@var{n}} instruction pattern
@item @samp{vcond@var{m}@var{n}}
Output a conditional vector move. Operand 0 is the destination to
receive a combination of operand 1 and operand 2, which are of mode @var{m},
-dependent on the outcome of the predicate in operand 3 which is a
+dependent on the outcome of the predicate in operand 3 which is a signed
vector comparison with operands of mode @var{n} in operands 4 and 5. The
modes @var{m} and @var{n} should have the same size. Operand 0
will be set to the value @var{op1} & @var{msk} | @var{op2} & ~@var{msk}
where @var{msk} is computed by element-wise evaluation of the vector
comparison with a truth value of all-ones and a false value of all-zeros.
+@cindex @code{vcondu@var{m}@var{n}} instruction pattern
+@item @samp{vcondu@var{m}@var{n}}
+Similar to @code{vcond@var{m}@var{n}} but performs unsigned vector
+comparison.
+
+@cindex @code{vcond_mask_@var{m}@var{n}} instruction pattern
+@item @samp{vcond_mask_@var{m}@var{n}}
+Similar to @code{vcond@var{m}@var{n}} but operand 3 holds a pre-computed
+result of vector comparison.
+
+@cindex @code{maskload@var{m}@var{n}} instruction pattern
+@item @samp{maskload@var{m}@var{n}}
+Perform a masked load of vector from memory operand 1 of mode @var{m}
+into register operand 0. Mask is provided in register operand 2 of
+mode @var{n}.
+
+@cindex @code{maskstore@var{m}@var{n}} instruction pattern
+@item @samp{maskload@var{m}@var{n}}
+Perform a masked store of vector from register operand 1 of mode @var{m}
+into memory operand 0. Mask is provided in register operand 2 of
+mode @var{n}.
+
@cindex @code{vec_perm@var{m}} instruction pattern
@item @samp{vec_perm@var{m}}
Output a (variable) vector permutation. Operand 0 is the destination
diff --git a/gcc/doc/tm.texi b/gcc/doc/tm.texi
index 5609a98a430..4272c369dda 100644
--- a/gcc/doc/tm.texi
+++ b/gcc/doc/tm.texi
@@ -375,6 +375,11 @@ The sequence in which libgcc and libc are specified to the linker.
By default this is @code{%G %L %G}.
@end defmac
+@defmac POST_LINK_SPEC
+Define this macro to add additional steps to be executed after linker.
+The default value of this macro is empty string.
+@end defmac
+
@defmac LINK_COMMAND_SPEC
A C string constant giving the complete command line need to execute the
linker. When you do this, you will need to update your port each time a
diff --git a/gcc/doc/tm.texi.in b/gcc/doc/tm.texi.in
index 96ca063a391..9fcc0f76914 100644
--- a/gcc/doc/tm.texi.in
+++ b/gcc/doc/tm.texi.in
@@ -375,6 +375,11 @@ The sequence in which libgcc and libc are specified to the linker.
By default this is @code{%G %L %G}.
@end defmac
+@defmac POST_LINK_SPEC
+Define this macro to add additional steps to be executed after linker.
+The default value of this macro is empty string.
+@end defmac
+
@defmac LINK_COMMAND_SPEC
A C string constant giving the complete command line need to execute the
linker. When you do this, you will need to update your port each time a
diff --git a/gcc/expr.c b/gcc/expr.c
index 03936ee3ddb..bd43dc4f3fd 100644
--- a/gcc/expr.c
+++ b/gcc/expr.c
@@ -11128,7 +11128,8 @@ do_store_flag (sepops ops, rtx target, machine_mode mode)
if (TREE_CODE (ops->type) == VECTOR_TYPE)
{
tree ifexp = build2 (ops->code, ops->type, arg0, arg1);
- if (VECTOR_BOOLEAN_TYPE_P (ops->type))
+ if (VECTOR_BOOLEAN_TYPE_P (ops->type)
+ && expand_vec_cmp_expr_p (TREE_TYPE (arg0), ops->type))
return expand_vec_cmp_expr (ops->type, ifexp, target);
else
{
diff --git a/gcc/fold-const.c b/gcc/fold-const.c
index 927e623109f..ce59c488b7e 100644
--- a/gcc/fold-const.c
+++ b/gcc/fold-const.c
@@ -10214,54 +10214,9 @@ fold_binary_loc (location_t loc,
return fold_build2_loc (loc, RDIV_EXPR, type,
negate_expr (arg0),
TREE_OPERAND (arg1, 0));
-
- /* Convert A/B/C to A/(B*C). */
- if (flag_reciprocal_math
- && TREE_CODE (arg0) == RDIV_EXPR)
- return fold_build2_loc (loc, RDIV_EXPR, type, TREE_OPERAND (arg0, 0),
- fold_build2_loc (loc, MULT_EXPR, type,
- TREE_OPERAND (arg0, 1), arg1));
-
- /* Convert A/(B/C) to (A/B)*C. */
- if (flag_reciprocal_math
- && TREE_CODE (arg1) == RDIV_EXPR)
- return fold_build2_loc (loc, MULT_EXPR, type,
- fold_build2_loc (loc, RDIV_EXPR, type, arg0,
- TREE_OPERAND (arg1, 0)),
- TREE_OPERAND (arg1, 1));
-
- /* Convert C1/(X*C2) into (C1/C2)/X. */
- if (flag_reciprocal_math
- && TREE_CODE (arg1) == MULT_EXPR
- && TREE_CODE (arg0) == REAL_CST
- && TREE_CODE (TREE_OPERAND (arg1, 1)) == REAL_CST)
- {
- tree tem = const_binop (RDIV_EXPR, arg0,
- TREE_OPERAND (arg1, 1));
- if (tem)
- return fold_build2_loc (loc, RDIV_EXPR, type, tem,
- TREE_OPERAND (arg1, 0));
- }
-
return NULL_TREE;
case TRUNC_DIV_EXPR:
- /* Optimize (X & (-A)) / A where A is a power of 2,
- to X >> log2(A) */
- if (TREE_CODE (arg0) == BIT_AND_EXPR
- && !TYPE_UNSIGNED (type) && TREE_CODE (arg1) == INTEGER_CST
- && integer_pow2p (arg1) && tree_int_cst_sgn (arg1) > 0)
- {
- tree sum = fold_binary_loc (loc, PLUS_EXPR, TREE_TYPE (arg1),
- arg1, TREE_OPERAND (arg0, 1));
- if (sum && integer_zerop (sum)) {
- tree pow2 = build_int_cst (integer_type_node,
- wi::exact_log2 (arg1));
- return fold_build2_loc (loc, RSHIFT_EXPR, type,
- TREE_OPERAND (arg0, 0), pow2);
- }
- }
-
/* Fall through */
case FLOOR_DIV_EXPR:
@@ -11906,16 +11861,16 @@ get_array_ctor_element_at_index (tree ctor, offset_int access_index)
offset_int low_bound = 0;
if (TREE_CODE (TREE_TYPE (ctor)) == ARRAY_TYPE)
- {
- tree domain_type = TYPE_DOMAIN (TREE_TYPE (ctor));
- if (domain_type && TYPE_MIN_VALUE (domain_type))
{
- /* Static constructors for variably sized objects makes no sense. */
- gcc_assert (TREE_CODE (TYPE_MIN_VALUE (domain_type)) == INTEGER_CST);
- index_type = TREE_TYPE (TYPE_MIN_VALUE (domain_type));
- low_bound = wi::to_offset (TYPE_MIN_VALUE (domain_type));
+ tree domain_type = TYPE_DOMAIN (TREE_TYPE (ctor));
+ if (domain_type && TYPE_MIN_VALUE (domain_type))
+ {
+ /* Static constructors for variably sized objects makes no sense. */
+ gcc_assert (TREE_CODE (TYPE_MIN_VALUE (domain_type)) == INTEGER_CST);
+ index_type = TREE_TYPE (TYPE_MIN_VALUE (domain_type));
+ low_bound = wi::to_offset (TYPE_MIN_VALUE (domain_type));
+ }
}
- }
if (index_type)
access_index = wi::ext (access_index, TYPE_PRECISION (index_type),
@@ -11931,29 +11886,29 @@ get_array_ctor_element_at_index (tree ctor, offset_int access_index)
tree cfield, cval;
FOR_EACH_CONSTRUCTOR_ELT (CONSTRUCTOR_ELTS (ctor), cnt, cfield, cval)
- {
- /* Array constructor might explicitely set index, or specify range
- * or leave index NULL meaning that it is next index after previous
- * one. */
- if (cfield)
{
- if (TREE_CODE (cfield) == INTEGER_CST)
- max_index = index = wi::to_offset (cfield);
+ /* Array constructor might explicitly set index, or specify a range,
+ or leave index NULL meaning that it is next index after previous
+ one. */
+ if (cfield)
+ {
+ if (TREE_CODE (cfield) == INTEGER_CST)
+ max_index = index = wi::to_offset (cfield);
+ else
+ {
+ gcc_assert (TREE_CODE (cfield) == RANGE_EXPR);
+ index = wi::to_offset (TREE_OPERAND (cfield, 0));
+ max_index = wi::to_offset (TREE_OPERAND (cfield, 1));
+ }
+ }
else
- {
- gcc_assert (TREE_CODE (cfield) == RANGE_EXPR);
- index = wi::to_offset (TREE_OPERAND (cfield, 0));
- max_index = wi::to_offset (TREE_OPERAND (cfield, 1));
- }
- }
- else
- {
- index += 1;
- if (index_type)
- index = wi::ext (index, TYPE_PRECISION (index_type),
- TYPE_SIGN (index_type));
- max_index = index;
- }
+ {
+ index += 1;
+ if (index_type)
+ index = wi::ext (index, TYPE_PRECISION (index_type),
+ TYPE_SIGN (index_type));
+ max_index = index;
+ }
/* Do we have match? */
if (wi::cmpu (access_index, index) >= 0
diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog
index cd4c94e6764..a455b6bf531 100644
--- a/gcc/fortran/ChangeLog
+++ b/gcc/fortran/ChangeLog
@@ -1,3 +1,57 @@
+2015-11-13 Steven G. Kargl <kargl@gccc.gnu.org>
+
+ PR fortran/68319
+ * decl.c (gfc_match_data, gfc_match_entry): Enforce F2008:C1206.
+ * io.c (gfc_match_format): Ditto.
+ * match.c (gfc_match_st_function): Ditto.
+
+2015-11-13 David Malcolm <dmalcolm@redhat.com>
+
+ * error.c (gfc_warning): Pass line_table to rich_location ctor.
+ (gfc_warning_now_at): Likewise.
+ (gfc_warning_now): Likewise.
+ (gfc_error_now): Likewise.
+ (gfc_fatal_error): Likewise.
+ (gfc_error): Likewise.
+ (gfc_internal_error): Likewise.
+
+2015-11-12 Steven G. Kargl <kargl@gcc.gnu.org>
+
+ PR fortran/68318
+ * decl.c (get_proc_name): Increment reference count for ENTRY.
+ While here, fix comment and use postfix ++ for consistency.
+
+2015-11-11 Andrew MacLeod <amacleod@redhat.com>
+
+ * array.c: Remove unused header files.
+ * convert.c: Likewise.
+ * cpp.c: Likewise.
+ * decl.c: Likewise.
+ * f95-lang.c: Likewise.
+ * frontend-passes.c: Likewise.
+ * iresolve.c: Likewise.
+ * match.c: Likewise.
+ * module.c: Likewise.
+ * options.c: Likewise.
+ * parse.c: Likewise.
+ * target-memory.c: Likewise.
+ * trans-array.c: Likewise.
+ * trans-common.c: Likewise.
+ * trans-const.c: Likewise.
+ * trans-decl.c: Likewise.
+ * trans-expr.c: Likewise.
+ * trans-intrinsic.c: Likewise.
+ * trans-io.c: Likewise.
+ * trans-openmp.c: Likewise.
+ * trans-stmt.c: Likewise.
+ * trans-types.c: Likewise.
+ * trans.c: Likewise.
+
+2015-11-11 Dominique d'Humieres <dominiq@lps.ens.fr>
+
+ PR fortran/67826
+ * openmp.c (gfc_omp_udr_find): Fix typo.
+
2015-11-08 Steven g. Kargl <kargl@gcc.gnu.org>
PR fortran/68053
diff --git a/gcc/fortran/array.c b/gcc/fortran/array.c
index 0b676af551e..144d8e02487 100644
--- a/gcc/fortran/array.c
+++ b/gcc/fortran/array.c
@@ -23,7 +23,6 @@ along with GCC; see the file COPYING3. If not see
#include "coretypes.h"
#include "options.h"
#include "gfortran.h"
-#include "flags.h"
#include "match.h"
#include "constructor.h"
diff --git a/gcc/fortran/convert.c b/gcc/fortran/convert.c
index 37520770cb3..ad75cf5f05e 100644
--- a/gcc/fortran/convert.c
+++ b/gcc/fortran/convert.c
@@ -25,9 +25,7 @@ along with GCC; see the file COPYING3. If not see
#include "config.h"
#include "system.h"
#include "coretypes.h"
-#include "options.h"
#include "tree.h"
-#include "alias.h"
#include "fold-const.h"
#include "convert.h"
diff --git a/gcc/fortran/cpp.c b/gcc/fortran/cpp.c
index 85a2c79cd70..8b126267edb 100644
--- a/gcc/fortran/cpp.c
+++ b/gcc/fortran/cpp.c
@@ -20,13 +20,8 @@ along with GCC; see the file COPYING3. If not see
#include "system.h"
#include "coretypes.h"
#include "target.h"
-#include "tree.h"
#include "gfortran.h"
-#include "tm_p.h" /* Target prototypes. */
#include "diagnostic.h"
-#include "alias.h"
-#include "version.h"
-#include "flags.h"
#include "toplev.h"
diff --git a/gcc/fortran/decl.c b/gcc/fortran/decl.c
index 0c3377f7b08..6d76a7fd5ae 100644
--- a/gcc/fortran/decl.c
+++ b/gcc/fortran/decl.c
@@ -28,7 +28,6 @@ along with GCC; see the file COPYING3. If not see
#include "match.h"
#include "parse.h"
#include "constructor.h"
-#include "alias.h"
/* Macros to access allocate memory for gfc_data_variable,
gfc_data_value and gfc_data. */
@@ -553,6 +552,15 @@ gfc_match_data (void)
gfc_data *new_data;
match m;
+ /* Before parsing the rest of a DATA statement, check F2008:c1206. */
+ if ((gfc_current_state () == COMP_FUNCTION
+ || gfc_current_state () == COMP_SUBROUTINE)
+ && gfc_state_stack->previous->state == COMP_INTERFACE)
+ {
+ gfc_error ("DATA statement at %C cannot appear within an INTERFACE");
+ return MATCH_ERROR;
+ }
+
set_in_match_data (true);
for (;;)
@@ -926,6 +934,7 @@ get_proc_name (const char *name, gfc_symbol **result, bool module_fcn_entry)
gfc_find_sym_tree (name, gfc_current_ns, 0, &st);
st->n.sym = *result;
st = gfc_get_unique_symtree (gfc_current_ns);
+ sym->refs++;
st->n.sym = sym;
}
}
@@ -972,7 +981,7 @@ get_proc_name (const char *name, gfc_symbol **result, bool module_fcn_entry)
/* Trap another encompassed procedure with the same name. All
these conditions are necessary to avoid picking up an entry
whose name clashes with that of the encompassing procedure;
- this is handled using gsymbols to register unique,globally
+ this is handled using gsymbols to register unique, globally
accessible names. */
if (sym->attr.flavor != 0
&& sym->attr.proc != 0
@@ -5767,6 +5776,13 @@ gfc_match_entry (void)
return MATCH_ERROR;
}
+ if ((state == COMP_SUBROUTINE || state == COMP_FUNCTION)
+ && gfc_state_stack->previous->state == COMP_INTERFACE)
+ {
+ gfc_error ("ENTRY statement at %C cannot appear within an INTERFACE");
+ return MATCH_ERROR;
+ }
+
module_procedure = gfc_current_ns->parent != NULL
&& gfc_current_ns->parent->proc_name
&& gfc_current_ns->parent->proc_name->attr.flavor
@@ -9052,7 +9068,7 @@ gfc_match_final_decl (void)
/* Add this symbol to the list of finalizers. */
gcc_assert (block->f2k_derived);
- ++sym->refs;
+ sym->refs++;
f = XCNEW (gfc_finalizer);
f->proc_sym = sym;
f->proc_tree = NULL;
diff --git a/gcc/fortran/error.c b/gcc/fortran/error.c
index 4b3d31ce4ba..b4f70203078 100644
--- a/gcc/fortran/error.c
+++ b/gcc/fortran/error.c
@@ -773,7 +773,7 @@ gfc_warning (int opt, const char *gmsgid, va_list ap)
va_copy (argp, ap);
diagnostic_info diagnostic;
- rich_location rich_loc (UNKNOWN_LOCATION);
+ rich_location rich_loc (line_table, UNKNOWN_LOCATION);
bool fatal_errors = global_dc->fatal_errors;
pretty_printer *pp = global_dc->printer;
output_buffer *tmp_buffer = pp->buffer;
@@ -1120,7 +1120,7 @@ gfc_warning_now_at (location_t loc, int opt, const char *gmsgid, ...)
{
va_list argp;
diagnostic_info diagnostic;
- rich_location rich_loc (loc);
+ rich_location rich_loc (line_table, loc);
bool ret;
va_start (argp, gmsgid);
@@ -1138,7 +1138,7 @@ gfc_warning_now (int opt, const char *gmsgid, ...)
{
va_list argp;
diagnostic_info diagnostic;
- rich_location rich_loc (UNKNOWN_LOCATION);
+ rich_location rich_loc (line_table, UNKNOWN_LOCATION);
bool ret;
va_start (argp, gmsgid);
@@ -1158,7 +1158,7 @@ gfc_error_now (const char *gmsgid, ...)
{
va_list argp;
diagnostic_info diagnostic;
- rich_location rich_loc (UNKNOWN_LOCATION);
+ rich_location rich_loc (line_table, UNKNOWN_LOCATION);
error_buffer.flag = true;
@@ -1176,7 +1176,7 @@ gfc_fatal_error (const char *gmsgid, ...)
{
va_list argp;
diagnostic_info diagnostic;
- rich_location rich_loc (UNKNOWN_LOCATION);
+ rich_location rich_loc (line_table, UNKNOWN_LOCATION);
va_start (argp, gmsgid);
diagnostic_set_info (&diagnostic, gmsgid, &argp, &rich_loc, DK_FATAL);
@@ -1242,7 +1242,7 @@ gfc_error (const char *gmsgid, va_list ap)
}
diagnostic_info diagnostic;
- rich_location richloc (UNKNOWN_LOCATION);
+ rich_location richloc (line_table, UNKNOWN_LOCATION);
bool fatal_errors = global_dc->fatal_errors;
pretty_printer *pp = global_dc->printer;
output_buffer *tmp_buffer = pp->buffer;
@@ -1288,7 +1288,7 @@ gfc_internal_error (const char *gmsgid, ...)
{
va_list argp;
diagnostic_info diagnostic;
- rich_location rich_loc (UNKNOWN_LOCATION);
+ rich_location rich_loc (line_table, UNKNOWN_LOCATION);
va_start (argp, gmsgid);
diagnostic_set_info (&diagnostic, gmsgid, &argp, &rich_loc, DK_ICE);
diff --git a/gcc/fortran/f95-lang.c b/gcc/fortran/f95-lang.c
index 2e91470675f..605c2abd01d 100644
--- a/gcc/fortran/f95-lang.c
+++ b/gcc/fortran/f95-lang.c
@@ -30,17 +30,11 @@ along with GCC; see the file COPYING3. If not see
#include "tree.h"
#include "gfortran.h"
#include "trans.h"
-#include "timevar.h"
-#include "cgraph.h"
#include "diagnostic.h" /* For errorcount/warningcount */
-#include "ansidecl.h"
-#include "alias.h"
-#include "flags.h"
#include "langhooks.h"
#include "langhooks-def.h"
#include "toplev.h"
#include "debug.h"
-#include "dumpfile.h"
#include "cpp.h"
#include "trans-types.h"
#include "trans-const.h"
diff --git a/gcc/fortran/frontend-passes.c b/gcc/fortran/frontend-passes.c
index fbcc96444e8..22b4ce72375 100644
--- a/gcc/fortran/frontend-passes.c
+++ b/gcc/fortran/frontend-passes.c
@@ -23,10 +23,8 @@ along with GCC; see the file COPYING3. If not see
#include "coretypes.h"
#include "options.h"
#include "gfortran.h"
-#include "arith.h"
#include "dependency.h"
#include "constructor.h"
-#include "opts.h"
#include "intrinsic.h"
/* Forward declarations. */
diff --git a/gcc/fortran/io.c b/gcc/fortran/io.c
index dbd02b35e54..8cf952f95a8 100644
--- a/gcc/fortran/io.c
+++ b/gcc/fortran/io.c
@@ -1199,6 +1199,15 @@ gfc_match_format (void)
return MATCH_ERROR;
}
+ /* Before parsing the rest of a FORMAT statement, check F2008:c1206. */
+ if ((gfc_current_state () == COMP_FUNCTION
+ || gfc_current_state () == COMP_SUBROUTINE)
+ && gfc_state_stack->previous->state == COMP_INTERFACE)
+ {
+ gfc_error ("FORMAT statement at %C cannot appear within an INTERFACE");
+ return MATCH_ERROR;
+ }
+
if (gfc_statement_label == NULL)
{
gfc_error ("Missing format label at %C");
diff --git a/gcc/fortran/iresolve.c b/gcc/fortran/iresolve.c
index f176390ffca..80b429fbb36 100644
--- a/gcc/fortran/iresolve.c
+++ b/gcc/fortran/iresolve.c
@@ -29,11 +29,9 @@ along with GCC; see the file COPYING3. If not see
#include "config.h"
#include "system.h"
#include "coretypes.h"
-#include "options.h"
#include "tree.h"
#include "gfortran.h"
#include "stringpool.h"
-#include "alias.h"
#include "intrinsic.h"
#include "constructor.h"
#include "arith.h"
diff --git a/gcc/fortran/match.c b/gcc/fortran/match.c
index 2844262e0f2..22b0d7d42f7 100644
--- a/gcc/fortran/match.c
+++ b/gcc/fortran/match.c
@@ -22,13 +22,9 @@ along with GCC; see the file COPYING3. If not see
#include "system.h"
#include "coretypes.h"
#include "options.h"
-#include "tree.h"
#include "gfortran.h"
-#include "stringpool.h"
-#include "flags.h"
#include "match.h"
#include "parse.h"
-#include "alias.h"
int gfc_matching_ptr_assignment = 0;
int gfc_matching_procptr_assignment = 0;
@@ -4917,6 +4913,15 @@ gfc_match_st_function (void)
sym->value = expr;
+ if ((gfc_current_state () == COMP_FUNCTION
+ || gfc_current_state () == COMP_SUBROUTINE)
+ && gfc_state_stack->previous->state == COMP_INTERFACE)
+ {
+ gfc_error ("Statement function at %L cannot appear within an INTERFACE",
+ &expr->where);
+ return MATCH_ERROR;
+ }
+
if (!gfc_notify_std (GFC_STD_F95_OBS, "Statement function at %C"))
return MATCH_ERROR;
diff --git a/gcc/fortran/module.c b/gcc/fortran/module.c
index 91d2bd6b394..54777f74af3 100644
--- a/gcc/fortran/module.c
+++ b/gcc/fortran/module.c
@@ -76,7 +76,6 @@ along with GCC; see the file COPYING3. If not see
#include "parse.h" /* FIXME */
#include "constructor.h"
#include "cpp.h"
-#include "alias.h"
#include "scanner.h"
#include <zlib.h>
diff --git a/gcc/fortran/openmp.c b/gcc/fortran/openmp.c
index a7c7a1927e3..4af139a2a17 100644
--- a/gcc/fortran/openmp.c
+++ b/gcc/fortran/openmp.c
@@ -1820,7 +1820,7 @@ gfc_omp_udr_find (gfc_symtree *st, gfc_typespec *ts)
for (omp_udr = st->n.omp_udr; omp_udr; omp_udr = omp_udr->next)
if (omp_udr->ts.type == ts->type
|| ((omp_udr->ts.type == BT_DERIVED || omp_udr->ts.type == BT_CLASS)
- && (ts->type == BT_DERIVED && ts->type == BT_CLASS)))
+ && (ts->type == BT_DERIVED || ts->type == BT_CLASS)))
{
if (omp_udr->ts.type == BT_DERIVED || omp_udr->ts.type == BT_CLASS)
{
diff --git a/gcc/fortran/options.c b/gcc/fortran/options.c
index f689518c4c2..d91b0f68cc3 100644
--- a/gcc/fortran/options.c
+++ b/gcc/fortran/options.c
@@ -25,13 +25,8 @@ along with GCC; see the file COPYING3. If not see
#include "tree.h"
#include "gfortran.h"
#include "diagnostic.h" /* For global_dc. */
-#include "alias.h"
-#include "flags.h"
-#include "intl.h"
#include "opts.h"
#include "toplev.h" /* For save_decoded_options. */
-#include "params.h"
-#include "tree-inline.h"
#include "cpp.h"
#include "langhooks.h"
diff --git a/gcc/fortran/parse.c b/gcc/fortran/parse.c
index b98dda1ef55..bdb5731aad1 100644
--- a/gcc/fortran/parse.c
+++ b/gcc/fortran/parse.c
@@ -26,7 +26,6 @@ along with GCC; see the file COPYING3. If not see
#include <setjmp.h>
#include "match.h"
#include "parse.h"
-#include "debug.h"
/* Current statement label. Zero means no statement label. Because new_st
can get wiped during statement matching, we have to keep it separate. */
diff --git a/gcc/fortran/target-memory.c b/gcc/fortran/target-memory.c
index ae339ed430c..826d39e6c57 100644
--- a/gcc/fortran/target-memory.c
+++ b/gcc/fortran/target-memory.c
@@ -24,7 +24,6 @@ along with GCC; see the file COPYING3. If not see
#include "tree.h"
#include "gfortran.h"
#include "trans.h"
-#include "alias.h"
#include "fold-const.h"
#include "stor-layout.h"
#include "arith.h"
diff --git a/gcc/fortran/trans-array.c b/gcc/fortran/trans-array.c
index e28a5ce3c0b..c294516c74c 100644
--- a/gcc/fortran/trans-array.c
+++ b/gcc/fortran/trans-array.c
@@ -83,12 +83,8 @@ along with GCC; see the file COPYING3. If not see
#include "gfortran.h"
#include "gimple-expr.h"
#include "trans.h"
-#include "diagnostic-core.h" /* For internal_error/fatal_error. */
-#include "alias.h"
#include "fold-const.h"
-#include "flags.h"
#include "constructor.h"
-#include "trans-stmt.h"
#include "trans-types.h"
#include "trans-array.h"
#include "trans-const.h"
diff --git a/gcc/fortran/trans-common.c b/gcc/fortran/trans-common.c
index 6809932a787..af9fadf4690 100644
--- a/gcc/fortran/trans-common.c
+++ b/gcc/fortran/trans-common.c
@@ -103,7 +103,6 @@ along with GCC; see the file COPYING3. If not see
#include <map>
-#include "alias.h"
#include "fold-const.h"
#include "stor-layout.h"
#include "varasm.h"
diff --git a/gcc/fortran/trans-const.c b/gcc/fortran/trans-const.c
index 55c5d141bcc..c2b883c37c7 100644
--- a/gcc/fortran/trans-const.c
+++ b/gcc/fortran/trans-const.c
@@ -23,12 +23,10 @@ along with GCC; see the file COPYING3. If not see
#include "config.h"
#include "system.h"
#include "coretypes.h"
-#include "options.h"
#include "tree.h"
#include "gfortran.h"
#include "trans.h"
#include "diagnostic-core.h" /* For fatal_error. */
-#include "alias.h"
#include "fold-const.h"
#include "stor-layout.h"
#include "realmpfr.h"
diff --git a/gcc/fortran/trans-decl.c b/gcc/fortran/trans-decl.c
index 098a327e91a..7e05e673a8c 100644
--- a/gcc/fortran/trans-decl.c
+++ b/gcc/fortran/trans-decl.c
@@ -31,15 +31,12 @@ along with GCC; see the file COPYING3. If not see
#include "trans.h"
#include "stringpool.h"
#include "cgraph.h"
-#include "diagnostic-core.h" /* For internal_error. */
-#include "alias.h"
#include "fold-const.h"
#include "stor-layout.h"
#include "varasm.h"
#include "attribs.h"
#include "tree-dump.h"
#include "toplev.h" /* For announce_function. */
-#include "flags.h"
#include "debug.h"
#include "constructor.h"
#include "trans-types.h"
diff --git a/gcc/fortran/trans-expr.c b/gcc/fortran/trans-expr.c
index b8f47900bdf..8515315a1d9 100644
--- a/gcc/fortran/trans-expr.c
+++ b/gcc/fortran/trans-expr.c
@@ -30,10 +30,8 @@ along with GCC; see the file COPYING3. If not see
#include "trans.h"
#include "stringpool.h"
#include "diagnostic-core.h" /* For fatal_error. */
-#include "alias.h"
#include "fold-const.h"
#include "langhooks.h"
-#include "flags.h"
#include "arith.h"
#include "constructor.h"
#include "trans-const.h"
diff --git a/gcc/fortran/trans-intrinsic.c b/gcc/fortran/trans-intrinsic.c
index c84f12cbb3a..1dabc26b010 100644
--- a/gcc/fortran/trans-intrinsic.c
+++ b/gcc/fortran/trans-intrinsic.c
@@ -29,21 +29,16 @@ along with GCC; see the file COPYING3. If not see
#include "gfortran.h"
#include "trans.h"
#include "stringpool.h"
-#include "diagnostic-core.h" /* For internal_error. */
-#include "alias.h"
#include "fold-const.h"
#include "tree-nested.h"
#include "stor-layout.h"
#include "toplev.h" /* For rest_of_decl_compilation. */
-#include "flags.h"
#include "arith.h"
-#include "intrinsic.h"
#include "trans-const.h"
#include "trans-types.h"
#include "trans-array.h"
#include "dependency.h" /* For CAF array alias analysis. */
/* Only for gfc_trans_assign and gfc_trans_pointer_assign. */
-#include "trans-stmt.h"
/* This maps Fortran intrinsic math functions to external library or GCC
builtin functions. */
diff --git a/gcc/fortran/trans-io.c b/gcc/fortran/trans-io.c
index 306d2e911e1..d126b27f561 100644
--- a/gcc/fortran/trans-io.c
+++ b/gcc/fortran/trans-io.c
@@ -22,13 +22,10 @@ along with GCC; see the file COPYING3. If not see
#include "config.h"
#include "system.h"
#include "coretypes.h"
-#include "options.h"
#include "tree.h"
#include "gfortran.h"
#include "trans.h"
#include "stringpool.h"
-#include "diagnostic-core.h" /* For internal_error. */
-#include "alias.h"
#include "fold-const.h"
#include "stor-layout.h"
#include "trans-stmt.h"
diff --git a/gcc/fortran/trans-openmp.c b/gcc/fortran/trans-openmp.c
index 9f0d5332a8e..f29f4088c95 100644
--- a/gcc/fortran/trans-openmp.c
+++ b/gcc/fortran/trans-openmp.c
@@ -28,8 +28,6 @@ along with GCC; see the file COPYING3. If not see
#include "gimple-expr.h"
#include "trans.h"
#include "stringpool.h"
-#include "diagnostic-core.h" /* For internal_error. */
-#include "alias.h"
#include "fold-const.h"
#include "gimplify.h" /* For create_tmp_var_raw. */
#include "trans-stmt.h"
diff --git a/gcc/fortran/trans-stmt.c b/gcc/fortran/trans-stmt.c
index 1c61606dd14..1af2ad11c02 100644
--- a/gcc/fortran/trans-stmt.c
+++ b/gcc/fortran/trans-stmt.c
@@ -28,14 +28,11 @@ along with GCC; see the file COPYING3. If not see
#include "gfortran.h"
#include "trans.h"
#include "stringpool.h"
-#include "alias.h"
#include "fold-const.h"
-#include "flags.h"
#include "trans-stmt.h"
#include "trans-types.h"
#include "trans-array.h"
#include "trans-const.h"
-#include "arith.h"
#include "dependency.h"
typedef struct iter_info
diff --git a/gcc/fortran/trans-types.c b/gcc/fortran/trans-types.c
index ad6cee87606..6e2b3f1a615 100644
--- a/gcc/fortran/trans-types.c
+++ b/gcc/fortran/trans-types.c
@@ -29,15 +29,12 @@ along with GCC; see the file COPYING3. If not see
#include "gfortran.h"
#include "trans.h"
#include "stringpool.h"
-#include "diagnostic-core.h" /* For fatal_error. */
-#include "alias.h"
#include "fold-const.h"
#include "stor-layout.h"
#include "langhooks.h" /* For iso-c-bindings.def. */
#include "toplev.h" /* For rest_of_decl_compilation. */
#include "trans-types.h"
#include "trans-const.h"
-#include "flags.h"
#include "dwarf2out.h" /* For struct array_descr_info. */
diff --git a/gcc/fortran/trans.c b/gcc/fortran/trans.c
index 9495450b2ba..d9ab346a689 100644
--- a/gcc/fortran/trans.c
+++ b/gcc/fortran/trans.c
@@ -27,11 +27,8 @@ along with GCC; see the file COPYING3. If not see
#include "gimple-expr.h" /* For create_tmp_var_raw. */
#include "trans.h"
#include "stringpool.h"
-#include "diagnostic-core.h" /* For internal_error. */
-#include "alias.h"
#include "fold-const.h"
#include "tree-iterator.h"
-#include "flags.h"
#include "trans-stmt.h"
#include "trans-array.h"
#include "trans-types.h"
diff --git a/gcc/gcc-rich-location.c b/gcc/gcc-rich-location.c
new file mode 100644
index 00000000000..b0ec47bc001
--- /dev/null
+++ b/gcc/gcc-rich-location.c
@@ -0,0 +1,86 @@
+/* Implementation of gcc_rich_location class
+ Copyright (C) 2014-2015 Free Software Foundation, Inc.
+
+This file is part of GCC.
+
+GCC is free software; you can redistribute it and/or modify it under
+the terms of the GNU General Public License as published by the Free
+Software Foundation; either version 3, or (at your option) any later
+version.
+
+GCC is distributed in the hope that it will be useful, but WITHOUT ANY
+WARRANTY; without even the implied warranty of MERCHANTABILITY or
+FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+for more details.
+
+You should have received a copy of the GNU General Public License
+along with GCC; see the file COPYING3. If not see
+<http://www.gnu.org/licenses/>. */
+
+#include "config.h"
+#include "system.h"
+#include "coretypes.h"
+#include "tm.h"
+#include "rtl.h"
+#include "hash-set.h"
+#include "machmode.h"
+#include "vec.h"
+#include "double-int.h"
+#include "input.h"
+#include "alias.h"
+#include "symtab.h"
+#include "wide-int.h"
+#include "inchash.h"
+#include "tree-core.h"
+#include "tree.h"
+#include "diagnostic-core.h"
+#include "gcc-rich-location.h"
+#include "print-tree.h"
+#include "pretty-print.h"
+#include "intl.h"
+#include "cpplib.h"
+#include "diagnostic.h"
+
+/* Extract any source range information from EXPR and write it
+ to *R. */
+
+static bool
+get_range_for_expr (tree expr, location_range *r)
+{
+ if (EXPR_HAS_RANGE (expr))
+ {
+ source_range sr = EXPR_LOCATION_RANGE (expr);
+
+ /* Do we have meaningful data? */
+ if (sr.m_start && sr.m_finish)
+ {
+ r->m_start = expand_location (sr.m_start);
+ r->m_finish = expand_location (sr.m_finish);
+ return true;
+ }
+ }
+
+ return false;
+}
+
+/* Add a range to the rich_location, covering expression EXPR. */
+
+void
+gcc_rich_location::add_expr (tree expr)
+{
+ gcc_assert (expr);
+
+ location_range r;
+ r.m_show_caret_p = false;
+ if (get_range_for_expr (expr, &r))
+ add_range (&r);
+}
+
+/* If T is an expression, add a range for it to the rich_location. */
+
+void
+gcc_rich_location::maybe_add_expr (tree t)
+{
+ if (EXPR_P (t))
+ add_expr (t);
+}
diff --git a/gcc/gcc-rich-location.h b/gcc/gcc-rich-location.h
new file mode 100644
index 00000000000..2f9291df6f4
--- /dev/null
+++ b/gcc/gcc-rich-location.h
@@ -0,0 +1,47 @@
+/* Declarations relating to class gcc_rich_location
+ Copyright (C) 2014-2015 Free Software Foundation, Inc.
+
+This file is part of GCC.
+
+GCC is free software; you can redistribute it and/or modify it under
+the terms of the GNU General Public License as published by the Free
+Software Foundation; either version 3, or (at your option) any later
+version.
+
+GCC is distributed in the hope that it will be useful, but WITHOUT ANY
+WARRANTY; without even the implied warranty of MERCHANTABILITY or
+FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+for more details.
+
+You should have received a copy of the GNU General Public License
+along with GCC; see the file COPYING3. If not see
+<http://www.gnu.org/licenses/>. */
+
+#ifndef GCC_RICH_LOCATION_H
+#define GCC_RICH_LOCATION_H
+
+/* A gcc_rich_location is libcpp's rich_location with additional
+ helper methods for working with gcc's types. */
+class gcc_rich_location : public rich_location
+{
+ public:
+ /* Constructors. */
+
+ /* Constructing from a location. */
+ gcc_rich_location (source_location loc) :
+ rich_location (line_table, loc) {}
+
+ /* Constructing from a source_range. */
+ gcc_rich_location (source_range src_range) :
+ rich_location (src_range) {}
+
+
+ /* Methods for adding ranges via gcc entities. */
+ void
+ add_expr (tree expr);
+
+ void
+ maybe_add_expr (tree t);
+};
+
+#endif /* GCC_RICH_LOCATION_H */
diff --git a/gcc/gcc.c b/gcc/gcc.c
index 8bbf5be831a..7b1fd570c19 100644
--- a/gcc/gcc.c
+++ b/gcc/gcc.c
@@ -42,6 +42,7 @@ compilation is specified by a string called a "spec". */
#include "opts.h"
#include "params.h"
#include "filenames.h"
+#include "spellcheck.h"
@@ -979,6 +980,10 @@ proper position among the other output files. */
%{%:sanitize(leak):" LIBLSAN_SPEC "}}}"
#endif
+#ifndef POST_LINK_SPEC
+#define POST_LINK_SPEC ""
+#endif
+
/* This is the spec to use, once the code for creating the vtable
verification runtime library, libvtv.so, has been created. Currently
the vtable verification runtime functions are in libstdc++, so we use
@@ -1021,7 +1026,7 @@ proper position among the other output files. */
%(mflib) " STACK_SPLIT_SPEC "\
%{fprofile-arcs|fprofile-generate*|coverage:-lgcov} " SANITIZER_SPEC " \
%{!nostdlib:%{!nodefaultlibs:%(link_ssp) %(link_gcc_c_sequence)}}\
- %{!nostdlib:%{!nostartfiles:%E}} %{T*} }}}}}}"
+ %{!nostdlib:%{!nostartfiles:%E}} %{T*} \n%(post_link) }}}}}}"
#endif
#ifndef LINK_LIBGCC_SPEC
@@ -1063,6 +1068,7 @@ static const char *linker_name_spec = LINKER_NAME;
static const char *linker_plugin_file_spec = "";
static const char *lto_wrapper_spec = "";
static const char *lto_gcc_spec = "";
+static const char *post_link_spec = POST_LINK_SPEC;
static const char *link_command_spec = LINK_COMMAND_SPEC;
static const char *link_libgcc_spec = LINK_LIBGCC_SPEC;
static const char *startfile_prefix_spec = STARTFILE_PREFIX_SPEC;
@@ -1571,6 +1577,7 @@ static struct spec_list static_specs[] =
INIT_STATIC_SPEC ("linker_plugin_file", &linker_plugin_file_spec),
INIT_STATIC_SPEC ("lto_wrapper", &lto_wrapper_spec),
INIT_STATIC_SPEC ("lto_gcc", &lto_gcc_spec),
+ INIT_STATIC_SPEC ("post_link", &post_link_spec),
INIT_STATIC_SPEC ("link_libgcc", &link_libgcc_spec),
INIT_STATIC_SPEC ("md_exec_prefix", &md_exec_prefix),
INIT_STATIC_SPEC ("md_startfile_prefix", &md_startfile_prefix),
@@ -7601,6 +7608,45 @@ driver::maybe_putenv_OFFLOAD_TARGETS () const
offload_targets = NULL;
}
+/* Helper function for driver::handle_unrecognized_options.
+
+ Given an unrecognized option BAD_OPT (without the leading dash),
+ locate the closest reasonable matching option (again, without the
+ leading dash), or NULL. */
+
+static const char *
+suggest_option (const char *bad_opt)
+{
+ const cl_option *best_option = NULL;
+ edit_distance_t best_distance = MAX_EDIT_DISTANCE;
+
+ for (unsigned int i = 0; i < cl_options_count; i++)
+ {
+ edit_distance_t dist = levenshtein_distance (bad_opt,
+ cl_options[i].opt_text + 1);
+ if (dist < best_distance)
+ {
+ best_distance = dist;
+ best_option = &cl_options[i];
+ }
+ }
+
+ if (!best_option)
+ return NULL;
+
+ /* If more than half of the letters were misspelled, the suggestion is
+ likely to be meaningless. */
+ if (best_option)
+ {
+ unsigned int cutoff = MAX (strlen (bad_opt),
+ strlen (best_option->opt_text + 1)) / 2;
+ if (best_distance > cutoff)
+ return NULL;
+ }
+
+ return best_option->opt_text + 1;
+}
+
/* Reject switches that no pass was interested in. */
void
@@ -7608,7 +7654,16 @@ driver::handle_unrecognized_options () const
{
for (size_t i = 0; (int) i < n_switches; i++)
if (! switches[i].validated)
- error ("unrecognized command line option %<-%s%>", switches[i].part1);
+ {
+ const char *hint = suggest_option (switches[i].part1);
+ if (hint)
+ error ("unrecognized command line option %<-%s%>;"
+ " did you mean %<-%s%>?",
+ switches[i].part1, hint);
+ else
+ error ("unrecognized command line option %<-%s%>",
+ switches[i].part1);
+ }
}
/* Handle the various -print-* options, returning 0 if the driver
@@ -9915,7 +9970,7 @@ driver_get_configure_time_options (void (*cb) (const char *option,
size_t i;
obstack_init (&obstack);
- gcc_obstack_init (&opts_obstack);
+ init_opts_obstack ();
n_switches = 0;
for (i = 0; i < ARRAY_SIZE (option_default_specs); i++)
diff --git a/gcc/gcse.c b/gcc/gcse.c
index dcee396562c..64f04c7e045 100644
--- a/gcc/gcse.c
+++ b/gcc/gcse.c
@@ -510,7 +510,6 @@ static void trim_ld_motion_mems (void);
static void update_ld_motion_stores (struct gcse_expr *);
static void clear_modify_mem_tables (void);
static void free_modify_mem_tables (void);
-static bool is_too_expensive (const char *);
#define GNEW(T) ((T *) gmalloc (sizeof (T)))
#define GCNEW(T) ((T *) gcalloc (1, sizeof (T)))
@@ -2565,7 +2564,7 @@ one_pre_gcse_pass (void)
/* Return if there's nothing to do, or it is too expensive. */
if (n_basic_blocks_for_fn (cfun) <= NUM_FIXED_BLOCKS + 1
- || is_too_expensive (_("PRE disabled")))
+ || gcse_or_cprop_is_too_expensive (_("PRE disabled")))
return 0;
/* We need alias. */
@@ -3493,7 +3492,7 @@ one_code_hoisting_pass (void)
/* Return if there's nothing to do, or it is too expensive. */
if (n_basic_blocks_for_fn (cfun) <= NUM_FIXED_BLOCKS + 1
- || is_too_expensive (_("GCSE disabled")))
+ || gcse_or_cprop_is_too_expensive (_("GCSE disabled")))
return 0;
doing_code_hoisting_p = true;
@@ -3957,9 +3956,13 @@ update_ld_motion_stores (struct gcse_expr * expr)
/* Return true if the graph is too expensive to optimize. PASS is the
optimization about to be performed. */
-static bool
-is_too_expensive (const char *pass)
+bool
+gcse_or_cprop_is_too_expensive (const char *pass)
{
+ unsigned int memory_request = (n_basic_blocks_for_fn (cfun)
+ * SBITMAP_SET_SIZE (max_reg_num ())
+ * sizeof (SBITMAP_ELT_TYPE));
+
/* Trying to perform global optimizations on flow graphs which have
a high connectivity will take a long time and is unlikely to be
particularly useful.
@@ -3981,13 +3984,12 @@ is_too_expensive (const char *pass)
/* If allocating memory for the dataflow bitmaps would take up too much
storage it's better just to disable the optimization. */
- if ((n_basic_blocks_for_fn (cfun)
- * SBITMAP_SET_SIZE (max_reg_num ())
- * sizeof (SBITMAP_ELT_TYPE)) > MAX_GCSE_MEMORY)
+ if (memory_request > MAX_GCSE_MEMORY)
{
warning (OPT_Wdisabled_optimization,
- "%s: %d basic blocks and %d registers",
- pass, n_basic_blocks_for_fn (cfun), max_reg_num ());
+ "%s: %d basic blocks and %d registers; increase --param max-gcse-memory above %d",
+ pass, n_basic_blocks_for_fn (cfun), max_reg_num (),
+ memory_request);
return true;
}
diff --git a/gcc/gcse.h b/gcc/gcse.h
index e28a07d4aa4..752815327cc 100644
--- a/gcc/gcse.h
+++ b/gcc/gcse.h
@@ -40,5 +40,6 @@ extern struct target_gcse *this_target_gcse;
#endif
void gcse_c_finalize (void);
+extern bool gcse_or_cprop_is_too_expensive (const char *);
#endif
diff --git a/gcc/gen-pass-instances.awk b/gcc/gen-pass-instances.awk
index f36f510124d..9cff4297388 100644
--- a/gcc/gen-pass-instances.awk
+++ b/gcc/gen-pass-instances.awk
@@ -41,26 +41,53 @@ BEGIN {
function handle_line()
{
line = $0;
- where = match(line, /NEXT_PASS \((.+)\)/)
- if (where != 0)
+
+ # Find call expression.
+ call_starts_at = match(line, /NEXT_PASS \(.+\)/);
+ if (call_starts_at == 0)
{
- len_of_start = length("NEXT_PASS (")
- len_of_end = length(")")
- len_of_pass_name = RLENGTH - (len_of_start + len_of_end)
- line_length = length(line)
- pass_starts_at = where + len_of_start
- pass_name = substr(line, pass_starts_at, len_of_pass_name)
- if (pass_name in pass_counts)
- pass_counts[pass_name]++;
- else
- pass_counts[pass_name] = 1;
- printf "%s, %s%s\n",
- substr(line, 1, pass_starts_at + len_of_pass_name - 1),
- pass_counts[pass_name],
- substr(line, pass_starts_at + len_of_pass_name);
- } else {
print line;
+ return;
}
+
+ # Length of the call expression.
+ len_of_call = RLENGTH;
+
+ len_of_start = length("NEXT_PASS (");
+ len_of_open = length("(");
+ len_of_close = length(")");
+
+ # Find arguments
+ len_of_args = len_of_call - (len_of_start + len_of_close);
+ args_start_at = call_starts_at + len_of_start;
+ args_str = substr(line, args_start_at, len_of_args);
+
+ # Set pass_name argument
+ pass_name = args_str;
+
+ # Find call expression prefix (until and including called function)
+ len_of_prefix = args_start_at - 1 - len_of_open;
+ prefix = substr(line, 1, len_of_prefix);
+
+ # Find call expression postfix
+ postfix_starts_at = call_starts_at + len_of_call;
+ postfix = substr(line, postfix_starts_at);
+
+ # Set pass_counts
+ if (pass_name in pass_counts)
+ pass_counts[pass_name]++;
+ else
+ pass_counts[pass_name] = 1;
+
+ pass_num = pass_counts[pass_name];
+
+ # Print call expression with extra pass_num argument
+ printf "%s(%s, %s)%s\n", prefix, pass_name, pass_num, postfix;
}
{ handle_line() }
+
+# Local Variables:
+# mode:awk
+# c-basic-offset:8
+# End:
diff --git a/gcc/genmatch.c b/gcc/genmatch.c
index 1eb8c24da7d..9d74ed75a53 100644
--- a/gcc/genmatch.c
+++ b/gcc/genmatch.c
@@ -119,7 +119,7 @@ __attribute__((format (printf, 2, 3)))
#endif
fatal_at (const cpp_token *tk, const char *msg, ...)
{
- rich_location richloc (tk->src_loc);
+ rich_location richloc (line_table, tk->src_loc);
va_list ap;
va_start (ap, msg);
error_cb (NULL, CPP_DL_FATAL, 0, &richloc, msg, &ap);
@@ -132,7 +132,7 @@ __attribute__((format (printf, 2, 3)))
#endif
fatal_at (source_location loc, const char *msg, ...)
{
- rich_location richloc (loc);
+ rich_location richloc (line_table, loc);
va_list ap;
va_start (ap, msg);
error_cb (NULL, CPP_DL_FATAL, 0, &richloc, msg, &ap);
@@ -145,7 +145,7 @@ __attribute__((format (printf, 2, 3)))
#endif
warning_at (const cpp_token *tk, const char *msg, ...)
{
- rich_location richloc (tk->src_loc);
+ rich_location richloc (line_table, tk->src_loc);
va_list ap;
va_start (ap, msg);
error_cb (NULL, CPP_DL_WARNING, 0, &richloc, msg, &ap);
@@ -158,7 +158,7 @@ __attribute__((format (printf, 2, 3)))
#endif
warning_at (source_location loc, const char *msg, ...)
{
- rich_location richloc (loc);
+ rich_location richloc (line_table, loc);
va_list ap;
va_start (ap, msg);
error_cb (NULL, CPP_DL_WARNING, 0, &richloc, msg, &ap);
diff --git a/gcc/gimple-pretty-print.c b/gcc/gimple-pretty-print.c
index 7b50cdfc7b3..7764201ea98 100644
--- a/gcc/gimple-pretty-print.c
+++ b/gcc/gimple-pretty-print.c
@@ -1353,6 +1353,9 @@ dump_gimple_omp_target (pretty_printer *buffer, gomp_target *gs,
case GF_OMP_TARGET_KIND_OACC_ENTER_EXIT_DATA:
kind = " oacc_enter_exit_data";
break;
+ case GF_OMP_TARGET_KIND_OACC_DECLARE:
+ kind = " oacc_declare";
+ break;
default:
gcc_unreachable ();
}
diff --git a/gcc/gimple-ssa-split-paths.c b/gcc/gimple-ssa-split-paths.c
new file mode 100644
index 00000000000..602e916f88e
--- /dev/null
+++ b/gcc/gimple-ssa-split-paths.c
@@ -0,0 +1,270 @@
+/* Support routines for Splitting Paths to loop backedges
+ Copyright (C) 2015 Free Software Foundation, Inc.
+ Contributed by Ajit Kumar Agarwal <ajitkum@xilinx.com>.
+
+ This file is part of GCC.
+
+ GCC is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3, or (at your option)
+ any later version.
+
+GCC is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GCC; see the file COPYING3. If not see
+<http://www.gnu.org/licenses/>. */
+
+#include "config.h"
+#include "system.h"
+#include "coretypes.h"
+#include "backend.h"
+#include "tree.h"
+#include "gimple.h"
+#include "tree-pass.h"
+#include "cfganal.h"
+#include "cfgloop.h"
+#include "gimple-iterator.h"
+#include "tracer.h"
+
+/* Given LATCH, the latch block in a loop, see if the shape of the
+ path reaching LATCH is suitable for being split by duplication.
+ If so, return the block that will be duplicated into its predecessor
+ paths. Else return NULL. */
+
+static basic_block
+find_block_to_duplicate_for_splitting_paths (basic_block latch)
+{
+ /* We should have simple latches at this point. So the latch should
+ have a single successor. This implies the predecessor of the latch
+ likely has the loop exit. And it's that predecessor we're most
+ interested in. To keep things simple, we're going to require that
+ the latch have a single predecessor too. */
+ if (single_succ_p (latch) && single_pred_p (latch))
+ {
+ basic_block bb = get_immediate_dominator (CDI_DOMINATORS, latch);
+ gcc_assert (single_pred_edge (latch)->src == bb);
+
+ /* If BB has been marked as not to be duplicated, then honor that
+ request. */
+ if (ignore_bb_p (bb))
+ return NULL;
+
+ gimple *last = gsi_stmt (gsi_last_nondebug_bb (bb));
+ /* The immediate dominator of the latch must end in a conditional. */
+ if (!last || gimple_code (last) != GIMPLE_COND)
+ return NULL;
+
+ /* We're hoping that BB is a join point for an IF-THEN-ELSE diamond
+ region. Verify that it is.
+
+ First, verify that BB has two predecessors (each arm of the
+ IF-THEN-ELSE) and two successors (the latch and exit). */
+ if (EDGE_COUNT (bb->preds) == 2 && EDGE_COUNT (bb->succs) == 2)
+ {
+ /* Now verify that BB's immediate dominator ends in a
+ conditional as well. */
+ basic_block bb_idom = get_immediate_dominator (CDI_DOMINATORS, bb);
+ gimple *last = gsi_stmt (gsi_last_nondebug_bb (bb_idom));
+ if (!last || gimple_code (last) != GIMPLE_COND)
+ return NULL;
+
+ /* And that BB's immediate dominator's successors are the
+ the predecessors of BB. */
+ if (!find_edge (bb_idom, EDGE_PRED (bb, 0)->src)
+ || !find_edge (bb_idom, EDGE_PRED (bb, 1)->src))
+ return NULL;
+
+ /* So at this point we have a simple diamond for an IF-THEN-ELSE
+ construct starting at BB_IDOM, with a join point at BB. BB
+ pass control outside the loop or to the loop latch.
+
+ We're going to want to create two duplicates of BB, one for
+ each successor of BB_IDOM. */
+ return bb;
+ }
+ }
+ return NULL;
+}
+
+/* Return TRUE if BB is a reasonable block to duplicate by examining
+ its size, false otherwise. BB will always be a loop latch block.
+
+ Should this use the same tests as we do for jump threading? */
+
+static bool
+is_feasible_trace (basic_block bb)
+{
+ int num_stmt = 0;
+ gimple_stmt_iterator gsi;
+
+ for (gsi = gsi_start_bb (bb); !gsi_end_p (gsi); gsi_next (&gsi))
+ {
+ gimple *stmt = gsi_stmt (gsi);
+ if (!is_gimple_debug (stmt))
+ num_stmt++;
+ }
+
+ /* We may want to limit how many statements we copy. */
+ if (num_stmt > 1)
+ return true;
+
+ return false;
+}
+
+/* If the immediate dominator of the latch of the loop is
+ block with conditional branch, then the loop latch is
+ duplicated to its predecessors path preserving the SSA
+ semantics.
+
+ CFG before transformation.
+
+ 2
+ |
+ |
+ +---->3
+ | / \
+ | / \
+ | 4 5
+ | \ /
+ | \ /
+ | 6
+ | / \
+ | / \
+ | 8 7
+ | | |
+ ---+ E
+
+
+
+ Block 8 is the latch. We're going to make copies of block 6 (9 & 10)
+ and wire things up so they look like this:
+
+ 2
+ |
+ |
+ +---->3
+ | / \
+ | / \
+ | 4 5
+ | | |
+ | | |
+ | 9 10
+ | |\ /|
+ | | \ / |
+ | | 7 |
+ | | | |
+ | | E |
+ | | |
+ | \ /
+ | \ /
+ +-----8
+
+
+ Blocks 9 and 10 will get merged into blocks 4 & 5 respectively which
+ enables CSE, DCE and other optimizations to occur on a larger block
+ of code. */
+
+static bool
+split_paths ()
+{
+ bool changed = false;
+ loop_p loop;
+
+ loop_optimizer_init (LOOPS_NORMAL | LOOPS_HAVE_RECORDED_EXITS);
+ initialize_original_copy_tables ();
+ calculate_dominance_info (CDI_DOMINATORS);
+
+ FOR_EACH_LOOP (loop, LI_FROM_INNERMOST)
+ {
+ /* See if there is a block that we can duplicate to split the
+ path to the loop latch. */
+ basic_block bb = find_block_to_duplicate_for_splitting_paths (loop->latch);
+
+ /* BB is the merge point for an IF-THEN-ELSE we want to transform.
+
+ Essentially we want to create two duplicates of BB and append
+ a duplicate to the THEN and ELSE clauses. This will split the
+ path leading to the latch. BB will be unreachable and removed. */
+ if (bb && is_feasible_trace (bb))
+ {
+ if (dump_file && (dump_flags & TDF_DETAILS))
+ fprintf (dump_file,
+ "Duplicating join block %d into predecessor paths\n",
+ bb->index);
+ basic_block pred0 = EDGE_PRED (bb, 0)->src;
+ basic_block pred1 = EDGE_PRED (bb, 1)->src;
+ transform_duplicate (pred0, bb);
+ transform_duplicate (pred1, bb);
+ changed = true;
+ }
+ }
+
+ loop_optimizer_finalize ();
+ free_original_copy_tables ();
+ return changed;
+}
+
+/* Main entry point for splitting paths. Returns TODO_cleanup_cfg if any
+ paths where split, otherwise return zero. */
+
+static unsigned int
+execute_split_paths ()
+{
+ /* If we don't have at least 2 real blocks and backedges in the
+ CFG, then there's no point in trying to perform path splitting. */
+ if (n_basic_blocks_for_fn (cfun) <= NUM_FIXED_BLOCKS + 1
+ || !mark_dfs_back_edges ())
+ return 0;
+
+ bool changed = split_paths();
+ if (changed)
+ free_dominance_info (CDI_DOMINATORS);
+
+ return changed ? TODO_cleanup_cfg : 0;
+}
+
+static bool
+gate_split_paths ()
+{
+ return flag_split_paths;
+}
+
+namespace {
+
+const pass_data pass_data_split_paths =
+{
+ GIMPLE_PASS, /* type */
+ "split-paths", /* name */
+ OPTGROUP_NONE, /* optinfo_flags */
+ TV_SPLIT_PATHS, /* tv_id */
+ PROP_ssa, /* properties_required */
+ 0, /* properties_provided */
+ 0, /* properties_destroyed */
+ 0, /* todo_flags_start */
+ TODO_update_ssa, /* todo_flags_finish */
+};
+
+class pass_split_paths : public gimple_opt_pass
+{
+ public:
+ pass_split_paths (gcc::context *ctxt)
+ : gimple_opt_pass (pass_data_split_paths, ctxt)
+ {}
+ /* opt_pass methods: */
+ opt_pass * clone () { return new pass_split_paths (m_ctxt); }
+ virtual bool gate (function *) { return gate_split_paths (); }
+ virtual unsigned int execute (function *) { return execute_split_paths (); }
+
+}; // class pass_split_paths
+
+} // anon namespace
+
+gimple_opt_pass *
+make_pass_split_paths (gcc::context *ctxt)
+{
+ return new pass_split_paths (ctxt);
+}
diff --git a/gcc/gimple-ssa-strength-reduction.c b/gcc/gimple-ssa-strength-reduction.c
index ce32ad33e94..b8078230f34 100644
--- a/gcc/gimple-ssa-strength-reduction.c
+++ b/gcc/gimple-ssa-strength-reduction.c
@@ -2226,12 +2226,11 @@ create_phi_basis (slsr_cand_t c, gimple *from_phi, tree basis_name,
int i;
tree name, phi_arg;
gphi *phi;
- vec<tree> phi_args;
slsr_cand_t basis = lookup_cand (c->basis);
int nargs = gimple_phi_num_args (from_phi);
basic_block phi_bb = gimple_bb (from_phi);
slsr_cand_t phi_cand = base_cand_from_table (gimple_phi_result (from_phi));
- phi_args.create (nargs);
+ auto_vec<tree> phi_args (nargs);
/* Process each argument of the existing phi that represents
conditionally-executed add candidates. */
diff --git a/gcc/gimple.h b/gcc/gimple.h
index 781801b7c4a..6486dff03b7 100644
--- a/gcc/gimple.h
+++ b/gcc/gimple.h
@@ -170,6 +170,7 @@ enum gf_mask {
GF_OMP_TARGET_KIND_OACC_DATA = 7,
GF_OMP_TARGET_KIND_OACC_UPDATE = 8,
GF_OMP_TARGET_KIND_OACC_ENTER_EXIT_DATA = 9,
+ GF_OMP_TARGET_KIND_OACC_DECLARE = 10,
/* True on an GIMPLE_OMP_RETURN statement if the return does not require
a thread synchronization via some sort of barrier. The exact barrier
@@ -1739,11 +1740,7 @@ gimple_block (const gimple *g)
static inline void
gimple_set_block (gimple *g, tree block)
{
- if (block)
- g->location =
- COMBINE_LOCATION_DATA (line_table, g->location, block);
- else
- g->location = LOCATION_LOCUS (g->location);
+ g->location = set_block (g->location, block);
}
@@ -6004,6 +6001,7 @@ is_gimple_omp_oacc (const gimple *stmt)
case GF_OMP_TARGET_KIND_OACC_DATA:
case GF_OMP_TARGET_KIND_OACC_UPDATE:
case GF_OMP_TARGET_KIND_OACC_ENTER_EXIT_DATA:
+ case GF_OMP_TARGET_KIND_OACC_DECLARE:
return true;
default:
return false;
diff --git a/gcc/gimplify.c b/gcc/gimplify.c
index 287e51e2016..a3ed3784f49 100644
--- a/gcc/gimplify.c
+++ b/gcc/gimplify.c
@@ -95,22 +95,34 @@ enum gimplify_omp_var_data
enum omp_region_type
{
- ORT_WORKSHARE = 0,
- ORT_SIMD = 1,
- ORT_PARALLEL = 2,
- ORT_COMBINED_PARALLEL = 3,
- ORT_TASK = 4,
- ORT_UNTIED_TASK = 5,
- ORT_TEAMS = 8,
- ORT_COMBINED_TEAMS = 9,
+ ORT_WORKSHARE = 0x00,
+ ORT_SIMD = 0x01,
+
+ ORT_PARALLEL = 0x02,
+ ORT_COMBINED_PARALLEL = 0x03,
+
+ ORT_TASK = 0x04,
+ ORT_UNTIED_TASK = 0x05,
+
+ ORT_TEAMS = 0x08,
+ ORT_COMBINED_TEAMS = 0x09,
+
/* Data region. */
- ORT_TARGET_DATA = 16,
+ ORT_TARGET_DATA = 0x10,
+
/* Data region with offloading. */
- ORT_TARGET = 32,
- ORT_COMBINED_TARGET = 33,
+ ORT_TARGET = 0x20,
+ ORT_COMBINED_TARGET = 0x21,
+
+ /* OpenACC variants. */
+ ORT_ACC = 0x40, /* A generic OpenACC region. */
+ ORT_ACC_DATA = ORT_ACC | ORT_TARGET_DATA, /* Data construct. */
+ ORT_ACC_PARALLEL = ORT_ACC | ORT_TARGET, /* Parallel construct */
+ ORT_ACC_KERNELS = ORT_ACC | ORT_TARGET | 0x80, /* Kernels construct. */
+
/* Dummy OpenMP region, used to disable expansion of
DECL_VALUE_EXPRs in taskloop pre body. */
- ORT_NONE = 64
+ ORT_NONE = 0x100
};
/* Gimplify hashtable helper. */
@@ -164,6 +176,7 @@ static struct gimplify_omp_ctx *gimplify_omp_ctxp;
/* Forward declaration. */
static enum gimplify_status gimplify_compound_expr (tree *, gimple_seq *, bool);
+static hash_map<tree, tree> *oacc_declare_returns;
/* Shorter alias name for the above function for use in gimplify.c
only. */
@@ -689,7 +702,8 @@ gimple_add_tmp_var (tree tmp)
struct gimplify_omp_ctx *ctx = gimplify_omp_ctxp;
while (ctx
&& (ctx->region_type == ORT_WORKSHARE
- || ctx->region_type == ORT_SIMD))
+ || ctx->region_type == ORT_SIMD
+ || ctx->region_type == ORT_ACC))
ctx = ctx->outer_context;
if (ctx)
omp_add_variable (ctx, tmp, GOVD_LOCAL | GOVD_SEEN);
@@ -1065,6 +1079,7 @@ gimplify_bind_expr (tree *expr_p, gimple_seq *pre_p)
gimple_seq body, cleanup;
gcall *stack_save;
location_t start_locus = 0, end_locus = 0;
+ tree ret_clauses = NULL;
tree temp = voidify_wrapper_expr (bind_expr, NULL);
@@ -1166,9 +1181,39 @@ gimplify_bind_expr (tree *expr_p, gimple_seq *pre_p)
clobber_stmt = gimple_build_assign (t, clobber);
gimple_set_location (clobber_stmt, end_locus);
gimplify_seq_add_stmt (&cleanup, clobber_stmt);
+
+ if (flag_openacc && oacc_declare_returns != NULL)
+ {
+ tree *c = oacc_declare_returns->get (t);
+ if (c != NULL)
+ {
+ if (ret_clauses)
+ OMP_CLAUSE_CHAIN (*c) = ret_clauses;
+
+ ret_clauses = *c;
+
+ oacc_declare_returns->remove (t);
+
+ if (oacc_declare_returns->elements () == 0)
+ {
+ delete oacc_declare_returns;
+ oacc_declare_returns = NULL;
+ }
+ }
+ }
}
}
+ if (ret_clauses)
+ {
+ gomp_target *stmt;
+ gimple_stmt_iterator si = gsi_start (cleanup);
+
+ stmt = gimple_build_omp_target (NULL, GF_OMP_TARGET_KIND_OACC_DECLARE,
+ ret_clauses);
+ gsi_insert_seq_before_without_update (&si, stmt, GSI_NEW_STMT);
+ }
+
if (cleanup)
{
gtry *gs;
@@ -1804,7 +1849,8 @@ gimplify_var_or_parm_decl (tree *expr_p)
struct gimplify_omp_ctx *ctx = gimplify_omp_ctxp;
while (ctx
&& (ctx->region_type == ORT_WORKSHARE
- || ctx->region_type == ORT_SIMD))
+ || ctx->region_type == ORT_SIMD
+ || ctx->region_type == ORT_ACC))
ctx = ctx->outer_context;
if (!ctx && !nonlocal_vlas->add (decl))
{
@@ -5579,7 +5625,8 @@ omp_firstprivatize_variable (struct gimplify_omp_ctx *ctx, tree decl)
}
else if (ctx->region_type != ORT_WORKSHARE
&& ctx->region_type != ORT_SIMD
- && ctx->region_type != ORT_TARGET_DATA)
+ && ctx->region_type != ORT_ACC
+ && !(ctx->region_type & ORT_TARGET_DATA))
omp_add_variable (ctx, decl, GOVD_FIRSTPRIVATE);
ctx = ctx->outer_context;
@@ -5667,11 +5714,13 @@ omp_add_variable (struct gimplify_omp_ctx *ctx, tree decl, unsigned int flags)
/* We shouldn't be re-adding the decl with the same data
sharing class. */
gcc_assert ((n->value & GOVD_DATA_SHARE_CLASS & flags) == 0);
- /* The only combination of data sharing classes we should see is
- FIRSTPRIVATE and LASTPRIVATE. */
nflags = n->value | flags;
- gcc_assert ((nflags & GOVD_DATA_SHARE_CLASS)
- == (GOVD_FIRSTPRIVATE | GOVD_LASTPRIVATE)
+ /* The only combination of data sharing classes we should see is
+ FIRSTPRIVATE and LASTPRIVATE. However, OpenACC permits
+ reduction variables to be used in data sharing clauses. */
+ gcc_assert ((ctx->region_type & ORT_ACC) != 0
+ || ((nflags & GOVD_DATA_SHARE_CLASS)
+ == (GOVD_FIRSTPRIVATE | GOVD_LASTPRIVATE))
|| (flags & GOVD_DATA_SHARE_CLASS) == 0);
n->value = nflags;
return;
@@ -5792,6 +5841,26 @@ omp_notice_threadprivate_variable (struct gimplify_omp_ctx *ctx, tree decl,
return false;
}
+/* Return true if global var DECL is device resident. */
+
+static bool
+device_resident_p (tree decl)
+{
+ tree attr = lookup_attribute ("oacc declare target", DECL_ATTRIBUTES (decl));
+
+ if (!attr)
+ return false;
+
+ for (tree t = TREE_VALUE (attr); t; t = TREE_PURPOSE (t))
+ {
+ tree c = TREE_VALUE (t);
+ if (OMP_CLAUSE_MAP_KIND (c) == GOMP_MAP_DEVICE_RESIDENT)
+ return true;
+ }
+
+ return false;
+}
+
/* Determine outer default flags for DECL mentioned in an OMP region
but not declared in an enclosing clause.
@@ -5883,6 +5952,69 @@ omp_default_clause (struct gimplify_omp_ctx *ctx, tree decl,
return flags;
}
+
+/* Determine outer default flags for DECL mentioned in an OACC region
+ but not declared in an enclosing clause. */
+
+static unsigned
+oacc_default_clause (struct gimplify_omp_ctx *ctx, tree decl, unsigned flags)
+{
+ const char *rkind;
+ bool on_device = false;
+
+ if ((ctx->region_type & (ORT_ACC_PARALLEL | ORT_ACC_KERNELS)) != 0
+ && is_global_var (decl)
+ && device_resident_p (decl))
+ {
+ on_device = true;
+ flags |= GOVD_MAP_TO_ONLY;
+ }
+
+ switch (ctx->region_type)
+ {
+ default:
+ gcc_unreachable ();
+
+ case ORT_ACC_KERNELS:
+ /* Everything under kernels are default 'present_or_copy'. */
+ flags |= GOVD_MAP;
+ rkind = "kernels";
+ break;
+
+ case ORT_ACC_PARALLEL:
+ {
+ tree type = TREE_TYPE (decl);
+
+ if (TREE_CODE (type) == REFERENCE_TYPE
+ || POINTER_TYPE_P (type))
+ type = TREE_TYPE (type);
+
+ if (on_device || AGGREGATE_TYPE_P (type))
+ /* Aggregates default to 'present_or_copy'. */
+ flags |= GOVD_MAP;
+ else
+ /* Scalars default to 'firstprivate'. */
+ flags |= GOVD_FIRSTPRIVATE;
+ rkind = "parallel";
+ }
+ break;
+ }
+
+ if (DECL_ARTIFICIAL (decl))
+ ; /* We can get compiler-generated decls, and should not complain
+ about them. */
+ else if (ctx->default_kind == OMP_CLAUSE_DEFAULT_NONE)
+ {
+ error ("%qE not specified in enclosing OpenACC %qs construct",
+ DECL_NAME (lang_hooks.decls.omp_report_decl (decl)), rkind);
+ inform (ctx->location, "enclosing OpenACC %qs construct", rkind);
+ }
+ else
+ gcc_checking_assert (ctx->default_kind == OMP_CLAUSE_DEFAULT_SHARED);
+
+ return flags;
+}
+
/* Record the fact that DECL was used within the OMP context CTX.
IN_CODE is true when real code uses DECL, and false when we should
merely emit default(none) errors. Return true if DECL is going to
@@ -5968,20 +6100,52 @@ omp_notice_variable (struct gimplify_omp_ctx *ctx, tree decl, bool in_code)
else if (is_scalar)
nflags |= GOVD_FIRSTPRIVATE;
}
- tree type = TREE_TYPE (decl);
- if (nflags == flags
- && gimplify_omp_ctxp->target_firstprivatize_array_bases
- && lang_hooks.decls.omp_privatize_by_reference (decl))
- type = TREE_TYPE (type);
- if (nflags == flags
- && !lang_hooks.types.omp_mappable_type (type))
+
+ struct gimplify_omp_ctx *octx = ctx->outer_context;
+ if ((ctx->region_type & ORT_ACC) && octx)
{
- error ("%qD referenced in target region does not have "
- "a mappable type", decl);
- nflags |= GOVD_MAP | GOVD_EXPLICIT;
+ /* Look in outer OpenACC contexts, to see if there's a
+ data attribute for this variable. */
+ omp_notice_variable (octx, decl, in_code);
+
+ for (; octx; octx = octx->outer_context)
+ {
+ if (!(octx->region_type & (ORT_TARGET_DATA | ORT_TARGET)))
+ break;
+ splay_tree_node n2
+ = splay_tree_lookup (octx->variables,
+ (splay_tree_key) decl);
+ if (n2)
+ {
+ nflags |= GOVD_MAP;
+ goto found_outer;
+ }
+ }
}
- else if (nflags == flags)
- nflags |= GOVD_MAP;
+
+ {
+ tree type = TREE_TYPE (decl);
+
+ if (nflags == flags
+ && gimplify_omp_ctxp->target_firstprivatize_array_bases
+ && lang_hooks.decls.omp_privatize_by_reference (decl))
+ type = TREE_TYPE (type);
+ if (nflags == flags
+ && !lang_hooks.types.omp_mappable_type (type))
+ {
+ error ("%qD referenced in target region does not have "
+ "a mappable type", decl);
+ nflags |= GOVD_MAP | GOVD_EXPLICIT;
+ }
+ else if (nflags == flags)
+ {
+ if ((ctx->region_type & ORT_ACC) != 0)
+ nflags = oacc_default_clause (ctx, decl, flags);
+ else
+ nflags |= GOVD_MAP;
+ }
+ }
+ found_outer:
omp_add_variable (ctx, decl, nflags);
}
else
@@ -5998,7 +6162,8 @@ omp_notice_variable (struct gimplify_omp_ctx *ctx, tree decl, bool in_code)
{
if (ctx->region_type == ORT_WORKSHARE
|| ctx->region_type == ORT_SIMD
- || ctx->region_type == ORT_TARGET_DATA)
+ || ctx->region_type == ORT_ACC
+ || (ctx->region_type & ORT_TARGET_DATA) != 0)
goto do_outer;
flags = omp_default_clause (ctx, decl, in_code, flags);
@@ -6112,7 +6277,8 @@ omp_is_private (struct gimplify_omp_ctx *ctx, tree decl, int simd)
}
if (ctx->region_type != ORT_WORKSHARE
- && ctx->region_type != ORT_SIMD)
+ && ctx->region_type != ORT_SIMD
+ && ctx->region_type != ORT_ACC)
return false;
else if (ctx->outer_context)
return omp_is_private (ctx->outer_context, decl, simd);
@@ -6168,7 +6334,8 @@ omp_check_private (struct gimplify_omp_ctx *ctx, tree decl, bool copyprivate)
}
}
while (ctx->region_type == ORT_WORKSHARE
- || ctx->region_type == ORT_SIMD);
+ || ctx->region_type == ORT_SIMD
+ || ctx->region_type == ORT_ACC);
return false;
}
@@ -6311,7 +6478,8 @@ gimplify_scan_omp_clauses (tree *list_p, gimple_seq *pre_p,
omp_notice_variable (outer_ctx->outer_context, decl, true);
}
else if (outer_ctx
- && outer_ctx->region_type == ORT_WORKSHARE
+ && (outer_ctx->region_type == ORT_WORKSHARE
+ || outer_ctx->region_type == ORT_ACC)
&& outer_ctx->combined_loop
&& splay_tree_lookup (outer_ctx->variables,
(splay_tree_key) decl) == NULL
@@ -6335,7 +6503,9 @@ gimplify_scan_omp_clauses (tree *list_p, gimple_seq *pre_p,
goto do_add;
case OMP_CLAUSE_REDUCTION:
flags = GOVD_REDUCTION | GOVD_SEEN | GOVD_EXPLICIT;
- check_non_private = "reduction";
+ /* OpenACC permits reductions on private variables. */
+ if (!(region_type & ORT_ACC))
+ check_non_private = "reduction";
decl = OMP_CLAUSE_DECL (c);
if (TREE_CODE (decl) == MEM_REF)
{
@@ -7704,7 +7874,7 @@ gimplify_oacc_cache (tree *expr_p, gimple_seq *pre_p)
{
tree expr = *expr_p;
- gimplify_scan_omp_clauses (&OACC_CACHE_CLAUSES (expr), pre_p, ORT_WORKSHARE,
+ gimplify_scan_omp_clauses (&OACC_CACHE_CLAUSES (expr), pre_p, ORT_ACC,
OACC_CACHE);
gimplify_adjust_omp_clauses (pre_p, &OACC_CACHE_CLAUSES (expr), OACC_CACHE);
@@ -7713,6 +7883,121 @@ gimplify_oacc_cache (tree *expr_p, gimple_seq *pre_p)
*expr_p = NULL_TREE;
}
+/* Helper function of gimplify_oacc_declare. The helper's purpose is to,
+ if required, translate 'kind' in CLAUSE into an 'entry' kind and 'exit'
+ kind. The entry kind will replace the one in CLAUSE, while the exit
+ kind will be used in a new omp_clause and returned to the caller. */
+
+static tree
+gimplify_oacc_declare_1 (tree clause)
+{
+ HOST_WIDE_INT kind, new_op;
+ bool ret = false;
+ tree c = NULL;
+
+ kind = OMP_CLAUSE_MAP_KIND (clause);
+
+ switch (kind)
+ {
+ case GOMP_MAP_ALLOC:
+ case GOMP_MAP_FORCE_ALLOC:
+ case GOMP_MAP_FORCE_TO:
+ new_op = GOMP_MAP_FORCE_DEALLOC;
+ ret = true;
+ break;
+
+ case GOMP_MAP_FORCE_FROM:
+ OMP_CLAUSE_SET_MAP_KIND (clause, GOMP_MAP_FORCE_ALLOC);
+ new_op = GOMP_MAP_FORCE_FROM;
+ ret = true;
+ break;
+
+ case GOMP_MAP_FORCE_TOFROM:
+ OMP_CLAUSE_SET_MAP_KIND (clause, GOMP_MAP_FORCE_TO);
+ new_op = GOMP_MAP_FORCE_FROM;
+ ret = true;
+ break;
+
+ case GOMP_MAP_FROM:
+ OMP_CLAUSE_SET_MAP_KIND (clause, GOMP_MAP_FORCE_ALLOC);
+ new_op = GOMP_MAP_FROM;
+ ret = true;
+ break;
+
+ case GOMP_MAP_TOFROM:
+ OMP_CLAUSE_SET_MAP_KIND (clause, GOMP_MAP_TO);
+ new_op = GOMP_MAP_FROM;
+ ret = true;
+ break;
+
+ case GOMP_MAP_DEVICE_RESIDENT:
+ case GOMP_MAP_FORCE_DEVICEPTR:
+ case GOMP_MAP_FORCE_PRESENT:
+ case GOMP_MAP_LINK:
+ case GOMP_MAP_POINTER:
+ case GOMP_MAP_TO:
+ break;
+
+ default:
+ gcc_unreachable ();
+ break;
+ }
+
+ if (ret)
+ {
+ c = build_omp_clause (OMP_CLAUSE_LOCATION (clause), OMP_CLAUSE_MAP);
+ OMP_CLAUSE_SET_MAP_KIND (c, new_op);
+ OMP_CLAUSE_DECL (c) = OMP_CLAUSE_DECL (clause);
+ }
+
+ return c;
+}
+
+/* Gimplify OACC_DECLARE. */
+
+static void
+gimplify_oacc_declare (tree *expr_p, gimple_seq *pre_p)
+{
+ tree expr = *expr_p;
+ gomp_target *stmt;
+ tree clauses, t;
+
+ clauses = OACC_DECLARE_CLAUSES (expr);
+
+ gimplify_scan_omp_clauses (&clauses, pre_p, ORT_TARGET_DATA, OACC_DECLARE);
+
+ for (t = clauses; t; t = OMP_CLAUSE_CHAIN (t))
+ {
+ tree decl = OMP_CLAUSE_DECL (t);
+
+ if (TREE_CODE (decl) == MEM_REF)
+ continue;
+
+ if (TREE_CODE (decl) == VAR_DECL
+ && !is_global_var (decl)
+ && DECL_CONTEXT (decl) == current_function_decl)
+ {
+ tree c = gimplify_oacc_declare_1 (t);
+ if (c)
+ {
+ if (oacc_declare_returns == NULL)
+ oacc_declare_returns = new hash_map<tree, tree>;
+
+ oacc_declare_returns->put (decl, c);
+ }
+ }
+
+ omp_add_variable (gimplify_omp_ctxp, decl, GOVD_SEEN);
+ }
+
+ stmt = gimple_build_omp_target (NULL, GF_OMP_TARGET_KIND_OACC_DECLARE,
+ clauses);
+
+ gimplify_seq_add_stmt (pre_p, stmt);
+
+ *expr_p = NULL_TREE;
+}
+
/* Gimplify the contents of an OMP_PARALLEL statement. This involves
gimplification of the body, as well as scanning the body for used
variables. We need to do this scan now, because variable-sized
@@ -7833,7 +8118,9 @@ gimplify_omp_for (tree *expr_p, gimple_seq *pre_p)
case OMP_FOR:
case CILK_FOR:
case OMP_DISTRIBUTE:
+ break;
case OACC_LOOP:
+ ort = ORT_ACC;
break;
case OMP_TASKLOOP:
if (find_omp_clause (OMP_FOR_CLAUSES (for_stmt), OMP_CLAUSE_UNTIED))
@@ -8895,10 +9182,14 @@ gimplify_omp_workshare (tree *expr_p, gimple_seq *pre_p)
ort = OMP_TARGET_COMBINED (expr) ? ORT_COMBINED_TARGET : ORT_TARGET;
break;
case OACC_KERNELS:
+ ort = ORT_ACC_KERNELS;
+ break;
case OACC_PARALLEL:
- ort = ORT_TARGET;
+ ort = ORT_ACC_PARALLEL;
break;
case OACC_DATA:
+ ort = ORT_ACC_DATA;
+ break;
case OMP_TARGET_DATA:
ort = ORT_TARGET_DATA;
break;
@@ -8920,7 +9211,7 @@ gimplify_omp_workshare (tree *expr_p, gimple_seq *pre_p)
pop_gimplify_context (g);
else
pop_gimplify_context (NULL);
- if (ort == ORT_TARGET_DATA)
+ if ((ort & ORT_TARGET_DATA) != 0)
{
enum built_in_function end_ix;
switch (TREE_CODE (expr))
@@ -8995,17 +9286,18 @@ gimplify_omp_target_update (tree *expr_p, gimple_seq *pre_p)
tree expr = *expr_p;
int kind;
gomp_target *stmt;
+ enum omp_region_type ort = ORT_WORKSHARE;
switch (TREE_CODE (expr))
{
case OACC_ENTER_DATA:
- kind = GF_OMP_TARGET_KIND_OACC_ENTER_EXIT_DATA;
- break;
case OACC_EXIT_DATA:
kind = GF_OMP_TARGET_KIND_OACC_ENTER_EXIT_DATA;
+ ort = ORT_ACC;
break;
case OACC_UPDATE:
kind = GF_OMP_TARGET_KIND_OACC_UPDATE;
+ ort = ORT_ACC;
break;
case OMP_TARGET_UPDATE:
kind = GF_OMP_TARGET_KIND_UPDATE;
@@ -9020,7 +9312,7 @@ gimplify_omp_target_update (tree *expr_p, gimple_seq *pre_p)
gcc_unreachable ();
}
gimplify_scan_omp_clauses (&OMP_STANDALONE_CLAUSES (expr), pre_p,
- ORT_WORKSHARE, TREE_CODE (expr));
+ ort, TREE_CODE (expr));
gimplify_adjust_omp_clauses (pre_p, &OMP_STANDALONE_CLAUSES (expr),
TREE_CODE (expr));
stmt = gimple_build_omp_target (NULL, kind, OMP_STANDALONE_CLAUSES (expr));
@@ -10066,11 +10358,15 @@ gimplify_expr (tree *expr_p, gimple_seq *pre_p, gimple_seq *post_p,
break;
case OACC_HOST_DATA:
- case OACC_DECLARE:
sorry ("directive not yet implemented");
ret = GS_ALL_DONE;
break;
+ case OACC_DECLARE:
+ gimplify_oacc_declare (expr_p, pre_p);
+ ret = GS_ALL_DONE;
+ break;
+
case OACC_DATA:
case OACC_KERNELS:
case OACC_PARALLEL:
diff --git a/gcc/go/ChangeLog b/gcc/go/ChangeLog
index 7057b02e057..6ae73977ea8 100644
--- a/gcc/go/ChangeLog
+++ b/gcc/go/ChangeLog
@@ -1,3 +1,10 @@
+2015-11-11 Andrew MacLeod <amacleod@redhat.com>
+
+ * go-backend.c: Remove unused header files.
+ * go-gcc.cc: Likewise.
+ * go-lang.c: Likewise.
+ * gospec.c: Likewise.
+
2015-10-29 Andrew MacLeod <amacleod@redhat.com>
* go-backend.c: Reorder #include's and remove duplicates.
diff --git a/gcc/go/go-backend.c b/gcc/go/go-backend.c
index f9221dbd6ba..4873deab57a 100644
--- a/gcc/go/go-backend.c
+++ b/gcc/go/go-backend.c
@@ -25,13 +25,11 @@ along with GCC; see the file COPYING3. If not see
#include "tm_p.h"
#include "diagnostic.h"
#include "simple-object.h"
-#include "alias.h"
#include "stor-layout.h"
#include "intl.h"
#include "output.h" /* for assemble_string */
#include "common/common-target.h"
-#include "go-c.h"
/* The segment name we pass to simple_object_start_read to find Go
export data. */
diff --git a/gcc/go/go-gcc.cc b/gcc/go/go-gcc.cc
index 13143440761..31aac2ec9eb 100644
--- a/gcc/go/go-gcc.cc
+++ b/gcc/go/go-gcc.cc
@@ -24,19 +24,13 @@
// include it here before tree.h includes it later.
#include <gmp.h>
-#include "vec.h"
-#include "alias.h"
#include "tree.h"
-#include "options.h"
-#include "inchash.h"
#include "fold-const.h"
#include "stringpool.h"
#include "stor-layout.h"
#include "varasm.h"
#include "tree-iterator.h"
-#include "hash-map.h"
#include "tm.h"
-#include "hard-reg-set.h"
#include "function.h"
#include "cgraph.h"
#include "convert.h"
diff --git a/gcc/go/go-lang.c b/gcc/go/go-lang.c
index 7b76a35fff5..37205e42ee8 100644
--- a/gcc/go/go-lang.c
+++ b/gcc/go/go-lang.c
@@ -21,19 +21,14 @@ along with GCC; see the file COPYING3. If not see
#include "system.h"
#include "coretypes.h"
#include "target.h"
-#include "function.h"
#include "tree.h"
#include "gimple-expr.h"
#include "diagnostic.h"
-#include "ansidecl.h"
#include "opts.h"
-#include "alias.h"
#include "fold-const.h"
#include "gimplify.h"
#include "stor-layout.h"
-#include "toplev.h"
#include "debug.h"
-#include "flags.h"
#include "convert.h"
#include "langhooks.h"
#include "langhooks-def.h"
diff --git a/gcc/go/gofrontend/MERGE b/gcc/go/gofrontend/MERGE
index dd23a8fdd8d..d23a6cb5f58 100644
--- a/gcc/go/gofrontend/MERGE
+++ b/gcc/go/gofrontend/MERGE
@@ -1,4 +1,4 @@
-0c07751d139ef90a43ef7f299f925622a8792a9f
+e3aef41ce0c5be81e2589e60d9cb0db1516e9e2d
The first line of this file holds the git revision number of the last
merge done from the gofrontend repository.
diff --git a/gcc/go/gospec.c b/gcc/go/gospec.c
index a56ffe0fad1..98df65d7021 100644
--- a/gcc/go/gospec.c
+++ b/gcc/go/gospec.c
@@ -21,7 +21,6 @@ along with GCC; see the file COPYING3. If not see
#include "system.h"
#include "coretypes.h"
#include "tm.h"
-#include "gcc.h"
#include "opts.h"
/* This bit is set if we saw a `-xfoo' language specification. */
diff --git a/gcc/graphite-isl-ast-to-gimple.c b/gcc/graphite-isl-ast-to-gimple.c
index 628fc90f7b2..7fa4ce3d395 100644
--- a/gcc/graphite-isl-ast-to-gimple.c
+++ b/gcc/graphite-isl-ast-to-gimple.c
@@ -63,11 +63,7 @@ extern "C" {
#include <map>
#include "graphite-isl-ast-to-gimple.h"
#include "tree-cfg.h"
-
-/* This flag is set when an error occurred during the translation of
- ISL AST to Gimple. */
-
-static bool graphite_regenerate_error;
+#include "gimple-pretty-print.h"
/* We always try to use signed 128 bit types, but fall back to smaller types
in case a platform does not provide types of these sizes. In the future we
@@ -132,7 +128,7 @@ class translate_isl_ast_to_gimple
{
public:
translate_isl_ast_to_gimple (sese_info_p r)
- : region (r)
+ : region (r), codegen_error (false)
{ }
/* Translates an ISL AST node NODE to GCC representation in the
@@ -261,8 +257,17 @@ class translate_isl_ast_to_gimple
void build_iv_mapping (vec<tree> iv_map, gimple_poly_bb_p gbb,
__isl_keep isl_ast_expr *user_expr, ivs_params &ip,
sese_l &region);
+
+ void translate_pending_phi_nodes (void);
+
+ bool codegen_error_p () { return codegen_error; }
+
private:
sese_info_p region;
+
+ /* This flag is set when an error occurred during the translation of ISL AST
+ to Gimple. */
+ bool codegen_error;
};
/* Return the tree variable that corresponds to the given isl ast identifier
@@ -575,13 +580,15 @@ translate_isl_ast_for_loop (loop_p context_loop,
edge to_body = single_succ_edge (loop->header);
basic_block after = to_body->dest;
- /* Create a basic block for loop close phi nodes. */
- last_e = single_succ_edge (split_edge (last_e));
-
/* Translate the body of the loop. */
isl_ast_node *for_body = isl_ast_node_for_get_body (node_for);
next_e = translate_isl_ast (loop, for_body, to_body, ip);
isl_ast_node_free (for_body);
+
+ /* Early return if we failed to translate loop body. */
+ if (!next_e || codegen_error)
+ return NULL;
+
redirect_edge_succ_nodup (next_e, after);
set_immediate_dominator (CDI_DOMINATORS, next_e->dest, next_e->src);
@@ -770,14 +777,17 @@ translate_isl_ast_node_user (__isl_keep isl_ast_node *node,
edge next_e, ivs_params &ip)
{
gcc_assert (isl_ast_node_get_type (node) == isl_ast_node_user);
+
isl_ast_expr *user_expr = isl_ast_node_user_get_expr (node);
isl_ast_expr *name_expr = isl_ast_expr_get_op_arg (user_expr, 0);
gcc_assert (isl_ast_expr_get_type (name_expr) == isl_ast_expr_id);
+
isl_id *name_id = isl_ast_expr_get_id (name_expr);
poly_bb_p pbb = (poly_bb_p) isl_id_get_user (name_id);
gcc_assert (pbb);
+
gimple_poly_bb_p gbb = PBB_BLACK_BOX (pbb);
- vec<tree> iv_map;
+
isl_ast_expr_free (name_expr);
isl_id_free (name_id);
@@ -785,6 +795,7 @@ translate_isl_ast_node_user (__isl_keep isl_ast_node *node,
"The entry block should not even appear within a scop");
int nb_loops = number_of_loops (cfun);
+ vec<tree> iv_map;
iv_map.create (nb_loops);
iv_map.safe_grow_cleared (nb_loops);
@@ -793,23 +804,35 @@ translate_isl_ast_node_user (__isl_keep isl_ast_node *node,
if (dump_file)
{
- fprintf (dump_file, "[codegen] copying");
+ fprintf (dump_file, "[codegen] copying from basic block\n");
print_loops_bb (dump_file, GBB_BB (gbb), 0, 3);
+ fprintf (dump_file, "\n[codegen] to new basic block\n");
+ print_loops_bb (dump_file, next_e->src, 0, 3);
}
next_e = copy_bb_and_scalar_dependences (GBB_BB (gbb),
pbb->scop->scop_info, next_e,
iv_map,
- &graphite_regenerate_error);
+ &codegen_error);
+ if (codegen_error)
+ return NULL;
+
if (dump_file)
{
- fprintf (dump_file, "[codegen] to");
+ fprintf (dump_file, "\n[codegen] (after copy) new basic block\n");
print_loops_bb (dump_file, next_e->src, 0, 3);
}
iv_map.release ();
mark_virtual_operands_for_renaming (cfun);
update_ssa (TODO_update_ssa);
+
+ if (dump_file)
+ {
+ fprintf (dump_file, "\n[codegen] (after update SSA) new basic block\n");
+ print_loops_bb (dump_file, next_e->src, 0, 3);
+ }
+
return next_e;
}
@@ -881,6 +904,9 @@ translate_isl_ast_to_gimple::translate_isl_ast (loop_p context_loop,
__isl_keep isl_ast_node *node,
edge next_e, ivs_params &ip)
{
+ if (codegen_error)
+ return NULL;
+
switch (isl_ast_node_get_type (node))
{
case isl_ast_node_error:
@@ -906,6 +932,47 @@ translate_isl_ast_to_gimple::translate_isl_ast (loop_p context_loop,
}
}
+/* Patch the missing arguments of the phi nodes. */
+
+void
+translate_isl_ast_to_gimple::translate_pending_phi_nodes ()
+{
+ int i;
+ phi_rename *rename;
+ FOR_EACH_VEC_ELT (region->incomplete_phis, i, rename)
+ {
+ gphi *old_phi = rename->first;
+ gphi *new_phi = rename->second;
+ basic_block old_bb = gimple_bb (old_phi);
+ basic_block new_bb = gimple_bb (new_phi);
+
+ /* First edge is the init edge and second is the back edge. */
+ init_back_edge_pair_t ibp_old_bb = get_edges (old_bb);
+ init_back_edge_pair_t ibp_new_bb = get_edges (new_bb);
+
+ if (dump_file)
+ {
+ fprintf (dump_file, "\n[codegen] translating pending old-phi: ");
+ print_gimple_stmt (dump_file, old_phi, 0, 0);
+ }
+
+ auto_vec <tree, 1> iv_map;
+ if (bb_contains_loop_phi_nodes (new_bb))
+ copy_loop_phi_args (old_phi, ibp_old_bb, new_phi,
+ ibp_new_bb, region, false);
+ else if (bb_contains_loop_close_phi_nodes (new_bb))
+ copy_loop_close_phi_args (old_bb, new_bb, region, false);
+ else if (!copy_cond_phi_args (old_phi, new_phi, iv_map, region, false))
+ gcc_unreachable ();
+
+ if (dump_file)
+ {
+ fprintf (dump_file, "[codegen] to new-phi: ");
+ print_gimple_stmt (dump_file, new_phi, 0, 0);
+ }
+ }
+}
+
/* Prints NODE to FILE. */
void
@@ -926,13 +993,13 @@ add_parameters_to_ivs_params (scop_p scop, ivs_params &ip)
{
sese_info_p region = scop->scop_info;
unsigned nb_parameters = isl_set_dim (scop->param_context, isl_dim_param);
- gcc_assert (nb_parameters == SESE_PARAMS (region).length ());
+ gcc_assert (nb_parameters == region->params.length ());
unsigned i;
for (i = 0; i < nb_parameters; i++)
{
isl_id *tmp_id = isl_set_get_dim_id (scop->param_context,
isl_dim_param, i);
- ip[tmp_id] = SESE_PARAMS (region)[i];
+ ip[tmp_id] = region->params[i];
}
}
@@ -1101,7 +1168,6 @@ graphite_regenerate_ast_isl (scop_p scop)
ivs_params ip;
timevar_push (TV_GRAPHITE_CODE_GEN);
- graphite_regenerate_error = false;
root_node = scop_to_isl_ast (scop, ip);
if (dump_file && (dump_flags & TDF_DETAILS))
@@ -1115,30 +1181,47 @@ graphite_regenerate_ast_isl (scop_p scop)
graphite_verify ();
if_region = move_sese_in_condition (region);
- sese_insert_phis_for_liveouts (region,
- if_region->region->region.exit->src,
- if_region->false_region->region.exit,
- if_region->true_region->region.exit);
+ region->if_region = if_region;
recompute_all_dominators ();
- graphite_verify ();
context_loop = region->region.entry->src->loop_father;
translate_isl_ast_to_gimple t(region);
edge e = single_succ_edge (if_region->true_region->region.entry->dest);
- split_edge (e);
- t.translate_isl_ast (context_loop, root_node, e, ip);
+ basic_block bb = split_edge (e);
+ /* Update the true_region exit edge. */
+ region->if_region->true_region->region.exit = single_succ_edge (bb);
- mark_virtual_operands_for_renaming (cfun);
- update_ssa (TODO_update_ssa);
-
- graphite_verify ();
- scev_reset ();
- recompute_all_dominators ();
- graphite_verify ();
-
- if (graphite_regenerate_error)
- set_ifsese_condition (if_region, integer_zero_node);
+ t.translate_isl_ast (context_loop, root_node, e, ip);
+ if (t.codegen_error_p ())
+ {
+ if (dump_file)
+ fprintf (dump_file, "\n[codegen] unsuccessful, "
+ "reverting back to the original code.");
+ set_ifsese_condition (if_region, integer_zero_node);
+ }
+ else
+ {
+ t.translate_pending_phi_nodes ();
+ if (!t.codegen_error_p ())
+ {
+ sese_insert_phis_for_liveouts (region,
+ if_region->region->region.exit->src,
+ if_region->false_region->region.exit,
+ if_region->true_region->region.exit);
+ mark_virtual_operands_for_renaming (cfun);
+ update_ssa (TODO_update_ssa);
+
+
+ graphite_verify ();
+ scev_reset ();
+ recompute_all_dominators ();
+ graphite_verify ();
+ }
+ else if (dump_file)
+ fprintf (dump_file, "\n[codegen] unsuccessful in translating "
+ "pending phis, reverting back to the original code.");
+ }
free (if_region->true_region);
free (if_region->region);
@@ -1161,6 +1244,6 @@ graphite_regenerate_ast_isl (scop_p scop)
num_no_dependency);
}
- return !graphite_regenerate_error;
+ return !t.codegen_error_p ();
}
#endif /* HAVE_isl */
diff --git a/gcc/graphite-poly.c b/gcc/graphite-poly.c
index 36c3061f618..809670ab330 100644
--- a/gcc/graphite-poly.c
+++ b/gcc/graphite-poly.c
@@ -132,21 +132,19 @@ apply_poly_transforms (scop_p scop)
NB_SUBSCRIPTS. */
void
-new_poly_dr (poly_bb_p pbb, enum poly_dr_type type, data_reference_p cdr,
- graphite_dim_t nb_subscripts,
+new_poly_dr (poly_bb_p pbb, gimple *stmt, enum poly_dr_type type,
isl_map *acc, isl_set *subscript_sizes)
{
static int id = 0;
poly_dr_p pdr = XNEW (struct poly_dr);
+ pdr->stmt = stmt;
PDR_ID (pdr) = id++;
PDR_NB_REFS (pdr) = 1;
PDR_PBB (pdr) = pbb;
pdr->accesses = acc;
pdr->subscript_sizes = subscript_sizes;
PDR_TYPE (pdr) = type;
- PDR_CDR (pdr) = cdr;
- PDR_NB_SUBSCRIPTS (pdr) = nb_subscripts;
PBB_DRS (pbb).safe_push (pdr);
}
@@ -226,6 +224,8 @@ print_pdr (FILE *file, poly_dr_p pdr)
gcc_unreachable ();
}
+ fprintf (file, "in gimple stmt: ");
+ print_gimple_stmt (file, pdr->stmt, 0, 0);
fprintf (file, "data accesses: ");
print_isl_map (file, pdr->accesses);
fprintf (file, "subscript sizes: ");
@@ -244,14 +244,14 @@ debug_pdr (poly_dr_p pdr)
/* Store the GRAPHITE representation of BB. */
gimple_poly_bb_p
-new_gimple_poly_bb (basic_block bb, vec<data_reference_p> drs)
+new_gimple_poly_bb (basic_block bb, vec<data_reference_p> drs,
+ vec<scalar_use> reads, vec<tree> writes)
{
- gimple_poly_bb_p gbb;
-
- gbb = XNEW (struct gimple_poly_bb);
- bb->aux = gbb;
+ gimple_poly_bb_p gbb = XNEW (struct gimple_poly_bb);
GBB_BB (gbb) = bb;
GBB_DATA_REFS (gbb) = drs;
+ gbb->read_scalar_refs = reads;
+ gbb->write_scalar_refs = writes;
GBB_CONDITIONS (gbb).create (0);
GBB_CONDITION_CASES (gbb).create (0);
@@ -264,10 +264,10 @@ void
free_gimple_poly_bb (gimple_poly_bb_p gbb)
{
free_data_refs (GBB_DATA_REFS (gbb));
-
GBB_CONDITIONS (gbb).release ();
GBB_CONDITION_CASES (gbb).release ();
- GBB_BB (gbb)->aux = 0;
+ gbb->read_scalar_refs.release ();
+ gbb->write_scalar_refs.release ();
XDELETE (gbb);
}
@@ -328,6 +328,7 @@ free_scop (scop_p scop)
free_poly_bb (pbb);
scop->pbbs.release ();
+ scop->drs.release ();
isl_set_free (scop->param_context);
isl_union_map_free (scop->must_raw);
@@ -477,13 +478,13 @@ print_pbb (FILE *file, poly_bb_p pbb)
void
print_scop_params (FILE *file, scop_p scop)
{
- if (SESE_PARAMS (scop->scop_info).is_empty ())
+ if (scop->scop_info->params.is_empty ())
return;
int i;
tree t;
fprintf (file, "parameters (");
- FOR_EACH_VEC_ELT (SESE_PARAMS (scop->scop_info), i, t)
+ FOR_EACH_VEC_ELT (scop->scop_info->params, i, t)
{
print_generic_expr (file, t, 0);
fprintf (file, ", ");
diff --git a/gcc/graphite-poly.h b/gcc/graphite-poly.h
index b35431ae59d..3fcbbaf5c38 100644
--- a/gcc/graphite-poly.h
+++ b/gcc/graphite-poly.h
@@ -58,8 +58,8 @@ struct poly_dr
/* The number of data refs identical to this one in the PBB. */
int nb_refs;
- /* A pointer to compiler's data reference description. */
- data_reference_p compiler_dr;
+ /* A pointer to the gimple stmt containing this reference. */
+ gimple *stmt;
/* A pointer to the PBB that contains this data reference. */
poly_bb_p pbb;
@@ -181,21 +181,16 @@ struct poly_dr
In the example, the vector "R C O I L P" is "7 7 3 2 0 1". */
isl_map *accesses;
isl_set *subscript_sizes;
-
- /* The number of subscripts. */
- graphite_dim_t nb_subscripts;
};
#define PDR_ID(PDR) (PDR->id)
#define PDR_NB_REFS(PDR) (PDR->nb_refs)
-#define PDR_CDR(PDR) (PDR->compiler_dr)
#define PDR_PBB(PDR) (PDR->pbb)
#define PDR_TYPE(PDR) (PDR->type)
#define PDR_ACCESSES(PDR) (NULL)
-#define PDR_NB_SUBSCRIPTS(PDR) (PDR->nb_subscripts)
-void new_poly_dr (poly_bb_p, enum poly_dr_type, data_reference_p,
- graphite_dim_t, isl_map *, isl_set *);
+void new_poly_dr (poly_bb_p, gimple *, enum poly_dr_type,
+ isl_map *, isl_set *);
void free_poly_dr (poly_dr_p);
void debug_pdr (poly_dr_p);
void print_pdr (FILE *, poly_dr_p);
@@ -270,6 +265,9 @@ struct poly_bb
/* True when this PBB contains only a reduction statement. */
bool is_reduction;
+
+ /* The last basic block generated for this pbb. */
+ basic_block new_bb;
};
#define PBB_BLACK_BOX(PBB) ((gimple_poly_bb_p) PBB->black_box)
@@ -314,22 +312,6 @@ extern bool optimize_isl (scop_p);
extern void pbb_number_of_iterations_at_time (poly_bb_p, graphite_dim_t, mpz_t);
extern void debug_gmp_value (mpz_t);
-/* Returns a gimple_bb from BB. */
-
-static inline gimple_poly_bb_p
-gbb_from_bb (basic_block bb)
-{
- return (gimple_poly_bb_p) bb->aux;
-}
-
-/* The poly_bb of the BB. */
-
-static inline poly_bb_p
-pbb_from_bb (basic_block bb)
-{
- return GBB_PBB (gbb_from_bb (bb));
-}
-
/* The basic block of the PBB. */
static inline basic_block
@@ -446,7 +428,8 @@ struct scop
extern scop_p new_scop (edge, edge);
extern void free_scop (scop_p);
-extern gimple_poly_bb_p new_gimple_poly_bb (basic_block, vec<data_reference_p>);
+extern gimple_poly_bb_p new_gimple_poly_bb (basic_block, vec<data_reference_p>,
+ vec<scalar_use>, vec<tree>);
extern void free_gimple_poly_bb (gimple_poly_bb_p);
extern void print_generated_program (FILE *, scop_p);
extern void debug_generated_program (scop_p);
diff --git a/gcc/graphite-scop-detection.c b/gcc/graphite-scop-detection.c
index 9fb82645501..b5298d7e0a2 100644
--- a/gcc/graphite-scop-detection.c
+++ b/gcc/graphite-scop-detection.c
@@ -522,6 +522,11 @@ class scop_detection
public:
scop_detection () : scops (vNULL) {}
+ ~scop_detection ()
+ {
+ scops.release ();
+ }
+
/* A marker for invalid sese_l. */
static sese_l invalid_sese;
@@ -1065,13 +1070,20 @@ scop_detection::harmful_stmt_in_region (sese_l scop) const
/* The basic block should not be part of an irreducible loop. */
if (bb->flags & BB_IRREDUCIBLE_LOOP)
- return true;
+ {
+ dom.release ();
+ return true;
+ }
if (harmful_stmt_in_bb (scop, bb))
- return true;
+ {
+ dom.release ();
+ return true;
+ }
}
- return false;
+ dom.release ();
+ return false;
}
/* Returns true if S1 subsumes/surrounds S2. */
@@ -1507,7 +1519,7 @@ parameter_index_in_region_1 (tree name, sese_info_p region)
gcc_assert (TREE_CODE (name) == SSA_NAME);
- FOR_EACH_VEC_ELT (SESE_PARAMS (region), i, p)
+ FOR_EACH_VEC_ELT (region->params, i, p)
if (p == name)
return i;
@@ -1536,8 +1548,8 @@ parameter_index_in_region (tree name, sese_info_p region)
if (i != -1)
return i;
- i = SESE_PARAMS (region).length ();
- SESE_PARAMS (region).safe_push (name);
+ i = region->params.length ();
+ region->params.safe_push (name);
return i;
}
@@ -1635,7 +1647,7 @@ find_scop_parameters (scop_p scop)
struct loop *loop;
/* Find the parameters used in the loop bounds. */
- FOR_EACH_VEC_ELT (SESE_LOOP_NEST (region), i, loop)
+ FOR_EACH_VEC_ELT (region->loop_nest, i, loop)
{
tree nb_iters = number_of_latch_executions (loop);
@@ -1655,14 +1667,104 @@ find_scop_parameters (scop_p scop)
scop_set_nb_params (scop, nbp);
}
+/* Record DEF if it is used in other bbs different than DEF_BB in the SCOP. */
+
+static void
+build_cross_bb_scalars_def (scop_p scop, tree def, basic_block def_bb,
+ vec<tree> *writes)
+{
+ gcc_assert (def);
+ if (!is_gimple_reg (def))
+ return;
+
+ /* Do not gather scalar variables that can be analyzed by SCEV as they can be
+ generated out of the induction variables. */
+ if (scev_analyzable_p (def, scop->scop_info->region))
+ return;
+
+ gimple *use_stmt;
+ imm_use_iterator imm_iter;
+ FOR_EACH_IMM_USE_STMT (use_stmt, imm_iter, def)
+ if (def_bb != gimple_bb (use_stmt) && !is_gimple_debug (use_stmt))
+ {
+ writes->safe_push (def);
+ DEBUG_PRINT (dp << "Adding scalar write:\n";
+ print_generic_expr (dump_file, def, 0);
+ dp << "From stmt:\n";
+ print_gimple_stmt (dump_file,
+ SSA_NAME_DEF_STMT (def), 0, 0));
+ /* This is required by the FOR_EACH_IMM_USE_STMT when we want to break
+ before all the uses have been visited. */
+ BREAK_FROM_IMM_USE_STMT (imm_iter);
+ }
+}
+
+/* Record DEF if it is used in other bbs different than DEF_BB in the SCOP. */
+
+static void
+build_cross_bb_scalars_use (scop_p scop, tree use, gimple *use_stmt,
+ vec<scalar_use> *reads)
+{
+ gcc_assert (use);
+ if (!is_gimple_reg (use))
+ return;
+
+ /* Do not gather scalar variables that can be analyzed by SCEV as they can be
+ generated out of the induction variables. */
+ if (scev_analyzable_p (use, scop->scop_info->region))
+ return;
+
+ gimple *def_stmt = SSA_NAME_DEF_STMT (use);
+ if (gimple_bb (def_stmt) != gimple_bb (use_stmt))
+ {
+ DEBUG_PRINT (dp << "Adding scalar read:\n";
+ print_generic_expr (dump_file, use, 0);
+ dp << "From stmt:\n";
+ print_gimple_stmt (dump_file, use_stmt, 0, 0));
+ reads->safe_push (std::make_pair (use_stmt, use));
+ }
+}
+
+/* Record all scalar variables that are defined and used in different BBs of the
+ SCOP. */
+
+static void
+graphite_find_cross_bb_scalar_vars (scop_p scop, gimple *stmt,
+ vec<scalar_use> *reads, vec<tree> *writes)
+{
+ tree def;
+
+ if (gimple_code (stmt) == GIMPLE_ASSIGN)
+ def = gimple_assign_lhs (stmt);
+ else if (gimple_code (stmt) == GIMPLE_CALL)
+ def = gimple_call_lhs (stmt);
+ else if (gimple_code (stmt) == GIMPLE_PHI)
+ def = gimple_phi_result (stmt);
+ else
+ return;
+
+
+ build_cross_bb_scalars_def (scop, def, gimple_bb (stmt), writes);
+
+ ssa_op_iter iter;
+ use_operand_p use_p;
+ FOR_EACH_PHI_OR_STMT_USE (use_p, stmt, iter, SSA_OP_USE)
+ {
+ tree use = USE_FROM_PTR (use_p);
+ build_cross_bb_scalars_use (scop, use, stmt, reads);
+ }
+}
+
/* Generates a polyhedral black box only if the bb contains interesting
information. */
static gimple_poly_bb_p
try_generate_gimple_bb (scop_p scop, basic_block bb)
{
- vec<data_reference_p> drs;
- drs.create (5);
+ vec<data_reference_p> drs = vNULL;
+ vec<tree> writes = vNULL;
+ vec<scalar_use> reads = vNULL;
+
sese_l region = scop->scop_info->region;
loop_p nest = outermost_loop_in_sese (region, bb);
@@ -1670,17 +1772,58 @@ try_generate_gimple_bb (scop_p scop, basic_block bb)
if (!loop_in_sese_p (loop, region))
loop = nest;
- gimple_stmt_iterator gsi;
- for (gsi = gsi_start_bb (bb); !gsi_end_p (gsi); gsi_next (&gsi))
+ for (gimple_stmt_iterator gsi = gsi_start_bb (bb); !gsi_end_p (gsi);
+ gsi_next (&gsi))
{
gimple *stmt = gsi_stmt (gsi);
if (is_gimple_debug (stmt))
continue;
graphite_find_data_references_in_stmt (nest, loop, stmt, &drs);
+ graphite_find_cross_bb_scalar_vars (scop, stmt, &reads, &writes);
}
- return new_gimple_poly_bb (bb, drs);
+ for (gphi_iterator psi = gsi_start_phis (bb); !gsi_end_p (psi);
+ gsi_next (&psi))
+ if (!virtual_operand_p (gimple_phi_result (psi.phi ())))
+ graphite_find_cross_bb_scalar_vars (scop, psi.phi (), &reads, &writes);
+
+ if (drs.is_empty () && writes.is_empty () && reads.is_empty ())
+ return NULL;
+
+ return new_gimple_poly_bb (bb, drs, reads, writes);
+}
+
+/* Compute alias-sets for all data references in DRS. */
+
+static void
+build_alias_set (scop_p scop)
+{
+ int num_vertices = scop->drs.length ();
+ struct graph *g = new_graph (num_vertices);
+ dr_info *dr1, *dr2;
+ int i, j;
+ int *all_vertices;
+
+ FOR_EACH_VEC_ELT (scop->drs, i, dr1)
+ for (j = i+1; scop->drs.iterate (j, &dr2); j++)
+ if (dr_may_alias_p (dr1->dr, dr2->dr, true))
+ {
+ add_edge (g, i, j);
+ add_edge (g, j, i);
+ }
+
+ all_vertices = XNEWVEC (int, num_vertices);
+ for (i = 0; i < num_vertices; i++)
+ all_vertices[i] = i;
+
+ graphds_dfs (g, all_vertices, num_vertices, NULL, true, NULL);
+ free (all_vertices);
+
+ for (i = 0; i < g->n_vertices; i++)
+ scop->drs[i].alias_set = g->vertices[i].component + 1;
+
+ free_graph (g);
}
/* Gather BBs and conditions for a SCOP. */
@@ -1728,11 +1871,19 @@ gather_bbs::before_dom_children (basic_block bb)
scop->scop_info->bbs.safe_push (bb);
gimple_poly_bb_p gbb = try_generate_gimple_bb (scop, bb);
+ if (!gbb)
+ return;
+
GBB_CONDITIONS (gbb) = conditions.copy ();
GBB_CONDITION_CASES (gbb) = cases.copy ();
poly_bb_p pbb = new_poly_bb (scop, gbb);
scop->pbbs.safe_push (pbb);
+
+ int i;
+ data_reference_p dr;
+ FOR_EACH_VEC_ELT (gbb->data_refs, i, dr)
+ scop->drs.safe_push (dr_info (dr, pbb));
}
/* Call-back for dom_walk executed after visiting the dominated
@@ -1776,6 +1927,8 @@ build_scops (vec<scop_p> *scops)
/* Record all basic blocks and their conditions in REGION. */
gather_bbs (CDI_DOMINATORS, scop).walk (cfun->cfg->x_entry_block_ptr);
+ build_alias_set (scop);
+
/* Do not optimize a scop containing only PBBs that do not belong
to any loops. */
if (sb.nb_pbbs_in_loops (scop) == 0)
@@ -1807,7 +1960,6 @@ build_scops (vec<scop_p> *scops)
<< scop_nb_params (scop)
<< " larger than --param graphite-max-nb-scop-params="
<< max_dim << ".\n");
-
free_scop (scop);
continue;
}
diff --git a/gcc/graphite-sese-to-poly.c b/gcc/graphite-sese-to-poly.c
index ba45199a02a..83acc4ac6ca 100644
--- a/gcc/graphite-sese-to-poly.c
+++ b/gcc/graphite-sese-to-poly.c
@@ -75,124 +75,6 @@ tree_int_to_gmp (tree t, mpz_t res)
wi::to_mpz (t, res, TYPE_SIGN (TREE_TYPE (t)));
}
-/* Returns the index of the PHI argument defined in the outermost
- loop. */
-
-static size_t
-phi_arg_in_outermost_loop (gphi *phi)
-{
- loop_p loop = gimple_bb (phi)->loop_father;
- size_t i, res = 0;
-
- for (i = 0; i < gimple_phi_num_args (phi); i++)
- if (!flow_bb_inside_loop_p (loop, gimple_phi_arg_edge (phi, i)->src))
- {
- loop = gimple_phi_arg_edge (phi, i)->src->loop_father;
- res = i;
- }
-
- return res;
-}
-
-/* Removes a simple copy phi node "RES = phi (INIT, RES)" at position
- PSI by inserting on the loop ENTRY edge assignment "RES = INIT". */
-
-static void
-remove_simple_copy_phi (gphi_iterator *psi)
-{
- gphi *phi = psi->phi ();
- tree res = gimple_phi_result (phi);
- size_t entry = phi_arg_in_outermost_loop (phi);
- tree init = gimple_phi_arg_def (phi, entry);
- gassign *stmt = gimple_build_assign (res, init);
- edge e = gimple_phi_arg_edge (phi, entry);
-
- remove_phi_node (psi, false);
- gsi_insert_on_edge_immediate (e, stmt);
-}
-
-/* Removes an invariant phi node at position PSI by inserting on the
- loop ENTRY edge the assignment RES = INIT. */
-
-static void
-remove_invariant_phi (sese_l &region, gphi_iterator *psi)
-{
- gphi *phi = psi->phi ();
- loop_p loop = loop_containing_stmt (phi);
- tree res = gimple_phi_result (phi);
- tree scev = scalar_evolution_in_region (region, loop, res);
- size_t entry = phi_arg_in_outermost_loop (phi);
- edge e = gimple_phi_arg_edge (phi, entry);
- tree var;
- gassign *stmt;
- gimple_seq stmts = NULL;
-
- if (tree_contains_chrecs (scev, NULL))
- scev = gimple_phi_arg_def (phi, entry);
-
- var = force_gimple_operand (scev, &stmts, true, NULL_TREE);
- stmt = gimple_build_assign (res, var);
- remove_phi_node (psi, false);
-
- gimple_seq_add_stmt (&stmts, stmt);
- gsi_insert_seq_on_edge (e, stmts);
- gsi_commit_edge_inserts ();
- SSA_NAME_DEF_STMT (res) = stmt;
-}
-
-/* Returns true when the phi node at PSI is of the form "a = phi (a, x)". */
-
-static inline bool
-simple_copy_phi_p (gphi *phi)
-{
- if (gimple_phi_num_args (phi) != 2)
- return false;
-
- tree res = gimple_phi_result (phi);
- return (res == gimple_phi_arg_def (phi, 0)
- || res == gimple_phi_arg_def (phi, 1));
-}
-
-/* Returns true when the phi node at position PSI is a reduction phi
- node in REGION. Otherwise moves the pointer PSI to the next phi to
- be considered. */
-
-static bool
-reduction_phi_p (sese_l &region, gphi_iterator *psi)
-{
- loop_p loop;
- gphi *phi = psi->phi ();
- tree res = gimple_phi_result (phi);
-
- loop = loop_containing_stmt (phi);
-
- if (simple_copy_phi_p (phi))
- {
- /* PRE introduces phi nodes like these, for an example,
- see id-5.f in the fortran graphite testsuite:
-
- # prephitmp.85_265 = PHI <prephitmp.85_258(33), prephitmp.85_265(18)>
- */
- remove_simple_copy_phi (psi);
- return false;
- }
-
- if (scev_analyzable_p (res, region))
- {
- tree scev = scalar_evolution_in_region (region, loop, res);
-
- if (evolution_function_is_invariant_p (scev, loop->num))
- remove_invariant_phi (region, psi);
- else
- gsi_next (psi);
-
- return false;
- }
-
- /* All the other cases are considered reductions. */
- return true;
-}
-
/* Return an ISL identifier for the polyhedral basic block PBB. */
static isl_id *
@@ -446,31 +328,26 @@ build_scop_minimal_scattering (scop_p scop)
}
Static schedules for A to D expressed in a union map:
-
- { S_A[i0, i1] -> [i0, i1]; S_B[i0] -> [i0]; S_C[] -> []; S_9[i0] -> [i0] }
-
+ {
+ S_A[i0, i1] -> [0, i0, 0, i1];
+ S_B[i0] -> [0, i0, 1];
+ S_C[] -> [1];
+ S_D[i0] -> [2, i0, 0]
+ }
*/
static void
build_scop_original_schedule (scop_p scop)
{
+ int i;
+ poly_bb_p pbb;
+
isl_space *space = isl_set_get_space (scop->param_context);
isl_union_map *res = isl_union_map_empty (space);
- int i;
- poly_bb_p pbb;
FOR_EACH_VEC_ELT (scop->pbbs, i, pbb)
- {
- int nb_dimensions = isl_set_dim (pbb->domain, isl_dim_set);
- isl_space *dc = isl_set_get_space (pbb->domain);
- isl_space *dm = isl_space_add_dims (isl_space_from_domain (dc),
- isl_dim_out, nb_dimensions);
- isl_map *mp = isl_map_universe (dm);
- for (int i = 0; i < nb_dimensions; i++)
- mp = isl_map_equate (mp, isl_dim_in, i, isl_dim_out, i);
-
- res = isl_union_map_add_map (res, mp);
- }
+ res = isl_union_map_add_map (res, isl_map_copy (pbb->schedule));
+
scop->original_schedule = res;
}
@@ -537,14 +414,14 @@ isl_id_for_ssa_name (scop_p s, tree e)
return id;
}
-/* Return an ISL identifier for the data reference DR. */
+/* Return an ISL identifier for the data reference DR. Data references and
+ scalar references get the same isl_id. They need to be comparable and are
+ distinguished through the first dimension, which contains the alias set or
+ SSA_NAME_VERSION number. */
static isl_id *
-isl_id_for_dr (scop_p s, data_reference_p dr ATTRIBUTE_UNUSED)
+isl_id_for_dr (scop_p s)
{
- /* Data references all get the same isl_id. They need to be comparable
- and are distinguished through the first dimension, which contains the
- alias set number. */
return isl_id_alloc (s->isl_context, "", 0);
}
@@ -617,7 +494,7 @@ parameter_index_in_region_1 (tree name, sese_info_p region)
gcc_assert (TREE_CODE (name) == SSA_NAME);
- FOR_EACH_VEC_ELT (SESE_PARAMS (region), i, p)
+ FOR_EACH_VEC_ELT (region->params, i, p)
if (p == name)
return i;
@@ -705,7 +582,7 @@ set_scop_parameter_dim (scop_p scop)
unsigned i;
tree e;
- FOR_EACH_VEC_ELT (SESE_PARAMS (region), i, e)
+ FOR_EACH_VEC_ELT (region->params, i, e)
space = isl_space_set_dim_id (space, isl_dim_param, i,
isl_id_for_ssa_name (scop, e));
@@ -946,7 +823,7 @@ add_conditions_to_constraints (scop_p scop)
static void
add_param_constraints (scop_p scop, graphite_dim_t p)
{
- tree parameter = SESE_PARAMS (scop->scop_info)[p];
+ tree parameter = scop->scop_info->params[p];
tree type = TREE_TYPE (parameter);
tree lb = NULL_TREE;
tree ub = NULL_TREE;
@@ -1026,7 +903,7 @@ build_scop_iteration_domain (scop_p scop)
int i;
struct loop *loop;
- FOR_EACH_VEC_ELT (SESE_LOOP_NEST (region), i, loop)
+ FOR_EACH_VEC_ELT (region->loop_nest, i, loop)
if (!loop_in_sese_p (loop_outer (loop), region->region))
build_loop_iteration_domains (scop, loop, 0,
isl_set_copy (scop->param_context), doms);
@@ -1062,12 +939,32 @@ pdr_add_alias_set (isl_map *acc, dr_info &dri)
{
isl_constraint *c = isl_equality_alloc
(isl_local_space_from_space (isl_map_get_space (acc)));
+ /* Positive numbers for all alias sets. */
c = isl_constraint_set_constant_si (c, -dri.alias_set);
c = isl_constraint_set_coefficient_si (c, isl_dim_out, 0, 1);
return isl_map_add_constraint (acc, c);
}
+/* Add a constrain to the ACCESSES polyhedron for the alias set of
+ data reference DR. ACCESSP_NB_DIMS is the dimension of the
+ ACCESSES polyhedron, DOM_NB_DIMS is the dimension of the iteration
+ domain. */
+
+static isl_map *
+add_scalar_version_numbers (isl_map *acc, tree var)
+{
+ isl_constraint *c = isl_equality_alloc
+ (isl_local_space_from_space (isl_map_get_space (acc)));
+ int max_arrays = PARAM_VALUE (PARAM_GRAPHITE_MAX_ARRAYS_PER_SCOP);
+ /* Each scalar variables has a unique alias set number starting from
+ max_arrays. */
+ c = isl_constraint_set_constant_si (c, -max_arrays - SSA_NAME_VERSION (var));
+ c = isl_constraint_set_coefficient_si (c, isl_dim_out, 0, 1);
+
+ return isl_map_add_constraint (acc, c);
+}
+
/* Assign the affine expression INDEX to the output dimension POS of
MAP and return the result. */
@@ -1183,7 +1080,7 @@ pdr_add_data_dimensions (isl_set *subscript_sizes, scop_p scop,
return subscript_sizes;
}
-/* Build data accesses for DR in PBB. */
+/* Build data accesses for DRI. */
static void
build_poly_dr (dr_info &dri)
@@ -1193,6 +1090,7 @@ build_poly_dr (dr_info &dri)
poly_bb_p pbb = dri.pbb;
data_reference_p dr = dri.dr;
scop_p scop = PBB_SCOP (pbb);
+ isl_id *id = isl_id_for_dr (scop);
{
isl_space *dc = isl_set_get_space (pbb->domain);
@@ -1201,14 +1099,13 @@ build_poly_dr (dr_info &dri)
isl_dim_out, nb_out);
acc = isl_map_universe (space);
- acc = isl_map_set_tuple_id (acc, isl_dim_out, isl_id_for_dr (scop, dr));
+ acc = isl_map_set_tuple_id (acc, isl_dim_out, isl_id_copy (id));
}
acc = pdr_add_alias_set (acc, dri);
acc = pdr_add_memory_accesses (acc, dri);
{
- isl_id *id = isl_id_for_dr (scop, dr);
int nb = 1 + DR_NUM_DIMENSIONS (dr);
isl_space *space = isl_space_set_alloc (scop->isl_context, 0, nb);
@@ -1219,614 +1116,72 @@ build_poly_dr (dr_info &dri)
subscript_sizes = pdr_add_data_dimensions (subscript_sizes, scop, dr);
}
- new_poly_dr (pbb,
- DR_IS_READ (dr) ? PDR_READ : PDR_WRITE,
- dr, DR_NUM_DIMENSIONS (dr), acc, subscript_sizes);
+ new_poly_dr (pbb, DR_STMT (dr), DR_IS_READ (dr) ? PDR_READ : PDR_WRITE,
+ acc, subscript_sizes);
}
-/* Compute alias-sets for all data references in DRS. */
-
static void
-build_alias_set (scop_p scop)
+build_poly_sr_1 (poly_bb_p pbb, gimple *stmt, tree var, enum poly_dr_type kind,
+ isl_map *acc, isl_set *subscript_sizes)
{
- int num_vertices = scop->drs.length ();
- struct graph *g = new_graph (num_vertices);
- dr_info *dr1, *dr2;
- int i, j;
- int *all_vertices;
-
- FOR_EACH_VEC_ELT (scop->drs, i, dr1)
- for (j = i+1; scop->drs.iterate (j, &dr2); j++)
- if (dr_may_alias_p (dr1->dr, dr2->dr, true))
- {
- add_edge (g, i, j);
- add_edge (g, j, i);
- }
-
- all_vertices = XNEWVEC (int, num_vertices);
- for (i = 0; i < num_vertices; i++)
- all_vertices[i] = i;
-
- graphds_dfs (g, all_vertices, num_vertices, NULL, true, NULL);
- free (all_vertices);
-
- for (i = 0; i < g->n_vertices; i++)
- scop->drs[i].alias_set = g->vertices[i].component + 1;
-
- free_graph (g);
+ int max_arrays = PARAM_VALUE (PARAM_GRAPHITE_MAX_ARRAYS_PER_SCOP);
+ /* Each scalar variables has a unique alias set number starting from
+ max_arrays. */
+ subscript_sizes = isl_set_fix_si (subscript_sizes, isl_dim_set, 0,
+ max_arrays + SSA_NAME_VERSION (var));
+
+ new_poly_dr (pbb, stmt, kind, add_scalar_version_numbers (acc, var),
+ subscript_sizes);
}
-/* Build data references in SCOP. */
+/* Record all cross basic block scalar variables in PBB. */
static void
-build_scop_drs (scop_p scop)
-{
- int i, j;
- poly_bb_p pbb;
-
- /* Remove all the PBBs that do not have data references: these basic
- blocks are not handled in the polyhedral representation. */
- for (i = 0; scop->pbbs.iterate (i, &pbb); i++)
- if (GBB_DATA_REFS (PBB_BLACK_BOX (pbb)).is_empty ())
- {
- free_gimple_poly_bb (PBB_BLACK_BOX (pbb));
- free_poly_bb (pbb);
- scop->pbbs.ordered_remove (i);
- i--;
- }
-
- data_reference_p dr;
- FOR_EACH_VEC_ELT (scop->pbbs, i, pbb)
- if (pbb)
- FOR_EACH_VEC_ELT (GBB_DATA_REFS (PBB_BLACK_BOX (pbb)), j, dr)
- scop->drs.safe_push (dr_info (dr, pbb));
-
- build_alias_set (scop);
-
- dr_info *dri;
- FOR_EACH_VEC_ELT (scop->drs, i, dri)
- build_poly_dr (*dri);
-}
-
-/* Analyze all the data references of STMTS and add them to the
- GBB_DATA_REFS vector of BB. */
-
-static void
-analyze_drs_in_stmts (scop_p scop, basic_block bb, vec<gimple *> stmts)
-{
- sese_l region = scop->scop_info->region;
- if (!bb_in_sese_p (bb, region))
- return;
-
- loop_p nest = outermost_loop_in_sese (region, bb);
- loop_p loop = bb->loop_father;
- if (!loop_in_sese_p (loop, region))
- loop = nest;
-
- gimple_poly_bb_p gbb = gbb_from_bb (bb);
-
- gimple *stmt;
- int i;
- FOR_EACH_VEC_ELT (stmts, i, stmt)
- {
- if (is_gimple_debug (stmt))
- continue;
-
- graphite_find_data_references_in_stmt (nest, loop, stmt,
- &GBB_DATA_REFS (gbb));
- }
-}
-
-/* Insert STMT at the end of the STMTS sequence and then insert the
- statements from STMTS at INSERT_GSI and call analyze_drs_in_stmts
- on STMTS. */
-
-static void
-insert_stmts (scop_p scop, gimple *stmt, gimple_seq stmts,
- gimple_stmt_iterator insert_gsi)
+build_poly_sr (poly_bb_p pbb)
{
- gimple_stmt_iterator gsi;
- auto_vec<gimple *, 3> x;
-
- gimple_seq_add_stmt (&stmts, stmt);
- for (gsi = gsi_start (stmts); !gsi_end_p (gsi); gsi_next (&gsi))
- x.safe_push (gsi_stmt (gsi));
-
- gsi_insert_seq_before (&insert_gsi, stmts, GSI_SAME_STMT);
- analyze_drs_in_stmts (scop, gsi_bb (insert_gsi), x);
-}
-
-/* Insert the assignment "RES := EXPR" just after AFTER_STMT. */
-
-static void
-insert_out_of_ssa_copy (scop_p scop, tree res, tree expr, gimple *after_stmt)
-{
- gimple_stmt_iterator gsi;
- auto_vec<gimple *, 3> x;
- gimple_seq stmts;
- tree var = force_gimple_operand (expr, &stmts, true, NULL_TREE);
- gassign *stmt = gimple_build_assign (unshare_expr (res), var);
-
- gimple_seq_add_stmt (&stmts, stmt);
-
- for (gsi = gsi_start (stmts); !gsi_end_p (gsi); gsi_next (&gsi))
- x.safe_push (gsi_stmt (gsi));
-
- if (gimple_code (after_stmt) == GIMPLE_PHI)
- {
- gsi = gsi_after_labels (gimple_bb (after_stmt));
- gsi_insert_seq_before (&gsi, stmts, GSI_NEW_STMT);
- }
- else
- {
- gsi = gsi_for_stmt (after_stmt);
- gsi_insert_seq_after (&gsi, stmts, GSI_NEW_STMT);
- }
-
- analyze_drs_in_stmts (scop, gimple_bb (after_stmt), x);
-}
-
-/* Creates a poly_bb_p for basic_block BB from the existing PBB. */
-
-static void
-new_pbb_from_pbb (scop_p scop, poly_bb_p pbb, basic_block bb)
-{
- vec<data_reference_p> drs;
- drs.create (3);
+ scop_p scop = PBB_SCOP (pbb);
gimple_poly_bb_p gbb = PBB_BLACK_BOX (pbb);
- gimple_poly_bb_p gbb1 = new_gimple_poly_bb (bb, drs);
- poly_bb_p pbb1 = new_poly_bb (scop, gbb1);
- int index, n = scop->pbbs.length ();
-
- for (index = 0; index < n; index++)
- if (scop->pbbs[index] == pbb)
- break;
-
- pbb1->domain = isl_set_copy (pbb->domain);
- pbb1->domain = isl_set_set_tuple_id (pbb1->domain,
- isl_id_for_pbb (scop, pbb1));
-
- GBB_PBB (gbb1) = pbb1;
- GBB_CONDITIONS (gbb1) = GBB_CONDITIONS (gbb).copy ();
- GBB_CONDITION_CASES (gbb1) = GBB_CONDITION_CASES (gbb).copy ();
- scop->pbbs.safe_insert (index + 1, pbb1);
-}
-
-/* Insert on edge E the assignment "RES := EXPR". */
-
-static void
-insert_out_of_ssa_copy_on_edge (scop_p scop, edge e, tree res, tree expr)
-{
- gimple_seq stmts = NULL;
- tree var = force_gimple_operand (expr, &stmts, true, NULL_TREE);
- gimple *stmt = gimple_build_assign (unshare_expr (res), var);
- auto_vec<gimple *, 3> x;
-
- gimple_seq_add_stmt (&stmts, stmt);
- gimple_stmt_iterator gsi;
- for (gsi = gsi_start (stmts); !gsi_end_p (gsi); gsi_next (&gsi))
- x.safe_push (gsi_stmt (gsi));
-
- gsi_insert_seq_on_edge (e, stmts);
- gsi_commit_edge_inserts ();
- basic_block bb = gimple_bb (stmt);
-
- if (!bb_in_sese_p (bb, scop->scop_info->region))
- return;
-
- if (!gbb_from_bb (bb))
- new_pbb_from_pbb (scop, pbb_from_bb (e->src), bb);
-
- analyze_drs_in_stmts (scop, bb, x);
-}
-
-/* Creates a zero dimension array of the same type as VAR. */
-
-static tree
-create_zero_dim_array (tree var, const char *base_name)
-{
- tree index_type = build_index_type (integer_zero_node);
- tree elt_type = TREE_TYPE (var);
- tree array_type = build_array_type (elt_type, index_type);
- tree base = create_tmp_var (array_type, base_name);
-
- return build4 (ARRAY_REF, elt_type, base, integer_zero_node, NULL_TREE,
- NULL_TREE);
-}
+ vec<scalar_use> reads = gbb->read_scalar_refs;
+ vec<tree> writes = gbb->write_scalar_refs;
-/* Returns true when PHI is a loop close phi node. */
-
-static bool
-scalar_close_phi_node_p (gimple *phi)
-{
- if (gimple_code (phi) != GIMPLE_PHI
- || virtual_operand_p (gimple_phi_result (phi)))
- return false;
-
- /* Note that loop close phi nodes should have a single argument
- because we translated the representation into a canonical form
- before Graphite: see canonicalize_loop_closed_ssa_form. */
- return (gimple_phi_num_args (phi) == 1);
-}
-
-/* For a definition DEF in REGION, propagates the expression EXPR in
- all the uses of DEF outside REGION. */
-
-static void
-propagate_expr_outside_region (tree def, tree expr, sese_l &region)
-{
- gimple_seq stmts;
- bool replaced_once = false;
-
- gcc_assert (TREE_CODE (def) == SSA_NAME);
-
- expr = force_gimple_operand (unshare_expr (expr), &stmts, true,
- NULL_TREE);
-
- imm_use_iterator imm_iter;
- gimple *use_stmt;
- FOR_EACH_IMM_USE_STMT (use_stmt, imm_iter, def)
- if (!is_gimple_debug (use_stmt)
- && !bb_in_sese_p (gimple_bb (use_stmt), region))
- {
- ssa_op_iter iter;
- use_operand_p use_p;
-
- FOR_EACH_PHI_OR_STMT_USE (use_p, use_stmt, iter, SSA_OP_ALL_USES)
- if (operand_equal_p (def, USE_FROM_PTR (use_p), 0)
- && (replaced_once = true))
- replace_exp (use_p, expr);
-
- update_stmt (use_stmt);
- }
-
- if (replaced_once)
- {
- gsi_insert_seq_on_edge (region.entry, stmts);
- gsi_commit_edge_inserts ();
- }
-}
-
-/* Rewrite out of SSA the reduction phi node at PSI by creating a zero
- dimension array for it. */
-
-static void
-rewrite_close_phi_out_of_ssa (scop_p scop, gimple_stmt_iterator *psi)
-{
- sese_l region = scop->scop_info->region;
- gimple *phi = gsi_stmt (*psi);
- tree res = gimple_phi_result (phi);
- basic_block bb = gimple_bb (phi);
- gimple_stmt_iterator gsi = gsi_after_labels (bb);
- tree arg = gimple_phi_arg_def (phi, 0);
- gimple *stmt;
-
- /* Note that loop close phi nodes should have a single argument
- because we translated the representation into a canonical form
- before Graphite: see canonicalize_loop_closed_ssa_form. */
- gcc_assert (gimple_phi_num_args (phi) == 1);
-
- /* The phi node can be a non close phi node, when its argument is
- invariant, or a default definition. */
- if (is_gimple_min_invariant (arg)
- || SSA_NAME_IS_DEFAULT_DEF (arg))
- {
- propagate_expr_outside_region (res, arg, region);
- gsi_next (psi);
- return;
- }
-
- else if (gimple_bb (SSA_NAME_DEF_STMT (arg))->loop_father == bb->loop_father)
- {
- propagate_expr_outside_region (res, arg, region);
- stmt = gimple_build_assign (res, arg);
- remove_phi_node (psi, false);
- gsi_insert_before (&gsi, stmt, GSI_NEW_STMT);
- return;
- }
-
- /* If res is scev analyzable and is not a scalar value, it is safe
- to ignore the close phi node: it will be code generated in the
- out of Graphite pass. */
- else if (scev_analyzable_p (res, region))
- {
- loop_p loop = loop_containing_stmt (SSA_NAME_DEF_STMT (res));
- tree scev;
-
- if (!loop_in_sese_p (loop, region))
- {
- loop = loop_containing_stmt (SSA_NAME_DEF_STMT (arg));
- scev = scalar_evolution_in_region (region, loop, arg);
- scev = compute_overall_effect_of_inner_loop (loop, scev);
- }
- else
- scev = scalar_evolution_in_region (region, loop, res);
-
- if (tree_does_not_contain_chrecs (scev))
- propagate_expr_outside_region (res, scev, region);
-
- gsi_next (psi);
- return;
- }
- else
- {
- tree zero_dim_array = create_zero_dim_array (res, "Close_Phi");
-
- stmt = gimple_build_assign (res, unshare_expr (zero_dim_array));
-
- if (TREE_CODE (arg) == SSA_NAME)
- insert_out_of_ssa_copy (scop, zero_dim_array, arg,
- SSA_NAME_DEF_STMT (arg));
- else
- insert_out_of_ssa_copy_on_edge (scop, single_pred_edge (bb),
- zero_dim_array, arg);
- }
-
- remove_phi_node (psi, false);
- SSA_NAME_DEF_STMT (res) = stmt;
-
- insert_stmts (scop, stmt, NULL, gsi_after_labels (bb));
-}
-
-/* Rewrite out of SSA the reduction phi node at PSI by creating a zero
- dimension array for it. */
-
-static void
-rewrite_phi_out_of_ssa (scop_p scop, gphi_iterator *psi)
-{
- gphi *phi = psi->phi ();
- basic_block bb = gimple_bb (phi);
- tree res = gimple_phi_result (phi);
- tree zero_dim_array = create_zero_dim_array (res, "phi_out_of_ssa");
-
- for (size_t i = 0; i < gimple_phi_num_args (phi); i++)
- {
- tree arg = gimple_phi_arg_def (phi, i);
- edge e = gimple_phi_arg_edge (phi, i);
-
- /* Avoid the insertion of code in the loop latch to please the
- pattern matching of the vectorizer. */
- if (TREE_CODE (arg) == SSA_NAME
- && !SSA_NAME_IS_DEFAULT_DEF (arg)
- && e->src == bb->loop_father->latch)
- insert_out_of_ssa_copy (scop, zero_dim_array, arg,
- SSA_NAME_DEF_STMT (arg));
- else
- insert_out_of_ssa_copy_on_edge (scop, e, zero_dim_array, arg);
- }
-
- gimple *stmt = gimple_build_assign (res, unshare_expr (zero_dim_array));
- remove_phi_node (psi, false);
- insert_stmts (scop, stmt, NULL, gsi_after_labels (bb));
-}
-
-/* Rewrite the degenerate phi node at position PSI from the degenerate
- form "x = phi (y, y, ..., y)" to "x = y". */
-
-static void
-rewrite_degenerate_phi (gphi_iterator *psi)
-{
- gphi *phi = psi->phi ();
- tree res = gimple_phi_result (phi);
-
- basic_block bb = gimple_bb (phi);
- tree rhs = degenerate_phi_result (phi);
- gcc_assert (rhs);
-
- gimple *stmt = gimple_build_assign (res, rhs);
- remove_phi_node (psi, false);
-
- gimple_stmt_iterator gsi = gsi_after_labels (bb);
- gsi_insert_before (&gsi, stmt, GSI_NEW_STMT);
-}
-
-/* Rewrite out of SSA all the reduction phi nodes of SCOP. */
+ isl_space *dc = isl_set_get_space (pbb->domain);
+ int nb_out = 1;
+ isl_space *space = isl_space_add_dims (isl_space_from_domain (dc),
+ isl_dim_out, nb_out);
+ isl_id *id = isl_id_for_dr (scop);
+ space = isl_space_set_tuple_id (space, isl_dim_set, isl_id_copy (id));
+ isl_map *acc = isl_map_universe (isl_space_copy (space));
+ acc = isl_map_set_tuple_id (acc, isl_dim_out, id);
+ isl_set *subscript_sizes = isl_set_nat_universe (space);
-static void
-rewrite_reductions_out_of_ssa (scop_p scop)
-{
int i;
- basic_block bb;
- FOR_EACH_VEC_ELT (scop->scop_info->bbs, i, bb)
- for (gphi_iterator psi = gsi_start_phis (bb); !gsi_end_p (psi);)
- {
- gphi *phi = psi.phi ();
-
- if (virtual_operand_p (gimple_phi_result (phi)))
- {
- gsi_next (&psi);
- continue;
- }
-
- if (gimple_phi_num_args (phi) > 1
- && degenerate_phi_result (phi))
- rewrite_degenerate_phi (&psi);
-
- else if (scalar_close_phi_node_p (phi))
- rewrite_close_phi_out_of_ssa (scop, &psi);
-
- else if (reduction_phi_p (scop->scop_info->region, &psi))
- rewrite_phi_out_of_ssa (scop, &psi);
- }
-
- update_ssa (TODO_update_ssa);
- checking_verify_loop_closed_ssa (true);
-}
-
-/* Rewrite the scalar dependence of DEF used in USE_STMT with a memory
- read from ZERO_DIM_ARRAY. */
-
-static void
-rewrite_cross_bb_scalar_dependence (scop_p scop, tree zero_dim_array,
- tree def, gimple *use_stmt)
-{
- gcc_assert (gimple_code (use_stmt) != GIMPLE_PHI);
-
- tree name = copy_ssa_name (def);
- gimple *name_stmt = gimple_build_assign (name, zero_dim_array);
-
- gimple_assign_set_lhs (name_stmt, name);
- insert_stmts (scop, name_stmt, NULL, gsi_for_stmt (use_stmt));
-
- ssa_op_iter iter;
- use_operand_p use_p;
- FOR_EACH_SSA_USE_OPERAND (use_p, use_stmt, iter, SSA_OP_ALL_USES)
- if (operand_equal_p (def, USE_FROM_PTR (use_p), 0))
- replace_exp (use_p, name);
-
- update_stmt (use_stmt);
-}
-
-/* For every definition DEF in the SCOP that is used outside the scop,
- insert a closing-scop definition in the basic block just after this
- SCOP. */
-
-static void
-handle_scalar_deps_crossing_scop_limits (scop_p scop, tree def, gimple *stmt)
-{
- tree var = create_tmp_reg (TREE_TYPE (def));
- tree new_name = make_ssa_name (var, stmt);
- bool needs_copy = false;
- sese_l region = scop->scop_info->region;
-
- imm_use_iterator imm_iter;
- gimple *use_stmt;
- FOR_EACH_IMM_USE_STMT (use_stmt, imm_iter, def)
- {
- if (!bb_in_sese_p (gimple_bb (use_stmt), region))
- {
- use_operand_p use_p;
- FOR_EACH_IMM_USE_ON_STMT (use_p, imm_iter)
- {
- SET_USE (use_p, new_name);
- }
- update_stmt (use_stmt);
- needs_copy = true;
- }
- }
-
- /* Insert in the empty BB just after the scop a use of DEF such
- that the rewrite of cross_bb_scalar_dependences won't insert
- arrays everywhere else. */
- if (needs_copy)
- {
- gimple *assign = gimple_build_assign (new_name, def);
- gimple_stmt_iterator psi = gsi_after_labels (region.exit->dest);
-
- update_stmt (assign);
- gsi_insert_before (&psi, assign, GSI_SAME_STMT);
- }
-}
-
-/* Rewrite the scalar dependences crossing the boundary of the BB
- containing STMT with an array. Return true when something has been
- changed. */
-
-static bool
-rewrite_cross_bb_scalar_deps (scop_p scop, gimple_stmt_iterator *gsi)
-{
- sese_l region = scop->scop_info->region;
- gimple *stmt = gsi_stmt (*gsi);
- imm_use_iterator imm_iter;
- tree def;
- tree zero_dim_array = NULL_TREE;
- gimple *use_stmt;
- bool res = false;
-
- switch (gimple_code (stmt))
- {
- case GIMPLE_ASSIGN:
- def = gimple_assign_lhs (stmt);
- break;
-
- case GIMPLE_CALL:
- def = gimple_call_lhs (stmt);
- break;
-
- default:
- return false;
- }
-
- if (!def
- || !is_gimple_reg (def))
- return false;
-
- if (scev_analyzable_p (def, region))
- {
- loop_p loop = loop_containing_stmt (SSA_NAME_DEF_STMT (def));
- tree scev = scalar_evolution_in_region (region, loop, def);
-
- if (tree_contains_chrecs (scev, NULL))
- return false;
-
- propagate_expr_outside_region (def, scev, region);
- return true;
- }
-
- basic_block def_bb = gimple_bb (stmt);
-
- handle_scalar_deps_crossing_scop_limits (scop, def, stmt);
-
- FOR_EACH_IMM_USE_STMT (use_stmt, imm_iter, def)
- if (gphi *phi = dyn_cast <gphi *> (use_stmt))
- {
- res = true;
- gphi_iterator psi = gsi_for_phi (phi);
-
- if (scalar_close_phi_node_p (gsi_stmt (psi)))
- rewrite_close_phi_out_of_ssa (scop, &psi);
- else
- rewrite_phi_out_of_ssa (scop, &psi);
- }
-
- FOR_EACH_IMM_USE_STMT (use_stmt, imm_iter, def)
- if (gimple_code (use_stmt) != GIMPLE_PHI
- && def_bb != gimple_bb (use_stmt)
- && !is_gimple_debug (use_stmt)
- && (res = true))
- {
- if (!zero_dim_array)
- {
- zero_dim_array = create_zero_dim_array
- (def, "Cross_BB_scalar_dependence");
- insert_out_of_ssa_copy (scop, zero_dim_array, def,
- SSA_NAME_DEF_STMT (def));
- gsi_next (gsi);
- }
-
- rewrite_cross_bb_scalar_dependence (scop, unshare_expr (zero_dim_array),
- def, use_stmt);
- }
+ tree var;
+ FOR_EACH_VEC_ELT (writes, i, var)
+ build_poly_sr_1 (pbb, SSA_NAME_DEF_STMT (var), var, PDR_WRITE,
+ isl_map_copy (acc), isl_set_copy (subscript_sizes));
- update_ssa (TODO_update_ssa);
+ scalar_use *use;
+ FOR_EACH_VEC_ELT (reads, i, use)
+ build_poly_sr_1 (pbb, use->first, use->second, PDR_READ, isl_map_copy (acc),
+ isl_set_copy (subscript_sizes));
- return res;
+ isl_map_free (acc);
+ isl_set_free (subscript_sizes);
}
-/* Rewrite out of SSA all the reduction phi nodes of SCOP. */
+/* Build data references in SCOP. */
static void
-rewrite_cross_bb_scalar_deps_out_of_ssa (scop_p scop)
+build_scop_drs (scop_p scop)
{
- gimple_stmt_iterator psi;
- sese_l region = scop->scop_info->region;
- bool changed = false;
-
- /* Create an extra empty BB after the scop. */
- split_edge (region.exit);
-
int i;
- basic_block bb;
- FOR_EACH_VEC_ELT (scop->scop_info->bbs, i, bb)
- for (psi = gsi_start_bb (bb); !gsi_end_p (psi); gsi_next (&psi))
- changed |= rewrite_cross_bb_scalar_deps (scop, &psi);
+ dr_info *dri;
+ FOR_EACH_VEC_ELT (scop->drs, i, dri)
+ build_poly_dr (*dri);
- if (changed)
- {
- scev_reset_htab ();
- update_ssa (TODO_update_ssa);
- checking_verify_loop_closed_ssa (true);
- }
+ poly_bb_p pbb;
+ FOR_EACH_VEC_ELT (scop->pbbs, i, pbb)
+ build_poly_sr (pbb);
}
/* Builds the polyhedral representation for a SESE region. */
@@ -1839,13 +1194,6 @@ build_poly_scop (scop_p scop)
build_scop_context (scop);
add_conditions_to_constraints (scop);
- /* Rewrite out of SSA only after having translated the
- representation to the polyhedral representation to avoid scev
- analysis failures. That means that these functions will insert
- new data references that they create in the right place. */
- rewrite_reductions_out_of_ssa (scop);
- rewrite_cross_bb_scalar_deps_out_of_ssa (scop);
-
build_scop_drs (scop);
build_scop_minimal_scattering (scop);
build_scop_original_schedule (scop);
diff --git a/gcc/graphite.c b/gcc/graphite.c
index 773203e24f6..5316bc4fa7d 100644
--- a/gcc/graphite.c
+++ b/gcc/graphite.c
@@ -333,12 +333,16 @@ graphite_transform_loops (void)
if (dump_file && dump_flags)
print_scop (dump_file, scop);
-
if (scop->poly_scop_p
- && apply_poly_transforms (scop)
- && graphite_regenerate_ast_isl (scop))
- need_cfg_cleanup_p = true;
-
+ && apply_poly_transforms (scop))
+ {
+ need_cfg_cleanup_p = true;
+ /* When code generation is not successful, do not continue
+ generating code for the next scops: the IR has to be cleaned up
+ and could be in an inconsistent state. */
+ if (!graphite_regenerate_ast_isl (scop))
+ break;
+ }
}
free_scops (scops);
diff --git a/gcc/input.c b/gcc/input.c
index 0f6d448b546..ce84f100371 100644
--- a/gcc/input.c
+++ b/gcc/input.c
@@ -887,6 +887,10 @@ dump_line_table_statistics (void)
STAT_LABEL (s.adhoc_table_size));
fprintf (stderr, "Ad-hoc table entries used: %5ld\n",
s.adhoc_table_entries_used);
+ fprintf (stderr, "optimized_ranges: %i\n",
+ line_table->num_optimized_ranges);
+ fprintf (stderr, "unoptimized_ranges: %i\n",
+ line_table->num_unoptimized_ranges);
fprintf (stderr, "\n");
}
@@ -917,13 +921,14 @@ write_digit (FILE *stream, int digit)
static void
write_digit_row (FILE *stream, int indent,
+ const line_map_ordinary *map,
source_location loc, int max_col, int divisor)
{
fprintf (stream, "%*c", indent, ' ');
fprintf (stream, "|");
for (int column = 1; column < max_col; column++)
{
- source_location column_loc = loc + column;
+ source_location column_loc = loc + (column << map->m_range_bits);
write_digit (stream, column_loc / divisor);
}
fprintf (stream, "\n");
@@ -977,14 +982,20 @@ dump_location_info (FILE *stream)
fprintf (stream, " file: %s\n", ORDINARY_MAP_FILE_NAME (map));
fprintf (stream, " starting at line: %i\n",
ORDINARY_MAP_STARTING_LINE_NUMBER (map));
+ fprintf (stream, " column and range bits: %i\n",
+ map->m_column_and_range_bits);
fprintf (stream, " column bits: %i\n",
- ORDINARY_MAP_NUMBER_OF_COLUMN_BITS (map));
+ map->m_column_and_range_bits - map->m_range_bits);
+ fprintf (stream, " range bits: %i\n",
+ map->m_range_bits);
/* Render the span of source lines that this "map" covers. */
for (source_location loc = MAP_START_LOCATION (map);
loc < end_location;
- loc++)
+ loc += (1 << map->m_range_bits) )
{
+ gcc_assert (pure_location_p (line_table, loc) );
+
expanded_location exploc
= linemap_expand_location (line_table, map, loc);
@@ -1008,8 +1019,7 @@ dump_location_info (FILE *stream)
Render the locations *within* the line, by underlining
it, showing the source_location numeric values
at each column. */
- int max_col
- = (1 << ORDINARY_MAP_NUMBER_OF_COLUMN_BITS (map)) - 1;
+ int max_col = (1 << map->m_column_and_range_bits) - 1;
if (max_col > line_size)
max_col = line_size + 1;
@@ -1017,17 +1027,17 @@ dump_location_info (FILE *stream)
/* Thousands. */
if (end_location > 999)
- write_digit_row (stream, indent, loc, max_col, 1000);
+ write_digit_row (stream, indent, map, loc, max_col, 1000);
/* Hundreds. */
if (end_location > 99)
- write_digit_row (stream, indent, loc, max_col, 100);
+ write_digit_row (stream, indent, map, loc, max_col, 100);
/* Tens. */
- write_digit_row (stream, indent, loc, max_col, 10);
+ write_digit_row (stream, indent, map, loc, max_col, 10);
/* Units. */
- write_digit_row (stream, indent, loc, max_col, 1);
+ write_digit_row (stream, indent, map, loc, max_col, 1);
}
}
fprintf (stream, "\n");
diff --git a/gcc/ipa-icf.c b/gcc/ipa-icf.c
index 7bb3af5e591..bf1acae2310 100644
--- a/gcc/ipa-icf.c
+++ b/gcc/ipa-icf.c
@@ -140,7 +140,7 @@ sem_usage_pair::sem_usage_pair (sem_item *_item, unsigned int _index):
for bitmap memory allocation. */
sem_item::sem_item (sem_item_type _type,
- bitmap_obstack *stack): type(_type), hash(0)
+ bitmap_obstack *stack): type (_type), m_hash (0)
{
setup (stack);
}
@@ -151,7 +151,7 @@ sem_item::sem_item (sem_item_type _type,
sem_item::sem_item (sem_item_type _type, symtab_node *_node,
hashval_t _hash, bitmap_obstack *stack): type(_type),
- node (_node), hash (_hash)
+ node (_node), m_hash (_hash)
{
decl = node->decl;
setup (stack);
@@ -227,6 +227,11 @@ sem_item::target_supports_symbol_aliases_p (void)
#endif
}
+void sem_item::set_hash (hashval_t hash)
+{
+ m_hash = hash;
+}
+
/* Semantic function constructor that uses STACK as bitmap memory stack. */
sem_function::sem_function (bitmap_obstack *stack): sem_item (FUNC, stack),
@@ -274,7 +279,7 @@ sem_function::get_bb_hash (const sem_bb *basic_block)
hashval_t
sem_function::get_hash (void)
{
- if(!hash)
+ if (!m_hash)
{
inchash::hash hstate;
hstate.add_int (177454); /* Random number for function type. */
@@ -289,7 +294,6 @@ sem_function::get_hash (void)
for (unsigned i = 0; i < bb_sizes.length (); i++)
hstate.add_int (bb_sizes[i]);
-
/* Add common features of declaration itself. */
if (DECL_FUNCTION_SPECIFIC_TARGET (decl))
hstate.add_wide_int
@@ -301,10 +305,10 @@ sem_function::get_hash (void)
hstate.add_flag (DECL_CXX_CONSTRUCTOR_P (decl));
hstate.add_flag (DECL_CXX_DESTRUCTOR_P (decl));
- hash = hstate.end ();
+ set_hash (hstate.end ());
}
- return hash;
+ return m_hash;
}
/* Return ture if A1 and A2 represent equivalent function attribute lists.
@@ -800,7 +804,7 @@ sem_item::update_hash_by_addr_refs (hash_map <symtab_node *,
sem_item *> &m_symtab_node_map)
{
ipa_ref* ref;
- inchash::hash hstate (hash);
+ inchash::hash hstate (get_hash ());
for (unsigned i = 0; node->iterate_reference (i, ref); i++)
{
@@ -823,7 +827,7 @@ sem_item::update_hash_by_addr_refs (hash_map <symtab_node *,
}
}
- hash = hstate.end ();
+ set_hash (hstate.end ());
}
/* Update hash by computed local hash values taken from different
@@ -835,13 +839,13 @@ sem_item::update_hash_by_local_refs (hash_map <symtab_node *,
sem_item *> &m_symtab_node_map)
{
ipa_ref* ref;
- inchash::hash state (hash);
+ inchash::hash state (get_hash ());
for (unsigned j = 0; node->iterate_reference (j, ref); j++)
{
sem_item **result = m_symtab_node_map.get (ref->referring);
if (result)
- state.merge_hash ((*result)->hash);
+ state.merge_hash ((*result)->get_hash ());
}
if (type == FUNC)
@@ -851,7 +855,7 @@ sem_item::update_hash_by_local_refs (hash_map <symtab_node *,
{
sem_item **result = m_symtab_node_map.get (e->caller);
if (result)
- state.merge_hash ((*result)->hash);
+ state.merge_hash ((*result)->get_hash ());
}
}
@@ -2099,8 +2103,8 @@ sem_variable::parse (varpool_node *node, bitmap_obstack *stack)
hashval_t
sem_variable::get_hash (void)
{
- if (hash)
- return hash;
+ if (m_hash)
+ return m_hash;
/* All WPA streamed in symbols should have their hashes computed at compile
time. At this point, the constructor may not be in memory at all.
@@ -2113,9 +2117,9 @@ sem_variable::get_hash (void)
if (DECL_SIZE (decl) && tree_fits_shwi_p (DECL_SIZE (decl)))
hstate.add_wide_int (tree_to_shwi (DECL_SIZE (decl)));
add_expr (ctor, hstate);
- hash = hstate.end ();
+ set_hash (hstate.end ());
- return hash;
+ return m_hash;
}
/* Merges instance with an ALIAS_ITEM, where alias, thunk or redirection can
@@ -2688,7 +2692,7 @@ sem_item_optimizer::update_hash_by_addr_refs ()
{
tree class_type
= TYPE_METHOD_BASETYPE (TREE_TYPE (m_items[i]->decl));
- inchash::hash hstate (m_items[i]->hash);
+ inchash::hash hstate (m_items[i]->get_hash ());
if (TYPE_NAME (class_type)
&& DECL_ASSEMBLER_NAME_SET_P (TYPE_NAME (class_type)))
@@ -2696,7 +2700,7 @@ sem_item_optimizer::update_hash_by_addr_refs ()
(IDENTIFIER_HASH_VALUE
(DECL_ASSEMBLER_NAME (TYPE_NAME (class_type))));
- m_items[i]->hash = hstate.end ();
+ m_items[i]->set_hash (hstate.end ());
}
}
}
@@ -2710,7 +2714,7 @@ sem_item_optimizer::update_hash_by_addr_refs ()
/* Global hash value replace current hash values. */
for (unsigned i = 0; i < m_items.length (); i++)
- m_items[i]->hash = m_items[i]->global_hash;
+ m_items[i]->set_hash (m_items[i]->global_hash);
}
/* Congruence classes are built by hash value. */
@@ -2722,7 +2726,7 @@ sem_item_optimizer::build_hash_based_classes (void)
{
sem_item *item = m_items[i];
- congruence_class_group *group = get_group_by_hash (item->hash,
+ congruence_class_group *group = get_group_by_hash (item->get_hash (),
item->type);
if (!group->classes.length ())
@@ -2744,6 +2748,10 @@ sem_item_optimizer::build_graph (void)
{
sem_item *item = m_items[i];
m_symtab_node_map.put (item->node, item);
+
+ /* Initialize hash values if we are not in LTO mode. */
+ if (!in_lto_p)
+ item->get_hash ();
}
for (unsigned i = 0; i < m_items.length (); i++)
@@ -3038,7 +3046,9 @@ sem_item_optimizer::traverse_congruence_split (congruence_class * const &cls,
if (popcount > 0 && popcount < cls->members.length ())
{
- congruence_class* newclasses[2] = { new congruence_class (class_id++), new congruence_class (class_id++) };
+ auto_vec <congruence_class *, 2> newclasses;
+ newclasses.quick_push (new congruence_class (class_id++));
+ newclasses.quick_push (new congruence_class (class_id++));
for (unsigned int i = 0; i < cls->members.length (); i++)
{
diff --git a/gcc/ipa-icf.h b/gcc/ipa-icf.h
index 365e86fd35f..c48cb184383 100644
--- a/gcc/ipa-icf.h
+++ b/gcc/ipa-icf.h
@@ -181,6 +181,9 @@ public:
/* References independent hash function. */
virtual hashval_t get_hash (void) = 0;
+ /* Set new hash value of the item. */
+ void set_hash (hashval_t hash);
+
/* Merges instance with an ALIAS_ITEM, where alias, thunk or redirection can
be applied. */
virtual bool merge (sem_item *alias_item) = 0;
@@ -234,9 +237,6 @@ public:
/* A set with symbol table references. */
hash_set <symtab_node *> refs_set;
- /* Hash of item. */
- hashval_t hash;
-
/* Temporary hash used where hash values of references are added. */
hashval_t global_hash;
protected:
@@ -270,6 +270,9 @@ protected:
&ignored_nodes,
symtab_node *n1, symtab_node *n2,
bool address);
+protected:
+ /* Hash of item. */
+ hashval_t m_hash;
private:
/* Initialize internal data structures. Bitmap STACK is used for
diff --git a/gcc/ira.c b/gcc/ira.c
index e16d062e35a..97edf8c4816 100644
--- a/gcc/ira.c
+++ b/gcc/ira.c
@@ -2259,9 +2259,12 @@ ira_setup_eliminable_regset (void)
frame_pointer_needed
= (! flag_omit_frame_pointer
|| (cfun->calls_alloca && EXIT_IGNORE_STACK)
- /* We need the frame pointer to catch stack overflow exceptions
- if the stack pointer is moving. */
- || (flag_stack_check && STACK_CHECK_MOVING_SP)
+ /* We need the frame pointer to catch stack overflow exceptions if
+ the stack pointer is moving (as for the alloca case just above). */
+ || (STACK_CHECK_MOVING_SP
+ && flag_stack_check
+ && flag_exceptions
+ && cfun->can_throw_non_call_exceptions)
|| crtl->accesses_prior_frames
|| (SUPPORTS_STACK_ALIGNMENT && crtl->stack_realign_needed)
/* We need a frame pointer for all Cilk Plus functions that use
diff --git a/gcc/java/ChangeLog b/gcc/java/ChangeLog
index 15cd23c4ddb..4d9aacc5cc7 100644
--- a/gcc/java/ChangeLog
+++ b/gcc/java/ChangeLog
@@ -1,3 +1,26 @@
+2015-11-11 Andrew MacLeod <amacleod@redhat.com>
+
+ * boehm.c: Remove unused header files.
+ * builtins.c: Likewise.
+ * class.c: Likewise.
+ * constants.c: Likewise.
+ * decl.c: Likewise.
+ * except.c: Likewise.
+ * expr.c: Likewise.
+ * java-gimplify.c: Likewise.
+ * jcf-dump.c: Likewise.
+ * jcf-io.c: Likewise.
+ * jcf-parse.c: Likewise.
+ * jvgenmain.c: Likewise.
+ * lang.c: Likewise.
+ * mangle.c: Likewise.
+ * mangle_name.c: Likewise.
+ * resource.c: Likewise.
+ * typeck.c: Likewise.
+ * verify-glue.c: Likewise.
+ * verify-impl.c: Likewise.
+ * zextract.c: Likewise.
+
2015-10-30 Richard Sandiford <richard.sandiford@arm.com>
* jcf-parse.c (get_constant): Use real_from_target rather than
diff --git a/gcc/java/boehm.c b/gcc/java/boehm.c
index fbe99d9a7c3..7c508b79682 100644
--- a/gcc/java/boehm.c
+++ b/gcc/java/boehm.c
@@ -28,8 +28,6 @@ The Free Software Foundation is independent of Sun Microsystems, Inc. */
#include "coretypes.h"
#include "tm.h"
#include "tree.h"
-#include "diagnostic-core.h"
-#include "alias.h"
#include "java-tree.h"
#include "parse.h"
diff --git a/gcc/java/builtins.c b/gcc/java/builtins.c
index 7f6d74573a8..2a71766376c 100644
--- a/gcc/java/builtins.c
+++ b/gcc/java/builtins.c
@@ -30,28 +30,17 @@ The Free Software Foundation is independent of Sun Microsystems, Inc. */
#include "system.h"
#include "coretypes.h"
#include "tm.h"
-#include "function.h"
#include "rtl.h"
#include "tree.h"
#include "stringpool.h"
#include "expmed.h"
#include "optabs.h"
-#include "emit-rtl.h"
-#include "alias.h"
#include "fold-const.h"
#include "stor-layout.h"
-#include "flags.h"
-#include "langhooks.h"
#include "java-tree.h"
/* FIXME: All these headers are necessary for sync_compare_and_swap.
Front ends should never have to look at that. */
-#include "dojump.h"
-#include "explow.h"
-#include "calls.h"
-#include "varasm.h"
-#include "stmt.h"
-#include "expr.h"
static tree max_builtin (tree, tree);
static tree min_builtin (tree, tree);
diff --git a/gcc/java/class.c b/gcc/java/class.c
index 8ecc1d902de..cfff618fc69 100644
--- a/gcc/java/class.c
+++ b/gcc/java/class.c
@@ -28,16 +28,12 @@ The Free Software Foundation is independent of Sun Microsystems, Inc. */
#include "coretypes.h"
#include "target.h"
#include "function.h"
-#include "obstack.h"
#include "tree.h"
#include "stringpool.h"
-#include "cgraph.h"
#include "diagnostic-core.h"
-#include "alias.h"
#include "fold-const.h"
#include "stor-layout.h"
#include "varasm.h"
-#include "flags.h"
#include "java-tree.h"
#include "jcf.h"
#include "toplev.h"
diff --git a/gcc/java/constants.c b/gcc/java/constants.c
index 3e9962351f1..6abc0b6aa14 100644
--- a/gcc/java/constants.c
+++ b/gcc/java/constants.c
@@ -26,9 +26,7 @@ The Free Software Foundation is independent of Sun Microsystems, Inc. */
#include "tm.h"
#include "tree.h"
#include "stringpool.h"
-#include "diagnostic-core.h"
#include "jcf.h"
-#include "alias.h"
#include "fold-const.h"
#include "stor-layout.h"
#include "java-tree.h"
diff --git a/gcc/java/decl.c b/gcc/java/decl.c
index 43675a97936..328d2137aaf 100644
--- a/gcc/java/decl.c
+++ b/gcc/java/decl.c
@@ -33,15 +33,12 @@ The Free Software Foundation is independent of Sun Microsystems, Inc. */
#include "stringpool.h"
#include "cgraph.h"
#include "diagnostic-core.h"
-#include "alias.h"
#include "stor-layout.h"
#include "varasm.h"
#include "toplev.h"
-#include "flags.h"
#include "java-tree.h"
#include "jcf.h"
#include "java-except.h"
-#include "tree-inline.h"
#include "version.h"
#include "tree-iterator.h"
#include "langhooks.h"
diff --git a/gcc/java/except.c b/gcc/java/except.c
index 03457f66e21..fa0721728cf 100644
--- a/gcc/java/except.c
+++ b/gcc/java/except.c
@@ -28,13 +28,9 @@ The Free Software Foundation is independent of Sun Microsystems, Inc. */
#include "tree.h"
#include "stringpool.h"
#include "diagnostic-core.h"
-#include "alias.h"
#include "fold-const.h"
#include "stor-layout.h"
#include "java-tree.h"
-#include "javaop.h"
-#include "java-opcodes.h"
-#include "jcf.h"
#include "java-except.h"
#include "toplev.h"
#include "tree-iterator.h"
diff --git a/gcc/java/expr.c b/gcc/java/expr.c
index e1eadd2d267..31fdd729f13 100644
--- a/gcc/java/expr.c
+++ b/gcc/java/expr.c
@@ -30,15 +30,11 @@ The Free Software Foundation is independent of Sun Microsystems, Inc. */
#include "tree.h"
#include "stringpool.h"
#include "diagnostic-core.h"
-#include "alias.h"
#include "fold-const.h"
#include "stor-layout.h"
-#include "flags.h"
#include "java-tree.h"
-#include "javaop.h"
#include "java-opcodes.h"
#include "jcf.h"
-#include "java-except.h"
#include "parse.h"
#include "tree-iterator.h"
diff --git a/gcc/java/java-gimplify.c b/gcc/java/java-gimplify.c
index 2e64e8f6f3d..b18f25c2d02 100644
--- a/gcc/java/java-gimplify.c
+++ b/gcc/java/java-gimplify.c
@@ -24,18 +24,12 @@ The Free Software Foundation is independent of Sun Microsystems, Inc. */
#include "config.h"
#include "system.h"
#include "coretypes.h"
-#include "tm.h"
#include "function.h"
#include "basic-block.h"
-#include "hard-reg-set.h"
#include "tree.h"
#include "gimple.h"
-#include "cfghooks.h"
-#include "alias.h"
-#include "fold-const.h"
#include "java-tree.h"
#include "dumpfile.h"
-#include "internal-fn.h"
#include "gimplify.h"
static tree java_gimplify_block (tree);
diff --git a/gcc/java/jcf-dump.c b/gcc/java/jcf-dump.c
index fec3a404413..8a4c37fbe89 100644
--- a/gcc/java/jcf-dump.c
+++ b/gcc/java/jcf-dump.c
@@ -50,13 +50,11 @@ The Free Software Foundation is independent of Sun Microsystems, Inc. */
#include "config.h"
#include "system.h"
#include "coretypes.h"
-#include "options.h"
#include "tree.h"
#include "diagnostic.h"
#include "intl.h"
#include "jcf.h"
-#include "alias.h"
#include "java-tree.h"
#include "version.h"
diff --git a/gcc/java/jcf-io.c b/gcc/java/jcf-io.c
index 642ca738a9d..c957d3ece73 100644
--- a/gcc/java/jcf-io.c
+++ b/gcc/java/jcf-io.c
@@ -26,12 +26,8 @@ The Free Software Foundation is independent of Sun Microsystems, Inc. */
#include "config.h"
#include "system.h"
#include "coretypes.h"
-#include "options.h"
-#include "tree.h"
#include "jcf.h"
-#include "alias.h"
-#include "java-tree.h"
#include <dirent.h>
#include "zlib.h"
diff --git a/gcc/java/jcf-parse.c b/gcc/java/jcf-parse.c
index 792fdbff199..0018ffa523c 100644
--- a/gcc/java/jcf-parse.c
+++ b/gcc/java/jcf-parse.c
@@ -28,18 +28,13 @@ The Free Software Foundation is independent of Sun Microsystems, Inc. */
#include "coretypes.h"
#include "target.h"
#include "function.h"
-#include "obstack.h"
#include "bitmap.h"
#include "tree.h"
#include "stringpool.h"
#include "cgraph.h"
#include "diagnostic-core.h"
-#include "alias.h"
-#include "flags.h"
-#include "java-except.h"
#include "javaop.h"
#include "java-tree.h"
-#include "parse.h"
#include "debug.h"
#include "toplev.h"
diff --git a/gcc/java/jvgenmain.c b/gcc/java/jvgenmain.c
index aa103778270..9b42d31dab7 100644
--- a/gcc/java/jvgenmain.c
+++ b/gcc/java/jvgenmain.c
@@ -26,12 +26,8 @@ The Free Software Foundation is independent of Sun Microsystems, Inc. */
#include "config.h"
#include "system.h"
#include "coretypes.h"
-#include "options.h"
-#include "obstack.h"
#include "tree.h"
#include "diagnostic.h"
-#include "jcf.h"
-#include "alias.h"
#include "java-tree.h"
#include "intl.h"
diff --git a/gcc/java/lang.c b/gcc/java/lang.c
index 94b2dcf7907..40a36fd43e7 100644
--- a/gcc/java/lang.c
+++ b/gcc/java/lang.c
@@ -29,14 +29,10 @@ The Free Software Foundation is independent of Sun Microsystems, Inc. */
#include "target.h"
#include "tree.h"
#include "diagnostic.h"
-#include "alias.h"
#include "java-tree.h"
#include "jcf.h"
#include "langhooks.h"
#include "langhooks-def.h"
-#include "flags.h"
-#include "tree-inline.h"
-#include "splay-tree.h"
#include "tree-dump.h"
#include "opts.h"
#include "context.h"
diff --git a/gcc/java/mangle.c b/gcc/java/mangle.c
index c69bcd872c1..f0265b66a52 100644
--- a/gcc/java/mangle.c
+++ b/gcc/java/mangle.c
@@ -27,13 +27,9 @@ The Free Software Foundation is independent of Sun Microsystems, Inc. */
#include "config.h"
#include "system.h"
#include "coretypes.h"
-#include "options.h"
-#include "obstack.h"
#include "tree.h"
#include "stringpool.h"
-#include "diagnostic-core.h"
#include "jcf.h"
-#include "alias.h"
#include "java-tree.h"
#include "langhooks-def.h"
diff --git a/gcc/java/mangle_name.c b/gcc/java/mangle_name.c
index 47e3b523a68..0d3a0a4cab8 100644
--- a/gcc/java/mangle_name.c
+++ b/gcc/java/mangle_name.c
@@ -27,13 +27,9 @@ The Free Software Foundation is independent of Sun Microsystems, Inc. */
#include "config.h"
#include "system.h"
#include "coretypes.h"
-#include "options.h"
#include "obstack.h"
-#include "tree.h"
#include "diagnostic-core.h"
#include "jcf.h"
-#include "alias.h"
-#include "java-tree.h"
static void append_unicode_mangled_name (const char *, int);
#ifndef HAVE_AS_UTF8
diff --git a/gcc/java/resource.c b/gcc/java/resource.c
index 922dfe7d315..7a7ea0c0dd6 100644
--- a/gcc/java/resource.c
+++ b/gcc/java/resource.c
@@ -25,19 +25,13 @@ The Free Software Foundation is independent of Sun Microsystems, Inc. */
#include "system.h"
#include "coretypes.h"
#include "tm.h"
-#include "function.h"
-#include "hard-reg-set.h"
#include "tree.h"
#include "stringpool.h"
#include "cgraph.h"
-#include "diagnostic-core.h"
-#include "alias.h"
#include "fold-const.h"
#include "stor-layout.h"
#include "java-tree.h"
-#include "jcf.h"
#include "toplev.h"
-#include "parse.h"
#include "tree-iterator.h"
/* A list of all the resources files. */
diff --git a/gcc/java/typeck.c b/gcc/java/typeck.c
index 1cdd070c99a..e9a5d6b9d3c 100644
--- a/gcc/java/typeck.c
+++ b/gcc/java/typeck.c
@@ -27,16 +27,12 @@ The Free Software Foundation is independent of Sun Microsystems, Inc. */
#include "system.h"
#include "coretypes.h"
#include "options.h"
-#include "obstack.h"
#include "tree.h"
#include "stringpool.h"
#include "diagnostic-core.h"
-#include "alias.h"
#include "fold-const.h"
#include "stor-layout.h"
-#include "flags.h"
#include "java-tree.h"
-#include "jcf.h"
#include "convert.h"
static tree convert_ieee_real_to_integer (tree, tree);
diff --git a/gcc/java/verify-glue.c b/gcc/java/verify-glue.c
index 508383d5fff..86645006d3e 100644
--- a/gcc/java/verify-glue.c
+++ b/gcc/java/verify-glue.c
@@ -28,10 +28,8 @@ The Free Software Foundation is independent of Sun Microsystems, Inc. */
#include "system.h"
#include "coretypes.h"
#include "options.h"
-#include "tree.h"
#include "stringpool.h"
#include "diagnostic-core.h"
-#include "alias.h"
#include "parse.h"
#include "verify.h"
diff --git a/gcc/java/verify-impl.c b/gcc/java/verify-impl.c
index 4969318691d..8484e6bcbc2 100644
--- a/gcc/java/verify-impl.c
+++ b/gcc/java/verify-impl.c
@@ -14,11 +14,8 @@ details. */
#include "config.h"
#include "system.h"
#include "coretypes.h"
-#include "options.h"
-#include "symtab.h"
#include "verify.h"
-#include "alias.h"
/* Hack to work around namespace pollution from java-tree.h. */
#undef current_class
diff --git a/gcc/java/zextract.c b/gcc/java/zextract.c
index 398b91bce8d..fca43373a62 100644
--- a/gcc/java/zextract.c
+++ b/gcc/java/zextract.c
@@ -28,7 +28,6 @@ The Free Software Foundation is independent of Sun Microsystems, Inc. */
#include "config.h"
#include "system.h"
#include "coretypes.h"
-#include "tm.h"
#include "zipfile.h"
/* This stuff is partly based on the 28 August 1994 public release of the
diff --git a/gcc/jit/ChangeLog b/gcc/jit/ChangeLog
index 5da80441c5c..67ad6e14dfa 100644
--- a/gcc/jit/ChangeLog
+++ b/gcc/jit/ChangeLog
@@ -1,3 +1,12 @@
+2015-11-11 Andrew MacLeod <amacleod@redhat.com>
+
+ * dummy-frontend.c: Remove unused header files.
+ * jit-builtins.c: Likewise.
+ * jit-playback.c: Likewise.
+ * jit-recording.c: Likewise.
+ * jit-spec.c: Likewise.
+ * libgccjit.c: Likewise.
+
2015-11-07 Richard Sandiford <richard.sandiford@arm.com>
* jit-builtins.c: Don't undef DEF_BUILTIN.
diff --git a/gcc/jit/dummy-frontend.c b/gcc/jit/dummy-frontend.c
index d8f3d5e4304..643827a79af 100644
--- a/gcc/jit/dummy-frontend.c
+++ b/gcc/jit/dummy-frontend.c
@@ -20,22 +20,12 @@ along with GCC; see the file COPYING3. If not see
#include "config.h"
#include "system.h"
#include "coretypes.h"
-#include "tm.h"
-#include "function.h"
-#include "hard-reg-set.h"
-#include "tree.h"
#include "jit-playback.h"
-#include "cgraph.h"
-#include "opts.h"
-#include "alias.h"
#include "stor-layout.h"
#include "debug.h"
#include "langhooks.h"
#include "langhooks-def.h"
-#include "dumpfile.h"
-#include "jit-common.h"
-#include "jit-logging.h"
#include <mpfr.h>
diff --git a/gcc/jit/jit-builtins.c b/gcc/jit/jit-builtins.c
index 63ff5affb55..3538de4328e 100644
--- a/gcc/jit/jit-builtins.c
+++ b/gcc/jit/jit-builtins.c
@@ -21,12 +21,10 @@ along with GCC; see the file COPYING3. If not see
#include "system.h"
#include "coretypes.h"
#include "target.h"
-#include "jit-common.h"
#include "jit-playback.h"
#include "stringpool.h"
#include "jit-builtins.h"
-#include "jit-recording.h"
namespace gcc {
diff --git a/gcc/jit/jit-playback.c b/gcc/jit/jit-playback.c
index 8af62f90950..6efe8bc3645 100644
--- a/gcc/jit/jit-playback.c
+++ b/gcc/jit/jit-playback.c
@@ -22,13 +22,9 @@ along with GCC; see the file COPYING3. If not see
#include "system.h"
#include "coretypes.h"
#include "target.h"
-#include "function.h"
#include "tree.h"
-#include "timevar.h"
#include "stringpool.h"
#include "cgraph.h"
-#include "opts.h"
-#include "alias.h"
#include "dumpfile.h"
#include "toplev.h"
#include "tree-cfg.h"
@@ -40,11 +36,8 @@ along with GCC; see the file COPYING3. If not see
#include "attribs.h"
#include "context.h"
#include "fold-const.h"
-#include "debug.h"
#include "gcc.h"
-#include "jit-common.h"
-#include "jit-logging.h"
#include "jit-playback.h"
#include "jit-result.h"
#include "jit-builtins.h"
diff --git a/gcc/jit/jit-recording.c b/gcc/jit/jit-recording.c
index afe59c36aee..2b3affc3f62 100644
--- a/gcc/jit/jit-recording.c
+++ b/gcc/jit/jit-recording.c
@@ -22,15 +22,12 @@ along with GCC; see the file COPYING3. If not see
#include "system.h"
#include "coretypes.h"
#include "tm.h"
-#include "jit-common.h"
-#include "timevar.h"
#include "pretty-print.h"
#include "toplev.h"
#include <pthread.h>
#include "jit-builtins.h"
-#include "jit-logging.h"
#include "jit-recording.h"
#include "jit-playback.h"
diff --git a/gcc/jit/jit-spec.c b/gcc/jit/jit-spec.c
index fa7e9d4f895..76c623afb17 100644
--- a/gcc/jit/jit-spec.c
+++ b/gcc/jit/jit-spec.c
@@ -20,9 +20,6 @@ along with GCC; see the file COPYING3. If not see
#include "config.h"
#include "system.h"
#include "coretypes.h"
-#include "tm.h"
-#include "gcc.h"
-#include "opts.h"
/* Filter command line before processing by the gcc driver proper. */
void
diff --git a/gcc/jit/libgccjit.c b/gcc/jit/libgccjit.c
index 1e74e66afbe..d46364110c7 100644
--- a/gcc/jit/libgccjit.c
+++ b/gcc/jit/libgccjit.c
@@ -21,13 +21,10 @@ along with GCC; see the file COPYING3. If not see
#include "config.h"
#include "system.h"
#include "coretypes.h"
-#include "jit-common.h"
#include "timevar.h"
-#include "opts.h"
#include "typed-splay-tree.h"
#include "libgccjit.h"
-#include "jit-logging.h"
#include "jit-recording.h"
#include "jit-result.h"
diff --git a/gcc/lra-lives.c b/gcc/lra-lives.c
index 9453759a521..5f76a87de97 100644
--- a/gcc/lra-lives.c
+++ b/gcc/lra-lives.c
@@ -1241,8 +1241,8 @@ lra_create_live_ranges_1 (bool all_p, bool dead_insn_p)
unused_set = sparseset_alloc (max_regno);
curr_point = 0;
unsigned new_length = get_max_uid () * 2;
- if (point_freq_vec.length () < new_length)
- point_freq_vec.safe_grow (new_length);
+ point_freq_vec.truncate (0);
+ point_freq_vec.reserve_exact (new_length);
lra_point_freq = point_freq_vec.address ();
int *post_order_rev_cfg = XNEWVEC (int, last_basic_block_for_fn (cfun));
int n_blocks_inverted = inverted_post_order_compute (post_order_rev_cfg);
diff --git a/gcc/lto-wrapper.c b/gcc/lto-wrapper.c
index 20e67eddf1b..b9ac5356e02 100644
--- a/gcc/lto-wrapper.c
+++ b/gcc/lto-wrapper.c
@@ -1355,7 +1355,7 @@ main (int argc, char *argv[])
{
const char *p;
- gcc_obstack_init (&opts_obstack);
+ init_opts_obstack ();
p = argv[0] + strlen (argv[0]);
while (p != argv[0] && !IS_DIR_SEPARATOR (p[-1]))
diff --git a/gcc/lto/ChangeLog b/gcc/lto/ChangeLog
index d254bee4685..c97c85db402 100644
--- a/gcc/lto/ChangeLog
+++ b/gcc/lto/ChangeLog
@@ -1,3 +1,11 @@
+2015-11-11 Andrew MacLeod <amacleod@redhat.com>
+
+ * lto-lang.c: Remove unused header files.
+ * lto-object.c: Likewise.
+ * lto-partition.c: Likewise.
+ * lto-symtab.c: Likewise.
+ * lto.c: Likewise.
+
2015-11-08 Eric Botcazou <ebotcazou@adacore.com>
* lto.c (compare_tree_sccs_1): Deal with TYPE_REVERSE_STORAGE_ORDER.
diff --git a/gcc/lto/lto-lang.c b/gcc/lto/lto-lang.c
index 4805c2a69b1..53dd8f6df55 100644
--- a/gcc/lto/lto-lang.c
+++ b/gcc/lto/lto-lang.c
@@ -26,21 +26,14 @@ along with GCC; see the file COPYING3. If not see
#include "basic-block.h"
#include "tree.h"
#include "gimple.h"
-#include "predict.h"
#include "stringpool.h"
-#include "cgraph.h"
#include "diagnostic-core.h"
-#include "alias.h"
-#include "fold-const.h"
#include "stor-layout.h"
#include "langhooks.h"
#include "langhooks-def.h"
#include "debug.h"
#include "lto-tree.h"
#include "lto.h"
-#include "tree-inline.h"
-#include "internal-fn.h"
-#include "toplev.h"
#include "cilk.h"
static tree lto_type_for_size (unsigned, int);
diff --git a/gcc/lto/lto-object.c b/gcc/lto/lto-object.c
index 923ed517814..ae89e51e993 100644
--- a/gcc/lto/lto-object.c
+++ b/gcc/lto/lto-object.c
@@ -22,17 +22,7 @@ along with GCC; see the file COPYING3. If not see
#include "system.h"
#include "coretypes.h"
#include "tm.h"
-#include "function.h"
-#include "basic-block.h"
-#include "hard-reg-set.h"
-#include "tree.h"
-#include "gimple.h"
-#include "predict.h"
-#include "cgraph.h"
#include "diagnostic-core.h"
-#include "alias.h"
-#include "fold-const.h"
-#include "internal-fn.h"
#include "lto.h"
#include "lto-section-names.h"
#include "simple-object.h"
diff --git a/gcc/lto/lto-partition.c b/gcc/lto/lto-partition.c
index 03ed72b4181..4fd445f6950 100644
--- a/gcc/lto/lto-partition.c
+++ b/gcc/lto/lto-partition.c
@@ -25,21 +25,14 @@ along with GCC; see the file COPYING3. If not see
#include "basic-block.h"
#include "tree.h"
#include "gimple.h"
-#include "predict.h"
#include "alloc-pool.h"
-#include "timevar.h"
#include "stringpool.h"
#include "cgraph.h"
#include "lto-streamer.h"
-#include "toplev.h"
-#include "alias.h"
-#include "fold-const.h"
-#include "internal-fn.h"
#include "params.h"
#include "symbol-summary.h"
#include "ipa-prop.h"
#include "ipa-inline.h"
-#include "ipa-utils.h"
#include "lto-partition.h"
vec<ltrans_partition> ltrans_partitions;
diff --git a/gcc/lto/lto-symtab.c b/gcc/lto/lto-symtab.c
index e77639f0c6b..7f12760c08d 100644
--- a/gcc/lto/lto-symtab.c
+++ b/gcc/lto/lto-symtab.c
@@ -26,20 +26,10 @@ along with GCC; see the file COPYING3. If not see
#include "basic-block.h"
#include "tree.h"
#include "gimple.h"
-#include "predict.h"
-#include "alloc-pool.h"
#include "cgraph.h"
#include "lto-streamer.h"
-#include "diagnostic-core.h"
-#include "alias.h"
-#include "fold-const.h"
-#include "internal-fn.h"
#include "ipa-utils.h"
-#include "symbol-summary.h"
-#include "ipa-prop.h"
-#include "ipa-inline.h"
#include "builtins.h"
-#include "print-tree.h"
/* Replace the cgraph node NODE with PREVAILING_NODE in the cgraph, merging
all edges and removing the old node. */
diff --git a/gcc/lto/lto.c b/gcc/lto/lto.c
index 5dcc4dcd851..36138e854d1 100644
--- a/gcc/lto/lto.c
+++ b/gcc/lto/lto.c
@@ -25,29 +25,21 @@ along with GCC; see the file COPYING3. If not see
#include "function.h"
#include "bitmap.h"
#include "basic-block.h"
-#include "hard-reg-set.h"
#include "tree.h"
#include "gimple.h"
#include "cfghooks.h"
#include "alloc-pool.h"
#include "tree-pass.h"
-#include "tree-ssa-operands.h"
#include "tree-streamer.h"
#include "cgraph.h"
-#include "diagnostic-core.h"
#include "opts.h"
#include "toplev.h"
-#include "alias.h"
-#include "fold-const.h"
#include "stor-layout.h"
-#include "langhooks.h"
#include "symbol-summary.h"
#include "ipa-prop.h"
#include "common.h"
#include "debug.h"
-#include "internal-fn.h"
#include "lto.h"
-#include "lto-tree.h"
#include "lto-section-names.h"
#include "splay-tree.h"
#include "lto-partition.h"
diff --git a/gcc/match.pd b/gcc/match.pd
index f6c5c07b681..d552bebdafe 100644
--- a/gcc/match.pd
+++ b/gcc/match.pd
@@ -247,6 +247,28 @@ DEFINE_INT_AND_FLOAT_ROUND_FN (RINT)
(if (!HONOR_SNANS (type))
(negate @0)))
+(if (flag_reciprocal_math)
+ /* Convert (A/B)/C to A/(B*C) */
+ (simplify
+ (rdiv (rdiv:s @0 @1) @2)
+ (rdiv @0 (mult @1 @2)))
+
+ /* Convert A/(B/C) to (A/B)*C */
+ (simplify
+ (rdiv @0 (rdiv:s @1 @2))
+ (mult (rdiv @0 @1) @2)))
+
+/* Optimize (X & (-A)) / A where A is a power of 2, to X >> log2(A) */
+(for div (trunc_div ceil_div floor_div round_div exact_div)
+ (simplify
+ (div (convert? (bit_and @0 INTEGER_CST@1)) INTEGER_CST@2)
+ (if (integer_pow2p (@2)
+ && tree_int_cst_sgn (@2) > 0
+ && wi::add (@2, @1) == 0
+ && tree_nop_conversion_p (type, TREE_TYPE (@0)))
+ (rshift (convert @0) { build_int_cst (integer_type_node,
+ wi::exact_log2 (@2)); }))))
+
/* If ARG1 is a constant, we can convert this to a multiply by the
reciprocal. This does not have the same rounding properties,
so only do this if -freciprocal-math. We can actually
@@ -464,6 +486,15 @@ DEFINE_INT_AND_FLOAT_ROUND_FN (RINT)
(if (tem)
(rdiv { tem; } @1)))))
+/* Convert C1/(X*C2) into (C1/C2)/X */
+(simplify
+ (rdiv REAL_CST@0 (mult @1 REAL_CST@2))
+ (if (flag_reciprocal_math)
+ (with
+ { tree tem = const_binop (RDIV_EXPR, type, @0, @2); }
+ (if (tem)
+ (rdiv { tem; } @1)))))
+
/* Simplify ~X & X as zero. */
(simplify
(bit_and:c (convert? @0) (convert? (bit_not @0)))
diff --git a/gcc/objc/ChangeLog b/gcc/objc/ChangeLog
index 57b5db48bcb..a1e76fec390 100644
--- a/gcc/objc/ChangeLog
+++ b/gcc/objc/ChangeLog
@@ -1,3 +1,14 @@
+2015-11-11 Andrew MacLeod <amacleod@redhat.com>
+
+ * objc-act.c: Remove unused header files.
+ * objc-encoding.c: Likewise.
+ * objc-gnu-runtime-abi-01.c: Likewise.
+ * objc-lang.c: Likewise.
+ * objc-map.c: Likewise.
+ * objc-next-runtime-abi-01.c: Likewise.
+ * objc-next-runtime-abi-02.c: Likewise.
+ * objc-runtime-shared-support.c: Likewise.
+
2015-11-09 Alan Modra <amodra@gmail.com>
* objc-encoding.c (encode_aggregate_within): Cast obstack_next_free
diff --git a/gcc/objc/objc-act.c b/gcc/objc/objc-act.c
index a1e32fc2795..e09093c15eb 100644
--- a/gcc/objc/objc-act.c
+++ b/gcc/objc/objc-act.c
@@ -22,10 +22,7 @@ along with GCC; see the file COPYING3. If not see
#include "system.h"
#include "coretypes.h"
#include "tm.h"
-#include "alias.h"
#include "tree.h"
-#include "options.h"
-#include "fold-const.h"
#include "stringpool.h"
#include "stor-layout.h"
#include "attribs.h"
@@ -37,31 +34,23 @@ along with GCC; see the file COPYING3. If not see
#include "c/c-lang.h"
#endif
-#include "c-family/c-common.h"
#include "c-family/c-objc.h"
-#include "c-family/c-pragma.h"
-#include "c-family/c-format.h"
-#include "flags.h"
#include "langhooks.h"
#include "objc-act.h"
#include "objc-map.h"
-#include "hard-reg-set.h"
#include "function.h"
#include "toplev.h"
#include "debug.h"
#include "c-family/c-target.h"
-#include "diagnostic-core.h"
#include "intl.h"
#include "cgraph.h"
#include "tree-iterator.h"
-#include "langhooks-def.h"
/* Different initialization, code gen and meta data generation for each
runtime. */
#include "objc-runtime-hooks.h"
/* Routines used mainly by the runtimes. */
#include "objc-runtime-shared-support.h"
/* For default_tree_printer (). */
-#include "tree-pretty-print.h"
/* For enum gimplify_status */
#include "gimple-expr.h"
diff --git a/gcc/objc/objc-encoding.c b/gcc/objc/objc-encoding.c
index 9c577e93bae..ea32f4cf1c7 100644
--- a/gcc/objc/objc-encoding.c
+++ b/gcc/objc/objc-encoding.c
@@ -20,7 +20,6 @@ along with GCC; see the file COPYING3. If not see
#include "config.h"
#include "system.h"
#include "coretypes.h"
-#include "alias.h"
#include "tree.h"
#include "options.h"
#include "stringpool.h"
@@ -33,7 +32,6 @@ along with GCC; see the file COPYING3. If not see
#include "c/c-lang.h"
#endif
-#include "c-family/c-common.h"
#include "c-family/c-objc.h"
#include "objc-encoding.h"
@@ -43,7 +41,6 @@ along with GCC; see the file COPYING3. If not see
#include "objc-runtime-shared-support.h"
/* For BITS_PER_UNIT. */
-#include "tm.h"
/* When building Objective-C++, we are not linking against the C front-end
and so need to replicate the C tree-construction functions in some way. */
@@ -53,7 +50,6 @@ along with GCC; see the file COPYING3. If not see
#endif /* OBJCPLUS */
/* Set up for use of obstacks. */
-#include "obstack.h"
/* This obstack is used to accumulate the encoding of a data type. */
static struct obstack util_obstack;
diff --git a/gcc/objc/objc-gnu-runtime-abi-01.c b/gcc/objc/objc-gnu-runtime-abi-01.c
index d91db2b2e03..40862defe70 100644
--- a/gcc/objc/objc-gnu-runtime-abi-01.c
+++ b/gcc/objc/objc-gnu-runtime-abi-01.c
@@ -21,10 +21,7 @@ along with GCC; see the file COPYING3. If not see
#include "config.h"
#include "system.h"
#include "coretypes.h"
-#include "alias.h"
-#include "tree.h"
#include "options.h"
-#include "fold-const.h"
#include "stringpool.h"
#ifdef OBJCPLUS
diff --git a/gcc/objc/objc-lang.c b/gcc/objc/objc-lang.c
index c2c57d1f116..1595e5c5c68 100644
--- a/gcc/objc/objc-lang.c
+++ b/gcc/objc/objc-lang.c
@@ -22,16 +22,12 @@ along with GCC; see the file COPYING3. If not see
#include "config.h"
#include "system.h"
#include "coretypes.h"
-#include "tm.h"
-#include "tree.h"
-#include "c-family/c-common.h"
#include "c/c-tree.h"
#include "c-family/c-objc.h"
#include "objc-act.h"
#include "langhooks.h"
#include "langhooks-def.h"
#include "c/c-objc-common.h"
-#include "c/c-lang.h"
enum c_language_kind c_language = clk_objc;
diff --git a/gcc/objc/objc-map.c b/gcc/objc/objc-map.c
index 0915a5ab592..bda0f099049 100644
--- a/gcc/objc/objc-map.c
+++ b/gcc/objc/objc-map.c
@@ -20,9 +20,7 @@ Boston, MA 02110-1301, USA. */
#include "config.h"
#include "system.h"
#include "coretypes.h"
-#include "options.h"
#include "tree.h"
-#include "alias.h"
#include "objc-map.h"
#define OUT_OF_MEMORY { fprintf (stderr, "Out of memory\n"); abort (); }
diff --git a/gcc/objc/objc-next-runtime-abi-01.c b/gcc/objc/objc-next-runtime-abi-01.c
index 337771f6a6c..e4bcbf94653 100644
--- a/gcc/objc/objc-next-runtime-abi-01.c
+++ b/gcc/objc/objc-next-runtime-abi-01.c
@@ -26,10 +26,6 @@ along with GCC; see the file COPYING3. If not see
#include "config.h"
#include "system.h"
#include "coretypes.h"
-#include "alias.h"
-#include "tree.h"
-#include "options.h"
-#include "fold-const.h"
#include "stringpool.h"
#ifdef OBJCPLUS
diff --git a/gcc/objc/objc-next-runtime-abi-02.c b/gcc/objc/objc-next-runtime-abi-02.c
index 73b591e830c..2ac0a9851ea 100644
--- a/gcc/objc/objc-next-runtime-abi-02.c
+++ b/gcc/objc/objc-next-runtime-abi-02.c
@@ -28,11 +28,6 @@ along with GCC; see the file COPYING3. If not see
#include "config.h"
#include "system.h"
#include "coretypes.h"
-#include "tm.h"
-#include "alias.h"
-#include "tree.h"
-#include "options.h"
-#include "fold-const.h"
#include "stringpool.h"
#ifdef OBJCPLUS
diff --git a/gcc/objc/objc-runtime-shared-support.c b/gcc/objc/objc-runtime-shared-support.c
index 56013b15ab3..1242d34509b 100644
--- a/gcc/objc/objc-runtime-shared-support.c
+++ b/gcc/objc/objc-runtime-shared-support.c
@@ -22,9 +22,6 @@ along with GCC; see the file COPYING3. If not see
#include "system.h"
#include "coretypes.h"
#include "tm.h"
-#include "alias.h"
-#include "tree.h"
-#include "options.h"
#include "stringpool.h"
#ifdef OBJCPLUS
@@ -33,7 +30,6 @@ along with GCC; see the file COPYING3. If not see
#include "c/c-tree.h"
#include "c/c-lang.h"
#endif
-#include "langhooks.h"
#include "c-family/c-objc.h"
#include "objc-act.h"
diff --git a/gcc/objcp/ChangeLog b/gcc/objcp/ChangeLog
index 5be68550054..7bec6306872 100644
--- a/gcc/objcp/ChangeLog
+++ b/gcc/objcp/ChangeLog
@@ -1,3 +1,12 @@
+2015-11-13 Jason Merrill <jason@redhat.com>
+
+ * config-lang.in (gtfiles): Add cp-gimplify.c.
+
+2015-11-11 Andrew MacLeod <amacleod@redhat.com>
+
+ * objcp-decl.c: Remove unused header files.
+ * objcp-lang.c: Likewise.
+
2015-10-29 Andrew MacLeod <amacleod@redhat.com>
* objcp-decl.c: Reorder #include's and remove duplicates.
diff --git a/gcc/objcp/objcp-decl.c b/gcc/objcp/objcp-decl.c
index ab757fafbd8..05e815c32b0 100644
--- a/gcc/objcp/objcp-decl.c
+++ b/gcc/objcp/objcp-decl.c
@@ -22,13 +22,9 @@ along with GCC; see the file COPYING3. If not see
#include "config.h"
#include "system.h"
#include "coretypes.h"
-#include "tm.h"
-#include "tree.h"
#include "cp-tree.h"
-#include "alias.h"
#include "c-family/c-objc.h"
-#include "objc-act.h"
#include "objcp-decl.h"
/* Hacks to simulate start_struct() and finish_struct(). */
diff --git a/gcc/objcp/objcp-lang.c b/gcc/objcp/objcp-lang.c
index a04bea7b567..4c3d660a248 100644
--- a/gcc/objcp/objcp-lang.c
+++ b/gcc/objcp/objcp-lang.c
@@ -21,10 +21,7 @@ along with GCC; see the file COPYING3. If not see
#include "config.h"
#include "system.h"
#include "coretypes.h"
-#include "target.h"
-#include "tree.h"
#include "cp-tree.h"
-#include "c-family/c-common.h"
#include "c-family/c-objc.h"
#include "objc-act.h"
#include "langhooks.h"
diff --git a/gcc/omp-builtins.def b/gcc/omp-builtins.def
index 0b6bd58e1b3..d540dab7969 100644
--- a/gcc/omp-builtins.def
+++ b/gcc/omp-builtins.def
@@ -353,3 +353,5 @@ DEF_GOMP_BUILTIN (BUILT_IN_GOMP_TARGET_ENTER_EXIT_DATA,
BT_FN_VOID_INT_SIZE_PTR_PTR_PTR_UINT_PTR, ATTR_NOTHROW_LIST)
DEF_GOMP_BUILTIN (BUILT_IN_GOMP_TEAMS, "GOMP_teams",
BT_FN_VOID_UINT_UINT, ATTR_NOTHROW_LIST)
+DEF_GOACC_BUILTIN (BUILT_IN_GOACC_DECLARE, "GOACC_declare",
+ BT_FN_VOID_INT_SIZE_PTR_PTR_PTR, ATTR_NOTHROW_LIST)
diff --git a/gcc/omp-low.c b/gcc/omp-low.c
index 2a552da1e5b..4b2b4777221 100644
--- a/gcc/omp-low.c
+++ b/gcc/omp-low.c
@@ -1896,12 +1896,6 @@ scan_sharing_clauses (tree clauses, omp_context *ctx)
/* FALLTHRU */
case OMP_CLAUSE_FIRSTPRIVATE:
- if (is_gimple_omp_oacc (ctx->stmt))
- {
- sorry ("clause not supported yet");
- break;
- }
- /* FALLTHRU */
case OMP_CLAUSE_LINEAR:
decl = OMP_CLAUSE_DECL (c);
do_private:
@@ -2130,6 +2124,9 @@ scan_sharing_clauses (tree clauses, omp_context *ctx)
case OMP_CLAUSE_WORKER:
case OMP_CLAUSE_VECTOR:
case OMP_CLAUSE_TILE:
+ case OMP_CLAUSE_INDEPENDENT:
+ case OMP_CLAUSE_AUTO:
+ case OMP_CLAUSE_SEQ:
break;
case OMP_CLAUSE_ALIGNED:
@@ -2142,9 +2139,6 @@ scan_sharing_clauses (tree clauses, omp_context *ctx)
case OMP_CLAUSE_DEVICE_RESIDENT:
case OMP_CLAUSE_USE_DEVICE:
case OMP_CLAUSE__CACHE_:
- case OMP_CLAUSE_INDEPENDENT:
- case OMP_CLAUSE_AUTO:
- case OMP_CLAUSE_SEQ:
sorry ("Clause not supported yet");
break;
@@ -2167,12 +2161,6 @@ scan_sharing_clauses (tree clauses, omp_context *ctx)
/* FALLTHRU */
case OMP_CLAUSE_FIRSTPRIVATE:
- if (is_gimple_omp_oacc (ctx->stmt))
- {
- sorry ("clause not supported yet");
- break;
- }
- /* FALLTHRU */
case OMP_CLAUSE_PRIVATE:
case OMP_CLAUSE_LINEAR:
case OMP_CLAUSE_IS_DEVICE_PTR:
@@ -2311,14 +2299,14 @@ scan_sharing_clauses (tree clauses, omp_context *ctx)
case OMP_CLAUSE_WORKER:
case OMP_CLAUSE_VECTOR:
case OMP_CLAUSE_TILE:
+ case OMP_CLAUSE_INDEPENDENT:
+ case OMP_CLAUSE_AUTO:
+ case OMP_CLAUSE_SEQ:
break;
case OMP_CLAUSE_DEVICE_RESIDENT:
case OMP_CLAUSE_USE_DEVICE:
case OMP_CLAUSE__CACHE_:
- case OMP_CLAUSE_INDEPENDENT:
- case OMP_CLAUSE_AUTO:
- case OMP_CLAUSE_SEQ:
sorry ("Clause not supported yet");
break;
@@ -4684,7 +4672,7 @@ lower_rec_input_clauses (tree clauses, gimple_seq *ilist, gimple_seq *dlist,
gimplify_assign (ptr, x, ilist);
}
}
- else if (is_reference (var))
+ else if (is_reference (var) && !is_oacc_parallel (ctx))
{
/* For references that are being privatized for Fortran,
allocate new backing storage for the new pointer
@@ -12466,6 +12454,7 @@ expand_omp_target (struct omp_region *region)
case GF_OMP_TARGET_KIND_OACC_KERNELS:
case GF_OMP_TARGET_KIND_OACC_UPDATE:
case GF_OMP_TARGET_KIND_OACC_ENTER_EXIT_DATA:
+ case GF_OMP_TARGET_KIND_OACC_DECLARE:
data_region = false;
break;
case GF_OMP_TARGET_KIND_DATA:
@@ -12709,6 +12698,9 @@ expand_omp_target (struct omp_region *region)
case GF_OMP_TARGET_KIND_OACC_ENTER_EXIT_DATA:
start_ix = BUILT_IN_GOACC_ENTER_EXIT_DATA;
break;
+ case GF_OMP_TARGET_KIND_OACC_DECLARE:
+ start_ix = BUILT_IN_GOACC_DECLARE;
+ break;
default:
gcc_unreachable ();
}
@@ -12831,6 +12823,7 @@ expand_omp_target (struct omp_region *region)
switch (start_ix)
{
case BUILT_IN_GOACC_DATA_START:
+ case BUILT_IN_GOACC_DECLARE:
case BUILT_IN_GOMP_TARGET_DATA:
break;
case BUILT_IN_GOMP_TARGET:
@@ -13145,6 +13138,7 @@ build_omp_regions_1 (basic_block bb, struct omp_region *parent,
case GF_OMP_TARGET_KIND_EXIT_DATA:
case GF_OMP_TARGET_KIND_OACC_UPDATE:
case GF_OMP_TARGET_KIND_OACC_ENTER_EXIT_DATA:
+ case GF_OMP_TARGET_KIND_OACC_DECLARE:
/* ..., other than for those stand-alone directives... */
region = NULL;
break;
@@ -14911,7 +14905,7 @@ lower_omp_target (gimple_stmt_iterator *gsi_p, omp_context *ctx)
tree child_fn, t, c;
gomp_target *stmt = as_a <gomp_target *> (gsi_stmt (*gsi_p));
gbind *tgt_bind, *bind, *dep_bind = NULL;
- gimple_seq tgt_body, olist, ilist, new_body;
+ gimple_seq tgt_body, olist, ilist, fplist, new_body;
location_t loc = gimple_location (stmt);
bool offloaded, data_region;
unsigned int map_cnt = 0;
@@ -14928,6 +14922,7 @@ lower_omp_target (gimple_stmt_iterator *gsi_p, omp_context *ctx)
case GF_OMP_TARGET_KIND_OACC_KERNELS:
case GF_OMP_TARGET_KIND_OACC_UPDATE:
case GF_OMP_TARGET_KIND_OACC_ENTER_EXIT_DATA:
+ case GF_OMP_TARGET_KIND_OACC_DECLARE:
data_region = false;
break;
case GF_OMP_TARGET_KIND_DATA:
@@ -14963,6 +14958,7 @@ lower_omp_target (gimple_stmt_iterator *gsi_p, omp_context *ctx)
child_fn = ctx->cb.dst_fn;
push_gimplify_context ();
+ fplist = NULL;
for (c = clauses; c ; c = OMP_CLAUSE_CHAIN (c))
switch (OMP_CLAUSE_CODE (c))
@@ -14998,6 +14994,8 @@ lower_omp_target (gimple_stmt_iterator *gsi_p, omp_context *ctx)
case GOMP_MAP_FORCE_TOFROM:
case GOMP_MAP_FORCE_PRESENT:
case GOMP_MAP_FORCE_DEVICEPTR:
+ case GOMP_MAP_DEVICE_RESIDENT:
+ case GOMP_MAP_LINK:
gcc_assert (is_gimple_omp_oacc (stmt));
break;
default:
@@ -15007,6 +15005,7 @@ lower_omp_target (gimple_stmt_iterator *gsi_p, omp_context *ctx)
/* FALLTHRU */
case OMP_CLAUSE_TO:
case OMP_CLAUSE_FROM:
+ oacc_firstprivate:
var = OMP_CLAUSE_DECL (c);
if (!DECL_P (var))
{
@@ -15029,6 +15028,7 @@ lower_omp_target (gimple_stmt_iterator *gsi_p, omp_context *ctx)
}
if (offloaded
+ && OMP_CLAUSE_CODE (c) == OMP_CLAUSE_MAP
&& (OMP_CLAUSE_MAP_KIND (c) == GOMP_MAP_FIRSTPRIVATE_POINTER
|| OMP_CLAUSE_MAP_KIND (c) == GOMP_MAP_FIRSTPRIVATE_REFERENCE))
{
@@ -15057,17 +15057,40 @@ lower_omp_target (gimple_stmt_iterator *gsi_p, omp_context *ctx)
x = build_receiver_ref (var, true, ctx);
tree new_var = lookup_decl (var, ctx);
- if (OMP_CLAUSE_MAP_KIND (c) == GOMP_MAP_POINTER
+ if (OMP_CLAUSE_CODE (c) == OMP_CLAUSE_MAP
+ && OMP_CLAUSE_MAP_KIND (c) == GOMP_MAP_POINTER
&& !OMP_CLAUSE_MAP_ZERO_BIAS_ARRAY_SECTION (c)
&& TREE_CODE (TREE_TYPE (var)) == ARRAY_TYPE)
x = build_simple_mem_ref (x);
- SET_DECL_VALUE_EXPR (new_var, x);
- DECL_HAS_VALUE_EXPR_P (new_var) = 1;
+ if (OMP_CLAUSE_CODE (c) == OMP_CLAUSE_FIRSTPRIVATE)
+ {
+ gcc_assert (is_gimple_omp_oacc (ctx->stmt));
+ if (is_reference (new_var))
+ {
+ /* Create a local object to hold the instance
+ value. */
+ tree type = TREE_TYPE (TREE_TYPE (new_var));
+ const char *id = IDENTIFIER_POINTER (DECL_NAME (new_var));
+ tree inst = create_tmp_var (type, id);
+ gimplify_assign (inst, fold_indirect_ref (x), &fplist);
+ x = build_fold_addr_expr (inst);
+ }
+ gimplify_assign (new_var, x, &fplist);
+ }
+ else if (DECL_P (new_var))
+ {
+ SET_DECL_VALUE_EXPR (new_var, x);
+ DECL_HAS_VALUE_EXPR_P (new_var) = 1;
+ }
+ else
+ gcc_unreachable ();
}
map_cnt++;
break;
case OMP_CLAUSE_FIRSTPRIVATE:
+ if (is_oacc_parallel (ctx))
+ goto oacc_firstprivate;
map_cnt++;
var = OMP_CLAUSE_DECL (c);
if (!is_reference (var)
@@ -15092,6 +15115,8 @@ lower_omp_target (gimple_stmt_iterator *gsi_p, omp_context *ctx)
break;
case OMP_CLAUSE_PRIVATE:
+ if (is_gimple_omp_oacc (ctx->stmt))
+ break;
var = OMP_CLAUSE_DECL (c);
if (is_variable_sized (var))
{
@@ -15195,9 +15220,11 @@ lower_omp_target (gimple_stmt_iterator *gsi_p, omp_context *ctx)
default:
break;
+
case OMP_CLAUSE_MAP:
case OMP_CLAUSE_TO:
case OMP_CLAUSE_FROM:
+ oacc_firstprivate_map:
nc = c;
ovar = OMP_CLAUSE_DECL (c);
if (OMP_CLAUSE_CODE (c) == OMP_CLAUSE_MAP
@@ -15248,9 +15275,9 @@ lower_omp_target (gimple_stmt_iterator *gsi_p, omp_context *ctx)
x = build_sender_ref (ovar, ctx);
if (OMP_CLAUSE_CODE (c) == OMP_CLAUSE_MAP
- && OMP_CLAUSE_MAP_KIND (c) == GOMP_MAP_POINTER
- && !OMP_CLAUSE_MAP_ZERO_BIAS_ARRAY_SECTION (c)
- && TREE_CODE (TREE_TYPE (ovar)) == ARRAY_TYPE)
+ && OMP_CLAUSE_MAP_KIND (c) == GOMP_MAP_POINTER
+ && !OMP_CLAUSE_MAP_ZERO_BIAS_ARRAY_SECTION (c)
+ && TREE_CODE (TREE_TYPE (ovar)) == ARRAY_TYPE)
{
gcc_assert (offloaded);
tree avar
@@ -15261,6 +15288,15 @@ lower_omp_target (gimple_stmt_iterator *gsi_p, omp_context *ctx)
avar = build_fold_addr_expr (avar);
gimplify_assign (x, avar, &ilist);
}
+ else if (OMP_CLAUSE_CODE (c) == OMP_CLAUSE_FIRSTPRIVATE)
+ {
+ gcc_assert (is_gimple_omp_oacc (ctx->stmt));
+ if (!is_reference (var))
+ var = build_fold_addr_expr (var);
+ else
+ talign = TYPE_ALIGN_UNIT (TREE_TYPE (TREE_TYPE (ovar)));
+ gimplify_assign (x, var, &ilist);
+ }
else if (is_gimple_reg (var))
{
gcc_assert (offloaded);
@@ -15289,7 +15325,17 @@ lower_omp_target (gimple_stmt_iterator *gsi_p, omp_context *ctx)
gimplify_assign (x, var, &ilist);
}
}
- s = OMP_CLAUSE_SIZE (c);
+ s = NULL_TREE;
+ if (OMP_CLAUSE_CODE (c) == OMP_CLAUSE_FIRSTPRIVATE)
+ {
+ gcc_checking_assert (is_gimple_omp_oacc (ctx->stmt));
+ s = TREE_TYPE (ovar);
+ if (TREE_CODE (s) == REFERENCE_TYPE)
+ s = TREE_TYPE (s);
+ s = TYPE_SIZE_UNIT (s);
+ }
+ else
+ s = OMP_CLAUSE_SIZE (c);
if (s == NULL_TREE)
s = TYPE_SIZE_UNIT (TREE_TYPE (ovar));
s = fold_convert (size_type_node, s);
@@ -15330,6 +15376,11 @@ lower_omp_target (gimple_stmt_iterator *gsi_p, omp_context *ctx)
tkind_zero = tkind;
}
break;
+ case OMP_CLAUSE_FIRSTPRIVATE:
+ gcc_checking_assert (is_gimple_omp_oacc (ctx->stmt));
+ tkind = GOMP_MAP_TO;
+ tkind_zero = tkind;
+ break;
case OMP_CLAUSE_TO:
tkind = GOMP_MAP_TO;
tkind_zero = tkind;
@@ -15369,6 +15420,8 @@ lower_omp_target (gimple_stmt_iterator *gsi_p, omp_context *ctx)
break;
case OMP_CLAUSE_FIRSTPRIVATE:
+ if (is_oacc_parallel (ctx))
+ goto oacc_firstprivate_map;
ovar = OMP_CLAUSE_DECL (c);
if (is_reference (ovar))
talign = TYPE_ALIGN_UNIT (TREE_TYPE (TREE_TYPE (ovar)));
@@ -15543,6 +15596,7 @@ lower_omp_target (gimple_stmt_iterator *gsi_p, omp_context *ctx)
gimple_seq_add_stmt (&new_body,
gimple_build_assign (ctx->receiver_decl, t));
}
+ gimple_seq_add_seq (&new_body, fplist);
if (offloaded || data_region)
{
@@ -15554,6 +15608,8 @@ lower_omp_target (gimple_stmt_iterator *gsi_p, omp_context *ctx)
default:
break;
case OMP_CLAUSE_FIRSTPRIVATE:
+ if (is_gimple_omp_oacc (ctx->stmt))
+ break;
var = OMP_CLAUSE_DECL (c);
if (is_reference (var)
|| is_gimple_reg_type (TREE_TYPE (var)))
@@ -15639,6 +15695,8 @@ lower_omp_target (gimple_stmt_iterator *gsi_p, omp_context *ctx)
}
break;
case OMP_CLAUSE_PRIVATE:
+ if (is_gimple_omp_oacc (ctx->stmt))
+ break;
var = OMP_CLAUSE_DECL (c);
if (is_reference (var))
{
@@ -15727,7 +15785,7 @@ lower_omp_target (gimple_stmt_iterator *gsi_p, omp_context *ctx)
/* Handle GOMP_MAP_FIRSTPRIVATE_{POINTER,REFERENCE} in second pass,
so that firstprivate vars holding OMP_CLAUSE_SIZE if needed
are already handled. */
- for (c = clauses; c ; c = OMP_CLAUSE_CHAIN (c))
+ for (c = clauses; c; c = OMP_CLAUSE_CHAIN (c))
switch (OMP_CLAUSE_CODE (c))
{
tree var;
@@ -16664,6 +16722,7 @@ make_gimple_omp_edges (basic_block bb, struct omp_region **region,
case GF_OMP_TARGET_KIND_EXIT_DATA:
case GF_OMP_TARGET_KIND_OACC_UPDATE:
case GF_OMP_TARGET_KIND_OACC_ENTER_EXIT_DATA:
+ case GF_OMP_TARGET_KIND_OACC_DECLARE:
cur_region = cur_region->outer;
break;
default:
@@ -19171,10 +19230,10 @@ oacc_loop_process (oacc_loop *loop)
/* Walk the OpenACC loop heirarchy checking and assigning the
programmer-specified partitionings. OUTER_MASK is the partitioning
- this loop is contained within. Return partitiong mask used within
- this loop nest. */
+ this loop is contained within. Return true if we contain an
+ auto-partitionable loop. */
-static unsigned
+static bool
oacc_loop_fixed_partitions (oacc_loop *loop, unsigned outer_mask)
{
unsigned this_mask = loop->mask;
@@ -19278,18 +19337,63 @@ oacc_loop_fixed_partitions (oacc_loop *loop, unsigned outer_mask)
return has_auto;
}
+/* Walk the OpenACC loop heirarchy to assign auto-partitioned loops.
+ OUTER_MASK is the partitioning this loop is contained within.
+ Return the cumulative partitioning used by this loop, siblings and
+ children. */
+
+static unsigned
+oacc_loop_auto_partitions (oacc_loop *loop, unsigned outer_mask)
+{
+ unsigned inner_mask = 0;
+ bool noisy = true;
+
+#ifdef ACCEL_COMPILER
+ /* When device_type is supported, we want the device compiler to be
+ noisy, if the loop parameters are device_type-specific. */
+ noisy = false;
+#endif
+
+ if (loop->child)
+ inner_mask |= oacc_loop_auto_partitions (loop->child,
+ outer_mask | loop->mask);
+
+ if ((loop->flags & OLF_AUTO) && (loop->flags & OLF_INDEPENDENT))
+ {
+ unsigned this_mask = 0;
+
+ /* Determine the outermost partitioning used within this loop. */
+ this_mask = inner_mask | GOMP_DIM_MASK (GOMP_DIM_MAX);
+ this_mask = (this_mask & -this_mask);
+
+ /* Pick the partitioning just inside that one. */
+ this_mask >>= 1;
+
+ /* And avoid picking one use by an outer loop. */
+ this_mask &= ~outer_mask;
+
+ if (!this_mask && noisy)
+ warning_at (loop->loc, 0,
+ "insufficient partitioning available to parallelize loop");
+
+ loop->mask = this_mask;
+ }
+ inner_mask |= loop->mask;
+
+ if (loop->sibling)
+ inner_mask |= oacc_loop_auto_partitions (loop->sibling, outer_mask);
+
+ return inner_mask;
+}
+
/* Walk the OpenACC loop heirarchy to check and assign partitioning
axes. */
static void
-oacc_loop_partition (oacc_loop *loop, int fn_level)
+oacc_loop_partition (oacc_loop *loop, unsigned outer_mask)
{
- unsigned outer_mask = 0;
-
- if (fn_level >= 0)
- outer_mask = GOMP_DIM_MASK (fn_level) - 1;
-
- oacc_loop_fixed_partitions (loop, outer_mask);
+ if (oacc_loop_fixed_partitions (loop, outer_mask))
+ oacc_loop_auto_partitions (loop, outer_mask);
}
/* Default fork/join early expander. Delete the function calls if
@@ -19370,7 +19474,8 @@ execute_oacc_device_lower ()
/* Discover, partition and process the loops. */
oacc_loop *loops = oacc_loop_discovery ();
- oacc_loop_partition (loops, fn_level);
+ unsigned outer_mask = fn_level >= 0 ? GOMP_DIM_MASK (fn_level) - 1 : 0;
+ oacc_loop_partition (loops, outer_mask);
oacc_loop_process (loops);
if (dump_file)
{
diff --git a/gcc/opts.c b/gcc/opts.c
index 9a3fbb3c5d0..be04cf56412 100644
--- a/gcc/opts.c
+++ b/gcc/opts.c
@@ -266,6 +266,20 @@ add_comma_separated_to_vector (void **pvec, const char *arg)
*pvec = v;
}
+/* Initialize opts_obstack if not initialized. */
+
+void
+init_opts_obstack (void)
+{
+ static bool opts_obstack_initialized = false;
+
+ if (!opts_obstack_initialized)
+ {
+ opts_obstack_initialized = true;
+ gcc_obstack_init (&opts_obstack);
+ }
+}
+
/* Initialize OPTS and OPTS_SET before using them in parsing options. */
void
@@ -273,7 +287,7 @@ init_options_struct (struct gcc_options *opts, struct gcc_options *opts_set)
{
size_t num_params = get_num_compiler_params ();
- gcc_obstack_init (&opts_obstack);
+ init_opts_obstack ();
*opts = global_options_init;
@@ -509,6 +523,7 @@ static const struct default_options default_options_table[] =
{ OPT_LEVELS_2_PLUS, OPT_fisolate_erroneous_paths_dereference, NULL, 1 },
{ OPT_LEVELS_2_PLUS, OPT_fipa_ra, NULL, 1 },
{ OPT_LEVELS_2_PLUS, OPT_flra_remat, NULL, 1 },
+ { OPT_LEVELS_2_PLUS, OPT_fsplit_paths, NULL, 1 },
/* -O3 optimizations. */
{ OPT_LEVELS_3_PLUS, OPT_ftree_loop_distribute_patterns, NULL, 1 },
diff --git a/gcc/opts.h b/gcc/opts.h
index 38b38370fb5..2eb2d9735c6 100644
--- a/gcc/opts.h
+++ b/gcc/opts.h
@@ -323,6 +323,7 @@ extern void decode_cmdline_options_to_array (unsigned int argc,
extern void init_options_once (void);
extern void init_options_struct (struct gcc_options *opts,
struct gcc_options *opts_set);
+extern void init_opts_obstack (void);
extern void finalize_options_struct (struct gcc_options *opts);
extern void decode_cmdline_options_to_array_default_mask (unsigned int argc,
const char **argv,
diff --git a/gcc/params.def b/gcc/params.def
index c5d96e7e38b..41fd8a84da5 100644
--- a/gcc/params.def
+++ b/gcc/params.def
@@ -218,7 +218,7 @@ DEFPARAM(PARAM_STACK_FRAME_GROWTH,
DEFPARAM(PARAM_MAX_GCSE_MEMORY,
"max-gcse-memory",
"The maximum amount of memory to be allocated by GCSE.",
- 50 * 1024 * 1024, 0, 0)
+ 128 * 1024 * 1024, 0, 0)
/* The GCSE optimization of an expression will avoided if the ratio of
insertions to deletions is greater than this value. */
diff --git a/gcc/passes.c b/gcc/passes.c
index 7a10cb6334c..dd8d00ad36a 100644
--- a/gcc/passes.c
+++ b/gcc/passes.c
@@ -2058,6 +2058,18 @@ verify_curr_properties (function *fn, void *data)
gcc_assert ((fn->curr_properties & props) == props);
}
+/* Release dump file name if set. */
+
+static void
+release_dump_file_name (void)
+{
+ if (dump_file_name)
+ {
+ free (CONST_CAST (char *, dump_file_name));
+ dump_file_name = NULL;
+ }
+}
+
/* Initialize pass dump file. */
/* This is non-static so that the plugins can use it. */
@@ -2071,6 +2083,7 @@ pass_init_dump_file (opt_pass *pass)
gcc::dump_manager *dumps = g->get_dumps ();
bool initializing_dump =
!dumps->dump_initialized_p (pass->static_pass_number);
+ release_dump_file_name ();
dump_file_name = dumps->get_dump_file_name (pass->static_pass_number);
dumps->dump_start (pass->static_pass_number, &dump_flags);
if (dump_file && current_function_decl)
@@ -2098,11 +2111,7 @@ pass_fini_dump_file (opt_pass *pass)
timevar_push (TV_DUMP);
/* Flush and close dump file. */
- if (dump_file_name)
- {
- free (CONST_CAST (char *, dump_file_name));
- dump_file_name = NULL;
- }
+ release_dump_file_name ();
g->get_dumps ()->dump_finish (pass->static_pass_number);
timevar_pop (TV_DUMP);
diff --git a/gcc/passes.def b/gcc/passes.def
index c0ab6b98e4b..db822d33597 100644
--- a/gcc/passes.def
+++ b/gcc/passes.def
@@ -274,6 +274,7 @@ along with GCC; see the file COPYING3. If not see
POP_INSERT_PASSES ()
NEXT_PASS (pass_simduid_cleanup);
NEXT_PASS (pass_lower_vector_ssa);
+ NEXT_PASS (pass_split_paths);
NEXT_PASS (pass_cse_reciprocals);
NEXT_PASS (pass_reassoc);
NEXT_PASS (pass_strength_reduction);
diff --git a/gcc/print-tree.c b/gcc/print-tree.c
index 1b584b87ea0..cb0f1fd38f4 100644
--- a/gcc/print-tree.c
+++ b/gcc/print-tree.c
@@ -938,6 +938,27 @@ print_node (FILE *file, const char *prefix, tree node, int indent)
expanded_location xloc = expand_location (EXPR_LOCATION (node));
indent_to (file, indent+4);
fprintf (file, "%s:%d:%d", xloc.file, xloc.line, xloc.column);
+
+ /* Print the range, if any */
+ source_range r = EXPR_LOCATION_RANGE (node);
+ if (r.m_start)
+ {
+ xloc = expand_location (r.m_start);
+ fprintf (file, " start: %s:%d:%d", xloc.file, xloc.line, xloc.column);
+ }
+ else
+ {
+ fprintf (file, " start: unknown");
+ }
+ if (r.m_finish)
+ {
+ xloc = expand_location (r.m_finish);
+ fprintf (file, " finish: %s:%d:%d", xloc.file, xloc.line, xloc.column);
+ }
+ else
+ {
+ fprintf (file, " finish: unknown");
+ }
}
fprintf (file, ">");
diff --git a/gcc/regrename.c b/gcc/regrename.c
index d727dd9095b..d41410a9348 100644
--- a/gcc/regrename.c
+++ b/gcc/regrename.c
@@ -1068,7 +1068,9 @@ scan_rtx_reg (rtx_insn *insn, rtx *loc, enum reg_class cl, enum scan_actions act
&& GET_CODE (pat) == SET
&& GET_CODE (SET_DEST (pat)) == REG
&& GET_CODE (SET_SRC (pat)) == REG
- && terminated_this_insn)
+ && terminated_this_insn
+ && terminated_this_insn->nregs
+ == REG_NREGS (recog_data.operand[1]))
{
gcc_assert (terminated_this_insn->regno
== REGNO (recog_data.operand[1]));
@@ -1593,6 +1595,7 @@ build_def_use (basic_block bb)
enum rtx_code set_code = SET;
enum rtx_code clobber_code = CLOBBER;
insn_rr_info *insn_info = NULL;
+ terminated_this_insn = NULL;
/* Process the insn, determining its effect on the def-use
chains and live hard registers. We perform the following
@@ -1749,8 +1752,6 @@ build_def_use (basic_block bb)
scan_rtx (insn, &XEXP (note, 0), ALL_REGS, mark_read,
OP_INOUT);
- terminated_this_insn = NULL;
-
/* Step 4: Close chains for registers that die here, unless
the register is mentioned in a REG_UNUSED note. In that
case we keep the chain open until step #7 below to ensure
diff --git a/gcc/rtl-error.c b/gcc/rtl-error.c
index 96da2bd275d..088bb8a8962 100644
--- a/gcc/rtl-error.c
+++ b/gcc/rtl-error.c
@@ -67,7 +67,7 @@ diagnostic_for_asm (const rtx_insn *insn, const char *msg, va_list *args_ptr,
diagnostic_t kind)
{
diagnostic_info diagnostic;
- rich_location richloc (location_for_asm (insn));
+ rich_location richloc (line_table, location_for_asm (insn));
diagnostic_set_info (&diagnostic, msg, args_ptr,
&richloc, kind);
diff --git a/gcc/sese.c b/gcc/sese.c
index 644c87cf39f..5aa558b88ac 100644
--- a/gcc/sese.c
+++ b/gcc/sese.c
@@ -25,6 +25,7 @@ along with GCC; see the file COPYING3. If not see
#include "backend.h"
#include "tree.h"
#include "gimple.h"
+#include "cfganal.h"
#include "cfghooks.h"
#include "tree-pass.h"
#include "ssa.h"
@@ -34,6 +35,7 @@ along with GCC; see the file COPYING3. If not see
#include "tree-eh.h"
#include "gimplify.h"
#include "gimple-iterator.h"
+#include "gimple-pretty-print.h"
#include "gimplify-me.h"
#include "tree-cfg.h"
#include "tree-ssa-loop.h"
@@ -44,33 +46,6 @@ along with GCC; see the file COPYING3. If not see
#include "value-prof.h"
#include "sese.h"
#include "tree-ssa-propagate.h"
-#include "tree-hash-traits.h"
-
-/* Helper function for debug_rename_map. */
-
-bool
-debug_rename_map_1 (tree_node *const &old_name, tree_node *const &expr,
- void *)
-{
- fprintf (stderr, "(");
- print_generic_expr (stderr, old_name, 0);
- fprintf (stderr, ", ");
- print_generic_expr (stderr, expr, 0);
- fprintf (stderr, ")\n");
- return true;
-}
-
-typedef hash_map<tree_ssa_name_hash, tree> rename_map_type;
-
-
-/* Print to stderr all the elements of RENAME_MAP. */
-
-DEBUG_FUNCTION void
-debug_rename_map (rename_map_type *rename_map)
-{
- rename_map->traverse <void *, debug_rename_map_1> (NULL);
-}
-
/* Record LOOP as occurring in REGION. */
@@ -80,8 +55,8 @@ sese_record_loop (sese_info_p region, loop_p loop)
if (sese_contains_loop (region, loop))
return;
- bitmap_set_bit (SESE_LOOPS (region), loop->num);
- SESE_LOOP_NEST (region).safe_push (loop);
+ bitmap_set_bit (region->loops, loop->num);
+ region->loop_nest.safe_push (loop);
}
/* Build the loop nests contained in REGION. Returns true when the
@@ -108,16 +83,16 @@ build_sese_loop_nests (sese_info_p region)
/* Make sure that the loops in the SESE_LOOP_NEST are ordered. It
can be the case that an inner loop is inserted before an outer
loop. To avoid this, semi-sort once. */
- FOR_EACH_VEC_ELT (SESE_LOOP_NEST (region), i, loop0)
+ FOR_EACH_VEC_ELT (region->loop_nest, i, loop0)
{
- if (SESE_LOOP_NEST (region).length () == i + 1)
+ if (region->loop_nest.length () == i + 1)
break;
- loop1 = SESE_LOOP_NEST (region)[i + 1];
+ loop1 = region->loop_nest[i + 1];
if (loop0->num > loop1->num)
{
- SESE_LOOP_NEST (region)[i] = loop1;
- SESE_LOOP_NEST (region)[i + 1] = loop0;
+ region->loop_nest[i] = loop1;
+ region->loop_nest[i + 1] = loop0;
}
}
}
@@ -256,10 +231,13 @@ new_sese_info (edge entry, edge exit)
region->region.entry = entry;
region->region.exit = exit;
- SESE_LOOPS (region) = BITMAP_ALLOC (NULL);
- SESE_LOOP_NEST (region).create (3);
- SESE_PARAMS (region).create (3);
+ region->loops = BITMAP_ALLOC (NULL);
+ region->loop_nest.create (3);
+ region->params.create (3);
+ region->rename_map = new rename_map_t;
+ region->copied_bb_map = new bb_map_t;
region->bbs.create (3);
+ region->incomplete_phis.create (3);
return region;
}
@@ -269,11 +247,28 @@ new_sese_info (edge entry, edge exit)
void
free_sese_info (sese_info_p region)
{
- if (SESE_LOOPS (region))
- SESE_LOOPS (region) = BITMAP_ALLOC (NULL);
+ if (region->loops)
+ region->loops = BITMAP_ALLOC (NULL);
- SESE_PARAMS (region).release ();
- SESE_LOOP_NEST (region).release ();
+ region->params.release ();
+ region->loop_nest.release ();
+
+ for (rename_map_t::iterator it = region->rename_map->begin ();
+ it != region->rename_map->begin (); ++it)
+ (*it).second.release ();
+
+ for (bb_map_t::iterator it = region->copied_bb_map->begin ();
+ it != region->copied_bb_map->begin (); ++it)
+ (*it).second.release ();
+
+ delete region->rename_map;
+ delete region->copied_bb_map;
+
+ region->rename_map = NULL;
+ region->copied_bb_map = NULL;
+
+ region->bbs.release ();
+ region->incomplete_phis.release ();
XDELETE (region);
}
@@ -312,8 +307,11 @@ sese_insert_phis_for_liveouts (sese_info_p region, basic_block bb,
update_ssa (TODO_update_ssa);
sese_build_liveouts (region, liveouts);
+
EXECUTE_IF_SET_IN_BITMAP (liveouts, 0, i, bi)
- sese_add_exit_phis_edge (bb, ssa_name (i), false_e, true_e);
+ if (!virtual_operand_p (ssa_name (i)))
+ sese_add_exit_phis_edge (bb, ssa_name (i), false_e, true_e);
+
BITMAP_FREE (liveouts);
update_ssa (TODO_update_ssa);
@@ -351,37 +349,550 @@ get_false_edge_from_guard_bb (basic_block bb)
return NULL;
}
-/* Returns the expression associated to OLD_NAME in RENAME_MAP. */
+/* Check if USE is defined in a basic block from where the definition of USE can
+ propagate from all the paths. */
+
+static bool
+is_loop_closed_ssa_use (basic_block bb, tree use)
+{
+ if (TREE_CODE (use) != SSA_NAME)
+ return true;
+
+ /* We should not have a rename for virtual operands. */
+ gcc_assert (!virtual_operand_p (use));
+
+ /* For close-phi nodes def always comes from a loop which has a back-edge. */
+ if (bb_contains_loop_close_phi_nodes (bb))
+ return true;
+
+ gimple *def = SSA_NAME_DEF_STMT (use);
+ basic_block def_bb = gimple_bb (def);
+ return (!def_bb
+ || flow_bb_inside_loop_p (def_bb->loop_father, bb));
+}
+
+/* Return the number of phi nodes in BB. */
+
+static int
+number_of_phi_nodes (basic_block bb)
+{
+ int num_phis = 0;
+ for (gphi_iterator psi = gsi_start_phis (bb); !gsi_end_p (psi);
+ gsi_next (&psi))
+ num_phis++;
+ return num_phis;
+}
+
+/* Return true when BB contains loop close phi nodes. */
+
+bool
+bb_contains_loop_close_phi_nodes (basic_block bb)
+{
+ return single_pred_p (bb)
+ && bb->loop_father != single_pred_edge (bb)->src->loop_father;
+}
+
+/* Return true when BB contains loop phi nodes. */
+
+bool
+bb_contains_loop_phi_nodes (basic_block bb)
+{
+ gcc_assert (EDGE_COUNT (bb->preds) <= 2);
+
+ if (bb->preds->length () == 1)
+ return false;
+
+ unsigned depth = loop_depth (bb->loop_father);
+
+ edge preds[2] = { (*bb->preds)[0], (*bb->preds)[1] };
+
+ if (depth > loop_depth (preds[0]->src->loop_father)
+ || depth > loop_depth (preds[1]->src->loop_father))
+ return true;
+
+ /* When one of the edges correspond to the same loop father and other
+ doesn't. */
+ if (bb->loop_father != preds[0]->src->loop_father
+ && bb->loop_father == preds[1]->src->loop_father)
+ return true;
+
+ if (bb->loop_father != preds[1]->src->loop_father
+ && bb->loop_father == preds[0]->src->loop_father)
+ return true;
+
+ return false;
+}
+
+/* Returns true if BB uses name in one of its PHIs. */
+
+static bool
+phi_uses_name (basic_block bb, tree name)
+{
+ for (gphi_iterator psi = gsi_start_phis (bb); !gsi_end_p (psi);
+ gsi_next (&psi))
+ {
+ gphi *phi = psi.phi ();
+ for (unsigned i = 0; i < gimple_phi_num_args (phi); i++)
+ {
+ tree use_arg = gimple_phi_arg_def (phi, i);
+ if (use_arg == name)
+ return true;
+ }
+ }
+ return false;
+}
+
+/* Return true if RENAME (defined in BB) is a valid use in NEW_BB. The
+definition should flow into use, and the use should respect the loop-closed SSA
+form. */
+
+static bool
+is_valid_rename (tree rename, basic_block def_bb,
+ basic_block use_bb, bool loop_phi,
+ tree old_name, basic_block old_bb)
+{
+ /* The def of the rename must either dominate the uses or come from a
+ back-edge. Also the def must respect the loop closed ssa form. */
+ if (!is_loop_closed_ssa_use (use_bb, rename))
+ {
+ if (dump_file)
+ {
+ fprintf (dump_file, "\n[codegen] rename not in loop closed ssa:");
+ print_generic_expr (dump_file, rename, 0);
+ }
+ return false;
+ }
+
+ if (dominated_by_p (CDI_DOMINATORS, use_bb, def_bb))
+ return true;
+
+ if (bb_contains_loop_phi_nodes (use_bb) && loop_phi)
+ {
+ /* The loop-header dominates the loop-body. */
+ if (!dominated_by_p (CDI_DOMINATORS, def_bb, use_bb))
+ return false;
+
+ /* RENAME would be used in loop-phi. */
+ gcc_assert (number_of_phi_nodes (use_bb));
+
+ /* For definitions coming from back edges, we should check that
+ old_name is used in a loop PHI node. */
+ if (phi_uses_name (old_bb, old_name))
+ return true;
+ }
+ return false;
+}
+
+/* Returns the expression associated to OLD_NAME (which is used in OLD_BB), in
+ NEW_BB from RENAME_MAP. LOOP_PHI is true when we want to rename OLD_NAME
+ within a loop PHI instruction. */
static tree
-get_rename (rename_map_type *rename_map, tree old_name)
+get_rename (rename_map_t *rename_map, basic_block new_bb, tree old_name,
+ basic_block old_bb, bool loop_phi)
{
gcc_assert (TREE_CODE (old_name) == SSA_NAME);
- tree *expr = rename_map->get (old_name);
- if (expr)
- return *expr;
+ vec <tree> *renames = rename_map->get (old_name);
- return NULL_TREE;
+ if (!renames || renames->is_empty ())
+ return NULL_TREE;
+
+ if (1 == renames->length ())
+ {
+ tree rename = (*renames)[0];
+ basic_block bb = gimple_bb (SSA_NAME_DEF_STMT (rename));
+ if (is_valid_rename (rename, bb, new_bb, loop_phi, old_name, old_bb))
+ return rename;
+ return NULL_TREE;
+ }
+
+ /* More than one renames corresponding to the old_name. Find the rename for
+ which the definition flows into usage at new_bb. */
+ int i;
+ tree t1 = NULL_TREE, t2;
+ basic_block t1_bb = NULL;
+ FOR_EACH_VEC_ELT (*renames, i, t2)
+ {
+ basic_block t2_bb = gimple_bb (SSA_NAME_DEF_STMT (t2));
+
+ /* Defined in the same basic block as used. */
+ if (t2_bb == new_bb)
+ return t2;
+
+ /* NEW_BB and T2_BB are in two unrelated if-clauses. */
+ if (!dominated_by_p (CDI_DOMINATORS, new_bb, t2_bb))
+ continue;
+
+ /* Compute the nearest dominator. */
+ if (!t1 || dominated_by_p (CDI_DOMINATORS, t2_bb, t1_bb))
+ {
+ t1_bb = t2_bb;
+ t1 = t2;
+ }
+ //if (is_valid_rename (rename, bb, new_bb, loop_phi, old_name, old_bb))
+ //return rename;
+ }
+
+ return t1;
}
-/* Register in RENAME_MAP the rename tuple (OLD_NAME, EXPR). */
+/* Register in RENAME_MAP the rename tuple (OLD_NAME, EXPR).
+ When OLD_NAME and EXPR are the same we assert. */
static void
-set_rename (rename_map_type *rename_map, tree old_name, tree expr)
+set_rename (tree old_name, tree expr, sese_info_p region)
{
if (dump_file)
{
- fprintf (dump_file, "[codegen] setting rename: old_name = ");
+ fprintf (dump_file, "\n[codegen] setting rename: old_name = ");
print_generic_expr (dump_file, old_name, 0);
fprintf (dump_file, ", new_name = ");
print_generic_expr (dump_file, expr, 0);
- fprintf (dump_file, "\n");
}
if (old_name == expr)
return;
- rename_map->put (old_name, expr);
+ vec <tree> *renames = region->rename_map->get (old_name);
+
+ if (renames)
+ renames->safe_push (expr);
+ else
+ {
+ vec<tree> r;
+ r.create (2);
+ r.safe_push (expr);
+ region->rename_map->put (old_name, r);
+ }
+}
+
+/* Return an iterator to the instructions comes
+ last in the execution order. Either GSI1 and GSI2 should belong
+ to the same basic block or one of their respective basic blocks
+ should dominate the other. */
+
+gimple_stmt_iterator
+later_of_the_two (gimple_stmt_iterator gsi1, gimple_stmt_iterator gsi2)
+{
+ basic_block bb1 = gsi_bb (gsi1);
+ basic_block bb2 = gsi_bb (gsi2);
+
+ /* Find the iterator which is the latest. */
+ if (bb1 == bb2)
+ {
+ /* For empty basic blocks gsis point to the end of the sequence. Since
+ there is no operator== defined for gimple_stmt_iterator and for gsis
+ not pointing to a valid statement gsi_next would assert. */
+ gimple_stmt_iterator gsi = gsi1;
+ do {
+ if (gsi_stmt (gsi) == gsi_stmt (gsi2))
+ return gsi2;
+ gsi_next (&gsi);
+ } while (!gsi_end_p (gsi));
+
+ return gsi1;
+ }
+
+ /* Find the basic block closest to the basic block which defines stmt. */
+ if (dominated_by_p (CDI_DOMINATORS, bb1, bb2))
+ return gsi1;
+
+ gcc_assert (dominated_by_p (CDI_DOMINATORS, bb2, bb1));
+ return gsi2;
+}
+
+/* Insert each statement from SEQ at its earliest insertion p. */
+
+static void
+gsi_insert_earliest (gimple_seq seq, sese_info_p region)
+{
+ update_modified_stmts (seq);
+ sese_l &codegen_region = region->if_region->true_region->region;
+ basic_block begin_bb = get_entry_bb (codegen_region);
+
+ /* Inserting the gimple statements in a vector because gimple_seq behave
+ in strage ways when inserting the stmts from it into different basic
+ blocks one at a time. */
+ auto_vec<gimple *, 3> stmts;
+ for (gimple_stmt_iterator gsi = gsi_start (seq); !gsi_end_p (gsi);
+ gsi_next (&gsi))
+ stmts.safe_push (gsi_stmt (gsi));
+
+ int i;
+ gimple *use_stmt;
+ FOR_EACH_VEC_ELT (stmts, i, use_stmt)
+ {
+ gcc_assert (gimple_code (use_stmt) != GIMPLE_PHI);
+ gimple_stmt_iterator gsi_def_stmt = gsi_start_bb_nondebug (begin_bb);
+
+ use_operand_p use_p;
+ ssa_op_iter op_iter;
+ FOR_EACH_SSA_USE_OPERAND (use_p, use_stmt, op_iter, SSA_OP_USE)
+ {
+ /* Iterator to the current def of use_p. For function parameters or
+ anything where def is not found, insert at the beginning of the
+ generated region. */
+ gimple_stmt_iterator gsi_stmt = gsi_def_stmt;
+
+ tree op = USE_FROM_PTR (use_p);
+ gimple *stmt = SSA_NAME_DEF_STMT (op);
+ if (stmt && (gimple_code (stmt) != GIMPLE_NOP))
+ gsi_stmt = gsi_for_stmt (stmt);
+
+ /* For region parameters, insert at the beginning of the generated
+ region. */
+ if (!bb_in_sese_p (gsi_bb (gsi_stmt), codegen_region))
+ {
+ /* The parameter should have been inserted in the parameter
+ map or it must have a scev. */
+ gsi_stmt = gsi_def_stmt;
+ }
+
+ gsi_def_stmt = later_of_the_two (gsi_stmt, gsi_def_stmt);
+ }
+
+ if (!gsi_stmt (gsi_def_stmt))
+ {
+ gimple_stmt_iterator gsi = gsi_after_labels (gsi_bb (gsi_def_stmt));
+ gsi_insert_before (&gsi, use_stmt, GSI_NEW_STMT);
+ }
+ else if (gimple_code (gsi_stmt (gsi_def_stmt)) == GIMPLE_PHI)
+ {
+ gimple_stmt_iterator bsi
+ = gsi_start_bb_nondebug (gsi_bb (gsi_def_stmt));
+ /* Insert right after the PHI statements. */
+ gsi_insert_before (&bsi, use_stmt, GSI_NEW_STMT);
+ }
+ else
+ gsi_insert_after (&gsi_def_stmt, use_stmt, GSI_NEW_STMT);
+
+ if (dump_file)
+ {
+ fprintf (dump_file, "\n[codegen] inserting statement: ");
+ print_gimple_stmt (dump_file, use_stmt, 0, TDF_VOPS | TDF_MEMSYMS);
+ print_loops_bb (dump_file, gimple_bb (use_stmt), 0, 3);
+ }
+ }
+}
+
+/* Collect all the operands of NEW_EXPR by recursively visiting each
+ operand. */
+
+static void
+collect_all_ssa_names (tree new_expr, vec<tree> *vec_ssa, sese_info_p region)
+{
+
+ /* Rename all uses in new_expr. */
+ if (TREE_CODE (new_expr) == SSA_NAME)
+ {
+ vec_ssa->safe_push (new_expr);
+ return;
+ }
+
+ /* Iterate over SSA_NAMES in NEW_EXPR. */
+ for (int i = 0; i < (TREE_CODE_LENGTH (TREE_CODE (new_expr))); i++)
+ {
+ tree op = TREE_OPERAND (new_expr, i);
+ collect_all_ssa_names (op, vec_ssa, region);
+ }
+}
+
+static tree
+substitute_ssa_name (tree exp, tree f, tree r)
+{
+ enum tree_code code = TREE_CODE (exp);
+ tree op0, op1, op2, op3;
+ tree new_tree;
+
+ /* We handle TREE_LIST and COMPONENT_REF separately. */
+ if (code == TREE_LIST)
+ {
+ op0 = substitute_ssa_name (TREE_CHAIN (exp), f, r);
+ op1 = substitute_ssa_name (TREE_VALUE (exp), f, r);
+ if (op0 == TREE_CHAIN (exp) && op1 == TREE_VALUE (exp))
+ return exp;
+
+ return tree_cons (TREE_PURPOSE (exp), op1, op0);
+ }
+ else if (code == COMPONENT_REF)
+ {
+ tree inner;
+
+ /* If this expression is getting a value from a PLACEHOLDER_EXPR
+ and it is the right field, replace it with R. */
+ for (inner = TREE_OPERAND (exp, 0);
+ REFERENCE_CLASS_P (inner);
+ inner = TREE_OPERAND (inner, 0))
+ ;
+
+ /* The field. */
+ op1 = TREE_OPERAND (exp, 1);
+
+ if (TREE_CODE (inner) == PLACEHOLDER_EXPR && op1 == f)
+ return r;
+
+ /* If this expression hasn't been completed let, leave it alone. */
+ if (TREE_CODE (inner) == PLACEHOLDER_EXPR && !TREE_TYPE (inner))
+ return exp;
+
+ op0 = substitute_ssa_name (TREE_OPERAND (exp, 0), f, r);
+ if (op0 == TREE_OPERAND (exp, 0))
+ return exp;
+
+ new_tree
+ = fold_build3 (COMPONENT_REF, TREE_TYPE (exp), op0, op1, NULL_TREE);
+ }
+ else
+ switch (TREE_CODE_CLASS (code))
+ {
+ case tcc_constant:
+ return exp;
+
+ case tcc_declaration:
+ if (exp == f)
+ return r;
+ else
+ return exp;
+
+ case tcc_expression:
+ if (exp == f)
+ return r;
+
+ /* Fall through... */
+
+ case tcc_exceptional:
+ case tcc_unary:
+ case tcc_binary:
+ case tcc_comparison:
+ case tcc_reference:
+ switch (TREE_CODE_LENGTH (code))
+ {
+ case 0:
+ if (exp == f)
+ return r;
+ return exp;
+
+ case 1:
+ op0 = substitute_ssa_name (TREE_OPERAND (exp, 0), f, r);
+ if (op0 == TREE_OPERAND (exp, 0))
+ return exp;
+
+ new_tree = fold_build1 (code, TREE_TYPE (exp), op0);
+ break;
+
+ case 2:
+ op0 = substitute_ssa_name (TREE_OPERAND (exp, 0), f, r);
+ op1 = substitute_ssa_name (TREE_OPERAND (exp, 1), f, r);
+
+ if (op0 == TREE_OPERAND (exp, 0) && op1 == TREE_OPERAND (exp, 1))
+ return exp;
+
+ new_tree = fold_build2 (code, TREE_TYPE (exp), op0, op1);
+ break;
+
+ case 3:
+ op0 = substitute_ssa_name (TREE_OPERAND (exp, 0), f, r);
+ op1 = substitute_ssa_name (TREE_OPERAND (exp, 1), f, r);
+ op2 = substitute_ssa_name (TREE_OPERAND (exp, 2), f, r);
+
+ if (op0 == TREE_OPERAND (exp, 0) && op1 == TREE_OPERAND (exp, 1)
+ && op2 == TREE_OPERAND (exp, 2))
+ return exp;
+
+ new_tree = fold_build3 (code, TREE_TYPE (exp), op0, op1, op2);
+ break;
+
+ case 4:
+ op0 = substitute_ssa_name (TREE_OPERAND (exp, 0), f, r);
+ op1 = substitute_ssa_name (TREE_OPERAND (exp, 1), f, r);
+ op2 = substitute_ssa_name (TREE_OPERAND (exp, 2), f, r);
+ op3 = substitute_ssa_name (TREE_OPERAND (exp, 3), f, r);
+
+ if (op0 == TREE_OPERAND (exp, 0) && op1 == TREE_OPERAND (exp, 1)
+ && op2 == TREE_OPERAND (exp, 2)
+ && op3 == TREE_OPERAND (exp, 3))
+ return exp;
+
+ new_tree
+ = fold (build4 (code, TREE_TYPE (exp), op0, op1, op2, op3));
+ break;
+
+ default:
+ gcc_unreachable ();
+ }
+ break;
+
+ case tcc_vl_exp:
+ default:
+ gcc_unreachable ();
+ }
+
+ TREE_READONLY (new_tree) |= TREE_READONLY (exp);
+
+ if (code == INDIRECT_REF || code == ARRAY_REF || code == ARRAY_RANGE_REF)
+ TREE_THIS_NOTRAP (new_tree) |= TREE_THIS_NOTRAP (exp);
+
+ return new_tree;
+}
+
+/* Rename all the operands of NEW_EXPR by recursively visiting each operand. */
+
+static tree
+rename_all_uses (tree new_expr, basic_block new_bb, basic_block old_bb,
+ sese_info_p region)
+{
+ vec<tree> ssa_names;
+ ssa_names.create (2);
+ collect_all_ssa_names (new_expr, &ssa_names, region);
+ tree t;
+ int i;
+ FOR_EACH_VEC_ELT (ssa_names, i, t)
+ {
+ if (tree r = get_rename (region->rename_map, new_bb, t, old_bb, false))
+ new_expr = substitute_ssa_name (new_expr, t, r);
+ /* else
+ return NULL_TREE;*/
+ }
+
+ return new_expr;
+}
+
+static tree
+get_rename_from_scev (tree old_name, gimple_seq *stmts, loop_p loop,
+ basic_block new_bb, basic_block old_bb,
+ vec<tree> iv_map, sese_info_p region, bool *gloog_error)
+{
+ tree scev = scalar_evolution_in_region (region->region, loop, old_name);
+
+ /* At this point we should know the exact scev for each
+ scalar SSA_NAME used in the scop: all the other scalar
+ SSA_NAMEs should have been translated out of SSA using
+ arrays with one element. */
+ tree new_expr;
+ if (chrec_contains_undetermined (scev))
+ {
+ *gloog_error = true;
+ return build_zero_cst (TREE_TYPE (old_name));
+ }
+
+ new_expr = chrec_apply_map (scev, iv_map);
+
+ /* The apply should produce an expression tree containing
+ the uses of the new induction variables. We should be
+ able to use new_expr instead of the old_name in the newly
+ generated loop nest. */
+ if (chrec_contains_undetermined (new_expr)
+ || tree_contains_chrecs (new_expr, NULL))
+ {
+ *gloog_error = true;
+ return build_zero_cst (TREE_TYPE (old_name));
+ }
+
+ new_expr = rename_all_uses (new_expr, new_bb, old_bb, region);
+
+ /* Replace the old_name with the new_expr. */
+ return force_gimple_operand (unshare_expr (new_expr), stmts,
+ true, NULL_TREE);
}
/* Renames the scalar uses of the statement COPY, using the
@@ -392,13 +903,10 @@ set_rename (rename_map_type *rename_map, tree old_name, tree expr)
is set when the code generation cannot continue. */
static bool
-rename_uses (gimple *copy, rename_map_type *rename_map,
- gimple_stmt_iterator *gsi_tgt,
- sese_info_p region, loop_p loop, vec<tree> iv_map,
- bool *gloog_error)
+rename_uses (gimple *copy, gimple_stmt_iterator *gsi_tgt,
+ basic_block old_bb, sese_info_p region,
+ loop_p loop, vec<tree> iv_map, bool *gloog_error)
{
- use_operand_p use_p;
- ssa_op_iter op_iter;
bool changed = false;
if (is_gimple_debug (copy))
@@ -413,23 +921,43 @@ rename_uses (gimple *copy, rename_map_type *rename_map,
return false;
}
+ if (dump_file)
+ {
+ fprintf (dump_file, "\n[codegen] renaming uses of stmt: ");
+ print_gimple_stmt (dump_file, copy, 0, 0);
+ }
+
+ use_operand_p use_p;
+ ssa_op_iter op_iter;
FOR_EACH_SSA_USE_OPERAND (use_p, copy, op_iter, SSA_OP_USE)
{
tree old_name = USE_FROM_PTR (use_p);
- tree new_expr, scev;
- gimple_seq stmts;
+
+ if (dump_file)
+ {
+ fprintf (dump_file, "\n[codegen] renaming old_name = ");
+ print_generic_expr (dump_file, old_name, 0);
+ }
if (TREE_CODE (old_name) != SSA_NAME
|| SSA_NAME_IS_DEFAULT_DEF (old_name))
continue;
changed = true;
- new_expr = get_rename (rename_map, old_name);
+ tree new_expr = get_rename (region->rename_map, gsi_tgt->bb, old_name,
+ old_bb, false);
+
if (new_expr)
{
tree type_old_name = TREE_TYPE (old_name);
tree type_new_expr = TREE_TYPE (new_expr);
+ if (dump_file)
+ {
+ fprintf (dump_file, "\n[codegen] from rename_map: new_name = ");
+ print_generic_expr (dump_file, new_expr, 0);
+ }
+
if (type_old_name != type_new_expr
|| TREE_CODE (new_expr) != SSA_NAME)
{
@@ -438,44 +966,28 @@ rename_uses (gimple *copy, rename_map_type *rename_map,
if (!useless_type_conversion_p (type_old_name, type_new_expr))
new_expr = fold_convert (type_old_name, new_expr);
+ gimple_seq stmts;
new_expr = force_gimple_operand (new_expr, &stmts, true, var);
- gsi_insert_seq_before (gsi_tgt, stmts, GSI_SAME_STMT);
+ gsi_insert_earliest (stmts, region);
}
replace_exp (use_p, new_expr);
continue;
}
- scev = scalar_evolution_in_region (region->region, loop, old_name);
-
- /* At this point we should know the exact scev for each
- scalar SSA_NAME used in the scop: all the other scalar
- SSA_NAMEs should have been translated out of SSA using
- arrays with one element. */
- if (chrec_contains_undetermined (scev))
- {
- *gloog_error = true;
- new_expr = build_zero_cst (TREE_TYPE (old_name));
- }
- else
- new_expr = chrec_apply_map (scev, iv_map);
+ gimple_seq stmts;
+ new_expr = get_rename_from_scev (old_name, &stmts, loop, gimple_bb (copy),
+ old_bb, iv_map, region, gloog_error);
+ if (!new_expr || *gloog_error)
+ return false;
- /* The apply should produce an expression tree containing
- the uses of the new induction variables. We should be
- able to use new_expr instead of the old_name in the newly
- generated loop nest. */
- if (chrec_contains_undetermined (new_expr)
- || tree_contains_chrecs (new_expr, NULL))
+ if (dump_file)
{
- *gloog_error = true;
- new_expr = build_zero_cst (TREE_TYPE (old_name));
+ fprintf (dump_file, "\n[codegen] not in rename map, scev: ");
+ print_generic_expr (dump_file, new_expr, 0);
}
- else
- /* Replace the old_name with the new_expr. */
- new_expr = force_gimple_operand (unshare_expr (new_expr), &stmts,
- true, NULL_TREE);
- gsi_insert_seq_before (gsi_tgt, stmts, GSI_SAME_STMT);
+ gsi_insert_earliest (stmts, region);
replace_exp (use_p, new_expr);
if (TREE_CODE (new_expr) == INTEGER_CST
@@ -487,73 +999,726 @@ rename_uses (gimple *copy, rename_map_type *rename_map,
recompute_tree_invariant_for_addr_expr (rhs);
}
- set_rename (rename_map, old_name, new_expr);
+ set_rename (old_name, new_expr, region);
}
return changed;
}
+/* Returns a basic block that could correspond to where a constant was defined
+ in the original code. In the original code OLD_BB had the definition, we
+ need to find which basic block out of the copies of old_bb, in the new
+ region, should a definition correspond to if it has to reach BB. */
+
+static basic_block
+get_def_bb_for_const (sese_info_p region, basic_block bb, basic_block old_bb)
+{
+ vec <basic_block> *bbs = region->copied_bb_map->get (old_bb);
+
+ if (!bbs || bbs->is_empty ())
+ return NULL;
+
+ if (1 == bbs->length ())
+ return (*bbs)[0];
+
+ int i;
+ basic_block b1 = NULL, b2;
+ FOR_EACH_VEC_ELT (*bbs, i, b2)
+ {
+ if (b2 == bb)
+ return bb;
+
+ /* BB and B2 are in two unrelated if-clauses. */
+ if (!dominated_by_p (CDI_DOMINATORS, bb, b2))
+ continue;
+
+ /* Compute the nearest dominator. */
+ if (!b1 || dominated_by_p (CDI_DOMINATORS, b2, b1))
+ b1 = b2;
+ }
+
+ gcc_assert (b1);
+ return b1;
+}
+
+/* LOOP_PHI is true when we want to rename an OP within a loop PHI
+ instruction. */
+
+static tree
+get_new_name (sese_info_p region, basic_block new_bb, tree op,
+ basic_block old_bb, bool loop_phi)
+{
+ if (TREE_CODE (op) == INTEGER_CST
+ || TREE_CODE (op) == REAL_CST
+ || TREE_CODE (op) == COMPLEX_CST
+ || TREE_CODE (op) == VECTOR_CST)
+ return op;
+
+ return get_rename (region->rename_map, new_bb, op, old_bb, loop_phi);
+}
+
+/* Return a debug location for OP. */
+
+static location_t
+get_loc (tree op)
+{
+ location_t loc = UNKNOWN_LOCATION;
+
+ if (TREE_CODE (op) == SSA_NAME)
+ loc = gimple_location (SSA_NAME_DEF_STMT (op));
+ return loc;
+}
+
+/* Returns the incoming edges of basic_block BB in the pair. The first edge is
+ the init edge (from outside the loop) and the second one is the back edge
+ from the same loop. */
+
+std::pair<edge, edge>
+get_edges (basic_block bb)
+{
+ std::pair<edge, edge> edges;
+ edge e;
+ edge_iterator ei;
+ FOR_EACH_EDGE (e, ei, bb->preds)
+ if (bb->loop_father != e->src->loop_father)
+ edges.first = e;
+ else
+ edges.second = e;
+ return edges;
+}
+
+/* Copy the PHI arguments from OLD_PHI to the NEW_PHI. The arguments to NEW_PHI
+ must be found unless they can be POSTPONEd for later. */
+
+void
+copy_loop_phi_args (gphi *old_phi, init_back_edge_pair_t &ibp_old_bb,
+ gphi *new_phi, init_back_edge_pair_t &ibp_new_bb,
+ sese_info_p region, bool postpone)
+{
+ gcc_assert (gimple_phi_num_args (old_phi) == gimple_phi_num_args (new_phi));
+
+ basic_block new_bb = gimple_bb (new_phi);
+ for (unsigned i = 0; i < gimple_phi_num_args (old_phi); i++)
+ {
+ edge e;
+ if (gimple_phi_arg_edge (old_phi, i) == ibp_old_bb.first)
+ e = ibp_new_bb.first;
+ else
+ e = ibp_new_bb.second;
+
+ tree old_name = gimple_phi_arg_def (old_phi, i);
+ tree new_name = get_new_name (region, new_bb, old_name,
+ gimple_bb (old_phi), true);
+ if (new_name)
+ {
+ add_phi_arg (new_phi, new_name, e, get_loc (old_name));
+ continue;
+ }
+
+ gimple *old_def_stmt = SSA_NAME_DEF_STMT (old_name);
+ if (!old_def_stmt || gimple_code (old_def_stmt) == GIMPLE_NOP)
+ /* If the phi arg was a function arg, or wasn't defined, just use the old
+ name. */
+ add_phi_arg (new_phi, old_name, e, get_loc (old_name));
+ else if (postpone)
+ {
+ /* Postpone code gen for later for those back-edges we don't have the
+ names yet. */
+ region->incomplete_phis.safe_push (std::make_pair (old_phi, new_phi));
+ if (dump_file)
+ fprintf (dump_file, "\n[codegen] postpone loop phi nodes: ");
+ }
+ else
+ /* Either we should add the arg to phi or, we should postpone. */
+ gcc_unreachable ();
+ }
+}
+
+/* Copy loop phi nodes from BB to NEW_BB. */
+
+static bool
+copy_loop_phi_nodes (basic_block bb, basic_block new_bb, sese_info_p region)
+{
+ if (dump_file)
+ fprintf (dump_file, "\n[codegen] copying loop phi nodes in bb_%d.",
+ new_bb->index);
+
+ /* Loop phi nodes should have only two arguments. */
+ gcc_assert (2 == EDGE_COUNT (bb->preds));
+
+ /* First edge is the init edge and second is the back edge. */
+ init_back_edge_pair_t ibp_old_bb = get_edges (bb);
+
+ /* First edge is the init edge and second is the back edge. */
+ init_back_edge_pair_t ibp_new_bb = get_edges (new_bb);
+
+ for (gphi_iterator psi = gsi_start_phis (bb); !gsi_end_p (psi);
+ gsi_next (&psi))
+ {
+ gphi *phi = psi.phi ();
+ tree res = gimple_phi_result (phi);
+ if (virtual_operand_p (res))
+ continue;
+ if (is_gimple_reg (res) && scev_analyzable_p (res, region->region))
+ continue;
+
+ gphi *new_phi = create_phi_node (SSA_NAME_VAR (res), new_bb);
+ tree new_res = create_new_def_for (res, new_phi,
+ gimple_phi_result_ptr (new_phi));
+ set_rename (res, new_res, region);
+ copy_loop_phi_args (phi, ibp_old_bb, new_phi, ibp_new_bb, region, true);
+ update_stmt (new_phi);
+ }
+
+ return true;
+}
+
+/* Return the init value of PHI, the value coming from outside the loop. */
+
+static tree
+get_loop_init_value (gphi *phi)
+{
+
+ loop_p loop = gimple_bb (phi)->loop_father;
+
+ edge e;
+ edge_iterator ei;
+ FOR_EACH_EDGE (e, ei, gimple_bb (phi)->preds)
+ if (e->src->loop_father != loop)
+ return gimple_phi_arg_def (phi, e->dest_idx);
+
+ return NULL_TREE;
+}
+
+/* Find the init value (the value which comes from outside the loop), of one of
+ the operands of DEF which is defined by a loop phi. */
+
+static tree
+find_init_value (gimple *def)
+{
+ if (gimple_code (def) == GIMPLE_PHI)
+ return get_loop_init_value (as_a <gphi*> (def));
+
+ if (gimple_vuse (def))
+ return NULL_TREE;
+
+ ssa_op_iter iter;
+ use_operand_p use_p;
+ FOR_EACH_SSA_USE_OPERAND (use_p, def, iter, SSA_OP_USE)
+ {
+ tree use = USE_FROM_PTR (use_p);
+ if (TREE_CODE (use) == SSA_NAME)
+ {
+ if (tree res = find_init_value (SSA_NAME_DEF_STMT (use)))
+ return res;
+ }
+ }
+
+ return NULL_TREE;
+}
+
+/* Return the init value, the value coming from outside the loop. */
+
+static tree
+find_init_value_close_phi (gphi *phi)
+{
+ gcc_assert (gimple_phi_num_args (phi) == 1);
+ tree use_arg = gimple_phi_arg_def (phi, 0);
+ gimple *def = SSA_NAME_DEF_STMT (use_arg);
+ return find_init_value (def);
+}
+
+/* Copy all the loop-close phi args from BB to NEW_BB. */
+
+bool
+copy_loop_close_phi_args (basic_block old_bb, basic_block new_bb,
+ sese_info_p region, bool postpone)
+{
+ /* The successor of bb having close phi should be a merge of the diamond
+ inserted to guard the loop during codegen. */
+ basic_block close_phi_merge_bb = single_succ (new_bb);
+
+ for (gphi_iterator psi = gsi_start_phis (old_bb); !gsi_end_p (psi);
+ gsi_next (&psi))
+ {
+ gphi *phi = psi.phi ();
+ tree res = gimple_phi_result (phi);
+ if (virtual_operand_p (res))
+ continue;
+
+ if (is_gimple_reg (res) && scev_analyzable_p (res, region->region))
+ /* Loop close phi nodes should not be scev_analyzable_p. */
+ gcc_unreachable ();
+
+ gphi *new_phi = create_phi_node (SSA_NAME_VAR (res), new_bb);
+ tree new_res = create_new_def_for (res, new_phi,
+ gimple_phi_result_ptr (new_phi));
+ set_rename (res, new_res, region);
+
+ tree old_name = gimple_phi_arg_def (phi, 0);
+ tree new_name = get_new_name (region, new_bb, old_name, old_bb, false);
+
+ /* Predecessor basic blocks of a loop close phi should have been code
+ generated before. FIXME: This is fixable by merging PHIs from inner
+ loops as well. When we are looking at close-phi of an outer loop, and
+ arguments flowing out of inner loop as not been collected by the
+ outer-loop close phi, we will hit this situation. For now we just bail
+ out. See: gfortran.dg/graphite/interchange-3.f90. */
+ if (!new_name)
+ return false;
+
+ add_phi_arg (new_phi, new_name, single_pred_edge (new_bb),
+ get_loc (old_name));
+ if (dump_file)
+ {
+ fprintf (dump_file, "\n[codegen] Adding loop-closed phi: ");
+ print_gimple_stmt (dump_file, new_phi, 0, 0);
+ }
+
+ update_stmt (new_phi);
+
+ /* When there is no loop guard around this codegenerated loop, there is no
+ need to collect the close-phi arg. */
+ if (2 != EDGE_COUNT (close_phi_merge_bb->preds))
+ continue;
+
+ /* Add a PHI in the close_phi_merge_bb for each close phi of the loop. */
+ tree init = find_init_value_close_phi (new_phi);
+
+ /* A close phi must come from a loop-phi having an init value. */
+ if (!init)
+ {
+ gcc_assert (postpone);
+ region->incomplete_phis.safe_push (std::make_pair (phi, new_phi));
+ if (dump_file)
+ {
+ fprintf (dump_file, "\n[codegen] postpone close phi nodes: ");
+ print_gimple_stmt (dump_file, new_phi, 0, 0);
+ }
+ continue;
+ }
+
+ gphi *merge_phi = create_phi_node (SSA_NAME_VAR (res),
+ close_phi_merge_bb);
+ tree merge_res = create_new_def_for (res, merge_phi,
+ gimple_phi_result_ptr (merge_phi));
+ set_rename (res, merge_res, region);
+
+ edge from_loop = single_succ_edge (new_bb);
+ add_phi_arg (merge_phi, new_res, from_loop, get_loc (old_name));
+
+ /* The edge coming from loop guard. */
+ edge other = from_loop == (*close_phi_merge_bb->preds)[0]
+ ? (*close_phi_merge_bb->preds)[1] : (*close_phi_merge_bb->preds)[0];
+
+ add_phi_arg (merge_phi, init, other, get_loc (old_name));
+ if (dump_file)
+ {
+ fprintf (dump_file, "\n[codegen] Adding guard-phi: ");
+ print_gimple_stmt (dump_file, merge_phi, 0, 0);
+ }
+
+ update_stmt (new_phi);
+ }
+
+ return true;
+}
+
+/* Copy loop close phi nodes from BB to NEW_BB. */
+
+static bool
+copy_loop_close_phi_nodes (basic_block old_bb, basic_block new_bb,
+ sese_info_p region)
+{
+ if (dump_file)
+ fprintf (dump_file, "\n[codegen] copying loop closed phi nodes in bb_%d.",
+ new_bb->index);
+ /* Loop close phi nodes should have only one argument. */
+ gcc_assert (1 == EDGE_COUNT (old_bb->preds));
+
+ return copy_loop_close_phi_args (old_bb, new_bb, region, true);
+}
+
+
+/* Add NEW_NAME as the ARGNUM-th arg of NEW_PHI which is in NEW_BB.
+ DOMINATING_PRED is the predecessor basic block of OLD_BB which dominates the
+ other pred of OLD_BB as well. If no such basic block exists then it is NULL.
+ NON_DOMINATING_PRED is a pred which does not dominate OLD_BB, it cannot be
+ NULL.
+
+ Case1: OLD_BB->preds {BB1, BB2} and BB1 does not dominate BB2 and vice versa.
+ In this case DOMINATING_PRED = NULL.
+
+ Case2: OLD_BB->preds {BB1, BB2} and BB1 dominates BB2.
+
+ Returns true on successful copy of the args, false otherwise. */
+
+static bool
+add_phi_arg_for_new_expr (tree old_phi_args[2], tree new_phi_args[2],
+ edge old_bb_dominating_edge,
+ edge old_bb_non_dominating_edge,
+ gphi *phi, gphi *new_phi,
+ basic_block new_bb, sese_info_p region)
+{
+ basic_block def_pred[2];
+ int not_found_bb_index = -1;
+ for (int i = 0; i < 2; i++)
+ {
+ /* If the corresponding def_bb could not be found the entry will be
+ NULL. */
+ if (TREE_CODE (old_phi_args[i]) == INTEGER_CST)
+ def_pred[i] = get_def_bb_for_const (region, new_bb,
+ gimple_phi_arg_edge (phi, i)->src);
+ else
+ def_pred[i] = gimple_bb (SSA_NAME_DEF_STMT (new_phi_args[i]));
+ if (!def_pred[i])
+ {
+ gcc_assert (not_found_bb_index == -1);
+ not_found_bb_index = i;
+ }
+ }
+
+ /* Here we are pattern matching on the structure of CFG w.r.t. old one. */
+ if (old_bb_dominating_edge)
+ {
+ return false;
+ basic_block new_pred1 = (*new_bb->preds)[0]->src;
+ basic_block new_pred2 = (*new_bb->preds)[1]->src;
+ vec <basic_block> *bbs
+ = region->copied_bb_map->get (old_bb_non_dominating_edge->src);
+ gcc_assert (bbs);
+ basic_block new_pred = NULL;
+ basic_block b;
+ int i;
+ FOR_EACH_VEC_ELT (*bbs, i, b)
+ if (new_pred1 == b || new_pred2 == b)
+ {
+ gcc_assert (!new_pred);
+ new_pred = b;
+ }
+
+ gcc_assert (new_pred);
+
+ edge new_non_dominating_edge = find_edge (new_pred, new_bb);
+ /* By the process of elimination we first insert insert phi-edge for
+ non-dominating pred which is computed above and then we insert the
+ remaining one. */
+ int inserted_edge = 0;
+ for (; inserted_edge < 2; inserted_edge++)
+ {
+ edge new_bb_pred_edge = gimple_phi_arg_edge (phi, inserted_edge);
+ if (new_non_dominating_edge == new_bb_pred_edge)
+ {
+ add_phi_arg (new_phi, new_phi_args[inserted_edge],
+ new_non_dominating_edge,
+ get_loc (old_phi_args[inserted_edge]));
+ break;
+ }
+ }
+
+ int edge_dominating = 0;
+ if (inserted_edge == 0)
+ edge_dominating = 1;
+
+ edge new_dominating_edge = NULL;
+ for (int i; i < 2; i++)
+ {
+ edge e = gimple_phi_arg_edge (new_phi, i);
+ if (e != new_non_dominating_edge)
+ new_dominating_edge = e;
+ }
+
+ add_phi_arg (new_phi, new_phi_args[edge_dominating], new_dominating_edge,
+ get_loc (old_phi_args[inserted_edge]));
+ }
+ else
+ {
+ /* Classic diamond structure: both edges are non-dominating. We need to
+ find one unique edge then the other can be found be elimination. If
+ any definition (def_pred) dominates both the preds of new_bb then we
+ bail out. Entries of def_pred maybe NULL, in that case we must
+ uniquely find pred with help of only one entry. */
+ edge new_e[2] = { NULL, NULL };
+ for (int i = 0; i < 2; i++)
+ {
+ edge e;
+ edge_iterator ei;
+ FOR_EACH_EDGE (e, ei, new_bb->preds)
+ if (def_pred[i]
+ && dominated_by_p (CDI_DOMINATORS, e->src, def_pred[i]))
+ {
+ if (new_e[i])
+ /* We do not know how to handle the case when def_pred
+ dominates more than a predecessor. */
+ return false;
+ new_e[i] = e;
+ }
+ }
+
+ gcc_assert (new_e[0] || new_e[1]);
+
+ /* Find the other edge by process of elimination. */
+ if (not_found_bb_index != -1)
+ {
+ gcc_assert (!new_e[not_found_bb_index]);
+ int found_bb_index = not_found_bb_index == 1 ? 0 : 1;
+ edge e;
+ edge_iterator ei;
+ FOR_EACH_EDGE (e, ei, new_bb->preds)
+ {
+ if (new_e[found_bb_index] == e)
+ continue;
+ new_e[not_found_bb_index] = e;
+ }
+ }
+
+ /* Add edges to phi args. */
+ for (int i = 0; i < 2; i++)
+ add_phi_arg (new_phi, new_phi_args[i], new_e[i],
+ get_loc (old_phi_args[i]));
+ }
+
+ return true;
+}
+
+/* Copy the arguments of cond-phi node PHI, to NEW_PHI in the codegenerated
+ region. If postpone is true and it isn't possible to copy any arg of PHI,
+ the PHI is added to the REGION->INCOMPLETE_PHIS to be codegenerated
+ later. Returns false if the copying was unsuccessful. */
+
+bool
+copy_cond_phi_args (gphi *phi, gphi *new_phi, vec<tree> iv_map,
+ sese_info_p region, bool postpone)
+{
+ if (dump_file)
+ fprintf (dump_file, "\n[codegen] copying cond phi args: ");
+ gcc_assert (2 == gimple_phi_num_args (phi));
+
+ basic_block new_bb = gimple_bb (new_phi);
+ loop_p loop = gimple_bb (phi)->loop_father;
+
+ basic_block old_bb = gimple_bb (phi);
+ edge old_bb_non_dominating_edge = NULL, old_bb_dominating_edge = NULL;
+
+ edge e;
+ edge_iterator ei;
+ FOR_EACH_EDGE (e, ei, old_bb->preds)
+ if (!dominated_by_p (CDI_DOMINATORS, old_bb, e->src))
+ old_bb_non_dominating_edge = e;
+ else
+ old_bb_dominating_edge = e;
+
+ gcc_assert (!dominated_by_p (CDI_DOMINATORS, old_bb,
+ old_bb_non_dominating_edge->src));
+
+ tree new_phi_args[2];
+ tree old_phi_args[2];
+
+ for (unsigned i = 0; i < gimple_phi_num_args (phi); i++)
+ {
+ tree old_name = gimple_phi_arg_def (phi, i);
+ tree new_name = get_new_name (region, new_bb, old_name, old_bb, false);
+ old_phi_args[i] = old_name;
+ if (new_name)
+ {
+ new_phi_args [i] = new_name;
+ continue;
+ }
+
+ if (vec_find (region->params, old_name))
+ {
+ new_phi_args [i] = old_name;
+ if (dump_file)
+ {
+ fprintf (dump_file,
+ "\n[codegen] parameter argument to phi, new_expr: ");
+ print_gimple_stmt (dump_file, new_phi, 0, 0);
+ }
+ continue;
+ }
+
+ /* If the phi-arg is scev-analyzeable but only in the first stage. */
+ if (postpone && is_gimple_reg (old_name)
+ && scev_analyzable_p (old_name, region->region))
+ {
+ gimple_seq stmts;
+ bool gloog_error = false;
+ tree new_expr
+ = get_rename_from_scev (old_name, &stmts, loop, new_bb,
+ old_bb, iv_map, region, &gloog_error);
+ if (gloog_error)
+ return false;
+
+ gcc_assert (new_expr);
+ if (dump_file)
+ {
+ fprintf (dump_file, "\n[codegen] scev analyzeable, new_expr: ");
+ print_generic_expr (dump_file, new_expr, 0);
+ }
+ gsi_insert_earliest (stmts, region);
+ new_phi_args [i] = new_name;
+ continue;
+ }
+
+ gimple *old_def_stmt = SSA_NAME_DEF_STMT (old_name);
+ if (!old_def_stmt || gimple_code (old_def_stmt) == GIMPLE_NOP)
+ /* If the phi arg was a function arg, or wasn't defined, just use the
+ old name. */
+ gcc_unreachable ();
+ else if (postpone)
+ {
+ /* Postpone code gen for later for back-edges. */
+ region->incomplete_phis.safe_push (std::make_pair (phi, new_phi));
+
+ if (dump_file)
+ {
+ fprintf (dump_file, "\n[codegen] postpone cond phi nodes: ");
+ print_gimple_stmt (dump_file, new_phi, 0, 0);
+ }
+
+ new_phi_args [i] = NULL_TREE;
+ continue;
+ }
+ else
+ gcc_unreachable ();
+ }
+
+ return add_phi_arg_for_new_expr (old_phi_args, new_phi_args,
+ old_bb_dominating_edge,
+ old_bb_non_dominating_edge,
+ phi, new_phi, new_bb, region);
+}
+
+/* Copy cond phi nodes from BB to NEW_BB. */
+
+static bool
+copy_cond_phi_nodes (basic_block bb, basic_block new_bb, vec<tree> iv_map,
+ sese_info_p region)
+{
+
+ gcc_assert (!bb_contains_loop_close_phi_nodes (bb));
+
+ if (dump_file)
+ fprintf (dump_file, "\n[codegen] copying cond phi nodes in bb_%d:",
+ new_bb->index);
+
+ /* Cond phi nodes should have exactly two arguments. */
+ gcc_assert (2 == EDGE_COUNT (bb->preds));
+
+ for (gphi_iterator psi = gsi_start_phis (bb); !gsi_end_p (psi);
+ gsi_next (&psi))
+ {
+ gphi *phi = psi.phi ();
+ tree res = gimple_phi_result (phi);
+ if (virtual_operand_p (res))
+ continue;
+ if (is_gimple_reg (res) && scev_analyzable_p (res, region->region))
+ /* Cond phi nodes should not be scev_analyzable_p. */
+ gcc_unreachable ();
+
+ gphi *new_phi = create_phi_node (SSA_NAME_VAR (res), new_bb);
+ tree new_res = create_new_def_for (res, new_phi,
+ gimple_phi_result_ptr (new_phi));
+ set_rename (res, new_res, region);
+
+ if (!copy_cond_phi_args (phi, new_phi, iv_map, region, true))
+ return false;
+
+ update_stmt (new_phi);
+ }
+
+ return true;
+}
+
+/* Return true if STMT should be copied from region to the
+ new code-generated region. LABELs, CONDITIONS, induction-variables
+ and region parameters need not be copied. */
+
+static bool
+should_copy_to_new_region (gimple *stmt, sese_info_p region)
+{
+ /* Do not copy labels or conditions. */
+ if (gimple_code (stmt) == GIMPLE_LABEL
+ || gimple_code (stmt) == GIMPLE_COND)
+ return false;
+
+ tree lhs;
+ /* Do not copy induction variables. */
+ if (is_gimple_assign (stmt)
+ && (lhs = gimple_assign_lhs (stmt))
+ && TREE_CODE (lhs) == SSA_NAME
+ && is_gimple_reg (lhs)
+ && scev_analyzable_p (lhs, region->region))
+ return false;
+
+ return true;
+}
+
+/* Create new names for all the definitions created by COPY and
+ add replacement mappings for each new name. */
+
+static void
+set_rename_for_each_def (gimple *stmt, sese_info_p region)
+{
+ def_operand_p def_p;
+ ssa_op_iter op_iter;
+ FOR_EACH_SSA_DEF_OPERAND (def_p, stmt, op_iter, SSA_OP_ALL_DEFS)
+ {
+ tree old_name = DEF_FROM_PTR (def_p);
+ tree new_name = create_new_def_for (old_name, stmt, def_p);
+ set_rename (old_name, new_name, region);
+ }
+}
+
/* Duplicates the statements of basic block BB into basic block NEW_BB
and compute the new induction variables according to the IV_MAP.
GLOOG_ERROR is set when the code generation cannot continue. */
-
-static void
+static bool
graphite_copy_stmts_from_block (basic_block bb, basic_block new_bb,
- rename_map_type *rename_map,
vec<tree> iv_map, sese_info_p region,
bool *gloog_error)
{
- gimple_stmt_iterator gsi, gsi_tgt;
- loop_p loop = bb->loop_father;
+ /* Iterator poining to the place where new statement (s) will be inserted. */
+ gimple_stmt_iterator gsi_tgt = gsi_last_bb (new_bb);
- gsi_tgt = gsi_start_bb (new_bb);
- for (gsi = gsi_start_bb (bb); !gsi_end_p (gsi); gsi_next (&gsi))
+ for (gimple_stmt_iterator gsi = gsi_start_bb (bb); !gsi_end_p (gsi);
+ gsi_next (&gsi))
{
- def_operand_p def_p;
- ssa_op_iter op_iter;
gimple *stmt = gsi_stmt (gsi);
- gimple *copy;
- tree lhs;
-
- /* Do not copy labels or conditions. */
- if (gimple_code (stmt) == GIMPLE_LABEL
- || gimple_code (stmt) == GIMPLE_COND)
- continue;
-
- /* Do not copy induction variables. */
- if (is_gimple_assign (stmt)
- && (lhs = gimple_assign_lhs (stmt))
- && TREE_CODE (lhs) == SSA_NAME
- && is_gimple_reg (lhs)
- && scev_analyzable_p (lhs, region->region))
+ if (!should_copy_to_new_region (stmt, region))
continue;
/* Create a new copy of STMT and duplicate STMT's virtual
operands. */
- copy = gimple_copy (stmt);
+ gimple *copy = gimple_copy (stmt);
gsi_insert_after (&gsi_tgt, copy, GSI_NEW_STMT);
+ if (dump_file)
+ {
+ fprintf (dump_file, "\n[codegen] inserting statement: ");
+ print_gimple_stmt (dump_file, copy, 0, 0);
+ }
+
maybe_duplicate_eh_stmt (copy, stmt);
gimple_duplicate_stmt_histograms (cfun, copy, cfun, stmt);
- /* Create new names for all the definitions created by COPY and
- add replacement mappings for each new name. */
- FOR_EACH_SSA_DEF_OPERAND (def_p, copy, op_iter, SSA_OP_ALL_DEFS)
- {
- tree old_name = DEF_FROM_PTR (def_p);
- tree new_name = create_new_def_for (old_name, copy, def_p);
- set_rename (rename_map, old_name, new_name);
- }
+ /* Crete new names for each def in the copied stmt. */
+ set_rename_for_each_def (copy, region);
- if (rename_uses (copy, rename_map, &gsi_tgt, region, loop, iv_map,
- gloog_error))
+ loop_p loop = bb->loop_father;
+ if (rename_uses (copy, &gsi_tgt, bb, region, loop, iv_map, gloog_error))
{
- gcc_assert (gsi_stmt (gsi_tgt) == copy);
fold_stmt_inplace (&gsi_tgt);
+ gcc_assert (gsi_stmt (gsi_tgt) == copy);
}
+ if (*gloog_error)
+ return false;
+
update_stmt (copy);
}
+
+ return true;
}
/* Copies BB and includes in the copied BB all the statements that can
@@ -564,17 +1729,127 @@ graphite_copy_stmts_from_block (basic_block bb, basic_block new_bb,
edge
copy_bb_and_scalar_dependences (basic_block bb, sese_info_p region,
edge next_e, vec<tree> iv_map,
- bool *gloog_error)
+ bool *codegen_err)
{
+ int num_phis = number_of_phi_nodes (bb);
+
+ if (region->copied_bb_map->get (bb))
+ {
+ /* FIXME: We do not handle inner loop unrolling when the inner loop has
+ phi-nodes. In that case inner loop will be copied multiple times
+ outside the region. */
+ if (num_phis)
+ {
+ *codegen_err = true;
+ return NULL;
+ }
+ }
+
basic_block new_bb = split_edge (next_e);
- rename_map_type rename_map (10);
+ if (num_phis > 0 && bb_contains_loop_phi_nodes (bb))
+ {
+ basic_block phi_bb = next_e->dest->loop_father->header;
- next_e = single_succ_edge (new_bb);
- graphite_copy_stmts_from_block (bb, new_bb, &rename_map, iv_map, region,
- gloog_error);
- remove_phi_nodes (new_bb);
+ /* At this point we are unable to codegenerate by still preserving the SSA
+ structure because maybe the loop is completely unrolled and the PHIs
+ and cross-bb scalar dependencies are untrackable w.r.t. the original
+ code. See gfortran.dg/graphite/pr29832.f90. */
+ if (EDGE_COUNT (bb->preds) != EDGE_COUNT (phi_bb->preds))
+ {
+ *codegen_err = true;
+ return NULL;
+ }
- return next_e;
+ if (dump_file)
+ fprintf (dump_file, "\n[codegen] bb_%d contains loop phi nodes",
+ bb->index);
+ if (!copy_loop_phi_nodes (bb, phi_bb, region))
+ {
+ *codegen_err = true;
+ return NULL;
+ }
+ }
+ else if (bb_contains_loop_close_phi_nodes (bb))
+ {
+ if (dump_file)
+ fprintf (dump_file, "\n[codegen] bb_%d contains close phi nodes",
+ bb->index);
+
+ /* Make sure that NEW_BB is the loop->exit->dest. */
+ edge e = single_pred_edge (new_bb);
+ basic_block phi_bb = new_bb;
+ if (e->src->loop_father == e->dest->loop_father)
+ {
+ /* This is one of the places which shows preserving original structure
+ is not always possible, as we may need to insert close PHI for a
+ loop where the latch does not have any mapping, or the mapping is
+ ambiguous. */
+ basic_block old_loop_bb = single_pred_edge (bb)->src;
+ vec <basic_block> *bbs = region->copied_bb_map->get (old_loop_bb);
+ if (!bbs || bbs->length () != 1)
+ {
+ *codegen_err = true;
+ return NULL;
+ }
+
+ basic_block new_loop_bb = (*bbs)[0];
+ loop_p new_loop = new_loop_bb->loop_father;
+ phi_bb = single_exit (new_loop)->dest;
+ e = single_pred_edge (phi_bb);
+ }
+
+ gcc_assert (e->src->loop_father != e->dest->loop_father);
+
+ if (!copy_loop_close_phi_nodes (bb, phi_bb, region))
+ {
+ *codegen_err = true;
+ return NULL;
+ }
+ }
+ else if (num_phis > 0)
+ {
+ if (dump_file)
+ fprintf (dump_file, "\n[codegen] bb_%d contains cond phi nodes",
+ bb->index);
+
+ basic_block phi_bb = single_pred (new_bb);
+ loop_p loop_father = new_bb->loop_father;
+
+ /* Move back until we find the block with two predecessors. */
+ while (single_pred_p (phi_bb))
+ phi_bb = single_pred_edge (phi_bb)->src;
+
+ /* If a corresponding merge-point was not found, then abort codegen. */
+ if (phi_bb->loop_father != loop_father
+ || !copy_cond_phi_nodes (bb, phi_bb, iv_map, region))
+ {
+ *codegen_err = true;
+ return NULL;
+ }
+ }
+
+ if (dump_file)
+ fprintf (dump_file, "\n[codegen] copying from bb_%d to bb_%d",
+ bb->index, new_bb->index);
+
+ vec <basic_block> *copied_bbs = region->copied_bb_map->get (bb);
+ if (copied_bbs)
+ copied_bbs->safe_push (new_bb);
+ else
+ {
+ vec<basic_block> bbs;
+ bbs.create (2);
+ bbs.safe_push (new_bb);
+ region->copied_bb_map->put (bb, bbs);
+ }
+
+ if (!graphite_copy_stmts_from_block (bb, new_bb, iv_map, region, codegen_err))
+ {
+ *codegen_err = true;
+ return NULL;
+ }
+
+ return single_succ_edge (new_bb);
}
/* Returns the outermost loop in SCOP that contains BB. */
@@ -759,8 +2034,6 @@ set_ifsese_condition (ifsese if_region, tree condition)
bool
invariant_in_sese_p_rec (tree t, sese_l &region, bool *has_vdefs)
{
- ssa_op_iter iter;
- use_operand_p use_p;
if (!defined_in_sese_p (t, region))
return true;
@@ -782,6 +2055,8 @@ invariant_in_sese_p_rec (tree t, sese_l &region, bool *has_vdefs)
if (tree vuse = gimple_vuse (stmt))
return invariant_in_sese_p_rec (vuse, region, has_vdefs);
+ ssa_op_iter iter;
+ use_operand_p use_p;
FOR_EACH_SSA_USE_OPERAND (use_p, stmt, iter, SSA_OP_USE)
{
tree use = USE_FROM_PTR (use_p);
diff --git a/gcc/sese.h b/gcc/sese.h
index b3d48b9d421..bce226a6cfc 100644
--- a/gcc/sese.h
+++ b/gcc/sese.h
@@ -22,6 +22,14 @@ along with GCC; see the file COPYING3. If not see
#ifndef GCC_SESE_H
#define GCC_SESE_H
+typedef hash_map<basic_block, vec<basic_block> > bb_map_t;
+typedef hash_map<tree, vec<tree> > rename_map_t;
+typedef struct ifsese_s *ifsese;
+/* First phi is the new codegenerated phi second one is original phi. */
+typedef std::pair <gphi *, gphi *> phi_rename;
+/* First edge is the init edge and second is the back edge w.r.t. a loop. */
+typedef std::pair<edge, edge> init_back_edge_pair_t;
+
/* A Single Entry, Single Exit region is a part of the CFG delimited
by two edges. */
struct sese_l
@@ -50,6 +58,20 @@ get_exit_bb (sese_l &s)
return s.exit->src;
}
+/* Returns the index of V where ELEM can be found. -1 Otherwise. */
+
+template<typename T>
+int
+vec_find (const vec<T> &v, const T &elem)
+{
+ int i;
+ T t;
+ FOR_EACH_VEC_ELT (v, i, t)
+ if (elem == t)
+ return i;
+ return -1;
+}
+
/* A helper structure for bookkeeping information about a scop in graphite. */
typedef struct sese_info_t
{
@@ -59,17 +81,29 @@ typedef struct sese_info_t
/* Parameters used within the SCOP. */
vec<tree> params;
+ /* Maps an old name to one or more new names. When there are several new
+ names, one has to select the definition corresponding to the immediate
+ dominator. */
+ rename_map_t *rename_map;
+
/* Loops completely contained in this SESE. */
bitmap loops;
vec<loop_p> loop_nest;
/* Basic blocks contained in this SESE. */
vec<basic_block> bbs;
-} *sese_info_p;
-#define SESE_PARAMS(S) (S->params)
-#define SESE_LOOPS(S) (S->loops)
-#define SESE_LOOP_NEST(S) (S->loop_nest)
+ /* Copied basic blocks indexed by the original bb. */
+ bb_map_t *copied_bb_map;
+
+ /* A vector of phi nodes to be updated when all arguments are available. The
+ pair contains first the old_phi and second the new_phi. */
+ vec<phi_rename> incomplete_phis;
+
+ /* The condition region generated for this sese. */
+ ifsese if_region;
+
+} *sese_info_p;
extern sese_info_p new_sese_info (edge, edge);
extern void free_sese_info (sese_info_p);
@@ -80,13 +114,23 @@ extern edge copy_bb_and_scalar_dependences (basic_block, sese_info_p, edge,
extern struct loop *outermost_loop_in_sese (sese_l &, basic_block);
extern tree scalar_evolution_in_region (sese_l &, loop_p, tree);
extern bool invariant_in_sese_p_rec (tree, sese_l &, bool *);
+extern bool bb_contains_loop_phi_nodes (basic_block);
+extern bool bb_contains_loop_close_phi_nodes (basic_block);
+extern std::pair<edge, edge> get_edges (basic_block bb);
+extern void copy_loop_phi_args (gphi *, init_back_edge_pair_t &,
+ gphi *, init_back_edge_pair_t &,
+ sese_info_p, bool);
+extern bool copy_loop_close_phi_args (basic_block, basic_block,
+ sese_info_p, bool);
+extern bool copy_cond_phi_args (gphi *, gphi *, vec<tree>,
+ sese_info_p, bool);
/* Check that SESE contains LOOP. */
static inline bool
sese_contains_loop (sese_info_p sese, struct loop *loop)
{
- return bitmap_bit_p (SESE_LOOPS (sese), loop->num);
+ return bitmap_bit_p (sese->loops, loop->num);
}
/* The number of parameters in REGION. */
@@ -94,7 +138,7 @@ sese_contains_loop (sese_info_p sese, struct loop *loop)
static inline unsigned
sese_nb_params (sese_info_p region)
{
- return SESE_PARAMS (region).length ();
+ return region->params.length ();
}
/* Checks whether BB is contained in the region delimited by ENTRY and
@@ -239,6 +283,8 @@ recompute_all_dominators (void)
calculate_dominance_info (CDI_POST_DOMINATORS);
}
+typedef std::pair <gimple *, tree> scalar_use;
+
typedef struct gimple_poly_bb
{
basic_block bb;
@@ -267,6 +313,8 @@ typedef struct gimple_poly_bb
vec<gimple *> conditions;
vec<gimple *> condition_cases;
vec<data_reference_p> data_refs;
+ vec<scalar_use> read_scalar_refs;
+ vec<tree> write_scalar_refs;
} *gimple_poly_bb_p;
#define GBB_BB(GBB) (GBB)->bb
diff --git a/gcc/simplify-rtx.c b/gcc/simplify-rtx.c
index 17568baa8b0..c4fc42aebcf 100644
--- a/gcc/simplify-rtx.c
+++ b/gcc/simplify-rtx.c
@@ -714,6 +714,34 @@ simplify_truncation (machine_mode mode, rtx op,
return simplify_gen_binary (ASHIFT, mode,
XEXP (XEXP (op, 0), 0), XEXP (op, 1));
+ /* Likewise (truncate:QI (and:SI (lshiftrt:SI (x:SI) C) C2)) into
+ (and:QI (lshiftrt:QI (truncate:QI (x:SI)) C) C2) for suitable C
+ and C2. */
+ if (GET_CODE (op) == AND
+ && (GET_CODE (XEXP (op, 0)) == LSHIFTRT
+ || GET_CODE (XEXP (op, 0)) == ASHIFTRT)
+ && CONST_INT_P (XEXP (XEXP (op, 0), 1))
+ && CONST_INT_P (XEXP (op, 1)))
+ {
+ rtx op0 = (XEXP (XEXP (op, 0), 0));
+ rtx shift_op = XEXP (XEXP (op, 0), 1);
+ rtx mask_op = XEXP (op, 1);
+ unsigned HOST_WIDE_INT shift = UINTVAL (shift_op);
+ unsigned HOST_WIDE_INT mask = UINTVAL (mask_op);
+
+ if (shift < precision
+ /* If doing this transform works for an X with all bits set,
+ it works for any X. */
+ && ((GET_MODE_MASK (mode) >> shift) & mask)
+ == ((GET_MODE_MASK (op_mode) >> shift) & mask)
+ && (op0 = simplify_gen_unary (TRUNCATE, mode, op0, op_mode))
+ && (op0 = simplify_gen_binary (LSHIFTRT, mode, op0, shift_op)))
+ {
+ mask_op = GEN_INT (trunc_int_for_mode (mask, mode));
+ return simplify_gen_binary (AND, mode, op0, mask_op);
+ }
+ }
+
/* Recognize a word extraction from a multi-word subreg. */
if ((GET_CODE (op) == LSHIFTRT
|| GET_CODE (op) == ASHIFTRT)
diff --git a/gcc/spellcheck-tree.c b/gcc/spellcheck-tree.c
new file mode 100644
index 00000000000..d2037766eca
--- /dev/null
+++ b/gcc/spellcheck-tree.c
@@ -0,0 +1,39 @@
+/* Find near-matches for identifiers.
+ Copyright (C) 2015 Free Software Foundation, Inc.
+
+This file is part of GCC.
+
+GCC is free software; you can redistribute it and/or modify it under
+the terms of the GNU General Public License as published by the Free
+Software Foundation; either version 3, or (at your option) any later
+version.
+
+GCC is distributed in the hope that it will be useful, but WITHOUT ANY
+WARRANTY; without even the implied warranty of MERCHANTABILITY or
+FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+for more details.
+
+You should have received a copy of the GNU General Public License
+along with GCC; see the file COPYING3. If not see
+<http://www.gnu.org/licenses/>. */
+
+#include "config.h"
+#include "system.h"
+#include "coretypes.h"
+#include "tm.h"
+#include "tree.h"
+#include "spellcheck.h"
+
+/* Calculate Levenshtein distance between two identifiers. */
+
+edit_distance_t
+levenshtein_distance (tree ident_s, tree ident_t)
+{
+ gcc_assert (TREE_CODE (ident_s) == IDENTIFIER_NODE);
+ gcc_assert (TREE_CODE (ident_t) == IDENTIFIER_NODE);
+
+ return levenshtein_distance (IDENTIFIER_POINTER (ident_s),
+ IDENTIFIER_LENGTH (ident_s),
+ IDENTIFIER_POINTER (ident_t),
+ IDENTIFIER_LENGTH (ident_t));
+}
diff --git a/gcc/spellcheck.c b/gcc/spellcheck.c
new file mode 100644
index 00000000000..32854cf760e
--- /dev/null
+++ b/gcc/spellcheck.c
@@ -0,0 +1,121 @@
+/* Find near-matches for strings.
+ Copyright (C) 2015 Free Software Foundation, Inc.
+
+This file is part of GCC.
+
+GCC is free software; you can redistribute it and/or modify it under
+the terms of the GNU General Public License as published by the Free
+Software Foundation; either version 3, or (at your option) any later
+version.
+
+GCC is distributed in the hope that it will be useful, but WITHOUT ANY
+WARRANTY; without even the implied warranty of MERCHANTABILITY or
+FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+for more details.
+
+You should have received a copy of the GNU General Public License
+along with GCC; see the file COPYING3. If not see
+<http://www.gnu.org/licenses/>. */
+
+#include "config.h"
+#include "system.h"
+#include "coretypes.h"
+#include "tm.h"
+#include "tree.h"
+#include "spellcheck.h"
+
+/* The Levenshtein distance is an "edit-distance": the minimal
+ number of one-character insertions, removals or substitutions
+ that are needed to change one string into another.
+
+ This implementation uses the Wagner-Fischer algorithm. */
+
+edit_distance_t
+levenshtein_distance (const char *s, int len_s,
+ const char *t, int len_t)
+{
+ const bool debug = false;
+
+ if (debug)
+ {
+ printf ("s: \"%s\" (len_s=%i)\n", s, len_s);
+ printf ("t: \"%s\" (len_t=%i)\n", t, len_t);
+ }
+
+ if (len_s == 0)
+ return len_t;
+ if (len_t == 0)
+ return len_s;
+
+ /* We effectively build a matrix where each (i, j) contains the
+ Levenshtein distance between the prefix strings s[0:j]
+ and t[0:i].
+ Rather than actually build an (len_t + 1) * (len_s + 1) matrix,
+ we simply keep track of the last row, v0 and a new row, v1,
+ which avoids an (len_t + 1) * (len_s + 1) allocation and memory accesses
+ in favor of two (len_s + 1) allocations. These could potentially be
+ statically-allocated if we impose a maximum length on the
+ strings of interest. */
+ edit_distance_t *v0 = new edit_distance_t[len_s + 1];
+ edit_distance_t *v1 = new edit_distance_t[len_s + 1];
+
+ /* The first row is for the case of an empty target string, which
+ we can reach by deleting every character in the source string. */
+ for (int i = 0; i < len_s + 1; i++)
+ v0[i] = i;
+
+ /* Build successive rows. */
+ for (int i = 0; i < len_t; i++)
+ {
+ if (debug)
+ {
+ printf ("i:%i v0 = ", i);
+ for (int j = 0; j < len_s + 1; j++)
+ printf ("%i ", v0[j]);
+ printf ("\n");
+ }
+
+ /* The initial column is for the case of an empty source string; we
+ can reach prefixes of the target string of length i
+ by inserting i characters. */
+ v1[0] = i + 1;
+
+ /* Build the rest of the row by considering neighbours to
+ the north, west and northwest. */
+ for (int j = 0; j < len_s; j++)
+ {
+ edit_distance_t cost = (s[j] == t[i] ? 0 : 1);
+ edit_distance_t deletion = v1[j] + 1;
+ edit_distance_t insertion = v0[j + 1] + 1;
+ edit_distance_t substitution = v0[j] + cost;
+ edit_distance_t cheapest = MIN (deletion, insertion);
+ cheapest = MIN (cheapest, substitution);
+ v1[j + 1] = cheapest;
+ }
+
+ /* Prepare to move on to next row. */
+ for (int j = 0; j < len_s + 1; j++)
+ v0[j] = v1[j];
+ }
+
+ if (debug)
+ {
+ printf ("final v1 = ");
+ for (int j = 0; j < len_s + 1; j++)
+ printf ("%i ", v1[j]);
+ printf ("\n");
+ }
+
+ edit_distance_t result = v1[len_s];
+ delete[] v0;
+ delete[] v1;
+ return result;
+}
+
+/* Calculate Levenshtein distance between two nil-terminated strings. */
+
+edit_distance_t
+levenshtein_distance (const char *s, const char *t)
+{
+ return levenshtein_distance (s, strlen (s), t, strlen (t));
+}
diff --git a/gcc/spellcheck.h b/gcc/spellcheck.h
new file mode 100644
index 00000000000..673a7562510
--- /dev/null
+++ b/gcc/spellcheck.h
@@ -0,0 +1,36 @@
+/* Find near-matches for strings and identifiers.
+ Copyright (C) 2015 Free Software Foundation, Inc.
+
+This file is part of GCC.
+
+GCC is free software; you can redistribute it and/or modify it under
+the terms of the GNU General Public License as published by the Free
+Software Foundation; either version 3, or (at your option) any later
+version.
+
+GCC is distributed in the hope that it will be useful, but WITHOUT ANY
+WARRANTY; without even the implied warranty of MERCHANTABILITY or
+FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+for more details.
+
+You should have received a copy of the GNU General Public License
+along with GCC; see the file COPYING3. If not see
+<http://www.gnu.org/licenses/>. */
+
+#ifndef GCC_SPELLCHECK_H
+#define GCC_SPELLCHECK_H
+
+typedef unsigned int edit_distance_t;
+const edit_distance_t MAX_EDIT_DISTANCE = UINT_MAX;
+
+extern edit_distance_t
+levenshtein_distance (const char *s, int len_s,
+ const char *t, int len_t);
+
+extern edit_distance_t
+levenshtein_distance (const char *s, const char *t);
+
+extern edit_distance_t
+levenshtein_distance (tree ident_s, tree ident_t);
+
+#endif /* GCC_SPELLCHECK_H */
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index c99c62c7c52..ee92aaf3275 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,4233 @@
+2015-11-13 Ajit Agarwal <ajitkum@xilinx.com>
+ Jeff Law <law@redhat.com>
+
+ * gcc.dg/tree-ssa/split-path-1.c: New test.
+
+2015-11-13 Nathan Sidwell <nathan@codesourcery.com>
+
+ * c-c++-common/goacc/loop-auto-1.c: New.
+
+ * lib/target-supports.exp (check_effective_target_offload_nvptx): New.
+ * gcc.dg/goacc/nvptx-merged-loop.c: New.
+
+2015-11-13 Steven G. Kargl <kargl@gccc.gnu.org>
+
+ PR fortran/68319
+ * gfortran.dg/pr68319.f90: New test.
+
+2015-11-13 Michael Meissner <meissner@linux.vnet.ibm.com>
+
+ * gcc.target/powerpc/float128-hw.c: New test for IEEE 128-bit
+ hardware floating point support.
+
+ * gcc.target/powerpc/direct-move-vector.c: New test for 128-bit
+ vector direct move instructions.
+
+ * gcc.target/powerpc/maddld.c: New test.
+
+2015-11-13 Uros Bizjak <ubizjak@gmail.com>
+
+ * gcc.dg/pr68306.c (dg-additional-options): Add i?86-*-* target.
+ * gcc.dg/pr68306-2.c (dg-additional-options): Ditto.
+ * gcc.dg/pr68306-3.c (dg-additional-options): Ditto.
+
+2015-11-13 David Malcolm <dmalcolm@redhat.com>
+
+ * gcc.dg/diagnostic-token-ranges.c: New file.
+ * gcc.dg/diagnostic-tree-expr-ranges-2.c: New file.
+ * gcc.dg/plugin/diagnostic-test-expressions-1.c: New file.
+ * gcc.dg/plugin/diagnostic-test-show-trees-1.c: New file.
+ * gcc.dg/plugin/diagnostic_plugin_show_trees.c: New file.
+ * gcc.dg/plugin/diagnostic_plugin_test_show_locus.c (get_loc): Add
+ line_table param when calling
+ linemap_position_for_line_and_column.
+ (test_show_locus): Pass line_table to rich_location ctors.
+ (plugin_init): Remove setting of global_dc->colorize_source_p.
+ * gcc.dg/plugin/diagnostic_plugin_test_tree_expression_range.c:
+ New file.
+ * gcc.dg/plugin/plugin.exp (plugin_test_list): Add
+ diagnostic_plugin_test_tree_expression_range.c,
+ diagnostic-test-expressions-1.c, diagnostic_plugin_show_trees.c,
+ and diagnostic-test-show-trees-1.c.
+
+2015-11-13 Alan Lawrence <alan.lawrence@arm.com>
+
+ PR tree-optimization/67682
+ * gcc.dg/vect/bb-slp-7.c (main1): Make subgroups non-isomorphic.
+ * gcc.dg/vect/bb-slp-subgroups-1.c: New.
+ * gcc.dg/vect/bb-slp-subgroups-2.c: New.
+ * gcc.dg/vect/bb-slp-subgroups-3.c: New.
+
+2015-11-13 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
+
+ * gcc.target/aarch64/umaddl_combine_1.c: New test.
+
+2015-11-13 Richard Sandiford <richard.sandiford@arm.com>
+
+ PR tree-optimization/68264
+ * gcc.dg/torture/pr68264.c: New test.
+
+2015-11-13 Marek Polacek <polacek@redhat.com>
+
+ PR c/68320
+ * gcc.dg/pr68320.c: New test.
+
+2015-11-13 Nathan Sidwell <nathan@codesourcery.com>
+
+ * c-c++-common/goacc/data-default-1.c: Correct expected
+ diagnostic.
+
+2015-11-13 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/68306
+ * gcc.dg/pr68306.c: Adjust.
+ * gcc.dg/pr68306-2.c: New testcase.
+ * gcc.dg/pr68306-3.c: Likewise.
+
+2015-11-13 Ilya Enkovich <enkovich.gnu@gmail.com>
+
+ * g++.dg/vect/simd-bool-comparison-1.cc: New test.
+ * g++.dg/vect/simd-bool-comparison-2.cc: New test.
+
+2015-11-13 Dominique d'Humieres <dominiq@lps.ens.fr>
+
+ PR fortran/47266
+ * gfortran.dg/module_private_2.f90: New test.
+
+2015-11-13 Dominique d'Humieres <dominiq@lps.ens.fr>
+
+ PR fortran/47266
+ * gfortran.dg/warn_unused_function_2.f90: New test.
+
+2015-11-13 Christophe Lyon <christophe.lyon@linaro.org>
+
+ Revert [ARM] Remove neon-testgen.ml and generated tests.
+ 2015-11-12 Christophe Lyon <christophe.lyon@linaro.org>
+
+ * gcc.target/arm/neon/vRaddhns16.c: Remove.
+ * gcc.target/arm/neon/vRaddhns32.c: Remove.
+ * gcc.target/arm/neon/vRaddhns64.c: Remove.
+ * gcc.target/arm/neon/vRaddhnu16.c: Remove.
+ * gcc.target/arm/neon/vRaddhnu32.c: Remove.
+ * gcc.target/arm/neon/vRaddhnu64.c: Remove.
+ * gcc.target/arm/neon/vRhaddQs16.c: Remove.
+ * gcc.target/arm/neon/vRhaddQs32.c: Remove.
+ * gcc.target/arm/neon/vRhaddQs8.c: Remove.
+ * gcc.target/arm/neon/vRhaddQu16.c: Remove.
+ * gcc.target/arm/neon/vRhaddQu32.c: Remove.
+ * gcc.target/arm/neon/vRhaddQu8.c: Remove.
+ * gcc.target/arm/neon/vRhadds16.c: Remove.
+ * gcc.target/arm/neon/vRhadds32.c: Remove.
+ * gcc.target/arm/neon/vRhadds8.c: Remove.
+ * gcc.target/arm/neon/vRhaddu16.c: Remove.
+ * gcc.target/arm/neon/vRhaddu32.c: Remove.
+ * gcc.target/arm/neon/vRhaddu8.c: Remove.
+ * gcc.target/arm/neon/vRshlQs16.c: Remove.
+ * gcc.target/arm/neon/vRshlQs32.c: Remove.
+ * gcc.target/arm/neon/vRshlQs64.c: Remove.
+ * gcc.target/arm/neon/vRshlQs8.c: Remove.
+ * gcc.target/arm/neon/vRshlQu16.c: Remove.
+ * gcc.target/arm/neon/vRshlQu32.c: Remove.
+ * gcc.target/arm/neon/vRshlQu64.c: Remove.
+ * gcc.target/arm/neon/vRshlQu8.c: Remove.
+ * gcc.target/arm/neon/vRshls16.c: Remove.
+ * gcc.target/arm/neon/vRshls32.c: Remove.
+ * gcc.target/arm/neon/vRshls64.c: Remove.
+ * gcc.target/arm/neon/vRshls8.c: Remove.
+ * gcc.target/arm/neon/vRshlu16.c: Remove.
+ * gcc.target/arm/neon/vRshlu32.c: Remove.
+ * gcc.target/arm/neon/vRshlu64.c: Remove.
+ * gcc.target/arm/neon/vRshlu8.c: Remove.
+ * gcc.target/arm/neon/vRshrQ_ns16.c: Remove.
+ * gcc.target/arm/neon/vRshrQ_ns32.c: Remove.
+ * gcc.target/arm/neon/vRshrQ_ns64.c: Remove.
+ * gcc.target/arm/neon/vRshrQ_ns8.c: Remove.
+ * gcc.target/arm/neon/vRshrQ_nu16.c: Remove.
+ * gcc.target/arm/neon/vRshrQ_nu32.c: Remove.
+ * gcc.target/arm/neon/vRshrQ_nu64.c: Remove.
+ * gcc.target/arm/neon/vRshrQ_nu8.c: Remove.
+ * gcc.target/arm/neon/vRshr_ns16.c: Remove.
+ * gcc.target/arm/neon/vRshr_ns32.c: Remove.
+ * gcc.target/arm/neon/vRshr_ns64.c: Remove.
+ * gcc.target/arm/neon/vRshr_ns8.c: Remove.
+ * gcc.target/arm/neon/vRshr_nu16.c: Remove.
+ * gcc.target/arm/neon/vRshr_nu32.c: Remove.
+ * gcc.target/arm/neon/vRshr_nu64.c: Remove.
+ * gcc.target/arm/neon/vRshr_nu8.c: Remove.
+ * gcc.target/arm/neon/vRshrn_ns16.c: Remove.
+ * gcc.target/arm/neon/vRshrn_ns32.c: Remove.
+ * gcc.target/arm/neon/vRshrn_ns64.c: Remove.
+ * gcc.target/arm/neon/vRshrn_nu16.c: Remove.
+ * gcc.target/arm/neon/vRshrn_nu32.c: Remove.
+ * gcc.target/arm/neon/vRshrn_nu64.c: Remove.
+ * gcc.target/arm/neon/vRsraQ_ns16.c: Remove.
+ * gcc.target/arm/neon/vRsraQ_ns32.c: Remove.
+ * gcc.target/arm/neon/vRsraQ_ns64.c: Remove.
+ * gcc.target/arm/neon/vRsraQ_ns8.c: Remove.
+ * gcc.target/arm/neon/vRsraQ_nu16.c: Remove.
+ * gcc.target/arm/neon/vRsraQ_nu32.c: Remove.
+ * gcc.target/arm/neon/vRsraQ_nu64.c: Remove.
+ * gcc.target/arm/neon/vRsraQ_nu8.c: Remove.
+ * gcc.target/arm/neon/vRsra_ns16.c: Remove.
+ * gcc.target/arm/neon/vRsra_ns32.c: Remove.
+ * gcc.target/arm/neon/vRsra_ns64.c: Remove.
+ * gcc.target/arm/neon/vRsra_ns8.c: Remove.
+ * gcc.target/arm/neon/vRsra_nu16.c: Remove.
+ * gcc.target/arm/neon/vRsra_nu32.c: Remove.
+ * gcc.target/arm/neon/vRsra_nu64.c: Remove.
+ * gcc.target/arm/neon/vRsra_nu8.c: Remove.
+ * gcc.target/arm/neon/vRsubhns16.c: Remove.
+ * gcc.target/arm/neon/vRsubhns32.c: Remove.
+ * gcc.target/arm/neon/vRsubhns64.c: Remove.
+ * gcc.target/arm/neon/vRsubhnu16.c: Remove.
+ * gcc.target/arm/neon/vRsubhnu32.c: Remove.
+ * gcc.target/arm/neon/vRsubhnu64.c: Remove.
+ * gcc.target/arm/neon/vabaQs16.c: Remove.
+ * gcc.target/arm/neon/vabaQs32.c: Remove.
+ * gcc.target/arm/neon/vabaQs8.c: Remove.
+ * gcc.target/arm/neon/vabaQu16.c: Remove.
+ * gcc.target/arm/neon/vabaQu32.c: Remove.
+ * gcc.target/arm/neon/vabaQu8.c: Remove.
+ * gcc.target/arm/neon/vabals16.c: Remove.
+ * gcc.target/arm/neon/vabals32.c: Remove.
+ * gcc.target/arm/neon/vabals8.c: Remove.
+ * gcc.target/arm/neon/vabalu16.c: Remove.
+ * gcc.target/arm/neon/vabalu32.c: Remove.
+ * gcc.target/arm/neon/vabalu8.c: Remove.
+ * gcc.target/arm/neon/vabas16.c: Remove.
+ * gcc.target/arm/neon/vabas32.c: Remove.
+ * gcc.target/arm/neon/vabas8.c: Remove.
+ * gcc.target/arm/neon/vabau16.c: Remove.
+ * gcc.target/arm/neon/vabau32.c: Remove.
+ * gcc.target/arm/neon/vabau8.c: Remove.
+ * gcc.target/arm/neon/vabdQf32.c: Remove.
+ * gcc.target/arm/neon/vabdQs16.c: Remove.
+ * gcc.target/arm/neon/vabdQs32.c: Remove.
+ * gcc.target/arm/neon/vabdQs8.c: Remove.
+ * gcc.target/arm/neon/vabdQu16.c: Remove.
+ * gcc.target/arm/neon/vabdQu32.c: Remove.
+ * gcc.target/arm/neon/vabdQu8.c: Remove.
+ * gcc.target/arm/neon/vabdf32.c: Remove.
+ * gcc.target/arm/neon/vabdls16.c: Remove.
+ * gcc.target/arm/neon/vabdls32.c: Remove.
+ * gcc.target/arm/neon/vabdls8.c: Remove.
+ * gcc.target/arm/neon/vabdlu16.c: Remove.
+ * gcc.target/arm/neon/vabdlu32.c: Remove.
+ * gcc.target/arm/neon/vabdlu8.c: Remove.
+ * gcc.target/arm/neon/vabds16.c: Remove.
+ * gcc.target/arm/neon/vabds32.c: Remove.
+ * gcc.target/arm/neon/vabds8.c: Remove.
+ * gcc.target/arm/neon/vabdu16.c: Remove.
+ * gcc.target/arm/neon/vabdu32.c: Remove.
+ * gcc.target/arm/neon/vabdu8.c: Remove.
+ * gcc.target/arm/neon/vabsQf32.c: Remove.
+ * gcc.target/arm/neon/vabsQs16.c: Remove.
+ * gcc.target/arm/neon/vabsQs32.c: Remove.
+ * gcc.target/arm/neon/vabsQs8.c: Remove.
+ * gcc.target/arm/neon/vabsf32.c: Remove.
+ * gcc.target/arm/neon/vabss16.c: Remove.
+ * gcc.target/arm/neon/vabss32.c: Remove.
+ * gcc.target/arm/neon/vabss8.c: Remove.
+ * gcc.target/arm/neon/vaddQf32.c: Remove.
+ * gcc.target/arm/neon/vaddQs16.c: Remove.
+ * gcc.target/arm/neon/vaddQs32.c: Remove.
+ * gcc.target/arm/neon/vaddQs64.c: Remove.
+ * gcc.target/arm/neon/vaddQs8.c: Remove.
+ * gcc.target/arm/neon/vaddQu16.c: Remove.
+ * gcc.target/arm/neon/vaddQu32.c: Remove.
+ * gcc.target/arm/neon/vaddQu64.c: Remove.
+ * gcc.target/arm/neon/vaddQu8.c: Remove.
+ * gcc.target/arm/neon/vaddf32.c: Remove.
+ * gcc.target/arm/neon/vaddhns16.c: Remove.
+ * gcc.target/arm/neon/vaddhns32.c: Remove.
+ * gcc.target/arm/neon/vaddhns64.c: Remove.
+ * gcc.target/arm/neon/vaddhnu16.c: Remove.
+ * gcc.target/arm/neon/vaddhnu32.c: Remove.
+ * gcc.target/arm/neon/vaddhnu64.c: Remove.
+ * gcc.target/arm/neon/vaddls16.c: Remove.
+ * gcc.target/arm/neon/vaddls32.c: Remove.
+ * gcc.target/arm/neon/vaddls8.c: Remove.
+ * gcc.target/arm/neon/vaddlu16.c: Remove.
+ * gcc.target/arm/neon/vaddlu32.c: Remove.
+ * gcc.target/arm/neon/vaddlu8.c: Remove.
+ * gcc.target/arm/neon/vadds16.c: Remove.
+ * gcc.target/arm/neon/vadds32.c: Remove.
+ * gcc.target/arm/neon/vadds64.c: Remove.
+ * gcc.target/arm/neon/vadds8.c: Remove.
+ * gcc.target/arm/neon/vaddu16.c: Remove.
+ * gcc.target/arm/neon/vaddu32.c: Remove.
+ * gcc.target/arm/neon/vaddu64.c: Remove.
+ * gcc.target/arm/neon/vaddu8.c: Remove.
+ * gcc.target/arm/neon/vaddws16.c: Remove.
+ * gcc.target/arm/neon/vaddws32.c: Remove.
+ * gcc.target/arm/neon/vaddws8.c: Remove.
+ * gcc.target/arm/neon/vaddwu16.c: Remove.
+ * gcc.target/arm/neon/vaddwu32.c: Remove.
+ * gcc.target/arm/neon/vaddwu8.c: Remove.
+ * gcc.target/arm/neon/vandQs16.c: Remove.
+ * gcc.target/arm/neon/vandQs32.c: Remove.
+ * gcc.target/arm/neon/vandQs64.c: Remove.
+ * gcc.target/arm/neon/vandQs8.c: Remove.
+ * gcc.target/arm/neon/vandQu16.c: Remove.
+ * gcc.target/arm/neon/vandQu32.c: Remove.
+ * gcc.target/arm/neon/vandQu64.c: Remove.
+ * gcc.target/arm/neon/vandQu8.c: Remove.
+ * gcc.target/arm/neon/vands16.c: Remove.
+ * gcc.target/arm/neon/vands32.c: Remove.
+ * gcc.target/arm/neon/vands64.c: Remove.
+ * gcc.target/arm/neon/vands8.c: Remove.
+ * gcc.target/arm/neon/vandu16.c: Remove.
+ * gcc.target/arm/neon/vandu32.c: Remove.
+ * gcc.target/arm/neon/vandu64.c: Remove.
+ * gcc.target/arm/neon/vandu8.c: Remove.
+ * gcc.target/arm/neon/vbicQs16.c: Remove.
+ * gcc.target/arm/neon/vbicQs32.c: Remove.
+ * gcc.target/arm/neon/vbicQs64.c: Remove.
+ * gcc.target/arm/neon/vbicQs8.c: Remove.
+ * gcc.target/arm/neon/vbicQu16.c: Remove.
+ * gcc.target/arm/neon/vbicQu32.c: Remove.
+ * gcc.target/arm/neon/vbicQu64.c: Remove.
+ * gcc.target/arm/neon/vbicQu8.c: Remove.
+ * gcc.target/arm/neon/vbics16.c: Remove.
+ * gcc.target/arm/neon/vbics32.c: Remove.
+ * gcc.target/arm/neon/vbics64.c: Remove.
+ * gcc.target/arm/neon/vbics8.c: Remove.
+ * gcc.target/arm/neon/vbicu16.c: Remove.
+ * gcc.target/arm/neon/vbicu32.c: Remove.
+ * gcc.target/arm/neon/vbicu64.c: Remove.
+ * gcc.target/arm/neon/vbicu8.c: Remove.
+ * gcc.target/arm/neon/vbslQf32.c: Remove.
+ * gcc.target/arm/neon/vbslQp16.c: Remove.
+ * gcc.target/arm/neon/vbslQp64.c: Remove.
+ * gcc.target/arm/neon/vbslQp8.c: Remove.
+ * gcc.target/arm/neon/vbslQs16.c: Remove.
+ * gcc.target/arm/neon/vbslQs32.c: Remove.
+ * gcc.target/arm/neon/vbslQs64.c: Remove.
+ * gcc.target/arm/neon/vbslQs8.c: Remove.
+ * gcc.target/arm/neon/vbslQu16.c: Remove.
+ * gcc.target/arm/neon/vbslQu32.c: Remove.
+ * gcc.target/arm/neon/vbslQu64.c: Remove.
+ * gcc.target/arm/neon/vbslQu8.c: Remove.
+ * gcc.target/arm/neon/vbslf32.c: Remove.
+ * gcc.target/arm/neon/vbslp16.c: Remove.
+ * gcc.target/arm/neon/vbslp64.c: Remove.
+ * gcc.target/arm/neon/vbslp8.c: Remove.
+ * gcc.target/arm/neon/vbsls16.c: Remove.
+ * gcc.target/arm/neon/vbsls32.c: Remove.
+ * gcc.target/arm/neon/vbsls64.c: Remove.
+ * gcc.target/arm/neon/vbsls8.c: Remove.
+ * gcc.target/arm/neon/vbslu16.c: Remove.
+ * gcc.target/arm/neon/vbslu32.c: Remove.
+ * gcc.target/arm/neon/vbslu64.c: Remove.
+ * gcc.target/arm/neon/vbslu8.c: Remove.
+ * gcc.target/arm/neon/vcageQf32.c: Remove.
+ * gcc.target/arm/neon/vcagef32.c: Remove.
+ * gcc.target/arm/neon/vcagtQf32.c: Remove.
+ * gcc.target/arm/neon/vcagtf32.c: Remove.
+ * gcc.target/arm/neon/vcaleQf32.c: Remove.
+ * gcc.target/arm/neon/vcalef32.c: Remove.
+ * gcc.target/arm/neon/vcaltQf32.c: Remove.
+ * gcc.target/arm/neon/vcaltf32.c: Remove.
+ * gcc.target/arm/neon/vceqQf32.c: Remove.
+ * gcc.target/arm/neon/vceqQp8.c: Remove.
+ * gcc.target/arm/neon/vceqQs16.c: Remove.
+ * gcc.target/arm/neon/vceqQs32.c: Remove.
+ * gcc.target/arm/neon/vceqQs8.c: Remove.
+ * gcc.target/arm/neon/vceqQu16.c: Remove.
+ * gcc.target/arm/neon/vceqQu32.c: Remove.
+ * gcc.target/arm/neon/vceqQu8.c: Remove.
+ * gcc.target/arm/neon/vceqf32.c: Remove.
+ * gcc.target/arm/neon/vceqp8.c: Remove.
+ * gcc.target/arm/neon/vceqs16.c: Remove.
+ * gcc.target/arm/neon/vceqs32.c: Remove.
+ * gcc.target/arm/neon/vceqs8.c: Remove.
+ * gcc.target/arm/neon/vcequ16.c: Remove.
+ * gcc.target/arm/neon/vcequ32.c: Remove.
+ * gcc.target/arm/neon/vcequ8.c: Remove.
+ * gcc.target/arm/neon/vcgeQf32.c: Remove.
+ * gcc.target/arm/neon/vcgeQs16.c: Remove.
+ * gcc.target/arm/neon/vcgeQs32.c: Remove.
+ * gcc.target/arm/neon/vcgeQs8.c: Remove.
+ * gcc.target/arm/neon/vcgeQu16.c: Remove.
+ * gcc.target/arm/neon/vcgeQu32.c: Remove.
+ * gcc.target/arm/neon/vcgeQu8.c: Remove.
+ * gcc.target/arm/neon/vcgef32.c: Remove.
+ * gcc.target/arm/neon/vcges16.c: Remove.
+ * gcc.target/arm/neon/vcges32.c: Remove.
+ * gcc.target/arm/neon/vcges8.c: Remove.
+ * gcc.target/arm/neon/vcgeu16.c: Remove.
+ * gcc.target/arm/neon/vcgeu32.c: Remove.
+ * gcc.target/arm/neon/vcgeu8.c: Remove.
+ * gcc.target/arm/neon/vcgtQf32.c: Remove.
+ * gcc.target/arm/neon/vcgtQs16.c: Remove.
+ * gcc.target/arm/neon/vcgtQs32.c: Remove.
+ * gcc.target/arm/neon/vcgtQs8.c: Remove.
+ * gcc.target/arm/neon/vcgtQu16.c: Remove.
+ * gcc.target/arm/neon/vcgtQu32.c: Remove.
+ * gcc.target/arm/neon/vcgtQu8.c: Remove.
+ * gcc.target/arm/neon/vcgtf32.c: Remove.
+ * gcc.target/arm/neon/vcgts16.c: Remove.
+ * gcc.target/arm/neon/vcgts32.c: Remove.
+ * gcc.target/arm/neon/vcgts8.c: Remove.
+ * gcc.target/arm/neon/vcgtu16.c: Remove.
+ * gcc.target/arm/neon/vcgtu32.c: Remove.
+ * gcc.target/arm/neon/vcgtu8.c: Remove.
+ * gcc.target/arm/neon/vcleQf32.c: Remove.
+ * gcc.target/arm/neon/vcleQs16.c: Remove.
+ * gcc.target/arm/neon/vcleQs32.c: Remove.
+ * gcc.target/arm/neon/vcleQs8.c: Remove.
+ * gcc.target/arm/neon/vcleQu16.c: Remove.
+ * gcc.target/arm/neon/vcleQu32.c: Remove.
+ * gcc.target/arm/neon/vcleQu8.c: Remove.
+ * gcc.target/arm/neon/vclef32.c: Remove.
+ * gcc.target/arm/neon/vcles16.c: Remove.
+ * gcc.target/arm/neon/vcles32.c: Remove.
+ * gcc.target/arm/neon/vcles8.c: Remove.
+ * gcc.target/arm/neon/vcleu16.c: Remove.
+ * gcc.target/arm/neon/vcleu32.c: Remove.
+ * gcc.target/arm/neon/vcleu8.c: Remove.
+ * gcc.target/arm/neon/vclsQs16.c: Remove.
+ * gcc.target/arm/neon/vclsQs32.c: Remove.
+ * gcc.target/arm/neon/vclsQs8.c: Remove.
+ * gcc.target/arm/neon/vclss16.c: Remove.
+ * gcc.target/arm/neon/vclss32.c: Remove.
+ * gcc.target/arm/neon/vclss8.c: Remove.
+ * gcc.target/arm/neon/vcltQf32.c: Remove.
+ * gcc.target/arm/neon/vcltQs16.c: Remove.
+ * gcc.target/arm/neon/vcltQs32.c: Remove.
+ * gcc.target/arm/neon/vcltQs8.c: Remove.
+ * gcc.target/arm/neon/vcltQu16.c: Remove.
+ * gcc.target/arm/neon/vcltQu32.c: Remove.
+ * gcc.target/arm/neon/vcltQu8.c: Remove.
+ * gcc.target/arm/neon/vcltf32.c: Remove.
+ * gcc.target/arm/neon/vclts16.c: Remove.
+ * gcc.target/arm/neon/vclts32.c: Remove.
+ * gcc.target/arm/neon/vclts8.c: Remove.
+ * gcc.target/arm/neon/vcltu16.c: Remove.
+ * gcc.target/arm/neon/vcltu32.c: Remove.
+ * gcc.target/arm/neon/vcltu8.c: Remove.
+ * gcc.target/arm/neon/vclzQs16.c: Remove.
+ * gcc.target/arm/neon/vclzQs32.c: Remove.
+ * gcc.target/arm/neon/vclzQs8.c: Remove.
+ * gcc.target/arm/neon/vclzQu16.c: Remove.
+ * gcc.target/arm/neon/vclzQu32.c: Remove.
+ * gcc.target/arm/neon/vclzQu8.c: Remove.
+ * gcc.target/arm/neon/vclzs16.c: Remove.
+ * gcc.target/arm/neon/vclzs32.c: Remove.
+ * gcc.target/arm/neon/vclzs8.c: Remove.
+ * gcc.target/arm/neon/vclzu16.c: Remove.
+ * gcc.target/arm/neon/vclzu32.c: Remove.
+ * gcc.target/arm/neon/vclzu8.c: Remove.
+ * gcc.target/arm/neon/vcntQp8.c: Remove.
+ * gcc.target/arm/neon/vcntQs8.c: Remove.
+ * gcc.target/arm/neon/vcntQu8.c: Remove.
+ * gcc.target/arm/neon/vcntp8.c: Remove.
+ * gcc.target/arm/neon/vcnts8.c: Remove.
+ * gcc.target/arm/neon/vcntu8.c: Remove.
+ * gcc.target/arm/neon/vcombinef32.c: Remove.
+ * gcc.target/arm/neon/vcombinep16.c: Remove.
+ * gcc.target/arm/neon/vcombinep64.c: Remove.
+ * gcc.target/arm/neon/vcombinep8.c: Remove.
+ * gcc.target/arm/neon/vcombines16.c: Remove.
+ * gcc.target/arm/neon/vcombines32.c: Remove.
+ * gcc.target/arm/neon/vcombines64.c: Remove.
+ * gcc.target/arm/neon/vcombines8.c: Remove.
+ * gcc.target/arm/neon/vcombineu16.c: Remove.
+ * gcc.target/arm/neon/vcombineu32.c: Remove.
+ * gcc.target/arm/neon/vcombineu64.c: Remove.
+ * gcc.target/arm/neon/vcombineu8.c: Remove.
+ * gcc.target/arm/neon/vcreatef32.c: Remove.
+ * gcc.target/arm/neon/vcreatep16.c: Remove.
+ * gcc.target/arm/neon/vcreatep64.c: Remove.
+ * gcc.target/arm/neon/vcreatep8.c: Remove.
+ * gcc.target/arm/neon/vcreates16.c: Remove.
+ * gcc.target/arm/neon/vcreates32.c: Remove.
+ * gcc.target/arm/neon/vcreates64.c: Remove.
+ * gcc.target/arm/neon/vcreates8.c: Remove.
+ * gcc.target/arm/neon/vcreateu16.c: Remove.
+ * gcc.target/arm/neon/vcreateu32.c: Remove.
+ * gcc.target/arm/neon/vcreateu64.c: Remove.
+ * gcc.target/arm/neon/vcreateu8.c: Remove.
+ * gcc.target/arm/neon/vcvtQ_nf32_s32.c: Remove.
+ * gcc.target/arm/neon/vcvtQ_nf32_u32.c: Remove.
+ * gcc.target/arm/neon/vcvtQ_ns32_f32.c: Remove.
+ * gcc.target/arm/neon/vcvtQ_nu32_f32.c: Remove.
+ * gcc.target/arm/neon/vcvtQf32_s32.c: Remove.
+ * gcc.target/arm/neon/vcvtQf32_u32.c: Remove.
+ * gcc.target/arm/neon/vcvtQs32_f32.c: Remove.
+ * gcc.target/arm/neon/vcvtQu32_f32.c: Remove.
+ * gcc.target/arm/neon/vcvt_nf32_s32.c: Remove.
+ * gcc.target/arm/neon/vcvt_nf32_u32.c: Remove.
+ * gcc.target/arm/neon/vcvt_ns32_f32.c: Remove.
+ * gcc.target/arm/neon/vcvt_nu32_f32.c: Remove.
+ * gcc.target/arm/neon/vcvtf16_f32.c: Remove.
+ * gcc.target/arm/neon/vcvtf32_f16.c: Remove.
+ * gcc.target/arm/neon/vcvtf32_s32.c: Remove.
+ * gcc.target/arm/neon/vcvtf32_u32.c: Remove.
+ * gcc.target/arm/neon/vcvts32_f32.c: Remove.
+ * gcc.target/arm/neon/vcvtu32_f32.c: Remove.
+ * gcc.target/arm/neon/vdupQ_lanef32.c: Remove.
+ * gcc.target/arm/neon/vdupQ_lanep16.c: Remove.
+ * gcc.target/arm/neon/vdupQ_lanep64.c: Remove.
+ * gcc.target/arm/neon/vdupQ_lanep8.c: Remove.
+ * gcc.target/arm/neon/vdupQ_lanes16.c: Remove.
+ * gcc.target/arm/neon/vdupQ_lanes32.c: Remove.
+ * gcc.target/arm/neon/vdupQ_lanes64.c: Remove.
+ * gcc.target/arm/neon/vdupQ_lanes8.c: Remove.
+ * gcc.target/arm/neon/vdupQ_laneu16.c: Remove.
+ * gcc.target/arm/neon/vdupQ_laneu32.c: Remove.
+ * gcc.target/arm/neon/vdupQ_laneu64.c: Remove.
+ * gcc.target/arm/neon/vdupQ_laneu8.c: Remove.
+ * gcc.target/arm/neon/vdupQ_nf32.c: Remove.
+ * gcc.target/arm/neon/vdupQ_np16.c: Remove.
+ * gcc.target/arm/neon/vdupQ_np64.c: Remove.
+ * gcc.target/arm/neon/vdupQ_np8.c: Remove.
+ * gcc.target/arm/neon/vdupQ_ns16.c: Remove.
+ * gcc.target/arm/neon/vdupQ_ns32.c: Remove.
+ * gcc.target/arm/neon/vdupQ_ns64.c: Remove.
+ * gcc.target/arm/neon/vdupQ_ns8.c: Remove.
+ * gcc.target/arm/neon/vdupQ_nu16.c: Remove.
+ * gcc.target/arm/neon/vdupQ_nu32.c: Remove.
+ * gcc.target/arm/neon/vdupQ_nu64.c: Remove.
+ * gcc.target/arm/neon/vdupQ_nu8.c: Remove.
+ * gcc.target/arm/neon/vdup_lanef32.c: Remove.
+ * gcc.target/arm/neon/vdup_lanep16.c: Remove.
+ * gcc.target/arm/neon/vdup_lanep64.c: Remove.
+ * gcc.target/arm/neon/vdup_lanep8.c: Remove.
+ * gcc.target/arm/neon/vdup_lanes16.c: Remove.
+ * gcc.target/arm/neon/vdup_lanes32.c: Remove.
+ * gcc.target/arm/neon/vdup_lanes64.c: Remove.
+ * gcc.target/arm/neon/vdup_lanes8.c: Remove.
+ * gcc.target/arm/neon/vdup_laneu16.c: Remove.
+ * gcc.target/arm/neon/vdup_laneu32.c: Remove.
+ * gcc.target/arm/neon/vdup_laneu64.c: Remove.
+ * gcc.target/arm/neon/vdup_laneu8.c: Remove.
+ * gcc.target/arm/neon/vdup_nf32.c: Remove.
+ * gcc.target/arm/neon/vdup_np16.c: Remove.
+ * gcc.target/arm/neon/vdup_np64.c: Remove.
+ * gcc.target/arm/neon/vdup_np8.c: Remove.
+ * gcc.target/arm/neon/vdup_ns16.c: Remove.
+ * gcc.target/arm/neon/vdup_ns32.c: Remove.
+ * gcc.target/arm/neon/vdup_ns64.c: Remove.
+ * gcc.target/arm/neon/vdup_ns8.c: Remove.
+ * gcc.target/arm/neon/vdup_nu16.c: Remove.
+ * gcc.target/arm/neon/vdup_nu32.c: Remove.
+ * gcc.target/arm/neon/vdup_nu64.c: Remove.
+ * gcc.target/arm/neon/vdup_nu8.c: Remove.
+ * gcc.target/arm/neon/veorQs16.c: Remove.
+ * gcc.target/arm/neon/veorQs32.c: Remove.
+ * gcc.target/arm/neon/veorQs64.c: Remove.
+ * gcc.target/arm/neon/veorQs8.c: Remove.
+ * gcc.target/arm/neon/veorQu16.c: Remove.
+ * gcc.target/arm/neon/veorQu32.c: Remove.
+ * gcc.target/arm/neon/veorQu64.c: Remove.
+ * gcc.target/arm/neon/veorQu8.c: Remove.
+ * gcc.target/arm/neon/veors16.c: Remove.
+ * gcc.target/arm/neon/veors32.c: Remove.
+ * gcc.target/arm/neon/veors64.c: Remove.
+ * gcc.target/arm/neon/veors8.c: Remove.
+ * gcc.target/arm/neon/veoru16.c: Remove.
+ * gcc.target/arm/neon/veoru32.c: Remove.
+ * gcc.target/arm/neon/veoru64.c: Remove.
+ * gcc.target/arm/neon/veoru8.c: Remove.
+ * gcc.target/arm/neon/vextQf32.c: Remove.
+ * gcc.target/arm/neon/vextQp16.c: Remove.
+ * gcc.target/arm/neon/vextQp64.c: Remove.
+ * gcc.target/arm/neon/vextQp8.c: Remove.
+ * gcc.target/arm/neon/vextQs16.c: Remove.
+ * gcc.target/arm/neon/vextQs32.c: Remove.
+ * gcc.target/arm/neon/vextQs64.c: Remove.
+ * gcc.target/arm/neon/vextQs8.c: Remove.
+ * gcc.target/arm/neon/vextQu16.c: Remove.
+ * gcc.target/arm/neon/vextQu32.c: Remove.
+ * gcc.target/arm/neon/vextQu64.c: Remove.
+ * gcc.target/arm/neon/vextQu8.c: Remove.
+ * gcc.target/arm/neon/vextf32.c: Remove.
+ * gcc.target/arm/neon/vextp16.c: Remove.
+ * gcc.target/arm/neon/vextp64.c: Remove.
+ * gcc.target/arm/neon/vextp8.c: Remove.
+ * gcc.target/arm/neon/vexts16.c: Remove.
+ * gcc.target/arm/neon/vexts32.c: Remove.
+ * gcc.target/arm/neon/vexts64.c: Remove.
+ * gcc.target/arm/neon/vexts8.c: Remove.
+ * gcc.target/arm/neon/vextu16.c: Remove.
+ * gcc.target/arm/neon/vextu32.c: Remove.
+ * gcc.target/arm/neon/vextu64.c: Remove.
+ * gcc.target/arm/neon/vextu8.c: Remove.
+ * gcc.target/arm/neon/vfmaQf32.c: Remove.
+ * gcc.target/arm/neon/vfmaf32.c: Remove.
+ * gcc.target/arm/neon/vfmsQf32.c: Remove.
+ * gcc.target/arm/neon/vfmsf32.c: Remove.
+ * gcc.target/arm/neon/vgetQ_lanef32.c: Remove.
+ * gcc.target/arm/neon/vgetQ_lanep16.c: Remove.
+ * gcc.target/arm/neon/vgetQ_lanep8.c: Remove.
+ * gcc.target/arm/neon/vgetQ_lanes16.c: Remove.
+ * gcc.target/arm/neon/vgetQ_lanes32.c: Remove.
+ * gcc.target/arm/neon/vgetQ_lanes64.c: Remove.
+ * gcc.target/arm/neon/vgetQ_lanes8.c: Remove.
+ * gcc.target/arm/neon/vgetQ_laneu16.c: Remove.
+ * gcc.target/arm/neon/vgetQ_laneu32.c: Remove.
+ * gcc.target/arm/neon/vgetQ_laneu64.c: Remove.
+ * gcc.target/arm/neon/vgetQ_laneu8.c: Remove.
+ * gcc.target/arm/neon/vget_highf32.c: Remove.
+ * gcc.target/arm/neon/vget_highp16.c: Remove.
+ * gcc.target/arm/neon/vget_highp64.c: Remove.
+ * gcc.target/arm/neon/vget_highp8.c: Remove.
+ * gcc.target/arm/neon/vget_highs16.c: Remove.
+ * gcc.target/arm/neon/vget_highs32.c: Remove.
+ * gcc.target/arm/neon/vget_highs64.c: Remove.
+ * gcc.target/arm/neon/vget_highs8.c: Remove.
+ * gcc.target/arm/neon/vget_highu16.c: Remove.
+ * gcc.target/arm/neon/vget_highu32.c: Remove.
+ * gcc.target/arm/neon/vget_highu64.c: Remove.
+ * gcc.target/arm/neon/vget_highu8.c: Remove.
+ * gcc.target/arm/neon/vget_lanef32.c: Remove.
+ * gcc.target/arm/neon/vget_lanep16.c: Remove.
+ * gcc.target/arm/neon/vget_lanep8.c: Remove.
+ * gcc.target/arm/neon/vget_lanes16.c: Remove.
+ * gcc.target/arm/neon/vget_lanes32.c: Remove.
+ * gcc.target/arm/neon/vget_lanes64.c: Remove.
+ * gcc.target/arm/neon/vget_lanes8.c: Remove.
+ * gcc.target/arm/neon/vget_laneu16.c: Remove.
+ * gcc.target/arm/neon/vget_laneu32.c: Remove.
+ * gcc.target/arm/neon/vget_laneu64.c: Remove.
+ * gcc.target/arm/neon/vget_laneu8.c: Remove.
+ * gcc.target/arm/neon/vget_lowf32.c: Remove.
+ * gcc.target/arm/neon/vget_lowp16.c: Remove.
+ * gcc.target/arm/neon/vget_lowp64.c: Remove.
+ * gcc.target/arm/neon/vget_lowp8.c: Remove.
+ * gcc.target/arm/neon/vget_lows16.c: Remove.
+ * gcc.target/arm/neon/vget_lows32.c: Remove.
+ * gcc.target/arm/neon/vget_lows64.c: Remove.
+ * gcc.target/arm/neon/vget_lows8.c: Remove.
+ * gcc.target/arm/neon/vget_lowu16.c: Remove.
+ * gcc.target/arm/neon/vget_lowu32.c: Remove.
+ * gcc.target/arm/neon/vget_lowu64.c: Remove.
+ * gcc.target/arm/neon/vget_lowu8.c: Remove.
+ * gcc.target/arm/neon/vhaddQs16.c: Remove.
+ * gcc.target/arm/neon/vhaddQs32.c: Remove.
+ * gcc.target/arm/neon/vhaddQs8.c: Remove.
+ * gcc.target/arm/neon/vhaddQu16.c: Remove.
+ * gcc.target/arm/neon/vhaddQu32.c: Remove.
+ * gcc.target/arm/neon/vhaddQu8.c: Remove.
+ * gcc.target/arm/neon/vhadds16.c: Remove.
+ * gcc.target/arm/neon/vhadds32.c: Remove.
+ * gcc.target/arm/neon/vhadds8.c: Remove.
+ * gcc.target/arm/neon/vhaddu16.c: Remove.
+ * gcc.target/arm/neon/vhaddu32.c: Remove.
+ * gcc.target/arm/neon/vhaddu8.c: Remove.
+ * gcc.target/arm/neon/vhsubQs16.c: Remove.
+ * gcc.target/arm/neon/vhsubQs32.c: Remove.
+ * gcc.target/arm/neon/vhsubQs8.c: Remove.
+ * gcc.target/arm/neon/vhsubQu16.c: Remove.
+ * gcc.target/arm/neon/vhsubQu32.c: Remove.
+ * gcc.target/arm/neon/vhsubQu8.c: Remove.
+ * gcc.target/arm/neon/vhsubs16.c: Remove.
+ * gcc.target/arm/neon/vhsubs32.c: Remove.
+ * gcc.target/arm/neon/vhsubs8.c: Remove.
+ * gcc.target/arm/neon/vhsubu16.c: Remove.
+ * gcc.target/arm/neon/vhsubu32.c: Remove.
+ * gcc.target/arm/neon/vhsubu8.c: Remove.
+ * gcc.target/arm/neon/vld1Q_dupf32.c: Remove.
+ * gcc.target/arm/neon/vld1Q_dupp16.c: Remove.
+ * gcc.target/arm/neon/vld1Q_dupp64.c: Remove.
+ * gcc.target/arm/neon/vld1Q_dupp8.c: Remove.
+ * gcc.target/arm/neon/vld1Q_dups16.c: Remove.
+ * gcc.target/arm/neon/vld1Q_dups32.c: Remove.
+ * gcc.target/arm/neon/vld1Q_dups64.c: Remove.
+ * gcc.target/arm/neon/vld1Q_dups8.c: Remove.
+ * gcc.target/arm/neon/vld1Q_dupu16.c: Remove.
+ * gcc.target/arm/neon/vld1Q_dupu32.c: Remove.
+ * gcc.target/arm/neon/vld1Q_dupu64.c: Remove.
+ * gcc.target/arm/neon/vld1Q_dupu8.c: Remove.
+ * gcc.target/arm/neon/vld1Q_lanef32.c: Remove.
+ * gcc.target/arm/neon/vld1Q_lanep16.c: Remove.
+ * gcc.target/arm/neon/vld1Q_lanep64.c: Remove.
+ * gcc.target/arm/neon/vld1Q_lanep8.c: Remove.
+ * gcc.target/arm/neon/vld1Q_lanes16.c: Remove.
+ * gcc.target/arm/neon/vld1Q_lanes32.c: Remove.
+ * gcc.target/arm/neon/vld1Q_lanes64.c: Remove.
+ * gcc.target/arm/neon/vld1Q_lanes8.c: Remove.
+ * gcc.target/arm/neon/vld1Q_laneu16.c: Remove.
+ * gcc.target/arm/neon/vld1Q_laneu32.c: Remove.
+ * gcc.target/arm/neon/vld1Q_laneu64.c: Remove.
+ * gcc.target/arm/neon/vld1Q_laneu8.c: Remove.
+ * gcc.target/arm/neon/vld1Qf32.c: Remove.
+ * gcc.target/arm/neon/vld1Qp16.c: Remove.
+ * gcc.target/arm/neon/vld1Qp64.c: Remove.
+ * gcc.target/arm/neon/vld1Qp8.c: Remove.
+ * gcc.target/arm/neon/vld1Qs16.c: Remove.
+ * gcc.target/arm/neon/vld1Qs32.c: Remove.
+ * gcc.target/arm/neon/vld1Qs64.c: Remove.
+ * gcc.target/arm/neon/vld1Qs8.c: Remove.
+ * gcc.target/arm/neon/vld1Qu16.c: Remove.
+ * gcc.target/arm/neon/vld1Qu32.c: Remove.
+ * gcc.target/arm/neon/vld1Qu64.c: Remove.
+ * gcc.target/arm/neon/vld1Qu8.c: Remove.
+ * gcc.target/arm/neon/vld1_dupf32.c: Remove.
+ * gcc.target/arm/neon/vld1_dupp16.c: Remove.
+ * gcc.target/arm/neon/vld1_dupp64.c: Remove.
+ * gcc.target/arm/neon/vld1_dupp8.c: Remove.
+ * gcc.target/arm/neon/vld1_dups16.c: Remove.
+ * gcc.target/arm/neon/vld1_dups32.c: Remove.
+ * gcc.target/arm/neon/vld1_dups64.c: Remove.
+ * gcc.target/arm/neon/vld1_dups8.c: Remove.
+ * gcc.target/arm/neon/vld1_dupu16.c: Remove.
+ * gcc.target/arm/neon/vld1_dupu32.c: Remove.
+ * gcc.target/arm/neon/vld1_dupu64.c: Remove.
+ * gcc.target/arm/neon/vld1_dupu8.c: Remove.
+ * gcc.target/arm/neon/vld1_lanef32.c: Remove.
+ * gcc.target/arm/neon/vld1_lanep16.c: Remove.
+ * gcc.target/arm/neon/vld1_lanep64.c: Remove.
+ * gcc.target/arm/neon/vld1_lanep8.c: Remove.
+ * gcc.target/arm/neon/vld1_lanes16.c: Remove.
+ * gcc.target/arm/neon/vld1_lanes32.c: Remove.
+ * gcc.target/arm/neon/vld1_lanes64.c: Remove.
+ * gcc.target/arm/neon/vld1_lanes8.c: Remove.
+ * gcc.target/arm/neon/vld1_laneu16.c: Remove.
+ * gcc.target/arm/neon/vld1_laneu32.c: Remove.
+ * gcc.target/arm/neon/vld1_laneu64.c: Remove.
+ * gcc.target/arm/neon/vld1_laneu8.c: Remove.
+ * gcc.target/arm/neon/vld1f32.c: Remove.
+ * gcc.target/arm/neon/vld1p16.c: Remove.
+ * gcc.target/arm/neon/vld1p64.c: Remove.
+ * gcc.target/arm/neon/vld1p8.c: Remove.
+ * gcc.target/arm/neon/vld1s16.c: Remove.
+ * gcc.target/arm/neon/vld1s32.c: Remove.
+ * gcc.target/arm/neon/vld1s64.c: Remove.
+ * gcc.target/arm/neon/vld1s8.c: Remove.
+ * gcc.target/arm/neon/vld1u16.c: Remove.
+ * gcc.target/arm/neon/vld1u32.c: Remove.
+ * gcc.target/arm/neon/vld1u64.c: Remove.
+ * gcc.target/arm/neon/vld1u8.c: Remove.
+ * gcc.target/arm/neon/vld2Q_lanef32.c: Remove.
+ * gcc.target/arm/neon/vld2Q_lanep16.c: Remove.
+ * gcc.target/arm/neon/vld2Q_lanes16.c: Remove.
+ * gcc.target/arm/neon/vld2Q_lanes32.c: Remove.
+ * gcc.target/arm/neon/vld2Q_laneu16.c: Remove.
+ * gcc.target/arm/neon/vld2Q_laneu32.c: Remove.
+ * gcc.target/arm/neon/vld2Qf32.c: Remove.
+ * gcc.target/arm/neon/vld2Qp16.c: Remove.
+ * gcc.target/arm/neon/vld2Qp8.c: Remove.
+ * gcc.target/arm/neon/vld2Qs16.c: Remove.
+ * gcc.target/arm/neon/vld2Qs32.c: Remove.
+ * gcc.target/arm/neon/vld2Qs8.c: Remove.
+ * gcc.target/arm/neon/vld2Qu16.c: Remove.
+ * gcc.target/arm/neon/vld2Qu32.c: Remove.
+ * gcc.target/arm/neon/vld2Qu8.c: Remove.
+ * gcc.target/arm/neon/vld2_dupf32.c: Remove.
+ * gcc.target/arm/neon/vld2_dupp16.c: Remove.
+ * gcc.target/arm/neon/vld2_dupp64.c: Remove.
+ * gcc.target/arm/neon/vld2_dupp8.c: Remove.
+ * gcc.target/arm/neon/vld2_dups16.c: Remove.
+ * gcc.target/arm/neon/vld2_dups32.c: Remove.
+ * gcc.target/arm/neon/vld2_dups64.c: Remove.
+ * gcc.target/arm/neon/vld2_dups8.c: Remove.
+ * gcc.target/arm/neon/vld2_dupu16.c: Remove.
+ * gcc.target/arm/neon/vld2_dupu32.c: Remove.
+ * gcc.target/arm/neon/vld2_dupu64.c: Remove.
+ * gcc.target/arm/neon/vld2_dupu8.c: Remove.
+ * gcc.target/arm/neon/vld2_lanef32.c: Remove.
+ * gcc.target/arm/neon/vld2_lanep16.c: Remove.
+ * gcc.target/arm/neon/vld2_lanep8.c: Remove.
+ * gcc.target/arm/neon/vld2_lanes16.c: Remove.
+ * gcc.target/arm/neon/vld2_lanes32.c: Remove.
+ * gcc.target/arm/neon/vld2_lanes8.c: Remove.
+ * gcc.target/arm/neon/vld2_laneu16.c: Remove.
+ * gcc.target/arm/neon/vld2_laneu32.c: Remove.
+ * gcc.target/arm/neon/vld2_laneu8.c: Remove.
+ * gcc.target/arm/neon/vld2f32.c: Remove.
+ * gcc.target/arm/neon/vld2p16.c: Remove.
+ * gcc.target/arm/neon/vld2p64.c: Remove.
+ * gcc.target/arm/neon/vld2p8.c: Remove.
+ * gcc.target/arm/neon/vld2s16.c: Remove.
+ * gcc.target/arm/neon/vld2s32.c: Remove.
+ * gcc.target/arm/neon/vld2s64.c: Remove.
+ * gcc.target/arm/neon/vld2s8.c: Remove.
+ * gcc.target/arm/neon/vld2u16.c: Remove.
+ * gcc.target/arm/neon/vld2u32.c: Remove.
+ * gcc.target/arm/neon/vld2u64.c: Remove.
+ * gcc.target/arm/neon/vld2u8.c: Remove.
+ * gcc.target/arm/neon/vld3Q_lanef32.c: Remove.
+ * gcc.target/arm/neon/vld3Q_lanep16.c: Remove.
+ * gcc.target/arm/neon/vld3Q_lanes16.c: Remove.
+ * gcc.target/arm/neon/vld3Q_lanes32.c: Remove.
+ * gcc.target/arm/neon/vld3Q_laneu16.c: Remove.
+ * gcc.target/arm/neon/vld3Q_laneu32.c: Remove.
+ * gcc.target/arm/neon/vld3Qf32.c: Remove.
+ * gcc.target/arm/neon/vld3Qp16.c: Remove.
+ * gcc.target/arm/neon/vld3Qp8.c: Remove.
+ * gcc.target/arm/neon/vld3Qs16.c: Remove.
+ * gcc.target/arm/neon/vld3Qs32.c: Remove.
+ * gcc.target/arm/neon/vld3Qs8.c: Remove.
+ * gcc.target/arm/neon/vld3Qu16.c: Remove.
+ * gcc.target/arm/neon/vld3Qu32.c: Remove.
+ * gcc.target/arm/neon/vld3Qu8.c: Remove.
+ * gcc.target/arm/neon/vld3_dupf32.c: Remove.
+ * gcc.target/arm/neon/vld3_dupp16.c: Remove.
+ * gcc.target/arm/neon/vld3_dupp64.c: Remove.
+ * gcc.target/arm/neon/vld3_dupp8.c: Remove.
+ * gcc.target/arm/neon/vld3_dups16.c: Remove.
+ * gcc.target/arm/neon/vld3_dups32.c: Remove.
+ * gcc.target/arm/neon/vld3_dups64.c: Remove.
+ * gcc.target/arm/neon/vld3_dups8.c: Remove.
+ * gcc.target/arm/neon/vld3_dupu16.c: Remove.
+ * gcc.target/arm/neon/vld3_dupu32.c: Remove.
+ * gcc.target/arm/neon/vld3_dupu64.c: Remove.
+ * gcc.target/arm/neon/vld3_dupu8.c: Remove.
+ * gcc.target/arm/neon/vld3_lanef32.c: Remove.
+ * gcc.target/arm/neon/vld3_lanep16.c: Remove.
+ * gcc.target/arm/neon/vld3_lanep8.c: Remove.
+ * gcc.target/arm/neon/vld3_lanes16.c: Remove.
+ * gcc.target/arm/neon/vld3_lanes32.c: Remove.
+ * gcc.target/arm/neon/vld3_lanes8.c: Remove.
+ * gcc.target/arm/neon/vld3_laneu16.c: Remove.
+ * gcc.target/arm/neon/vld3_laneu32.c: Remove.
+ * gcc.target/arm/neon/vld3_laneu8.c: Remove.
+ * gcc.target/arm/neon/vld3f32.c: Remove.
+ * gcc.target/arm/neon/vld3p16.c: Remove.
+ * gcc.target/arm/neon/vld3p64.c: Remove.
+ * gcc.target/arm/neon/vld3p8.c: Remove.
+ * gcc.target/arm/neon/vld3s16.c: Remove.
+ * gcc.target/arm/neon/vld3s32.c: Remove.
+ * gcc.target/arm/neon/vld3s64.c: Remove.
+ * gcc.target/arm/neon/vld3s8.c: Remove.
+ * gcc.target/arm/neon/vld3u16.c: Remove.
+ * gcc.target/arm/neon/vld3u32.c: Remove.
+ * gcc.target/arm/neon/vld3u64.c: Remove.
+ * gcc.target/arm/neon/vld3u8.c: Remove.
+ * gcc.target/arm/neon/vld4Q_lanef32.c: Remove.
+ * gcc.target/arm/neon/vld4Q_lanep16.c: Remove.
+ * gcc.target/arm/neon/vld4Q_lanes16.c: Remove.
+ * gcc.target/arm/neon/vld4Q_lanes32.c: Remove.
+ * gcc.target/arm/neon/vld4Q_laneu16.c: Remove.
+ * gcc.target/arm/neon/vld4Q_laneu32.c: Remove.
+ * gcc.target/arm/neon/vld4Qf32.c: Remove.
+ * gcc.target/arm/neon/vld4Qp16.c: Remove.
+ * gcc.target/arm/neon/vld4Qp8.c: Remove.
+ * gcc.target/arm/neon/vld4Qs16.c: Remove.
+ * gcc.target/arm/neon/vld4Qs32.c: Remove.
+ * gcc.target/arm/neon/vld4Qs8.c: Remove.
+ * gcc.target/arm/neon/vld4Qu16.c: Remove.
+ * gcc.target/arm/neon/vld4Qu32.c: Remove.
+ * gcc.target/arm/neon/vld4Qu8.c: Remove.
+ * gcc.target/arm/neon/vld4_dupf32.c: Remove.
+ * gcc.target/arm/neon/vld4_dupp16.c: Remove.
+ * gcc.target/arm/neon/vld4_dupp64.c: Remove.
+ * gcc.target/arm/neon/vld4_dupp8.c: Remove.
+ * gcc.target/arm/neon/vld4_dups16.c: Remove.
+ * gcc.target/arm/neon/vld4_dups32.c: Remove.
+ * gcc.target/arm/neon/vld4_dups64.c: Remove.
+ * gcc.target/arm/neon/vld4_dups8.c: Remove.
+ * gcc.target/arm/neon/vld4_dupu16.c: Remove.
+ * gcc.target/arm/neon/vld4_dupu32.c: Remove.
+ * gcc.target/arm/neon/vld4_dupu64.c: Remove.
+ * gcc.target/arm/neon/vld4_dupu8.c: Remove.
+ * gcc.target/arm/neon/vld4_lanef32.c: Remove.
+ * gcc.target/arm/neon/vld4_lanep16.c: Remove.
+ * gcc.target/arm/neon/vld4_lanep8.c: Remove.
+ * gcc.target/arm/neon/vld4_lanes16.c: Remove.
+ * gcc.target/arm/neon/vld4_lanes32.c: Remove.
+ * gcc.target/arm/neon/vld4_lanes8.c: Remove.
+ * gcc.target/arm/neon/vld4_laneu16.c: Remove.
+ * gcc.target/arm/neon/vld4_laneu32.c: Remove.
+ * gcc.target/arm/neon/vld4_laneu8.c: Remove.
+ * gcc.target/arm/neon/vld4f32.c: Remove.
+ * gcc.target/arm/neon/vld4p16.c: Remove.
+ * gcc.target/arm/neon/vld4p64.c: Remove.
+ * gcc.target/arm/neon/vld4p8.c: Remove.
+ * gcc.target/arm/neon/vld4s16.c: Remove.
+ * gcc.target/arm/neon/vld4s32.c: Remove.
+ * gcc.target/arm/neon/vld4s64.c: Remove.
+ * gcc.target/arm/neon/vld4s8.c: Remove.
+ * gcc.target/arm/neon/vld4u16.c: Remove.
+ * gcc.target/arm/neon/vld4u32.c: Remove.
+ * gcc.target/arm/neon/vld4u64.c: Remove.
+ * gcc.target/arm/neon/vld4u8.c: Remove.
+ * gcc.target/arm/neon/vmaxQf32.c: Remove.
+ * gcc.target/arm/neon/vmaxQs16.c: Remove.
+ * gcc.target/arm/neon/vmaxQs32.c: Remove.
+ * gcc.target/arm/neon/vmaxQs8.c: Remove.
+ * gcc.target/arm/neon/vmaxQu16.c: Remove.
+ * gcc.target/arm/neon/vmaxQu32.c: Remove.
+ * gcc.target/arm/neon/vmaxQu8.c: Remove.
+ * gcc.target/arm/neon/vmaxf32.c: Remove.
+ * gcc.target/arm/neon/vmaxs16.c: Remove.
+ * gcc.target/arm/neon/vmaxs32.c: Remove.
+ * gcc.target/arm/neon/vmaxs8.c: Remove.
+ * gcc.target/arm/neon/vmaxu16.c: Remove.
+ * gcc.target/arm/neon/vmaxu32.c: Remove.
+ * gcc.target/arm/neon/vmaxu8.c: Remove.
+ * gcc.target/arm/neon/vminQf32.c: Remove.
+ * gcc.target/arm/neon/vminQs16.c: Remove.
+ * gcc.target/arm/neon/vminQs32.c: Remove.
+ * gcc.target/arm/neon/vminQs8.c: Remove.
+ * gcc.target/arm/neon/vminQu16.c: Remove.
+ * gcc.target/arm/neon/vminQu32.c: Remove.
+ * gcc.target/arm/neon/vminQu8.c: Remove.
+ * gcc.target/arm/neon/vminf32.c: Remove.
+ * gcc.target/arm/neon/vmins16.c: Remove.
+ * gcc.target/arm/neon/vmins32.c: Remove.
+ * gcc.target/arm/neon/vmins8.c: Remove.
+ * gcc.target/arm/neon/vminu16.c: Remove.
+ * gcc.target/arm/neon/vminu32.c: Remove.
+ * gcc.target/arm/neon/vminu8.c: Remove.
+ * gcc.target/arm/neon/vmlaQ_lanef32.c: Remove.
+ * gcc.target/arm/neon/vmlaQ_lanes16.c: Remove.
+ * gcc.target/arm/neon/vmlaQ_lanes32.c: Remove.
+ * gcc.target/arm/neon/vmlaQ_laneu16.c: Remove.
+ * gcc.target/arm/neon/vmlaQ_laneu32.c: Remove.
+ * gcc.target/arm/neon/vmlaQ_nf32.c: Remove.
+ * gcc.target/arm/neon/vmlaQ_ns16.c: Remove.
+ * gcc.target/arm/neon/vmlaQ_ns32.c: Remove.
+ * gcc.target/arm/neon/vmlaQ_nu16.c: Remove.
+ * gcc.target/arm/neon/vmlaQ_nu32.c: Remove.
+ * gcc.target/arm/neon/vmlaQf32.c: Remove.
+ * gcc.target/arm/neon/vmlaQs16.c: Remove.
+ * gcc.target/arm/neon/vmlaQs32.c: Remove.
+ * gcc.target/arm/neon/vmlaQs8.c: Remove.
+ * gcc.target/arm/neon/vmlaQu16.c: Remove.
+ * gcc.target/arm/neon/vmlaQu32.c: Remove.
+ * gcc.target/arm/neon/vmlaQu8.c: Remove.
+ * gcc.target/arm/neon/vmla_lanef32.c: Remove.
+ * gcc.target/arm/neon/vmla_lanes16.c: Remove.
+ * gcc.target/arm/neon/vmla_lanes32.c: Remove.
+ * gcc.target/arm/neon/vmla_laneu16.c: Remove.
+ * gcc.target/arm/neon/vmla_laneu32.c: Remove.
+ * gcc.target/arm/neon/vmla_nf32.c: Remove.
+ * gcc.target/arm/neon/vmla_ns16.c: Remove.
+ * gcc.target/arm/neon/vmla_ns32.c: Remove.
+ * gcc.target/arm/neon/vmla_nu16.c: Remove.
+ * gcc.target/arm/neon/vmla_nu32.c: Remove.
+ * gcc.target/arm/neon/vmlaf32.c: Remove.
+ * gcc.target/arm/neon/vmlal_lanes16.c: Remove.
+ * gcc.target/arm/neon/vmlal_lanes32.c: Remove.
+ * gcc.target/arm/neon/vmlal_laneu16.c: Remove.
+ * gcc.target/arm/neon/vmlal_laneu32.c: Remove.
+ * gcc.target/arm/neon/vmlal_ns16.c: Remove.
+ * gcc.target/arm/neon/vmlal_ns32.c: Remove.
+ * gcc.target/arm/neon/vmlal_nu16.c: Remove.
+ * gcc.target/arm/neon/vmlal_nu32.c: Remove.
+ * gcc.target/arm/neon/vmlals16.c: Remove.
+ * gcc.target/arm/neon/vmlals32.c: Remove.
+ * gcc.target/arm/neon/vmlals8.c: Remove.
+ * gcc.target/arm/neon/vmlalu16.c: Remove.
+ * gcc.target/arm/neon/vmlalu32.c: Remove.
+ * gcc.target/arm/neon/vmlalu8.c: Remove.
+ * gcc.target/arm/neon/vmlas16.c: Remove.
+ * gcc.target/arm/neon/vmlas32.c: Remove.
+ * gcc.target/arm/neon/vmlas8.c: Remove.
+ * gcc.target/arm/neon/vmlau16.c: Remove.
+ * gcc.target/arm/neon/vmlau32.c: Remove.
+ * gcc.target/arm/neon/vmlau8.c: Remove.
+ * gcc.target/arm/neon/vmlsQ_lanef32.c: Remove.
+ * gcc.target/arm/neon/vmlsQ_lanes16.c: Remove.
+ * gcc.target/arm/neon/vmlsQ_lanes32.c: Remove.
+ * gcc.target/arm/neon/vmlsQ_laneu16.c: Remove.
+ * gcc.target/arm/neon/vmlsQ_laneu32.c: Remove.
+ * gcc.target/arm/neon/vmlsQ_nf32.c: Remove.
+ * gcc.target/arm/neon/vmlsQ_ns16.c: Remove.
+ * gcc.target/arm/neon/vmlsQ_ns32.c: Remove.
+ * gcc.target/arm/neon/vmlsQ_nu16.c: Remove.
+ * gcc.target/arm/neon/vmlsQ_nu32.c: Remove.
+ * gcc.target/arm/neon/vmlsQf32.c: Remove.
+ * gcc.target/arm/neon/vmlsQs16.c: Remove.
+ * gcc.target/arm/neon/vmlsQs32.c: Remove.
+ * gcc.target/arm/neon/vmlsQs8.c: Remove.
+ * gcc.target/arm/neon/vmlsQu16.c: Remove.
+ * gcc.target/arm/neon/vmlsQu32.c: Remove.
+ * gcc.target/arm/neon/vmlsQu8.c: Remove.
+ * gcc.target/arm/neon/vmls_lanef32.c: Remove.
+ * gcc.target/arm/neon/vmls_lanes16.c: Remove.
+ * gcc.target/arm/neon/vmls_lanes32.c: Remove.
+ * gcc.target/arm/neon/vmls_laneu16.c: Remove.
+ * gcc.target/arm/neon/vmls_laneu32.c: Remove.
+ * gcc.target/arm/neon/vmls_nf32.c: Remove.
+ * gcc.target/arm/neon/vmls_ns16.c: Remove.
+ * gcc.target/arm/neon/vmls_ns32.c: Remove.
+ * gcc.target/arm/neon/vmls_nu16.c: Remove.
+ * gcc.target/arm/neon/vmls_nu32.c: Remove.
+ * gcc.target/arm/neon/vmlsf32.c: Remove.
+ * gcc.target/arm/neon/vmlsl_lanes16.c: Remove.
+ * gcc.target/arm/neon/vmlsl_lanes32.c: Remove.
+ * gcc.target/arm/neon/vmlsl_laneu16.c: Remove.
+ * gcc.target/arm/neon/vmlsl_laneu32.c: Remove.
+ * gcc.target/arm/neon/vmlsl_ns16.c: Remove.
+ * gcc.target/arm/neon/vmlsl_ns32.c: Remove.
+ * gcc.target/arm/neon/vmlsl_nu16.c: Remove.
+ * gcc.target/arm/neon/vmlsl_nu32.c: Remove.
+ * gcc.target/arm/neon/vmlsls16.c: Remove.
+ * gcc.target/arm/neon/vmlsls32.c: Remove.
+ * gcc.target/arm/neon/vmlsls8.c: Remove.
+ * gcc.target/arm/neon/vmlslu16.c: Remove.
+ * gcc.target/arm/neon/vmlslu32.c: Remove.
+ * gcc.target/arm/neon/vmlslu8.c: Remove.
+ * gcc.target/arm/neon/vmlss16.c: Remove.
+ * gcc.target/arm/neon/vmlss32.c: Remove.
+ * gcc.target/arm/neon/vmlss8.c: Remove.
+ * gcc.target/arm/neon/vmlsu16.c: Remove.
+ * gcc.target/arm/neon/vmlsu32.c: Remove.
+ * gcc.target/arm/neon/vmlsu8.c: Remove.
+ * gcc.target/arm/neon/vmovQ_nf32.c: Remove.
+ * gcc.target/arm/neon/vmovQ_np16.c: Remove.
+ * gcc.target/arm/neon/vmovQ_np8.c: Remove.
+ * gcc.target/arm/neon/vmovQ_ns16.c: Remove.
+ * gcc.target/arm/neon/vmovQ_ns32.c: Remove.
+ * gcc.target/arm/neon/vmovQ_ns64.c: Remove.
+ * gcc.target/arm/neon/vmovQ_ns8.c: Remove.
+ * gcc.target/arm/neon/vmovQ_nu16.c: Remove.
+ * gcc.target/arm/neon/vmovQ_nu32.c: Remove.
+ * gcc.target/arm/neon/vmovQ_nu64.c: Remove.
+ * gcc.target/arm/neon/vmovQ_nu8.c: Remove.
+ * gcc.target/arm/neon/vmov_nf32.c: Remove.
+ * gcc.target/arm/neon/vmov_np16.c: Remove.
+ * gcc.target/arm/neon/vmov_np8.c: Remove.
+ * gcc.target/arm/neon/vmov_ns16.c: Remove.
+ * gcc.target/arm/neon/vmov_ns32.c: Remove.
+ * gcc.target/arm/neon/vmov_ns64.c: Remove.
+ * gcc.target/arm/neon/vmov_ns8.c: Remove.
+ * gcc.target/arm/neon/vmov_nu16.c: Remove.
+ * gcc.target/arm/neon/vmov_nu32.c: Remove.
+ * gcc.target/arm/neon/vmov_nu64.c: Remove.
+ * gcc.target/arm/neon/vmov_nu8.c: Remove.
+ * gcc.target/arm/neon/vmovls16.c: Remove.
+ * gcc.target/arm/neon/vmovls32.c: Remove.
+ * gcc.target/arm/neon/vmovls8.c: Remove.
+ * gcc.target/arm/neon/vmovlu16.c: Remove.
+ * gcc.target/arm/neon/vmovlu32.c: Remove.
+ * gcc.target/arm/neon/vmovlu8.c: Remove.
+ * gcc.target/arm/neon/vmovns16.c: Remove.
+ * gcc.target/arm/neon/vmovns32.c: Remove.
+ * gcc.target/arm/neon/vmovns64.c: Remove.
+ * gcc.target/arm/neon/vmovnu16.c: Remove.
+ * gcc.target/arm/neon/vmovnu32.c: Remove.
+ * gcc.target/arm/neon/vmovnu64.c: Remove.
+ * gcc.target/arm/neon/vmulQ_lanef32.c: Remove.
+ * gcc.target/arm/neon/vmulQ_lanes16.c: Remove.
+ * gcc.target/arm/neon/vmulQ_lanes32.c: Remove.
+ * gcc.target/arm/neon/vmulQ_laneu16.c: Remove.
+ * gcc.target/arm/neon/vmulQ_laneu32.c: Remove.
+ * gcc.target/arm/neon/vmulQ_nf32.c: Remove.
+ * gcc.target/arm/neon/vmulQ_ns16.c: Remove.
+ * gcc.target/arm/neon/vmulQ_ns32.c: Remove.
+ * gcc.target/arm/neon/vmulQ_nu16.c: Remove.
+ * gcc.target/arm/neon/vmulQ_nu32.c: Remove.
+ * gcc.target/arm/neon/vmulQf32.c: Remove.
+ * gcc.target/arm/neon/vmulQp8.c: Remove.
+ * gcc.target/arm/neon/vmulQs16.c: Remove.
+ * gcc.target/arm/neon/vmulQs32.c: Remove.
+ * gcc.target/arm/neon/vmulQs8.c: Remove.
+ * gcc.target/arm/neon/vmulQu16.c: Remove.
+ * gcc.target/arm/neon/vmulQu32.c: Remove.
+ * gcc.target/arm/neon/vmulQu8.c: Remove.
+ * gcc.target/arm/neon/vmul_lanef32.c: Remove.
+ * gcc.target/arm/neon/vmul_lanes16.c: Remove.
+ * gcc.target/arm/neon/vmul_lanes32.c: Remove.
+ * gcc.target/arm/neon/vmul_laneu16.c: Remove.
+ * gcc.target/arm/neon/vmul_laneu32.c: Remove.
+ * gcc.target/arm/neon/vmul_nf32.c: Remove.
+ * gcc.target/arm/neon/vmul_ns16.c: Remove.
+ * gcc.target/arm/neon/vmul_ns32.c: Remove.
+ * gcc.target/arm/neon/vmul_nu16.c: Remove.
+ * gcc.target/arm/neon/vmul_nu32.c: Remove.
+ * gcc.target/arm/neon/vmulf32.c: Remove.
+ * gcc.target/arm/neon/vmull_lanes16.c: Remove.
+ * gcc.target/arm/neon/vmull_lanes32.c: Remove.
+ * gcc.target/arm/neon/vmull_laneu16.c: Remove.
+ * gcc.target/arm/neon/vmull_laneu32.c: Remove.
+ * gcc.target/arm/neon/vmull_ns16.c: Remove.
+ * gcc.target/arm/neon/vmull_ns32.c: Remove.
+ * gcc.target/arm/neon/vmull_nu16.c: Remove.
+ * gcc.target/arm/neon/vmull_nu32.c: Remove.
+ * gcc.target/arm/neon/vmullp8.c: Remove.
+ * gcc.target/arm/neon/vmulls16.c: Remove.
+ * gcc.target/arm/neon/vmulls32.c: Remove.
+ * gcc.target/arm/neon/vmulls8.c: Remove.
+ * gcc.target/arm/neon/vmullu16.c: Remove.
+ * gcc.target/arm/neon/vmullu32.c: Remove.
+ * gcc.target/arm/neon/vmullu8.c: Remove.
+ * gcc.target/arm/neon/vmulp8.c: Remove.
+ * gcc.target/arm/neon/vmuls16.c: Remove.
+ * gcc.target/arm/neon/vmuls32.c: Remove.
+ * gcc.target/arm/neon/vmuls8.c: Remove.
+ * gcc.target/arm/neon/vmulu16.c: Remove.
+ * gcc.target/arm/neon/vmulu32.c: Remove.
+ * gcc.target/arm/neon/vmulu8.c: Remove.
+ * gcc.target/arm/neon/vmvnQp8.c: Remove.
+ * gcc.target/arm/neon/vmvnQs16.c: Remove.
+ * gcc.target/arm/neon/vmvnQs32.c: Remove.
+ * gcc.target/arm/neon/vmvnQs8.c: Remove.
+ * gcc.target/arm/neon/vmvnQu16.c: Remove.
+ * gcc.target/arm/neon/vmvnQu32.c: Remove.
+ * gcc.target/arm/neon/vmvnQu8.c: Remove.
+ * gcc.target/arm/neon/vmvnp8.c: Remove.
+ * gcc.target/arm/neon/vmvns16.c: Remove.
+ * gcc.target/arm/neon/vmvns32.c: Remove.
+ * gcc.target/arm/neon/vmvns8.c: Remove.
+ * gcc.target/arm/neon/vmvnu16.c: Remove.
+ * gcc.target/arm/neon/vmvnu32.c: Remove.
+ * gcc.target/arm/neon/vmvnu8.c: Remove.
+ * gcc.target/arm/neon/vnegQf32.c: Remove.
+ * gcc.target/arm/neon/vnegQs16.c: Remove.
+ * gcc.target/arm/neon/vnegQs32.c: Remove.
+ * gcc.target/arm/neon/vnegQs8.c: Remove.
+ * gcc.target/arm/neon/vnegf32.c: Remove.
+ * gcc.target/arm/neon/vnegs16.c: Remove.
+ * gcc.target/arm/neon/vnegs32.c: Remove.
+ * gcc.target/arm/neon/vnegs8.c: Remove.
+ * gcc.target/arm/neon/vornQs16.c: Remove.
+ * gcc.target/arm/neon/vornQs32.c: Remove.
+ * gcc.target/arm/neon/vornQs64.c: Remove.
+ * gcc.target/arm/neon/vornQs8.c: Remove.
+ * gcc.target/arm/neon/vornQu16.c: Remove.
+ * gcc.target/arm/neon/vornQu32.c: Remove.
+ * gcc.target/arm/neon/vornQu64.c: Remove.
+ * gcc.target/arm/neon/vornQu8.c: Remove.
+ * gcc.target/arm/neon/vorns16.c: Remove.
+ * gcc.target/arm/neon/vorns32.c: Remove.
+ * gcc.target/arm/neon/vorns64.c: Remove.
+ * gcc.target/arm/neon/vorns8.c: Remove.
+ * gcc.target/arm/neon/vornu16.c: Remove.
+ * gcc.target/arm/neon/vornu32.c: Remove.
+ * gcc.target/arm/neon/vornu64.c: Remove.
+ * gcc.target/arm/neon/vornu8.c: Remove.
+ * gcc.target/arm/neon/vorrQs16.c: Remove.
+ * gcc.target/arm/neon/vorrQs32.c: Remove.
+ * gcc.target/arm/neon/vorrQs64.c: Remove.
+ * gcc.target/arm/neon/vorrQs8.c: Remove.
+ * gcc.target/arm/neon/vorrQu16.c: Remove.
+ * gcc.target/arm/neon/vorrQu32.c: Remove.
+ * gcc.target/arm/neon/vorrQu64.c: Remove.
+ * gcc.target/arm/neon/vorrQu8.c: Remove.
+ * gcc.target/arm/neon/vorrs16.c: Remove.
+ * gcc.target/arm/neon/vorrs32.c: Remove.
+ * gcc.target/arm/neon/vorrs64.c: Remove.
+ * gcc.target/arm/neon/vorrs8.c: Remove.
+ * gcc.target/arm/neon/vorru16.c: Remove.
+ * gcc.target/arm/neon/vorru32.c: Remove.
+ * gcc.target/arm/neon/vorru64.c: Remove.
+ * gcc.target/arm/neon/vorru8.c: Remove.
+ * gcc.target/arm/neon/vpadalQs16.c: Remove.
+ * gcc.target/arm/neon/vpadalQs32.c: Remove.
+ * gcc.target/arm/neon/vpadalQs8.c: Remove.
+ * gcc.target/arm/neon/vpadalQu16.c: Remove.
+ * gcc.target/arm/neon/vpadalQu32.c: Remove.
+ * gcc.target/arm/neon/vpadalQu8.c: Remove.
+ * gcc.target/arm/neon/vpadals16.c: Remove.
+ * gcc.target/arm/neon/vpadals32.c: Remove.
+ * gcc.target/arm/neon/vpadals8.c: Remove.
+ * gcc.target/arm/neon/vpadalu16.c: Remove.
+ * gcc.target/arm/neon/vpadalu32.c: Remove.
+ * gcc.target/arm/neon/vpadalu8.c: Remove.
+ * gcc.target/arm/neon/vpaddf32.c: Remove.
+ * gcc.target/arm/neon/vpaddlQs16.c: Remove.
+ * gcc.target/arm/neon/vpaddlQs32.c: Remove.
+ * gcc.target/arm/neon/vpaddlQs8.c: Remove.
+ * gcc.target/arm/neon/vpaddlQu16.c: Remove.
+ * gcc.target/arm/neon/vpaddlQu32.c: Remove.
+ * gcc.target/arm/neon/vpaddlQu8.c: Remove.
+ * gcc.target/arm/neon/vpaddls16.c: Remove.
+ * gcc.target/arm/neon/vpaddls32.c: Remove.
+ * gcc.target/arm/neon/vpaddls8.c: Remove.
+ * gcc.target/arm/neon/vpaddlu16.c: Remove.
+ * gcc.target/arm/neon/vpaddlu32.c: Remove.
+ * gcc.target/arm/neon/vpaddlu8.c: Remove.
+ * gcc.target/arm/neon/vpadds16.c: Remove.
+ * gcc.target/arm/neon/vpadds32.c: Remove.
+ * gcc.target/arm/neon/vpadds8.c: Remove.
+ * gcc.target/arm/neon/vpaddu16.c: Remove.
+ * gcc.target/arm/neon/vpaddu32.c: Remove.
+ * gcc.target/arm/neon/vpaddu8.c: Remove.
+ * gcc.target/arm/neon/vpmaxf32.c: Remove.
+ * gcc.target/arm/neon/vpmaxs16.c: Remove.
+ * gcc.target/arm/neon/vpmaxs32.c: Remove.
+ * gcc.target/arm/neon/vpmaxs8.c: Remove.
+ * gcc.target/arm/neon/vpmaxu16.c: Remove.
+ * gcc.target/arm/neon/vpmaxu32.c: Remove.
+ * gcc.target/arm/neon/vpmaxu8.c: Remove.
+ * gcc.target/arm/neon/vpminf32.c: Remove.
+ * gcc.target/arm/neon/vpmins16.c: Remove.
+ * gcc.target/arm/neon/vpmins32.c: Remove.
+ * gcc.target/arm/neon/vpmins8.c: Remove.
+ * gcc.target/arm/neon/vpminu16.c: Remove.
+ * gcc.target/arm/neon/vpminu32.c: Remove.
+ * gcc.target/arm/neon/vpminu8.c: Remove.
+ * gcc.target/arm/neon/vqRdmulhQ_lanes16.c: Remove.
+ * gcc.target/arm/neon/vqRdmulhQ_lanes32.c: Remove.
+ * gcc.target/arm/neon/vqRdmulhQ_ns16.c: Remove.
+ * gcc.target/arm/neon/vqRdmulhQ_ns32.c: Remove.
+ * gcc.target/arm/neon/vqRdmulhQs16.c: Remove.
+ * gcc.target/arm/neon/vqRdmulhQs32.c: Remove.
+ * gcc.target/arm/neon/vqRdmulh_lanes16.c: Remove.
+ * gcc.target/arm/neon/vqRdmulh_lanes32.c: Remove.
+ * gcc.target/arm/neon/vqRdmulh_ns16.c: Remove.
+ * gcc.target/arm/neon/vqRdmulh_ns32.c: Remove.
+ * gcc.target/arm/neon/vqRdmulhs16.c: Remove.
+ * gcc.target/arm/neon/vqRdmulhs32.c: Remove.
+ * gcc.target/arm/neon/vqRshlQs16.c: Remove.
+ * gcc.target/arm/neon/vqRshlQs32.c: Remove.
+ * gcc.target/arm/neon/vqRshlQs64.c: Remove.
+ * gcc.target/arm/neon/vqRshlQs8.c: Remove.
+ * gcc.target/arm/neon/vqRshlQu16.c: Remove.
+ * gcc.target/arm/neon/vqRshlQu32.c: Remove.
+ * gcc.target/arm/neon/vqRshlQu64.c: Remove.
+ * gcc.target/arm/neon/vqRshlQu8.c: Remove.
+ * gcc.target/arm/neon/vqRshls16.c: Remove.
+ * gcc.target/arm/neon/vqRshls32.c: Remove.
+ * gcc.target/arm/neon/vqRshls64.c: Remove.
+ * gcc.target/arm/neon/vqRshls8.c: Remove.
+ * gcc.target/arm/neon/vqRshlu16.c: Remove.
+ * gcc.target/arm/neon/vqRshlu32.c: Remove.
+ * gcc.target/arm/neon/vqRshlu64.c: Remove.
+ * gcc.target/arm/neon/vqRshlu8.c: Remove.
+ * gcc.target/arm/neon/vqRshrn_ns16.c: Remove.
+ * gcc.target/arm/neon/vqRshrn_ns32.c: Remove.
+ * gcc.target/arm/neon/vqRshrn_ns64.c: Remove.
+ * gcc.target/arm/neon/vqRshrn_nu16.c: Remove.
+ * gcc.target/arm/neon/vqRshrn_nu32.c: Remove.
+ * gcc.target/arm/neon/vqRshrn_nu64.c: Remove.
+ * gcc.target/arm/neon/vqRshrun_ns16.c: Remove.
+ * gcc.target/arm/neon/vqRshrun_ns32.c: Remove.
+ * gcc.target/arm/neon/vqRshrun_ns64.c: Remove.
+ * gcc.target/arm/neon/vqabsQs16.c: Remove.
+ * gcc.target/arm/neon/vqabsQs32.c: Remove.
+ * gcc.target/arm/neon/vqabsQs8.c: Remove.
+ * gcc.target/arm/neon/vqabss16.c: Remove.
+ * gcc.target/arm/neon/vqabss32.c: Remove.
+ * gcc.target/arm/neon/vqabss8.c: Remove.
+ * gcc.target/arm/neon/vqaddQs16.c: Remove.
+ * gcc.target/arm/neon/vqaddQs32.c: Remove.
+ * gcc.target/arm/neon/vqaddQs64.c: Remove.
+ * gcc.target/arm/neon/vqaddQs8.c: Remove.
+ * gcc.target/arm/neon/vqaddQu16.c: Remove.
+ * gcc.target/arm/neon/vqaddQu32.c: Remove.
+ * gcc.target/arm/neon/vqaddQu64.c: Remove.
+ * gcc.target/arm/neon/vqaddQu8.c: Remove.
+ * gcc.target/arm/neon/vqadds16.c: Remove.
+ * gcc.target/arm/neon/vqadds32.c: Remove.
+ * gcc.target/arm/neon/vqadds64.c: Remove.
+ * gcc.target/arm/neon/vqadds8.c: Remove.
+ * gcc.target/arm/neon/vqaddu16.c: Remove.
+ * gcc.target/arm/neon/vqaddu32.c: Remove.
+ * gcc.target/arm/neon/vqaddu64.c: Remove.
+ * gcc.target/arm/neon/vqaddu8.c: Remove.
+ * gcc.target/arm/neon/vqdmlal_lanes16.c: Remove.
+ * gcc.target/arm/neon/vqdmlal_lanes32.c: Remove.
+ * gcc.target/arm/neon/vqdmlal_ns16.c: Remove.
+ * gcc.target/arm/neon/vqdmlal_ns32.c: Remove.
+ * gcc.target/arm/neon/vqdmlals16.c: Remove.
+ * gcc.target/arm/neon/vqdmlals32.c: Remove.
+ * gcc.target/arm/neon/vqdmlsl_lanes16.c: Remove.
+ * gcc.target/arm/neon/vqdmlsl_lanes32.c: Remove.
+ * gcc.target/arm/neon/vqdmlsl_ns16.c: Remove.
+ * gcc.target/arm/neon/vqdmlsl_ns32.c: Remove.
+ * gcc.target/arm/neon/vqdmlsls16.c: Remove.
+ * gcc.target/arm/neon/vqdmlsls32.c: Remove.
+ * gcc.target/arm/neon/vqdmulhQ_lanes16.c: Remove.
+ * gcc.target/arm/neon/vqdmulhQ_lanes32.c: Remove.
+ * gcc.target/arm/neon/vqdmulhQ_ns16.c: Remove.
+ * gcc.target/arm/neon/vqdmulhQ_ns32.c: Remove.
+ * gcc.target/arm/neon/vqdmulhQs16.c: Remove.
+ * gcc.target/arm/neon/vqdmulhQs32.c: Remove.
+ * gcc.target/arm/neon/vqdmulh_lanes16.c: Remove.
+ * gcc.target/arm/neon/vqdmulh_lanes32.c: Remove.
+ * gcc.target/arm/neon/vqdmulh_ns16.c: Remove.
+ * gcc.target/arm/neon/vqdmulh_ns32.c: Remove.
+ * gcc.target/arm/neon/vqdmulhs16.c: Remove.
+ * gcc.target/arm/neon/vqdmulhs32.c: Remove.
+ * gcc.target/arm/neon/vqdmull_lanes16.c: Remove.
+ * gcc.target/arm/neon/vqdmull_lanes32.c: Remove.
+ * gcc.target/arm/neon/vqdmull_ns16.c: Remove.
+ * gcc.target/arm/neon/vqdmull_ns32.c: Remove.
+ * gcc.target/arm/neon/vqdmulls16.c: Remove.
+ * gcc.target/arm/neon/vqdmulls32.c: Remove.
+ * gcc.target/arm/neon/vqmovns16.c: Remove.
+ * gcc.target/arm/neon/vqmovns32.c: Remove.
+ * gcc.target/arm/neon/vqmovns64.c: Remove.
+ * gcc.target/arm/neon/vqmovnu16.c: Remove.
+ * gcc.target/arm/neon/vqmovnu32.c: Remove.
+ * gcc.target/arm/neon/vqmovnu64.c: Remove.
+ * gcc.target/arm/neon/vqmovuns16.c: Remove.
+ * gcc.target/arm/neon/vqmovuns32.c: Remove.
+ * gcc.target/arm/neon/vqmovuns64.c: Remove.
+ * gcc.target/arm/neon/vqnegQs16.c: Remove.
+ * gcc.target/arm/neon/vqnegQs32.c: Remove.
+ * gcc.target/arm/neon/vqnegQs8.c: Remove.
+ * gcc.target/arm/neon/vqnegs16.c: Remove.
+ * gcc.target/arm/neon/vqnegs32.c: Remove.
+ * gcc.target/arm/neon/vqnegs8.c: Remove.
+ * gcc.target/arm/neon/vqshlQ_ns16.c: Remove.
+ * gcc.target/arm/neon/vqshlQ_ns32.c: Remove.
+ * gcc.target/arm/neon/vqshlQ_ns64.c: Remove.
+ * gcc.target/arm/neon/vqshlQ_ns8.c: Remove.
+ * gcc.target/arm/neon/vqshlQ_nu16.c: Remove.
+ * gcc.target/arm/neon/vqshlQ_nu32.c: Remove.
+ * gcc.target/arm/neon/vqshlQ_nu64.c: Remove.
+ * gcc.target/arm/neon/vqshlQ_nu8.c: Remove.
+ * gcc.target/arm/neon/vqshlQs16.c: Remove.
+ * gcc.target/arm/neon/vqshlQs32.c: Remove.
+ * gcc.target/arm/neon/vqshlQs64.c: Remove.
+ * gcc.target/arm/neon/vqshlQs8.c: Remove.
+ * gcc.target/arm/neon/vqshlQu16.c: Remove.
+ * gcc.target/arm/neon/vqshlQu32.c: Remove.
+ * gcc.target/arm/neon/vqshlQu64.c: Remove.
+ * gcc.target/arm/neon/vqshlQu8.c: Remove.
+ * gcc.target/arm/neon/vqshl_ns16.c: Remove.
+ * gcc.target/arm/neon/vqshl_ns32.c: Remove.
+ * gcc.target/arm/neon/vqshl_ns64.c: Remove.
+ * gcc.target/arm/neon/vqshl_ns8.c: Remove.
+ * gcc.target/arm/neon/vqshl_nu16.c: Remove.
+ * gcc.target/arm/neon/vqshl_nu32.c: Remove.
+ * gcc.target/arm/neon/vqshl_nu64.c: Remove.
+ * gcc.target/arm/neon/vqshl_nu8.c: Remove.
+ * gcc.target/arm/neon/vqshls16.c: Remove.
+ * gcc.target/arm/neon/vqshls32.c: Remove.
+ * gcc.target/arm/neon/vqshls64.c: Remove.
+ * gcc.target/arm/neon/vqshls8.c: Remove.
+ * gcc.target/arm/neon/vqshlu16.c: Remove.
+ * gcc.target/arm/neon/vqshlu32.c: Remove.
+ * gcc.target/arm/neon/vqshlu64.c: Remove.
+ * gcc.target/arm/neon/vqshlu8.c: Remove.
+ * gcc.target/arm/neon/vqshluQ_ns16.c: Remove.
+ * gcc.target/arm/neon/vqshluQ_ns32.c: Remove.
+ * gcc.target/arm/neon/vqshluQ_ns64.c: Remove.
+ * gcc.target/arm/neon/vqshluQ_ns8.c: Remove.
+ * gcc.target/arm/neon/vqshlu_ns16.c: Remove.
+ * gcc.target/arm/neon/vqshlu_ns32.c: Remove.
+ * gcc.target/arm/neon/vqshlu_ns64.c: Remove.
+ * gcc.target/arm/neon/vqshlu_ns8.c: Remove.
+ * gcc.target/arm/neon/vqshrn_ns16.c: Remove.
+ * gcc.target/arm/neon/vqshrn_ns32.c: Remove.
+ * gcc.target/arm/neon/vqshrn_ns64.c: Remove.
+ * gcc.target/arm/neon/vqshrn_nu16.c: Remove.
+ * gcc.target/arm/neon/vqshrn_nu32.c: Remove.
+ * gcc.target/arm/neon/vqshrn_nu64.c: Remove.
+ * gcc.target/arm/neon/vqshrun_ns16.c: Remove.
+ * gcc.target/arm/neon/vqshrun_ns32.c: Remove.
+ * gcc.target/arm/neon/vqshrun_ns64.c: Remove.
+ * gcc.target/arm/neon/vqsubQs16.c: Remove.
+ * gcc.target/arm/neon/vqsubQs32.c: Remove.
+ * gcc.target/arm/neon/vqsubQs64.c: Remove.
+ * gcc.target/arm/neon/vqsubQs8.c: Remove.
+ * gcc.target/arm/neon/vqsubQu16.c: Remove.
+ * gcc.target/arm/neon/vqsubQu32.c: Remove.
+ * gcc.target/arm/neon/vqsubQu64.c: Remove.
+ * gcc.target/arm/neon/vqsubQu8.c: Remove.
+ * gcc.target/arm/neon/vqsubs16.c: Remove.
+ * gcc.target/arm/neon/vqsubs32.c: Remove.
+ * gcc.target/arm/neon/vqsubs64.c: Remove.
+ * gcc.target/arm/neon/vqsubs8.c: Remove.
+ * gcc.target/arm/neon/vqsubu16.c: Remove.
+ * gcc.target/arm/neon/vqsubu32.c: Remove.
+ * gcc.target/arm/neon/vqsubu64.c: Remove.
+ * gcc.target/arm/neon/vqsubu8.c: Remove.
+ * gcc.target/arm/neon/vrecpeQf32.c: Remove.
+ * gcc.target/arm/neon/vrecpeQu32.c: Remove.
+ * gcc.target/arm/neon/vrecpef32.c: Remove.
+ * gcc.target/arm/neon/vrecpeu32.c: Remove.
+ * gcc.target/arm/neon/vrecpsQf32.c: Remove.
+ * gcc.target/arm/neon/vrecpsf32.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQf32_p128.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQf32_p16.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQf32_p64.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQf32_p8.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQf32_s16.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQf32_s32.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQf32_s64.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQf32_s8.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQf32_u16.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQf32_u32.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQf32_u64.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQf32_u8.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQp128_f32.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQp128_p16.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQp128_p64.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQp128_p8.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQp128_s16.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQp128_s32.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQp128_s64.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQp128_s8.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQp128_u16.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQp128_u32.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQp128_u64.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQp128_u8.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQp16_f32.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQp16_p128.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQp16_p64.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQp16_p8.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQp16_s16.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQp16_s32.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQp16_s64.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQp16_s8.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQp16_u16.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQp16_u32.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQp16_u64.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQp16_u8.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQp64_f32.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQp64_p128.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQp64_p16.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQp64_p8.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQp64_s16.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQp64_s32.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQp64_s64.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQp64_s8.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQp64_u16.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQp64_u32.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQp64_u64.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQp64_u8.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQp8_f32.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQp8_p128.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQp8_p16.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQp8_p64.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQp8_s16.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQp8_s32.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQp8_s64.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQp8_s8.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQp8_u16.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQp8_u32.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQp8_u64.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQp8_u8.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQs16_f32.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQs16_p128.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQs16_p16.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQs16_p64.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQs16_p8.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQs16_s32.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQs16_s64.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQs16_s8.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQs16_u16.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQs16_u32.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQs16_u64.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQs16_u8.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQs32_f32.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQs32_p128.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQs32_p16.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQs32_p64.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQs32_p8.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQs32_s16.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQs32_s64.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQs32_s8.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQs32_u16.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQs32_u32.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQs32_u64.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQs32_u8.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQs64_f32.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQs64_p128.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQs64_p16.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQs64_p64.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQs64_p8.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQs64_s16.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQs64_s32.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQs64_s8.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQs64_u16.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQs64_u32.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQs64_u64.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQs64_u8.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQs8_f32.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQs8_p128.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQs8_p16.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQs8_p64.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQs8_p8.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQs8_s16.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQs8_s32.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQs8_s64.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQs8_u16.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQs8_u32.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQs8_u64.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQs8_u8.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQu16_f32.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQu16_p128.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQu16_p16.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQu16_p64.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQu16_p8.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQu16_s16.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQu16_s32.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQu16_s64.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQu16_s8.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQu16_u32.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQu16_u64.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQu16_u8.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQu32_f32.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQu32_p128.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQu32_p16.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQu32_p64.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQu32_p8.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQu32_s16.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQu32_s32.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQu32_s64.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQu32_s8.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQu32_u16.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQu32_u64.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQu32_u8.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQu64_f32.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQu64_p128.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQu64_p16.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQu64_p64.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQu64_p8.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQu64_s16.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQu64_s32.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQu64_s64.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQu64_s8.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQu64_u16.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQu64_u32.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQu64_u8.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQu8_f32.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQu8_p128.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQu8_p16.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQu8_p64.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQu8_p8.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQu8_s16.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQu8_s32.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQu8_s64.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQu8_s8.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQu8_u16.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQu8_u32.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQu8_u64.c: Remove.
+ * gcc.target/arm/neon/vreinterpretf32_p16.c: Remove.
+ * gcc.target/arm/neon/vreinterpretf32_p64.c: Remove.
+ * gcc.target/arm/neon/vreinterpretf32_p8.c: Remove.
+ * gcc.target/arm/neon/vreinterpretf32_s16.c: Remove.
+ * gcc.target/arm/neon/vreinterpretf32_s32.c: Remove.
+ * gcc.target/arm/neon/vreinterpretf32_s64.c: Remove.
+ * gcc.target/arm/neon/vreinterpretf32_s8.c: Remove.
+ * gcc.target/arm/neon/vreinterpretf32_u16.c: Remove.
+ * gcc.target/arm/neon/vreinterpretf32_u32.c: Remove.
+ * gcc.target/arm/neon/vreinterpretf32_u64.c: Remove.
+ * gcc.target/arm/neon/vreinterpretf32_u8.c: Remove.
+ * gcc.target/arm/neon/vreinterpretp16_f32.c: Remove.
+ * gcc.target/arm/neon/vreinterpretp16_p64.c: Remove.
+ * gcc.target/arm/neon/vreinterpretp16_p8.c: Remove.
+ * gcc.target/arm/neon/vreinterpretp16_s16.c: Remove.
+ * gcc.target/arm/neon/vreinterpretp16_s32.c: Remove.
+ * gcc.target/arm/neon/vreinterpretp16_s64.c: Remove.
+ * gcc.target/arm/neon/vreinterpretp16_s8.c: Remove.
+ * gcc.target/arm/neon/vreinterpretp16_u16.c: Remove.
+ * gcc.target/arm/neon/vreinterpretp16_u32.c: Remove.
+ * gcc.target/arm/neon/vreinterpretp16_u64.c: Remove.
+ * gcc.target/arm/neon/vreinterpretp16_u8.c: Remove.
+ * gcc.target/arm/neon/vreinterpretp64_f32.c: Remove.
+ * gcc.target/arm/neon/vreinterpretp64_p16.c: Remove.
+ * gcc.target/arm/neon/vreinterpretp64_p8.c: Remove.
+ * gcc.target/arm/neon/vreinterpretp64_s16.c: Remove.
+ * gcc.target/arm/neon/vreinterpretp64_s32.c: Remove.
+ * gcc.target/arm/neon/vreinterpretp64_s64.c: Remove.
+ * gcc.target/arm/neon/vreinterpretp64_s8.c: Remove.
+ * gcc.target/arm/neon/vreinterpretp64_u16.c: Remove.
+ * gcc.target/arm/neon/vreinterpretp64_u32.c: Remove.
+ * gcc.target/arm/neon/vreinterpretp64_u64.c: Remove.
+ * gcc.target/arm/neon/vreinterpretp64_u8.c: Remove.
+ * gcc.target/arm/neon/vreinterpretp8_f32.c: Remove.
+ * gcc.target/arm/neon/vreinterpretp8_p16.c: Remove.
+ * gcc.target/arm/neon/vreinterpretp8_p64.c: Remove.
+ * gcc.target/arm/neon/vreinterpretp8_s16.c: Remove.
+ * gcc.target/arm/neon/vreinterpretp8_s32.c: Remove.
+ * gcc.target/arm/neon/vreinterpretp8_s64.c: Remove.
+ * gcc.target/arm/neon/vreinterpretp8_s8.c: Remove.
+ * gcc.target/arm/neon/vreinterpretp8_u16.c: Remove.
+ * gcc.target/arm/neon/vreinterpretp8_u32.c: Remove.
+ * gcc.target/arm/neon/vreinterpretp8_u64.c: Remove.
+ * gcc.target/arm/neon/vreinterpretp8_u8.c: Remove.
+ * gcc.target/arm/neon/vreinterprets16_f32.c: Remove.
+ * gcc.target/arm/neon/vreinterprets16_p16.c: Remove.
+ * gcc.target/arm/neon/vreinterprets16_p64.c: Remove.
+ * gcc.target/arm/neon/vreinterprets16_p8.c: Remove.
+ * gcc.target/arm/neon/vreinterprets16_s32.c: Remove.
+ * gcc.target/arm/neon/vreinterprets16_s64.c: Remove.
+ * gcc.target/arm/neon/vreinterprets16_s8.c: Remove.
+ * gcc.target/arm/neon/vreinterprets16_u16.c: Remove.
+ * gcc.target/arm/neon/vreinterprets16_u32.c: Remove.
+ * gcc.target/arm/neon/vreinterprets16_u64.c: Remove.
+ * gcc.target/arm/neon/vreinterprets16_u8.c: Remove.
+ * gcc.target/arm/neon/vreinterprets32_f32.c: Remove.
+ * gcc.target/arm/neon/vreinterprets32_p16.c: Remove.
+ * gcc.target/arm/neon/vreinterprets32_p64.c: Remove.
+ * gcc.target/arm/neon/vreinterprets32_p8.c: Remove.
+ * gcc.target/arm/neon/vreinterprets32_s16.c: Remove.
+ * gcc.target/arm/neon/vreinterprets32_s64.c: Remove.
+ * gcc.target/arm/neon/vreinterprets32_s8.c: Remove.
+ * gcc.target/arm/neon/vreinterprets32_u16.c: Remove.
+ * gcc.target/arm/neon/vreinterprets32_u32.c: Remove.
+ * gcc.target/arm/neon/vreinterprets32_u64.c: Remove.
+ * gcc.target/arm/neon/vreinterprets32_u8.c: Remove.
+ * gcc.target/arm/neon/vreinterprets64_f32.c: Remove.
+ * gcc.target/arm/neon/vreinterprets64_p16.c: Remove.
+ * gcc.target/arm/neon/vreinterprets64_p64.c: Remove.
+ * gcc.target/arm/neon/vreinterprets64_p8.c: Remove.
+ * gcc.target/arm/neon/vreinterprets64_s16.c: Remove.
+ * gcc.target/arm/neon/vreinterprets64_s32.c: Remove.
+ * gcc.target/arm/neon/vreinterprets64_s8.c: Remove.
+ * gcc.target/arm/neon/vreinterprets64_u16.c: Remove.
+ * gcc.target/arm/neon/vreinterprets64_u32.c: Remove.
+ * gcc.target/arm/neon/vreinterprets64_u64.c: Remove.
+ * gcc.target/arm/neon/vreinterprets64_u8.c: Remove.
+ * gcc.target/arm/neon/vreinterprets8_f32.c: Remove.
+ * gcc.target/arm/neon/vreinterprets8_p16.c: Remove.
+ * gcc.target/arm/neon/vreinterprets8_p64.c: Remove.
+ * gcc.target/arm/neon/vreinterprets8_p8.c: Remove.
+ * gcc.target/arm/neon/vreinterprets8_s16.c: Remove.
+ * gcc.target/arm/neon/vreinterprets8_s32.c: Remove.
+ * gcc.target/arm/neon/vreinterprets8_s64.c: Remove.
+ * gcc.target/arm/neon/vreinterprets8_u16.c: Remove.
+ * gcc.target/arm/neon/vreinterprets8_u32.c: Remove.
+ * gcc.target/arm/neon/vreinterprets8_u64.c: Remove.
+ * gcc.target/arm/neon/vreinterprets8_u8.c: Remove.
+ * gcc.target/arm/neon/vreinterpretu16_f32.c: Remove.
+ * gcc.target/arm/neon/vreinterpretu16_p16.c: Remove.
+ * gcc.target/arm/neon/vreinterpretu16_p64.c: Remove.
+ * gcc.target/arm/neon/vreinterpretu16_p8.c: Remove.
+ * gcc.target/arm/neon/vreinterpretu16_s16.c: Remove.
+ * gcc.target/arm/neon/vreinterpretu16_s32.c: Remove.
+ * gcc.target/arm/neon/vreinterpretu16_s64.c: Remove.
+ * gcc.target/arm/neon/vreinterpretu16_s8.c: Remove.
+ * gcc.target/arm/neon/vreinterpretu16_u32.c: Remove.
+ * gcc.target/arm/neon/vreinterpretu16_u64.c: Remove.
+ * gcc.target/arm/neon/vreinterpretu16_u8.c: Remove.
+ * gcc.target/arm/neon/vreinterpretu32_f32.c: Remove.
+ * gcc.target/arm/neon/vreinterpretu32_p16.c: Remove.
+ * gcc.target/arm/neon/vreinterpretu32_p64.c: Remove.
+ * gcc.target/arm/neon/vreinterpretu32_p8.c: Remove.
+ * gcc.target/arm/neon/vreinterpretu32_s16.c: Remove.
+ * gcc.target/arm/neon/vreinterpretu32_s32.c: Remove.
+ * gcc.target/arm/neon/vreinterpretu32_s64.c: Remove.
+ * gcc.target/arm/neon/vreinterpretu32_s8.c: Remove.
+ * gcc.target/arm/neon/vreinterpretu32_u16.c: Remove.
+ * gcc.target/arm/neon/vreinterpretu32_u64.c: Remove.
+ * gcc.target/arm/neon/vreinterpretu32_u8.c: Remove.
+ * gcc.target/arm/neon/vreinterpretu64_f32.c: Remove.
+ * gcc.target/arm/neon/vreinterpretu64_p16.c: Remove.
+ * gcc.target/arm/neon/vreinterpretu64_p64.c: Remove.
+ * gcc.target/arm/neon/vreinterpretu64_p8.c: Remove.
+ * gcc.target/arm/neon/vreinterpretu64_s16.c: Remove.
+ * gcc.target/arm/neon/vreinterpretu64_s32.c: Remove.
+ * gcc.target/arm/neon/vreinterpretu64_s64.c: Remove.
+ * gcc.target/arm/neon/vreinterpretu64_s8.c: Remove.
+ * gcc.target/arm/neon/vreinterpretu64_u16.c: Remove.
+ * gcc.target/arm/neon/vreinterpretu64_u32.c: Remove.
+ * gcc.target/arm/neon/vreinterpretu64_u8.c: Remove.
+ * gcc.target/arm/neon/vreinterpretu8_f32.c: Remove.
+ * gcc.target/arm/neon/vreinterpretu8_p16.c: Remove.
+ * gcc.target/arm/neon/vreinterpretu8_p64.c: Remove.
+ * gcc.target/arm/neon/vreinterpretu8_p8.c: Remove.
+ * gcc.target/arm/neon/vreinterpretu8_s16.c: Remove.
+ * gcc.target/arm/neon/vreinterpretu8_s32.c: Remove.
+ * gcc.target/arm/neon/vreinterpretu8_s64.c: Remove.
+ * gcc.target/arm/neon/vreinterpretu8_s8.c: Remove.
+ * gcc.target/arm/neon/vreinterpretu8_u16.c: Remove.
+ * gcc.target/arm/neon/vreinterpretu8_u32.c: Remove.
+ * gcc.target/arm/neon/vreinterpretu8_u64.c: Remove.
+ * gcc.target/arm/neon/vrev16Qp8.c: Remove.
+ * gcc.target/arm/neon/vrev16Qs8.c: Remove.
+ * gcc.target/arm/neon/vrev16Qu8.c: Remove.
+ * gcc.target/arm/neon/vrev16p8.c: Remove.
+ * gcc.target/arm/neon/vrev16s8.c: Remove.
+ * gcc.target/arm/neon/vrev16u8.c: Remove.
+ * gcc.target/arm/neon/vrev32Qp16.c: Remove.
+ * gcc.target/arm/neon/vrev32Qp8.c: Remove.
+ * gcc.target/arm/neon/vrev32Qs16.c: Remove.
+ * gcc.target/arm/neon/vrev32Qs8.c: Remove.
+ * gcc.target/arm/neon/vrev32Qu16.c: Remove.
+ * gcc.target/arm/neon/vrev32Qu8.c: Remove.
+ * gcc.target/arm/neon/vrev32p16.c: Remove.
+ * gcc.target/arm/neon/vrev32p8.c: Remove.
+ * gcc.target/arm/neon/vrev32s16.c: Remove.
+ * gcc.target/arm/neon/vrev32s8.c: Remove.
+ * gcc.target/arm/neon/vrev32u16.c: Remove.
+ * gcc.target/arm/neon/vrev32u8.c: Remove.
+ * gcc.target/arm/neon/vrev64Qf32.c: Remove.
+ * gcc.target/arm/neon/vrev64Qp16.c: Remove.
+ * gcc.target/arm/neon/vrev64Qp8.c: Remove.
+ * gcc.target/arm/neon/vrev64Qs16.c: Remove.
+ * gcc.target/arm/neon/vrev64Qs32.c: Remove.
+ * gcc.target/arm/neon/vrev64Qs8.c: Remove.
+ * gcc.target/arm/neon/vrev64Qu16.c: Remove.
+ * gcc.target/arm/neon/vrev64Qu32.c: Remove.
+ * gcc.target/arm/neon/vrev64Qu8.c: Remove.
+ * gcc.target/arm/neon/vrev64f32.c: Remove.
+ * gcc.target/arm/neon/vrev64p16.c: Remove.
+ * gcc.target/arm/neon/vrev64p8.c: Remove.
+ * gcc.target/arm/neon/vrev64s16.c: Remove.
+ * gcc.target/arm/neon/vrev64s32.c: Remove.
+ * gcc.target/arm/neon/vrev64s8.c: Remove.
+ * gcc.target/arm/neon/vrev64u16.c: Remove.
+ * gcc.target/arm/neon/vrev64u32.c: Remove.
+ * gcc.target/arm/neon/vrev64u8.c: Remove.
+ * gcc.target/arm/neon/vrndaf32.c: Remove.
+ * gcc.target/arm/neon/vrndaqf32.c: Remove.
+ * gcc.target/arm/neon/vrndf32.c: Remove.
+ * gcc.target/arm/neon/vrndmf32.c: Remove.
+ * gcc.target/arm/neon/vrndmqf32.c: Remove.
+ * gcc.target/arm/neon/vrndnf32.c: Remove.
+ * gcc.target/arm/neon/vrndnqf32.c: Remove.
+ * gcc.target/arm/neon/vrndpf32.c: Remove.
+ * gcc.target/arm/neon/vrndpqf32.c: Remove.
+ * gcc.target/arm/neon/vrndqf32.c: Remove.
+ * gcc.target/arm/neon/vrsqrteQf32.c: Remove.
+ * gcc.target/arm/neon/vrsqrteQu32.c: Remove.
+ * gcc.target/arm/neon/vrsqrtef32.c: Remove.
+ * gcc.target/arm/neon/vrsqrteu32.c: Remove.
+ * gcc.target/arm/neon/vrsqrtsQf32.c: Remove.
+ * gcc.target/arm/neon/vrsqrtsf32.c: Remove.
+ * gcc.target/arm/neon/vsetQ_lanef32.c: Remove.
+ * gcc.target/arm/neon/vsetQ_lanep16.c: Remove.
+ * gcc.target/arm/neon/vsetQ_lanep8.c: Remove.
+ * gcc.target/arm/neon/vsetQ_lanes16.c: Remove.
+ * gcc.target/arm/neon/vsetQ_lanes32.c: Remove.
+ * gcc.target/arm/neon/vsetQ_lanes64.c: Remove.
+ * gcc.target/arm/neon/vsetQ_lanes8.c: Remove.
+ * gcc.target/arm/neon/vsetQ_laneu16.c: Remove.
+ * gcc.target/arm/neon/vsetQ_laneu32.c: Remove.
+ * gcc.target/arm/neon/vsetQ_laneu64.c: Remove.
+ * gcc.target/arm/neon/vsetQ_laneu8.c: Remove.
+ * gcc.target/arm/neon/vset_lanef32.c: Remove.
+ * gcc.target/arm/neon/vset_lanep16.c: Remove.
+ * gcc.target/arm/neon/vset_lanep8.c: Remove.
+ * gcc.target/arm/neon/vset_lanes16.c: Remove.
+ * gcc.target/arm/neon/vset_lanes32.c: Remove.
+ * gcc.target/arm/neon/vset_lanes64.c: Remove.
+ * gcc.target/arm/neon/vset_lanes8.c: Remove.
+ * gcc.target/arm/neon/vset_laneu16.c: Remove.
+ * gcc.target/arm/neon/vset_laneu32.c: Remove.
+ * gcc.target/arm/neon/vset_laneu64.c: Remove.
+ * gcc.target/arm/neon/vset_laneu8.c: Remove.
+ * gcc.target/arm/neon/vshlQ_ns16.c: Remove.
+ * gcc.target/arm/neon/vshlQ_ns32.c: Remove.
+ * gcc.target/arm/neon/vshlQ_ns64.c: Remove.
+ * gcc.target/arm/neon/vshlQ_ns8.c: Remove.
+ * gcc.target/arm/neon/vshlQ_nu16.c: Remove.
+ * gcc.target/arm/neon/vshlQ_nu32.c: Remove.
+ * gcc.target/arm/neon/vshlQ_nu64.c: Remove.
+ * gcc.target/arm/neon/vshlQ_nu8.c: Remove.
+ * gcc.target/arm/neon/vshlQs16.c: Remove.
+ * gcc.target/arm/neon/vshlQs32.c: Remove.
+ * gcc.target/arm/neon/vshlQs64.c: Remove.
+ * gcc.target/arm/neon/vshlQs8.c: Remove.
+ * gcc.target/arm/neon/vshlQu16.c: Remove.
+ * gcc.target/arm/neon/vshlQu32.c: Remove.
+ * gcc.target/arm/neon/vshlQu64.c: Remove.
+ * gcc.target/arm/neon/vshlQu8.c: Remove.
+ * gcc.target/arm/neon/vshl_ns16.c: Remove.
+ * gcc.target/arm/neon/vshl_ns32.c: Remove.
+ * gcc.target/arm/neon/vshl_ns64.c: Remove.
+ * gcc.target/arm/neon/vshl_ns8.c: Remove.
+ * gcc.target/arm/neon/vshl_nu16.c: Remove.
+ * gcc.target/arm/neon/vshl_nu32.c: Remove.
+ * gcc.target/arm/neon/vshl_nu64.c: Remove.
+ * gcc.target/arm/neon/vshl_nu8.c: Remove.
+ * gcc.target/arm/neon/vshll_ns16.c: Remove.
+ * gcc.target/arm/neon/vshll_ns32.c: Remove.
+ * gcc.target/arm/neon/vshll_ns8.c: Remove.
+ * gcc.target/arm/neon/vshll_nu16.c: Remove.
+ * gcc.target/arm/neon/vshll_nu32.c: Remove.
+ * gcc.target/arm/neon/vshll_nu8.c: Remove.
+ * gcc.target/arm/neon/vshls16.c: Remove.
+ * gcc.target/arm/neon/vshls32.c: Remove.
+ * gcc.target/arm/neon/vshls64.c: Remove.
+ * gcc.target/arm/neon/vshls8.c: Remove.
+ * gcc.target/arm/neon/vshlu16.c: Remove.
+ * gcc.target/arm/neon/vshlu32.c: Remove.
+ * gcc.target/arm/neon/vshlu64.c: Remove.
+ * gcc.target/arm/neon/vshlu8.c: Remove.
+ * gcc.target/arm/neon/vshrQ_ns16.c: Remove.
+ * gcc.target/arm/neon/vshrQ_ns32.c: Remove.
+ * gcc.target/arm/neon/vshrQ_ns64.c: Remove.
+ * gcc.target/arm/neon/vshrQ_ns8.c: Remove.
+ * gcc.target/arm/neon/vshrQ_nu16.c: Remove.
+ * gcc.target/arm/neon/vshrQ_nu32.c: Remove.
+ * gcc.target/arm/neon/vshrQ_nu64.c: Remove.
+ * gcc.target/arm/neon/vshrQ_nu8.c: Remove.
+ * gcc.target/arm/neon/vshr_ns16.c: Remove.
+ * gcc.target/arm/neon/vshr_ns32.c: Remove.
+ * gcc.target/arm/neon/vshr_ns64.c: Remove.
+ * gcc.target/arm/neon/vshr_ns8.c: Remove.
+ * gcc.target/arm/neon/vshr_nu16.c: Remove.
+ * gcc.target/arm/neon/vshr_nu32.c: Remove.
+ * gcc.target/arm/neon/vshr_nu64.c: Remove.
+ * gcc.target/arm/neon/vshr_nu8.c: Remove.
+ * gcc.target/arm/neon/vshrn_ns16.c: Remove.
+ * gcc.target/arm/neon/vshrn_ns32.c: Remove.
+ * gcc.target/arm/neon/vshrn_ns64.c: Remove.
+ * gcc.target/arm/neon/vshrn_nu16.c: Remove.
+ * gcc.target/arm/neon/vshrn_nu32.c: Remove.
+ * gcc.target/arm/neon/vshrn_nu64.c: Remove.
+ * gcc.target/arm/neon/vsliQ_np16.c: Remove.
+ * gcc.target/arm/neon/vsliQ_np64.c: Remove.
+ * gcc.target/arm/neon/vsliQ_np8.c: Remove.
+ * gcc.target/arm/neon/vsliQ_ns16.c: Remove.
+ * gcc.target/arm/neon/vsliQ_ns32.c: Remove.
+ * gcc.target/arm/neon/vsliQ_ns64.c: Remove.
+ * gcc.target/arm/neon/vsliQ_ns8.c: Remove.
+ * gcc.target/arm/neon/vsliQ_nu16.c: Remove.
+ * gcc.target/arm/neon/vsliQ_nu32.c: Remove.
+ * gcc.target/arm/neon/vsliQ_nu64.c: Remove.
+ * gcc.target/arm/neon/vsliQ_nu8.c: Remove.
+ * gcc.target/arm/neon/vsli_np16.c: Remove.
+ * gcc.target/arm/neon/vsli_np64.c: Remove.
+ * gcc.target/arm/neon/vsli_np8.c: Remove.
+ * gcc.target/arm/neon/vsli_ns16.c: Remove.
+ * gcc.target/arm/neon/vsli_ns32.c: Remove.
+ * gcc.target/arm/neon/vsli_ns64.c: Remove.
+ * gcc.target/arm/neon/vsli_ns8.c: Remove.
+ * gcc.target/arm/neon/vsli_nu16.c: Remove.
+ * gcc.target/arm/neon/vsli_nu32.c: Remove.
+ * gcc.target/arm/neon/vsli_nu64.c: Remove.
+ * gcc.target/arm/neon/vsli_nu8.c: Remove.
+ * gcc.target/arm/neon/vsraQ_ns16.c: Remove.
+ * gcc.target/arm/neon/vsraQ_ns32.c: Remove.
+ * gcc.target/arm/neon/vsraQ_ns64.c: Remove.
+ * gcc.target/arm/neon/vsraQ_ns8.c: Remove.
+ * gcc.target/arm/neon/vsraQ_nu16.c: Remove.
+ * gcc.target/arm/neon/vsraQ_nu32.c: Remove.
+ * gcc.target/arm/neon/vsraQ_nu64.c: Remove.
+ * gcc.target/arm/neon/vsraQ_nu8.c: Remove.
+ * gcc.target/arm/neon/vsra_ns16.c: Remove.
+ * gcc.target/arm/neon/vsra_ns32.c: Remove.
+ * gcc.target/arm/neon/vsra_ns64.c: Remove.
+ * gcc.target/arm/neon/vsra_ns8.c: Remove.
+ * gcc.target/arm/neon/vsra_nu16.c: Remove.
+ * gcc.target/arm/neon/vsra_nu32.c: Remove.
+ * gcc.target/arm/neon/vsra_nu64.c: Remove.
+ * gcc.target/arm/neon/vsra_nu8.c: Remove.
+ * gcc.target/arm/neon/vsriQ_np16.c: Remove.
+ * gcc.target/arm/neon/vsriQ_np64.c: Remove.
+ * gcc.target/arm/neon/vsriQ_np8.c: Remove.
+ * gcc.target/arm/neon/vsriQ_ns16.c: Remove.
+ * gcc.target/arm/neon/vsriQ_ns32.c: Remove.
+ * gcc.target/arm/neon/vsriQ_ns64.c: Remove.
+ * gcc.target/arm/neon/vsriQ_ns8.c: Remove.
+ * gcc.target/arm/neon/vsriQ_nu16.c: Remove.
+ * gcc.target/arm/neon/vsriQ_nu32.c: Remove.
+ * gcc.target/arm/neon/vsriQ_nu64.c: Remove.
+ * gcc.target/arm/neon/vsriQ_nu8.c: Remove.
+ * gcc.target/arm/neon/vsri_np16.c: Remove.
+ * gcc.target/arm/neon/vsri_np64.c: Remove.
+ * gcc.target/arm/neon/vsri_np8.c: Remove.
+ * gcc.target/arm/neon/vsri_ns16.c: Remove.
+ * gcc.target/arm/neon/vsri_ns32.c: Remove.
+ * gcc.target/arm/neon/vsri_ns64.c: Remove.
+ * gcc.target/arm/neon/vsri_ns8.c: Remove.
+ * gcc.target/arm/neon/vsri_nu16.c: Remove.
+ * gcc.target/arm/neon/vsri_nu32.c: Remove.
+ * gcc.target/arm/neon/vsri_nu64.c: Remove.
+ * gcc.target/arm/neon/vsri_nu8.c: Remove.
+ * gcc.target/arm/neon/vst1Q_lanef32.c: Remove.
+ * gcc.target/arm/neon/vst1Q_lanep16.c: Remove.
+ * gcc.target/arm/neon/vst1Q_lanep64.c: Remove.
+ * gcc.target/arm/neon/vst1Q_lanep8.c: Remove.
+ * gcc.target/arm/neon/vst1Q_lanes16.c: Remove.
+ * gcc.target/arm/neon/vst1Q_lanes32.c: Remove.
+ * gcc.target/arm/neon/vst1Q_lanes64.c: Remove.
+ * gcc.target/arm/neon/vst1Q_lanes8.c: Remove.
+ * gcc.target/arm/neon/vst1Q_laneu16.c: Remove.
+ * gcc.target/arm/neon/vst1Q_laneu32.c: Remove.
+ * gcc.target/arm/neon/vst1Q_laneu64.c: Remove.
+ * gcc.target/arm/neon/vst1Q_laneu8.c: Remove.
+ * gcc.target/arm/neon/vst1Qf32.c: Remove.
+ * gcc.target/arm/neon/vst1Qp16.c: Remove.
+ * gcc.target/arm/neon/vst1Qp64.c: Remove.
+ * gcc.target/arm/neon/vst1Qp8.c: Remove.
+ * gcc.target/arm/neon/vst1Qs16.c: Remove.
+ * gcc.target/arm/neon/vst1Qs32.c: Remove.
+ * gcc.target/arm/neon/vst1Qs64.c: Remove.
+ * gcc.target/arm/neon/vst1Qs8.c: Remove.
+ * gcc.target/arm/neon/vst1Qu16.c: Remove.
+ * gcc.target/arm/neon/vst1Qu32.c: Remove.
+ * gcc.target/arm/neon/vst1Qu64.c: Remove.
+ * gcc.target/arm/neon/vst1Qu8.c: Remove.
+ * gcc.target/arm/neon/vst1_lanef32.c: Remove.
+ * gcc.target/arm/neon/vst1_lanep16.c: Remove.
+ * gcc.target/arm/neon/vst1_lanep64.c: Remove.
+ * gcc.target/arm/neon/vst1_lanep8.c: Remove.
+ * gcc.target/arm/neon/vst1_lanes16.c: Remove.
+ * gcc.target/arm/neon/vst1_lanes32.c: Remove.
+ * gcc.target/arm/neon/vst1_lanes64.c: Remove.
+ * gcc.target/arm/neon/vst1_lanes8.c: Remove.
+ * gcc.target/arm/neon/vst1_laneu16.c: Remove.
+ * gcc.target/arm/neon/vst1_laneu32.c: Remove.
+ * gcc.target/arm/neon/vst1_laneu64.c: Remove.
+ * gcc.target/arm/neon/vst1_laneu8.c: Remove.
+ * gcc.target/arm/neon/vst1f32.c: Remove.
+ * gcc.target/arm/neon/vst1p16.c: Remove.
+ * gcc.target/arm/neon/vst1p64.c: Remove.
+ * gcc.target/arm/neon/vst1p8.c: Remove.
+ * gcc.target/arm/neon/vst1s16.c: Remove.
+ * gcc.target/arm/neon/vst1s32.c: Remove.
+ * gcc.target/arm/neon/vst1s64.c: Remove.
+ * gcc.target/arm/neon/vst1s8.c: Remove.
+ * gcc.target/arm/neon/vst1u16.c: Remove.
+ * gcc.target/arm/neon/vst1u32.c: Remove.
+ * gcc.target/arm/neon/vst1u64.c: Remove.
+ * gcc.target/arm/neon/vst1u8.c: Remove.
+ * gcc.target/arm/neon/vst2Q_lanef32.c: Remove.
+ * gcc.target/arm/neon/vst2Q_lanep16.c: Remove.
+ * gcc.target/arm/neon/vst2Q_lanes16.c: Remove.
+ * gcc.target/arm/neon/vst2Q_lanes32.c: Remove.
+ * gcc.target/arm/neon/vst2Q_laneu16.c: Remove.
+ * gcc.target/arm/neon/vst2Q_laneu32.c: Remove.
+ * gcc.target/arm/neon/vst2Qf32.c: Remove.
+ * gcc.target/arm/neon/vst2Qp16.c: Remove.
+ * gcc.target/arm/neon/vst2Qp8.c: Remove.
+ * gcc.target/arm/neon/vst2Qs16.c: Remove.
+ * gcc.target/arm/neon/vst2Qs32.c: Remove.
+ * gcc.target/arm/neon/vst2Qs8.c: Remove.
+ * gcc.target/arm/neon/vst2Qu16.c: Remove.
+ * gcc.target/arm/neon/vst2Qu32.c: Remove.
+ * gcc.target/arm/neon/vst2Qu8.c: Remove.
+ * gcc.target/arm/neon/vst2_lanef32.c: Remove.
+ * gcc.target/arm/neon/vst2_lanep16.c: Remove.
+ * gcc.target/arm/neon/vst2_lanep8.c: Remove.
+ * gcc.target/arm/neon/vst2_lanes16.c: Remove.
+ * gcc.target/arm/neon/vst2_lanes32.c: Remove.
+ * gcc.target/arm/neon/vst2_lanes8.c: Remove.
+ * gcc.target/arm/neon/vst2_laneu16.c: Remove.
+ * gcc.target/arm/neon/vst2_laneu32.c: Remove.
+ * gcc.target/arm/neon/vst2_laneu8.c: Remove.
+ * gcc.target/arm/neon/vst2f32.c: Remove.
+ * gcc.target/arm/neon/vst2p16.c: Remove.
+ * gcc.target/arm/neon/vst2p64.c: Remove.
+ * gcc.target/arm/neon/vst2p8.c: Remove.
+ * gcc.target/arm/neon/vst2s16.c: Remove.
+ * gcc.target/arm/neon/vst2s32.c: Remove.
+ * gcc.target/arm/neon/vst2s64.c: Remove.
+ * gcc.target/arm/neon/vst2s8.c: Remove.
+ * gcc.target/arm/neon/vst2u16.c: Remove.
+ * gcc.target/arm/neon/vst2u32.c: Remove.
+ * gcc.target/arm/neon/vst2u64.c: Remove.
+ * gcc.target/arm/neon/vst2u8.c: Remove.
+ * gcc.target/arm/neon/vst3Q_lanef32.c: Remove.
+ * gcc.target/arm/neon/vst3Q_lanep16.c: Remove.
+ * gcc.target/arm/neon/vst3Q_lanes16.c: Remove.
+ * gcc.target/arm/neon/vst3Q_lanes32.c: Remove.
+ * gcc.target/arm/neon/vst3Q_laneu16.c: Remove.
+ * gcc.target/arm/neon/vst3Q_laneu32.c: Remove.
+ * gcc.target/arm/neon/vst3Qf32.c: Remove.
+ * gcc.target/arm/neon/vst3Qp16.c: Remove.
+ * gcc.target/arm/neon/vst3Qp8.c: Remove.
+ * gcc.target/arm/neon/vst3Qs16.c: Remove.
+ * gcc.target/arm/neon/vst3Qs32.c: Remove.
+ * gcc.target/arm/neon/vst3Qs8.c: Remove.
+ * gcc.target/arm/neon/vst3Qu16.c: Remove.
+ * gcc.target/arm/neon/vst3Qu32.c: Remove.
+ * gcc.target/arm/neon/vst3Qu8.c: Remove.
+ * gcc.target/arm/neon/vst3_lanef32.c: Remove.
+ * gcc.target/arm/neon/vst3_lanep16.c: Remove.
+ * gcc.target/arm/neon/vst3_lanep8.c: Remove.
+ * gcc.target/arm/neon/vst3_lanes16.c: Remove.
+ * gcc.target/arm/neon/vst3_lanes32.c: Remove.
+ * gcc.target/arm/neon/vst3_lanes8.c: Remove.
+ * gcc.target/arm/neon/vst3_laneu16.c: Remove.
+ * gcc.target/arm/neon/vst3_laneu32.c: Remove.
+ * gcc.target/arm/neon/vst3_laneu8.c: Remove.
+ * gcc.target/arm/neon/vst3f32.c: Remove.
+ * gcc.target/arm/neon/vst3p16.c: Remove.
+ * gcc.target/arm/neon/vst3p64.c: Remove.
+ * gcc.target/arm/neon/vst3p8.c: Remove.
+ * gcc.target/arm/neon/vst3s16.c: Remove.
+ * gcc.target/arm/neon/vst3s32.c: Remove.
+ * gcc.target/arm/neon/vst3s64.c: Remove.
+ * gcc.target/arm/neon/vst3s8.c: Remove.
+ * gcc.target/arm/neon/vst3u16.c: Remove.
+ * gcc.target/arm/neon/vst3u32.c: Remove.
+ * gcc.target/arm/neon/vst3u64.c: Remove.
+ * gcc.target/arm/neon/vst3u8.c: Remove.
+ * gcc.target/arm/neon/vst4Q_lanef32.c: Remove.
+ * gcc.target/arm/neon/vst4Q_lanep16.c: Remove.
+ * gcc.target/arm/neon/vst4Q_lanes16.c: Remove.
+ * gcc.target/arm/neon/vst4Q_lanes32.c: Remove.
+ * gcc.target/arm/neon/vst4Q_laneu16.c: Remove.
+ * gcc.target/arm/neon/vst4Q_laneu32.c: Remove.
+ * gcc.target/arm/neon/vst4Qf32.c: Remove.
+ * gcc.target/arm/neon/vst4Qp16.c: Remove.
+ * gcc.target/arm/neon/vst4Qp8.c: Remove.
+ * gcc.target/arm/neon/vst4Qs16.c: Remove.
+ * gcc.target/arm/neon/vst4Qs32.c: Remove.
+ * gcc.target/arm/neon/vst4Qs8.c: Remove.
+ * gcc.target/arm/neon/vst4Qu16.c: Remove.
+ * gcc.target/arm/neon/vst4Qu32.c: Remove.
+ * gcc.target/arm/neon/vst4Qu8.c: Remove.
+ * gcc.target/arm/neon/vst4_lanef32.c: Remove.
+ * gcc.target/arm/neon/vst4_lanep16.c: Remove.
+ * gcc.target/arm/neon/vst4_lanep8.c: Remove.
+ * gcc.target/arm/neon/vst4_lanes16.c: Remove.
+ * gcc.target/arm/neon/vst4_lanes32.c: Remove.
+ * gcc.target/arm/neon/vst4_lanes8.c: Remove.
+ * gcc.target/arm/neon/vst4_laneu16.c: Remove.
+ * gcc.target/arm/neon/vst4_laneu32.c: Remove.
+ * gcc.target/arm/neon/vst4_laneu8.c: Remove.
+ * gcc.target/arm/neon/vst4f32.c: Remove.
+ * gcc.target/arm/neon/vst4p16.c: Remove.
+ * gcc.target/arm/neon/vst4p64.c: Remove.
+ * gcc.target/arm/neon/vst4p8.c: Remove.
+ * gcc.target/arm/neon/vst4s16.c: Remove.
+ * gcc.target/arm/neon/vst4s32.c: Remove.
+ * gcc.target/arm/neon/vst4s64.c: Remove.
+ * gcc.target/arm/neon/vst4s8.c: Remove.
+ * gcc.target/arm/neon/vst4u16.c: Remove.
+ * gcc.target/arm/neon/vst4u32.c: Remove.
+ * gcc.target/arm/neon/vst4u64.c: Remove.
+ * gcc.target/arm/neon/vst4u8.c: Remove.
+ * gcc.target/arm/neon/vsubQf32.c: Remove.
+ * gcc.target/arm/neon/vsubQs16.c: Remove.
+ * gcc.target/arm/neon/vsubQs32.c: Remove.
+ * gcc.target/arm/neon/vsubQs64.c: Remove.
+ * gcc.target/arm/neon/vsubQs8.c: Remove.
+ * gcc.target/arm/neon/vsubQu16.c: Remove.
+ * gcc.target/arm/neon/vsubQu32.c: Remove.
+ * gcc.target/arm/neon/vsubQu64.c: Remove.
+ * gcc.target/arm/neon/vsubQu8.c: Remove.
+ * gcc.target/arm/neon/vsubf32.c: Remove.
+ * gcc.target/arm/neon/vsubhns16.c: Remove.
+ * gcc.target/arm/neon/vsubhns32.c: Remove.
+ * gcc.target/arm/neon/vsubhns64.c: Remove.
+ * gcc.target/arm/neon/vsubhnu16.c: Remove.
+ * gcc.target/arm/neon/vsubhnu32.c: Remove.
+ * gcc.target/arm/neon/vsubhnu64.c: Remove.
+ * gcc.target/arm/neon/vsubls16.c: Remove.
+ * gcc.target/arm/neon/vsubls32.c: Remove.
+ * gcc.target/arm/neon/vsubls8.c: Remove.
+ * gcc.target/arm/neon/vsublu16.c: Remove.
+ * gcc.target/arm/neon/vsublu32.c: Remove.
+ * gcc.target/arm/neon/vsublu8.c: Remove.
+ * gcc.target/arm/neon/vsubs16.c: Remove.
+ * gcc.target/arm/neon/vsubs32.c: Remove.
+ * gcc.target/arm/neon/vsubs64.c: Remove.
+ * gcc.target/arm/neon/vsubs8.c: Remove.
+ * gcc.target/arm/neon/vsubu16.c: Remove.
+ * gcc.target/arm/neon/vsubu32.c: Remove.
+ * gcc.target/arm/neon/vsubu64.c: Remove.
+ * gcc.target/arm/neon/vsubu8.c: Remove.
+ * gcc.target/arm/neon/vsubws16.c: Remove.
+ * gcc.target/arm/neon/vsubws32.c: Remove.
+ * gcc.target/arm/neon/vsubws8.c: Remove.
+ * gcc.target/arm/neon/vsubwu16.c: Remove.
+ * gcc.target/arm/neon/vsubwu32.c: Remove.
+ * gcc.target/arm/neon/vsubwu8.c: Remove.
+ * gcc.target/arm/neon/vtbl1p8.c: Remove.
+ * gcc.target/arm/neon/vtbl1s8.c: Remove.
+ * gcc.target/arm/neon/vtbl1u8.c: Remove.
+ * gcc.target/arm/neon/vtbl2p8.c: Remove.
+ * gcc.target/arm/neon/vtbl2s8.c: Remove.
+ * gcc.target/arm/neon/vtbl2u8.c: Remove.
+ * gcc.target/arm/neon/vtbl3p8.c: Remove.
+ * gcc.target/arm/neon/vtbl3s8.c: Remove.
+ * gcc.target/arm/neon/vtbl3u8.c: Remove.
+ * gcc.target/arm/neon/vtbl4p8.c: Remove.
+ * gcc.target/arm/neon/vtbl4s8.c: Remove.
+ * gcc.target/arm/neon/vtbl4u8.c: Remove.
+ * gcc.target/arm/neon/vtbx1p8.c: Remove.
+ * gcc.target/arm/neon/vtbx1s8.c: Remove.
+ * gcc.target/arm/neon/vtbx1u8.c: Remove.
+ * gcc.target/arm/neon/vtbx2p8.c: Remove.
+ * gcc.target/arm/neon/vtbx2s8.c: Remove.
+ * gcc.target/arm/neon/vtbx2u8.c: Remove.
+ * gcc.target/arm/neon/vtbx3p8.c: Remove.
+ * gcc.target/arm/neon/vtbx3s8.c: Remove.
+ * gcc.target/arm/neon/vtbx3u8.c: Remove.
+ * gcc.target/arm/neon/vtbx4p8.c: Remove.
+ * gcc.target/arm/neon/vtbx4s8.c: Remove.
+ * gcc.target/arm/neon/vtbx4u8.c: Remove.
+ * gcc.target/arm/neon/vtrnQf32.c: Remove.
+ * gcc.target/arm/neon/vtrnQp16.c: Remove.
+ * gcc.target/arm/neon/vtrnQp8.c: Remove.
+ * gcc.target/arm/neon/vtrnQs16.c: Remove.
+ * gcc.target/arm/neon/vtrnQs32.c: Remove.
+ * gcc.target/arm/neon/vtrnQs8.c: Remove.
+ * gcc.target/arm/neon/vtrnQu16.c: Remove.
+ * gcc.target/arm/neon/vtrnQu32.c: Remove.
+ * gcc.target/arm/neon/vtrnQu8.c: Remove.
+ * gcc.target/arm/neon/vtrnf32.c: Remove.
+ * gcc.target/arm/neon/vtrnp16.c: Remove.
+ * gcc.target/arm/neon/vtrnp8.c: Remove.
+ * gcc.target/arm/neon/vtrns16.c: Remove.
+ * gcc.target/arm/neon/vtrns32.c: Remove.
+ * gcc.target/arm/neon/vtrns8.c: Remove.
+ * gcc.target/arm/neon/vtrnu16.c: Remove.
+ * gcc.target/arm/neon/vtrnu32.c: Remove.
+ * gcc.target/arm/neon/vtrnu8.c: Remove.
+ * gcc.target/arm/neon/vtstQp8.c: Remove.
+ * gcc.target/arm/neon/vtstQs16.c: Remove.
+ * gcc.target/arm/neon/vtstQs32.c: Remove.
+ * gcc.target/arm/neon/vtstQs8.c: Remove.
+ * gcc.target/arm/neon/vtstQu16.c: Remove.
+ * gcc.target/arm/neon/vtstQu32.c: Remove.
+ * gcc.target/arm/neon/vtstQu8.c: Remove.
+ * gcc.target/arm/neon/vtstp8.c: Remove.
+ * gcc.target/arm/neon/vtsts16.c: Remove.
+ * gcc.target/arm/neon/vtsts32.c: Remove.
+ * gcc.target/arm/neon/vtsts8.c: Remove.
+ * gcc.target/arm/neon/vtstu16.c: Remove.
+ * gcc.target/arm/neon/vtstu32.c: Remove.
+ * gcc.target/arm/neon/vtstu8.c: Remove.
+ * gcc.target/arm/neon/vuzpQf32.c: Remove.
+ * gcc.target/arm/neon/vuzpQp16.c: Remove.
+ * gcc.target/arm/neon/vuzpQp8.c: Remove.
+ * gcc.target/arm/neon/vuzpQs16.c: Remove.
+ * gcc.target/arm/neon/vuzpQs32.c: Remove.
+ * gcc.target/arm/neon/vuzpQs8.c: Remove.
+ * gcc.target/arm/neon/vuzpQu16.c: Remove.
+ * gcc.target/arm/neon/vuzpQu32.c: Remove.
+ * gcc.target/arm/neon/vuzpQu8.c: Remove.
+ * gcc.target/arm/neon/vuzpf32.c: Remove.
+ * gcc.target/arm/neon/vuzpp16.c: Remove.
+ * gcc.target/arm/neon/vuzpp8.c: Remove.
+ * gcc.target/arm/neon/vuzps16.c: Remove.
+ * gcc.target/arm/neon/vuzps32.c: Remove.
+ * gcc.target/arm/neon/vuzps8.c: Remove.
+ * gcc.target/arm/neon/vuzpu16.c: Remove.
+ * gcc.target/arm/neon/vuzpu32.c: Remove.
+ * gcc.target/arm/neon/vuzpu8.c: Remove.
+ * gcc.target/arm/neon/vzipQf32.c: Remove.
+ * gcc.target/arm/neon/vzipQp16.c: Remove.
+ * gcc.target/arm/neon/vzipQp8.c: Remove.
+ * gcc.target/arm/neon/vzipQs16.c: Remove.
+ * gcc.target/arm/neon/vzipQs32.c: Remove.
+ * gcc.target/arm/neon/vzipQs8.c: Remove.
+ * gcc.target/arm/neon/vzipQu16.c: Remove.
+ * gcc.target/arm/neon/vzipQu32.c: Remove.
+ * gcc.target/arm/neon/vzipQu8.c: Remove.
+ * gcc.target/arm/neon/vzipf32.c: Remove.
+ * gcc.target/arm/neon/vzipp16.c: Remove.
+ * gcc.target/arm/neon/vzipp8.c: Remove.
+ * gcc.target/arm/neon/vzips16.c: Remove.
+ * gcc.target/arm/neon/vzips32.c: Remove.
+ * gcc.target/arm/neon/vzips8.c: Remove.
+ * gcc.target/arm/neon/vzipu16.c: Remove.
+ * gcc.target/arm/neon/vzipu32.c: Remove.
+ * gcc.target/arm/neon/vzipu8.c: Remove.
+
+2015-11-13 Ilya Enkovich <enkovich.gnu@gmail.com>
+
+ * g++.dg/vect/simd-mask-store-bool.cc: New test.
+
+2015-11-13 David Malcolm <dmalcolm@redhat.com>
+
+ PR driver/67613
+ * gcc/testsuite/gcc.dg/spellcheck-options-1.c: New file.
+ * gcc/testsuite/gcc.dg/spellcheck-options-2.c: New file.
+
+2015-11-13 David Malcolm <dmalcolm@redhat.com>
+
+ * gcc.dg/plugin/levenshtein-test-1.c: New file.
+ * gcc.dg/plugin/levenshtein_plugin.c: New file.
+ * gcc.dg/plugin/plugin.exp (plugin_test_list): Add
+ levenshtein_plugin.c.
+ * gcc.dg/spellcheck-fields.c: New file.
+
+2015-11-12 Steven G. Kargl <kargl@gcc.gnu.org>
+
+ PR fortran/68318
+ * gfortran.dg/pr68318_1.f90: New test.
+ * gfortran.dg/pr68318_2.f90: Ditto.
+
+2015-11-12 James Norris <jnorris@codesourcery.com>
+ Joseph Myers <joseph@codesourcery.com>
+
+ * c-c++-common/goacc/declare-1.c: New test.
+ * c-c++-common/goacc/declare-2.c: Likewise.
+
+2015-11-12 Christophe Lyon <christophe.lyon@linaro.org>
+
+ [ARM] Remove neon-testgen.ml and generated tests.
+
+ * gcc.target/arm/neon/vRaddhns16.c: Remove.
+ * gcc.target/arm/neon/vRaddhns32.c: Remove.
+ * gcc.target/arm/neon/vRaddhns64.c: Remove.
+ * gcc.target/arm/neon/vRaddhnu16.c: Remove.
+ * gcc.target/arm/neon/vRaddhnu32.c: Remove.
+ * gcc.target/arm/neon/vRaddhnu64.c: Remove.
+ * gcc.target/arm/neon/vRhaddQs16.c: Remove.
+ * gcc.target/arm/neon/vRhaddQs32.c: Remove.
+ * gcc.target/arm/neon/vRhaddQs8.c: Remove.
+ * gcc.target/arm/neon/vRhaddQu16.c: Remove.
+ * gcc.target/arm/neon/vRhaddQu32.c: Remove.
+ * gcc.target/arm/neon/vRhaddQu8.c: Remove.
+ * gcc.target/arm/neon/vRhadds16.c: Remove.
+ * gcc.target/arm/neon/vRhadds32.c: Remove.
+ * gcc.target/arm/neon/vRhadds8.c: Remove.
+ * gcc.target/arm/neon/vRhaddu16.c: Remove.
+ * gcc.target/arm/neon/vRhaddu32.c: Remove.
+ * gcc.target/arm/neon/vRhaddu8.c: Remove.
+ * gcc.target/arm/neon/vRshlQs16.c: Remove.
+ * gcc.target/arm/neon/vRshlQs32.c: Remove.
+ * gcc.target/arm/neon/vRshlQs64.c: Remove.
+ * gcc.target/arm/neon/vRshlQs8.c: Remove.
+ * gcc.target/arm/neon/vRshlQu16.c: Remove.
+ * gcc.target/arm/neon/vRshlQu32.c: Remove.
+ * gcc.target/arm/neon/vRshlQu64.c: Remove.
+ * gcc.target/arm/neon/vRshlQu8.c: Remove.
+ * gcc.target/arm/neon/vRshls16.c: Remove.
+ * gcc.target/arm/neon/vRshls32.c: Remove.
+ * gcc.target/arm/neon/vRshls64.c: Remove.
+ * gcc.target/arm/neon/vRshls8.c: Remove.
+ * gcc.target/arm/neon/vRshlu16.c: Remove.
+ * gcc.target/arm/neon/vRshlu32.c: Remove.
+ * gcc.target/arm/neon/vRshlu64.c: Remove.
+ * gcc.target/arm/neon/vRshlu8.c: Remove.
+ * gcc.target/arm/neon/vRshrQ_ns16.c: Remove.
+ * gcc.target/arm/neon/vRshrQ_ns32.c: Remove.
+ * gcc.target/arm/neon/vRshrQ_ns64.c: Remove.
+ * gcc.target/arm/neon/vRshrQ_ns8.c: Remove.
+ * gcc.target/arm/neon/vRshrQ_nu16.c: Remove.
+ * gcc.target/arm/neon/vRshrQ_nu32.c: Remove.
+ * gcc.target/arm/neon/vRshrQ_nu64.c: Remove.
+ * gcc.target/arm/neon/vRshrQ_nu8.c: Remove.
+ * gcc.target/arm/neon/vRshr_ns16.c: Remove.
+ * gcc.target/arm/neon/vRshr_ns32.c: Remove.
+ * gcc.target/arm/neon/vRshr_ns64.c: Remove.
+ * gcc.target/arm/neon/vRshr_ns8.c: Remove.
+ * gcc.target/arm/neon/vRshr_nu16.c: Remove.
+ * gcc.target/arm/neon/vRshr_nu32.c: Remove.
+ * gcc.target/arm/neon/vRshr_nu64.c: Remove.
+ * gcc.target/arm/neon/vRshr_nu8.c: Remove.
+ * gcc.target/arm/neon/vRshrn_ns16.c: Remove.
+ * gcc.target/arm/neon/vRshrn_ns32.c: Remove.
+ * gcc.target/arm/neon/vRshrn_ns64.c: Remove.
+ * gcc.target/arm/neon/vRshrn_nu16.c: Remove.
+ * gcc.target/arm/neon/vRshrn_nu32.c: Remove.
+ * gcc.target/arm/neon/vRshrn_nu64.c: Remove.
+ * gcc.target/arm/neon/vRsraQ_ns16.c: Remove.
+ * gcc.target/arm/neon/vRsraQ_ns32.c: Remove.
+ * gcc.target/arm/neon/vRsraQ_ns64.c: Remove.
+ * gcc.target/arm/neon/vRsraQ_ns8.c: Remove.
+ * gcc.target/arm/neon/vRsraQ_nu16.c: Remove.
+ * gcc.target/arm/neon/vRsraQ_nu32.c: Remove.
+ * gcc.target/arm/neon/vRsraQ_nu64.c: Remove.
+ * gcc.target/arm/neon/vRsraQ_nu8.c: Remove.
+ * gcc.target/arm/neon/vRsra_ns16.c: Remove.
+ * gcc.target/arm/neon/vRsra_ns32.c: Remove.
+ * gcc.target/arm/neon/vRsra_ns64.c: Remove.
+ * gcc.target/arm/neon/vRsra_ns8.c: Remove.
+ * gcc.target/arm/neon/vRsra_nu16.c: Remove.
+ * gcc.target/arm/neon/vRsra_nu32.c: Remove.
+ * gcc.target/arm/neon/vRsra_nu64.c: Remove.
+ * gcc.target/arm/neon/vRsra_nu8.c: Remove.
+ * gcc.target/arm/neon/vRsubhns16.c: Remove.
+ * gcc.target/arm/neon/vRsubhns32.c: Remove.
+ * gcc.target/arm/neon/vRsubhns64.c: Remove.
+ * gcc.target/arm/neon/vRsubhnu16.c: Remove.
+ * gcc.target/arm/neon/vRsubhnu32.c: Remove.
+ * gcc.target/arm/neon/vRsubhnu64.c: Remove.
+ * gcc.target/arm/neon/vabaQs16.c: Remove.
+ * gcc.target/arm/neon/vabaQs32.c: Remove.
+ * gcc.target/arm/neon/vabaQs8.c: Remove.
+ * gcc.target/arm/neon/vabaQu16.c: Remove.
+ * gcc.target/arm/neon/vabaQu32.c: Remove.
+ * gcc.target/arm/neon/vabaQu8.c: Remove.
+ * gcc.target/arm/neon/vabals16.c: Remove.
+ * gcc.target/arm/neon/vabals32.c: Remove.
+ * gcc.target/arm/neon/vabals8.c: Remove.
+ * gcc.target/arm/neon/vabalu16.c: Remove.
+ * gcc.target/arm/neon/vabalu32.c: Remove.
+ * gcc.target/arm/neon/vabalu8.c: Remove.
+ * gcc.target/arm/neon/vabas16.c: Remove.
+ * gcc.target/arm/neon/vabas32.c: Remove.
+ * gcc.target/arm/neon/vabas8.c: Remove.
+ * gcc.target/arm/neon/vabau16.c: Remove.
+ * gcc.target/arm/neon/vabau32.c: Remove.
+ * gcc.target/arm/neon/vabau8.c: Remove.
+ * gcc.target/arm/neon/vabdQf32.c: Remove.
+ * gcc.target/arm/neon/vabdQs16.c: Remove.
+ * gcc.target/arm/neon/vabdQs32.c: Remove.
+ * gcc.target/arm/neon/vabdQs8.c: Remove.
+ * gcc.target/arm/neon/vabdQu16.c: Remove.
+ * gcc.target/arm/neon/vabdQu32.c: Remove.
+ * gcc.target/arm/neon/vabdQu8.c: Remove.
+ * gcc.target/arm/neon/vabdf32.c: Remove.
+ * gcc.target/arm/neon/vabdls16.c: Remove.
+ * gcc.target/arm/neon/vabdls32.c: Remove.
+ * gcc.target/arm/neon/vabdls8.c: Remove.
+ * gcc.target/arm/neon/vabdlu16.c: Remove.
+ * gcc.target/arm/neon/vabdlu32.c: Remove.
+ * gcc.target/arm/neon/vabdlu8.c: Remove.
+ * gcc.target/arm/neon/vabds16.c: Remove.
+ * gcc.target/arm/neon/vabds32.c: Remove.
+ * gcc.target/arm/neon/vabds8.c: Remove.
+ * gcc.target/arm/neon/vabdu16.c: Remove.
+ * gcc.target/arm/neon/vabdu32.c: Remove.
+ * gcc.target/arm/neon/vabdu8.c: Remove.
+ * gcc.target/arm/neon/vabsQf32.c: Remove.
+ * gcc.target/arm/neon/vabsQs16.c: Remove.
+ * gcc.target/arm/neon/vabsQs32.c: Remove.
+ * gcc.target/arm/neon/vabsQs8.c: Remove.
+ * gcc.target/arm/neon/vabsf32.c: Remove.
+ * gcc.target/arm/neon/vabss16.c: Remove.
+ * gcc.target/arm/neon/vabss32.c: Remove.
+ * gcc.target/arm/neon/vabss8.c: Remove.
+ * gcc.target/arm/neon/vaddQf32.c: Remove.
+ * gcc.target/arm/neon/vaddQs16.c: Remove.
+ * gcc.target/arm/neon/vaddQs32.c: Remove.
+ * gcc.target/arm/neon/vaddQs64.c: Remove.
+ * gcc.target/arm/neon/vaddQs8.c: Remove.
+ * gcc.target/arm/neon/vaddQu16.c: Remove.
+ * gcc.target/arm/neon/vaddQu32.c: Remove.
+ * gcc.target/arm/neon/vaddQu64.c: Remove.
+ * gcc.target/arm/neon/vaddQu8.c: Remove.
+ * gcc.target/arm/neon/vaddf32.c: Remove.
+ * gcc.target/arm/neon/vaddhns16.c: Remove.
+ * gcc.target/arm/neon/vaddhns32.c: Remove.
+ * gcc.target/arm/neon/vaddhns64.c: Remove.
+ * gcc.target/arm/neon/vaddhnu16.c: Remove.
+ * gcc.target/arm/neon/vaddhnu32.c: Remove.
+ * gcc.target/arm/neon/vaddhnu64.c: Remove.
+ * gcc.target/arm/neon/vaddls16.c: Remove.
+ * gcc.target/arm/neon/vaddls32.c: Remove.
+ * gcc.target/arm/neon/vaddls8.c: Remove.
+ * gcc.target/arm/neon/vaddlu16.c: Remove.
+ * gcc.target/arm/neon/vaddlu32.c: Remove.
+ * gcc.target/arm/neon/vaddlu8.c: Remove.
+ * gcc.target/arm/neon/vadds16.c: Remove.
+ * gcc.target/arm/neon/vadds32.c: Remove.
+ * gcc.target/arm/neon/vadds64.c: Remove.
+ * gcc.target/arm/neon/vadds8.c: Remove.
+ * gcc.target/arm/neon/vaddu16.c: Remove.
+ * gcc.target/arm/neon/vaddu32.c: Remove.
+ * gcc.target/arm/neon/vaddu64.c: Remove.
+ * gcc.target/arm/neon/vaddu8.c: Remove.
+ * gcc.target/arm/neon/vaddws16.c: Remove.
+ * gcc.target/arm/neon/vaddws32.c: Remove.
+ * gcc.target/arm/neon/vaddws8.c: Remove.
+ * gcc.target/arm/neon/vaddwu16.c: Remove.
+ * gcc.target/arm/neon/vaddwu32.c: Remove.
+ * gcc.target/arm/neon/vaddwu8.c: Remove.
+ * gcc.target/arm/neon/vandQs16.c: Remove.
+ * gcc.target/arm/neon/vandQs32.c: Remove.
+ * gcc.target/arm/neon/vandQs64.c: Remove.
+ * gcc.target/arm/neon/vandQs8.c: Remove.
+ * gcc.target/arm/neon/vandQu16.c: Remove.
+ * gcc.target/arm/neon/vandQu32.c: Remove.
+ * gcc.target/arm/neon/vandQu64.c: Remove.
+ * gcc.target/arm/neon/vandQu8.c: Remove.
+ * gcc.target/arm/neon/vands16.c: Remove.
+ * gcc.target/arm/neon/vands32.c: Remove.
+ * gcc.target/arm/neon/vands64.c: Remove.
+ * gcc.target/arm/neon/vands8.c: Remove.
+ * gcc.target/arm/neon/vandu16.c: Remove.
+ * gcc.target/arm/neon/vandu32.c: Remove.
+ * gcc.target/arm/neon/vandu64.c: Remove.
+ * gcc.target/arm/neon/vandu8.c: Remove.
+ * gcc.target/arm/neon/vbicQs16.c: Remove.
+ * gcc.target/arm/neon/vbicQs32.c: Remove.
+ * gcc.target/arm/neon/vbicQs64.c: Remove.
+ * gcc.target/arm/neon/vbicQs8.c: Remove.
+ * gcc.target/arm/neon/vbicQu16.c: Remove.
+ * gcc.target/arm/neon/vbicQu32.c: Remove.
+ * gcc.target/arm/neon/vbicQu64.c: Remove.
+ * gcc.target/arm/neon/vbicQu8.c: Remove.
+ * gcc.target/arm/neon/vbics16.c: Remove.
+ * gcc.target/arm/neon/vbics32.c: Remove.
+ * gcc.target/arm/neon/vbics64.c: Remove.
+ * gcc.target/arm/neon/vbics8.c: Remove.
+ * gcc.target/arm/neon/vbicu16.c: Remove.
+ * gcc.target/arm/neon/vbicu32.c: Remove.
+ * gcc.target/arm/neon/vbicu64.c: Remove.
+ * gcc.target/arm/neon/vbicu8.c: Remove.
+ * gcc.target/arm/neon/vbslQf32.c: Remove.
+ * gcc.target/arm/neon/vbslQp16.c: Remove.
+ * gcc.target/arm/neon/vbslQp64.c: Remove.
+ * gcc.target/arm/neon/vbslQp8.c: Remove.
+ * gcc.target/arm/neon/vbslQs16.c: Remove.
+ * gcc.target/arm/neon/vbslQs32.c: Remove.
+ * gcc.target/arm/neon/vbslQs64.c: Remove.
+ * gcc.target/arm/neon/vbslQs8.c: Remove.
+ * gcc.target/arm/neon/vbslQu16.c: Remove.
+ * gcc.target/arm/neon/vbslQu32.c: Remove.
+ * gcc.target/arm/neon/vbslQu64.c: Remove.
+ * gcc.target/arm/neon/vbslQu8.c: Remove.
+ * gcc.target/arm/neon/vbslf32.c: Remove.
+ * gcc.target/arm/neon/vbslp16.c: Remove.
+ * gcc.target/arm/neon/vbslp64.c: Remove.
+ * gcc.target/arm/neon/vbslp8.c: Remove.
+ * gcc.target/arm/neon/vbsls16.c: Remove.
+ * gcc.target/arm/neon/vbsls32.c: Remove.
+ * gcc.target/arm/neon/vbsls64.c: Remove.
+ * gcc.target/arm/neon/vbsls8.c: Remove.
+ * gcc.target/arm/neon/vbslu16.c: Remove.
+ * gcc.target/arm/neon/vbslu32.c: Remove.
+ * gcc.target/arm/neon/vbslu64.c: Remove.
+ * gcc.target/arm/neon/vbslu8.c: Remove.
+ * gcc.target/arm/neon/vcageQf32.c: Remove.
+ * gcc.target/arm/neon/vcagef32.c: Remove.
+ * gcc.target/arm/neon/vcagtQf32.c: Remove.
+ * gcc.target/arm/neon/vcagtf32.c: Remove.
+ * gcc.target/arm/neon/vcaleQf32.c: Remove.
+ * gcc.target/arm/neon/vcalef32.c: Remove.
+ * gcc.target/arm/neon/vcaltQf32.c: Remove.
+ * gcc.target/arm/neon/vcaltf32.c: Remove.
+ * gcc.target/arm/neon/vceqQf32.c: Remove.
+ * gcc.target/arm/neon/vceqQp8.c: Remove.
+ * gcc.target/arm/neon/vceqQs16.c: Remove.
+ * gcc.target/arm/neon/vceqQs32.c: Remove.
+ * gcc.target/arm/neon/vceqQs8.c: Remove.
+ * gcc.target/arm/neon/vceqQu16.c: Remove.
+ * gcc.target/arm/neon/vceqQu32.c: Remove.
+ * gcc.target/arm/neon/vceqQu8.c: Remove.
+ * gcc.target/arm/neon/vceqf32.c: Remove.
+ * gcc.target/arm/neon/vceqp8.c: Remove.
+ * gcc.target/arm/neon/vceqs16.c: Remove.
+ * gcc.target/arm/neon/vceqs32.c: Remove.
+ * gcc.target/arm/neon/vceqs8.c: Remove.
+ * gcc.target/arm/neon/vcequ16.c: Remove.
+ * gcc.target/arm/neon/vcequ32.c: Remove.
+ * gcc.target/arm/neon/vcequ8.c: Remove.
+ * gcc.target/arm/neon/vcgeQf32.c: Remove.
+ * gcc.target/arm/neon/vcgeQs16.c: Remove.
+ * gcc.target/arm/neon/vcgeQs32.c: Remove.
+ * gcc.target/arm/neon/vcgeQs8.c: Remove.
+ * gcc.target/arm/neon/vcgeQu16.c: Remove.
+ * gcc.target/arm/neon/vcgeQu32.c: Remove.
+ * gcc.target/arm/neon/vcgeQu8.c: Remove.
+ * gcc.target/arm/neon/vcgef32.c: Remove.
+ * gcc.target/arm/neon/vcges16.c: Remove.
+ * gcc.target/arm/neon/vcges32.c: Remove.
+ * gcc.target/arm/neon/vcges8.c: Remove.
+ * gcc.target/arm/neon/vcgeu16.c: Remove.
+ * gcc.target/arm/neon/vcgeu32.c: Remove.
+ * gcc.target/arm/neon/vcgeu8.c: Remove.
+ * gcc.target/arm/neon/vcgtQf32.c: Remove.
+ * gcc.target/arm/neon/vcgtQs16.c: Remove.
+ * gcc.target/arm/neon/vcgtQs32.c: Remove.
+ * gcc.target/arm/neon/vcgtQs8.c: Remove.
+ * gcc.target/arm/neon/vcgtQu16.c: Remove.
+ * gcc.target/arm/neon/vcgtQu32.c: Remove.
+ * gcc.target/arm/neon/vcgtQu8.c: Remove.
+ * gcc.target/arm/neon/vcgtf32.c: Remove.
+ * gcc.target/arm/neon/vcgts16.c: Remove.
+ * gcc.target/arm/neon/vcgts32.c: Remove.
+ * gcc.target/arm/neon/vcgts8.c: Remove.
+ * gcc.target/arm/neon/vcgtu16.c: Remove.
+ * gcc.target/arm/neon/vcgtu32.c: Remove.
+ * gcc.target/arm/neon/vcgtu8.c: Remove.
+ * gcc.target/arm/neon/vcleQf32.c: Remove.
+ * gcc.target/arm/neon/vcleQs16.c: Remove.
+ * gcc.target/arm/neon/vcleQs32.c: Remove.
+ * gcc.target/arm/neon/vcleQs8.c: Remove.
+ * gcc.target/arm/neon/vcleQu16.c: Remove.
+ * gcc.target/arm/neon/vcleQu32.c: Remove.
+ * gcc.target/arm/neon/vcleQu8.c: Remove.
+ * gcc.target/arm/neon/vclef32.c: Remove.
+ * gcc.target/arm/neon/vcles16.c: Remove.
+ * gcc.target/arm/neon/vcles32.c: Remove.
+ * gcc.target/arm/neon/vcles8.c: Remove.
+ * gcc.target/arm/neon/vcleu16.c: Remove.
+ * gcc.target/arm/neon/vcleu32.c: Remove.
+ * gcc.target/arm/neon/vcleu8.c: Remove.
+ * gcc.target/arm/neon/vclsQs16.c: Remove.
+ * gcc.target/arm/neon/vclsQs32.c: Remove.
+ * gcc.target/arm/neon/vclsQs8.c: Remove.
+ * gcc.target/arm/neon/vclss16.c: Remove.
+ * gcc.target/arm/neon/vclss32.c: Remove.
+ * gcc.target/arm/neon/vclss8.c: Remove.
+ * gcc.target/arm/neon/vcltQf32.c: Remove.
+ * gcc.target/arm/neon/vcltQs16.c: Remove.
+ * gcc.target/arm/neon/vcltQs32.c: Remove.
+ * gcc.target/arm/neon/vcltQs8.c: Remove.
+ * gcc.target/arm/neon/vcltQu16.c: Remove.
+ * gcc.target/arm/neon/vcltQu32.c: Remove.
+ * gcc.target/arm/neon/vcltQu8.c: Remove.
+ * gcc.target/arm/neon/vcltf32.c: Remove.
+ * gcc.target/arm/neon/vclts16.c: Remove.
+ * gcc.target/arm/neon/vclts32.c: Remove.
+ * gcc.target/arm/neon/vclts8.c: Remove.
+ * gcc.target/arm/neon/vcltu16.c: Remove.
+ * gcc.target/arm/neon/vcltu32.c: Remove.
+ * gcc.target/arm/neon/vcltu8.c: Remove.
+ * gcc.target/arm/neon/vclzQs16.c: Remove.
+ * gcc.target/arm/neon/vclzQs32.c: Remove.
+ * gcc.target/arm/neon/vclzQs8.c: Remove.
+ * gcc.target/arm/neon/vclzQu16.c: Remove.
+ * gcc.target/arm/neon/vclzQu32.c: Remove.
+ * gcc.target/arm/neon/vclzQu8.c: Remove.
+ * gcc.target/arm/neon/vclzs16.c: Remove.
+ * gcc.target/arm/neon/vclzs32.c: Remove.
+ * gcc.target/arm/neon/vclzs8.c: Remove.
+ * gcc.target/arm/neon/vclzu16.c: Remove.
+ * gcc.target/arm/neon/vclzu32.c: Remove.
+ * gcc.target/arm/neon/vclzu8.c: Remove.
+ * gcc.target/arm/neon/vcntQp8.c: Remove.
+ * gcc.target/arm/neon/vcntQs8.c: Remove.
+ * gcc.target/arm/neon/vcntQu8.c: Remove.
+ * gcc.target/arm/neon/vcntp8.c: Remove.
+ * gcc.target/arm/neon/vcnts8.c: Remove.
+ * gcc.target/arm/neon/vcntu8.c: Remove.
+ * gcc.target/arm/neon/vcombinef32.c: Remove.
+ * gcc.target/arm/neon/vcombinep16.c: Remove.
+ * gcc.target/arm/neon/vcombinep64.c: Remove.
+ * gcc.target/arm/neon/vcombinep8.c: Remove.
+ * gcc.target/arm/neon/vcombines16.c: Remove.
+ * gcc.target/arm/neon/vcombines32.c: Remove.
+ * gcc.target/arm/neon/vcombines64.c: Remove.
+ * gcc.target/arm/neon/vcombines8.c: Remove.
+ * gcc.target/arm/neon/vcombineu16.c: Remove.
+ * gcc.target/arm/neon/vcombineu32.c: Remove.
+ * gcc.target/arm/neon/vcombineu64.c: Remove.
+ * gcc.target/arm/neon/vcombineu8.c: Remove.
+ * gcc.target/arm/neon/vcreatef32.c: Remove.
+ * gcc.target/arm/neon/vcreatep16.c: Remove.
+ * gcc.target/arm/neon/vcreatep64.c: Remove.
+ * gcc.target/arm/neon/vcreatep8.c: Remove.
+ * gcc.target/arm/neon/vcreates16.c: Remove.
+ * gcc.target/arm/neon/vcreates32.c: Remove.
+ * gcc.target/arm/neon/vcreates64.c: Remove.
+ * gcc.target/arm/neon/vcreates8.c: Remove.
+ * gcc.target/arm/neon/vcreateu16.c: Remove.
+ * gcc.target/arm/neon/vcreateu32.c: Remove.
+ * gcc.target/arm/neon/vcreateu64.c: Remove.
+ * gcc.target/arm/neon/vcreateu8.c: Remove.
+ * gcc.target/arm/neon/vcvtQ_nf32_s32.c: Remove.
+ * gcc.target/arm/neon/vcvtQ_nf32_u32.c: Remove.
+ * gcc.target/arm/neon/vcvtQ_ns32_f32.c: Remove.
+ * gcc.target/arm/neon/vcvtQ_nu32_f32.c: Remove.
+ * gcc.target/arm/neon/vcvtQf32_s32.c: Remove.
+ * gcc.target/arm/neon/vcvtQf32_u32.c: Remove.
+ * gcc.target/arm/neon/vcvtQs32_f32.c: Remove.
+ * gcc.target/arm/neon/vcvtQu32_f32.c: Remove.
+ * gcc.target/arm/neon/vcvt_nf32_s32.c: Remove.
+ * gcc.target/arm/neon/vcvt_nf32_u32.c: Remove.
+ * gcc.target/arm/neon/vcvt_ns32_f32.c: Remove.
+ * gcc.target/arm/neon/vcvt_nu32_f32.c: Remove.
+ * gcc.target/arm/neon/vcvtf16_f32.c: Remove.
+ * gcc.target/arm/neon/vcvtf32_f16.c: Remove.
+ * gcc.target/arm/neon/vcvtf32_s32.c: Remove.
+ * gcc.target/arm/neon/vcvtf32_u32.c: Remove.
+ * gcc.target/arm/neon/vcvts32_f32.c: Remove.
+ * gcc.target/arm/neon/vcvtu32_f32.c: Remove.
+ * gcc.target/arm/neon/vdupQ_lanef32.c: Remove.
+ * gcc.target/arm/neon/vdupQ_lanep16.c: Remove.
+ * gcc.target/arm/neon/vdupQ_lanep64.c: Remove.
+ * gcc.target/arm/neon/vdupQ_lanep8.c: Remove.
+ * gcc.target/arm/neon/vdupQ_lanes16.c: Remove.
+ * gcc.target/arm/neon/vdupQ_lanes32.c: Remove.
+ * gcc.target/arm/neon/vdupQ_lanes64.c: Remove.
+ * gcc.target/arm/neon/vdupQ_lanes8.c: Remove.
+ * gcc.target/arm/neon/vdupQ_laneu16.c: Remove.
+ * gcc.target/arm/neon/vdupQ_laneu32.c: Remove.
+ * gcc.target/arm/neon/vdupQ_laneu64.c: Remove.
+ * gcc.target/arm/neon/vdupQ_laneu8.c: Remove.
+ * gcc.target/arm/neon/vdupQ_nf32.c: Remove.
+ * gcc.target/arm/neon/vdupQ_np16.c: Remove.
+ * gcc.target/arm/neon/vdupQ_np64.c: Remove.
+ * gcc.target/arm/neon/vdupQ_np8.c: Remove.
+ * gcc.target/arm/neon/vdupQ_ns16.c: Remove.
+ * gcc.target/arm/neon/vdupQ_ns32.c: Remove.
+ * gcc.target/arm/neon/vdupQ_ns64.c: Remove.
+ * gcc.target/arm/neon/vdupQ_ns8.c: Remove.
+ * gcc.target/arm/neon/vdupQ_nu16.c: Remove.
+ * gcc.target/arm/neon/vdupQ_nu32.c: Remove.
+ * gcc.target/arm/neon/vdupQ_nu64.c: Remove.
+ * gcc.target/arm/neon/vdupQ_nu8.c: Remove.
+ * gcc.target/arm/neon/vdup_lanef32.c: Remove.
+ * gcc.target/arm/neon/vdup_lanep16.c: Remove.
+ * gcc.target/arm/neon/vdup_lanep64.c: Remove.
+ * gcc.target/arm/neon/vdup_lanep8.c: Remove.
+ * gcc.target/arm/neon/vdup_lanes16.c: Remove.
+ * gcc.target/arm/neon/vdup_lanes32.c: Remove.
+ * gcc.target/arm/neon/vdup_lanes64.c: Remove.
+ * gcc.target/arm/neon/vdup_lanes8.c: Remove.
+ * gcc.target/arm/neon/vdup_laneu16.c: Remove.
+ * gcc.target/arm/neon/vdup_laneu32.c: Remove.
+ * gcc.target/arm/neon/vdup_laneu64.c: Remove.
+ * gcc.target/arm/neon/vdup_laneu8.c: Remove.
+ * gcc.target/arm/neon/vdup_nf32.c: Remove.
+ * gcc.target/arm/neon/vdup_np16.c: Remove.
+ * gcc.target/arm/neon/vdup_np64.c: Remove.
+ * gcc.target/arm/neon/vdup_np8.c: Remove.
+ * gcc.target/arm/neon/vdup_ns16.c: Remove.
+ * gcc.target/arm/neon/vdup_ns32.c: Remove.
+ * gcc.target/arm/neon/vdup_ns64.c: Remove.
+ * gcc.target/arm/neon/vdup_ns8.c: Remove.
+ * gcc.target/arm/neon/vdup_nu16.c: Remove.
+ * gcc.target/arm/neon/vdup_nu32.c: Remove.
+ * gcc.target/arm/neon/vdup_nu64.c: Remove.
+ * gcc.target/arm/neon/vdup_nu8.c: Remove.
+ * gcc.target/arm/neon/veorQs16.c: Remove.
+ * gcc.target/arm/neon/veorQs32.c: Remove.
+ * gcc.target/arm/neon/veorQs64.c: Remove.
+ * gcc.target/arm/neon/veorQs8.c: Remove.
+ * gcc.target/arm/neon/veorQu16.c: Remove.
+ * gcc.target/arm/neon/veorQu32.c: Remove.
+ * gcc.target/arm/neon/veorQu64.c: Remove.
+ * gcc.target/arm/neon/veorQu8.c: Remove.
+ * gcc.target/arm/neon/veors16.c: Remove.
+ * gcc.target/arm/neon/veors32.c: Remove.
+ * gcc.target/arm/neon/veors64.c: Remove.
+ * gcc.target/arm/neon/veors8.c: Remove.
+ * gcc.target/arm/neon/veoru16.c: Remove.
+ * gcc.target/arm/neon/veoru32.c: Remove.
+ * gcc.target/arm/neon/veoru64.c: Remove.
+ * gcc.target/arm/neon/veoru8.c: Remove.
+ * gcc.target/arm/neon/vextQf32.c: Remove.
+ * gcc.target/arm/neon/vextQp16.c: Remove.
+ * gcc.target/arm/neon/vextQp64.c: Remove.
+ * gcc.target/arm/neon/vextQp8.c: Remove.
+ * gcc.target/arm/neon/vextQs16.c: Remove.
+ * gcc.target/arm/neon/vextQs32.c: Remove.
+ * gcc.target/arm/neon/vextQs64.c: Remove.
+ * gcc.target/arm/neon/vextQs8.c: Remove.
+ * gcc.target/arm/neon/vextQu16.c: Remove.
+ * gcc.target/arm/neon/vextQu32.c: Remove.
+ * gcc.target/arm/neon/vextQu64.c: Remove.
+ * gcc.target/arm/neon/vextQu8.c: Remove.
+ * gcc.target/arm/neon/vextf32.c: Remove.
+ * gcc.target/arm/neon/vextp16.c: Remove.
+ * gcc.target/arm/neon/vextp64.c: Remove.
+ * gcc.target/arm/neon/vextp8.c: Remove.
+ * gcc.target/arm/neon/vexts16.c: Remove.
+ * gcc.target/arm/neon/vexts32.c: Remove.
+ * gcc.target/arm/neon/vexts64.c: Remove.
+ * gcc.target/arm/neon/vexts8.c: Remove.
+ * gcc.target/arm/neon/vextu16.c: Remove.
+ * gcc.target/arm/neon/vextu32.c: Remove.
+ * gcc.target/arm/neon/vextu64.c: Remove.
+ * gcc.target/arm/neon/vextu8.c: Remove.
+ * gcc.target/arm/neon/vfmaQf32.c: Remove.
+ * gcc.target/arm/neon/vfmaf32.c: Remove.
+ * gcc.target/arm/neon/vfmsQf32.c: Remove.
+ * gcc.target/arm/neon/vfmsf32.c: Remove.
+ * gcc.target/arm/neon/vgetQ_lanef32.c: Remove.
+ * gcc.target/arm/neon/vgetQ_lanep16.c: Remove.
+ * gcc.target/arm/neon/vgetQ_lanep8.c: Remove.
+ * gcc.target/arm/neon/vgetQ_lanes16.c: Remove.
+ * gcc.target/arm/neon/vgetQ_lanes32.c: Remove.
+ * gcc.target/arm/neon/vgetQ_lanes64.c: Remove.
+ * gcc.target/arm/neon/vgetQ_lanes8.c: Remove.
+ * gcc.target/arm/neon/vgetQ_laneu16.c: Remove.
+ * gcc.target/arm/neon/vgetQ_laneu32.c: Remove.
+ * gcc.target/arm/neon/vgetQ_laneu64.c: Remove.
+ * gcc.target/arm/neon/vgetQ_laneu8.c: Remove.
+ * gcc.target/arm/neon/vget_highf32.c: Remove.
+ * gcc.target/arm/neon/vget_highp16.c: Remove.
+ * gcc.target/arm/neon/vget_highp64.c: Remove.
+ * gcc.target/arm/neon/vget_highp8.c: Remove.
+ * gcc.target/arm/neon/vget_highs16.c: Remove.
+ * gcc.target/arm/neon/vget_highs32.c: Remove.
+ * gcc.target/arm/neon/vget_highs64.c: Remove.
+ * gcc.target/arm/neon/vget_highs8.c: Remove.
+ * gcc.target/arm/neon/vget_highu16.c: Remove.
+ * gcc.target/arm/neon/vget_highu32.c: Remove.
+ * gcc.target/arm/neon/vget_highu64.c: Remove.
+ * gcc.target/arm/neon/vget_highu8.c: Remove.
+ * gcc.target/arm/neon/vget_lanef32.c: Remove.
+ * gcc.target/arm/neon/vget_lanep16.c: Remove.
+ * gcc.target/arm/neon/vget_lanep8.c: Remove.
+ * gcc.target/arm/neon/vget_lanes16.c: Remove.
+ * gcc.target/arm/neon/vget_lanes32.c: Remove.
+ * gcc.target/arm/neon/vget_lanes64.c: Remove.
+ * gcc.target/arm/neon/vget_lanes8.c: Remove.
+ * gcc.target/arm/neon/vget_laneu16.c: Remove.
+ * gcc.target/arm/neon/vget_laneu32.c: Remove.
+ * gcc.target/arm/neon/vget_laneu64.c: Remove.
+ * gcc.target/arm/neon/vget_laneu8.c: Remove.
+ * gcc.target/arm/neon/vget_lowf32.c: Remove.
+ * gcc.target/arm/neon/vget_lowp16.c: Remove.
+ * gcc.target/arm/neon/vget_lowp64.c: Remove.
+ * gcc.target/arm/neon/vget_lowp8.c: Remove.
+ * gcc.target/arm/neon/vget_lows16.c: Remove.
+ * gcc.target/arm/neon/vget_lows32.c: Remove.
+ * gcc.target/arm/neon/vget_lows64.c: Remove.
+ * gcc.target/arm/neon/vget_lows8.c: Remove.
+ * gcc.target/arm/neon/vget_lowu16.c: Remove.
+ * gcc.target/arm/neon/vget_lowu32.c: Remove.
+ * gcc.target/arm/neon/vget_lowu64.c: Remove.
+ * gcc.target/arm/neon/vget_lowu8.c: Remove.
+ * gcc.target/arm/neon/vhaddQs16.c: Remove.
+ * gcc.target/arm/neon/vhaddQs32.c: Remove.
+ * gcc.target/arm/neon/vhaddQs8.c: Remove.
+ * gcc.target/arm/neon/vhaddQu16.c: Remove.
+ * gcc.target/arm/neon/vhaddQu32.c: Remove.
+ * gcc.target/arm/neon/vhaddQu8.c: Remove.
+ * gcc.target/arm/neon/vhadds16.c: Remove.
+ * gcc.target/arm/neon/vhadds32.c: Remove.
+ * gcc.target/arm/neon/vhadds8.c: Remove.
+ * gcc.target/arm/neon/vhaddu16.c: Remove.
+ * gcc.target/arm/neon/vhaddu32.c: Remove.
+ * gcc.target/arm/neon/vhaddu8.c: Remove.
+ * gcc.target/arm/neon/vhsubQs16.c: Remove.
+ * gcc.target/arm/neon/vhsubQs32.c: Remove.
+ * gcc.target/arm/neon/vhsubQs8.c: Remove.
+ * gcc.target/arm/neon/vhsubQu16.c: Remove.
+ * gcc.target/arm/neon/vhsubQu32.c: Remove.
+ * gcc.target/arm/neon/vhsubQu8.c: Remove.
+ * gcc.target/arm/neon/vhsubs16.c: Remove.
+ * gcc.target/arm/neon/vhsubs32.c: Remove.
+ * gcc.target/arm/neon/vhsubs8.c: Remove.
+ * gcc.target/arm/neon/vhsubu16.c: Remove.
+ * gcc.target/arm/neon/vhsubu32.c: Remove.
+ * gcc.target/arm/neon/vhsubu8.c: Remove.
+ * gcc.target/arm/neon/vld1Q_dupf32.c: Remove.
+ * gcc.target/arm/neon/vld1Q_dupp16.c: Remove.
+ * gcc.target/arm/neon/vld1Q_dupp64.c: Remove.
+ * gcc.target/arm/neon/vld1Q_dupp8.c: Remove.
+ * gcc.target/arm/neon/vld1Q_dups16.c: Remove.
+ * gcc.target/arm/neon/vld1Q_dups32.c: Remove.
+ * gcc.target/arm/neon/vld1Q_dups64.c: Remove.
+ * gcc.target/arm/neon/vld1Q_dups8.c: Remove.
+ * gcc.target/arm/neon/vld1Q_dupu16.c: Remove.
+ * gcc.target/arm/neon/vld1Q_dupu32.c: Remove.
+ * gcc.target/arm/neon/vld1Q_dupu64.c: Remove.
+ * gcc.target/arm/neon/vld1Q_dupu8.c: Remove.
+ * gcc.target/arm/neon/vld1Q_lanef32.c: Remove.
+ * gcc.target/arm/neon/vld1Q_lanep16.c: Remove.
+ * gcc.target/arm/neon/vld1Q_lanep64.c: Remove.
+ * gcc.target/arm/neon/vld1Q_lanep8.c: Remove.
+ * gcc.target/arm/neon/vld1Q_lanes16.c: Remove.
+ * gcc.target/arm/neon/vld1Q_lanes32.c: Remove.
+ * gcc.target/arm/neon/vld1Q_lanes64.c: Remove.
+ * gcc.target/arm/neon/vld1Q_lanes8.c: Remove.
+ * gcc.target/arm/neon/vld1Q_laneu16.c: Remove.
+ * gcc.target/arm/neon/vld1Q_laneu32.c: Remove.
+ * gcc.target/arm/neon/vld1Q_laneu64.c: Remove.
+ * gcc.target/arm/neon/vld1Q_laneu8.c: Remove.
+ * gcc.target/arm/neon/vld1Qf32.c: Remove.
+ * gcc.target/arm/neon/vld1Qp16.c: Remove.
+ * gcc.target/arm/neon/vld1Qp64.c: Remove.
+ * gcc.target/arm/neon/vld1Qp8.c: Remove.
+ * gcc.target/arm/neon/vld1Qs16.c: Remove.
+ * gcc.target/arm/neon/vld1Qs32.c: Remove.
+ * gcc.target/arm/neon/vld1Qs64.c: Remove.
+ * gcc.target/arm/neon/vld1Qs8.c: Remove.
+ * gcc.target/arm/neon/vld1Qu16.c: Remove.
+ * gcc.target/arm/neon/vld1Qu32.c: Remove.
+ * gcc.target/arm/neon/vld1Qu64.c: Remove.
+ * gcc.target/arm/neon/vld1Qu8.c: Remove.
+ * gcc.target/arm/neon/vld1_dupf32.c: Remove.
+ * gcc.target/arm/neon/vld1_dupp16.c: Remove.
+ * gcc.target/arm/neon/vld1_dupp64.c: Remove.
+ * gcc.target/arm/neon/vld1_dupp8.c: Remove.
+ * gcc.target/arm/neon/vld1_dups16.c: Remove.
+ * gcc.target/arm/neon/vld1_dups32.c: Remove.
+ * gcc.target/arm/neon/vld1_dups64.c: Remove.
+ * gcc.target/arm/neon/vld1_dups8.c: Remove.
+ * gcc.target/arm/neon/vld1_dupu16.c: Remove.
+ * gcc.target/arm/neon/vld1_dupu32.c: Remove.
+ * gcc.target/arm/neon/vld1_dupu64.c: Remove.
+ * gcc.target/arm/neon/vld1_dupu8.c: Remove.
+ * gcc.target/arm/neon/vld1_lanef32.c: Remove.
+ * gcc.target/arm/neon/vld1_lanep16.c: Remove.
+ * gcc.target/arm/neon/vld1_lanep64.c: Remove.
+ * gcc.target/arm/neon/vld1_lanep8.c: Remove.
+ * gcc.target/arm/neon/vld1_lanes16.c: Remove.
+ * gcc.target/arm/neon/vld1_lanes32.c: Remove.
+ * gcc.target/arm/neon/vld1_lanes64.c: Remove.
+ * gcc.target/arm/neon/vld1_lanes8.c: Remove.
+ * gcc.target/arm/neon/vld1_laneu16.c: Remove.
+ * gcc.target/arm/neon/vld1_laneu32.c: Remove.
+ * gcc.target/arm/neon/vld1_laneu64.c: Remove.
+ * gcc.target/arm/neon/vld1_laneu8.c: Remove.
+ * gcc.target/arm/neon/vld1f32.c: Remove.
+ * gcc.target/arm/neon/vld1p16.c: Remove.
+ * gcc.target/arm/neon/vld1p64.c: Remove.
+ * gcc.target/arm/neon/vld1p8.c: Remove.
+ * gcc.target/arm/neon/vld1s16.c: Remove.
+ * gcc.target/arm/neon/vld1s32.c: Remove.
+ * gcc.target/arm/neon/vld1s64.c: Remove.
+ * gcc.target/arm/neon/vld1s8.c: Remove.
+ * gcc.target/arm/neon/vld1u16.c: Remove.
+ * gcc.target/arm/neon/vld1u32.c: Remove.
+ * gcc.target/arm/neon/vld1u64.c: Remove.
+ * gcc.target/arm/neon/vld1u8.c: Remove.
+ * gcc.target/arm/neon/vld2Q_lanef32.c: Remove.
+ * gcc.target/arm/neon/vld2Q_lanep16.c: Remove.
+ * gcc.target/arm/neon/vld2Q_lanes16.c: Remove.
+ * gcc.target/arm/neon/vld2Q_lanes32.c: Remove.
+ * gcc.target/arm/neon/vld2Q_laneu16.c: Remove.
+ * gcc.target/arm/neon/vld2Q_laneu32.c: Remove.
+ * gcc.target/arm/neon/vld2Qf32.c: Remove.
+ * gcc.target/arm/neon/vld2Qp16.c: Remove.
+ * gcc.target/arm/neon/vld2Qp8.c: Remove.
+ * gcc.target/arm/neon/vld2Qs16.c: Remove.
+ * gcc.target/arm/neon/vld2Qs32.c: Remove.
+ * gcc.target/arm/neon/vld2Qs8.c: Remove.
+ * gcc.target/arm/neon/vld2Qu16.c: Remove.
+ * gcc.target/arm/neon/vld2Qu32.c: Remove.
+ * gcc.target/arm/neon/vld2Qu8.c: Remove.
+ * gcc.target/arm/neon/vld2_dupf32.c: Remove.
+ * gcc.target/arm/neon/vld2_dupp16.c: Remove.
+ * gcc.target/arm/neon/vld2_dupp64.c: Remove.
+ * gcc.target/arm/neon/vld2_dupp8.c: Remove.
+ * gcc.target/arm/neon/vld2_dups16.c: Remove.
+ * gcc.target/arm/neon/vld2_dups32.c: Remove.
+ * gcc.target/arm/neon/vld2_dups64.c: Remove.
+ * gcc.target/arm/neon/vld2_dups8.c: Remove.
+ * gcc.target/arm/neon/vld2_dupu16.c: Remove.
+ * gcc.target/arm/neon/vld2_dupu32.c: Remove.
+ * gcc.target/arm/neon/vld2_dupu64.c: Remove.
+ * gcc.target/arm/neon/vld2_dupu8.c: Remove.
+ * gcc.target/arm/neon/vld2_lanef32.c: Remove.
+ * gcc.target/arm/neon/vld2_lanep16.c: Remove.
+ * gcc.target/arm/neon/vld2_lanep8.c: Remove.
+ * gcc.target/arm/neon/vld2_lanes16.c: Remove.
+ * gcc.target/arm/neon/vld2_lanes32.c: Remove.
+ * gcc.target/arm/neon/vld2_lanes8.c: Remove.
+ * gcc.target/arm/neon/vld2_laneu16.c: Remove.
+ * gcc.target/arm/neon/vld2_laneu32.c: Remove.
+ * gcc.target/arm/neon/vld2_laneu8.c: Remove.
+ * gcc.target/arm/neon/vld2f32.c: Remove.
+ * gcc.target/arm/neon/vld2p16.c: Remove.
+ * gcc.target/arm/neon/vld2p64.c: Remove.
+ * gcc.target/arm/neon/vld2p8.c: Remove.
+ * gcc.target/arm/neon/vld2s16.c: Remove.
+ * gcc.target/arm/neon/vld2s32.c: Remove.
+ * gcc.target/arm/neon/vld2s64.c: Remove.
+ * gcc.target/arm/neon/vld2s8.c: Remove.
+ * gcc.target/arm/neon/vld2u16.c: Remove.
+ * gcc.target/arm/neon/vld2u32.c: Remove.
+ * gcc.target/arm/neon/vld2u64.c: Remove.
+ * gcc.target/arm/neon/vld2u8.c: Remove.
+ * gcc.target/arm/neon/vld3Q_lanef32.c: Remove.
+ * gcc.target/arm/neon/vld3Q_lanep16.c: Remove.
+ * gcc.target/arm/neon/vld3Q_lanes16.c: Remove.
+ * gcc.target/arm/neon/vld3Q_lanes32.c: Remove.
+ * gcc.target/arm/neon/vld3Q_laneu16.c: Remove.
+ * gcc.target/arm/neon/vld3Q_laneu32.c: Remove.
+ * gcc.target/arm/neon/vld3Qf32.c: Remove.
+ * gcc.target/arm/neon/vld3Qp16.c: Remove.
+ * gcc.target/arm/neon/vld3Qp8.c: Remove.
+ * gcc.target/arm/neon/vld3Qs16.c: Remove.
+ * gcc.target/arm/neon/vld3Qs32.c: Remove.
+ * gcc.target/arm/neon/vld3Qs8.c: Remove.
+ * gcc.target/arm/neon/vld3Qu16.c: Remove.
+ * gcc.target/arm/neon/vld3Qu32.c: Remove.
+ * gcc.target/arm/neon/vld3Qu8.c: Remove.
+ * gcc.target/arm/neon/vld3_dupf32.c: Remove.
+ * gcc.target/arm/neon/vld3_dupp16.c: Remove.
+ * gcc.target/arm/neon/vld3_dupp64.c: Remove.
+ * gcc.target/arm/neon/vld3_dupp8.c: Remove.
+ * gcc.target/arm/neon/vld3_dups16.c: Remove.
+ * gcc.target/arm/neon/vld3_dups32.c: Remove.
+ * gcc.target/arm/neon/vld3_dups64.c: Remove.
+ * gcc.target/arm/neon/vld3_dups8.c: Remove.
+ * gcc.target/arm/neon/vld3_dupu16.c: Remove.
+ * gcc.target/arm/neon/vld3_dupu32.c: Remove.
+ * gcc.target/arm/neon/vld3_dupu64.c: Remove.
+ * gcc.target/arm/neon/vld3_dupu8.c: Remove.
+ * gcc.target/arm/neon/vld3_lanef32.c: Remove.
+ * gcc.target/arm/neon/vld3_lanep16.c: Remove.
+ * gcc.target/arm/neon/vld3_lanep8.c: Remove.
+ * gcc.target/arm/neon/vld3_lanes16.c: Remove.
+ * gcc.target/arm/neon/vld3_lanes32.c: Remove.
+ * gcc.target/arm/neon/vld3_lanes8.c: Remove.
+ * gcc.target/arm/neon/vld3_laneu16.c: Remove.
+ * gcc.target/arm/neon/vld3_laneu32.c: Remove.
+ * gcc.target/arm/neon/vld3_laneu8.c: Remove.
+ * gcc.target/arm/neon/vld3f32.c: Remove.
+ * gcc.target/arm/neon/vld3p16.c: Remove.
+ * gcc.target/arm/neon/vld3p64.c: Remove.
+ * gcc.target/arm/neon/vld3p8.c: Remove.
+ * gcc.target/arm/neon/vld3s16.c: Remove.
+ * gcc.target/arm/neon/vld3s32.c: Remove.
+ * gcc.target/arm/neon/vld3s64.c: Remove.
+ * gcc.target/arm/neon/vld3s8.c: Remove.
+ * gcc.target/arm/neon/vld3u16.c: Remove.
+ * gcc.target/arm/neon/vld3u32.c: Remove.
+ * gcc.target/arm/neon/vld3u64.c: Remove.
+ * gcc.target/arm/neon/vld3u8.c: Remove.
+ * gcc.target/arm/neon/vld4Q_lanef32.c: Remove.
+ * gcc.target/arm/neon/vld4Q_lanep16.c: Remove.
+ * gcc.target/arm/neon/vld4Q_lanes16.c: Remove.
+ * gcc.target/arm/neon/vld4Q_lanes32.c: Remove.
+ * gcc.target/arm/neon/vld4Q_laneu16.c: Remove.
+ * gcc.target/arm/neon/vld4Q_laneu32.c: Remove.
+ * gcc.target/arm/neon/vld4Qf32.c: Remove.
+ * gcc.target/arm/neon/vld4Qp16.c: Remove.
+ * gcc.target/arm/neon/vld4Qp8.c: Remove.
+ * gcc.target/arm/neon/vld4Qs16.c: Remove.
+ * gcc.target/arm/neon/vld4Qs32.c: Remove.
+ * gcc.target/arm/neon/vld4Qs8.c: Remove.
+ * gcc.target/arm/neon/vld4Qu16.c: Remove.
+ * gcc.target/arm/neon/vld4Qu32.c: Remove.
+ * gcc.target/arm/neon/vld4Qu8.c: Remove.
+ * gcc.target/arm/neon/vld4_dupf32.c: Remove.
+ * gcc.target/arm/neon/vld4_dupp16.c: Remove.
+ * gcc.target/arm/neon/vld4_dupp64.c: Remove.
+ * gcc.target/arm/neon/vld4_dupp8.c: Remove.
+ * gcc.target/arm/neon/vld4_dups16.c: Remove.
+ * gcc.target/arm/neon/vld4_dups32.c: Remove.
+ * gcc.target/arm/neon/vld4_dups64.c: Remove.
+ * gcc.target/arm/neon/vld4_dups8.c: Remove.
+ * gcc.target/arm/neon/vld4_dupu16.c: Remove.
+ * gcc.target/arm/neon/vld4_dupu32.c: Remove.
+ * gcc.target/arm/neon/vld4_dupu64.c: Remove.
+ * gcc.target/arm/neon/vld4_dupu8.c: Remove.
+ * gcc.target/arm/neon/vld4_lanef32.c: Remove.
+ * gcc.target/arm/neon/vld4_lanep16.c: Remove.
+ * gcc.target/arm/neon/vld4_lanep8.c: Remove.
+ * gcc.target/arm/neon/vld4_lanes16.c: Remove.
+ * gcc.target/arm/neon/vld4_lanes32.c: Remove.
+ * gcc.target/arm/neon/vld4_lanes8.c: Remove.
+ * gcc.target/arm/neon/vld4_laneu16.c: Remove.
+ * gcc.target/arm/neon/vld4_laneu32.c: Remove.
+ * gcc.target/arm/neon/vld4_laneu8.c: Remove.
+ * gcc.target/arm/neon/vld4f32.c: Remove.
+ * gcc.target/arm/neon/vld4p16.c: Remove.
+ * gcc.target/arm/neon/vld4p64.c: Remove.
+ * gcc.target/arm/neon/vld4p8.c: Remove.
+ * gcc.target/arm/neon/vld4s16.c: Remove.
+ * gcc.target/arm/neon/vld4s32.c: Remove.
+ * gcc.target/arm/neon/vld4s64.c: Remove.
+ * gcc.target/arm/neon/vld4s8.c: Remove.
+ * gcc.target/arm/neon/vld4u16.c: Remove.
+ * gcc.target/arm/neon/vld4u32.c: Remove.
+ * gcc.target/arm/neon/vld4u64.c: Remove.
+ * gcc.target/arm/neon/vld4u8.c: Remove.
+ * gcc.target/arm/neon/vmaxQf32.c: Remove.
+ * gcc.target/arm/neon/vmaxQs16.c: Remove.
+ * gcc.target/arm/neon/vmaxQs32.c: Remove.
+ * gcc.target/arm/neon/vmaxQs8.c: Remove.
+ * gcc.target/arm/neon/vmaxQu16.c: Remove.
+ * gcc.target/arm/neon/vmaxQu32.c: Remove.
+ * gcc.target/arm/neon/vmaxQu8.c: Remove.
+ * gcc.target/arm/neon/vmaxf32.c: Remove.
+ * gcc.target/arm/neon/vmaxs16.c: Remove.
+ * gcc.target/arm/neon/vmaxs32.c: Remove.
+ * gcc.target/arm/neon/vmaxs8.c: Remove.
+ * gcc.target/arm/neon/vmaxu16.c: Remove.
+ * gcc.target/arm/neon/vmaxu32.c: Remove.
+ * gcc.target/arm/neon/vmaxu8.c: Remove.
+ * gcc.target/arm/neon/vminQf32.c: Remove.
+ * gcc.target/arm/neon/vminQs16.c: Remove.
+ * gcc.target/arm/neon/vminQs32.c: Remove.
+ * gcc.target/arm/neon/vminQs8.c: Remove.
+ * gcc.target/arm/neon/vminQu16.c: Remove.
+ * gcc.target/arm/neon/vminQu32.c: Remove.
+ * gcc.target/arm/neon/vminQu8.c: Remove.
+ * gcc.target/arm/neon/vminf32.c: Remove.
+ * gcc.target/arm/neon/vmins16.c: Remove.
+ * gcc.target/arm/neon/vmins32.c: Remove.
+ * gcc.target/arm/neon/vmins8.c: Remove.
+ * gcc.target/arm/neon/vminu16.c: Remove.
+ * gcc.target/arm/neon/vminu32.c: Remove.
+ * gcc.target/arm/neon/vminu8.c: Remove.
+ * gcc.target/arm/neon/vmlaQ_lanef32.c: Remove.
+ * gcc.target/arm/neon/vmlaQ_lanes16.c: Remove.
+ * gcc.target/arm/neon/vmlaQ_lanes32.c: Remove.
+ * gcc.target/arm/neon/vmlaQ_laneu16.c: Remove.
+ * gcc.target/arm/neon/vmlaQ_laneu32.c: Remove.
+ * gcc.target/arm/neon/vmlaQ_nf32.c: Remove.
+ * gcc.target/arm/neon/vmlaQ_ns16.c: Remove.
+ * gcc.target/arm/neon/vmlaQ_ns32.c: Remove.
+ * gcc.target/arm/neon/vmlaQ_nu16.c: Remove.
+ * gcc.target/arm/neon/vmlaQ_nu32.c: Remove.
+ * gcc.target/arm/neon/vmlaQf32.c: Remove.
+ * gcc.target/arm/neon/vmlaQs16.c: Remove.
+ * gcc.target/arm/neon/vmlaQs32.c: Remove.
+ * gcc.target/arm/neon/vmlaQs8.c: Remove.
+ * gcc.target/arm/neon/vmlaQu16.c: Remove.
+ * gcc.target/arm/neon/vmlaQu32.c: Remove.
+ * gcc.target/arm/neon/vmlaQu8.c: Remove.
+ * gcc.target/arm/neon/vmla_lanef32.c: Remove.
+ * gcc.target/arm/neon/vmla_lanes16.c: Remove.
+ * gcc.target/arm/neon/vmla_lanes32.c: Remove.
+ * gcc.target/arm/neon/vmla_laneu16.c: Remove.
+ * gcc.target/arm/neon/vmla_laneu32.c: Remove.
+ * gcc.target/arm/neon/vmla_nf32.c: Remove.
+ * gcc.target/arm/neon/vmla_ns16.c: Remove.
+ * gcc.target/arm/neon/vmla_ns32.c: Remove.
+ * gcc.target/arm/neon/vmla_nu16.c: Remove.
+ * gcc.target/arm/neon/vmla_nu32.c: Remove.
+ * gcc.target/arm/neon/vmlaf32.c: Remove.
+ * gcc.target/arm/neon/vmlal_lanes16.c: Remove.
+ * gcc.target/arm/neon/vmlal_lanes32.c: Remove.
+ * gcc.target/arm/neon/vmlal_laneu16.c: Remove.
+ * gcc.target/arm/neon/vmlal_laneu32.c: Remove.
+ * gcc.target/arm/neon/vmlal_ns16.c: Remove.
+ * gcc.target/arm/neon/vmlal_ns32.c: Remove.
+ * gcc.target/arm/neon/vmlal_nu16.c: Remove.
+ * gcc.target/arm/neon/vmlal_nu32.c: Remove.
+ * gcc.target/arm/neon/vmlals16.c: Remove.
+ * gcc.target/arm/neon/vmlals32.c: Remove.
+ * gcc.target/arm/neon/vmlals8.c: Remove.
+ * gcc.target/arm/neon/vmlalu16.c: Remove.
+ * gcc.target/arm/neon/vmlalu32.c: Remove.
+ * gcc.target/arm/neon/vmlalu8.c: Remove.
+ * gcc.target/arm/neon/vmlas16.c: Remove.
+ * gcc.target/arm/neon/vmlas32.c: Remove.
+ * gcc.target/arm/neon/vmlas8.c: Remove.
+ * gcc.target/arm/neon/vmlau16.c: Remove.
+ * gcc.target/arm/neon/vmlau32.c: Remove.
+ * gcc.target/arm/neon/vmlau8.c: Remove.
+ * gcc.target/arm/neon/vmlsQ_lanef32.c: Remove.
+ * gcc.target/arm/neon/vmlsQ_lanes16.c: Remove.
+ * gcc.target/arm/neon/vmlsQ_lanes32.c: Remove.
+ * gcc.target/arm/neon/vmlsQ_laneu16.c: Remove.
+ * gcc.target/arm/neon/vmlsQ_laneu32.c: Remove.
+ * gcc.target/arm/neon/vmlsQ_nf32.c: Remove.
+ * gcc.target/arm/neon/vmlsQ_ns16.c: Remove.
+ * gcc.target/arm/neon/vmlsQ_ns32.c: Remove.
+ * gcc.target/arm/neon/vmlsQ_nu16.c: Remove.
+ * gcc.target/arm/neon/vmlsQ_nu32.c: Remove.
+ * gcc.target/arm/neon/vmlsQf32.c: Remove.
+ * gcc.target/arm/neon/vmlsQs16.c: Remove.
+ * gcc.target/arm/neon/vmlsQs32.c: Remove.
+ * gcc.target/arm/neon/vmlsQs8.c: Remove.
+ * gcc.target/arm/neon/vmlsQu16.c: Remove.
+ * gcc.target/arm/neon/vmlsQu32.c: Remove.
+ * gcc.target/arm/neon/vmlsQu8.c: Remove.
+ * gcc.target/arm/neon/vmls_lanef32.c: Remove.
+ * gcc.target/arm/neon/vmls_lanes16.c: Remove.
+ * gcc.target/arm/neon/vmls_lanes32.c: Remove.
+ * gcc.target/arm/neon/vmls_laneu16.c: Remove.
+ * gcc.target/arm/neon/vmls_laneu32.c: Remove.
+ * gcc.target/arm/neon/vmls_nf32.c: Remove.
+ * gcc.target/arm/neon/vmls_ns16.c: Remove.
+ * gcc.target/arm/neon/vmls_ns32.c: Remove.
+ * gcc.target/arm/neon/vmls_nu16.c: Remove.
+ * gcc.target/arm/neon/vmls_nu32.c: Remove.
+ * gcc.target/arm/neon/vmlsf32.c: Remove.
+ * gcc.target/arm/neon/vmlsl_lanes16.c: Remove.
+ * gcc.target/arm/neon/vmlsl_lanes32.c: Remove.
+ * gcc.target/arm/neon/vmlsl_laneu16.c: Remove.
+ * gcc.target/arm/neon/vmlsl_laneu32.c: Remove.
+ * gcc.target/arm/neon/vmlsl_ns16.c: Remove.
+ * gcc.target/arm/neon/vmlsl_ns32.c: Remove.
+ * gcc.target/arm/neon/vmlsl_nu16.c: Remove.
+ * gcc.target/arm/neon/vmlsl_nu32.c: Remove.
+ * gcc.target/arm/neon/vmlsls16.c: Remove.
+ * gcc.target/arm/neon/vmlsls32.c: Remove.
+ * gcc.target/arm/neon/vmlsls8.c: Remove.
+ * gcc.target/arm/neon/vmlslu16.c: Remove.
+ * gcc.target/arm/neon/vmlslu32.c: Remove.
+ * gcc.target/arm/neon/vmlslu8.c: Remove.
+ * gcc.target/arm/neon/vmlss16.c: Remove.
+ * gcc.target/arm/neon/vmlss32.c: Remove.
+ * gcc.target/arm/neon/vmlss8.c: Remove.
+ * gcc.target/arm/neon/vmlsu16.c: Remove.
+ * gcc.target/arm/neon/vmlsu32.c: Remove.
+ * gcc.target/arm/neon/vmlsu8.c: Remove.
+ * gcc.target/arm/neon/vmovQ_nf32.c: Remove.
+ * gcc.target/arm/neon/vmovQ_np16.c: Remove.
+ * gcc.target/arm/neon/vmovQ_np8.c: Remove.
+ * gcc.target/arm/neon/vmovQ_ns16.c: Remove.
+ * gcc.target/arm/neon/vmovQ_ns32.c: Remove.
+ * gcc.target/arm/neon/vmovQ_ns64.c: Remove.
+ * gcc.target/arm/neon/vmovQ_ns8.c: Remove.
+ * gcc.target/arm/neon/vmovQ_nu16.c: Remove.
+ * gcc.target/arm/neon/vmovQ_nu32.c: Remove.
+ * gcc.target/arm/neon/vmovQ_nu64.c: Remove.
+ * gcc.target/arm/neon/vmovQ_nu8.c: Remove.
+ * gcc.target/arm/neon/vmov_nf32.c: Remove.
+ * gcc.target/arm/neon/vmov_np16.c: Remove.
+ * gcc.target/arm/neon/vmov_np8.c: Remove.
+ * gcc.target/arm/neon/vmov_ns16.c: Remove.
+ * gcc.target/arm/neon/vmov_ns32.c: Remove.
+ * gcc.target/arm/neon/vmov_ns64.c: Remove.
+ * gcc.target/arm/neon/vmov_ns8.c: Remove.
+ * gcc.target/arm/neon/vmov_nu16.c: Remove.
+ * gcc.target/arm/neon/vmov_nu32.c: Remove.
+ * gcc.target/arm/neon/vmov_nu64.c: Remove.
+ * gcc.target/arm/neon/vmov_nu8.c: Remove.
+ * gcc.target/arm/neon/vmovls16.c: Remove.
+ * gcc.target/arm/neon/vmovls32.c: Remove.
+ * gcc.target/arm/neon/vmovls8.c: Remove.
+ * gcc.target/arm/neon/vmovlu16.c: Remove.
+ * gcc.target/arm/neon/vmovlu32.c: Remove.
+ * gcc.target/arm/neon/vmovlu8.c: Remove.
+ * gcc.target/arm/neon/vmovns16.c: Remove.
+ * gcc.target/arm/neon/vmovns32.c: Remove.
+ * gcc.target/arm/neon/vmovns64.c: Remove.
+ * gcc.target/arm/neon/vmovnu16.c: Remove.
+ * gcc.target/arm/neon/vmovnu32.c: Remove.
+ * gcc.target/arm/neon/vmovnu64.c: Remove.
+ * gcc.target/arm/neon/vmulQ_lanef32.c: Remove.
+ * gcc.target/arm/neon/vmulQ_lanes16.c: Remove.
+ * gcc.target/arm/neon/vmulQ_lanes32.c: Remove.
+ * gcc.target/arm/neon/vmulQ_laneu16.c: Remove.
+ * gcc.target/arm/neon/vmulQ_laneu32.c: Remove.
+ * gcc.target/arm/neon/vmulQ_nf32.c: Remove.
+ * gcc.target/arm/neon/vmulQ_ns16.c: Remove.
+ * gcc.target/arm/neon/vmulQ_ns32.c: Remove.
+ * gcc.target/arm/neon/vmulQ_nu16.c: Remove.
+ * gcc.target/arm/neon/vmulQ_nu32.c: Remove.
+ * gcc.target/arm/neon/vmulQf32.c: Remove.
+ * gcc.target/arm/neon/vmulQp8.c: Remove.
+ * gcc.target/arm/neon/vmulQs16.c: Remove.
+ * gcc.target/arm/neon/vmulQs32.c: Remove.
+ * gcc.target/arm/neon/vmulQs8.c: Remove.
+ * gcc.target/arm/neon/vmulQu16.c: Remove.
+ * gcc.target/arm/neon/vmulQu32.c: Remove.
+ * gcc.target/arm/neon/vmulQu8.c: Remove.
+ * gcc.target/arm/neon/vmul_lanef32.c: Remove.
+ * gcc.target/arm/neon/vmul_lanes16.c: Remove.
+ * gcc.target/arm/neon/vmul_lanes32.c: Remove.
+ * gcc.target/arm/neon/vmul_laneu16.c: Remove.
+ * gcc.target/arm/neon/vmul_laneu32.c: Remove.
+ * gcc.target/arm/neon/vmul_nf32.c: Remove.
+ * gcc.target/arm/neon/vmul_ns16.c: Remove.
+ * gcc.target/arm/neon/vmul_ns32.c: Remove.
+ * gcc.target/arm/neon/vmul_nu16.c: Remove.
+ * gcc.target/arm/neon/vmul_nu32.c: Remove.
+ * gcc.target/arm/neon/vmulf32.c: Remove.
+ * gcc.target/arm/neon/vmull_lanes16.c: Remove.
+ * gcc.target/arm/neon/vmull_lanes32.c: Remove.
+ * gcc.target/arm/neon/vmull_laneu16.c: Remove.
+ * gcc.target/arm/neon/vmull_laneu32.c: Remove.
+ * gcc.target/arm/neon/vmull_ns16.c: Remove.
+ * gcc.target/arm/neon/vmull_ns32.c: Remove.
+ * gcc.target/arm/neon/vmull_nu16.c: Remove.
+ * gcc.target/arm/neon/vmull_nu32.c: Remove.
+ * gcc.target/arm/neon/vmullp8.c: Remove.
+ * gcc.target/arm/neon/vmulls16.c: Remove.
+ * gcc.target/arm/neon/vmulls32.c: Remove.
+ * gcc.target/arm/neon/vmulls8.c: Remove.
+ * gcc.target/arm/neon/vmullu16.c: Remove.
+ * gcc.target/arm/neon/vmullu32.c: Remove.
+ * gcc.target/arm/neon/vmullu8.c: Remove.
+ * gcc.target/arm/neon/vmulp8.c: Remove.
+ * gcc.target/arm/neon/vmuls16.c: Remove.
+ * gcc.target/arm/neon/vmuls32.c: Remove.
+ * gcc.target/arm/neon/vmuls8.c: Remove.
+ * gcc.target/arm/neon/vmulu16.c: Remove.
+ * gcc.target/arm/neon/vmulu32.c: Remove.
+ * gcc.target/arm/neon/vmulu8.c: Remove.
+ * gcc.target/arm/neon/vmvnQp8.c: Remove.
+ * gcc.target/arm/neon/vmvnQs16.c: Remove.
+ * gcc.target/arm/neon/vmvnQs32.c: Remove.
+ * gcc.target/arm/neon/vmvnQs8.c: Remove.
+ * gcc.target/arm/neon/vmvnQu16.c: Remove.
+ * gcc.target/arm/neon/vmvnQu32.c: Remove.
+ * gcc.target/arm/neon/vmvnQu8.c: Remove.
+ * gcc.target/arm/neon/vmvnp8.c: Remove.
+ * gcc.target/arm/neon/vmvns16.c: Remove.
+ * gcc.target/arm/neon/vmvns32.c: Remove.
+ * gcc.target/arm/neon/vmvns8.c: Remove.
+ * gcc.target/arm/neon/vmvnu16.c: Remove.
+ * gcc.target/arm/neon/vmvnu32.c: Remove.
+ * gcc.target/arm/neon/vmvnu8.c: Remove.
+ * gcc.target/arm/neon/vnegQf32.c: Remove.
+ * gcc.target/arm/neon/vnegQs16.c: Remove.
+ * gcc.target/arm/neon/vnegQs32.c: Remove.
+ * gcc.target/arm/neon/vnegQs8.c: Remove.
+ * gcc.target/arm/neon/vnegf32.c: Remove.
+ * gcc.target/arm/neon/vnegs16.c: Remove.
+ * gcc.target/arm/neon/vnegs32.c: Remove.
+ * gcc.target/arm/neon/vnegs8.c: Remove.
+ * gcc.target/arm/neon/vornQs16.c: Remove.
+ * gcc.target/arm/neon/vornQs32.c: Remove.
+ * gcc.target/arm/neon/vornQs64.c: Remove.
+ * gcc.target/arm/neon/vornQs8.c: Remove.
+ * gcc.target/arm/neon/vornQu16.c: Remove.
+ * gcc.target/arm/neon/vornQu32.c: Remove.
+ * gcc.target/arm/neon/vornQu64.c: Remove.
+ * gcc.target/arm/neon/vornQu8.c: Remove.
+ * gcc.target/arm/neon/vorns16.c: Remove.
+ * gcc.target/arm/neon/vorns32.c: Remove.
+ * gcc.target/arm/neon/vorns64.c: Remove.
+ * gcc.target/arm/neon/vorns8.c: Remove.
+ * gcc.target/arm/neon/vornu16.c: Remove.
+ * gcc.target/arm/neon/vornu32.c: Remove.
+ * gcc.target/arm/neon/vornu64.c: Remove.
+ * gcc.target/arm/neon/vornu8.c: Remove.
+ * gcc.target/arm/neon/vorrQs16.c: Remove.
+ * gcc.target/arm/neon/vorrQs32.c: Remove.
+ * gcc.target/arm/neon/vorrQs64.c: Remove.
+ * gcc.target/arm/neon/vorrQs8.c: Remove.
+ * gcc.target/arm/neon/vorrQu16.c: Remove.
+ * gcc.target/arm/neon/vorrQu32.c: Remove.
+ * gcc.target/arm/neon/vorrQu64.c: Remove.
+ * gcc.target/arm/neon/vorrQu8.c: Remove.
+ * gcc.target/arm/neon/vorrs16.c: Remove.
+ * gcc.target/arm/neon/vorrs32.c: Remove.
+ * gcc.target/arm/neon/vorrs64.c: Remove.
+ * gcc.target/arm/neon/vorrs8.c: Remove.
+ * gcc.target/arm/neon/vorru16.c: Remove.
+ * gcc.target/arm/neon/vorru32.c: Remove.
+ * gcc.target/arm/neon/vorru64.c: Remove.
+ * gcc.target/arm/neon/vorru8.c: Remove.
+ * gcc.target/arm/neon/vpadalQs16.c: Remove.
+ * gcc.target/arm/neon/vpadalQs32.c: Remove.
+ * gcc.target/arm/neon/vpadalQs8.c: Remove.
+ * gcc.target/arm/neon/vpadalQu16.c: Remove.
+ * gcc.target/arm/neon/vpadalQu32.c: Remove.
+ * gcc.target/arm/neon/vpadalQu8.c: Remove.
+ * gcc.target/arm/neon/vpadals16.c: Remove.
+ * gcc.target/arm/neon/vpadals32.c: Remove.
+ * gcc.target/arm/neon/vpadals8.c: Remove.
+ * gcc.target/arm/neon/vpadalu16.c: Remove.
+ * gcc.target/arm/neon/vpadalu32.c: Remove.
+ * gcc.target/arm/neon/vpadalu8.c: Remove.
+ * gcc.target/arm/neon/vpaddf32.c: Remove.
+ * gcc.target/arm/neon/vpaddlQs16.c: Remove.
+ * gcc.target/arm/neon/vpaddlQs32.c: Remove.
+ * gcc.target/arm/neon/vpaddlQs8.c: Remove.
+ * gcc.target/arm/neon/vpaddlQu16.c: Remove.
+ * gcc.target/arm/neon/vpaddlQu32.c: Remove.
+ * gcc.target/arm/neon/vpaddlQu8.c: Remove.
+ * gcc.target/arm/neon/vpaddls16.c: Remove.
+ * gcc.target/arm/neon/vpaddls32.c: Remove.
+ * gcc.target/arm/neon/vpaddls8.c: Remove.
+ * gcc.target/arm/neon/vpaddlu16.c: Remove.
+ * gcc.target/arm/neon/vpaddlu32.c: Remove.
+ * gcc.target/arm/neon/vpaddlu8.c: Remove.
+ * gcc.target/arm/neon/vpadds16.c: Remove.
+ * gcc.target/arm/neon/vpadds32.c: Remove.
+ * gcc.target/arm/neon/vpadds8.c: Remove.
+ * gcc.target/arm/neon/vpaddu16.c: Remove.
+ * gcc.target/arm/neon/vpaddu32.c: Remove.
+ * gcc.target/arm/neon/vpaddu8.c: Remove.
+ * gcc.target/arm/neon/vpmaxf32.c: Remove.
+ * gcc.target/arm/neon/vpmaxs16.c: Remove.
+ * gcc.target/arm/neon/vpmaxs32.c: Remove.
+ * gcc.target/arm/neon/vpmaxs8.c: Remove.
+ * gcc.target/arm/neon/vpmaxu16.c: Remove.
+ * gcc.target/arm/neon/vpmaxu32.c: Remove.
+ * gcc.target/arm/neon/vpmaxu8.c: Remove.
+ * gcc.target/arm/neon/vpminf32.c: Remove.
+ * gcc.target/arm/neon/vpmins16.c: Remove.
+ * gcc.target/arm/neon/vpmins32.c: Remove.
+ * gcc.target/arm/neon/vpmins8.c: Remove.
+ * gcc.target/arm/neon/vpminu16.c: Remove.
+ * gcc.target/arm/neon/vpminu32.c: Remove.
+ * gcc.target/arm/neon/vpminu8.c: Remove.
+ * gcc.target/arm/neon/vqRdmulhQ_lanes16.c: Remove.
+ * gcc.target/arm/neon/vqRdmulhQ_lanes32.c: Remove.
+ * gcc.target/arm/neon/vqRdmulhQ_ns16.c: Remove.
+ * gcc.target/arm/neon/vqRdmulhQ_ns32.c: Remove.
+ * gcc.target/arm/neon/vqRdmulhQs16.c: Remove.
+ * gcc.target/arm/neon/vqRdmulhQs32.c: Remove.
+ * gcc.target/arm/neon/vqRdmulh_lanes16.c: Remove.
+ * gcc.target/arm/neon/vqRdmulh_lanes32.c: Remove.
+ * gcc.target/arm/neon/vqRdmulh_ns16.c: Remove.
+ * gcc.target/arm/neon/vqRdmulh_ns32.c: Remove.
+ * gcc.target/arm/neon/vqRdmulhs16.c: Remove.
+ * gcc.target/arm/neon/vqRdmulhs32.c: Remove.
+ * gcc.target/arm/neon/vqRshlQs16.c: Remove.
+ * gcc.target/arm/neon/vqRshlQs32.c: Remove.
+ * gcc.target/arm/neon/vqRshlQs64.c: Remove.
+ * gcc.target/arm/neon/vqRshlQs8.c: Remove.
+ * gcc.target/arm/neon/vqRshlQu16.c: Remove.
+ * gcc.target/arm/neon/vqRshlQu32.c: Remove.
+ * gcc.target/arm/neon/vqRshlQu64.c: Remove.
+ * gcc.target/arm/neon/vqRshlQu8.c: Remove.
+ * gcc.target/arm/neon/vqRshls16.c: Remove.
+ * gcc.target/arm/neon/vqRshls32.c: Remove.
+ * gcc.target/arm/neon/vqRshls64.c: Remove.
+ * gcc.target/arm/neon/vqRshls8.c: Remove.
+ * gcc.target/arm/neon/vqRshlu16.c: Remove.
+ * gcc.target/arm/neon/vqRshlu32.c: Remove.
+ * gcc.target/arm/neon/vqRshlu64.c: Remove.
+ * gcc.target/arm/neon/vqRshlu8.c: Remove.
+ * gcc.target/arm/neon/vqRshrn_ns16.c: Remove.
+ * gcc.target/arm/neon/vqRshrn_ns32.c: Remove.
+ * gcc.target/arm/neon/vqRshrn_ns64.c: Remove.
+ * gcc.target/arm/neon/vqRshrn_nu16.c: Remove.
+ * gcc.target/arm/neon/vqRshrn_nu32.c: Remove.
+ * gcc.target/arm/neon/vqRshrn_nu64.c: Remove.
+ * gcc.target/arm/neon/vqRshrun_ns16.c: Remove.
+ * gcc.target/arm/neon/vqRshrun_ns32.c: Remove.
+ * gcc.target/arm/neon/vqRshrun_ns64.c: Remove.
+ * gcc.target/arm/neon/vqabsQs16.c: Remove.
+ * gcc.target/arm/neon/vqabsQs32.c: Remove.
+ * gcc.target/arm/neon/vqabsQs8.c: Remove.
+ * gcc.target/arm/neon/vqabss16.c: Remove.
+ * gcc.target/arm/neon/vqabss32.c: Remove.
+ * gcc.target/arm/neon/vqabss8.c: Remove.
+ * gcc.target/arm/neon/vqaddQs16.c: Remove.
+ * gcc.target/arm/neon/vqaddQs32.c: Remove.
+ * gcc.target/arm/neon/vqaddQs64.c: Remove.
+ * gcc.target/arm/neon/vqaddQs8.c: Remove.
+ * gcc.target/arm/neon/vqaddQu16.c: Remove.
+ * gcc.target/arm/neon/vqaddQu32.c: Remove.
+ * gcc.target/arm/neon/vqaddQu64.c: Remove.
+ * gcc.target/arm/neon/vqaddQu8.c: Remove.
+ * gcc.target/arm/neon/vqadds16.c: Remove.
+ * gcc.target/arm/neon/vqadds32.c: Remove.
+ * gcc.target/arm/neon/vqadds64.c: Remove.
+ * gcc.target/arm/neon/vqadds8.c: Remove.
+ * gcc.target/arm/neon/vqaddu16.c: Remove.
+ * gcc.target/arm/neon/vqaddu32.c: Remove.
+ * gcc.target/arm/neon/vqaddu64.c: Remove.
+ * gcc.target/arm/neon/vqaddu8.c: Remove.
+ * gcc.target/arm/neon/vqdmlal_lanes16.c: Remove.
+ * gcc.target/arm/neon/vqdmlal_lanes32.c: Remove.
+ * gcc.target/arm/neon/vqdmlal_ns16.c: Remove.
+ * gcc.target/arm/neon/vqdmlal_ns32.c: Remove.
+ * gcc.target/arm/neon/vqdmlals16.c: Remove.
+ * gcc.target/arm/neon/vqdmlals32.c: Remove.
+ * gcc.target/arm/neon/vqdmlsl_lanes16.c: Remove.
+ * gcc.target/arm/neon/vqdmlsl_lanes32.c: Remove.
+ * gcc.target/arm/neon/vqdmlsl_ns16.c: Remove.
+ * gcc.target/arm/neon/vqdmlsl_ns32.c: Remove.
+ * gcc.target/arm/neon/vqdmlsls16.c: Remove.
+ * gcc.target/arm/neon/vqdmlsls32.c: Remove.
+ * gcc.target/arm/neon/vqdmulhQ_lanes16.c: Remove.
+ * gcc.target/arm/neon/vqdmulhQ_lanes32.c: Remove.
+ * gcc.target/arm/neon/vqdmulhQ_ns16.c: Remove.
+ * gcc.target/arm/neon/vqdmulhQ_ns32.c: Remove.
+ * gcc.target/arm/neon/vqdmulhQs16.c: Remove.
+ * gcc.target/arm/neon/vqdmulhQs32.c: Remove.
+ * gcc.target/arm/neon/vqdmulh_lanes16.c: Remove.
+ * gcc.target/arm/neon/vqdmulh_lanes32.c: Remove.
+ * gcc.target/arm/neon/vqdmulh_ns16.c: Remove.
+ * gcc.target/arm/neon/vqdmulh_ns32.c: Remove.
+ * gcc.target/arm/neon/vqdmulhs16.c: Remove.
+ * gcc.target/arm/neon/vqdmulhs32.c: Remove.
+ * gcc.target/arm/neon/vqdmull_lanes16.c: Remove.
+ * gcc.target/arm/neon/vqdmull_lanes32.c: Remove.
+ * gcc.target/arm/neon/vqdmull_ns16.c: Remove.
+ * gcc.target/arm/neon/vqdmull_ns32.c: Remove.
+ * gcc.target/arm/neon/vqdmulls16.c: Remove.
+ * gcc.target/arm/neon/vqdmulls32.c: Remove.
+ * gcc.target/arm/neon/vqmovns16.c: Remove.
+ * gcc.target/arm/neon/vqmovns32.c: Remove.
+ * gcc.target/arm/neon/vqmovns64.c: Remove.
+ * gcc.target/arm/neon/vqmovnu16.c: Remove.
+ * gcc.target/arm/neon/vqmovnu32.c: Remove.
+ * gcc.target/arm/neon/vqmovnu64.c: Remove.
+ * gcc.target/arm/neon/vqmovuns16.c: Remove.
+ * gcc.target/arm/neon/vqmovuns32.c: Remove.
+ * gcc.target/arm/neon/vqmovuns64.c: Remove.
+ * gcc.target/arm/neon/vqnegQs16.c: Remove.
+ * gcc.target/arm/neon/vqnegQs32.c: Remove.
+ * gcc.target/arm/neon/vqnegQs8.c: Remove.
+ * gcc.target/arm/neon/vqnegs16.c: Remove.
+ * gcc.target/arm/neon/vqnegs32.c: Remove.
+ * gcc.target/arm/neon/vqnegs8.c: Remove.
+ * gcc.target/arm/neon/vqshlQ_ns16.c: Remove.
+ * gcc.target/arm/neon/vqshlQ_ns32.c: Remove.
+ * gcc.target/arm/neon/vqshlQ_ns64.c: Remove.
+ * gcc.target/arm/neon/vqshlQ_ns8.c: Remove.
+ * gcc.target/arm/neon/vqshlQ_nu16.c: Remove.
+ * gcc.target/arm/neon/vqshlQ_nu32.c: Remove.
+ * gcc.target/arm/neon/vqshlQ_nu64.c: Remove.
+ * gcc.target/arm/neon/vqshlQ_nu8.c: Remove.
+ * gcc.target/arm/neon/vqshlQs16.c: Remove.
+ * gcc.target/arm/neon/vqshlQs32.c: Remove.
+ * gcc.target/arm/neon/vqshlQs64.c: Remove.
+ * gcc.target/arm/neon/vqshlQs8.c: Remove.
+ * gcc.target/arm/neon/vqshlQu16.c: Remove.
+ * gcc.target/arm/neon/vqshlQu32.c: Remove.
+ * gcc.target/arm/neon/vqshlQu64.c: Remove.
+ * gcc.target/arm/neon/vqshlQu8.c: Remove.
+ * gcc.target/arm/neon/vqshl_ns16.c: Remove.
+ * gcc.target/arm/neon/vqshl_ns32.c: Remove.
+ * gcc.target/arm/neon/vqshl_ns64.c: Remove.
+ * gcc.target/arm/neon/vqshl_ns8.c: Remove.
+ * gcc.target/arm/neon/vqshl_nu16.c: Remove.
+ * gcc.target/arm/neon/vqshl_nu32.c: Remove.
+ * gcc.target/arm/neon/vqshl_nu64.c: Remove.
+ * gcc.target/arm/neon/vqshl_nu8.c: Remove.
+ * gcc.target/arm/neon/vqshls16.c: Remove.
+ * gcc.target/arm/neon/vqshls32.c: Remove.
+ * gcc.target/arm/neon/vqshls64.c: Remove.
+ * gcc.target/arm/neon/vqshls8.c: Remove.
+ * gcc.target/arm/neon/vqshlu16.c: Remove.
+ * gcc.target/arm/neon/vqshlu32.c: Remove.
+ * gcc.target/arm/neon/vqshlu64.c: Remove.
+ * gcc.target/arm/neon/vqshlu8.c: Remove.
+ * gcc.target/arm/neon/vqshluQ_ns16.c: Remove.
+ * gcc.target/arm/neon/vqshluQ_ns32.c: Remove.
+ * gcc.target/arm/neon/vqshluQ_ns64.c: Remove.
+ * gcc.target/arm/neon/vqshluQ_ns8.c: Remove.
+ * gcc.target/arm/neon/vqshlu_ns16.c: Remove.
+ * gcc.target/arm/neon/vqshlu_ns32.c: Remove.
+ * gcc.target/arm/neon/vqshlu_ns64.c: Remove.
+ * gcc.target/arm/neon/vqshlu_ns8.c: Remove.
+ * gcc.target/arm/neon/vqshrn_ns16.c: Remove.
+ * gcc.target/arm/neon/vqshrn_ns32.c: Remove.
+ * gcc.target/arm/neon/vqshrn_ns64.c: Remove.
+ * gcc.target/arm/neon/vqshrn_nu16.c: Remove.
+ * gcc.target/arm/neon/vqshrn_nu32.c: Remove.
+ * gcc.target/arm/neon/vqshrn_nu64.c: Remove.
+ * gcc.target/arm/neon/vqshrun_ns16.c: Remove.
+ * gcc.target/arm/neon/vqshrun_ns32.c: Remove.
+ * gcc.target/arm/neon/vqshrun_ns64.c: Remove.
+ * gcc.target/arm/neon/vqsubQs16.c: Remove.
+ * gcc.target/arm/neon/vqsubQs32.c: Remove.
+ * gcc.target/arm/neon/vqsubQs64.c: Remove.
+ * gcc.target/arm/neon/vqsubQs8.c: Remove.
+ * gcc.target/arm/neon/vqsubQu16.c: Remove.
+ * gcc.target/arm/neon/vqsubQu32.c: Remove.
+ * gcc.target/arm/neon/vqsubQu64.c: Remove.
+ * gcc.target/arm/neon/vqsubQu8.c: Remove.
+ * gcc.target/arm/neon/vqsubs16.c: Remove.
+ * gcc.target/arm/neon/vqsubs32.c: Remove.
+ * gcc.target/arm/neon/vqsubs64.c: Remove.
+ * gcc.target/arm/neon/vqsubs8.c: Remove.
+ * gcc.target/arm/neon/vqsubu16.c: Remove.
+ * gcc.target/arm/neon/vqsubu32.c: Remove.
+ * gcc.target/arm/neon/vqsubu64.c: Remove.
+ * gcc.target/arm/neon/vqsubu8.c: Remove.
+ * gcc.target/arm/neon/vrecpeQf32.c: Remove.
+ * gcc.target/arm/neon/vrecpeQu32.c: Remove.
+ * gcc.target/arm/neon/vrecpef32.c: Remove.
+ * gcc.target/arm/neon/vrecpeu32.c: Remove.
+ * gcc.target/arm/neon/vrecpsQf32.c: Remove.
+ * gcc.target/arm/neon/vrecpsf32.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQf32_p128.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQf32_p16.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQf32_p64.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQf32_p8.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQf32_s16.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQf32_s32.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQf32_s64.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQf32_s8.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQf32_u16.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQf32_u32.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQf32_u64.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQf32_u8.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQp128_f32.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQp128_p16.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQp128_p64.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQp128_p8.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQp128_s16.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQp128_s32.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQp128_s64.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQp128_s8.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQp128_u16.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQp128_u32.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQp128_u64.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQp128_u8.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQp16_f32.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQp16_p128.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQp16_p64.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQp16_p8.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQp16_s16.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQp16_s32.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQp16_s64.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQp16_s8.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQp16_u16.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQp16_u32.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQp16_u64.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQp16_u8.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQp64_f32.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQp64_p128.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQp64_p16.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQp64_p8.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQp64_s16.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQp64_s32.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQp64_s64.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQp64_s8.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQp64_u16.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQp64_u32.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQp64_u64.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQp64_u8.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQp8_f32.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQp8_p128.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQp8_p16.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQp8_p64.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQp8_s16.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQp8_s32.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQp8_s64.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQp8_s8.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQp8_u16.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQp8_u32.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQp8_u64.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQp8_u8.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQs16_f32.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQs16_p128.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQs16_p16.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQs16_p64.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQs16_p8.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQs16_s32.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQs16_s64.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQs16_s8.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQs16_u16.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQs16_u32.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQs16_u64.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQs16_u8.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQs32_f32.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQs32_p128.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQs32_p16.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQs32_p64.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQs32_p8.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQs32_s16.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQs32_s64.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQs32_s8.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQs32_u16.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQs32_u32.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQs32_u64.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQs32_u8.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQs64_f32.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQs64_p128.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQs64_p16.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQs64_p64.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQs64_p8.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQs64_s16.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQs64_s32.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQs64_s8.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQs64_u16.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQs64_u32.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQs64_u64.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQs64_u8.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQs8_f32.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQs8_p128.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQs8_p16.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQs8_p64.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQs8_p8.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQs8_s16.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQs8_s32.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQs8_s64.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQs8_u16.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQs8_u32.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQs8_u64.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQs8_u8.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQu16_f32.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQu16_p128.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQu16_p16.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQu16_p64.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQu16_p8.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQu16_s16.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQu16_s32.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQu16_s64.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQu16_s8.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQu16_u32.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQu16_u64.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQu16_u8.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQu32_f32.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQu32_p128.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQu32_p16.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQu32_p64.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQu32_p8.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQu32_s16.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQu32_s32.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQu32_s64.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQu32_s8.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQu32_u16.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQu32_u64.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQu32_u8.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQu64_f32.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQu64_p128.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQu64_p16.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQu64_p64.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQu64_p8.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQu64_s16.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQu64_s32.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQu64_s64.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQu64_s8.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQu64_u16.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQu64_u32.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQu64_u8.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQu8_f32.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQu8_p128.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQu8_p16.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQu8_p64.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQu8_p8.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQu8_s16.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQu8_s32.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQu8_s64.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQu8_s8.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQu8_u16.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQu8_u32.c: Remove.
+ * gcc.target/arm/neon/vreinterpretQu8_u64.c: Remove.
+ * gcc.target/arm/neon/vreinterpretf32_p16.c: Remove.
+ * gcc.target/arm/neon/vreinterpretf32_p64.c: Remove.
+ * gcc.target/arm/neon/vreinterpretf32_p8.c: Remove.
+ * gcc.target/arm/neon/vreinterpretf32_s16.c: Remove.
+ * gcc.target/arm/neon/vreinterpretf32_s32.c: Remove.
+ * gcc.target/arm/neon/vreinterpretf32_s64.c: Remove.
+ * gcc.target/arm/neon/vreinterpretf32_s8.c: Remove.
+ * gcc.target/arm/neon/vreinterpretf32_u16.c: Remove.
+ * gcc.target/arm/neon/vreinterpretf32_u32.c: Remove.
+ * gcc.target/arm/neon/vreinterpretf32_u64.c: Remove.
+ * gcc.target/arm/neon/vreinterpretf32_u8.c: Remove.
+ * gcc.target/arm/neon/vreinterpretp16_f32.c: Remove.
+ * gcc.target/arm/neon/vreinterpretp16_p64.c: Remove.
+ * gcc.target/arm/neon/vreinterpretp16_p8.c: Remove.
+ * gcc.target/arm/neon/vreinterpretp16_s16.c: Remove.
+ * gcc.target/arm/neon/vreinterpretp16_s32.c: Remove.
+ * gcc.target/arm/neon/vreinterpretp16_s64.c: Remove.
+ * gcc.target/arm/neon/vreinterpretp16_s8.c: Remove.
+ * gcc.target/arm/neon/vreinterpretp16_u16.c: Remove.
+ * gcc.target/arm/neon/vreinterpretp16_u32.c: Remove.
+ * gcc.target/arm/neon/vreinterpretp16_u64.c: Remove.
+ * gcc.target/arm/neon/vreinterpretp16_u8.c: Remove.
+ * gcc.target/arm/neon/vreinterpretp64_f32.c: Remove.
+ * gcc.target/arm/neon/vreinterpretp64_p16.c: Remove.
+ * gcc.target/arm/neon/vreinterpretp64_p8.c: Remove.
+ * gcc.target/arm/neon/vreinterpretp64_s16.c: Remove.
+ * gcc.target/arm/neon/vreinterpretp64_s32.c: Remove.
+ * gcc.target/arm/neon/vreinterpretp64_s64.c: Remove.
+ * gcc.target/arm/neon/vreinterpretp64_s8.c: Remove.
+ * gcc.target/arm/neon/vreinterpretp64_u16.c: Remove.
+ * gcc.target/arm/neon/vreinterpretp64_u32.c: Remove.
+ * gcc.target/arm/neon/vreinterpretp64_u64.c: Remove.
+ * gcc.target/arm/neon/vreinterpretp64_u8.c: Remove.
+ * gcc.target/arm/neon/vreinterpretp8_f32.c: Remove.
+ * gcc.target/arm/neon/vreinterpretp8_p16.c: Remove.
+ * gcc.target/arm/neon/vreinterpretp8_p64.c: Remove.
+ * gcc.target/arm/neon/vreinterpretp8_s16.c: Remove.
+ * gcc.target/arm/neon/vreinterpretp8_s32.c: Remove.
+ * gcc.target/arm/neon/vreinterpretp8_s64.c: Remove.
+ * gcc.target/arm/neon/vreinterpretp8_s8.c: Remove.
+ * gcc.target/arm/neon/vreinterpretp8_u16.c: Remove.
+ * gcc.target/arm/neon/vreinterpretp8_u32.c: Remove.
+ * gcc.target/arm/neon/vreinterpretp8_u64.c: Remove.
+ * gcc.target/arm/neon/vreinterpretp8_u8.c: Remove.
+ * gcc.target/arm/neon/vreinterprets16_f32.c: Remove.
+ * gcc.target/arm/neon/vreinterprets16_p16.c: Remove.
+ * gcc.target/arm/neon/vreinterprets16_p64.c: Remove.
+ * gcc.target/arm/neon/vreinterprets16_p8.c: Remove.
+ * gcc.target/arm/neon/vreinterprets16_s32.c: Remove.
+ * gcc.target/arm/neon/vreinterprets16_s64.c: Remove.
+ * gcc.target/arm/neon/vreinterprets16_s8.c: Remove.
+ * gcc.target/arm/neon/vreinterprets16_u16.c: Remove.
+ * gcc.target/arm/neon/vreinterprets16_u32.c: Remove.
+ * gcc.target/arm/neon/vreinterprets16_u64.c: Remove.
+ * gcc.target/arm/neon/vreinterprets16_u8.c: Remove.
+ * gcc.target/arm/neon/vreinterprets32_f32.c: Remove.
+ * gcc.target/arm/neon/vreinterprets32_p16.c: Remove.
+ * gcc.target/arm/neon/vreinterprets32_p64.c: Remove.
+ * gcc.target/arm/neon/vreinterprets32_p8.c: Remove.
+ * gcc.target/arm/neon/vreinterprets32_s16.c: Remove.
+ * gcc.target/arm/neon/vreinterprets32_s64.c: Remove.
+ * gcc.target/arm/neon/vreinterprets32_s8.c: Remove.
+ * gcc.target/arm/neon/vreinterprets32_u16.c: Remove.
+ * gcc.target/arm/neon/vreinterprets32_u32.c: Remove.
+ * gcc.target/arm/neon/vreinterprets32_u64.c: Remove.
+ * gcc.target/arm/neon/vreinterprets32_u8.c: Remove.
+ * gcc.target/arm/neon/vreinterprets64_f32.c: Remove.
+ * gcc.target/arm/neon/vreinterprets64_p16.c: Remove.
+ * gcc.target/arm/neon/vreinterprets64_p64.c: Remove.
+ * gcc.target/arm/neon/vreinterprets64_p8.c: Remove.
+ * gcc.target/arm/neon/vreinterprets64_s16.c: Remove.
+ * gcc.target/arm/neon/vreinterprets64_s32.c: Remove.
+ * gcc.target/arm/neon/vreinterprets64_s8.c: Remove.
+ * gcc.target/arm/neon/vreinterprets64_u16.c: Remove.
+ * gcc.target/arm/neon/vreinterprets64_u32.c: Remove.
+ * gcc.target/arm/neon/vreinterprets64_u64.c: Remove.
+ * gcc.target/arm/neon/vreinterprets64_u8.c: Remove.
+ * gcc.target/arm/neon/vreinterprets8_f32.c: Remove.
+ * gcc.target/arm/neon/vreinterprets8_p16.c: Remove.
+ * gcc.target/arm/neon/vreinterprets8_p64.c: Remove.
+ * gcc.target/arm/neon/vreinterprets8_p8.c: Remove.
+ * gcc.target/arm/neon/vreinterprets8_s16.c: Remove.
+ * gcc.target/arm/neon/vreinterprets8_s32.c: Remove.
+ * gcc.target/arm/neon/vreinterprets8_s64.c: Remove.
+ * gcc.target/arm/neon/vreinterprets8_u16.c: Remove.
+ * gcc.target/arm/neon/vreinterprets8_u32.c: Remove.
+ * gcc.target/arm/neon/vreinterprets8_u64.c: Remove.
+ * gcc.target/arm/neon/vreinterprets8_u8.c: Remove.
+ * gcc.target/arm/neon/vreinterpretu16_f32.c: Remove.
+ * gcc.target/arm/neon/vreinterpretu16_p16.c: Remove.
+ * gcc.target/arm/neon/vreinterpretu16_p64.c: Remove.
+ * gcc.target/arm/neon/vreinterpretu16_p8.c: Remove.
+ * gcc.target/arm/neon/vreinterpretu16_s16.c: Remove.
+ * gcc.target/arm/neon/vreinterpretu16_s32.c: Remove.
+ * gcc.target/arm/neon/vreinterpretu16_s64.c: Remove.
+ * gcc.target/arm/neon/vreinterpretu16_s8.c: Remove.
+ * gcc.target/arm/neon/vreinterpretu16_u32.c: Remove.
+ * gcc.target/arm/neon/vreinterpretu16_u64.c: Remove.
+ * gcc.target/arm/neon/vreinterpretu16_u8.c: Remove.
+ * gcc.target/arm/neon/vreinterpretu32_f32.c: Remove.
+ * gcc.target/arm/neon/vreinterpretu32_p16.c: Remove.
+ * gcc.target/arm/neon/vreinterpretu32_p64.c: Remove.
+ * gcc.target/arm/neon/vreinterpretu32_p8.c: Remove.
+ * gcc.target/arm/neon/vreinterpretu32_s16.c: Remove.
+ * gcc.target/arm/neon/vreinterpretu32_s32.c: Remove.
+ * gcc.target/arm/neon/vreinterpretu32_s64.c: Remove.
+ * gcc.target/arm/neon/vreinterpretu32_s8.c: Remove.
+ * gcc.target/arm/neon/vreinterpretu32_u16.c: Remove.
+ * gcc.target/arm/neon/vreinterpretu32_u64.c: Remove.
+ * gcc.target/arm/neon/vreinterpretu32_u8.c: Remove.
+ * gcc.target/arm/neon/vreinterpretu64_f32.c: Remove.
+ * gcc.target/arm/neon/vreinterpretu64_p16.c: Remove.
+ * gcc.target/arm/neon/vreinterpretu64_p64.c: Remove.
+ * gcc.target/arm/neon/vreinterpretu64_p8.c: Remove.
+ * gcc.target/arm/neon/vreinterpretu64_s16.c: Remove.
+ * gcc.target/arm/neon/vreinterpretu64_s32.c: Remove.
+ * gcc.target/arm/neon/vreinterpretu64_s64.c: Remove.
+ * gcc.target/arm/neon/vreinterpretu64_s8.c: Remove.
+ * gcc.target/arm/neon/vreinterpretu64_u16.c: Remove.
+ * gcc.target/arm/neon/vreinterpretu64_u32.c: Remove.
+ * gcc.target/arm/neon/vreinterpretu64_u8.c: Remove.
+ * gcc.target/arm/neon/vreinterpretu8_f32.c: Remove.
+ * gcc.target/arm/neon/vreinterpretu8_p16.c: Remove.
+ * gcc.target/arm/neon/vreinterpretu8_p64.c: Remove.
+ * gcc.target/arm/neon/vreinterpretu8_p8.c: Remove.
+ * gcc.target/arm/neon/vreinterpretu8_s16.c: Remove.
+ * gcc.target/arm/neon/vreinterpretu8_s32.c: Remove.
+ * gcc.target/arm/neon/vreinterpretu8_s64.c: Remove.
+ * gcc.target/arm/neon/vreinterpretu8_s8.c: Remove.
+ * gcc.target/arm/neon/vreinterpretu8_u16.c: Remove.
+ * gcc.target/arm/neon/vreinterpretu8_u32.c: Remove.
+ * gcc.target/arm/neon/vreinterpretu8_u64.c: Remove.
+ * gcc.target/arm/neon/vrev16Qp8.c: Remove.
+ * gcc.target/arm/neon/vrev16Qs8.c: Remove.
+ * gcc.target/arm/neon/vrev16Qu8.c: Remove.
+ * gcc.target/arm/neon/vrev16p8.c: Remove.
+ * gcc.target/arm/neon/vrev16s8.c: Remove.
+ * gcc.target/arm/neon/vrev16u8.c: Remove.
+ * gcc.target/arm/neon/vrev32Qp16.c: Remove.
+ * gcc.target/arm/neon/vrev32Qp8.c: Remove.
+ * gcc.target/arm/neon/vrev32Qs16.c: Remove.
+ * gcc.target/arm/neon/vrev32Qs8.c: Remove.
+ * gcc.target/arm/neon/vrev32Qu16.c: Remove.
+ * gcc.target/arm/neon/vrev32Qu8.c: Remove.
+ * gcc.target/arm/neon/vrev32p16.c: Remove.
+ * gcc.target/arm/neon/vrev32p8.c: Remove.
+ * gcc.target/arm/neon/vrev32s16.c: Remove.
+ * gcc.target/arm/neon/vrev32s8.c: Remove.
+ * gcc.target/arm/neon/vrev32u16.c: Remove.
+ * gcc.target/arm/neon/vrev32u8.c: Remove.
+ * gcc.target/arm/neon/vrev64Qf32.c: Remove.
+ * gcc.target/arm/neon/vrev64Qp16.c: Remove.
+ * gcc.target/arm/neon/vrev64Qp8.c: Remove.
+ * gcc.target/arm/neon/vrev64Qs16.c: Remove.
+ * gcc.target/arm/neon/vrev64Qs32.c: Remove.
+ * gcc.target/arm/neon/vrev64Qs8.c: Remove.
+ * gcc.target/arm/neon/vrev64Qu16.c: Remove.
+ * gcc.target/arm/neon/vrev64Qu32.c: Remove.
+ * gcc.target/arm/neon/vrev64Qu8.c: Remove.
+ * gcc.target/arm/neon/vrev64f32.c: Remove.
+ * gcc.target/arm/neon/vrev64p16.c: Remove.
+ * gcc.target/arm/neon/vrev64p8.c: Remove.
+ * gcc.target/arm/neon/vrev64s16.c: Remove.
+ * gcc.target/arm/neon/vrev64s32.c: Remove.
+ * gcc.target/arm/neon/vrev64s8.c: Remove.
+ * gcc.target/arm/neon/vrev64u16.c: Remove.
+ * gcc.target/arm/neon/vrev64u32.c: Remove.
+ * gcc.target/arm/neon/vrev64u8.c: Remove.
+ * gcc.target/arm/neon/vrndaf32.c: Remove.
+ * gcc.target/arm/neon/vrndaqf32.c: Remove.
+ * gcc.target/arm/neon/vrndf32.c: Remove.
+ * gcc.target/arm/neon/vrndmf32.c: Remove.
+ * gcc.target/arm/neon/vrndmqf32.c: Remove.
+ * gcc.target/arm/neon/vrndnf32.c: Remove.
+ * gcc.target/arm/neon/vrndnqf32.c: Remove.
+ * gcc.target/arm/neon/vrndpf32.c: Remove.
+ * gcc.target/arm/neon/vrndpqf32.c: Remove.
+ * gcc.target/arm/neon/vrndqf32.c: Remove.
+ * gcc.target/arm/neon/vrsqrteQf32.c: Remove.
+ * gcc.target/arm/neon/vrsqrteQu32.c: Remove.
+ * gcc.target/arm/neon/vrsqrtef32.c: Remove.
+ * gcc.target/arm/neon/vrsqrteu32.c: Remove.
+ * gcc.target/arm/neon/vrsqrtsQf32.c: Remove.
+ * gcc.target/arm/neon/vrsqrtsf32.c: Remove.
+ * gcc.target/arm/neon/vsetQ_lanef32.c: Remove.
+ * gcc.target/arm/neon/vsetQ_lanep16.c: Remove.
+ * gcc.target/arm/neon/vsetQ_lanep8.c: Remove.
+ * gcc.target/arm/neon/vsetQ_lanes16.c: Remove.
+ * gcc.target/arm/neon/vsetQ_lanes32.c: Remove.
+ * gcc.target/arm/neon/vsetQ_lanes64.c: Remove.
+ * gcc.target/arm/neon/vsetQ_lanes8.c: Remove.
+ * gcc.target/arm/neon/vsetQ_laneu16.c: Remove.
+ * gcc.target/arm/neon/vsetQ_laneu32.c: Remove.
+ * gcc.target/arm/neon/vsetQ_laneu64.c: Remove.
+ * gcc.target/arm/neon/vsetQ_laneu8.c: Remove.
+ * gcc.target/arm/neon/vset_lanef32.c: Remove.
+ * gcc.target/arm/neon/vset_lanep16.c: Remove.
+ * gcc.target/arm/neon/vset_lanep8.c: Remove.
+ * gcc.target/arm/neon/vset_lanes16.c: Remove.
+ * gcc.target/arm/neon/vset_lanes32.c: Remove.
+ * gcc.target/arm/neon/vset_lanes64.c: Remove.
+ * gcc.target/arm/neon/vset_lanes8.c: Remove.
+ * gcc.target/arm/neon/vset_laneu16.c: Remove.
+ * gcc.target/arm/neon/vset_laneu32.c: Remove.
+ * gcc.target/arm/neon/vset_laneu64.c: Remove.
+ * gcc.target/arm/neon/vset_laneu8.c: Remove.
+ * gcc.target/arm/neon/vshlQ_ns16.c: Remove.
+ * gcc.target/arm/neon/vshlQ_ns32.c: Remove.
+ * gcc.target/arm/neon/vshlQ_ns64.c: Remove.
+ * gcc.target/arm/neon/vshlQ_ns8.c: Remove.
+ * gcc.target/arm/neon/vshlQ_nu16.c: Remove.
+ * gcc.target/arm/neon/vshlQ_nu32.c: Remove.
+ * gcc.target/arm/neon/vshlQ_nu64.c: Remove.
+ * gcc.target/arm/neon/vshlQ_nu8.c: Remove.
+ * gcc.target/arm/neon/vshlQs16.c: Remove.
+ * gcc.target/arm/neon/vshlQs32.c: Remove.
+ * gcc.target/arm/neon/vshlQs64.c: Remove.
+ * gcc.target/arm/neon/vshlQs8.c: Remove.
+ * gcc.target/arm/neon/vshlQu16.c: Remove.
+ * gcc.target/arm/neon/vshlQu32.c: Remove.
+ * gcc.target/arm/neon/vshlQu64.c: Remove.
+ * gcc.target/arm/neon/vshlQu8.c: Remove.
+ * gcc.target/arm/neon/vshl_ns16.c: Remove.
+ * gcc.target/arm/neon/vshl_ns32.c: Remove.
+ * gcc.target/arm/neon/vshl_ns64.c: Remove.
+ * gcc.target/arm/neon/vshl_ns8.c: Remove.
+ * gcc.target/arm/neon/vshl_nu16.c: Remove.
+ * gcc.target/arm/neon/vshl_nu32.c: Remove.
+ * gcc.target/arm/neon/vshl_nu64.c: Remove.
+ * gcc.target/arm/neon/vshl_nu8.c: Remove.
+ * gcc.target/arm/neon/vshll_ns16.c: Remove.
+ * gcc.target/arm/neon/vshll_ns32.c: Remove.
+ * gcc.target/arm/neon/vshll_ns8.c: Remove.
+ * gcc.target/arm/neon/vshll_nu16.c: Remove.
+ * gcc.target/arm/neon/vshll_nu32.c: Remove.
+ * gcc.target/arm/neon/vshll_nu8.c: Remove.
+ * gcc.target/arm/neon/vshls16.c: Remove.
+ * gcc.target/arm/neon/vshls32.c: Remove.
+ * gcc.target/arm/neon/vshls64.c: Remove.
+ * gcc.target/arm/neon/vshls8.c: Remove.
+ * gcc.target/arm/neon/vshlu16.c: Remove.
+ * gcc.target/arm/neon/vshlu32.c: Remove.
+ * gcc.target/arm/neon/vshlu64.c: Remove.
+ * gcc.target/arm/neon/vshlu8.c: Remove.
+ * gcc.target/arm/neon/vshrQ_ns16.c: Remove.
+ * gcc.target/arm/neon/vshrQ_ns32.c: Remove.
+ * gcc.target/arm/neon/vshrQ_ns64.c: Remove.
+ * gcc.target/arm/neon/vshrQ_ns8.c: Remove.
+ * gcc.target/arm/neon/vshrQ_nu16.c: Remove.
+ * gcc.target/arm/neon/vshrQ_nu32.c: Remove.
+ * gcc.target/arm/neon/vshrQ_nu64.c: Remove.
+ * gcc.target/arm/neon/vshrQ_nu8.c: Remove.
+ * gcc.target/arm/neon/vshr_ns16.c: Remove.
+ * gcc.target/arm/neon/vshr_ns32.c: Remove.
+ * gcc.target/arm/neon/vshr_ns64.c: Remove.
+ * gcc.target/arm/neon/vshr_ns8.c: Remove.
+ * gcc.target/arm/neon/vshr_nu16.c: Remove.
+ * gcc.target/arm/neon/vshr_nu32.c: Remove.
+ * gcc.target/arm/neon/vshr_nu64.c: Remove.
+ * gcc.target/arm/neon/vshr_nu8.c: Remove.
+ * gcc.target/arm/neon/vshrn_ns16.c: Remove.
+ * gcc.target/arm/neon/vshrn_ns32.c: Remove.
+ * gcc.target/arm/neon/vshrn_ns64.c: Remove.
+ * gcc.target/arm/neon/vshrn_nu16.c: Remove.
+ * gcc.target/arm/neon/vshrn_nu32.c: Remove.
+ * gcc.target/arm/neon/vshrn_nu64.c: Remove.
+ * gcc.target/arm/neon/vsliQ_np16.c: Remove.
+ * gcc.target/arm/neon/vsliQ_np64.c: Remove.
+ * gcc.target/arm/neon/vsliQ_np8.c: Remove.
+ * gcc.target/arm/neon/vsliQ_ns16.c: Remove.
+ * gcc.target/arm/neon/vsliQ_ns32.c: Remove.
+ * gcc.target/arm/neon/vsliQ_ns64.c: Remove.
+ * gcc.target/arm/neon/vsliQ_ns8.c: Remove.
+ * gcc.target/arm/neon/vsliQ_nu16.c: Remove.
+ * gcc.target/arm/neon/vsliQ_nu32.c: Remove.
+ * gcc.target/arm/neon/vsliQ_nu64.c: Remove.
+ * gcc.target/arm/neon/vsliQ_nu8.c: Remove.
+ * gcc.target/arm/neon/vsli_np16.c: Remove.
+ * gcc.target/arm/neon/vsli_np64.c: Remove.
+ * gcc.target/arm/neon/vsli_np8.c: Remove.
+ * gcc.target/arm/neon/vsli_ns16.c: Remove.
+ * gcc.target/arm/neon/vsli_ns32.c: Remove.
+ * gcc.target/arm/neon/vsli_ns64.c: Remove.
+ * gcc.target/arm/neon/vsli_ns8.c: Remove.
+ * gcc.target/arm/neon/vsli_nu16.c: Remove.
+ * gcc.target/arm/neon/vsli_nu32.c: Remove.
+ * gcc.target/arm/neon/vsli_nu64.c: Remove.
+ * gcc.target/arm/neon/vsli_nu8.c: Remove.
+ * gcc.target/arm/neon/vsraQ_ns16.c: Remove.
+ * gcc.target/arm/neon/vsraQ_ns32.c: Remove.
+ * gcc.target/arm/neon/vsraQ_ns64.c: Remove.
+ * gcc.target/arm/neon/vsraQ_ns8.c: Remove.
+ * gcc.target/arm/neon/vsraQ_nu16.c: Remove.
+ * gcc.target/arm/neon/vsraQ_nu32.c: Remove.
+ * gcc.target/arm/neon/vsraQ_nu64.c: Remove.
+ * gcc.target/arm/neon/vsraQ_nu8.c: Remove.
+ * gcc.target/arm/neon/vsra_ns16.c: Remove.
+ * gcc.target/arm/neon/vsra_ns32.c: Remove.
+ * gcc.target/arm/neon/vsra_ns64.c: Remove.
+ * gcc.target/arm/neon/vsra_ns8.c: Remove.
+ * gcc.target/arm/neon/vsra_nu16.c: Remove.
+ * gcc.target/arm/neon/vsra_nu32.c: Remove.
+ * gcc.target/arm/neon/vsra_nu64.c: Remove.
+ * gcc.target/arm/neon/vsra_nu8.c: Remove.
+ * gcc.target/arm/neon/vsriQ_np16.c: Remove.
+ * gcc.target/arm/neon/vsriQ_np64.c: Remove.
+ * gcc.target/arm/neon/vsriQ_np8.c: Remove.
+ * gcc.target/arm/neon/vsriQ_ns16.c: Remove.
+ * gcc.target/arm/neon/vsriQ_ns32.c: Remove.
+ * gcc.target/arm/neon/vsriQ_ns64.c: Remove.
+ * gcc.target/arm/neon/vsriQ_ns8.c: Remove.
+ * gcc.target/arm/neon/vsriQ_nu16.c: Remove.
+ * gcc.target/arm/neon/vsriQ_nu32.c: Remove.
+ * gcc.target/arm/neon/vsriQ_nu64.c: Remove.
+ * gcc.target/arm/neon/vsriQ_nu8.c: Remove.
+ * gcc.target/arm/neon/vsri_np16.c: Remove.
+ * gcc.target/arm/neon/vsri_np64.c: Remove.
+ * gcc.target/arm/neon/vsri_np8.c: Remove.
+ * gcc.target/arm/neon/vsri_ns16.c: Remove.
+ * gcc.target/arm/neon/vsri_ns32.c: Remove.
+ * gcc.target/arm/neon/vsri_ns64.c: Remove.
+ * gcc.target/arm/neon/vsri_ns8.c: Remove.
+ * gcc.target/arm/neon/vsri_nu16.c: Remove.
+ * gcc.target/arm/neon/vsri_nu32.c: Remove.
+ * gcc.target/arm/neon/vsri_nu64.c: Remove.
+ * gcc.target/arm/neon/vsri_nu8.c: Remove.
+ * gcc.target/arm/neon/vst1Q_lanef32.c: Remove.
+ * gcc.target/arm/neon/vst1Q_lanep16.c: Remove.
+ * gcc.target/arm/neon/vst1Q_lanep64.c: Remove.
+ * gcc.target/arm/neon/vst1Q_lanep8.c: Remove.
+ * gcc.target/arm/neon/vst1Q_lanes16.c: Remove.
+ * gcc.target/arm/neon/vst1Q_lanes32.c: Remove.
+ * gcc.target/arm/neon/vst1Q_lanes64.c: Remove.
+ * gcc.target/arm/neon/vst1Q_lanes8.c: Remove.
+ * gcc.target/arm/neon/vst1Q_laneu16.c: Remove.
+ * gcc.target/arm/neon/vst1Q_laneu32.c: Remove.
+ * gcc.target/arm/neon/vst1Q_laneu64.c: Remove.
+ * gcc.target/arm/neon/vst1Q_laneu8.c: Remove.
+ * gcc.target/arm/neon/vst1Qf32.c: Remove.
+ * gcc.target/arm/neon/vst1Qp16.c: Remove.
+ * gcc.target/arm/neon/vst1Qp64.c: Remove.
+ * gcc.target/arm/neon/vst1Qp8.c: Remove.
+ * gcc.target/arm/neon/vst1Qs16.c: Remove.
+ * gcc.target/arm/neon/vst1Qs32.c: Remove.
+ * gcc.target/arm/neon/vst1Qs64.c: Remove.
+ * gcc.target/arm/neon/vst1Qs8.c: Remove.
+ * gcc.target/arm/neon/vst1Qu16.c: Remove.
+ * gcc.target/arm/neon/vst1Qu32.c: Remove.
+ * gcc.target/arm/neon/vst1Qu64.c: Remove.
+ * gcc.target/arm/neon/vst1Qu8.c: Remove.
+ * gcc.target/arm/neon/vst1_lanef32.c: Remove.
+ * gcc.target/arm/neon/vst1_lanep16.c: Remove.
+ * gcc.target/arm/neon/vst1_lanep64.c: Remove.
+ * gcc.target/arm/neon/vst1_lanep8.c: Remove.
+ * gcc.target/arm/neon/vst1_lanes16.c: Remove.
+ * gcc.target/arm/neon/vst1_lanes32.c: Remove.
+ * gcc.target/arm/neon/vst1_lanes64.c: Remove.
+ * gcc.target/arm/neon/vst1_lanes8.c: Remove.
+ * gcc.target/arm/neon/vst1_laneu16.c: Remove.
+ * gcc.target/arm/neon/vst1_laneu32.c: Remove.
+ * gcc.target/arm/neon/vst1_laneu64.c: Remove.
+ * gcc.target/arm/neon/vst1_laneu8.c: Remove.
+ * gcc.target/arm/neon/vst1f32.c: Remove.
+ * gcc.target/arm/neon/vst1p16.c: Remove.
+ * gcc.target/arm/neon/vst1p64.c: Remove.
+ * gcc.target/arm/neon/vst1p8.c: Remove.
+ * gcc.target/arm/neon/vst1s16.c: Remove.
+ * gcc.target/arm/neon/vst1s32.c: Remove.
+ * gcc.target/arm/neon/vst1s64.c: Remove.
+ * gcc.target/arm/neon/vst1s8.c: Remove.
+ * gcc.target/arm/neon/vst1u16.c: Remove.
+ * gcc.target/arm/neon/vst1u32.c: Remove.
+ * gcc.target/arm/neon/vst1u64.c: Remove.
+ * gcc.target/arm/neon/vst1u8.c: Remove.
+ * gcc.target/arm/neon/vst2Q_lanef32.c: Remove.
+ * gcc.target/arm/neon/vst2Q_lanep16.c: Remove.
+ * gcc.target/arm/neon/vst2Q_lanes16.c: Remove.
+ * gcc.target/arm/neon/vst2Q_lanes32.c: Remove.
+ * gcc.target/arm/neon/vst2Q_laneu16.c: Remove.
+ * gcc.target/arm/neon/vst2Q_laneu32.c: Remove.
+ * gcc.target/arm/neon/vst2Qf32.c: Remove.
+ * gcc.target/arm/neon/vst2Qp16.c: Remove.
+ * gcc.target/arm/neon/vst2Qp8.c: Remove.
+ * gcc.target/arm/neon/vst2Qs16.c: Remove.
+ * gcc.target/arm/neon/vst2Qs32.c: Remove.
+ * gcc.target/arm/neon/vst2Qs8.c: Remove.
+ * gcc.target/arm/neon/vst2Qu16.c: Remove.
+ * gcc.target/arm/neon/vst2Qu32.c: Remove.
+ * gcc.target/arm/neon/vst2Qu8.c: Remove.
+ * gcc.target/arm/neon/vst2_lanef32.c: Remove.
+ * gcc.target/arm/neon/vst2_lanep16.c: Remove.
+ * gcc.target/arm/neon/vst2_lanep8.c: Remove.
+ * gcc.target/arm/neon/vst2_lanes16.c: Remove.
+ * gcc.target/arm/neon/vst2_lanes32.c: Remove.
+ * gcc.target/arm/neon/vst2_lanes8.c: Remove.
+ * gcc.target/arm/neon/vst2_laneu16.c: Remove.
+ * gcc.target/arm/neon/vst2_laneu32.c: Remove.
+ * gcc.target/arm/neon/vst2_laneu8.c: Remove.
+ * gcc.target/arm/neon/vst2f32.c: Remove.
+ * gcc.target/arm/neon/vst2p16.c: Remove.
+ * gcc.target/arm/neon/vst2p64.c: Remove.
+ * gcc.target/arm/neon/vst2p8.c: Remove.
+ * gcc.target/arm/neon/vst2s16.c: Remove.
+ * gcc.target/arm/neon/vst2s32.c: Remove.
+ * gcc.target/arm/neon/vst2s64.c: Remove.
+ * gcc.target/arm/neon/vst2s8.c: Remove.
+ * gcc.target/arm/neon/vst2u16.c: Remove.
+ * gcc.target/arm/neon/vst2u32.c: Remove.
+ * gcc.target/arm/neon/vst2u64.c: Remove.
+ * gcc.target/arm/neon/vst2u8.c: Remove.
+ * gcc.target/arm/neon/vst3Q_lanef32.c: Remove.
+ * gcc.target/arm/neon/vst3Q_lanep16.c: Remove.
+ * gcc.target/arm/neon/vst3Q_lanes16.c: Remove.
+ * gcc.target/arm/neon/vst3Q_lanes32.c: Remove.
+ * gcc.target/arm/neon/vst3Q_laneu16.c: Remove.
+ * gcc.target/arm/neon/vst3Q_laneu32.c: Remove.
+ * gcc.target/arm/neon/vst3Qf32.c: Remove.
+ * gcc.target/arm/neon/vst3Qp16.c: Remove.
+ * gcc.target/arm/neon/vst3Qp8.c: Remove.
+ * gcc.target/arm/neon/vst3Qs16.c: Remove.
+ * gcc.target/arm/neon/vst3Qs32.c: Remove.
+ * gcc.target/arm/neon/vst3Qs8.c: Remove.
+ * gcc.target/arm/neon/vst3Qu16.c: Remove.
+ * gcc.target/arm/neon/vst3Qu32.c: Remove.
+ * gcc.target/arm/neon/vst3Qu8.c: Remove.
+ * gcc.target/arm/neon/vst3_lanef32.c: Remove.
+ * gcc.target/arm/neon/vst3_lanep16.c: Remove.
+ * gcc.target/arm/neon/vst3_lanep8.c: Remove.
+ * gcc.target/arm/neon/vst3_lanes16.c: Remove.
+ * gcc.target/arm/neon/vst3_lanes32.c: Remove.
+ * gcc.target/arm/neon/vst3_lanes8.c: Remove.
+ * gcc.target/arm/neon/vst3_laneu16.c: Remove.
+ * gcc.target/arm/neon/vst3_laneu32.c: Remove.
+ * gcc.target/arm/neon/vst3_laneu8.c: Remove.
+ * gcc.target/arm/neon/vst3f32.c: Remove.
+ * gcc.target/arm/neon/vst3p16.c: Remove.
+ * gcc.target/arm/neon/vst3p64.c: Remove.
+ * gcc.target/arm/neon/vst3p8.c: Remove.
+ * gcc.target/arm/neon/vst3s16.c: Remove.
+ * gcc.target/arm/neon/vst3s32.c: Remove.
+ * gcc.target/arm/neon/vst3s64.c: Remove.
+ * gcc.target/arm/neon/vst3s8.c: Remove.
+ * gcc.target/arm/neon/vst3u16.c: Remove.
+ * gcc.target/arm/neon/vst3u32.c: Remove.
+ * gcc.target/arm/neon/vst3u64.c: Remove.
+ * gcc.target/arm/neon/vst3u8.c: Remove.
+ * gcc.target/arm/neon/vst4Q_lanef32.c: Remove.
+ * gcc.target/arm/neon/vst4Q_lanep16.c: Remove.
+ * gcc.target/arm/neon/vst4Q_lanes16.c: Remove.
+ * gcc.target/arm/neon/vst4Q_lanes32.c: Remove.
+ * gcc.target/arm/neon/vst4Q_laneu16.c: Remove.
+ * gcc.target/arm/neon/vst4Q_laneu32.c: Remove.
+ * gcc.target/arm/neon/vst4Qf32.c: Remove.
+ * gcc.target/arm/neon/vst4Qp16.c: Remove.
+ * gcc.target/arm/neon/vst4Qp8.c: Remove.
+ * gcc.target/arm/neon/vst4Qs16.c: Remove.
+ * gcc.target/arm/neon/vst4Qs32.c: Remove.
+ * gcc.target/arm/neon/vst4Qs8.c: Remove.
+ * gcc.target/arm/neon/vst4Qu16.c: Remove.
+ * gcc.target/arm/neon/vst4Qu32.c: Remove.
+ * gcc.target/arm/neon/vst4Qu8.c: Remove.
+ * gcc.target/arm/neon/vst4_lanef32.c: Remove.
+ * gcc.target/arm/neon/vst4_lanep16.c: Remove.
+ * gcc.target/arm/neon/vst4_lanep8.c: Remove.
+ * gcc.target/arm/neon/vst4_lanes16.c: Remove.
+ * gcc.target/arm/neon/vst4_lanes32.c: Remove.
+ * gcc.target/arm/neon/vst4_lanes8.c: Remove.
+ * gcc.target/arm/neon/vst4_laneu16.c: Remove.
+ * gcc.target/arm/neon/vst4_laneu32.c: Remove.
+ * gcc.target/arm/neon/vst4_laneu8.c: Remove.
+ * gcc.target/arm/neon/vst4f32.c: Remove.
+ * gcc.target/arm/neon/vst4p16.c: Remove.
+ * gcc.target/arm/neon/vst4p64.c: Remove.
+ * gcc.target/arm/neon/vst4p8.c: Remove.
+ * gcc.target/arm/neon/vst4s16.c: Remove.
+ * gcc.target/arm/neon/vst4s32.c: Remove.
+ * gcc.target/arm/neon/vst4s64.c: Remove.
+ * gcc.target/arm/neon/vst4s8.c: Remove.
+ * gcc.target/arm/neon/vst4u16.c: Remove.
+ * gcc.target/arm/neon/vst4u32.c: Remove.
+ * gcc.target/arm/neon/vst4u64.c: Remove.
+ * gcc.target/arm/neon/vst4u8.c: Remove.
+ * gcc.target/arm/neon/vsubQf32.c: Remove.
+ * gcc.target/arm/neon/vsubQs16.c: Remove.
+ * gcc.target/arm/neon/vsubQs32.c: Remove.
+ * gcc.target/arm/neon/vsubQs64.c: Remove.
+ * gcc.target/arm/neon/vsubQs8.c: Remove.
+ * gcc.target/arm/neon/vsubQu16.c: Remove.
+ * gcc.target/arm/neon/vsubQu32.c: Remove.
+ * gcc.target/arm/neon/vsubQu64.c: Remove.
+ * gcc.target/arm/neon/vsubQu8.c: Remove.
+ * gcc.target/arm/neon/vsubf32.c: Remove.
+ * gcc.target/arm/neon/vsubhns16.c: Remove.
+ * gcc.target/arm/neon/vsubhns32.c: Remove.
+ * gcc.target/arm/neon/vsubhns64.c: Remove.
+ * gcc.target/arm/neon/vsubhnu16.c: Remove.
+ * gcc.target/arm/neon/vsubhnu32.c: Remove.
+ * gcc.target/arm/neon/vsubhnu64.c: Remove.
+ * gcc.target/arm/neon/vsubls16.c: Remove.
+ * gcc.target/arm/neon/vsubls32.c: Remove.
+ * gcc.target/arm/neon/vsubls8.c: Remove.
+ * gcc.target/arm/neon/vsublu16.c: Remove.
+ * gcc.target/arm/neon/vsublu32.c: Remove.
+ * gcc.target/arm/neon/vsublu8.c: Remove.
+ * gcc.target/arm/neon/vsubs16.c: Remove.
+ * gcc.target/arm/neon/vsubs32.c: Remove.
+ * gcc.target/arm/neon/vsubs64.c: Remove.
+ * gcc.target/arm/neon/vsubs8.c: Remove.
+ * gcc.target/arm/neon/vsubu16.c: Remove.
+ * gcc.target/arm/neon/vsubu32.c: Remove.
+ * gcc.target/arm/neon/vsubu64.c: Remove.
+ * gcc.target/arm/neon/vsubu8.c: Remove.
+ * gcc.target/arm/neon/vsubws16.c: Remove.
+ * gcc.target/arm/neon/vsubws32.c: Remove.
+ * gcc.target/arm/neon/vsubws8.c: Remove.
+ * gcc.target/arm/neon/vsubwu16.c: Remove.
+ * gcc.target/arm/neon/vsubwu32.c: Remove.
+ * gcc.target/arm/neon/vsubwu8.c: Remove.
+ * gcc.target/arm/neon/vtbl1p8.c: Remove.
+ * gcc.target/arm/neon/vtbl1s8.c: Remove.
+ * gcc.target/arm/neon/vtbl1u8.c: Remove.
+ * gcc.target/arm/neon/vtbl2p8.c: Remove.
+ * gcc.target/arm/neon/vtbl2s8.c: Remove.
+ * gcc.target/arm/neon/vtbl2u8.c: Remove.
+ * gcc.target/arm/neon/vtbl3p8.c: Remove.
+ * gcc.target/arm/neon/vtbl3s8.c: Remove.
+ * gcc.target/arm/neon/vtbl3u8.c: Remove.
+ * gcc.target/arm/neon/vtbl4p8.c: Remove.
+ * gcc.target/arm/neon/vtbl4s8.c: Remove.
+ * gcc.target/arm/neon/vtbl4u8.c: Remove.
+ * gcc.target/arm/neon/vtbx1p8.c: Remove.
+ * gcc.target/arm/neon/vtbx1s8.c: Remove.
+ * gcc.target/arm/neon/vtbx1u8.c: Remove.
+ * gcc.target/arm/neon/vtbx2p8.c: Remove.
+ * gcc.target/arm/neon/vtbx2s8.c: Remove.
+ * gcc.target/arm/neon/vtbx2u8.c: Remove.
+ * gcc.target/arm/neon/vtbx3p8.c: Remove.
+ * gcc.target/arm/neon/vtbx3s8.c: Remove.
+ * gcc.target/arm/neon/vtbx3u8.c: Remove.
+ * gcc.target/arm/neon/vtbx4p8.c: Remove.
+ * gcc.target/arm/neon/vtbx4s8.c: Remove.
+ * gcc.target/arm/neon/vtbx4u8.c: Remove.
+ * gcc.target/arm/neon/vtrnQf32.c: Remove.
+ * gcc.target/arm/neon/vtrnQp16.c: Remove.
+ * gcc.target/arm/neon/vtrnQp8.c: Remove.
+ * gcc.target/arm/neon/vtrnQs16.c: Remove.
+ * gcc.target/arm/neon/vtrnQs32.c: Remove.
+ * gcc.target/arm/neon/vtrnQs8.c: Remove.
+ * gcc.target/arm/neon/vtrnQu16.c: Remove.
+ * gcc.target/arm/neon/vtrnQu32.c: Remove.
+ * gcc.target/arm/neon/vtrnQu8.c: Remove.
+ * gcc.target/arm/neon/vtrnf32.c: Remove.
+ * gcc.target/arm/neon/vtrnp16.c: Remove.
+ * gcc.target/arm/neon/vtrnp8.c: Remove.
+ * gcc.target/arm/neon/vtrns16.c: Remove.
+ * gcc.target/arm/neon/vtrns32.c: Remove.
+ * gcc.target/arm/neon/vtrns8.c: Remove.
+ * gcc.target/arm/neon/vtrnu16.c: Remove.
+ * gcc.target/arm/neon/vtrnu32.c: Remove.
+ * gcc.target/arm/neon/vtrnu8.c: Remove.
+ * gcc.target/arm/neon/vtstQp8.c: Remove.
+ * gcc.target/arm/neon/vtstQs16.c: Remove.
+ * gcc.target/arm/neon/vtstQs32.c: Remove.
+ * gcc.target/arm/neon/vtstQs8.c: Remove.
+ * gcc.target/arm/neon/vtstQu16.c: Remove.
+ * gcc.target/arm/neon/vtstQu32.c: Remove.
+ * gcc.target/arm/neon/vtstQu8.c: Remove.
+ * gcc.target/arm/neon/vtstp8.c: Remove.
+ * gcc.target/arm/neon/vtsts16.c: Remove.
+ * gcc.target/arm/neon/vtsts32.c: Remove.
+ * gcc.target/arm/neon/vtsts8.c: Remove.
+ * gcc.target/arm/neon/vtstu16.c: Remove.
+ * gcc.target/arm/neon/vtstu32.c: Remove.
+ * gcc.target/arm/neon/vtstu8.c: Remove.
+ * gcc.target/arm/neon/vuzpQf32.c: Remove.
+ * gcc.target/arm/neon/vuzpQp16.c: Remove.
+ * gcc.target/arm/neon/vuzpQp8.c: Remove.
+ * gcc.target/arm/neon/vuzpQs16.c: Remove.
+ * gcc.target/arm/neon/vuzpQs32.c: Remove.
+ * gcc.target/arm/neon/vuzpQs8.c: Remove.
+ * gcc.target/arm/neon/vuzpQu16.c: Remove.
+ * gcc.target/arm/neon/vuzpQu32.c: Remove.
+ * gcc.target/arm/neon/vuzpQu8.c: Remove.
+ * gcc.target/arm/neon/vuzpf32.c: Remove.
+ * gcc.target/arm/neon/vuzpp16.c: Remove.
+ * gcc.target/arm/neon/vuzpp8.c: Remove.
+ * gcc.target/arm/neon/vuzps16.c: Remove.
+ * gcc.target/arm/neon/vuzps32.c: Remove.
+ * gcc.target/arm/neon/vuzps8.c: Remove.
+ * gcc.target/arm/neon/vuzpu16.c: Remove.
+ * gcc.target/arm/neon/vuzpu32.c: Remove.
+ * gcc.target/arm/neon/vuzpu8.c: Remove.
+ * gcc.target/arm/neon/vzipQf32.c: Remove.
+ * gcc.target/arm/neon/vzipQp16.c: Remove.
+ * gcc.target/arm/neon/vzipQp8.c: Remove.
+ * gcc.target/arm/neon/vzipQs16.c: Remove.
+ * gcc.target/arm/neon/vzipQs32.c: Remove.
+ * gcc.target/arm/neon/vzipQs8.c: Remove.
+ * gcc.target/arm/neon/vzipQu16.c: Remove.
+ * gcc.target/arm/neon/vzipQu32.c: Remove.
+ * gcc.target/arm/neon/vzipQu8.c: Remove.
+ * gcc.target/arm/neon/vzipf32.c: Remove.
+ * gcc.target/arm/neon/vzipp16.c: Remove.
+ * gcc.target/arm/neon/vzipp8.c: Remove.
+ * gcc.target/arm/neon/vzips16.c: Remove.
+ * gcc.target/arm/neon/vzips32.c: Remove.
+ * gcc.target/arm/neon/vzips8.c: Remove.
+ * gcc.target/arm/neon/vzipu16.c: Remove.
+ * gcc.target/arm/neon/vzipu32.c: Remove.
+ * gcc.target/arm/neon/vzipu8.c: Remove.
+
+
+2015-11-12 Marek Polacek <polacek@redhat.com>
+
+ PR c/67784
+ * gcc.dg/pr67784-1.c: New test.
+ * gcc.dg/pr67784-2.c: New test.
+
+2015-11-12 Martin Liska <mliska@suse.cz>
+
+ * gcc.dg/ipa/pr68035.c: New test.
+
+2015-11-12 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/68306
+ * gcc.dg/pr68306.c: New testcase.
+
+2015-11-12 Ville Voutilainen <ville.voutilainen@gmail.com>
+
+ Implement D0013R2, logical type traits.
+
+ * g++.dg/cpp0x/Wattributes1.C: Adjust.
+
+2015-11-12 Nathan Sidwell <nathan@codesourcery.com>
+
+ * c-c++-common/goacc/data-default-1.c: New.
+
+2015-11-12 David Edelsohn <dje.gcc@gmail.com>
+
+ * gcc.target/powerpc/pr67789.c: Skip on AIX and Darwin.
+
+2015-11-12 Ilya Enkovich <enkovich.gnu@gmail.com>
+
+ PR tree-optimization/68305
+ * gcc.dg/vect/pr68305.c: New test.
+
+2015-11-12 Eric Botcazou <ebotcazou@adacore.com>
+
+ * gcc.target/i386/pr67265-2.c: New test.
+
+2015-11-12 Ilya Enkovich <enkovich.gnu@gmail.com>
+
+ * gcc.dg/pr68286.c: New test.
+
+2015-11-12 Christian Bruel <christian.bruel@st.com>
+
+ * gcc.target/arm/mmx-1.c: Adjust for unified asm.
+
+2015-11-12 Uros Bizjak <ubizjak@gmail.com>
+
+ * gcc.target/i386/sse-1.c (swizzle): Assume that a is
+ aligned to 64 bits.
+
+2015-11-11 David Edelsohn <dje.gcc@gmail.com>
+
+ * gcc.dg/pr65521.c: Fail on AIX.
+
+2015-11-11 Sebastian Pop <s.pop@samsung.com>
+
+ * gcc.dg/graphite/fuse-1.c: Adjust pattern. Remove dg-do.
+ * gcc.dg/graphite/fuse-2.c: Same.
+ * gcc.dg/graphite/graphite.exp (opt_files): Add fuse-*.c and
+ isl-ast-gen-*.c files.
+ * gcc.dg/graphite/isl-ast-gen-blocks-1.c: Remove dg-do and dg-options.
+ * gcc.dg/graphite/isl-ast-gen-blocks-2.c: Same.
+ * gcc.dg/graphite/isl-ast-gen-blocks-3.c: Same.
+ * gcc.dg/graphite/isl-ast-gen-blocks-4.c: Same.
+ * gcc.dg/graphite/isl-ast-gen-if-1.c: Same.
+ * gcc.dg/graphite/isl-ast-gen-if-2.c: Same.
+ * gcc.dg/graphite/isl-ast-gen-single-loop-1.c: Same.
+ * gcc.dg/graphite/isl-ast-gen-single-loop-2.c: Same.
+ * gcc.dg/graphite/isl-ast-gen-single-loop-3.c: Same.
+ * gcc.dg/graphite/isl-ast-gen-user-1.c: Same.
+ * gcc.dg/graphite/isl-codegen-loop-dumping.c: Remove.
+
+2015-11-11 Marek Polacek <polacek@redhat.com>
+
+ PR c/68107
+ PR c++/68266
+ * c-c++-common/pr68107.c: New test.
+ * g++.dg/init/new38.C (large_array_char): Adjust dg-error.
+ (large_array_char_template): Likewise.
+ * g++.dg/init/new44.C: Adjust dg-error.
+
+2015-11-11 Nathan Sidwell <nathan@codesourcery.com>
+
+ * gfortran.dg/goacc/private-3.f95: Remove xfail.
+ * gfortran.dg/goacc/combined_loop.f90: Remove xfail.
+
+2015-11-11 Eric Botcazou <ebotcazou@adacore.com>
+
+ * gcc.target/i386/pr67265.c: New test.
+
+2015-11-11 Segher Boessenkool <segher@kernel.crashing.org>
+
+ * gcc.target/powerpc/20050603-3.c: Don't restrict to ilp32. Do more
+ tests for the expected generated code.
+
+2015-11-11 Simon Dardis <simon.dardis@imgtec.com>
+
+ * gcc.target/mips/split-ds-sequence.c: New test.
+
+2015-11-11 Julia Koval <julia.koval@intel.com>
+
+ * g++.dg/ext/mv16.C: New functions.
+
+2015-11-11 Richard Biener <rguenth@gcc.gnu.org>
+ Jiong Wang <jiong.wang@arm.com>
+
+ * gcc.dg/tree-ssa/pr68234.c: New testcase.
+
2015-11-10 Ilya Enkovich <enkovich.gnu@gmail.com>
* gcc.target/i386/mask-pack.c: New test.
diff --git a/gcc/testsuite/c-c++-common/goacc/data-default-1.c b/gcc/testsuite/c-c++-common/goacc/data-default-1.c
new file mode 100644
index 00000000000..631032e6869
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/goacc/data-default-1.c
@@ -0,0 +1,37 @@
+/* { dg-do compile } */
+
+
+int main ()
+{
+ int n = 2;
+ int ary[2];
+
+#pragma acc parallel default (none) /* { dg-message "'parallel' construct" 2 } */
+ {
+ ary[0] /* { dg-error "not specified in enclosing" } */
+ = n; /* { dg-error "not specified in enclosing" } */
+ }
+
+#pragma acc kernels default (none) /* { dg-message "'kernels' construct" 2 } */
+ {
+ ary[0] /* { dg-error "not specified in enclosing" } */
+ = n; /* { dg-error "not specified in enclosing" } */
+ }
+
+#pragma acc data copy (ary, n)
+ {
+#pragma acc parallel default (none)
+ {
+ ary[0]
+ = n;
+ }
+
+#pragma acc kernels default (none)
+ {
+ ary[0]
+ = n;
+ }
+ }
+
+ return 0;
+}
diff --git a/gcc/testsuite/c-c++-common/goacc/declare-1.c b/gcc/testsuite/c-c++-common/goacc/declare-1.c
new file mode 100644
index 00000000000..b036c636166
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/goacc/declare-1.c
@@ -0,0 +1,83 @@
+/* Test valid uses of declare directive. */
+/* { dg-do compile } */
+
+int v0;
+#pragma acc declare create(v0)
+
+int v1;
+#pragma acc declare copyin(v1)
+
+int *v2;
+#pragma acc declare deviceptr(v2)
+
+int v3;
+#pragma acc declare device_resident(v3)
+
+int v4;
+#pragma acc declare link(v4)
+
+int v5, v6, v7, v8;
+#pragma acc declare create(v5, v6) copyin(v7, v8)
+
+void
+f (void)
+{
+ int va0;
+#pragma acc declare create(va0)
+
+ int va1;
+#pragma acc declare copyin(va1)
+
+ int *va2;
+#pragma acc declare deviceptr(va2)
+
+ int va3;
+#pragma acc declare device_resident(va3)
+
+ extern int ve0;
+#pragma acc declare create(ve0)
+
+ extern int ve1;
+#pragma acc declare copyin(ve1)
+
+ extern int *ve2;
+#pragma acc declare deviceptr(ve2)
+
+ extern int ve3;
+#pragma acc declare device_resident(ve3)
+
+ extern int ve4;
+#pragma acc declare link(ve4)
+
+ int va5;
+#pragma acc declare copy(va5)
+
+ int va6;
+#pragma acc declare copyout(va6)
+
+ int va7;
+#pragma acc declare present(va7)
+
+ int va8;
+#pragma acc declare present_or_copy(va8)
+
+ int va9;
+#pragma acc declare present_or_copyin(va9)
+
+ int va10;
+#pragma acc declare present_or_copyout(va10)
+
+ int va11;
+#pragma acc declare present_or_create(va11)
+
+ a:
+ {
+ int va0;
+#pragma acc declare create(va0)
+ if (v1)
+ goto a;
+ else
+ goto b;
+ }
+ b:;
+}
diff --git a/gcc/testsuite/c-c++-common/goacc/declare-2.c b/gcc/testsuite/c-c++-common/goacc/declare-2.c
new file mode 100644
index 00000000000..d24cb2222da
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/goacc/declare-2.c
@@ -0,0 +1,79 @@
+/* Test invalid uses of declare directive. */
+/* { dg-do compile } */
+
+#pragma acc declare /* { dg-error "no valid clauses" } */
+
+#pragma acc declare create(undeclared) /* { dg-error "undeclared" } */
+/* { dg-error "no valid clauses" "second error" { target *-*-* } 6 } */
+
+int v0[10];
+#pragma acc declare create(v0[1:3]) /* { dg-error "array section" } */
+
+int v1;
+#pragma acc declare create(v1, v1) /* { dg-error "more than once" } */
+
+int v2;
+#pragma acc declare create(v2)
+#pragma acc declare copyin(v2) /* { dg-error "more than once" } */
+
+int v3;
+#pragma acc declare copy(v3) /* { dg-error "at file scope" } */
+
+int v4;
+#pragma acc declare copyout(v4) /* { dg-error "at file scope" } */
+
+int v5;
+#pragma acc declare present(v5) /* { dg-error "at file scope" } */
+
+int v6;
+#pragma acc declare present_or_copy(v6) /* { dg-error "at file scope" } */
+
+int v7;
+#pragma acc declare present_or_copyin(v7) /* { dg-error "at file scope" } */
+
+int v8;
+#pragma acc declare present_or_copyout(v8) /* { dg-error "at file scope" } */
+
+int v9;
+#pragma acc declare present_or_create(v9) /* { dg-error "at file scope" } */
+
+int va10;
+#pragma acc declare create (va10)
+#pragma acc declare link (va10) /* { dg-error "more than once" } */
+
+int va11;
+#pragma acc declare link (va11)
+#pragma acc declare link (va11) /* { dg-error "more than once" } */
+
+int va12;
+#pragma acc declare create (va12) link (va12) /* { dg-error "more than once" } */
+
+void
+f (void)
+{
+ int va0;
+#pragma acc declare link(va0) /* { dg-error "global variable" } */
+
+ extern int ve0;
+#pragma acc declare copy(ve0) /* { dg-error "invalid use of" } */
+
+ extern int ve1;
+#pragma acc declare copyout(ve1) /* { dg-error "invalid use of" } */
+
+ extern int ve2;
+#pragma acc declare present(ve2) /* { dg-error "invalid use of" } */
+
+ extern int ve3;
+#pragma acc declare present_or_copy(ve3) /* { dg-error "invalid use of" } */
+
+ extern int ve4;
+#pragma acc declare present_or_copyin(ve4) /* { dg-error "invalid use of" } */
+
+ extern int ve5;
+#pragma acc declare present_or_copyout(ve5) /* { dg-error "invalid use of" } */
+
+ extern int ve6;
+#pragma acc declare present_or_create(ve6) /* { dg-error "invalid use of" } */
+
+#pragma acc declare present (v9) /* { dg-error "invalid use of" } */
+}
diff --git a/gcc/testsuite/c-c++-common/goacc/loop-auto-1.c b/gcc/testsuite/c-c++-common/goacc/loop-auto-1.c
new file mode 100644
index 00000000000..ee6d28c2e8c
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/goacc/loop-auto-1.c
@@ -0,0 +1,230 @@
+
+void Foo ()
+{
+
+#pragma acc parallel num_gangs(10) num_workers(32) vector_length(32)
+ {
+#pragma acc loop vector
+ for (int ix = 0; ix < 10; ix++)
+ {
+#pragma acc loop seq
+ for (int jx = 0; jx < 10; jx++) {}
+
+#pragma acc loop auto /* { dg-warning "insufficient partitioning" } */
+ for (int jx = 0; jx < 10; jx++) {}
+ }
+
+#pragma acc loop worker
+ for (int ix = 0; ix < 10; ix++)
+ {
+#pragma acc loop auto
+ for (int jx = 0; jx < 10; jx++) {}
+
+#pragma acc loop auto /* { dg-warning "insufficient partitioning" } */
+ for (int jx = 0; jx < 10; jx++)
+ {
+#pragma acc loop vector
+ for (int kx = 0; kx < 10; kx++) {}
+ }
+ }
+
+#pragma acc loop gang
+ for (int ix = 0; ix < 10; ix++)
+ {
+#pragma acc loop auto
+ for (int jx = 0; jx < 10; jx++) {}
+
+#pragma acc loop auto
+ for (int jx = 0; jx < 10; jx++)
+ {
+#pragma acc loop auto
+ for (int kx = 0; kx < 10; kx++) {}
+ }
+
+#pragma acc loop worker
+ for (int jx = 0; jx < 10; jx++)
+ {
+#pragma acc loop auto
+ for (int kx = 0; kx < 10; kx++) {}
+ }
+
+#pragma acc loop vector
+ for (int jx = 0; jx < 10; jx++)
+ {
+#pragma acc loop auto /* { dg-warning "insufficient partitioning" } */
+ for (int kx = 0; kx < 10; kx++) {}
+ }
+
+#pragma acc loop auto
+ for (int jx = 0; jx < 10; jx++)
+ {
+#pragma acc loop vector
+ for (int kx = 0; kx < 10; kx++) {}
+ }
+
+ }
+
+#pragma acc loop auto
+ for (int ix = 0; ix < 10; ix++)
+ {
+#pragma acc loop auto
+ for (int jx = 0; jx < 10; jx++)
+ {
+#pragma acc loop auto
+ for (int kx = 0; kx < 10; kx++) {}
+ }
+ }
+ }
+}
+
+#pragma acc routine gang
+void Gang (void)
+{
+#pragma acc loop vector
+ for (int ix = 0; ix < 10; ix++)
+ {
+#pragma acc loop seq
+ for (int jx = 0; jx < 10; jx++) {}
+
+#pragma acc loop auto /* { dg-warning "insufficient partitioning" } */
+ for (int jx = 0; jx < 10; jx++) {}
+ }
+
+#pragma acc loop worker
+ for (int ix = 0; ix < 10; ix++)
+ {
+#pragma acc loop auto
+ for (int jx = 0; jx < 10; jx++) {}
+
+#pragma acc loop auto /* { dg-warning "insufficient partitioning" } */
+ for (int jx = 0; jx < 10; jx++)
+ {
+#pragma acc loop vector
+ for (int kx = 0; kx < 10; kx++) {}
+ }
+ }
+
+#pragma acc loop gang
+ for (int ix = 0; ix < 10; ix++)
+ {
+#pragma acc loop auto
+ for (int jx = 0; jx < 10; jx++) {}
+
+#pragma acc loop auto
+ for (int jx = 0; jx < 10; jx++)
+ {
+#pragma acc loop auto
+ for (int kx = 0; kx < 10; kx++) {}
+ }
+
+#pragma acc loop worker
+ for (int jx = 0; jx < 10; jx++)
+ {
+#pragma acc loop auto
+ for (int kx = 0; kx < 10; kx++) {}
+ }
+
+#pragma acc loop vector
+ for (int jx = 0; jx < 10; jx++)
+ {
+#pragma acc loop auto /* { dg-warning "insufficient partitioning" } */
+ for (int kx = 0; kx < 10; kx++) {}
+ }
+
+#pragma acc loop auto
+ for (int jx = 0; jx < 10; jx++)
+ {
+#pragma acc loop vector
+ for (int kx = 0; kx < 10; kx++) {}
+ }
+
+ }
+
+#pragma acc loop auto
+ for (int ix = 0; ix < 10; ix++)
+ {
+#pragma acc loop auto
+ for (int jx = 0; jx < 10; jx++)
+ {
+#pragma acc loop auto
+ for (int kx = 0; kx < 10; kx++) {}
+ }
+ }
+}
+
+#pragma acc routine worker
+void Worker (void)
+{
+#pragma acc loop vector
+ for (int ix = 0; ix < 10; ix++)
+ {
+#pragma acc loop seq
+ for (int jx = 0; jx < 10; jx++) {}
+
+#pragma acc loop auto /* { dg-warning "insufficient partitioning" } */
+ for (int jx = 0; jx < 10; jx++) {}
+ }
+
+#pragma acc loop worker
+ for (int ix = 0; ix < 10; ix++)
+ {
+#pragma acc loop auto
+ for (int jx = 0; jx < 10; jx++) {}
+
+#pragma acc loop auto /* { dg-warning "insufficient partitioning" } */
+ for (int jx = 0; jx < 10; jx++)
+ {
+#pragma acc loop vector
+ for (int kx = 0; kx < 10; kx++) {}
+ }
+ }
+
+#pragma acc loop auto
+ for (int ix = 0; ix < 10; ix++)
+ {
+#pragma acc loop auto
+ for (int jx = 0; jx < 10; jx++) {}
+ }
+
+#pragma acc loop auto /* { dg-warning "insufficient partitioning" } */
+ for (int ix = 0; ix < 10; ix++)
+ {
+#pragma acc loop auto
+ for (int jx = 0; jx < 10; jx++)
+ {
+#pragma acc loop auto
+ for (int kx = 0; kx < 10; kx++) {}
+ }
+ }
+}
+
+#pragma acc routine vector
+void Vector (void)
+{
+#pragma acc loop vector
+ for (int ix = 0; ix < 10; ix++)
+ {
+#pragma acc loop seq
+ for (int jx = 0; jx < 10; jx++) {}
+
+#pragma acc loop auto /* { dg-warning "insufficient partitioning" } */
+ for (int jx = 0; jx < 10; jx++) {}
+ }
+
+#pragma acc loop auto
+ for (int ix = 0; ix < 10; ix++) {}
+
+#pragma acc loop auto /* { dg-warning "insufficient partitioning" } */
+ for (int ix = 0; ix < 10; ix++)
+ {
+#pragma acc loop auto
+ for (int jx = 0; jx < 10; jx++) {}
+ }
+}
+
+#pragma acc routine seq
+void Seq (void)
+{
+#pragma acc loop auto /* { dg-warning "insufficient partitioning" } */
+ for (int ix = 0; ix < 10; ix++) {}
+}
diff --git a/gcc/testsuite/c-c++-common/pr68107.c b/gcc/testsuite/c-c++-common/pr68107.c
new file mode 100644
index 00000000000..f1ed465e078
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/pr68107.c
@@ -0,0 +1,37 @@
+/* PR c/68107 */
+/* { dg-do compile } */
+
+#define N ((__SIZE_MAX__ / sizeof (int)) / 2 + 1)
+
+typedef int (*T1)[N]; /* { dg-error "too large" } */
+typedef int (*T2)[N - 1];
+typedef int (*T3)[N][N]; /* { dg-error "too large" } */
+typedef int (*T4)[N - 1][N - 1]; /* { dg-error "too large" } */
+typedef int (**T5)[N]; /* { dg-error "too large" } */
+
+struct S {
+ int (*q1)[N]; /* { dg-error "too large" } */
+ int (*q2)[N - 1];
+ int (*q3)[N][N]; /* { dg-error "too large" } */
+ int (*q4)[N - 1][N - 1]; /* { dg-error "too large" } */
+ int (**q5)[N]; /* { dg-error "too large" } */
+};
+
+void fn1 (int (*p1)[N]); /* { dg-error "too large" } */
+void fn2 (int (*p1)[N - 1]);
+void fn3 (int (*p3)[N][N]); /* { dg-error "too large" } */
+void fn4 (int (*p4)[N - 1][N - 1]); /* { dg-error "too large" } */
+void fn5 (int (**p5)[N]); /* { dg-error "too large" } */
+
+void
+fn (void)
+{
+ int (*n1)[N]; /* { dg-error "too large" } */
+ int (*n2)[N - 1];
+ int (*n3)[N][N]; /* { dg-error "too large" } */
+ int (*n4)[N - 1][N - 1]; /* { dg-error "too large" } */
+ int (**n5)[N]; /* { dg-error "too large" } */
+
+ sizeof (int (*)[N]); /* { dg-error "too large" } */
+ sizeof (int [N]); /* { dg-error "too large" } */
+}
diff --git a/gcc/testsuite/g++.dg/cpp0x/Wattributes1.C b/gcc/testsuite/g++.dg/cpp0x/Wattributes1.C
index d81885152c5..dd9011b8870 100644
--- a/gcc/testsuite/g++.dg/cpp0x/Wattributes1.C
+++ b/gcc/testsuite/g++.dg/cpp0x/Wattributes1.C
@@ -5,4 +5,4 @@
#include <new>
__attribute__((visibility("hidden")))void*operator new(std::size_t); // { dg-warning "visibility attribute ignored" }
-// { dg-message "previous declaration" "" { target *-*-* } 111 }
+// { dg-message "previous declaration" "" { target *-*-* } 116 }
diff --git a/gcc/testsuite/g++.dg/ext/mv16.C b/gcc/testsuite/g++.dg/ext/mv16.C
index 8992bfc6fc1..a3a0fe804fd 100644
--- a/gcc/testsuite/g++.dg/ext/mv16.C
+++ b/gcc/testsuite/g++.dg/ext/mv16.C
@@ -44,6 +44,18 @@ foo ()
return 12;
}
+int __attribute__ ((target("arch=broadwell"))) foo () {
+ return 13;
+}
+
+int __attribute__ ((target("arch=skylake"))) foo () {
+ return 14;
+}
+
+int __attribute__ ((target("arch=skylake-avx512"))) foo () {
+ return 15;
+}
+
int main ()
{
int val = foo ();
@@ -58,6 +70,12 @@ int main ()
assert (val == 9);
else if (__builtin_cpu_is ("haswell"))
assert (val == 12);
+ else if (__builtin_cpu_is ("broadwell"))
+ assert (val == 13);
+ else if (__builtin_cpu_is ("skylake"))
+ assert (val == 14);
+ else if (__builtin_cpu_is ("skylake-avx512"))
+ assert (val == 15);
else
assert (val == 0);
diff --git a/gcc/testsuite/g++.dg/init/new38.C b/gcc/testsuite/g++.dg/init/new38.C
index 1672f229d64..37da525bf78 100644
--- a/gcc/testsuite/g++.dg/init/new38.C
+++ b/gcc/testsuite/g++.dg/init/new38.C
@@ -5,7 +5,7 @@ large_array_char(int n)
{
new char[n]
[1ULL << (sizeof(void *) * 4)]
- [1ULL << (sizeof(void *) * 4)]; // { dg-error "size of array" }
+ [1ULL << (sizeof(void *) * 4)]; // { dg-error "size of unnamed array" }
}
template <typename T>
@@ -14,7 +14,7 @@ large_array_char_template(int n)
{
new char[n]
[1ULL << (sizeof(void *) * 4)]
- [1ULL << (sizeof(void *) * 4)]; // { dg-error "size of array" }
+ [1ULL << (sizeof(void *) * 4)]; // { dg-error "size of unnamed array" }
}
diff --git a/gcc/testsuite/g++.dg/init/new44.C b/gcc/testsuite/g++.dg/init/new44.C
index d6ff86a16c7..ab6e3484cc8 100644
--- a/gcc/testsuite/g++.dg/init/new44.C
+++ b/gcc/testsuite/g++.dg/init/new44.C
@@ -87,10 +87,10 @@ test_one_dim_short_array ()
static void __attribute__ ((used))
test_two_dim_char_array ()
{
- p = new char [1][MAX]; // { dg-error "size of array" }
- p = new char [1][MAX - 1]; // { dg-error "size of array" }
- p = new char [1][MAX - 2]; // { dg-error "size of array" }
- p = new char [1][MAX - 99]; // { dg-error "size of array" }
+ p = new char [1][MAX]; // { dg-error "size of unnamed array" }
+ p = new char [1][MAX - 1]; // { dg-error "size of unnamed array" }
+ p = new char [1][MAX - 2]; // { dg-error "size of unnamed array" }
+ p = new char [1][MAX - 99]; // { dg-error "size of unnamed array" }
p = new char [1][MAX / 2]; // { dg-error "size of array" }
p = new char [1][MAX / 2 - 1]; // { dg-error "size of array" }
p = new char [1][MAX / 2 - 2]; // { dg-error "size of array" }
@@ -104,18 +104,18 @@ test_two_dim_char_array ()
p = new char [1][MAX / 2 - 7]; // okay
p = new char [1][MAX / 2 - 8]; // okay
- p = new char [2][MAX]; // { dg-error "size of array" }
- p = new char [2][MAX - 1]; // { dg-error "size of array" }
- p = new char [2][MAX - 2]; // { dg-error "size of array" }
+ p = new char [2][MAX]; // { dg-error "size of unnamed array" }
+ p = new char [2][MAX - 1]; // { dg-error "size of unnamed array" }
+ p = new char [2][MAX - 2]; // { dg-error "size of unnamed array" }
p = new char [2][MAX / 2]; // { dg-error "size of array" }
p = new char [2][MAX / 2 - 1]; // { dg-error "size of array" }
p = new char [2][MAX / 2 - 2]; // { dg-error "size of array" }
p = new char [2][MAX / 2 - 7]; // { dg-error "size of array" }
p = new char [2][MAX / 2 - 8]; // { dg-error "size of array" }
- p = new char [MAX][MAX]; // { dg-error "size of array" }
- p = new char [MAX][MAX - 1]; // { dg-error "size of array" }
- p = new char [MAX][MAX - 2]; // { dg-error "size of array" }
+ p = new char [MAX][MAX]; // { dg-error "size of unnamed array" }
+ p = new char [MAX][MAX - 1]; // { dg-error "size of unnamed array" }
+ p = new char [MAX][MAX - 2]; // { dg-error "size of unnamed array" }
p = new char [MAX][MAX / 2]; // { dg-error "size of array" }
p = new char [MAX][MAX / 2 - 1]; // { dg-error "size of array" }
p = new char [MAX][MAX / 2 - 2]; // { dg-error "size of array" }
@@ -142,10 +142,10 @@ test_two_dim_char_array ()
static __attribute__ ((used)) void
test_three_dim_char_array ()
{
- p = new char [1][1][MAX]; // { dg-error "size of array" }
- p = new char [1][1][MAX - 1]; // { dg-error "size of array" }
- p = new char [1][1][MAX - 2]; // { dg-error "size of array" }
- p = new char [1][1][MAX - 99]; // { dg-error "size of array" }
+ p = new char [1][1][MAX]; // { dg-error "size of unnamed array" }
+ p = new char [1][1][MAX - 1]; // { dg-error "size of unnamed array" }
+ p = new char [1][1][MAX - 2]; // { dg-error "size of unnamed array" }
+ p = new char [1][1][MAX - 99]; // { dg-error "size of unnamed array" }
p = new char [1][1][MAX / 2]; // { dg-error "size of array" }
p = new char [1][1][MAX / 2 - 1]; // { dg-error "size of array" }
p = new char [1][1][MAX / 2 - 2]; // { dg-error "size of array" }
@@ -159,19 +159,19 @@ test_three_dim_char_array ()
p = new char [1][1][MAX / 2 - 7]; // okay
p = new char [1][1][MAX / 2 - 8]; // okay
- p = new char [1][2][MAX]; // { dg-error "size of array" }
- p = new char [1][2][MAX - 1]; // { dg-error "size of array" }
- p = new char [1][2][MAX - 2]; // { dg-error "size of array" }
- p = new char [1][2][MAX - 99]; // { dg-error "size of array" }
- p = new char [1][2][MAX / 2]; // { dg-error "size of array" }
- p = new char [1][2][MAX / 2 - 1]; // { dg-error "size of array" }
- p = new char [1][2][MAX / 2 - 2]; // { dg-error "size of array" }
- p = new char [1][2][MAX / 2 - 3]; // { dg-error "size of array" }
- p = new char [1][2][MAX / 2 - 4]; // { dg-error "size of array" }
- p = new char [1][2][MAX / 2 - 5]; // { dg-error "size of array" }
- p = new char [1][2][MAX / 2 - 6]; // { dg-error "size of array" }
- p = new char [1][2][MAX / 2 - 7]; // { dg-error "size of array" }
- p = new char [1][2][MAX / 2 - 8]; // { dg-error "size of array" }
+ p = new char [1][2][MAX]; // { dg-error "size of unnamed array" }
+ p = new char [1][2][MAX - 1]; // { dg-error "size of unnamed array" }
+ p = new char [1][2][MAX - 2]; // { dg-error "size of unnamed array" }
+ p = new char [1][2][MAX - 99]; // { dg-error "size of unnamed array" }
+ p = new char [1][2][MAX / 2]; // { dg-error "size of unnamed array" }
+ p = new char [1][2][MAX / 2 - 1]; // { dg-error "size of unnamed array" }
+ p = new char [1][2][MAX / 2 - 2]; // { dg-error "size of unnamed array" }
+ p = new char [1][2][MAX / 2 - 3]; // { dg-error "size of unnamed array" }
+ p = new char [1][2][MAX / 2 - 4]; // { dg-error "size of unnamed array" }
+ p = new char [1][2][MAX / 2 - 5]; // { dg-error "size of unnamed array" }
+ p = new char [1][2][MAX / 2 - 6]; // { dg-error "size of unnamed array" }
+ p = new char [1][2][MAX / 2 - 7]; // { dg-error "size of unnamed array" }
+ p = new char [1][2][MAX / 2 - 8]; // { dg-error "size of unnamed array" }
p = new char [1][2][MAX / 4]; // { dg-error "size of array" }
// Avoid exercising data model-dependent expressions.
@@ -181,10 +181,10 @@ test_three_dim_char_array ()
p = new char [1][2][MAX / 4 - 3]; // okay
p = new char [1][2][MAX / 4 - 4]; // okay
- p = new char [2][1][MAX]; // { dg-error "size of array" }
- p = new char [2][1][MAX - 1]; // { dg-error "size of array" }
- p = new char [2][1][MAX - 2]; // { dg-error "size of array" }
- p = new char [2][1][MAX - 99]; // { dg-error "size of array" }
+ p = new char [2][1][MAX]; // { dg-error "size of unnamed array" }
+ p = new char [2][1][MAX - 1]; // { dg-error "size of unnamed array" }
+ p = new char [2][1][MAX - 2]; // { dg-error "size of unnamed array" }
+ p = new char [2][1][MAX - 99]; // { dg-error "size of unnamed array" }
p = new char [2][1][MAX / 2]; // { dg-error "size of array" }
p = new char [2][1][MAX / 2 - 1]; // { dg-error "size of array" }
p = new char [2][1][MAX / 2 - 2]; // { dg-error "size of array" }
@@ -203,19 +203,19 @@ test_three_dim_char_array ()
p = new char [2][1][MAX / 4 - 3]; // okay
p = new char [2][1][MAX / 4 - 4]; // okay
- p = new char [2][2][MAX]; // { dg-error "size of array" }
- p = new char [2][2][MAX - 1]; // { dg-error "size of array" }
- p = new char [2][2][MAX - 2]; // { dg-error "size of array" }
- p = new char [2][2][MAX - 99]; // { dg-error "size of array" }
- p = new char [2][2][MAX / 2]; // { dg-error "size of array" }
- p = new char [2][2][MAX / 2 - 1]; // { dg-error "size of array" }
- p = new char [2][2][MAX / 2 - 2]; // { dg-error "size of array" }
- p = new char [2][2][MAX / 2 - 3]; // { dg-error "size of array" }
- p = new char [2][2][MAX / 2 - 4]; // { dg-error "size of array" }
- p = new char [2][2][MAX / 2 - 5]; // { dg-error "size of array" }
- p = new char [2][2][MAX / 2 - 6]; // { dg-error "size of array" }
- p = new char [2][2][MAX / 2 - 7]; // { dg-error "size of array" }
- p = new char [2][2][MAX / 2 - 8]; // { dg-error "size of array" }
+ p = new char [2][2][MAX]; // { dg-error "size of unnamed array" }
+ p = new char [2][2][MAX - 1]; // { dg-error "size of unnamed array" }
+ p = new char [2][2][MAX - 2]; // { dg-error "size of unnamed array" }
+ p = new char [2][2][MAX - 99]; // { dg-error "size of unnamed array" }
+ p = new char [2][2][MAX / 2]; // { dg-error "size of unnamed array" }
+ p = new char [2][2][MAX / 2 - 1]; // { dg-error "size of unnamed array" }
+ p = new char [2][2][MAX / 2 - 2]; // { dg-error "size of unnamed array" }
+ p = new char [2][2][MAX / 2 - 3]; // { dg-error "size of unnamed array" }
+ p = new char [2][2][MAX / 2 - 4]; // { dg-error "size of unnamed array" }
+ p = new char [2][2][MAX / 2 - 5]; // { dg-error "size of unnamed array" }
+ p = new char [2][2][MAX / 2 - 6]; // { dg-error "size of unnamed array" }
+ p = new char [2][2][MAX / 2 - 7]; // { dg-error "size of unnamed array" }
+ p = new char [2][2][MAX / 2 - 8]; // { dg-error "size of unnamed array" }
p = new char [2][2][MAX / 4]; // { dg-error "size of array" }
p = new char [2][2][MAX / 4 - 1]; // { dg-error "size of array" }
p = new char [2][2][MAX / 4 - 2]; // { dg-error "size of array" }
@@ -227,19 +227,19 @@ test_three_dim_char_array ()
p = new char [2][2][MAX / 8 - 2];
p = new char [2][2][MAX / 8 - 3];
- p = new char [2][MAX][2]; // { dg-error "size of array" }
- p = new char [2][MAX - 1][2]; // { dg-error "size of array" }
- p = new char [2][MAX - 2][2]; // { dg-error "size of array" }
- p = new char [2][MAX - 99][2]; // { dg-error "size of array" }
- p = new char [2][MAX / 2][2]; // { dg-error "size of array" }
- p = new char [2][MAX / 2 - 1][2]; // { dg-error "size of array" }
- p = new char [2][MAX / 2 - 2][2]; // { dg-error "size of array" }
- p = new char [2][MAX / 2 - 3][2]; // { dg-error "size of array" }
- p = new char [2][MAX / 2 - 4][2]; // { dg-error "size of array" }
- p = new char [2][MAX / 2 - 5][2]; // { dg-error "size of array" }
- p = new char [2][MAX / 2 - 6][2]; // { dg-error "size of array" }
- p = new char [2][MAX / 2 - 7][2]; // { dg-error "size of array" }
- p = new char [2][MAX / 2 - 8][2]; // { dg-error "size of array" }
+ p = new char [2][MAX][2]; // { dg-error "size of unnamed array" }
+ p = new char [2][MAX - 1][2]; // { dg-error "size of unnamed array" }
+ p = new char [2][MAX - 2][2]; // { dg-error "size of unnamed array" }
+ p = new char [2][MAX - 99][2]; // { dg-error "size of unnamed array" }
+ p = new char [2][MAX / 2][2]; // { dg-error "size of unnamed array" }
+ p = new char [2][MAX / 2 - 1][2]; // { dg-error "size of unnamed array" }
+ p = new char [2][MAX / 2 - 2][2]; // { dg-error "size of unnamed array" }
+ p = new char [2][MAX / 2 - 3][2]; // { dg-error "size of unnamed array" }
+ p = new char [2][MAX / 2 - 4][2]; // { dg-error "size of unnamed array" }
+ p = new char [2][MAX / 2 - 5][2]; // { dg-error "size of unnamed array" }
+ p = new char [2][MAX / 2 - 6][2]; // { dg-error "size of unnamed array" }
+ p = new char [2][MAX / 2 - 7][2]; // { dg-error "size of unnamed array" }
+ p = new char [2][MAX / 2 - 8][2]; // { dg-error "size of unnamed array" }
p = new char [2][MAX / 4][2]; // { dg-error "size of array" }
p = new char [2][MAX / 4 - 1][2]; // { dg-error "size of array" }
p = new char [2][MAX / 4 - 2][2]; // { dg-error "size of array" }
@@ -275,11 +275,11 @@ test_three_dim_char_array ()
p = new char [MAX / 8 - 2][2][2];
p = new char [MAX / 8 - 3][2][2];
- p = new char [MAX][MAX][MAX]; // { dg-error "size of array" }
- p = new char [MAX][MAX][MAX / 2]; // { dg-error "size of array" }
- p = new char [MAX][MAX / 2][MAX]; // { dg-error "size of array" }
- p = new char [MAX][MAX / 2][MAX / 2]; // { dg-error "size of array" }
- p = new char [MAX / 2][MAX / 2][MAX / 2]; // { dg-error "size of array" }
+ p = new char [MAX][MAX][MAX]; // { dg-error "size of unnamed array" }
+ p = new char [MAX][MAX][MAX / 2]; // { dg-error "size of unnamed array" }
+ p = new char [MAX][MAX / 2][MAX]; // { dg-error "size of unnamed array" }
+ p = new char [MAX][MAX / 2][MAX / 2]; // { dg-error "size of unnamed array" }
+ p = new char [MAX / 2][MAX / 2][MAX / 2]; // { dg-error "size of unnamed array" }
}
// Exercise new expression with N-dimensional arrays where N is
@@ -342,10 +342,10 @@ test_one_dim_byte_array (void *p)
static void __attribute__ ((used))
test_placement_two_dim_byte_struct_array (void *p)
{
- p = new (p) B [1][MAX]; // { dg-error "size of array" }
- p = new (p) B [1][MAX - 1]; // { dg-error "size of array" }
- p = new (p) B [1][MAX - 2]; // { dg-error "size of array" }
- p = new (p) B [1][MAX - 99]; // { dg-error "size of array" }
+ p = new (p) B [1][MAX]; // { dg-error "size of unnamed array" }
+ p = new (p) B [1][MAX - 1]; // { dg-error "size of unnamed array" }
+ p = new (p) B [1][MAX - 2]; // { dg-error "size of unnamed array" }
+ p = new (p) B [1][MAX - 99]; // { dg-error "size of unnamed array" }
p = new (p) B [1][MAX / 2]; // { dg-error "size of array" }
p = new (p) B [1][MAX / 2 - 1]; // { dg-error "size of array" }
p = new (p) B [1][MAX / 2 - 2]; // { dg-error "size of array" }
@@ -359,18 +359,18 @@ test_placement_two_dim_byte_struct_array (void *p)
p = new (p) B [1][MAX / 2 - 7]; // okay
p = new (p) B [1][MAX / 2 - 8]; // okay
- p = new (p) B [2][MAX]; // { dg-error "size of array" }
- p = new (p) B [2][MAX - 1]; // { dg-error "size of array" }
- p = new (p) B [2][MAX - 2]; // { dg-error "size of array" }
+ p = new (p) B [2][MAX]; // { dg-error "size of unnamed array" }
+ p = new (p) B [2][MAX - 1]; // { dg-error "size of unnamed array" }
+ p = new (p) B [2][MAX - 2]; // { dg-error "size of unnamed array" }
p = new (p) B [2][MAX / 2]; // { dg-error "size of array" }
p = new (p) B [2][MAX / 2 - 1]; // { dg-error "size of array" }
p = new (p) B [2][MAX / 2 - 2]; // { dg-error "size of array" }
p = new (p) B [2][MAX / 2 - 7]; // { dg-error "size of array" }
p = new (p) B [2][MAX / 2 - 8]; // { dg-error "size of array" }
- p = new (p) B [MAX][MAX]; // { dg-error "size of array" }
- p = new (p) B [MAX][MAX - 1]; // { dg-error "size of array" }
- p = new (p) B [MAX][MAX - 2]; // { dg-error "size of array" }
+ p = new (p) B [MAX][MAX]; // { dg-error "size of unnamed array" }
+ p = new (p) B [MAX][MAX - 1]; // { dg-error "size of unnamed array" }
+ p = new (p) B [MAX][MAX - 2]; // { dg-error "size of unnamed array" }
p = new (p) B [MAX][MAX / 2]; // { dg-error "size of array" }
p = new (p) B [MAX][MAX / 2 - 1]; // { dg-error "size of array" }
p = new (p) B [MAX][MAX / 2 - 2]; // { dg-error "size of array" }
@@ -397,10 +397,10 @@ test_placement_two_dim_byte_struct_array (void *p)
static __attribute__ ((used)) void
test_placement_three_dim_byte_struct_array (void *p)
{
- p = new (p) B [1][1][MAX]; // { dg-error "size of array" }
- p = new (p) B [1][1][MAX - 1]; // { dg-error "size of array" }
- p = new (p) B [1][1][MAX - 2]; // { dg-error "size of array" }
- p = new (p) B [1][1][MAX - 99]; // { dg-error "size of array" }
+ p = new (p) B [1][1][MAX]; // { dg-error "size of unnamed array" }
+ p = new (p) B [1][1][MAX - 1]; // { dg-error "size of unnamed array" }
+ p = new (p) B [1][1][MAX - 2]; // { dg-error "size of unnamed array" }
+ p = new (p) B [1][1][MAX - 99]; // { dg-error "size of unnamed array" }
p = new (p) B [1][1][MAX / 2]; // { dg-error "size of array" }
p = new (p) B [1][1][MAX / 2 - 1]; // { dg-error "size of array" }
p = new (p) B [1][1][MAX / 2 - 2]; // { dg-error "size of array" }
@@ -414,19 +414,19 @@ test_placement_three_dim_byte_struct_array (void *p)
p = new (p) B [1][1][MAX / 2 - 7]; // okay
p = new (p) B [1][1][MAX / 2 - 8]; // okay
- p = new (p) B [1][2][MAX]; // { dg-error "size of array" }
- p = new (p) B [1][2][MAX - 1]; // { dg-error "size of array" }
- p = new (p) B [1][2][MAX - 2]; // { dg-error "size of array" }
- p = new (p) B [1][2][MAX - 99]; // { dg-error "size of array" }
- p = new (p) B [1][2][MAX / 2]; // { dg-error "size of array" }
- p = new (p) B [1][2][MAX / 2 - 1]; // { dg-error "size of array" }
- p = new (p) B [1][2][MAX / 2 - 2]; // { dg-error "size of array" }
- p = new (p) B [1][2][MAX / 2 - 3]; // { dg-error "size of array" }
- p = new (p) B [1][2][MAX / 2 - 4]; // { dg-error "size of array" }
- p = new (p) B [1][2][MAX / 2 - 5]; // { dg-error "size of array" }
- p = new (p) B [1][2][MAX / 2 - 6]; // { dg-error "size of array" }
- p = new (p) B [1][2][MAX / 2 - 7]; // { dg-error "size of array" }
- p = new (p) B [1][2][MAX / 2 - 8]; // { dg-error "size of array" }
+ p = new (p) B [1][2][MAX]; // { dg-error "size of unnamed array" }
+ p = new (p) B [1][2][MAX - 1]; // { dg-error "size of unnamed array" }
+ p = new (p) B [1][2][MAX - 2]; // { dg-error "size of unnamed array" }
+ p = new (p) B [1][2][MAX - 99]; // { dg-error "size of unnamed array" }
+ p = new (p) B [1][2][MAX / 2]; // { dg-error "size of unnamed array" }
+ p = new (p) B [1][2][MAX / 2 - 1]; // { dg-error "size of unnamed array" }
+ p = new (p) B [1][2][MAX / 2 - 2]; // { dg-error "size of unnamed array" }
+ p = new (p) B [1][2][MAX / 2 - 3]; // { dg-error "size of unnamed array" }
+ p = new (p) B [1][2][MAX / 2 - 4]; // { dg-error "size of unnamed array" }
+ p = new (p) B [1][2][MAX / 2 - 5]; // { dg-error "size of unnamed array" }
+ p = new (p) B [1][2][MAX / 2 - 6]; // { dg-error "size of unnamed array" }
+ p = new (p) B [1][2][MAX / 2 - 7]; // { dg-error "size of unnamed array" }
+ p = new (p) B [1][2][MAX / 2 - 8]; // { dg-error "size of unnamed array" }
p = new (p) B [1][2][MAX / 4]; // { dg-error "size of array" }
// Avoid exercising data model-dependent expressions.
@@ -436,10 +436,10 @@ test_placement_three_dim_byte_struct_array (void *p)
p = new (p) B [1][2][MAX / 4 - 3]; // okay
p = new (p) B [1][2][MAX / 4 - 4]; // okay
- p = new (p) B [2][1][MAX]; // { dg-error "size of array" }
- p = new (p) B [2][1][MAX - 1]; // { dg-error "size of array" }
- p = new (p) B [2][1][MAX - 2]; // { dg-error "size of array" }
- p = new (p) B [2][1][MAX - 99]; // { dg-error "size of array" }
+ p = new (p) B [2][1][MAX]; // { dg-error "size of unnamed array" }
+ p = new (p) B [2][1][MAX - 1]; // { dg-error "size of unnamed array" }
+ p = new (p) B [2][1][MAX - 2]; // { dg-error "size of unnamed array" }
+ p = new (p) B [2][1][MAX - 99]; // { dg-error "size of unnamed array" }
p = new (p) B [2][1][MAX / 2]; // { dg-error "size of array" }
p = new (p) B [2][1][MAX / 2 - 1]; // { dg-error "size of array" }
p = new (p) B [2][1][MAX / 2 - 2]; // { dg-error "size of array" }
@@ -458,19 +458,19 @@ test_placement_three_dim_byte_struct_array (void *p)
p = new (p) B [2][1][MAX / 4 - 3]; // okay
p = new (p) B [2][1][MAX / 4 - 4]; // okay
- p = new (p) B [2][2][MAX]; // { dg-error "size of array" }
- p = new (p) B [2][2][MAX - 1]; // { dg-error "size of array" }
- p = new (p) B [2][2][MAX - 2]; // { dg-error "size of array" }
- p = new (p) B [2][2][MAX - 99]; // { dg-error "size of array" }
- p = new (p) B [2][2][MAX / 2]; // { dg-error "size of array" }
- p = new (p) B [2][2][MAX / 2 - 1]; // { dg-error "size of array" }
- p = new (p) B [2][2][MAX / 2 - 2]; // { dg-error "size of array" }
- p = new (p) B [2][2][MAX / 2 - 3]; // { dg-error "size of array" }
- p = new (p) B [2][2][MAX / 2 - 4]; // { dg-error "size of array" }
- p = new (p) B [2][2][MAX / 2 - 5]; // { dg-error "size of array" }
- p = new (p) B [2][2][MAX / 2 - 6]; // { dg-error "size of array" }
- p = new (p) B [2][2][MAX / 2 - 7]; // { dg-error "size of array" }
- p = new (p) B [2][2][MAX / 2 - 8]; // { dg-error "size of array" }
+ p = new (p) B [2][2][MAX]; // { dg-error "size of unnamed array" }
+ p = new (p) B [2][2][MAX - 1]; // { dg-error "size of unnamed array" }
+ p = new (p) B [2][2][MAX - 2]; // { dg-error "size of unnamed array" }
+ p = new (p) B [2][2][MAX - 99]; // { dg-error "size of unnamed array" }
+ p = new (p) B [2][2][MAX / 2]; // { dg-error "size of unnamed array" }
+ p = new (p) B [2][2][MAX / 2 - 1]; // { dg-error "size of unnamed array" }
+ p = new (p) B [2][2][MAX / 2 - 2]; // { dg-error "size of unnamed array" }
+ p = new (p) B [2][2][MAX / 2 - 3]; // { dg-error "size of unnamed array" }
+ p = new (p) B [2][2][MAX / 2 - 4]; // { dg-error "size of unnamed array" }
+ p = new (p) B [2][2][MAX / 2 - 5]; // { dg-error "size of unnamed array" }
+ p = new (p) B [2][2][MAX / 2 - 6]; // { dg-error "size of unnamed array" }
+ p = new (p) B [2][2][MAX / 2 - 7]; // { dg-error "size of unnamed array" }
+ p = new (p) B [2][2][MAX / 2 - 8]; // { dg-error "size of unnamed array" }
p = new (p) B [2][2][MAX / 4]; // { dg-error "size of array" }
p = new (p) B [2][2][MAX / 4 - 1]; // { dg-error "size of array" }
p = new (p) B [2][2][MAX / 4 - 2]; // { dg-error "size of array" }
@@ -482,19 +482,19 @@ test_placement_three_dim_byte_struct_array (void *p)
p = new (p) B [2][2][MAX / 8 - 2];
p = new (p) B [2][2][MAX / 8 - 3];
- p = new (p) B [2][MAX][2]; // { dg-error "size of array" }
- p = new (p) B [2][MAX - 1][2]; // { dg-error "size of array" }
- p = new (p) B [2][MAX - 2][2]; // { dg-error "size of array" }
- p = new (p) B [2][MAX - 99][2]; // { dg-error "size of array" }
- p = new (p) B [2][MAX / 2][2]; // { dg-error "size of array" }
- p = new (p) B [2][MAX / 2 - 1][2]; // { dg-error "size of array" }
- p = new (p) B [2][MAX / 2 - 2][2]; // { dg-error "size of array" }
- p = new (p) B [2][MAX / 2 - 3][2]; // { dg-error "size of array" }
- p = new (p) B [2][MAX / 2 - 4][2]; // { dg-error "size of array" }
- p = new (p) B [2][MAX / 2 - 5][2]; // { dg-error "size of array" }
- p = new (p) B [2][MAX / 2 - 6][2]; // { dg-error "size of array" }
- p = new (p) B [2][MAX / 2 - 7][2]; // { dg-error "size of array" }
- p = new (p) B [2][MAX / 2 - 8][2]; // { dg-error "size of array" }
+ p = new (p) B [2][MAX][2]; // { dg-error "size of unnamed array" }
+ p = new (p) B [2][MAX - 1][2]; // { dg-error "size of unnamed array" }
+ p = new (p) B [2][MAX - 2][2]; // { dg-error "size of unnamed array" }
+ p = new (p) B [2][MAX - 99][2]; // { dg-error "size of unnamed array" }
+ p = new (p) B [2][MAX / 2][2]; // { dg-error "size of unnamed array" }
+ p = new (p) B [2][MAX / 2 - 1][2]; // { dg-error "size of unnamed array" }
+ p = new (p) B [2][MAX / 2 - 2][2]; // { dg-error "size of unnamed array" }
+ p = new (p) B [2][MAX / 2 - 3][2]; // { dg-error "size of unnamed array" }
+ p = new (p) B [2][MAX / 2 - 4][2]; // { dg-error "size of unnamed array" }
+ p = new (p) B [2][MAX / 2 - 5][2]; // { dg-error "size of unnamed array" }
+ p = new (p) B [2][MAX / 2 - 6][2]; // { dg-error "size of unnamed array" }
+ p = new (p) B [2][MAX / 2 - 7][2]; // { dg-error "size of unnamed array" }
+ p = new (p) B [2][MAX / 2 - 8][2]; // { dg-error "size of unnamed array" }
p = new (p) B [2][MAX / 4][2]; // { dg-error "size of array" }
p = new (p) B [2][MAX / 4 - 1][2]; // { dg-error "size of array" }
p = new (p) B [2][MAX / 4 - 2][2]; // { dg-error "size of array" }
diff --git a/gcc/testsuite/g++.dg/template/explicit-instantiation4.C b/gcc/testsuite/g++.dg/template/explicit-instantiation4.C
new file mode 100644
index 00000000000..72417b43ed0
--- /dev/null
+++ b/gcc/testsuite/g++.dg/template/explicit-instantiation4.C
@@ -0,0 +1,7 @@
+void f();
+
+namespace A {
+ template <class T> void f(T) { }
+ using ::f;
+ template void f(int);
+}
diff --git a/gcc/testsuite/g++.dg/vect/simd-bool-comparison-1.cc b/gcc/testsuite/g++.dg/vect/simd-bool-comparison-1.cc
new file mode 100644
index 00000000000..a08362f4591
--- /dev/null
+++ b/gcc/testsuite/g++.dg/vect/simd-bool-comparison-1.cc
@@ -0,0 +1,21 @@
+// { dg-do compile }
+// { dg-additional-options "-mavx512bw -mavx512dq" { target { i?86-*-* x86_64-*-* } } }
+
+#define N 1024
+
+double a[N];
+bool b[N];
+bool c;
+
+void test ()
+{
+ int i;
+
+ for (i = 0; i < N; i++)
+ if (b[i] != c)
+ a[i] = 0.0;
+ else
+ a[i] = 1.0;
+}
+
+// { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { target { i?86-*-* x86_64-*-* } } } }
diff --git a/gcc/testsuite/g++.dg/vect/simd-bool-comparison-2.cc b/gcc/testsuite/g++.dg/vect/simd-bool-comparison-2.cc
new file mode 100644
index 00000000000..4accf56b200
--- /dev/null
+++ b/gcc/testsuite/g++.dg/vect/simd-bool-comparison-2.cc
@@ -0,0 +1,20 @@
+// { dg-do compile }
+// { dg-additional-options "-mavx512bw -mavx512dq" { target { i?86-*-* x86_64-*-* } } }
+
+#define N 1024
+
+double a[N];
+bool b[N];
+char c[N];
+
+void test ()
+{
+ int i;
+
+ #pragma omp simd
+ for (i = 0; i < N; i++)
+ if ((c[i] > 0) && b[i])
+ a[i] = 0.0;
+ else
+ a[i] = 1.0;
+}
diff --git a/gcc/testsuite/g++.dg/vect/simd-mask-store-bool.cc b/gcc/testsuite/g++.dg/vect/simd-mask-store-bool.cc
new file mode 100644
index 00000000000..c5f0458ea75
--- /dev/null
+++ b/gcc/testsuite/g++.dg/vect/simd-mask-store-bool.cc
@@ -0,0 +1,18 @@
+/* { dg-do compile } */
+/* { dg-require-effective-target vect_condition } */
+/* { dg-additional-options "-mavx512bw" { target { i?86-*-* x86_64-*-* } } } */
+
+#define N 1024
+
+int a[N], b[N], c[N];
+bool d[N];
+
+void
+test (void)
+{
+ int i;
+#pragma omp simd safelen(64)
+ for (i = 0; i < N; i++)
+ if (a[i] > 0)
+ d[i] = b[i] > c[i];
+}
diff --git a/gcc/testsuite/gcc.dg/diagnostic-token-ranges.c b/gcc/testsuite/gcc.dg/diagnostic-token-ranges.c
new file mode 100644
index 00000000000..ac969e30d94
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/diagnostic-token-ranges.c
@@ -0,0 +1,120 @@
+/* { dg-options "-fdiagnostics-show-caret -Wc++-compat" } */
+
+/* Verify that various diagnostics show source code ranges. */
+
+/* These ones merely use token ranges; they don't use tree ranges. */
+
+void undeclared_identifier (void)
+{
+ name; /* { dg-error "'name' undeclared" } */
+/*
+{ dg-begin-multiline-output "" }
+ name;
+ ^~~~
+{ dg-end-multiline-output "" }
+*/
+}
+
+void unknown_type_name (void)
+{
+ foo bar; /* { dg-error "unknown type name 'foo'" } */
+/*
+{ dg-begin-multiline-output "" }
+ foo bar;
+ ^~~
+{ dg-end-multiline-output "" }
+*/
+
+ qux *baz; /* { dg-error "unknown type name 'qux'" } */
+/*
+{ dg-begin-multiline-output "" }
+ qux *baz;
+ ^~~
+{ dg-end-multiline-output "" }
+*/
+}
+
+void test_identifier_conflicts_with_cplusplus (void)
+{
+ int new; /* { dg-warning "identifier 'new' conflicts with" } */
+/*
+{ dg-begin-multiline-output "" }
+ int new;
+ ^~~
+{ dg-end-multiline-output "" }
+*/
+}
+
+extern void
+bogus_varargs (...); /* { dg-error "ISO C requires a named argument before '...'" } */
+/*
+{ dg-begin-multiline-output "" }
+ bogus_varargs (...);
+ ^~~
+{ dg-end-multiline-output "" }
+*/
+
+extern void
+foo (unknown_type param); /* { dg-error "unknown type name 'unknown_type'" } */
+/*
+{ dg-begin-multiline-output "" }
+ foo (unknown_type param);
+ ^~~~~~~~~~~~
+{ dg-end-multiline-output "" }
+*/
+
+void wide_string_literal_in_asm (void)
+{
+ asm (L"nop"); /* { dg-error "wide string literal in 'asm'" } */
+/*
+{ dg-begin-multiline-output "" }
+ asm (L"nop");
+ ^~~~~~
+{ dg-end-multiline-output "" }
+*/
+}
+
+void break_and_continue_in_wrong_places (void)
+{
+ if (0)
+ break; /* { dg-error "break statement not within loop or switch" } */
+/* { dg-begin-multiline-output "" }
+ break;
+ ^~~~~
+ { dg-end-multiline-output "" } */
+
+ if (1)
+ ;
+ else
+ continue; /* { dg-error "continue statement not within a loop" } */
+/* { dg-begin-multiline-output "" }
+ continue;
+ ^~~~~~~~
+ { dg-end-multiline-output "" } */
+}
+
+/* Various examples of bad type decls. */
+
+int float bogus; /* { dg-error "two or more data types in declaration specifiers" } */
+/* { dg-begin-multiline-output "" }
+ int float bogus;
+ ^~~~~
+ { dg-end-multiline-output "" } */
+
+long long long bogus2; /* { dg-error "'long long long' is too long for GCC" } */
+/* { dg-begin-multiline-output "" }
+ long long long bogus2;
+ ^~~~
+ { dg-end-multiline-output "" } */
+
+long short bogus3; /* { dg-error "both 'long' and 'short' in declaration specifiers" } */
+/* { dg-begin-multiline-output "" }
+ long short bogus3;
+ ^~~~~
+ { dg-end-multiline-output "" } */
+
+signed unsigned bogus4; /* { dg-error "both 'signed' and 'unsigned' in declaration specifiers" } */
+/* { dg-begin-multiline-output "" }
+ signed unsigned bogus4;
+ ^~~~~~~~
+ { dg-end-multiline-output "" } */
diff --git a/gcc/testsuite/gcc.dg/diagnostic-tree-expr-ranges-2.c b/gcc/testsuite/gcc.dg/diagnostic-tree-expr-ranges-2.c
new file mode 100644
index 00000000000..302e233a04a
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/diagnostic-tree-expr-ranges-2.c
@@ -0,0 +1,23 @@
+/* { dg-do compile } */
+/* { dg-options "-Wuninitialized -fdiagnostics-show-caret" } */
+
+int test_uninit_1 (void)
+{
+ int result;
+ return result; /* { dg-warning "uninitialized" } */
+/* { dg-begin-multiline-output "" }
+ return result;
+ ^~~~~~
+ { dg-end-multiline-output "" } */
+}
+
+int test_uninit_2 (void)
+{
+ int result;
+ result += 3; /* { dg-warning "uninitialized" } */
+/* { dg-begin-multiline-output "" }
+ result += 3;
+ ~~~~~~~^~~~
+ { dg-end-multiline-output "" } */
+ return result;
+}
diff --git a/gcc/testsuite/gcc.dg/goacc/nvptx-merged-loop.c b/gcc/testsuite/gcc.dg/goacc/nvptx-merged-loop.c
new file mode 100644
index 00000000000..3ff537c1d97
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/goacc/nvptx-merged-loop.c
@@ -0,0 +1,30 @@
+/* { dg-do link } */
+/* { dg-require-effective-target offload_nvptx } */
+/* { dg-options "-fopenacc -O2 -foffload=-fdump-rtl-mach\\ -dumpbase\\ nvptx-merged-loop.c\\ -Wa,--no-verify" } */
+
+#define N (32*32*32+17)
+void __attribute__ ((noinline)) Foo (int *ary)
+{
+ int ix;
+
+#pragma acc parallel num_workers(32) vector_length(32) copyout(ary[0:N])
+ {
+ /* Loop partitioning should be merged. */
+#pragma acc loop worker vector
+ for (unsigned ix = 0; ix < N; ix++)
+ {
+ ary[ix] = ix;
+ }
+ }
+}
+
+int main ()
+{
+ int ary[N];
+
+ Foo (ary);
+
+ return 0;
+}
+
+/* { dg-final { scan-rtl-dump "Merging loop .* into " "mach" } } */
diff --git a/gcc/testsuite/gcc.dg/graphite/fuse-1.c b/gcc/testsuite/gcc.dg/graphite/fuse-1.c
index c9bb67debe1..249276c08ab 100644
--- a/gcc/testsuite/gcc.dg/graphite/fuse-1.c
+++ b/gcc/testsuite/gcc.dg/graphite/fuse-1.c
@@ -1,7 +1,6 @@
/* Check that the two loops are fused and that we manage to fold the two xor
operations. */
-/* { dg-options "-O2 -floop-nest-optimize -fdump-tree-forwprop-all" } */
-/* { dg-do run } */
+/* { dg-options "-O2 -floop-nest-optimize -fdump-tree-forwprop-all -fdump-tree-graphite-all" } */
/* Make sure we fuse the loops like this:
ISL AST generated by ISL:
@@ -9,15 +8,12 @@ for (int c0 = 0; c0 <= 99; c0 += 1) {
S_3(c0);
S_6(c0);
S_9(c0);
-}
-*/
-/* { dg-final { scan-tree-dump-times "ISL AST generated by ISL:.*for (int c0 = 0; c0 <= 99; c0 += 1) \{.*S_.*(c0);.*S_.*(c0);.*S_.*(c0);.*\}" 1 "graphite" } } */
+} */
+/* { dg-final { scan-tree-dump-times "ISL AST generated by ISL:.*for \\(int c0 = 0; c0 <= 99; c0 \\+= 1\\) \\{.*S_.*\\(c0\\);.*S_.*\\(c0\\);.*S_.*\\(c0\\);.*\\}" 1 "graphite" } } */
/* Check that after fusing the loops, the scalar computation is also fused. */
/* { dg-final { scan-tree-dump-times "gimple_simplified to\[^\\n\]*\\^ 12" 1 "forwprop4" } } */
-
-
#define MAX 100
int A[MAX];
diff --git a/gcc/testsuite/gcc.dg/graphite/fuse-2.c b/gcc/testsuite/gcc.dg/graphite/fuse-2.c
index aaa5e2f8c36..2f27c66fd32 100644
--- a/gcc/testsuite/gcc.dg/graphite/fuse-2.c
+++ b/gcc/testsuite/gcc.dg/graphite/fuse-2.c
@@ -1,6 +1,4 @@
/* Check that the three loops are fused. */
-/* { dg-options "-O2 -floop-nest-optimize" } */
-/* { dg-do run } */
/* Make sure we fuse the loops like this:
ISL AST generated by ISL:
@@ -11,7 +9,7 @@ for (int c0 = 0; c0 <= 99; c0 += 1) {
}
*/
-/* { dg-final { scan-tree-dump-times "ISL AST generated by ISL:.*for (int c0 = 0; c0 <= 99; c0 += 1) \{.*S_.*(c0);.*S_.*(c0);.*S_.*(c0);.*\}" 1 "graphite" } } */
+/* { dg-final { scan-tree-dump-times "ISL AST generated by ISL:.*for \\(int c0 = 0; c0 <= 99; c0 \\+= 1\\) \\{.*S_.*\\(c0\\);.*S_.*\\(c0\\);.*S_.*\\(c0\\);.*\\}" 1 "graphite" } } */
#define MAX 100
int A[MAX], B[MAX], C[MAX];
diff --git a/gcc/testsuite/gcc.dg/graphite/graphite.exp b/gcc/testsuite/gcc.dg/graphite/graphite.exp
index f2d1417d87e..8e1a2299a23 100644
--- a/gcc/testsuite/gcc.dg/graphite/graphite.exp
+++ b/gcc/testsuite/gcc.dg/graphite/graphite.exp
@@ -43,6 +43,8 @@ set id_files [lsort [glob -nocomplain $srcdir/$subdir/id-*.c ] ]
set run_id_files [lsort [glob -nocomplain $srcdir/$subdir/run-id-*.c ] ]
set opt_files [lsort [glob -nocomplain $srcdir/$subdir/interchange-*.c \
$srcdir/$subdir/uns-interchange-*.c \
+ $srcdir/$subdir/isl-ast-gen-*.c \
+ $srcdir/$subdir/fuse-*.c \
$srcdir/$subdir/block-*.c \
$srcdir/$subdir/uns-block-*.c ] ]
set vect_files [lsort [glob -nocomplain $srcdir/$subdir/vect-*.c ] ]
diff --git a/gcc/testsuite/gcc.dg/graphite/isl-ast-gen-blocks-1.c b/gcc/testsuite/gcc.dg/graphite/isl-ast-gen-blocks-1.c
index 6146b18fc03..cd67d87534e 100644
--- a/gcc/testsuite/gcc.dg/graphite/isl-ast-gen-blocks-1.c
+++ b/gcc/testsuite/gcc.dg/graphite/isl-ast-gen-blocks-1.c
@@ -1,6 +1,3 @@
-/* { dg-do run } */
-/* { dg-options "-O2 -fgraphite-identity" } */
-
int n = 50;
static int __attribute__((noinline))
foo ()
diff --git a/gcc/testsuite/gcc.dg/graphite/isl-ast-gen-blocks-2.c b/gcc/testsuite/gcc.dg/graphite/isl-ast-gen-blocks-2.c
index 42ff30a5c58..d97a8ab20d5 100644
--- a/gcc/testsuite/gcc.dg/graphite/isl-ast-gen-blocks-2.c
+++ b/gcc/testsuite/gcc.dg/graphite/isl-ast-gen-blocks-2.c
@@ -1,6 +1,3 @@
-/* { dg-do run } */
-/* { dg-options "-O2 -fgraphite-identity" } */
-
int k = 50;
static int __attribute__((noinline))
foo ()
diff --git a/gcc/testsuite/gcc.dg/graphite/isl-ast-gen-blocks-3.c b/gcc/testsuite/gcc.dg/graphite/isl-ast-gen-blocks-3.c
index 771d337bdde..9c5223c5d73 100644
--- a/gcc/testsuite/gcc.dg/graphite/isl-ast-gen-blocks-3.c
+++ b/gcc/testsuite/gcc.dg/graphite/isl-ast-gen-blocks-3.c
@@ -1,6 +1,3 @@
-/* { dg-do run } */
-/* { dg-options "-O2 -fgraphite-identity" } */
-
/* We use a global variable 'k' to avoid ipa-cp. */
int k = 50;
static int __attribute__((noinline))
diff --git a/gcc/testsuite/gcc.dg/graphite/isl-ast-gen-blocks-4.c b/gcc/testsuite/gcc.dg/graphite/isl-ast-gen-blocks-4.c
index 803eea732bf..45ecad5d6e9 100644
--- a/gcc/testsuite/gcc.dg/graphite/isl-ast-gen-blocks-4.c
+++ b/gcc/testsuite/gcc.dg/graphite/isl-ast-gen-blocks-4.c
@@ -1,6 +1,3 @@
-/* { dg-do run } */
-/* { dg-options "-O2 -fgraphite-identity" } */
-
static int __attribute__((noinline))
foo (int k, int n1, int n2, int n3)
{
diff --git a/gcc/testsuite/gcc.dg/graphite/isl-ast-gen-if-1.c b/gcc/testsuite/gcc.dg/graphite/isl-ast-gen-if-1.c
index 2b05c7bb57d..a0eb24216db 100644
--- a/gcc/testsuite/gcc.dg/graphite/isl-ast-gen-if-1.c
+++ b/gcc/testsuite/gcc.dg/graphite/isl-ast-gen-if-1.c
@@ -1,6 +1,3 @@
-/* { dg-do run } */
-/* { dg-options "-O2 -fgraphite-identity" } */
-
int st = 1;
static void __attribute__((noinline))
foo (int a[], int n)
diff --git a/gcc/testsuite/gcc.dg/graphite/isl-ast-gen-if-2.c b/gcc/testsuite/gcc.dg/graphite/isl-ast-gen-if-2.c
index 90111e70a1a..27e7fa42c6b 100644
--- a/gcc/testsuite/gcc.dg/graphite/isl-ast-gen-if-2.c
+++ b/gcc/testsuite/gcc.dg/graphite/isl-ast-gen-if-2.c
@@ -1,6 +1,3 @@
-/* { dg-do run } */
-/* { dg-options "-O2 -fgraphite-identity" } */
-
/* This test case tests reduction, where the pbbs are duplicated. */
static int __attribute__((noinline))
diff --git a/gcc/testsuite/gcc.dg/graphite/isl-ast-gen-single-loop-1.c b/gcc/testsuite/gcc.dg/graphite/isl-ast-gen-single-loop-1.c
index 754452be00c..6c141a1b232 100644
--- a/gcc/testsuite/gcc.dg/graphite/isl-ast-gen-single-loop-1.c
+++ b/gcc/testsuite/gcc.dg/graphite/isl-ast-gen-single-loop-1.c
@@ -1,6 +1,3 @@
-/* { dg-do run } */
-/* { dg-options "-O2 -fgraphite-identity" } */
-
int
foo ()
{
diff --git a/gcc/testsuite/gcc.dg/graphite/isl-ast-gen-single-loop-2.c b/gcc/testsuite/gcc.dg/graphite/isl-ast-gen-single-loop-2.c
index 04c7dbaf017..d37a49388b2 100644
--- a/gcc/testsuite/gcc.dg/graphite/isl-ast-gen-single-loop-2.c
+++ b/gcc/testsuite/gcc.dg/graphite/isl-ast-gen-single-loop-2.c
@@ -1,5 +1,3 @@
-/* { dg-do run } */
-/* { dg-options "-O2 -fgraphite-identity" } */
int n = 50;
void
diff --git a/gcc/testsuite/gcc.dg/graphite/isl-ast-gen-single-loop-3.c b/gcc/testsuite/gcc.dg/graphite/isl-ast-gen-single-loop-3.c
index 204acd3955b..d96f99fe52d 100644
--- a/gcc/testsuite/gcc.dg/graphite/isl-ast-gen-single-loop-3.c
+++ b/gcc/testsuite/gcc.dg/graphite/isl-ast-gen-single-loop-3.c
@@ -1,5 +1,3 @@
-/* { dg-do run } */
-/* { dg-options "-O2 -fgraphite-identity" } */
int n = 50;
void
diff --git a/gcc/testsuite/gcc.dg/graphite/isl-ast-gen-user-1.c b/gcc/testsuite/gcc.dg/graphite/isl-ast-gen-user-1.c
index 760c1a2f283..8f246d8e6a4 100644
--- a/gcc/testsuite/gcc.dg/graphite/isl-ast-gen-user-1.c
+++ b/gcc/testsuite/gcc.dg/graphite/isl-ast-gen-user-1.c
@@ -1,14 +1,10 @@
-/* { dg-do compile } */
-/* { dg-options "-O2 -fgraphite-identity" } */
-
-#include <stdio.h>
-#include <stdlib.h>
-
static const int N = 12;
+int nSlip;
-void Crystal_Cholesky (int nSlip, int a[N][N])
+int main ()
{
int i, j, k, fdot = 0;
+ int a[N][N];
for ( i = 1; i < nSlip; i++)
{
@@ -19,6 +15,8 @@ void Crystal_Cholesky (int nSlip, int a[N][N])
a[i][j] = a[i][j] - fdot;
}
}
+
+ return 0;
}
diff --git a/gcc/testsuite/gcc.dg/graphite/isl-codegen-loop-dumping.c b/gcc/testsuite/gcc.dg/graphite/isl-codegen-loop-dumping.c
deleted file mode 100644
index 70ac24c46d7..00000000000
--- a/gcc/testsuite/gcc.dg/graphite/isl-codegen-loop-dumping.c
+++ /dev/null
@@ -1,17 +0,0 @@
-/* { dg-options "-O2 -fgraphite-identity -fdump-tree-graphite-all" } */
-
-int
-main (int n, int *a)
-{
- int i, j;
-
- for (i = 0; i < n - 1; i++)
- for (j = 0; j < n; j++)
- a[j] = i + n;
-
- return 0;
-}
-
-/* { dg-final { scan-tree-dump-times "ISL AST generated by ISL: \n\\{\n S_2\\();\n if \\(P_19 >= 1\\)\n
- for \\(int c1 = 0; c1 < n - 1; c1 \\+= 1\\) \\{ \n for \\(int c3 = 0; c3 < n; c3 \\+= 1\\)\n
- S_4\\(c1, c3\\); \n S_6\\(c1\\);\n \\} \n\\}" 1 "graphite"} } */
diff --git a/gcc/testsuite/gcc.dg/plugin/diagnostic-test-expressions-1.c b/gcc/testsuite/gcc.dg/plugin/diagnostic-test-expressions-1.c
new file mode 100644
index 00000000000..5485aafec01
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/plugin/diagnostic-test-expressions-1.c
@@ -0,0 +1,422 @@
+/* { dg-do compile } */
+/* { dg-options "-O -fdiagnostics-show-caret" } */
+
+/* This is a collection of unittests to verify that we're correctly
+ capturing the source code ranges of various kinds of expression.
+
+ It uses the various "diagnostic_test_*_expression_range_plugin"
+ plugins which handles "__emit_expression_range" by generating a warning
+ at the given source range of the input argument. Each of the
+ different plugins do this at a different phase of the internal
+ representation (tree, gimple, etc), so we can verify that the
+ source code range information is valid at each phase.
+
+ We want to accept an expression of any type. To do this in C, we
+ use variadic arguments, but C requires at least one argument before
+ the ellipsis, so we have a dummy one. */
+
+extern void __emit_expression_range (int dummy, ...);
+
+int global;
+
+void test_parentheses (int a, int b)
+{
+ __emit_expression_range (0, (a + b) ); /* { dg-warning "range" } */
+/* { dg-begin-multiline-output "" }
+ __emit_expression_range (0, (a + b) );
+ ~~~^~~~
+ { dg-end-multiline-output "" } */
+
+ __emit_expression_range (0, (a + b) * (a - b) ); /* { dg-warning "range" } */
+/* { dg-begin-multiline-output "" }
+ __emit_expression_range (0, (a + b) * (a - b) );
+ ~~~~~~~~^~~~~~~~~
+ { dg-end-multiline-output "" } */
+
+ __emit_expression_range (0, !(a && b) ); /* { dg-warning "range" } */
+/* { dg-begin-multiline-output "" }
+ __emit_expression_range (0, !(a && b) );
+ ^~~~~~~~~
+ { dg-end-multiline-output "" } */
+}
+
+/* Postfix expressions. ************************************************/
+
+void test_array_reference (int *arr)
+{
+ __emit_expression_range (0, arr[100] ); /* { dg-warning "range" } */
+/* { dg-begin-multiline-output "" }
+ __emit_expression_range (0, arr[100] );
+ ~~~^~~~~
+ { dg-end-multiline-output "" } */
+}
+
+int test_function_call (int p, int q, int r)
+{
+ __emit_expression_range (0, test_function_call (p, q, r) ); /* { dg-warning "range" } */
+/* { dg-begin-multiline-output "" }
+ __emit_expression_range (0, test_function_call (p, q, r) );
+ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ { dg-end-multiline-output "" } */
+ return 0;
+}
+
+struct test_struct
+{
+ int field;
+};
+
+int test_structure_references (struct test_struct *ptr)
+{
+ struct test_struct local;
+ local.field = 42;
+
+ __emit_expression_range (0, local.field ); /* { dg-warning "range" } */
+/* { dg-begin-multiline-output "" }
+ __emit_expression_range (0, local.field );
+ ~~~~~^~~~~~
+ { dg-end-multiline-output "" } */
+
+ __emit_expression_range (0, ptr->field ); /* { dg-warning "range" } */
+/* { dg-begin-multiline-output "" }
+ __emit_expression_range (0, ptr->field );
+ ~~~^~~~~~~
+ { dg-end-multiline-output "" } */
+}
+
+int test_postfix_incdec (int i)
+{
+ __emit_expression_range (0, i++ ); /* { dg-warning "range" } */
+/* { dg-begin-multiline-output "" }
+ __emit_expression_range (0, i++ );
+ ~^~
+ { dg-end-multiline-output "" } */
+
+ __emit_expression_range (0, i-- ); /* { dg-warning "range" } */
+/* { dg-begin-multiline-output "" }
+ __emit_expression_range (0, i-- );
+ ~^~
+ { dg-end-multiline-output "" } */
+}
+
+/* Unary operators. ****************************************************/
+
+int test_prefix_incdec (int i)
+{
+ __emit_expression_range (0, ++i ); /* { dg-warning "range" } */
+/* { dg-begin-multiline-output "" }
+ __emit_expression_range (0, ++i );
+ ^~~
+ { dg-end-multiline-output "" } */
+
+ __emit_expression_range (0, --i ); /* { dg-warning "range" } */
+/* { dg-begin-multiline-output "" }
+ __emit_expression_range (0, --i );
+ ^~~
+ { dg-end-multiline-output "" } */
+}
+
+void test_address_operator (void)
+{
+ __emit_expression_range (0, &global ); /* { dg-warning "range" } */
+/* { dg-begin-multiline-output "" }
+ __emit_expression_range (0, &global );
+ ^~~~~~~
+ { dg-end-multiline-output "" } */
+}
+
+void test_indirection (int *ptr)
+{
+ __emit_expression_range (0, *ptr ); /* { dg-warning "range" } */
+/* { dg-begin-multiline-output "" }
+ __emit_expression_range (0, *ptr );
+ ^~~~
+ { dg-end-multiline-output "" } */
+}
+
+void test_unary_minus (int i)
+{
+ __emit_expression_range (0, -i ); /* { dg-warning "range" } */
+/* { dg-begin-multiline-output "" }
+ __emit_expression_range (0, -i );
+ ^~
+ { dg-end-multiline-output "" } */
+}
+
+void test_ones_complement (int i)
+{
+ __emit_expression_range (0, ~i ); /* { dg-warning "range" } */
+/* { dg-begin-multiline-output "" }
+ __emit_expression_range (0, ~i );
+ ^~
+ { dg-end-multiline-output "" } */
+}
+
+void test_logical_negation (int flag)
+{
+ __emit_expression_range (0, !flag ); /* { dg-warning "range" } */
+/* { dg-begin-multiline-output "" }
+ __emit_expression_range (0, !flag );
+ ^~~~~
+ { dg-end-multiline-output "" } */
+}
+
+/* Casts. ****************************************************/
+
+void test_cast (void *ptr)
+{
+ __emit_expression_range (0, (int *)ptr ); /* { dg-warning "range" } */
+/* { dg-begin-multiline-output "" }
+ __emit_expression_range (0, (int *)ptr );
+ ^~~~~~~~~~
+ { dg-end-multiline-output "" } */
+
+}
+
+/* Binary operators. *******************************************/
+
+void test_multiplicative_operators (int lhs, int rhs)
+{
+ __emit_expression_range (0, lhs * rhs ); /* { dg-warning "range" } */
+/* { dg-begin-multiline-output "" }
+ __emit_expression_range (0, lhs * rhs );
+ ~~~~^~~~~
+ { dg-end-multiline-output "" } */
+
+ __emit_expression_range (0, lhs / rhs ); /* { dg-warning "range" } */
+/* { dg-begin-multiline-output "" }
+ __emit_expression_range (0, lhs / rhs );
+ ~~~~^~~~~
+ { dg-end-multiline-output "" } */
+
+ __emit_expression_range (0, lhs % rhs ); /* { dg-warning "range" } */
+/* { dg-begin-multiline-output "" }
+ __emit_expression_range (0, lhs % rhs );
+ ~~~~^~~~~
+ { dg-end-multiline-output "" } */
+}
+
+void test_additive_operators (int lhs, int rhs)
+{
+ __emit_expression_range (0, lhs + rhs ); /* { dg-warning "range" } */
+/* { dg-begin-multiline-output "" }
+ __emit_expression_range (0, lhs + rhs );
+ ~~~~^~~~~
+ { dg-end-multiline-output "" } */
+
+ __emit_expression_range (0, lhs - rhs ); /* { dg-warning "range" } */
+/* { dg-begin-multiline-output "" }
+ __emit_expression_range (0, lhs - rhs );
+ ~~~~^~~~~
+ { dg-end-multiline-output "" } */
+}
+
+void test_shift_operators (int lhs, int rhs)
+{
+ __emit_expression_range (0, lhs << rhs ); /* { dg-warning "range" } */
+/* { dg-begin-multiline-output "" }
+ __emit_expression_range (0, lhs << rhs );
+ ~~~~^~~~~~
+ { dg-end-multiline-output "" } */
+
+ __emit_expression_range (0, lhs >> rhs ); /* { dg-warning "range" } */
+/* { dg-begin-multiline-output "" }
+ __emit_expression_range (0, lhs >> rhs );
+ ~~~~^~~~~~
+ { dg-end-multiline-output "" } */
+}
+
+void test_relational_operators (int lhs, int rhs)
+{
+ __emit_expression_range (0, lhs < rhs ); /* { dg-warning "range" } */
+/* { dg-begin-multiline-output "" }
+ __emit_expression_range (0, lhs < rhs );
+ ~~~~^~~~~
+ { dg-end-multiline-output "" } */
+
+ __emit_expression_range (0, lhs > rhs ); /* { dg-warning "range" } */
+/* { dg-begin-multiline-output "" }
+ __emit_expression_range (0, lhs > rhs );
+ ~~~~^~~~~
+ { dg-end-multiline-output "" } */
+
+ __emit_expression_range (0, lhs <= rhs ); /* { dg-warning "range" } */
+/* { dg-begin-multiline-output "" }
+ __emit_expression_range (0, lhs <= rhs );
+ ~~~~^~~~~~
+ { dg-end-multiline-output "" } */
+
+ __emit_expression_range (0, lhs >= rhs ); /* { dg-warning "range" } */
+/* { dg-begin-multiline-output "" }
+ __emit_expression_range (0, lhs >= rhs );
+ ~~~~^~~~~~
+ { dg-end-multiline-output "" } */
+}
+
+void test_equality_operators (int lhs, int rhs)
+{
+ __emit_expression_range (0, lhs == rhs ); /* { dg-warning "range" } */
+/* { dg-begin-multiline-output "" }
+ __emit_expression_range (0, lhs == rhs );
+ ~~~~^~~~~~
+ { dg-end-multiline-output "" } */
+
+ __emit_expression_range (0, lhs != rhs ); /* { dg-warning "range" } */
+/* { dg-begin-multiline-output "" }
+ __emit_expression_range (0, lhs != rhs );
+ ~~~~^~~~~~
+ { dg-end-multiline-output "" } */
+}
+
+void test_bitwise_binary_operators (int lhs, int rhs)
+{
+ __emit_expression_range (0, lhs & rhs ); /* { dg-warning "range" } */
+/* { dg-begin-multiline-output "" }
+ __emit_expression_range (0, lhs & rhs );
+ ~~~~^~~~~
+ { dg-end-multiline-output "" } */
+
+ __emit_expression_range (0, lhs ^ rhs ); /* { dg-warning "range" } */
+/* { dg-begin-multiline-output "" }
+ __emit_expression_range (0, lhs ^ rhs );
+ ~~~~^~~~~
+ { dg-end-multiline-output "" } */
+
+ __emit_expression_range (0, lhs | rhs ); /* { dg-warning "range" } */
+/* { dg-begin-multiline-output "" }
+ __emit_expression_range (0, lhs | rhs );
+ ~~~~^~~~~
+ { dg-end-multiline-output "" } */
+}
+
+void test_logical_operators (int lhs, int rhs)
+{
+ __emit_expression_range (0, lhs && rhs ); /* { dg-warning "range" } */
+/* { dg-begin-multiline-output "" }
+ __emit_expression_range (0, lhs && rhs );
+ ~~~~^~~~~~
+ { dg-end-multiline-output "" } */
+
+ __emit_expression_range (0, lhs || rhs ); /* { dg-warning "range" } */
+/* { dg-begin-multiline-output "" }
+ __emit_expression_range (0, lhs || rhs );
+ ~~~~^~~~~~
+ { dg-end-multiline-output "" } */
+}
+
+/* Conditional operator. *******************************************/
+
+void test_conditional_operators (int flag, int on_true, int on_false)
+{
+ __emit_expression_range (0, flag ? on_true : on_false ); /* { dg-warning "range" } */
+/* { dg-begin-multiline-output "" }
+ __emit_expression_range (0, flag ? on_true : on_false );
+ ~~~~~~~~~~~~~~~^~~~~~~~~~
+ { dg-end-multiline-output "" } */
+}
+
+/* Assignment expressions. *******************************************/
+
+void test_assignment_expressions (int dest, int other)
+{
+ __emit_expression_range (0, dest = other ); /* { dg-warning "range" } */
+/* { dg-begin-multiline-output "" }
+ __emit_expression_range (0, dest = other );
+ ~~~~~^~~~~~~
+ { dg-end-multiline-output "" } */
+
+ __emit_expression_range (0, dest *= other ); /* { dg-warning "range" } */
+/* { dg-begin-multiline-output "" }
+ __emit_expression_range (0, dest *= other );
+ ~~~~~^~~~~~~~
+ { dg-end-multiline-output "" } */
+
+ __emit_expression_range (0, dest /= other ); /* { dg-warning "range" } */
+/* { dg-begin-multiline-output "" }
+ __emit_expression_range (0, dest /= other );
+ ~~~~~^~~~~~~~
+ { dg-end-multiline-output "" } */
+
+ __emit_expression_range (0, dest %= other ); /* { dg-warning "range" } */
+/* { dg-begin-multiline-output "" }
+ __emit_expression_range (0, dest %= other );
+ ~~~~~^~~~~~~~
+ { dg-end-multiline-output "" } */
+
+ __emit_expression_range (0, dest += other ); /* { dg-warning "range" } */
+/* { dg-begin-multiline-output "" }
+ __emit_expression_range (0, dest += other );
+ ~~~~~^~~~~~~~
+ { dg-end-multiline-output "" } */
+
+ __emit_expression_range (0, dest -= other ); /* { dg-warning "range" } */
+/* { dg-begin-multiline-output "" }
+ __emit_expression_range (0, dest -= other );
+ ~~~~~^~~~~~~~
+ { dg-end-multiline-output "" } */
+
+ __emit_expression_range (0, dest <<= other ); /* { dg-warning "range" } */
+/* { dg-begin-multiline-output "" }
+ __emit_expression_range (0, dest <<= other );
+ ~~~~~^~~~~~~~~
+ { dg-end-multiline-output "" } */
+
+ __emit_expression_range (0, dest >>= other ); /* { dg-warning "range" } */
+/* { dg-begin-multiline-output "" }
+ __emit_expression_range (0, dest >>= other );
+ ~~~~~^~~~~~~~~
+ { dg-end-multiline-output "" } */
+
+ __emit_expression_range (0, dest &= other ); /* { dg-warning "range" } */
+/* { dg-begin-multiline-output "" }
+ __emit_expression_range (0, dest &= other );
+ ~~~~~^~~~~~~~
+ { dg-end-multiline-output "" } */
+
+ __emit_expression_range (0, dest ^= other ); /* { dg-warning "range" } */
+/* { dg-begin-multiline-output "" }
+ __emit_expression_range (0, dest ^= other );
+ ~~~~~^~~~~~~~
+ { dg-end-multiline-output "" } */
+
+ __emit_expression_range (0, dest |= other ); /* { dg-warning "range" } */
+/* { dg-begin-multiline-output "" }
+ __emit_expression_range (0, dest |= other );
+ ~~~~~^~~~~~~~
+ { dg-end-multiline-output "" } */
+}
+
+/* Comma operator. *******************************************/
+
+void test_comma_operator (int a, int b)
+{
+ __emit_expression_range (0, (a++, a + b) ); /* { dg-warning "range" } */
+/* { dg-begin-multiline-output "" }
+ __emit_expression_range (0, (a++, a + b) );
+ ~~~~^~~~~~~~
+ { dg-end-multiline-output "" } */
+}
+
+/* Examples of non-trivial expressions. ****************************/
+
+extern double sqrt (double x);
+
+void test_quadratic (double a, double b, double c)
+{
+ __emit_expression_range (0, b * b - 4 * a * c ); /* { dg-warning "range" } */
+/* { dg-begin-multiline-output "" }
+ __emit_expression_range (0, b * b - 4 * a * c );
+ ~~~~~~^~~~~~~~~~~
+ { dg-end-multiline-output "" } */
+
+ __emit_expression_range (0,
+ (-b + sqrt (b * b - 4 * a * c))
+ / (2 * a)); /* { dg-warning "range" } */
+/* { dg-begin-multiline-output "" }
+ (-b + sqrt (b * b - 4 * a * c))
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ / (2 * a));
+ ^~~~~~~~~
+ { dg-end-multiline-output "" } */
+
+}
diff --git a/gcc/testsuite/gcc.dg/plugin/diagnostic-test-show-trees-1.c b/gcc/testsuite/gcc.dg/plugin/diagnostic-test-show-trees-1.c
new file mode 100644
index 00000000000..7473a07961f
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/plugin/diagnostic-test-show-trees-1.c
@@ -0,0 +1,65 @@
+/* { dg-do compile } */
+/* { dg-options "-O -fdiagnostics-show-caret" } */
+
+/* This is an example file for use with
+ diagnostic_plugin_show_trees.c.
+
+ The plugin handles "__show_tree" by recursively dumping
+ the internal structure of the second input argument.
+
+ We want to accept an expression of any type. To do this in C, we
+ use variadic arguments, but C requires at least one argument before
+ the ellipsis, so we have a dummy one. */
+
+extern void __show_tree (int dummy, ...);
+
+extern double sqrt (double x);
+
+void test_quadratic (double a, double b, double c)
+{
+ __show_tree (0,
+ (-b + sqrt (b * b - 4 * a * c))
+ / (2 * a));
+
+/* { dg-begin-multiline-output "" }
+ (-b + sqrt (b * b - 4 * a * c))
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ / (2 * a));
+ ^~~~~~~~~
+ { dg-end-multiline-output "" } */
+
+/* { dg-begin-multiline-output "" }
+ (-b + sqrt (b * b - 4 * a * c))
+ ~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
+ { dg-end-multiline-output "" } */
+
+/* { dg-begin-multiline-output "" }
+ (-b + sqrt (b * b - 4 * a * c))
+ ^~~~~~~~~~~~~~~~~~~~~~~~
+ { dg-end-multiline-output "" } */
+
+/* { dg-begin-multiline-output "" }
+ (-b + sqrt (b * b - 4 * a * c))
+ ~~~~~~^~~~~~~~~~~
+ { dg-end-multiline-output "" } */
+
+/* { dg-begin-multiline-output "" }
+ (-b + sqrt (b * b - 4 * a * c))
+ ~~^~~
+ { dg-end-multiline-output "" } */
+
+/* { dg-begin-multiline-output "" }
+ (-b + sqrt (b * b - 4 * a * c))
+ ~~~~~~^~~
+ { dg-end-multiline-output "" } */
+
+/* { dg-begin-multiline-output "" }
+ (-b + sqrt (b * b - 4 * a * c))
+ ~~^~~
+ { dg-end-multiline-output "" } */
+
+/* { dg-begin-multiline-output "" }
+ / (2 * a));
+ ~~~^~~~
+ { dg-end-multiline-output "" } */
+}
diff --git a/gcc/testsuite/gcc.dg/plugin/diagnostic_plugin_show_trees.c b/gcc/testsuite/gcc.dg/plugin/diagnostic_plugin_show_trees.c
new file mode 100644
index 00000000000..5a911c17a4e
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/plugin/diagnostic_plugin_show_trees.c
@@ -0,0 +1,174 @@
+/* This plugin recursively dumps the source-code location ranges of
+ expressions, at the pre-gimplification tree stage. */
+/* { dg-options "-O" } */
+
+#include "gcc-plugin.h"
+#include "config.h"
+#include "system.h"
+#include "coretypes.h"
+#include "tm.h"
+#include "tree.h"
+#include "stringpool.h"
+#include "toplev.h"
+#include "basic-block.h"
+#include "hash-table.h"
+#include "vec.h"
+#include "ggc.h"
+#include "basic-block.h"
+#include "tree-ssa-alias.h"
+#include "internal-fn.h"
+#include "gimple-fold.h"
+#include "tree-eh.h"
+#include "gimple-expr.h"
+#include "is-a.h"
+#include "gimple.h"
+#include "gimple-iterator.h"
+#include "tree.h"
+#include "tree-pass.h"
+#include "intl.h"
+#include "plugin-version.h"
+#include "diagnostic.h"
+#include "context.h"
+#include "gcc-rich-location.h"
+#include "print-tree.h"
+
+/*
+ Hack: fails with linker error:
+./diagnostic_plugin_show_trees.so: undefined symbol: _ZN17gcc_rich_location8add_exprEP9tree_node
+ since nothing in the tree is using gcc_rich_location::add_expr yet.
+
+ I've tried various workarounds (adding DEBUG_FUNCTION to the
+ method, taking its address), but can't seem to fix it that way.
+ So as a nasty workaround, the following material is copied&pasted
+ from gcc-rich-location.c: */
+
+static bool
+get_range_for_expr (tree expr, location_range *r)
+{
+ if (EXPR_HAS_RANGE (expr))
+ {
+ source_range sr = EXPR_LOCATION_RANGE (expr);
+
+ /* Do we have meaningful data? */
+ if (sr.m_start && sr.m_finish)
+ {
+ r->m_start = expand_location (sr.m_start);
+ r->m_finish = expand_location (sr.m_finish);
+ return true;
+ }
+ }
+
+ return false;
+}
+
+/* Add a range to the rich_location, covering expression EXPR. */
+
+void
+gcc_rich_location::add_expr (tree expr)
+{
+ gcc_assert (expr);
+
+ location_range r;
+ r.m_show_caret_p = false;
+ if (get_range_for_expr (expr, &r))
+ add_range (&r);
+}
+
+/* FIXME: end of material taken from gcc-rich-location.c */
+
+int plugin_is_GPL_compatible;
+
+static void
+show_tree (tree node)
+{
+ if (!CAN_HAVE_RANGE_P (node))
+ return;
+
+ gcc_rich_location richloc (EXPR_LOCATION (node));
+ richloc.add_expr (node);
+
+ if (richloc.get_num_locations () < 2)
+ {
+ error_at_rich_loc (&richloc, "range not found");
+ return;
+ }
+
+ enum tree_code code = TREE_CODE (node);
+
+ location_range *range = richloc.get_range (1);
+ inform_at_rich_loc (&richloc,
+ "%s at range %i:%i-%i:%i",
+ get_tree_code_name (code),
+ range->m_start.line,
+ range->m_start.column,
+ range->m_finish.line,
+ range->m_finish.column);
+
+ /* Recurse. */
+ int min_idx = 0;
+ int max_idx = TREE_OPERAND_LENGTH (node);
+ switch (code)
+ {
+ case CALL_EXPR:
+ min_idx = 3;
+ break;
+
+ default:
+ break;
+ }
+
+ for (int i = min_idx; i < max_idx; i++)
+ show_tree (TREE_OPERAND (node, i));
+}
+
+tree
+cb_walk_tree_fn (tree * tp, int * walk_subtrees,
+ void * data ATTRIBUTE_UNUSED)
+{
+ if (TREE_CODE (*tp) != CALL_EXPR)
+ return NULL_TREE;
+
+ tree call_expr = *tp;
+ tree fn = CALL_EXPR_FN (call_expr);
+ if (TREE_CODE (fn) != ADDR_EXPR)
+ return NULL_TREE;
+ fn = TREE_OPERAND (fn, 0);
+ if (TREE_CODE (fn) != FUNCTION_DECL)
+ return NULL_TREE;
+ if (strcmp (IDENTIFIER_POINTER (DECL_NAME (fn)), "__show_tree"))
+ return NULL_TREE;
+
+ /* Get arg 1; print it! */
+ tree arg = CALL_EXPR_ARG (call_expr, 1);
+
+ show_tree (arg);
+
+ return NULL_TREE;
+}
+
+static void
+callback (void *gcc_data, void *user_data)
+{
+ tree fndecl = (tree)gcc_data;
+ walk_tree (&DECL_SAVED_TREE (fndecl), cb_walk_tree_fn, NULL, NULL);
+}
+
+int
+plugin_init (struct plugin_name_args *plugin_info,
+ struct plugin_gcc_version *version)
+{
+ struct register_pass_info pass_info;
+ const char *plugin_name = plugin_info->base_name;
+ int argc = plugin_info->argc;
+ struct plugin_argument *argv = plugin_info->argv;
+
+ if (!plugin_default_version_check (version, &gcc_version))
+ return 1;
+
+ register_callback (plugin_name,
+ PLUGIN_PRE_GENERICIZE,
+ callback,
+ NULL);
+
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/plugin/diagnostic_plugin_test_show_locus.c b/gcc/testsuite/gcc.dg/plugin/diagnostic_plugin_test_show_locus.c
index 8f5724ec27d..158c6124a99 100644
--- a/gcc/testsuite/gcc.dg/plugin/diagnostic_plugin_test_show_locus.c
+++ b/gcc/testsuite/gcc.dg/plugin/diagnostic_plugin_test_show_locus.c
@@ -109,7 +109,8 @@ get_loc (unsigned int line_num, unsigned int col_num)
/* Convert from 0-based column numbers to 1-based column numbers. */
source_location loc
- = linemap_position_for_line_and_column (line_map,
+ = linemap_position_for_line_and_column (line_table,
+ line_map,
line_num, col_num + 1);
return loc;
@@ -163,7 +164,7 @@ test_show_locus (function *fun)
if (0 == strcmp (fnname, "test_simple"))
{
const int line = fnstart_line + 2;
- rich_location richloc (get_loc (line, 15));
+ rich_location richloc (line_table, get_loc (line, 15));
richloc.add_range (get_loc (line, 10), get_loc (line, 14), false);
richloc.add_range (get_loc (line, 16), get_loc (line, 16), false);
warning_at_rich_loc (&richloc, 0, "test");
@@ -172,7 +173,7 @@ test_show_locus (function *fun)
if (0 == strcmp (fnname, "test_simple_2"))
{
const int line = fnstart_line + 2;
- rich_location richloc (get_loc (line, 24));
+ rich_location richloc (line_table, get_loc (line, 24));
richloc.add_range (get_loc (line, 6),
get_loc (line, 22), false);
richloc.add_range (get_loc (line, 26),
@@ -183,7 +184,7 @@ test_show_locus (function *fun)
if (0 == strcmp (fnname, "test_multiline"))
{
const int line = fnstart_line + 2;
- rich_location richloc (get_loc (line + 1, 7));
+ rich_location richloc (line_table, get_loc (line + 1, 7));
richloc.add_range (get_loc (line, 7),
get_loc (line, 23), false);
richloc.add_range (get_loc (line + 1, 9),
@@ -194,7 +195,7 @@ test_show_locus (function *fun)
if (0 == strcmp (fnname, "test_many_lines"))
{
const int line = fnstart_line + 2;
- rich_location richloc (get_loc (line + 5, 7));
+ rich_location richloc (line_table, get_loc (line + 5, 7));
richloc.add_range (get_loc (line, 7),
get_loc (line + 4, 65), false);
richloc.add_range (get_loc (line + 5, 9),
@@ -223,7 +224,7 @@ test_show_locus (function *fun)
source_range src_range;
src_range.m_start = get_loc (line, 12);
src_range.m_finish = get_loc (line, 20);
- rich_location richloc (caret);
+ rich_location richloc (line_table, caret);
richloc.set_range (0, src_range, true, false);
warning_at_rich_loc (&richloc, 0, "test");
}
@@ -237,7 +238,7 @@ test_show_locus (function *fun)
source_range src_range;
src_range.m_start = get_loc (line, 90);
src_range.m_finish = get_loc (line, 98);
- rich_location richloc (caret);
+ rich_location richloc (line_table, caret);
richloc.set_range (0, src_range, true, false);
warning_at_rich_loc (&richloc, 0, "test");
}
@@ -248,7 +249,7 @@ test_show_locus (function *fun)
const int line = fnstart_line + 2;
location_t caret_a = get_loc (line, 7);
location_t caret_b = get_loc (line, 11);
- rich_location richloc (caret_a);
+ rich_location richloc (line_table, caret_a);
richloc.add_range (caret_b, caret_b, true);
global_dc->caret_chars[0] = 'A';
global_dc->caret_chars[1] = 'B';
@@ -269,7 +270,7 @@ test_show_locus (function *fun)
const int line = fnstart_line + 3;
location_t caret_a = get_loc (line, 5);
location_t caret_b = get_loc (line - 1, 19);
- rich_location richloc (caret_a);
+ rich_location richloc (line_table, caret_a);
richloc.add_range (caret_b, caret_b, true);
global_dc->caret_chars[0] = '1';
global_dc->caret_chars[1] = '2';
@@ -304,11 +305,6 @@ plugin_init (struct plugin_name_args *plugin_info,
if (!plugin_default_version_check (version, &gcc_version))
return 1;
- /* For now, tell the dc to expect ranges and thus to colorize the source
- lines, not just the carets/underlines. This will be redundant
- once the C frontend generates ranges. */
- global_dc->colorize_source_p = true;
-
for (int i = 0; i < argc; i++)
{
if (0 == strcmp (argv[i].key, "color"))
diff --git a/gcc/testsuite/gcc.dg/plugin/diagnostic_plugin_test_tree_expression_range.c b/gcc/testsuite/gcc.dg/plugin/diagnostic_plugin_test_tree_expression_range.c
new file mode 100644
index 00000000000..89cc95acd99
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/plugin/diagnostic_plugin_test_tree_expression_range.c
@@ -0,0 +1,98 @@
+/* This plugin verifies the source-code location ranges of
+ expressions, at the pre-gimplification tree stage. */
+/* { dg-options "-O" } */
+
+#include "gcc-plugin.h"
+#include "config.h"
+#include "system.h"
+#include "coretypes.h"
+#include "tm.h"
+#include "tree.h"
+#include "stringpool.h"
+#include "toplev.h"
+#include "basic-block.h"
+#include "hash-table.h"
+#include "vec.h"
+#include "ggc.h"
+#include "basic-block.h"
+#include "tree-ssa-alias.h"
+#include "internal-fn.h"
+#include "gimple-fold.h"
+#include "tree-eh.h"
+#include "gimple-expr.h"
+#include "is-a.h"
+#include "gimple.h"
+#include "gimple-iterator.h"
+#include "tree.h"
+#include "tree-pass.h"
+#include "intl.h"
+#include "plugin-version.h"
+#include "diagnostic.h"
+#include "context.h"
+#include "print-tree.h"
+
+int plugin_is_GPL_compatible;
+
+static void
+emit_warning (location_t loc)
+{
+ source_range src_range = get_range_from_loc (line_table, loc);
+ warning_at (loc, 0,
+ "tree range %i:%i-%i:%i",
+ LOCATION_LINE (src_range.m_start),
+ LOCATION_COLUMN (src_range.m_start),
+ LOCATION_LINE (src_range.m_finish),
+ LOCATION_COLUMN (src_range.m_finish));
+}
+
+tree
+cb_walk_tree_fn (tree * tp, int * walk_subtrees,
+ void * data ATTRIBUTE_UNUSED)
+{
+ if (TREE_CODE (*tp) != CALL_EXPR)
+ return NULL_TREE;
+
+ tree call_expr = *tp;
+ tree fn = CALL_EXPR_FN (call_expr);
+ if (TREE_CODE (fn) != ADDR_EXPR)
+ return NULL_TREE;
+ fn = TREE_OPERAND (fn, 0);
+ if (TREE_CODE (fn) != FUNCTION_DECL)
+ return NULL_TREE;
+ if (strcmp (IDENTIFIER_POINTER (DECL_NAME (fn)), "__emit_expression_range"))
+ return NULL_TREE;
+
+ /* Get arg 1; print it! */
+ tree arg = CALL_EXPR_ARG (call_expr, 1);
+
+ emit_warning (EXPR_LOCATION (arg));
+
+ return NULL_TREE;
+}
+
+static void
+callback (void *gcc_data, void *user_data)
+{
+ tree fndecl = (tree)gcc_data;
+ walk_tree (&DECL_SAVED_TREE (fndecl), cb_walk_tree_fn, NULL, NULL);
+}
+
+int
+plugin_init (struct plugin_name_args *plugin_info,
+ struct plugin_gcc_version *version)
+{
+ struct register_pass_info pass_info;
+ const char *plugin_name = plugin_info->base_name;
+ int argc = plugin_info->argc;
+ struct plugin_argument *argv = plugin_info->argv;
+
+ if (!plugin_default_version_check (version, &gcc_version))
+ return 1;
+
+ register_callback (plugin_name,
+ PLUGIN_PRE_GENERICIZE,
+ callback,
+ NULL);
+
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/plugin/levenshtein-test-1.c b/gcc/testsuite/gcc.dg/plugin/levenshtein-test-1.c
new file mode 100644
index 00000000000..ac49992780d
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/plugin/levenshtein-test-1.c
@@ -0,0 +1,9 @@
+/* Placeholder C source file for unit-testing gcc/spellcheck.c. */
+/* { dg-do compile } */
+/* { dg-options "-O" } */
+
+int
+main (int argc, char **argv)
+{
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/plugin/levenshtein_plugin.c b/gcc/testsuite/gcc.dg/plugin/levenshtein_plugin.c
new file mode 100644
index 00000000000..3e7dc788930
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/plugin/levenshtein_plugin.c
@@ -0,0 +1,64 @@
+/* Plugin for unittesting gcc/spellcheck.h. */
+
+#include "config.h"
+#include "gcc-plugin.h"
+#include "system.h"
+#include "coretypes.h"
+#include "spellcheck.h"
+#include "diagnostic.h"
+
+int plugin_is_GPL_compatible;
+
+static void
+levenshtein_distance_unit_test_oneway (const char *a, const char *b,
+ edit_distance_t expected)
+{
+ edit_distance_t actual = levenshtein_distance (a, b);
+ if (actual != expected)
+ error ("levenshtein_distance (\"%s\", \"%s\") : expected: %i got %i",
+ a, b, expected, actual);
+}
+
+
+static void
+levenshtein_distance_unit_test (const char *a, const char *b,
+ edit_distance_t expected)
+{
+ /* Run every test both ways to ensure it's symmetric. */
+ levenshtein_distance_unit_test_oneway (a, b, expected);
+ levenshtein_distance_unit_test_oneway (b, a, expected);
+}
+
+/* Callback handler for the PLUGIN_FINISH event; run
+ levenshtein_distance unit tests here. */
+
+static void
+on_finish (void */*gcc_data*/, void */*user_data*/)
+{
+ levenshtein_distance_unit_test ("", "nonempty", strlen ("nonempty"));
+ levenshtein_distance_unit_test ("saturday", "sunday", 3);
+ levenshtein_distance_unit_test ("foo", "m_foo", 2);
+ levenshtein_distance_unit_test ("hello_world", "HelloWorld", 3);
+ levenshtein_distance_unit_test
+ ("the quick brown fox jumps over the lazy dog", "dog", 40);
+ levenshtein_distance_unit_test
+ ("the quick brown fox jumps over the lazy dog",
+ "the quick brown dog jumps over the lazy fox",
+ 4);
+ levenshtein_distance_unit_test
+ ("Lorem ipsum dolor sit amet, consectetur adipiscing elit,",
+ "All your base are belong to us",
+ 44);
+}
+
+int
+plugin_init (struct plugin_name_args *plugin_info,
+ struct plugin_gcc_version */*version*/)
+{
+ register_callback (plugin_info->base_name,
+ PLUGIN_FINISH,
+ on_finish,
+ NULL); /* void *user_data */
+
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/plugin/plugin.exp b/gcc/testsuite/gcc.dg/plugin/plugin.exp
index 941bccc4387..06080cce8d2 100644
--- a/gcc/testsuite/gcc.dg/plugin/plugin.exp
+++ b/gcc/testsuite/gcc.dg/plugin/plugin.exp
@@ -66,6 +66,11 @@ set plugin_test_list [list \
{ diagnostic_plugin_test_show_locus.c \
diagnostic-test-show-locus-bw.c \
diagnostic-test-show-locus-color.c } \
+ { diagnostic_plugin_test_tree_expression_range.c \
+ diagnostic-test-expressions-1.c } \
+ { diagnostic_plugin_show_trees.c \
+ diagnostic-test-show-trees-1.c } \
+ { levenshtein_plugin.c levenshtein-test-1.c } \
]
foreach plugin_test $plugin_test_list {
diff --git a/gcc/testsuite/gcc.dg/pr65521.c b/gcc/testsuite/gcc.dg/pr65521.c
index 97879e2e139..be73dfbcfe7 100644
--- a/gcc/testsuite/gcc.dg/pr65521.c
+++ b/gcc/testsuite/gcc.dg/pr65521.c
@@ -1,6 +1,7 @@
/* PR ipa/65521 */
/* { dg-do compile } */
/* { dg-options "-O2 -fcompare-debug" } */
+/* { dg-xfail-if "" { powerpc-ibm-aix* } { "*" } { "" } } */
struct S { int s; };
int f6 (void *, unsigned long);
diff --git a/gcc/testsuite/gcc.dg/pr67784-1.c b/gcc/testsuite/gcc.dg/pr67784-1.c
new file mode 100644
index 00000000000..d5e85fc0c8b
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr67784-1.c
@@ -0,0 +1,54 @@
+/* PR c/67784 */
+/* { dg-do compile } */
+/* { dg-options "" } */
+
+typedef int T;
+
+void
+fn1 (void)
+{
+ for (int T;;)
+ if (1)
+ ;
+ T *x;
+}
+
+void
+fn2 (void)
+{
+ for (int T;;)
+ if (1)
+ T = 1;
+ T *x;
+}
+
+void
+fn3 (void)
+{
+ for (int T;;)
+ if (1)
+ {
+ }
+ T *x;
+}
+
+void
+fn4 (void)
+{
+ for (int T;;)
+ if (1)
+L:
+ ;
+ T *x;
+}
+
+void
+fn5 (void)
+{
+ for (int T;;)
+ if (1)
+ ;
+ else
+ ;
+ T *x;
+}
diff --git a/gcc/testsuite/gcc.dg/pr67784-2.c b/gcc/testsuite/gcc.dg/pr67784-2.c
new file mode 100644
index 00000000000..de3b1c89a89
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr67784-2.c
@@ -0,0 +1,54 @@
+/* PR c/67784 */
+/* { dg-do compile } */
+/* { dg-options "" } */
+
+int T;
+
+void
+fn1 (void)
+{
+ for (typedef int T;;) /* { dg-error "declaration of non-variable" } */
+ if (1)
+ ;
+ T *x; /* { dg-error "undeclared" } */
+}
+
+void
+fn2 (void)
+{
+ for (typedef int T;;) /* { dg-error "declaration of non-variable" } */
+ if (1)
+ T = 1; /* { dg-error "expected expression" } */
+ T *x; /* { dg-error "undeclared" } */
+}
+
+void
+fn3 (void)
+{
+ for (typedef int T;;) /* { dg-error "declaration of non-variable" } */
+ if (1)
+ {
+ }
+ T *x; /* { dg-error "undeclared" } */
+}
+
+void
+fn4 (void)
+{
+ for (typedef int T;;) /* { dg-error "declaration of non-variable" } */
+ if (1)
+L:
+ ;
+ T *x; /* { dg-error "undeclared" } */
+}
+
+void
+fn5 (void)
+{
+ for (typedef int T;;) /* { dg-error "declaration of non-variable" } */
+ if (1)
+ ;
+ else
+ ;
+ T *x; /* { dg-error "undeclared" } */
+}
diff --git a/gcc/testsuite/gcc.dg/pr68286.c b/gcc/testsuite/gcc.dg/pr68286.c
new file mode 100644
index 00000000000..d0392e85a65
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr68286.c
@@ -0,0 +1,17 @@
+/* PR target/68286 */
+/* { dg-do compile } */
+/* { dg-options "-O3" } */
+
+int a, b, c;
+int fn1 ()
+{
+ int d[] = {0};
+ for (; c; c++)
+ {
+ float e = c;
+ if (e)
+ d[0]++;
+ }
+ b = d[0];
+ return a;
+}
diff --git a/gcc/testsuite/gcc.dg/pr68306-2.c b/gcc/testsuite/gcc.dg/pr68306-2.c
new file mode 100644
index 00000000000..4672ebe7987
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr68306-2.c
@@ -0,0 +1,12 @@
+/* { dg-do compile } */
+/* { dg-options "-O3" } */
+/* { dg-additional-options "-mno-sse -mno-mmx" { target i?86-*-* x86_64-*-* } } */
+
+struct {
+ int tz_minuteswest;
+ int tz_dsttime;
+} a, b;
+void fn1() {
+ b.tz_minuteswest = a.tz_minuteswest;
+ b.tz_dsttime = a.tz_dsttime;
+}
diff --git a/gcc/testsuite/gcc.dg/pr68306-3.c b/gcc/testsuite/gcc.dg/pr68306-3.c
new file mode 100644
index 00000000000..f5a8c102cf8
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr68306-3.c
@@ -0,0 +1,21 @@
+/* { dg-do compile } */
+/* { dg-options "-O3" } */
+/* { dg-additional-options "-mno-sse -mno-mmx" { target i?86-*-* x86_64-*-* } } */
+/* { dg-additional-options "-mno-altivec -mno-vsx" { target powerpc*-*-* } } */
+
+extern void fn2();
+struct {
+ unsigned qp_num;
+ unsigned starting_psn;
+ void *private_data;
+} a;
+struct {
+ unsigned id;
+ unsigned qpn;
+ unsigned psn;
+} b;
+void fn1() {
+ a.qp_num = b.qpn;
+ a.starting_psn = b.psn;
+ fn2(b.id);
+}
diff --git a/gcc/testsuite/gcc.dg/pr68306.c b/gcc/testsuite/gcc.dg/pr68306.c
new file mode 100644
index 00000000000..54e5b40f221
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr68306.c
@@ -0,0 +1,11 @@
+/* { dg-do compile } */
+/* { dg-options "-O3" } */
+/* { dg-additional-options "-mno-sse -mno-mmx" { target i?86-*-* x86_64-*-* } } */
+
+enum powerpc_pmc_type { PPC_PMC_IBM };
+struct {
+ unsigned num_pmcs;
+ enum powerpc_pmc_type pmc_type;
+} a;
+enum powerpc_pmc_type b;
+void fn1() { a.num_pmcs = a.pmc_type = b; }
diff --git a/gcc/testsuite/gcc.dg/pr68320.c b/gcc/testsuite/gcc.dg/pr68320.c
new file mode 100644
index 00000000000..7060af8993e
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr68320.c
@@ -0,0 +1,67 @@
+/* PR c/68320 */
+/* { dg-do compile } */
+/* { dg-options "" } */
+
+void
+fn1 (void)
+{
+ for (typedef int T;;) /* { dg-error "declaration of non-variable" } */
+ if (1)
+ ;
+ T x; /* { dg-error "unknown type name" } */
+}
+
+void
+fn2 (int i)
+{
+ for (typedef int T;;) /* { dg-error "declaration of non-variable" } */
+ if (1)
+ i = 5;
+ T x; /* { dg-error "unknown type name" } */
+}
+
+void
+fn3 (void)
+{
+ for (typedef int T;;) /* { dg-error "declaration of non-variable" } */
+ if (1)
+ {
+ }
+ T *x; /* { dg-error "unknown type name" } */
+}
+
+void
+fn4 (void)
+{
+ for (typedef int T;;) /* { dg-error "declaration of non-variable" } */
+ if (1)
+ ;
+ T, T; /* { dg-error "undeclared" } */
+}
+
+void
+fn5 (void)
+{
+ for (typedef int T;;) /* { dg-error "declaration of non-variable" } */
+ if (1)
+ ;
+ T = 10; /* { dg-error "undeclared" } */
+}
+
+void
+fn6 (void)
+{
+ for (typedef int T;;) /* { dg-error "declaration of non-variable" } */
+ if (1)
+ ;
+ T[0]; /* { dg-error "undeclared" } */
+}
+
+void
+fn7 (void)
+{
+ for (typedef int T;;) /* { dg-error "declaration of non-variable" } */
+ if (1)
+ ;
+ T (); /* { dg-warning "implicit declaration" } */
+}
diff --git a/gcc/testsuite/gcc.dg/spellcheck-fields.c b/gcc/testsuite/gcc.dg/spellcheck-fields.c
new file mode 100644
index 00000000000..01be5508dc5
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/spellcheck-fields.c
@@ -0,0 +1,63 @@
+/* { dg-do compile } */
+
+struct foo
+{
+ int foo;
+ int bar;
+ int baz;
+};
+
+int test (struct foo *ptr)
+{
+ return ptr->m_bar; /* { dg-error "'struct foo' has no member named 'm_bar'; did you mean 'bar'?" } */
+}
+
+int test2 (void)
+{
+ struct foo instance = {0, 0, 0};
+ return instance.m_bar; /* { dg-error "'struct foo' has no member named 'm_bar'; did you mean 'bar'?" } */
+}
+
+struct s {
+ struct j { int aa; } kk;
+ int ab;
+};
+
+void test3 (struct s x)
+{
+ x.ac; /* { dg-error "'struct s' has no member named 'ac'; did you mean 'ab'?" } */
+}
+
+int test4 (struct foo *ptr)
+{
+ return sizeof (ptr->foa); /* { dg-error "'struct foo' has no member named 'foa'; did you mean 'foo'?" } */
+}
+
+/* Verify that we don't offer nonsensical suggestions. */
+
+int test5 (struct foo *ptr)
+{
+ return ptr->this_is_unlike_any_of_the_fields; /* { dg-bogus "did you mean" } */
+ /* { dg-error "has no member named" "" { target *-*-* } 40 } */
+}
+
+union u
+{
+ int color;
+ int shape;
+};
+
+int test6 (union u *ptr)
+{
+ return ptr->colour; /* { dg-error "'union u' has no member named 'colour'; did you mean 'color'?" } */
+}
+
+struct has_anon
+{
+ struct { int color; } s;
+};
+
+int test7 (struct has_anon *ptr)
+{
+ return ptr->s.colour; /* { dg-error "'struct <anonymous>' has no member named 'colour'; did you mean 'color'?" } */
+}
diff --git a/gcc/testsuite/gcc.dg/spellcheck-options-1.c b/gcc/testsuite/gcc.dg/spellcheck-options-1.c
new file mode 100644
index 00000000000..cd5fdcacfdb
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/spellcheck-options-1.c
@@ -0,0 +1,4 @@
+/* { dg-do compile } */
+/* { dg-options "-Wcoercion" } */
+/* { dg-error "unrecognized command line option '-Wcoercion'; did you mean '-Wconversion'?" "" { target *-*-* } 0 } */
+
diff --git a/gcc/testsuite/gcc.dg/spellcheck-options-2.c b/gcc/testsuite/gcc.dg/spellcheck-options-2.c
new file mode 100644
index 00000000000..786266df390
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/spellcheck-options-2.c
@@ -0,0 +1,5 @@
+/* { dg-do compile } */
+/* { dg-options "-Wthis-should-not-get-a-hint" } */
+/* { dg-bogus "did you mean" "" { target *-*-* } 0 } */
+/* { dg-error "unrecognized command line option '-Wthis-should-not-get-a-hint'" "" { target *-*-* } 0 } */
+
diff --git a/gcc/testsuite/gcc.dg/torture/pr68264.c b/gcc/testsuite/gcc.dg/torture/pr68264.c
new file mode 100644
index 00000000000..96304742525
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/pr68264.c
@@ -0,0 +1,104 @@
+/* { dg-do run } */
+/* { dg-require-effective-target fenv_exceptions } */
+
+#include <fenv.h>
+#include <math.h>
+#include <errno.h>
+
+extern void abort (void) __attribute__ ((noreturn));
+
+#define LARGE_NEG_MAYBE_ERANGE 0x01
+#define LARGE_NEG_ERANGE 0x02
+#define LARGE_POS_ERANGE 0x04
+#define LARGE_NEG_EDOM 0x08
+#define LARGE_POS_EDOM 0x10
+
+#define LARGE_ERANGE (LARGE_NEG_ERANGE | LARGE_POS_ERANGE)
+#define LARGE_EDOM (LARGE_NEG_EDOM | LARGE_POS_EDOM)
+#define POWER_ERANGE (LARGE_NEG_MAYBE_ERANGE | LARGE_POS_ERANGE)
+
+#define TEST(CALL, FLAGS) (CALL, tester (FLAGS))
+
+volatile double d;
+volatile int i;
+
+static void (*tester) (int);
+
+void
+check_quiet_nan (int flags __attribute__ ((unused)))
+{
+ if (fetestexcept (FE_ALL_EXCEPT))
+ abort ();
+ if (errno)
+ abort ();
+}
+
+void
+check_large_neg (int flags)
+{
+ if (flags & LARGE_NEG_MAYBE_ERANGE)
+ return;
+ int expected_errno = (flags & LARGE_NEG_ERANGE ? ERANGE
+ : flags & LARGE_NEG_EDOM ? EDOM
+ : 0);
+ if (expected_errno != errno)
+ abort ();
+ errno = 0;
+}
+
+void
+check_large_pos (int flags)
+{
+ int expected_errno = (flags & LARGE_POS_ERANGE ? ERANGE
+ : flags & LARGE_POS_EDOM ? EDOM
+ : 0);
+ if (expected_errno != errno)
+ abort ();
+ errno = 0;
+}
+
+void
+test (void)
+{
+ TEST (acos (d), LARGE_EDOM);
+ TEST (asin (d), LARGE_EDOM);
+ TEST (acosh (d), LARGE_NEG_EDOM);
+ TEST (atanh (d), LARGE_EDOM);
+ TEST (cosh (d), LARGE_ERANGE);
+ TEST (sinh (d), LARGE_ERANGE);
+ TEST (log (d), LARGE_NEG_EDOM);
+ TEST (log2 (d), LARGE_NEG_EDOM);
+ TEST (log10 (d), LARGE_NEG_EDOM);
+ /* Disabled due to glibc PR 6792, fixed in Apr 2015. */
+ if (0)
+ TEST (log1p (d), LARGE_NEG_EDOM);
+ TEST (exp (d), POWER_ERANGE);
+ TEST (exp2 (d), POWER_ERANGE);
+ TEST (expm1 (d), POWER_ERANGE);
+ TEST (sqrt (d), LARGE_NEG_EDOM);
+ TEST (pow (100.0, d), POWER_ERANGE);
+ TEST (pow (i, d), POWER_ERANGE);
+}
+
+int
+main (void)
+{
+ errno = 0;
+ i = 100;
+ d = __builtin_nan ("");
+ tester = check_quiet_nan;
+ feclearexcept (FE_ALL_EXCEPT);
+ test ();
+
+ d = -1.0e80;
+ tester = check_large_neg;
+ errno = 0;
+ test ();
+
+ d = 1.0e80;
+ tester = check_large_pos;
+ errno = 0;
+ test ();
+
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/pr68234.c b/gcc/testsuite/gcc.dg/tree-ssa/pr68234.c
new file mode 100644
index 00000000000..e7c2a95aa4c
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/pr68234.c
@@ -0,0 +1,24 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -fdump-tree-vrp2" } */
+
+extern int nc;
+void ff (unsigned long long);
+
+void
+f (void)
+{
+ unsigned char resp[1024];
+ int c;
+ int bl = 0;
+ unsigned long long *dwords = (unsigned long long *) (resp + 5);
+ for (c = 0; c < nc; c++)
+ {
+ /* PR middle-end/68234, this signed division should be optimized into
+ right shift as vrp pass should deduct range info of 'bl' falls into
+ positive number. */
+ ff (dwords[bl / 64]);
+ bl++;
+ }
+}
+
+/* { dg-final { scan-tree-dump ">> 6" "vrp2" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/split-path-1.c b/gcc/testsuite/gcc.dg/tree-ssa/split-path-1.c
new file mode 100644
index 00000000000..12398924dba
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/split-path-1.c
@@ -0,0 +1,67 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -fdump-tree-split-paths-details " } */
+
+#include <stdio.h>
+#include <stdlib.h>
+
+#define RGBMAX 255
+
+int
+test()
+{
+ int i, Pels;
+ unsigned char sum = 0;
+ unsigned char xr, xg, xb;
+ unsigned char xc, xm, xy, xk;
+ unsigned char *ReadPtr, *EritePtr;
+
+ ReadPtr = ( unsigned char *) malloc (sizeof (unsigned char) * 100);
+ EritePtr = ( unsigned char *) malloc (sizeof (unsigned char) * 100);
+
+ for (i = 0; i < 100;i++)
+ {
+ ReadPtr[i] = 100 - i;
+ }
+
+ for (i = 0; i < 100; i++)
+ {
+ xr = *ReadPtr++;
+ xg = *ReadPtr++;
+ xb = *ReadPtr++;
+
+ xc = (unsigned char) (RGBMAX - xr);
+ xm = (unsigned char) (RGBMAX - xg);
+ xy = (unsigned char) (RGBMAX - xb);
+
+ if (xc < xm)
+ {
+ xk = (unsigned char) (xc < xy ? xc : xy);
+ }
+ else
+ {
+ xk = (unsigned char) (xm < xy ? xm : xy);
+ }
+
+ xc = (unsigned char) (xc - xk);
+ xm = (unsigned char) (xm - xk);
+ xy = (unsigned char) (xy - xk);
+
+ *EritePtr++ = xc;
+ *EritePtr++ = xm;
+ *EritePtr++ = xy;
+ *EritePtr++ = xk;
+ sum += *EritePtr;
+ }
+ return sum;
+}
+
+int
+main()
+{
+ if (test() != 33)
+ abort();
+
+ return 0;
+}
+
+/* { dg-final { scan-tree-dump "Duplicating join block" "split-paths" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/bb-slp-7.c b/gcc/testsuite/gcc.dg/vect/bb-slp-7.c
index ab54a48332f..b8bef8cffb4 100644
--- a/gcc/testsuite/gcc.dg/vect/bb-slp-7.c
+++ b/gcc/testsuite/gcc.dg/vect/bb-slp-7.c
@@ -16,12 +16,12 @@ main1 (unsigned int x, unsigned int y)
unsigned int *pout = &out[0];
unsigned int a0, a1, a2, a3;
- /* Non isomorphic. */
+ /* Non isomorphic, even 64-bit subgroups. */
a0 = *pin++ + 23;
- a1 = *pin++ + 142;
+ a1 = *pin++ * 142;
a2 = *pin++ + 2;
a3 = *pin++ * 31;
-
+
*pout++ = a0 * x;
*pout++ = a1 * y;
*pout++ = a2 * x;
@@ -29,7 +29,7 @@ main1 (unsigned int x, unsigned int y)
/* Check results. */
if (out[0] != (in[0] + 23) * x
- || out[1] != (in[1] + 142) * y
+ || out[1] != (in[1] * 142) * y
|| out[2] != (in[2] + 2) * x
|| out[3] != (in[3] * 31) * y)
abort();
@@ -47,4 +47,4 @@ int main (void)
}
/* { dg-final { scan-tree-dump-times "basic block vectorized" 0 "slp2" } } */
-
+
diff --git a/gcc/testsuite/gcc.dg/vect/bb-slp-subgroups-1.c b/gcc/testsuite/gcc.dg/vect/bb-slp-subgroups-1.c
new file mode 100644
index 00000000000..39c23c397e7
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/bb-slp-subgroups-1.c
@@ -0,0 +1,44 @@
+/* { dg-require-effective-target vect_int } */
+/* PR tree-optimization/67682. */
+
+#include "tree-vect.h"
+
+int __attribute__((__aligned__(8))) a[8];
+int __attribute__((__aligned__(8))) b[4];
+
+__attribute__ ((noinline)) void
+test ()
+{
+ a[0] = b[0];
+ a[1] = b[1];
+ a[2] = b[2];
+ a[3] = b[3];
+ a[4] = 0;
+ a[5] = 0;
+ a[6] = 0;
+ a[7] = 0;
+}
+
+int
+main (int argc, char **argv)
+{
+ check_vect ();
+
+ for (int i = 0; i < 8; i++)
+ a[i] = 1;
+ for (int i = 0; i < 4; i++)
+ b[i] = i + 4;
+ __asm__ volatile ("" : : : "memory");
+ test (a, b);
+ __asm__ volatile ("" : : : "memory");
+ for (int i = 0; i < 4; i++)
+ if (a[i] != i+4)
+ abort ();
+ for (int i = 4; i < 8; i++)
+ if (a[i] != 0)
+ abort ();
+ return 0;
+}
+
+/* { dg-final { scan-tree-dump-times "Basic block will be vectorized using SLP" 1 "slp2" } } */
+/* { dg-final { scan-tree-dump-times "basic block vectorized" 1 "slp2" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/bb-slp-subgroups-2.c b/gcc/testsuite/gcc.dg/vect/bb-slp-subgroups-2.c
new file mode 100644
index 00000000000..13c51f3440b
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/bb-slp-subgroups-2.c
@@ -0,0 +1,41 @@
+/* { dg-require-effective-target vect_int } */
+/* PR tree-optimization/67682. */
+
+#include "tree-vect.h"
+
+int __attribute__((__aligned__(8))) a[8];
+int __attribute__((__aligned__(8))) b[4];
+
+__attribute__ ((noinline)) void
+test ()
+{
+ a[0] = b[2] + 1;
+ a[1] = b[0] + 2;
+ a[2] = b[1] + 3;
+ a[3] = b[1] + 4;
+ a[4] = b[3] * 3;
+ a[5] = b[0] * 4;
+ a[6] = b[2] * 5;
+ a[7] = b[1] * 7;
+}
+
+int
+main (int argc, char **argv)
+{
+ check_vect ();
+
+ for (int i = 0; i < 8; i++)
+ a[i] = 1;
+ for (int i = 0; i < 4; i++)
+ b[i] = i + 4;
+ __asm__ volatile ("" : : : "memory");
+ test (a, b);
+ __asm__ volatile ("" : : : "memory");
+ if ((a[0] != 7) || a[1] != 6 || (a[2] != 8) || (a[3] != 9)
+ || (a[4] != 21) || (a[5] != 16) || (a[6] != 30) || (a[7] != 35))
+ abort ();
+ return 0;
+}
+
+/* { dg-final { scan-tree-dump-times "Basic block will be vectorized using SLP" 1 "slp2" } } */
+/* { dg-final { scan-tree-dump-times "basic block vectorized" 1 "slp2" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/bb-slp-subgroups-3.c b/gcc/testsuite/gcc.dg/vect/bb-slp-subgroups-3.c
new file mode 100644
index 00000000000..6ae9a897686
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/bb-slp-subgroups-3.c
@@ -0,0 +1,41 @@
+/* { dg-require-effective-target vect_int } */
+/* PR tree-optimization/67682. */
+
+#include "tree-vect.h"
+
+int __attribute__((__aligned__(8))) a[8];
+int __attribute__((__aligned__(8))) b[8];
+
+__attribute__ ((noinline)) void
+test ()
+{
+ a[0] = b[0] + 1;
+ a[1] = b[1] + 2;
+ a[2] = b[2] + 3;
+ a[3] = b[3] + 4;
+ a[4] = b[0] * 3;
+ a[5] = b[2] * 4;
+ a[6] = b[4] * 5;
+ a[7] = b[6] * 7;
+}
+
+int
+main (int argc, char **argv)
+{
+ check_vect ();
+
+ for (int i = 0; i < 8; i++)
+ a[i] = 1;
+ for (int i = 0; i < 8; i++)
+ b[i] = i + 4;
+ __asm__ volatile ("" : : : "memory");
+ test (a, b);
+ __asm__ volatile ("" : : : "memory");
+ if ((a[0] != 5) || (a[1] != 7) || (a[2] != 9) || (a[3] != 11)
+ || (a[4] != 12) || (a[5] != 24) || (a[6] != 40) || (a[7] != 70))
+ abort ();
+ return 0;
+}
+
+/* { dg-final { scan-tree-dump-times "Basic block will be vectorized using SLP" 1 "slp2" } } */
+/* { dg-final { scan-tree-dump-times "basic block vectorized" 1 "slp2" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/pr65947-1.c b/gcc/testsuite/gcc.dg/vect/pr65947-1.c
index 7933f5c8612..1e7a05dc8cc 100644
--- a/gcc/testsuite/gcc.dg/vect/pr65947-1.c
+++ b/gcc/testsuite/gcc.dg/vect/pr65947-1.c
@@ -9,7 +9,7 @@ extern void abort (void) __attribute__ ((noreturn));
int
condition_reduction (int *a, int min_v)
{
- int last = -1;
+ int last = 66; /* High start value. */
for (int i = 0; i < N; i++)
if (a[i] < min_v)
@@ -28,12 +28,13 @@ main (void)
31, 32
};
- int ret = condition_reduction (a, 16);
+ int ret = condition_reduction (a, 1);
- if (ret != 19)
+ if (ret != 17)
abort ();
return 0;
}
/* { dg-final { scan-tree-dump-times "LOOP VECTORIZED" 2 "vect" { xfail { ! vect_max_reduc } } } } */
+/* { dg-final { scan-tree-dump-times "condition expression based on integer induction." 4 "vect" { xfail { ! vect_max_reduc } } } } */
diff --git a/gcc/testsuite/gcc.dg/vect/pr65947-10.c b/gcc/testsuite/gcc.dg/vect/pr65947-10.c
index 9a43a6059fa..b4c6659b77c 100644
--- a/gcc/testsuite/gcc.dg/vect/pr65947-10.c
+++ b/gcc/testsuite/gcc.dg/vect/pr65947-10.c
@@ -37,4 +37,5 @@ main (void)
}
/* { dg-final { scan-tree-dump-times "LOOP VECTORIZED" 2 "vect" { xfail { ! vect_max_reduc } } } } */
+/* { dg-final { scan-tree-dump-not "condition expression based on integer induction." "vect" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/pr65947-12.c b/gcc/testsuite/gcc.dg/vect/pr65947-12.c
new file mode 100644
index 00000000000..fb5ffd48c7b
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/pr65947-12.c
@@ -0,0 +1,41 @@
+/* { dg-require-effective-target vect_condition } */
+
+extern void abort (void) __attribute__ ((noreturn));
+
+#define N 32
+
+/* Simple condition reduction where the result is a negative of the induction.
+ Will fail to vectorize to a simple case. */
+
+signed int
+condition_reduction (signed int *a, signed int min_v)
+{
+ signed int last = -1;
+
+ for (signed int i = 0; i < N; i++)
+ if (a[i] < min_v)
+ last = -i;
+
+ return last;
+}
+
+int
+main (void)
+{
+ signed int a[N] = {
+ 11, -12, 13, 14, 15, 16, 17, 18, 19, 20,
+ 1, 2, -3, 4, 5, 6, 7, -8, 9, 10,
+ 21, 22, 23, 24, 25, 26, 27, 28, 29, 30,
+ 31, 32
+ };
+
+ signed int ret = condition_reduction (a, 16);
+
+ if (ret != -19)
+ abort ();
+
+ return 0;
+}
+
+/* { dg-final { scan-tree-dump-times "LOOP VECTORIZED" 2 "vect" { xfail { ! vect_max_reduc } } } } */
+/* { dg-final { scan-tree-dump-not "condition expression based on integer induction." "vect" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/pr65947-13.c b/gcc/testsuite/gcc.dg/vect/pr65947-13.c
new file mode 100644
index 00000000000..8c6faddd189
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/pr65947-13.c
@@ -0,0 +1,41 @@
+/* { dg-require-effective-target vect_condition } */
+
+extern void abort (void) __attribute__ ((noreturn));
+
+#define N 32
+
+/* Simple condition reduction with a reversed loop.
+ Will fail to vectorize to a simple case. */
+
+int
+condition_reduction (int *a, int min_v)
+{
+ int last = -1;
+
+ for (int i = N-1; i >=0; i--)
+ if (a[i] < min_v)
+ last = i;
+
+ return last;
+}
+
+int
+main (void)
+{
+ int a[N] = {
+ 17, 28, 13, 14, 15, 16, 17, 18, 19, 20,
+ 1, 2, -3, 4, 5, 6, 7, -8, 9, 10,
+ 21, 22, 23, 24, 25, 26, 27, 28, 29, 30,
+ 31, 32
+ };
+
+ int ret = condition_reduction (a, 16);
+
+ if (ret != 2)
+ abort ();
+
+ return 0;
+}
+
+/* { dg-final { scan-tree-dump-times "LOOP VECTORIZED" 2 "vect" { xfail { ! vect_max_reduc } } } } */
+/* { dg-final { scan-tree-dump-not "condition expression based on integer induction." "vect" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/pr65947-2.c b/gcc/testsuite/gcc.dg/vect/pr65947-2.c
index 9c627d9d7d5..9e9ff538286 100644
--- a/gcc/testsuite/gcc.dg/vect/pr65947-2.c
+++ b/gcc/testsuite/gcc.dg/vect/pr65947-2.c
@@ -38,3 +38,4 @@ main (void)
}
/* { dg-final { scan-tree-dump-times "LOOP VECTORIZED" 2 "vect" { xfail { ! vect_max_reduc } } } } */
+/* { dg-final { scan-tree-dump-not "condition expression based on integer induction." "vect" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/pr65947-3.c b/gcc/testsuite/gcc.dg/vect/pr65947-3.c
index e115de2a282..4b6aa9216b0 100644
--- a/gcc/testsuite/gcc.dg/vect/pr65947-3.c
+++ b/gcc/testsuite/gcc.dg/vect/pr65947-3.c
@@ -48,3 +48,4 @@ main (void)
}
/* { dg-final { scan-tree-dump-times "LOOP VECTORIZED" 2 "vect" { xfail { ! vect_max_reduc } } } } */
+/* { dg-final { scan-tree-dump-not "condition expression based on integer induction." "vect" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/pr65947-4.c b/gcc/testsuite/gcc.dg/vect/pr65947-4.c
index 76a0567aa54..f4e7fdc97c8 100644
--- a/gcc/testsuite/gcc.dg/vect/pr65947-4.c
+++ b/gcc/testsuite/gcc.dg/vect/pr65947-4.c
@@ -37,4 +37,5 @@ main (void)
}
/* { dg-final { scan-tree-dump-times "LOOP VECTORIZED" 2 "vect" { xfail { ! vect_max_reduc } } } } */
+/* { dg-final { scan-tree-dump-times "condition expression based on integer induction." 4 "vect" { xfail { ! vect_max_reduc } } } } */
diff --git a/gcc/testsuite/gcc.dg/vect/pr65947-5.c b/gcc/testsuite/gcc.dg/vect/pr65947-5.c
index 360e3b51ee1..21be8d0b749 100644
--- a/gcc/testsuite/gcc.dg/vect/pr65947-5.c
+++ b/gcc/testsuite/gcc.dg/vect/pr65947-5.c
@@ -39,3 +39,4 @@ main (void)
/* { dg-final { scan-tree-dump-times "LOOP VECTORIZED" 1 "vect" { xfail { ! vect_max_reduc } } } } */
/* { dg-final { scan-tree-dump "loop size is greater than data size" "vect" { xfail { ! vect_max_reduc } } } } */
+/* { dg-final { scan-tree-dump-not "condition expression based on integer induction." "vect" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/pr65947-6.c b/gcc/testsuite/gcc.dg/vect/pr65947-6.c
index 4997ef79cae..e1432403b2d 100644
--- a/gcc/testsuite/gcc.dg/vect/pr65947-6.c
+++ b/gcc/testsuite/gcc.dg/vect/pr65947-6.c
@@ -37,3 +37,4 @@ main (void)
}
/* { dg-final { scan-tree-dump-times "LOOP VECTORIZED" 2 "vect" { xfail { ! vect_max_reduc } } } } */
+/* { dg-final { scan-tree-dump-not "condition expression based on integer induction." "vect" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/pr68305.c b/gcc/testsuite/gcc.dg/vect/pr68305.c
new file mode 100644
index 00000000000..fde3db723cc
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/pr68305.c
@@ -0,0 +1,13 @@
+/* { dg-do compile } */
+/* { dg-additional-options "-O3" } */
+/* { dg-additional-options "-mavx2" { target avx_runtime } } */
+
+int a, b;
+
+void
+fn1 ()
+{
+ int c, d;
+ for (; b; b++)
+ a = a ^ !c ^ !d;
+}
diff --git a/gcc/testsuite/gcc.target/aarch64/umaddl_combine_1.c b/gcc/testsuite/gcc.target/aarch64/umaddl_combine_1.c
new file mode 100644
index 00000000000..430277f1187
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/umaddl_combine_1.c
@@ -0,0 +1,29 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -mcpu=cortex-a53" } */
+
+enum reg_class
+{
+ NO_REGS,
+ AD_REGS,
+ ALL_REGS, LIM_REG_CLASSES
+};
+
+extern enum reg_class
+ reg_class_subclasses[((int) LIM_REG_CLASSES)][((int) LIM_REG_CLASSES)];
+
+void
+init_reg_sets_1 (unsigned int i)
+{
+ unsigned int j;
+ {
+ for (j = i + 1; j < ((int) LIM_REG_CLASSES); j++)
+ {
+ enum reg_class *p;
+ p = &reg_class_subclasses[j][0];
+ while (*p != LIM_REG_CLASSES)
+ p++;
+ }
+ }
+}
+
+/* { dg-final { scan-assembler-not "umull\tw\[0-9\]+, w\[0-9\]+, w\[0-9\]+" } } */
diff --git a/gcc/testsuite/gcc.target/arm/mmx-1.c b/gcc/testsuite/gcc.target/arm/mmx-1.c
index d13c9828456..6317cc0d242 100644
--- a/gcc/testsuite/gcc.target/arm/mmx-1.c
+++ b/gcc/testsuite/gcc.target/arm/mmx-1.c
@@ -8,7 +8,7 @@
/* { dg-options "-O -mno-apcs-frame -mcpu=iwmmxt -mabi=iwmmxt" } */
/* { dg-require-effective-target arm32 } */
/* { dg-require-effective-target arm_iwmmxt_ok } */
-/* { dg-final { scan-assembler "ldmfd\[ ]sp!.*ip,\[ ]*pc" } } */
+/* { dg-final { scan-assembler "push.*ip,\[ ]*pc" } } */
/* This function uses all the call-saved registers, namely r4, r5, r6,
r7, r8, r9, sl, fp. Since we also save lr, that leaves an odd
diff --git a/gcc/testsuite/gcc.target/i386/pr67265-2.c b/gcc/testsuite/gcc.target/i386/pr67265-2.c
new file mode 100644
index 00000000000..a9f2eb460ef
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr67265-2.c
@@ -0,0 +1,9 @@
+/* { dg-do compile } */
+/* { dg-options "-O -fstack-check" } */
+
+void foo (int n)
+{
+ volatile char arr[64 * 1024];
+
+ arr[n] = 1;
+}
diff --git a/gcc/testsuite/gcc.target/i386/pr67265.c b/gcc/testsuite/gcc.target/i386/pr67265.c
new file mode 100644
index 00000000000..7827685fe5f
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr67265.c
@@ -0,0 +1,12 @@
+/* PR target/67265 */
+/* Reduced testcase by Johannes Dewender <gnu@JonnyJD.net> */
+
+/* { dg-do compile } */
+/* { dg-options "-O -fstack-check -fPIC" } */
+
+int a, b, c, d, e;
+
+void foo (void)
+{
+ __asm__("" : "+r"(c), "+r"(e), "+r"(d), "+r"(a) : ""(b), "mg"(foo), "mm"(c));
+}
diff --git a/gcc/testsuite/gcc.target/i386/sse-1.c b/gcc/testsuite/gcc.target/i386/sse-1.c
index afae22d3705..15d38f9d5dd 100644
--- a/gcc/testsuite/gcc.target/i386/sse-1.c
+++ b/gcc/testsuite/gcc.target/i386/sse-1.c
@@ -14,8 +14,10 @@ typedef union
void
swizzle (const void *a, vector4_t * b, vector4_t * c)
{
- b->v = _mm_loadl_pi (b->v, (__m64 *) a);
- c->v = _mm_loadl_pi (c->v, ((__m64 *) a) + 1);
+ __m64 *t = __builtin_assume_aligned (a, 64);
+
+ b->v = _mm_loadl_pi (b->v, t);
+ c->v = _mm_loadl_pi (c->v, t + 1);
}
/* While one legal rendering of each statement would be movaps;movlps;movaps,
diff --git a/gcc/testsuite/gcc.target/mips/split-ds-sequence.c b/gcc/testsuite/gcc.target/mips/split-ds-sequence.c
new file mode 100644
index 00000000000..e60270db304
--- /dev/null
+++ b/gcc/testsuite/gcc.target/mips/split-ds-sequence.c
@@ -0,0 +1,19 @@
+/* { dg-options "isa_rev>=6" } */
+/* { dg-skip-if "code quality test" { *-*-* } { "-mcompact-branches=never" } { "" } } */
+/* { dg-final { scan-assembler-not "nop" } } */
+
+int
+testg2 (int a, int c)
+{
+
+ int j = 0;
+ do
+ {
+ j += a;
+ }
+ while (j < 56);
+
+ j += c;
+ return j;
+
+}
diff --git a/gcc/testsuite/gcc.target/powerpc/20050603-3.c b/gcc/testsuite/gcc.target/powerpc/20050603-3.c
index 0f328e1711f..4017d34f429 100644
--- a/gcc/testsuite/gcc.target/powerpc/20050603-3.c
+++ b/gcc/testsuite/gcc.target/powerpc/20050603-3.c
@@ -1,15 +1,19 @@
-/* { dg-do compile { target { ilp32 } } } */
+/* { dg-do compile } */
/* { dg-options "-O2" } */
-struct Q
+struct Q
{
long x:20;
long y:4;
long z:8;
}b;
-/* This should generate a single rl[w]imi. */
+/* This should generate a single rl[wd]imi. */
void rotins (unsigned int x)
{
b.y = (x<<12) | (x>>20);
}
-/* { dg-final { scan-assembler-not "inm" } } */
+/* { dg-final { scan-assembler-not {\mrlwinm} } } */
+/* { dg-final { scan-assembler-not {\mrldic} } } */
+/* { dg-final { scan-assembler-not {\mrot[lr]} } } */
+/* { dg-final { scan-assembler-not {\ms[lr][wd]} } } */
+/* { dg-final { scan-assembler-times {\mrl[wd]imi} 1 } } */
diff --git a/gcc/testsuite/gcc.target/powerpc/direct-move-vector.c b/gcc/testsuite/gcc.target/powerpc/direct-move-vector.c
new file mode 100644
index 00000000000..1e8504ec66c
--- /dev/null
+++ b/gcc/testsuite/gcc.target/powerpc/direct-move-vector.c
@@ -0,0 +1,33 @@
+/* { dg-do compile { target { powerpc*-*-linux* && lp64 } } } */
+/* { dg-require-effective-target powerpc_p9vector_ok } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power9" } } */
+/* { dg-options "-mcpu=power9 -O2" } */
+
+/* Check code generation for direct move for long types. */
+
+void
+test (vector double *p)
+{
+ vector double v1 = *p;
+ vector double v2;
+ vector double v3;
+ vector double v4;
+
+ /* Force memory -> FPR load. */
+ __asm__ (" # reg %x0" : "+d" (v1));
+
+ /* force VSX -> GPR direct move. */
+ v2 = v1;
+ __asm__ (" # reg %0" : "+r" (v2));
+
+ /* Force GPR -> Altivec direct move. */
+ v3 = v2;
+ __asm__ (" # reg %x0" : "+v" (v3));
+ *p = v3;
+}
+
+/* { dg-final { scan-assembler "mfvsrd" } } */
+/* { dg-final { scan-assembler "mfvsrld" } } */
+/* { dg-final { scan-assembler "mtvsrdd" } } */
+
+
diff --git a/gcc/testsuite/gcc.target/powerpc/float128-hw.c b/gcc/testsuite/gcc.target/powerpc/float128-hw.c
new file mode 100644
index 00000000000..71a0c24a2f2
--- /dev/null
+++ b/gcc/testsuite/gcc.target/powerpc/float128-hw.c
@@ -0,0 +1,18 @@
+/* { dg-do compile { target { powerpc*-*-* && lp64 } } } */
+/* { dg-require-effective-target powerpc_float128_hw_ok } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power9" } } */
+/* { dg-options "-mcpu=power9 -O2" } */
+
+__float128 f128_add (__float128 a, __float128 b) { return a+b; }
+__float128 f128_sub (__float128 a, __float128 b) { return a-b; }
+__float128 f128_mul (__float128 a, __float128 b) { return a*b; }
+__float128 f128_div (__float128 a, __float128 b) { return a/b; }
+__float128 f128_fma (__float128 a, __float128 b, __float128 c) { return (a*b)+c; }
+long f128_cmove (__float128 a, __float128 b, long c, long d) { return (a == b) ? c : d; }
+
+/* { dg-final { scan-assembler "xsaddqp" } } */
+/* { dg-final { scan-assembler "xssubqp" } } */
+/* { dg-final { scan-assembler "xsmulqp" } } */
+/* { dg-final { scan-assembler "xsdivqp" } } */
+/* { dg-final { scan-assembler "xsmaddqp" } } */
+/* { dg-final { scan-assembler "xscmpuqp" } } */
diff --git a/gcc/testsuite/gcc.target/powerpc/maddld.c b/gcc/testsuite/gcc.target/powerpc/maddld.c
new file mode 100644
index 00000000000..c2b0c172080
--- /dev/null
+++ b/gcc/testsuite/gcc.target/powerpc/maddld.c
@@ -0,0 +1,20 @@
+/* { dg-do compile { target { powerpc*-*-* && lp64 } } } */
+/* { dg-require-effective-target powerpc_p9modulo_ok } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power9" } } */
+/* { dg-options "-mcpu=power9 -O2" } */
+
+long
+s_madd (long a, long b, long c)
+{
+ return (a * b) + c;
+}
+
+unsigned long
+u_madd (unsigned long a, unsigned long b, unsigned long c)
+{
+ return (a * b) + c;
+}
+
+/* { dg-final { scan-assembler-times "maddld " 2 } } */
+/* { dg-final { scan-assembler-not "mulld " } } */
+/* { dg-final { scan-assembler-not "add " } } */
diff --git a/gcc/testsuite/gcc.target/powerpc/pr67789.c b/gcc/testsuite/gcc.target/powerpc/pr67789.c
index d1bd0479cca..91fd1a18f3c 100644
--- a/gcc/testsuite/gcc.target/powerpc/pr67789.c
+++ b/gcc/testsuite/gcc.target/powerpc/pr67789.c
@@ -1,5 +1,6 @@
/* { dg-do assemble } */
/* { dg-options "-O2 -msecure-plt -fPIC" } */
+/* { dg-skip-if "" { powerpc*-*-darwin* powerpc-ibm-aix* } { "*" } { "" } } */
#define FE_TONEAREST 0
#define FE_UPWARD 1
diff --git a/gcc/testsuite/gfortran.dg/goacc/combined_loop.f90 b/gcc/testsuite/gfortran.dg/goacc/combined_loop.f90
index e0ea87af86d..6507ddaf33e 100644
--- a/gcc/testsuite/gfortran.dg/goacc/combined_loop.f90
+++ b/gcc/testsuite/gfortran.dg/goacc/combined_loop.f90
@@ -1,6 +1,4 @@
! { dg-do compile }
-! <http://news.gmane.org/find-root.php?message_id=%3C563B78B5.5090506%40acm.org%3E>
-! { dg-xfail-if "TODO" { *-*-* } }
!
! PR fortran/64726
diff --git a/gcc/testsuite/gfortran.dg/goacc/private-3.f95 b/gcc/testsuite/gfortran.dg/goacc/private-3.f95
index af7d683f818..349026350d4 100644
--- a/gcc/testsuite/gfortran.dg/goacc/private-3.f95
+++ b/gcc/testsuite/gfortran.dg/goacc/private-3.f95
@@ -1,6 +1,4 @@
! { dg-do compile }
-! <http://news.gmane.org/find-root.php?message_id=%3C563B78B5.5090506%40acm.org%3E>
-! { dg-xfail-if "TODO" { *-*-* } }
! test for private variables in a reduction clause
diff --git a/gcc/testsuite/gfortran.dg/module_private_2.f90 b/gcc/testsuite/gfortran.dg/module_private_2.f90
new file mode 100644
index 00000000000..847c58d5e37
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/module_private_2.f90
@@ -0,0 +1,34 @@
+! { dg-do compile }
+! { dg-options "-O2 -fdump-tree-optimized" }
+!
+! PR fortran/47266
+!
+! Check whether the private procedure "priv" is optimized away
+!
+module m
+ implicit none
+ private :: priv
+ private :: export1, export2
+ public :: pub
+contains
+ integer function priv()
+ priv = 44
+ end function priv
+ integer function export1()
+ export1 = 45
+ end function export1
+ function export2() bind(C) ! { dg-warning "is marked PRIVATE" }
+ use iso_c_binding, only: c_int
+ integer(c_int) :: export2
+ export2 = 46
+ end function export2
+ subroutine pub(a,b)
+ integer :: a
+ procedure(export1), pointer :: b
+ a = priv()
+ b => export1
+ end subroutine pub
+end module m
+! { dg-final { scan-tree-dump-times "priv" 0 "optimized" } }
+! { dg-final { scan-tree-dump-times "export1 \\(\\)" 1 "optimized" } }
+! { dg-final { scan-tree-dump-times "export2 \\(\\)" 1 "optimized" } }
diff --git a/gcc/testsuite/gfortran.dg/pr68318_1.f90 b/gcc/testsuite/gfortran.dg/pr68318_1.f90
new file mode 100644
index 00000000000..1a3d59402f6
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/pr68318_1.f90
@@ -0,0 +1,18 @@
+! { dg-do compile }
+! { dg-options "-O0"
+! PR fortran/68318
+! Original code submitted by Gerhard Steinmetz
+! <gerhard dot steinmetz dot fortran at t-online dot de>
+!
+module m
+ implicit none
+contains
+ subroutine s1
+ entry e ! { dg-error "(2)" }
+ end
+ subroutine s2
+ entry e ! { dg-error "is already defined" }
+ end
+end module
+! { dg-prune-output "Duplicate ENTRY attribute specified" }
+
diff --git a/gcc/testsuite/gfortran.dg/pr68318_2.f90 b/gcc/testsuite/gfortran.dg/pr68318_2.f90
new file mode 100644
index 00000000000..451b28f2a47
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/pr68318_2.f90
@@ -0,0 +1,22 @@
+! { dg-do compile }
+! PR fortran/68318
+! Original code submitted by Gerhard Steinmetz
+! <gerhard dot steinmetz dot fortran at t-online dot de>
+!
+module m1
+ implicit none
+contains
+ subroutine s1
+ entry e
+ end
+end module
+
+module m2
+ use m1 ! { dg-error "(2)" }
+ implicit none
+contains
+ subroutine s2
+ entry e ! { dg-error "is already defined" }
+ end
+end module
+! { dg-prune-output "Cannot change attribute" }
diff --git a/gcc/testsuite/gfortran.dg/pr68319.f90 b/gcc/testsuite/gfortran.dg/pr68319.f90
new file mode 100644
index 00000000000..941316d71e7
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/pr68319.f90
@@ -0,0 +1,26 @@
+! { dg-do compile }
+! PR fortran/68319
+!
+subroutine foo
+
+ interface
+
+ real function bar(i)
+ f(i) = 2 * i ! { dg-error "cannot appear within" }
+ end function bar
+
+ real function bah(j)
+ entry boo(j) ! { dg-error "cannot appear within" }
+ end function bah
+
+ real function fu(j)
+ data i /1/ ! { dg-error "cannot appear within" }
+ end function fu
+
+ real function fee(j)
+10 format('(A)') ! { dg-error "cannot appear within" }
+ end function fee
+
+ end interface
+
+end subroutine foo
diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp
index 75d50682922..328d483226e 100644
--- a/gcc/testsuite/lib/target-supports.exp
+++ b/gcc/testsuite/lib/target-supports.exp
@@ -6716,3 +6716,11 @@ proc check_effective_target_vect_max_reduc { } {
}
return 0
}
+
+# Return 1 if there is an nvptx offload compiler.
+
+proc check_effective_target_offload_nvptx { } {
+ return [check_no_compiler_messages offload_nvptx object {
+ int main () {return 0;}
+ } "-foffload=nvptx-none" ]
+}
diff --git a/gcc/timevar.def b/gcc/timevar.def
index b429faf6d55..45e3b709af1 100644
--- a/gcc/timevar.def
+++ b/gcc/timevar.def
@@ -252,6 +252,7 @@ DEFTIMEVAR (TV_GCSE_AFTER_RELOAD , "load CSE after reload")
DEFTIMEVAR (TV_REE , "ree")
DEFTIMEVAR (TV_THREAD_PROLOGUE_AND_EPILOGUE, "thread pro- & epilogue")
DEFTIMEVAR (TV_IFCVT2 , "if-conversion 2")
+DEFTIMEVAR (TV_SPLIT_PATHS , "split paths")
DEFTIMEVAR (TV_COMBINE_STACK_ADJUST , "combine stack adjustments")
DEFTIMEVAR (TV_PEEPHOLE2 , "peephole 2")
DEFTIMEVAR (TV_RENAME_REGISTERS , "rename registers")
diff --git a/gcc/toplev.c b/gcc/toplev.c
index 140e36ff237..588d89dce89 100644
--- a/gcc/toplev.c
+++ b/gcc/toplev.c
@@ -1130,6 +1130,7 @@ general_init (const char *argv0, bool init_signals)
linemap_init (line_table, BUILTINS_LOCATION);
line_table->reallocator = realloc_for_line_map;
line_table->round_alloc_size = ggc_round_alloc_size;
+ line_table->default_range_bits = 5;
init_ttree ();
/* Initialize register usage now so switches may override. */
diff --git a/gcc/tracer.c b/gcc/tracer.c
index 941dc204eee..c2dba4c2503 100644
--- a/gcc/tracer.c
+++ b/gcc/tracer.c
@@ -51,9 +51,9 @@
#include "tree-inline.h"
#include "cfgloop.h"
#include "fibonacci_heap.h"
+#include "tracer.h"
static int count_insns (basic_block);
-static bool ignore_bb_p (const_basic_block);
static bool better_p (const_edge, const_edge);
static edge find_best_successor (basic_block);
static edge find_best_predecessor (basic_block);
@@ -85,7 +85,7 @@ bb_seen_p (basic_block bb)
}
/* Return true if we should ignore the basic block for purposes of tracing. */
-static bool
+bool
ignore_bb_p (const_basic_block bb)
{
if (bb->index < NUM_FIXED_BLOCKS)
@@ -226,6 +226,24 @@ find_trace (basic_block bb, basic_block *trace)
return i;
}
+/* Duplicate block BB2, placing it after BB in the CFG. Return the
+ newly created block. */
+basic_block
+transform_duplicate (basic_block bb, basic_block bb2)
+{
+ edge e;
+ basic_block copy;
+
+ e = find_edge (bb, bb2);
+
+ copy = duplicate_block (bb2, e, bb);
+ flush_pending_stmts (e);
+
+ add_phi_args_after_copy (&copy, 1, NULL);
+
+ return (copy);
+}
+
/* Look for basic blocks in frequency order, construct traces and tail duplicate
if profitable. */
@@ -321,17 +339,8 @@ tail_duplicate (void)
entries or at least rotate the loop. */
&& bb2->loop_father->header != bb2)
{
- edge e;
- basic_block copy;
-
nduplicated += counts [bb2->index];
-
- e = find_edge (bb, bb2);
-
- copy = duplicate_block (bb2, e, bb);
- flush_pending_stmts (e);
-
- add_phi_args_after_copy (&copy, 1, NULL);
+ basic_block copy = transform_duplicate (bb, bb2);
/* Reconsider the original copy of block we've duplicated.
Removing the most common predecessor may make it to be
diff --git a/gcc/tracer.h b/gcc/tracer.h
new file mode 100644
index 00000000000..cd1792a73fb
--- /dev/null
+++ b/gcc/tracer.h
@@ -0,0 +1,26 @@
+/* Header file for Tracer.
+ Copyright (C) 2015 Free Software Foundation, Inc.
+
+This file is part of GCC.
+
+GCC is free software; you can redistribute it and/or modify it under
+the terms of the GNU General Public License as published by the Free
+Software Foundation; either version 3, or (at your option) any later
+version.
+
+GCC is distributed in the hope that it will be useful, but WITHOUT ANY
+WARRANTY; without even the implied warranty of MERCHANTABILITY or
+FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+You should have received a copy of the GNU General Public License
+along with GCC; see the file COPYING3. If not see
+<http://www.gnu.org/licenses/>. */
+
+#ifndef GCC_TRACER_H
+#define GCC_TRACER_H
+
+extern basic_block transform_duplicate (basic_block bb, basic_block bb2);
+extern bool ignore_bb_p (const_basic_block bb);
+
+#endif /* GCC_TRACER_H */
diff --git a/gcc/tree-call-cdce.c b/gcc/tree-call-cdce.c
index a5f38ce1331..fbcc70baed5 100644
--- a/gcc/tree-call-cdce.c
+++ b/gcc/tree-call-cdce.c
@@ -51,10 +51,11 @@ along with GCC; see the file COPYING3. If not see
built_in_call (args)
An actual simple example is :
- log (x); // Mostly dead call
+ log (x); // Mostly dead call
==>
- if (x <= 0)
- log (x);
+ if (__builtin_islessequal (x, 0))
+ log (x);
+
With this change, call to log (x) is effectively eliminated, as
in majority of the cases, log won't be called with x out of
range. The branch is totally predictable, so the branch cost
@@ -306,15 +307,13 @@ is_call_dce_candidate (gcall *call)
}
-/* A helper function to generate gimple statements for
- one bound comparison. ARG is the call argument to
- be compared with the bound, LBUB is the bound value
- in integer, TCODE is the tree_code of the comparison,
- TEMP_NAME1/TEMP_NAME2 are names of the temporaries,
- CONDS is a vector holding the produced GIMPLE statements,
- and NCONDS points to the variable holding the number
- of logical comparisons. CONDS is either empty or
- a list ended with a null tree. */
+/* A helper function to generate gimple statements for one bound
+ comparison, so that the built-in function is called whenever
+ TCODE <ARG, LBUB> is *false*. TEMP_NAME1/TEMP_NAME2 are names
+ of the temporaries, CONDS is a vector holding the produced GIMPLE
+ statements, and NCONDS points to the variable holding the number of
+ logical comparisons. CONDS is either empty or a list ended with a
+ null tree. */
static void
gen_one_condition (tree arg, int lbub,
@@ -371,7 +370,7 @@ gen_conditions_for_domain (tree arg, inp_domain domain,
if (domain.has_lb)
gen_one_condition (arg, domain.lb,
(domain.is_lb_inclusive
- ? LT_EXPR : LE_EXPR),
+ ? UNGE_EXPR : UNGT_EXPR),
"DCE_COND_LB", "DCE_COND_LB_TEST",
conds, nconds);
@@ -383,7 +382,7 @@ gen_conditions_for_domain (tree arg, inp_domain domain,
gen_one_condition (arg, domain.ub,
(domain.is_ub_inclusive
- ? GT_EXPR : GE_EXPR),
+ ? UNLE_EXPR : UNLT_EXPR),
"DCE_COND_UB", "DCE_COND_UB_TEST",
conds, nconds);
}
@@ -395,7 +394,7 @@ gen_conditions_for_domain (tree arg, inp_domain domain,
See candidate selection in check_pow. Since the
candidates' base values have a limited range,
the guarded code generated for y are simple:
- if (y > max_y)
+ if (__builtin_isgreater (y, max_y))
pow (const, y);
Note max_y can be computed separately for each
const base, but in this implementation, we
@@ -480,11 +479,11 @@ gen_conditions_for_pow_int_base (tree base, tree expn,
/* For pow ((double)x, y), generate the following conditions:
cond 1:
temp1 = x;
- if (temp1 <= 0)
+ if (__builtin_islessequal (temp1, 0))
cond 2:
temp2 = y;
- if (temp2 > max_exp_real_cst) */
+ if (__builtin_isgreater (temp2, max_exp_real_cst)) */
/* Generate condition in reverse order -- first
the condition for the exp argument. */
@@ -508,7 +507,7 @@ gen_conditions_for_pow_int_base (tree base, tree expn,
stmt1 = gimple_build_assign (temp, base_val0);
tempn = make_ssa_name (temp, stmt1);
gimple_assign_set_lhs (stmt1, tempn);
- stmt2 = gimple_build_cond (LE_EXPR, tempn, cst0, NULL_TREE, NULL_TREE);
+ stmt2 = gimple_build_cond (GT_EXPR, tempn, cst0, NULL_TREE, NULL_TREE);
conds.quick_push (stmt1);
conds.quick_push (stmt2);
@@ -797,11 +796,11 @@ shrink_wrap_one_built_in_call (gcall *bi_call)
bi_call_in_edge0 = split_block (bi_call_bb, cond_expr);
bi_call_in_edge0->flags &= ~EDGE_FALLTHRU;
- bi_call_in_edge0->flags |= EDGE_TRUE_VALUE;
+ bi_call_in_edge0->flags |= EDGE_FALSE_VALUE;
guard_bb = bi_call_bb;
bi_call_bb = bi_call_in_edge0->dest;
join_tgt_in_edge_fall_thru = make_edge (guard_bb, join_tgt_bb,
- EDGE_FALSE_VALUE);
+ EDGE_TRUE_VALUE);
bi_call_in_edge0->probability = REG_BR_PROB_BASE * ERR_PROB;
bi_call_in_edge0->count =
@@ -834,9 +833,9 @@ shrink_wrap_one_built_in_call (gcall *bi_call)
gcc_assert (cond_expr && gimple_code (cond_expr) == GIMPLE_COND);
guard_bb_in_edge = split_block (guard_bb, cond_expr);
guard_bb_in_edge->flags &= ~EDGE_FALLTHRU;
- guard_bb_in_edge->flags |= EDGE_FALSE_VALUE;
+ guard_bb_in_edge->flags |= EDGE_TRUE_VALUE;
- bi_call_in_edge = make_edge (guard_bb, bi_call_bb, EDGE_TRUE_VALUE);
+ bi_call_in_edge = make_edge (guard_bb, bi_call_bb, EDGE_FALSE_VALUE);
bi_call_in_edge->probability = REG_BR_PROB_BASE * ERR_PROB;
bi_call_in_edge->count =
diff --git a/gcc/tree-cfg.c b/gcc/tree-cfg.c
index 5d98eec9f18..0c624aa3f3e 100644
--- a/gcc/tree-cfg.c
+++ b/gcc/tree-cfg.c
@@ -6719,10 +6719,7 @@ move_block_to_fn (struct function *dest_cfun, basic_block bb,
continue;
if (d->orig_block == NULL_TREE || block == d->orig_block)
{
- if (d->new_block == NULL_TREE)
- locus = LOCATION_LOCUS (locus);
- else
- locus = COMBINE_LOCATION_DATA (line_table, locus, d->new_block);
+ locus = set_block (locus, d->new_block);
gimple_phi_arg_set_location (phi, i, locus);
}
}
@@ -6782,9 +6779,7 @@ move_block_to_fn (struct function *dest_cfun, basic_block bb,
tree block = LOCATION_BLOCK (e->goto_locus);
if (d->orig_block == NULL_TREE
|| block == d->orig_block)
- e->goto_locus = d->new_block ?
- COMBINE_LOCATION_DATA (line_table, e->goto_locus, d->new_block) :
- LOCATION_LOCUS (e->goto_locus);
+ e->goto_locus = set_block (e->goto_locus, d->new_block);
}
}
diff --git a/gcc/tree-inline.c b/gcc/tree-inline.c
index 17d97a8712e..205c869b88e 100644
--- a/gcc/tree-inline.c
+++ b/gcc/tree-inline.c
@@ -2348,10 +2348,7 @@ copy_phis_for_bb (basic_block bb, copy_body_data *id)
tree *n;
n = id->decl_map->get (LOCATION_BLOCK (locus));
gcc_assert (n);
- if (*n)
- locus = COMBINE_LOCATION_DATA (line_table, locus, *n);
- else
- locus = LOCATION_LOCUS (locus);
+ locus = set_block (locus, *n);
}
else
locus = LOCATION_LOCUS (locus);
diff --git a/gcc/tree-parloops.c b/gcc/tree-parloops.c
index 3d41275c4d3..17415a831a1 100644
--- a/gcc/tree-parloops.c
+++ b/gcc/tree-parloops.c
@@ -1695,10 +1695,15 @@ transform_to_exit_first_loop_alt (struct loop *loop,
/* Set the latch arguments of the new phis to ivtmp/sum_b. */
flush_pending_stmts (post_inc_edge);
- /* Create a new empty exit block, inbetween the new loop header and the old
- exit block. The function separate_decls_in_region needs this block to
- insert code that is active on loop exit, but not any other path. */
- basic_block new_exit_block = split_edge (exit);
+
+ basic_block new_exit_block = NULL;
+ if (!single_pred_p (exit->dest))
+ {
+ /* Create a new empty exit block, inbetween the new loop header and the
+ old exit block. The function separate_decls_in_region needs this block
+ to insert code that is active on loop exit, but not any other path. */
+ new_exit_block = split_edge (exit);
+ }
/* Insert and register the reduction exit phis. */
for (gphi_iterator gsi = gsi_start_phis (exit_block);
@@ -1706,17 +1711,24 @@ transform_to_exit_first_loop_alt (struct loop *loop,
gsi_next (&gsi))
{
gphi *phi = gsi.phi ();
+ gphi *nphi = NULL;
tree res_z = PHI_RESULT (phi);
+ tree res_c;
- /* Now that we have a new exit block, duplicate the phi of the old exit
- block in the new exit block to preserve loop-closed ssa. */
- edge succ_new_exit_block = single_succ_edge (new_exit_block);
- edge pred_new_exit_block = single_pred_edge (new_exit_block);
- tree res_y = copy_ssa_name (res_z, phi);
- gphi *nphi = create_phi_node (res_y, new_exit_block);
- tree res_c = PHI_ARG_DEF_FROM_EDGE (phi, succ_new_exit_block);
- add_phi_arg (nphi, res_c, pred_new_exit_block, UNKNOWN_LOCATION);
- add_phi_arg (phi, res_y, succ_new_exit_block, UNKNOWN_LOCATION);
+ if (new_exit_block != NULL)
+ {
+ /* Now that we have a new exit block, duplicate the phi of the old
+ exit block in the new exit block to preserve loop-closed ssa. */
+ edge succ_new_exit_block = single_succ_edge (new_exit_block);
+ edge pred_new_exit_block = single_pred_edge (new_exit_block);
+ tree res_y = copy_ssa_name (res_z, phi);
+ nphi = create_phi_node (res_y, new_exit_block);
+ res_c = PHI_ARG_DEF_FROM_EDGE (phi, succ_new_exit_block);
+ add_phi_arg (nphi, res_c, pred_new_exit_block, UNKNOWN_LOCATION);
+ add_phi_arg (phi, res_y, succ_new_exit_block, UNKNOWN_LOCATION);
+ }
+ else
+ res_c = PHI_ARG_DEF_FROM_EDGE (phi, exit);
if (virtual_operand_p (res_z))
continue;
@@ -1724,7 +1736,9 @@ transform_to_exit_first_loop_alt (struct loop *loop,
gimple *reduc_phi = SSA_NAME_DEF_STMT (res_c);
struct reduction_info *red = reduction_phi (reduction_list, reduc_phi);
if (red != NULL)
- red->keep_res = nphi;
+ red->keep_res = (nphi != NULL
+ ? nphi
+ : phi);
}
/* We're going to cancel the loop at the end of gen_parallel_loop, but until
@@ -1972,10 +1986,9 @@ transform_to_exit_first_loop (struct loop *loop,
/* Create the parallel constructs for LOOP as described in gen_parallel_loop.
LOOP_FN and DATA are the arguments of GIMPLE_OMP_PARALLEL.
NEW_DATA is the variable that should be initialized from the argument
- of LOOP_FN. N_THREADS is the requested number of threads. Returns the
- basic block containing GIMPLE_OMP_PARALLEL tree. */
+ of LOOP_FN. N_THREADS is the requested number of threads. */
-static basic_block
+static void
create_parallel_loop (struct loop *loop, tree loop_fn, tree data,
tree new_data, unsigned n_threads, location_t loc)
{
@@ -2148,8 +2161,6 @@ create_parallel_loop (struct loop *loop, tree loop_fn, tree data,
/* After the above dom info is hosed. Re-compute it. */
free_dominance_info (CDI_DOMINATORS);
calculate_dominance_info (CDI_DOMINATORS);
-
- return paral_bb;
}
/* Generates code to execute the iterations of LOOP in N_THREADS
diff --git a/gcc/tree-pass.h b/gcc/tree-pass.h
index 49e22a9d091..da677617826 100644
--- a/gcc/tree-pass.h
+++ b/gcc/tree-pass.h
@@ -390,6 +390,7 @@ extern gimple_opt_pass *make_pass_tree_loop_done (gcc::context *ctxt);
extern gimple_opt_pass *make_pass_ch (gcc::context *ctxt);
extern gimple_opt_pass *make_pass_ch_vect (gcc::context *ctxt);
extern gimple_opt_pass *make_pass_ccp (gcc::context *ctxt);
+extern gimple_opt_pass *make_pass_split_paths (gcc::context *ctxt);
extern gimple_opt_pass *make_pass_phi_only_cprop (gcc::context *ctxt);
extern gimple_opt_pass *make_pass_build_ssa (gcc::context *ctxt);
extern gimple_opt_pass *make_pass_build_alias (gcc::context *ctxt);
diff --git a/gcc/tree-pretty-print.c b/gcc/tree-pretty-print.c
index 3f0a4e6cfe0..caec7605814 100644
--- a/gcc/tree-pretty-print.c
+++ b/gcc/tree-pretty-print.c
@@ -654,6 +654,12 @@ dump_omp_clause (pretty_printer *pp, tree clause, int spc, int flags)
case GOMP_MAP_ALWAYS_POINTER:
pp_string (pp, "always_pointer");
break;
+ case GOMP_MAP_DEVICE_RESIDENT:
+ pp_string (pp, "device_resident");
+ break;
+ case GOMP_MAP_LINK:
+ pp_string (pp, "link");
+ break;
default:
gcc_unreachable ();
}
diff --git a/gcc/tree-sra.c b/gcc/tree-sra.c
index 30aee19aae7..2835c993588 100644
--- a/gcc/tree-sra.c
+++ b/gcc/tree-sra.c
@@ -4996,9 +4996,9 @@ convert_callers_for_node (struct cgraph_node *node,
if (dump_file)
fprintf (dump_file, "Adjusting call %s/%i -> %s/%i\n",
- xstrdup (cs->caller->name ()),
+ xstrdup_for_dump (cs->caller->name ()),
cs->caller->order,
- xstrdup (cs->callee->name ()),
+ xstrdup_for_dump (cs->callee->name ()),
cs->callee->order);
ipa_modify_call_arguments (cs, cs->call_stmt, *adjustments);
diff --git a/gcc/tree-vect-data-refs.c b/gcc/tree-vect-data-refs.c
index 87936ddee1d..f9327d7d899 100644
--- a/gcc/tree-vect-data-refs.c
+++ b/gcc/tree-vect-data-refs.c
@@ -537,32 +537,17 @@ vect_slp_analyze_data_ref_dependence (struct data_dependence_relation *ddr)
dump_printf (MSG_NOTE, "\n");
}
- /* We do not vectorize basic blocks with write-write dependencies. */
- if (DR_IS_WRITE (dra) && DR_IS_WRITE (drb))
- return true;
-
- /* If we have a read-write dependence check that the load is before the store.
- When we vectorize basic blocks, vector load can be only before
- corresponding scalar load, and vector store can be only after its
- corresponding scalar store. So the order of the acceses is preserved in
- case the load is before the store. */
- gimple *earlier_stmt = get_earlier_stmt (DR_STMT (dra), DR_STMT (drb));
- if (DR_IS_READ (STMT_VINFO_DATA_REF (vinfo_for_stmt (earlier_stmt))))
- {
- /* That only holds for load-store pairs taking part in vectorization. */
- if (STMT_VINFO_VECTORIZABLE (vinfo_for_stmt (DR_STMT (dra)))
- && STMT_VINFO_VECTORIZABLE (vinfo_for_stmt (DR_STMT (drb))))
- return false;
- }
-
return true;
}
-/* Analyze dependences involved in the transform of SLP NODE. */
+/* Analyze dependences involved in the transform of SLP NODE. STORES
+ contain the vector of scalar stores of this instance if we are
+ disambiguating the loads. */
static bool
-vect_slp_analyze_node_dependences (slp_instance instance, slp_tree node)
+vect_slp_analyze_node_dependences (slp_instance instance, slp_tree node,
+ vec<gimple *> stores, gimple *last_store)
{
/* This walks over all stmts involved in the SLP load/store done
in NODE verifying we can sink them up to the last stmt in the
@@ -584,15 +569,40 @@ vect_slp_analyze_node_dependences (slp_instance instance, slp_tree node)
/* If we couldn't record a (single) data reference for this
stmt we have to give up. */
+ /* ??? Here and below if dependence analysis fails we can resort
+ to the alias oracle which can handle more kinds of stmts. */
data_reference *dr_b = STMT_VINFO_DATA_REF (vinfo_for_stmt (stmt));
if (!dr_b)
return false;
+ /* If we run into a store of this same instance (we've just
+ marked those) then delay dependence checking until we run
+ into the last store because this is where it will have
+ been sunk to (and we verify if we can do that as well). */
+ if (gimple_visited_p (stmt))
+ {
+ if (stmt != last_store)
+ continue;
+ unsigned i;
+ gimple *store;
+ FOR_EACH_VEC_ELT (stores, i, store)
+ {
+ data_reference *store_dr
+ = STMT_VINFO_DATA_REF (vinfo_for_stmt (store));
+ ddr_p ddr = initialize_data_dependence_relation
+ (dr_a, store_dr, vNULL);
+ if (vect_slp_analyze_data_ref_dependence (ddr))
+ {
+ free_dependence_relation (ddr);
+ return false;
+ }
+ free_dependence_relation (ddr);
+ }
+ }
+
ddr_p ddr = initialize_data_dependence_relation (dr_a, dr_b, vNULL);
if (vect_slp_analyze_data_ref_dependence (ddr))
{
- /* ??? If the dependence analysis failed we can resort to the
- alias oracle which can handle more kinds of stmts. */
free_dependence_relation (ddr);
return false;
}
@@ -610,51 +620,53 @@ vect_slp_analyze_node_dependences (slp_instance instance, slp_tree node)
the maximum vectorization factor the data dependences allow. */
bool
-vect_slp_analyze_data_ref_dependences (bb_vec_info bb_vinfo)
+vect_slp_analyze_instance_dependence (slp_instance instance)
{
if (dump_enabled_p ())
dump_printf_loc (MSG_NOTE, vect_location,
- "=== vect_slp_analyze_data_ref_dependences ===\n");
+ "=== vect_slp_analyze_instance_dependence ===\n");
- slp_instance instance;
- slp_tree load;
- unsigned int i, j;
- for (i = 0; BB_VINFO_SLP_INSTANCES (bb_vinfo).iterate (i, &instance); )
+ /* The stores of this instance are at the root of the SLP tree. */
+ slp_tree store = SLP_INSTANCE_TREE (instance);
+ if (! STMT_VINFO_DATA_REF (vinfo_for_stmt (SLP_TREE_SCALAR_STMTS (store)[0])))
+ store = NULL;
+
+ /* Verify we can sink stores to the vectorized stmt insert location. */
+ gimple *last_store = NULL;
+ if (store)
{
- bool remove = false;
- /* Verify we can sink loads to the vectorized stmt insert location. */
- FOR_EACH_VEC_ELT (SLP_INSTANCE_LOADS (instance), j, load)
- if (! vect_slp_analyze_node_dependences (instance, load))
- {
- remove = true;
- break;
- }
- /* Verify we can sink stores to the vectorized stmt insert location. */
- slp_tree store = SLP_INSTANCE_TREE (instance);
- if (!remove
- && STMT_VINFO_DATA_REF
- (vinfo_for_stmt (SLP_TREE_SCALAR_STMTS (store)[0]))
- && ! vect_slp_analyze_node_dependences (instance, store))
- remove = true;
- if (remove)
- {
- dump_printf_loc (MSG_NOTE, vect_location,
- "removing SLP instance operations starting from: ");
- dump_gimple_stmt (MSG_NOTE, TDF_SLIM,
- SLP_TREE_SCALAR_STMTS
- (SLP_INSTANCE_TREE (instance))[0], 0);
- vect_free_slp_instance (instance);
- BB_VINFO_SLP_INSTANCES (bb_vinfo).ordered_remove (i);
- }
- i++;
+ if (! vect_slp_analyze_node_dependences (instance, store, vNULL, NULL))
+ return false;
+
+ /* Mark stores in this instance and remember the last one. */
+ last_store = vect_find_last_scalar_stmt_in_slp (store);
+ for (unsigned k = 0; k < SLP_INSTANCE_GROUP_SIZE (instance); ++k)
+ gimple_set_visited (SLP_TREE_SCALAR_STMTS (store)[k], true);
}
- if (!BB_VINFO_SLP_INSTANCES (bb_vinfo).length ())
- return false;
+ bool res = true;
- return true;
-}
+ /* Verify we can sink loads to the vectorized stmt insert location,
+ special-casing stores of this instance. */
+ slp_tree load;
+ unsigned int i;
+ FOR_EACH_VEC_ELT (SLP_INSTANCE_LOADS (instance), i, load)
+ if (! vect_slp_analyze_node_dependences (instance, load,
+ store
+ ? SLP_TREE_SCALAR_STMTS (store)
+ : vNULL, last_store))
+ {
+ res = false;
+ break;
+ }
+ /* Unset the visited flag. */
+ if (store)
+ for (unsigned k = 0; k < SLP_INSTANCE_GROUP_SIZE (instance); ++k)
+ gimple_set_visited (SLP_TREE_SCALAR_STMTS (store)[k], false);
+
+ return res;
+}
/* Function vect_compute_data_ref_alignment
@@ -668,7 +680,7 @@ vect_slp_analyze_data_ref_dependences (bb_vec_info bb_vinfo)
FOR NOW: No analysis is actually performed. Misalignment is calculated
only for trivial cases. TODO. */
-static bool
+bool
vect_compute_data_ref_alignment (struct data_reference *dr)
{
gimple *stmt = DR_STMT (dr);
@@ -838,45 +850,6 @@ vect_compute_data_ref_alignment (struct data_reference *dr)
}
-/* Function vect_compute_data_refs_alignment
-
- Compute the misalignment of data references in the loop.
- Return FALSE if a data reference is found that cannot be vectorized. */
-
-static bool
-vect_compute_data_refs_alignment (vec_info *vinfo)
-{
- vec<data_reference_p> datarefs = vinfo->datarefs;
- struct data_reference *dr;
- unsigned int i;
-
- FOR_EACH_VEC_ELT (datarefs, i, dr)
- {
- stmt_vec_info stmt_info = vinfo_for_stmt (DR_STMT (dr));
- if (STMT_VINFO_VECTORIZABLE (stmt_info)
- && !vect_compute_data_ref_alignment (dr))
- {
- /* Strided accesses perform only component accesses, misalignment
- information is irrelevant for them. */
- if (STMT_VINFO_STRIDED_P (stmt_info)
- && !STMT_VINFO_GROUPED_ACCESS (stmt_info))
- continue;
-
- if (is_a <bb_vec_info> (vinfo))
- {
- /* Mark unsupported statement as unvectorizable. */
- STMT_VINFO_VECTORIZABLE (vinfo_for_stmt (DR_STMT (dr))) = false;
- continue;
- }
- else
- return false;
- }
- }
-
- return true;
-}
-
-
/* Function vect_update_misalignment_for_peel
DR - the data reference whose misalignment is to be adjusted.
@@ -936,17 +909,51 @@ vect_update_misalignment_for_peel (struct data_reference *dr,
}
+/* Function verify_data_ref_alignment
+
+ Return TRUE if DR can be handled with respect to alignment. */
+
+static bool
+verify_data_ref_alignment (data_reference_p dr)
+{
+ enum dr_alignment_support supportable_dr_alignment
+ = vect_supportable_dr_alignment (dr, false);
+ if (!supportable_dr_alignment)
+ {
+ if (dump_enabled_p ())
+ {
+ if (DR_IS_READ (dr))
+ dump_printf_loc (MSG_MISSED_OPTIMIZATION, vect_location,
+ "not vectorized: unsupported unaligned load.");
+ else
+ dump_printf_loc (MSG_MISSED_OPTIMIZATION, vect_location,
+ "not vectorized: unsupported unaligned "
+ "store.");
+
+ dump_generic_expr (MSG_MISSED_OPTIMIZATION, TDF_SLIM,
+ DR_REF (dr));
+ dump_printf (MSG_MISSED_OPTIMIZATION, "\n");
+ }
+ return false;
+ }
+
+ if (supportable_dr_alignment != dr_aligned && dump_enabled_p ())
+ dump_printf_loc (MSG_NOTE, vect_location,
+ "Vectorizing an unaligned access.\n");
+
+ return true;
+}
+
/* Function vect_verify_datarefs_alignment
Return TRUE if all data references in the loop can be
handled with respect to alignment. */
bool
-vect_verify_datarefs_alignment (vec_info *vinfo)
+vect_verify_datarefs_alignment (loop_vec_info vinfo)
{
vec<data_reference_p> datarefs = vinfo->datarefs;
struct data_reference *dr;
- enum dr_alignment_support supportable_dr_alignment;
unsigned int i;
FOR_EACH_VEC_ELT (datarefs, i, dr)
@@ -957,42 +964,21 @@ vect_verify_datarefs_alignment (vec_info *vinfo)
if (!STMT_VINFO_RELEVANT_P (stmt_info))
continue;
- /* For interleaving, only the alignment of the first access matters.
- Skip statements marked as not vectorizable. */
- if ((STMT_VINFO_GROUPED_ACCESS (stmt_info)
- && GROUP_FIRST_ELEMENT (stmt_info) != stmt)
- || !STMT_VINFO_VECTORIZABLE (stmt_info))
- continue;
+ /* For interleaving, only the alignment of the first access matters. */
+ if (STMT_VINFO_GROUPED_ACCESS (stmt_info)
+ && GROUP_FIRST_ELEMENT (stmt_info) != stmt)
+ return true;
/* Strided accesses perform only component accesses, alignment is
irrelevant for them. */
if (STMT_VINFO_STRIDED_P (stmt_info)
&& !STMT_VINFO_GROUPED_ACCESS (stmt_info))
- continue;
-
- supportable_dr_alignment = vect_supportable_dr_alignment (dr, false);
- if (!supportable_dr_alignment)
- {
- if (dump_enabled_p ())
- {
- if (DR_IS_READ (dr))
- dump_printf_loc (MSG_MISSED_OPTIMIZATION, vect_location,
- "not vectorized: unsupported unaligned load.");
- else
- dump_printf_loc (MSG_MISSED_OPTIMIZATION, vect_location,
- "not vectorized: unsupported unaligned "
- "store.");
+ return true;
- dump_generic_expr (MSG_MISSED_OPTIMIZATION, TDF_SLIM,
- DR_REF (dr));
- dump_printf (MSG_MISSED_OPTIMIZATION, "\n");
- }
- return false;
- }
- if (supportable_dr_alignment != dr_aligned && dump_enabled_p ())
- dump_printf_loc (MSG_NOTE, vect_location,
- "Vectorizing an unaligned access.\n");
+ if (! verify_data_ref_alignment (dr))
+ return false;
}
+
return true;
}
@@ -2064,7 +2050,7 @@ vect_find_same_alignment_drs (struct data_dependence_relation *ddr,
Return FALSE if a data reference is found that cannot be vectorized. */
bool
-vect_analyze_data_refs_alignment (vec_info *vinfo)
+vect_analyze_data_refs_alignment (loop_vec_info vinfo)
{
if (dump_enabled_p ())
dump_printf_loc (MSG_NOTE, vect_location,
@@ -2072,28 +2058,94 @@ vect_analyze_data_refs_alignment (vec_info *vinfo)
/* Mark groups of data references with same alignment using
data dependence information. */
- if (is_a <loop_vec_info> (vinfo))
+ vec<ddr_p> ddrs = vinfo->ddrs;
+ struct data_dependence_relation *ddr;
+ unsigned int i;
+
+ FOR_EACH_VEC_ELT (ddrs, i, ddr)
+ vect_find_same_alignment_drs (ddr, vinfo);
+
+ vec<data_reference_p> datarefs = vinfo->datarefs;
+ struct data_reference *dr;
+
+ FOR_EACH_VEC_ELT (datarefs, i, dr)
{
- vec<ddr_p> ddrs = vinfo->ddrs;
- struct data_dependence_relation *ddr;
- unsigned int i;
+ stmt_vec_info stmt_info = vinfo_for_stmt (DR_STMT (dr));
+ if (STMT_VINFO_VECTORIZABLE (stmt_info)
+ && !vect_compute_data_ref_alignment (dr))
+ {
+ /* Strided accesses perform only component accesses, misalignment
+ information is irrelevant for them. */
+ if (STMT_VINFO_STRIDED_P (stmt_info)
+ && !STMT_VINFO_GROUPED_ACCESS (stmt_info))
+ continue;
+
+ if (dump_enabled_p ())
+ dump_printf_loc (MSG_MISSED_OPTIMIZATION, vect_location,
+ "not vectorized: can't calculate alignment "
+ "for data ref.\n");
- FOR_EACH_VEC_ELT (ddrs, i, ddr)
- vect_find_same_alignment_drs (ddr, as_a <loop_vec_info> (vinfo));
+ return false;
+ }
}
- if (!vect_compute_data_refs_alignment (vinfo))
+ return true;
+}
+
+
+/* Analyze alignment of DRs of stmts in NODE. */
+
+static bool
+vect_slp_analyze_and_verify_node_alignment (slp_tree node)
+{
+ /* We vectorize from the first scalar stmt in the node unless
+ the node is permuted in which case we start from the first
+ element in the group. */
+ gimple *first_stmt = SLP_TREE_SCALAR_STMTS (node)[0];
+ if (SLP_TREE_LOAD_PERMUTATION (node).exists ())
+ first_stmt = GROUP_FIRST_ELEMENT (vinfo_for_stmt (first_stmt));
+
+ data_reference_p dr = STMT_VINFO_DATA_REF (vinfo_for_stmt (first_stmt));
+ if (! vect_compute_data_ref_alignment (dr)
+ || ! verify_data_ref_alignment (dr))
{
if (dump_enabled_p ())
dump_printf_loc (MSG_MISSED_OPTIMIZATION, vect_location,
- "not vectorized: can't calculate alignment "
- "for data ref.\n");
+ "not vectorized: bad data alignment in basic "
+ "block.\n");
return false;
}
return true;
}
+/* Function vect_slp_analyze_instance_alignment
+
+ Analyze the alignment of the data-references in the SLP instance.
+ Return FALSE if a data reference is found that cannot be vectorized. */
+
+bool
+vect_slp_analyze_and_verify_instance_alignment (slp_instance instance)
+{
+ if (dump_enabled_p ())
+ dump_printf_loc (MSG_NOTE, vect_location,
+ "=== vect_slp_analyze_and_verify_instance_alignment ===\n");
+
+ slp_tree node;
+ unsigned i;
+ FOR_EACH_VEC_ELT (SLP_INSTANCE_LOADS (instance), i, node)
+ if (! vect_slp_analyze_and_verify_node_alignment (node))
+ return false;
+
+ node = SLP_INSTANCE_TREE (instance);
+ if (STMT_VINFO_DATA_REF (vinfo_for_stmt (SLP_TREE_SCALAR_STMTS (node)[0]))
+ && ! vect_slp_analyze_and_verify_node_alignment
+ (SLP_INSTANCE_TREE (instance)))
+ return false;
+
+ return true;
+}
+
/* Analyze groups of accesses: check that DR belongs to a group of
accesses of legal size, step, etc. Detect gaps, single element
diff --git a/gcc/tree-vect-generic.c b/gcc/tree-vect-generic.c
index 5883db8abd6..af1af17a425 100644
--- a/gcc/tree-vect-generic.c
+++ b/gcc/tree-vect-generic.c
@@ -35,6 +35,7 @@ along with GCC; see the file COPYING3. If not see
#include "tree-eh.h"
#include "gimple-iterator.h"
#include "gimplify-me.h"
+#include "gimplify.h"
#include "tree-cfg.h"
@@ -105,6 +106,15 @@ static inline tree
tree_vec_extract (gimple_stmt_iterator *gsi, tree type,
tree t, tree bitsize, tree bitpos)
{
+ if (TREE_CODE (t) == SSA_NAME)
+ {
+ gimple *def_stmt = SSA_NAME_DEF_STMT (t);
+ if (is_gimple_assign (def_stmt)
+ && (gimple_assign_rhs_code (def_stmt) == VECTOR_CST
+ || (bitpos
+ && gimple_assign_rhs_code (def_stmt) == CONSTRUCTOR)))
+ t = gimple_assign_rhs1 (def_stmt);
+ }
if (bitpos)
{
if (TREE_CODE (type) == BOOLEAN_TYPE)
@@ -1419,7 +1429,7 @@ do_cond (gimple_stmt_iterator *gsi, tree inner_type, tree a, tree b,
if (TREE_CODE (TREE_TYPE (b)) == VECTOR_TYPE)
b = tree_vec_extract (gsi, inner_type, b, bitsize, bitpos);
tree cond = gimple_assign_rhs1 (gsi_stmt (*gsi));
- return gimplify_build3 (gsi, code, inner_type, cond, a, b);
+ return gimplify_build3 (gsi, code, inner_type, unshare_expr (cond), a, b);
}
/* Expand a vector COND_EXPR to scalars, piecewise. */
diff --git a/gcc/tree-vect-loop.c b/gcc/tree-vect-loop.c
index 55e53093caa..80937eceb9c 100644
--- a/gcc/tree-vect-loop.c
+++ b/gcc/tree-vect-loop.c
@@ -649,7 +649,32 @@ vect_determine_vectorization_factor (loop_vec_info loop_vinfo)
}
return false;
}
+ else if (VECTOR_BOOLEAN_TYPE_P (mask_type)
+ != VECTOR_BOOLEAN_TYPE_P (vectype))
+ {
+ if (dump_enabled_p ())
+ {
+ dump_printf_loc (MSG_MISSED_OPTIMIZATION, vect_location,
+ "not vectorized: mixed mask and "
+ "nonmask vector types in statement, ");
+ dump_generic_expr (MSG_MISSED_OPTIMIZATION, TDF_SLIM,
+ mask_type);
+ dump_printf (MSG_MISSED_OPTIMIZATION, " and ");
+ dump_generic_expr (MSG_MISSED_OPTIMIZATION, TDF_SLIM,
+ vectype);
+ dump_printf (MSG_MISSED_OPTIMIZATION, "\n");
+ }
+ return false;
+ }
}
+
+ /* We may compare boolean value loaded as vector of integers.
+ Fix mask_type in such case. */
+ if (mask_type
+ && !VECTOR_BOOLEAN_TYPE_P (mask_type)
+ && gimple_code (stmt) == GIMPLE_ASSIGN
+ && TREE_CODE_CLASS (gimple_assign_rhs_code (stmt)) == tcc_comparison)
+ mask_type = build_same_sized_truth_vector_type (mask_type);
}
/* No mask_type should mean loop invariant predicate.
@@ -1709,13 +1734,16 @@ vect_analyze_loop_operations (loop_vec_info loop_vinfo)
for it. The different analyses will record information in the
loop_vec_info struct. */
static bool
-vect_analyze_loop_2 (loop_vec_info loop_vinfo)
+vect_analyze_loop_2 (loop_vec_info loop_vinfo, bool &fatal)
{
bool ok;
int max_vf = MAX_VECTORIZATION_FACTOR;
int min_vf = 2;
unsigned int n_stmts = 0;
+ /* The first group of checks is independent of the vector size. */
+ fatal = true;
+
/* Find all data references in the loop (which correspond to vdefs/vuses)
and analyze their evolution in the loop. */
@@ -1795,7 +1823,6 @@ vect_analyze_loop_2 (loop_vec_info loop_vinfo)
/* Classify all cross-iteration scalar data-flow cycles.
Cross-iteration cycles caused by virtual phis are analyzed separately. */
-
vect_analyze_scalar_cycles (loop_vinfo);
vect_pattern_recog (loop_vinfo);
@@ -1825,6 +1852,9 @@ vect_analyze_loop_2 (loop_vec_info loop_vinfo)
return false;
}
+ /* While the rest of the analysis below depends on it in some way. */
+ fatal = false;
+
/* Analyze data dependences between the data-refs in the loop
and adjust the maximum vectorization factor according to
the dependences.
@@ -2118,7 +2148,8 @@ vect_analyze_loop (struct loop *loop)
return NULL;
}
- if (vect_analyze_loop_2 (loop_vinfo))
+ bool fatal = false;
+ if (vect_analyze_loop_2 (loop_vinfo, fatal))
{
LOOP_VINFO_VECTORIZABLE_P (loop_vinfo) = 1;
@@ -2128,7 +2159,8 @@ vect_analyze_loop (struct loop *loop)
destroy_loop_vec_info (loop_vinfo, true);
vector_sizes &= ~current_vector_size;
- if (vector_sizes == 0
+ if (fatal
+ || vector_sizes == 0
|| current_vector_size == 0)
return NULL;
@@ -4184,7 +4216,7 @@ vect_create_epilog_for_reduction (vec<tree> vect_defs, gimple *stmt,
tree bitsize;
tree adjustment_def = NULL;
tree vec_initial_def = NULL;
- tree reduction_op, expr, def;
+ tree reduction_op, expr, def, initial_def = NULL;
tree orig_name, scalar_result;
imm_use_iterator imm_iter, phi_imm_iter;
use_operand_p use_p, phi_use_p;
@@ -4245,9 +4277,10 @@ vect_create_epilog_for_reduction (vec<tree> vect_defs, gimple *stmt,
/* Get at the scalar def before the loop, that defines the initial value
of the reduction variable. */
gimple *def_stmt = SSA_NAME_DEF_STMT (reduction_op);
- tree op = PHI_ARG_DEF_FROM_EDGE (def_stmt, loop_preheader_edge (loop));
+ initial_def = PHI_ARG_DEF_FROM_EDGE (def_stmt,
+ loop_preheader_edge (loop));
vec_initial_defs.create (1);
- vec_initial_def = get_initial_def_for_reduction (stmt, op,
+ vec_initial_def = get_initial_def_for_reduction (stmt, initial_def,
&adjustment_def);
vec_initial_defs.quick_push (vec_initial_def);
}
@@ -4263,9 +4296,25 @@ vect_create_epilog_for_reduction (vec<tree> vect_defs, gimple *stmt,
def = vect_defs[i];
for (j = 0; j < ncopies; j++)
{
- /* Set the loop-entry arg of the reduction-phi. */
- add_phi_arg (as_a <gphi *> (phi), vec_init_def,
- loop_preheader_edge (loop), UNKNOWN_LOCATION);
+ /* Set the loop-entry arg of the reduction-phi. */
+
+ if (STMT_VINFO_VEC_REDUCTION_TYPE (stmt_info)
+ == INTEGER_INDUC_COND_REDUCTION)
+ {
+ /* Initialise the reduction phi to zero. This prevents initial
+ values of non-zero interferring with the reduction op. */
+ gcc_assert (ncopies == 1);
+ gcc_assert (i == 0);
+
+ tree vec_init_def_type = TREE_TYPE (vec_init_def);
+ tree zero_vec = build_zero_cst (vec_init_def_type);
+
+ add_phi_arg (as_a <gphi *> (phi), zero_vec,
+ loop_preheader_edge (loop), UNKNOWN_LOCATION);
+ }
+ else
+ add_phi_arg (as_a <gphi *> (phi), vec_init_def,
+ loop_preheader_edge (loop), UNKNOWN_LOCATION);
/* Set the loop-latch arg for the reduction-phi. */
if (j > 0)
@@ -4607,10 +4656,28 @@ vect_create_epilog_for_reduction (vec<tree> vect_defs, gimple *stmt,
}
else
tmp = build1 (reduc_code, scalar_type, new_phi_result);
+
epilog_stmt = gimple_build_assign (new_scalar_dest, tmp);
new_temp = make_ssa_name (new_scalar_dest, epilog_stmt);
gimple_assign_set_lhs (epilog_stmt, new_temp);
gsi_insert_before (&exit_gsi, epilog_stmt, GSI_SAME_STMT);
+
+ if (STMT_VINFO_VEC_REDUCTION_TYPE (stmt_info)
+ == INTEGER_INDUC_COND_REDUCTION)
+ {
+ /* Earlier we set the initial value to be zero. Check the result
+ and if it is zero then replace with the original initial
+ value. */
+ tree zero = build_zero_cst (scalar_type);
+ tree zcompare = build2 (EQ_EXPR, boolean_type_node, new_temp, zero);
+
+ tmp = make_ssa_name (new_scalar_dest);
+ epilog_stmt = gimple_build_assign (tmp, COND_EXPR, zcompare,
+ initial_def, new_temp);
+ gsi_insert_before (&exit_gsi, epilog_stmt, GSI_SAME_STMT);
+ new_temp = tmp;
+ }
+
scalar_results.safe_push (new_temp);
}
else
@@ -5087,6 +5154,52 @@ vect_finalize_reduction:
}
+/* Function is_nonwrapping_integer_induction.
+
+ Check if STMT (which is part of loop LOOP) both increments and
+ does not cause overflow. */
+
+static bool
+is_nonwrapping_integer_induction (gimple *stmt, struct loop *loop)
+{
+ stmt_vec_info stmt_vinfo = vinfo_for_stmt (stmt);
+ tree base = PHI_ARG_DEF_FROM_EDGE (stmt, loop_preheader_edge (loop));
+ tree step = STMT_VINFO_LOOP_PHI_EVOLUTION_PART (stmt_vinfo);
+ tree lhs_type = TREE_TYPE (gimple_phi_result (stmt));
+ widest_int ni, max_loop_value, lhs_max;
+ bool overflow = false;
+
+ /* Make sure the loop is integer based. */
+ if (TREE_CODE (base) != INTEGER_CST
+ || TREE_CODE (step) != INTEGER_CST)
+ return false;
+
+ /* Check that the induction increments. */
+ if (tree_int_cst_sgn (step) == -1)
+ return false;
+
+ /* Check that the max size of the loop will not wrap. */
+
+ if (TYPE_OVERFLOW_UNDEFINED (lhs_type))
+ return true;
+
+ if (! max_stmt_executions (loop, &ni))
+ return false;
+
+ max_loop_value = wi::mul (wi::to_widest (step), ni, TYPE_SIGN (lhs_type),
+ &overflow);
+ if (overflow)
+ return false;
+
+ max_loop_value = wi::add (wi::to_widest (base), max_loop_value,
+ TYPE_SIGN (lhs_type), &overflow);
+ if (overflow)
+ return false;
+
+ return (wi::min_precision (max_loop_value, TYPE_SIGN (lhs_type))
+ <= TYPE_PRECISION (lhs_type));
+}
+
/* Function vectorizable_reduction.
Check if STMT performs a reduction operation that can be vectorized.
@@ -5185,6 +5298,7 @@ vectorizable_reduction (gimple *stmt, gimple_stmt_iterator *gsi,
tree def0, def1, tem, op0, op1 = NULL_TREE;
bool first_p = true;
tree cr_index_scalar_type = NULL_TREE, cr_index_vector_type = NULL_TREE;
+ bool cond_expr_is_nonwrapping_integer_induction = false;
/* In case of reduction chain we switch to the first stmt in the chain, but
we don't update STMT_INFO, since only the last stmt is marked as reduction
@@ -5328,6 +5442,16 @@ vectorizable_reduction (gimple *stmt, gimple_stmt_iterator *gsi,
reduc_def_stmt = def_stmt;
reduc_index = i;
}
+
+ if (i == 1 && code == COND_EXPR && dt == vect_induction_def
+ && is_nonwrapping_integer_induction (def_stmt, loop))
+ {
+ if (dump_enabled_p ())
+ dump_printf_loc (MSG_NOTE, vect_location,
+ "condition expression based on integer "
+ "induction.\n");
+ cond_expr_is_nonwrapping_integer_induction = true;
+ }
}
is_simple_use = vect_is_simple_use (ops[i], loop_vinfo, &def_stmt, &dt, &tem);
@@ -5357,6 +5481,11 @@ vectorizable_reduction (gimple *stmt, gimple_stmt_iterator *gsi,
(loop_vinfo, reduc_def_stmt,
!nested_cycle, &dummy, false,
&STMT_VINFO_VEC_REDUCTION_TYPE (stmt_info));
+
+ if (cond_expr_is_nonwrapping_integer_induction
+ && STMT_VINFO_VEC_REDUCTION_TYPE (stmt_info) == COND_REDUCTION)
+ STMT_VINFO_VEC_REDUCTION_TYPE (stmt_info) = INTEGER_INDUC_COND_REDUCTION;
+
if (orig_stmt)
gcc_assert (tmp == orig_stmt
|| GROUP_FIRST_ELEMENT (vinfo_for_stmt (tmp)) == orig_stmt);
@@ -5484,6 +5613,8 @@ vectorizable_reduction (gimple *stmt, gimple_stmt_iterator *gsi,
{
/* This is a reduction pattern: get the vectype from the type of the
reduction variable, and get the tree-code from orig_stmt. */
+ gcc_assert (STMT_VINFO_VEC_REDUCTION_TYPE (stmt_info)
+ == TREE_CODE_REDUCTION);
orig_code = gimple_assign_rhs_code (orig_stmt);
gcc_assert (vectype_out);
vec_mode = TYPE_MODE (vectype_out);
@@ -5493,6 +5624,12 @@ vectorizable_reduction (gimple *stmt, gimple_stmt_iterator *gsi,
/* Regular reduction: use the same vectype and tree-code as used for
the vector code inside the loop can be used for the epilog code. */
orig_code = code;
+
+ /* For simple condition reductions, replace with the actual expression
+ we want to base our reduction around. */
+ if (STMT_VINFO_VEC_REDUCTION_TYPE (stmt_info)
+ == INTEGER_INDUC_COND_REDUCTION)
+ orig_code = MAX_EXPR;
}
if (nested_cycle)
@@ -5513,7 +5650,9 @@ vectorizable_reduction (gimple *stmt, gimple_stmt_iterator *gsi,
epilog_reduc_code = ERROR_MARK;
- if (STMT_VINFO_VEC_REDUCTION_TYPE (stmt_info) == TREE_CODE_REDUCTION)
+ if (STMT_VINFO_VEC_REDUCTION_TYPE (stmt_info) == TREE_CODE_REDUCTION
+ || STMT_VINFO_VEC_REDUCTION_TYPE (stmt_info)
+ == INTEGER_INDUC_COND_REDUCTION)
{
if (reduction_code_for_scalar_code (orig_code, &epilog_reduc_code))
{
@@ -5539,6 +5678,19 @@ vectorizable_reduction (gimple *stmt, gimple_stmt_iterator *gsi,
epilog_reduc_code = ERROR_MARK;
}
}
+
+ /* When epilog_reduc_code is ERROR_MARK then a reduction will be
+ generated in the epilog using multiple expressions. This does not
+ work for condition reductions. */
+ if (epilog_reduc_code == ERROR_MARK
+ && STMT_VINFO_VEC_REDUCTION_TYPE (stmt_info)
+ == INTEGER_INDUC_COND_REDUCTION)
+ {
+ if (dump_enabled_p ())
+ dump_printf_loc (MSG_MISSED_OPTIMIZATION, vect_location,
+ "no reduc code for scalar code.\n");
+ return false;
+ }
}
else
{
@@ -5573,7 +5725,9 @@ vectorizable_reduction (gimple *stmt, gimple_stmt_iterator *gsi,
}
if ((double_reduc
- || STMT_VINFO_VEC_REDUCTION_TYPE (stmt_info) == COND_REDUCTION)
+ || STMT_VINFO_VEC_REDUCTION_TYPE (stmt_info) == COND_REDUCTION
+ || STMT_VINFO_VEC_REDUCTION_TYPE (stmt_info)
+ == INTEGER_INDUC_COND_REDUCTION)
&& ncopies > 1)
{
if (dump_enabled_p ())
diff --git a/gcc/tree-vect-slp.c b/gcc/tree-vect-slp.c
index 9d971405e07..704f42fd886 100644
--- a/gcc/tree-vect-slp.c
+++ b/gcc/tree-vect-slp.c
@@ -458,7 +458,6 @@ vect_build_slp_tree_1 (vec_info *vinfo,
{
dump_printf_loc (MSG_NOTE, vect_location, "Build SLP for ");
dump_gimple_stmt (MSG_NOTE, TDF_SLIM, stmt, 0);
- dump_printf (MSG_NOTE, "\n");
}
/* Fail to vectorize statements marked as unvectorizable. */
@@ -1114,7 +1113,7 @@ vect_build_slp_tree (vec_info *vinfo,
/* Dump a slp tree NODE using flags specified in DUMP_KIND. */
static void
-vect_print_slp_tree (int dump_kind, slp_tree node)
+vect_print_slp_tree (int dump_kind, location_t loc, slp_tree node)
{
int i;
gimple *stmt;
@@ -1123,16 +1122,14 @@ vect_print_slp_tree (int dump_kind, slp_tree node)
if (!node)
return;
- dump_printf (dump_kind, "node ");
+ dump_printf_loc (dump_kind, loc, "node\n");
FOR_EACH_VEC_ELT (SLP_TREE_SCALAR_STMTS (node), i, stmt)
{
- dump_printf (dump_kind, "\n\tstmt %d ", i);
+ dump_printf_loc (dump_kind, loc, "\tstmt %d ", i);
dump_gimple_stmt (dump_kind, TDF_SLIM, stmt, 0);
}
- dump_printf (dump_kind, "\n");
-
FOR_EACH_VEC_ELT (SLP_TREE_CHILDREN (node), i, child)
- vect_print_slp_tree (dump_kind, child);
+ vect_print_slp_tree (dump_kind, loc, child);
}
@@ -1282,8 +1279,7 @@ vect_supported_load_permutation_p (slp_instance slp_instn)
unsigned int group_size = SLP_INSTANCE_GROUP_SIZE (slp_instn);
unsigned int i, j, k, next;
slp_tree node;
- gimple *stmt, *load, *next_load, *first_load;
- struct data_reference *dr;
+ gimple *stmt, *load, *next_load;
if (dump_enabled_p ())
{
@@ -1365,33 +1361,6 @@ vect_supported_load_permutation_p (slp_instance slp_instn)
}
}
}
-
- /* Check that the alignment of the first load in every subchain, i.e.,
- the first statement in every load node, is supported.
- ??? This belongs in alignment checking. */
- FOR_EACH_VEC_ELT (SLP_INSTANCE_LOADS (slp_instn), i, node)
- {
- first_load = SLP_TREE_SCALAR_STMTS (node)[0];
- if (first_load != GROUP_FIRST_ELEMENT (vinfo_for_stmt (first_load)))
- {
- dr = STMT_VINFO_DATA_REF (vinfo_for_stmt (first_load));
- if (vect_supportable_dr_alignment (dr, false)
- == dr_unaligned_unsupported)
- {
- if (dump_enabled_p ())
- {
- dump_printf_loc (MSG_MISSED_OPTIMIZATION,
- vect_location,
- "unsupported unaligned load ");
- dump_gimple_stmt (MSG_MISSED_OPTIMIZATION, TDF_SLIM,
- first_load, 0);
- dump_printf (MSG_MISSED_OPTIMIZATION, "\n");
- }
- return false;
- }
- }
- }
-
return true;
}
@@ -1460,6 +1429,13 @@ vect_analyze_slp_cost_1 (slp_instance instance, slp_tree node,
{
int i;
gcc_checking_assert (DR_IS_READ (STMT_VINFO_DATA_REF (stmt_info)));
+ /* If the load is permuted then the alignment is determined by
+ the first group element not by the first scalar stmt DR. */
+ if (SLP_TREE_LOAD_PERMUTATION (node).exists ())
+ {
+ stmt = GROUP_FIRST_ELEMENT (stmt_info);
+ stmt_info = vinfo_for_stmt (stmt);
+ }
vect_model_load_cost (stmt_info, ncopies_for_cost, false,
node, prologue_cost_vec, body_cost_vec);
/* If the load is permuted record the cost for the permutation.
@@ -1589,6 +1565,54 @@ vect_analyze_slp_cost (slp_instance instance, void *data)
body_cost_vec.release ();
}
+/* Splits a group of stores, currently beginning at FIRST_STMT, into two groups:
+ one (still beginning at FIRST_STMT) of size GROUP1_SIZE (also containing
+ the first GROUP1_SIZE stmts, since stores are consecutive), the second
+ containing the remainder.
+ Return the first stmt in the second group. */
+
+static gimple *
+vect_split_slp_store_group (gimple *first_stmt, unsigned group1_size)
+{
+ stmt_vec_info first_vinfo = vinfo_for_stmt (first_stmt);
+ gcc_assert (GROUP_FIRST_ELEMENT (first_vinfo) == first_stmt);
+ gcc_assert (group1_size > 0);
+ int group2_size = GROUP_SIZE (first_vinfo) - group1_size;
+ gcc_assert (group2_size > 0);
+ GROUP_SIZE (first_vinfo) = group1_size;
+
+ gimple *stmt = first_stmt;
+ for (unsigned i = group1_size; i > 1; i--)
+ {
+ stmt = GROUP_NEXT_ELEMENT (vinfo_for_stmt (stmt));
+ gcc_assert (GROUP_GAP (vinfo_for_stmt (stmt)) == 1);
+ }
+ /* STMT is now the last element of the first group. */
+ gimple *group2 = GROUP_NEXT_ELEMENT (vinfo_for_stmt (stmt));
+ GROUP_NEXT_ELEMENT (vinfo_for_stmt (stmt)) = 0;
+
+ GROUP_SIZE (vinfo_for_stmt (group2)) = group2_size;
+ for (stmt = group2; stmt; stmt = GROUP_NEXT_ELEMENT (vinfo_for_stmt (stmt)))
+ {
+ GROUP_FIRST_ELEMENT (vinfo_for_stmt (stmt)) = group2;
+ gcc_assert (GROUP_GAP (vinfo_for_stmt (stmt)) == 1);
+ }
+
+ /* For the second group, the GROUP_GAP is that before the original group,
+ plus skipping over the first vector. */
+ GROUP_GAP (vinfo_for_stmt (group2)) =
+ GROUP_GAP (first_vinfo) + group1_size;
+
+ /* GROUP_GAP of the first group now has to skip over the second group too. */
+ GROUP_GAP (first_vinfo) += group2_size;
+
+ if (dump_enabled_p ())
+ dump_printf_loc (MSG_NOTE, vect_location, "Split group into %d and %d\n",
+ group1_size, group2_size);
+
+ return group2;
+}
+
/* Analyze an SLP instance starting from a group of grouped stores. Call
vect_build_slp_tree to build a tree of packed stmts if possible.
Return FALSE if it's impossible to SLP any stmt in the loop. */
@@ -1604,7 +1628,7 @@ vect_analyze_slp_instance (vec_info *vinfo,
tree vectype, scalar_type = NULL_TREE;
gimple *next;
unsigned int vectorization_factor = 0;
- int i;
+ unsigned int i;
unsigned int max_nunits = 0;
vec<slp_tree> loads;
struct data_reference *dr = STMT_VINFO_DATA_REF (vinfo_for_stmt (stmt));
@@ -1784,7 +1808,11 @@ vect_analyze_slp_instance (vec_info *vinfo,
vinfo->slp_instances.safe_push (new_instance);
if (dump_enabled_p ())
- vect_print_slp_tree (MSG_NOTE, node);
+ {
+ dump_printf_loc (MSG_NOTE, vect_location,
+ "Final SLP tree for instance:\n");
+ vect_print_slp_tree (MSG_NOTE, vect_location, node);
+ }
return true;
}
@@ -1794,6 +1822,41 @@ vect_analyze_slp_instance (vec_info *vinfo,
vect_free_slp_tree (node);
loads.release ();
+ /* For basic block SLP, try to break the group up into multiples of the
+ vectorization factor. */
+ if (is_a <bb_vec_info> (vinfo)
+ && GROUP_FIRST_ELEMENT (vinfo_for_stmt (stmt))
+ && STMT_VINFO_GROUPED_ACCESS (vinfo_for_stmt (stmt)))
+ {
+ /* We consider breaking the group only on VF boundaries from the existing
+ start. */
+ for (i = 0; i < group_size; i++)
+ if (!matches[i]) break;
+
+ if (i >= vectorization_factor && i < group_size)
+ {
+ /* Split into two groups at the first vector boundary before i. */
+ gcc_assert ((vectorization_factor & (vectorization_factor - 1)) == 0);
+ unsigned group1_size = i & ~(vectorization_factor - 1);
+
+ gimple *rest = vect_split_slp_store_group (stmt, group1_size);
+ bool res = vect_analyze_slp_instance (vinfo, stmt, max_tree_size);
+ /* If the first non-match was in the middle of a vector,
+ skip the rest of that vector. */
+ if (group1_size < i)
+ {
+ i = group1_size + vectorization_factor;
+ if (i < group_size)
+ rest = vect_split_slp_store_group (rest, vectorization_factor);
+ }
+ if (i < group_size)
+ res |= vect_analyze_slp_instance (vinfo, rest, max_tree_size);
+ return res;
+ }
+ /* Even though the first vector did not all match, we might be able to SLP
+ (some) of the remainder. FORNOW ignore this possibility. */
+ }
+
return false;
}
@@ -2311,19 +2374,24 @@ vect_bb_vectorization_profitable_p (bb_vec_info bb_vinfo)
return true;
}
-/* Check if the basic block can be vectorized. */
+/* Check if the basic block can be vectorized. Returns a bb_vec_info
+ if so and sets fatal to true if failure is independent of
+ current_vector_size. */
static bb_vec_info
vect_slp_analyze_bb_1 (gimple_stmt_iterator region_begin,
gimple_stmt_iterator region_end,
- vec<data_reference_p> datarefs, int n_stmts)
+ vec<data_reference_p> datarefs, int n_stmts,
+ bool &fatal)
{
bb_vec_info bb_vinfo;
- vec<slp_instance> slp_instances;
slp_instance instance;
int i;
int min_vf = 2;
+ /* The first group of checks is independent of the vector size. */
+ fatal = true;
+
if (n_stmts > PARAM_VALUE (PARAM_SLP_MAX_INSNS_IN_BB))
{
if (dump_enabled_p ())
@@ -2375,19 +2443,25 @@ vect_slp_analyze_bb_1 (gimple_stmt_iterator region_begin,
return NULL;
}
- vect_pattern_recog (bb_vinfo);
-
- if (!vect_analyze_data_refs_alignment (bb_vinfo))
+ /* If there are no grouped stores in the region there is no need
+ to continue with pattern recog as vect_analyze_slp will fail
+ anyway. */
+ if (bb_vinfo->grouped_stores.is_empty ())
{
if (dump_enabled_p ())
- dump_printf_loc (MSG_MISSED_OPTIMIZATION, vect_location,
- "not vectorized: bad data alignment in basic "
- "block.\n");
+ dump_printf_loc (MSG_MISSED_OPTIMIZATION, vect_location,
+ "not vectorized: no grouped stores in "
+ "basic block.\n");
destroy_bb_vec_info (bb_vinfo);
return NULL;
}
+ /* While the rest of the analysis below depends on it in some way. */
+ fatal = false;
+
+ vect_pattern_recog (bb_vinfo);
+
/* Check the SLP opportunities in the basic block, analyze and build SLP
trees. */
if (!vect_analyze_slp (bb_vinfo, n_stmts))
@@ -2405,14 +2479,34 @@ vect_slp_analyze_bb_1 (gimple_stmt_iterator region_begin,
return NULL;
}
- slp_instances = BB_VINFO_SLP_INSTANCES (bb_vinfo);
-
- /* Mark all the statements that we want to vectorize as pure SLP and
- relevant. */
- FOR_EACH_VEC_ELT (slp_instances, i, instance)
+ /* Analyze and verify the alignment of data references and the
+ dependence in the SLP instances. */
+ for (i = 0; BB_VINFO_SLP_INSTANCES (bb_vinfo).iterate (i, &instance); )
{
+ if (! vect_slp_analyze_and_verify_instance_alignment (instance)
+ || ! vect_slp_analyze_instance_dependence (instance))
+ {
+ dump_printf_loc (MSG_NOTE, vect_location,
+ "removing SLP instance operations starting from: ");
+ dump_gimple_stmt (MSG_NOTE, TDF_SLIM,
+ SLP_TREE_SCALAR_STMTS
+ (SLP_INSTANCE_TREE (instance))[0], 0);
+ vect_free_slp_instance (instance);
+ BB_VINFO_SLP_INSTANCES (bb_vinfo).ordered_remove (i);
+ continue;
+ }
+
+ /* Mark all the statements that we want to vectorize as pure SLP and
+ relevant. */
vect_mark_slp_stmts (SLP_INSTANCE_TREE (instance), pure_slp, -1);
vect_mark_slp_stmts_relevant (SLP_INSTANCE_TREE (instance));
+
+ i++;
+ }
+ if (! BB_VINFO_SLP_INSTANCES (bb_vinfo).length ())
+ {
+ destroy_bb_vec_info (bb_vinfo);
+ return NULL;
}
/* Mark all the statements that we do not want to vectorize. */
@@ -2424,30 +2518,6 @@ vect_slp_analyze_bb_1 (gimple_stmt_iterator region_begin,
STMT_VINFO_VECTORIZABLE (vinfo) = false;
}
- /* Analyze dependences. At this point all stmts not participating in
- vectorization have to be marked. Dependence analysis assumes
- that we either vectorize all SLP instances or none at all. */
- if (!vect_slp_analyze_data_ref_dependences (bb_vinfo))
- {
- if (dump_enabled_p ())
- dump_printf_loc (MSG_MISSED_OPTIMIZATION, vect_location,
- "not vectorized: unhandled data dependence "
- "in basic block.\n");
-
- destroy_bb_vec_info (bb_vinfo);
- return NULL;
- }
-
- if (!vect_verify_datarefs_alignment (bb_vinfo))
- {
- if (dump_enabled_p ())
- dump_printf_loc (MSG_MISSED_OPTIMIZATION, vect_location,
- "not vectorized: unsupported alignment in basic "
- "block.\n");
- destroy_bb_vec_info (bb_vinfo);
- return NULL;
- }
-
if (!vect_slp_analyze_operations (BB_VINFO_SLP_INSTANCES (bb_vinfo),
BB_VINFO_TARGET_COST_DATA (bb_vinfo)))
{
@@ -2533,8 +2603,9 @@ vect_slp_bb (basic_block bb)
gimple_stmt_iterator region_end = gsi;
bool vectorized = false;
+ bool fatal = false;
bb_vinfo = vect_slp_analyze_bb_1 (region_begin, region_end,
- datarefs, insns);
+ datarefs, insns, fatal);
if (bb_vinfo
&& dbg_cnt (vect_slp))
{
@@ -2559,7 +2630,10 @@ vect_slp_bb (basic_block bb)
vector_sizes &= ~current_vector_size;
if (vectorized
|| vector_sizes == 0
- || current_vector_size == 0)
+ || current_vector_size == 0
+ /* If vect_slp_analyze_bb_1 signaled that analysis for all
+ vector sizes will fail do not bother iterating. */
+ || fatal)
{
if (gsi_end_p (region_end))
break;
@@ -2589,6 +2663,57 @@ vect_slp_bb (basic_block bb)
}
+/* Return 1 if vector type of boolean constant which is OPNUM
+ operand in statement STMT is a boolean vector. */
+
+static bool
+vect_mask_constant_operand_p (gimple *stmt, int opnum)
+{
+ stmt_vec_info stmt_vinfo = vinfo_for_stmt (stmt);
+ enum tree_code code = gimple_expr_code (stmt);
+ tree op, vectype;
+ gimple *def_stmt;
+ enum vect_def_type dt;
+
+ /* For comparison and COND_EXPR type is chosen depending
+ on the other comparison operand. */
+ if (TREE_CODE_CLASS (code) == tcc_comparison)
+ {
+ if (opnum)
+ op = gimple_assign_rhs1 (stmt);
+ else
+ op = gimple_assign_rhs2 (stmt);
+
+ if (!vect_is_simple_use (op, stmt_vinfo->vinfo, &def_stmt,
+ &dt, &vectype))
+ gcc_unreachable ();
+
+ return !vectype || VECTOR_BOOLEAN_TYPE_P (vectype);
+ }
+
+ if (code == COND_EXPR)
+ {
+ tree cond = gimple_assign_rhs1 (stmt);
+
+ if (TREE_CODE (cond) == SSA_NAME)
+ return false;
+
+ if (opnum)
+ op = TREE_OPERAND (cond, 1);
+ else
+ op = TREE_OPERAND (cond, 0);
+
+ if (!vect_is_simple_use (op, stmt_vinfo->vinfo, &def_stmt,
+ &dt, &vectype))
+ gcc_unreachable ();
+
+ return !vectype || VECTOR_BOOLEAN_TYPE_P (vectype);
+ }
+
+ return VECTOR_BOOLEAN_TYPE_P (STMT_VINFO_VECTYPE (stmt_vinfo));
+}
+
+
/* For constant and loop invariant defs of SLP_NODE this function returns
(vector) defs (VEC_OPRNDS) that will be used in the vectorized stmts.
OP_NUM determines if we gather defs for operand 0 or operand 1 of the RHS of
@@ -2625,8 +2750,7 @@ vect_get_constant_vectors (tree op, slp_tree slp_node,
/* Check if vector type is a boolean vector. */
if (TREE_CODE (TREE_TYPE (op)) == BOOLEAN_TYPE
- && (VECTOR_BOOLEAN_TYPE_P (STMT_VINFO_VECTYPE (stmt_vinfo))
- || (code == COND_EXPR && op_num < 2)))
+ && vect_mask_constant_operand_p (stmt, op_num))
vector_type
= build_same_sized_truth_vector_type (STMT_VINFO_VECTYPE (stmt_vinfo));
else
@@ -2738,18 +2862,20 @@ vect_get_constant_vectors (tree op, slp_tree slp_node,
switch (code)
{
case COND_EXPR:
- if (op_num == 0 || op_num == 1)
- {
- tree cond = gimple_assign_rhs1 (stmt);
+ {
+ tree cond = gimple_assign_rhs1 (stmt);
+ if (TREE_CODE (cond) == SSA_NAME)
+ op = gimple_op (stmt, op_num + 1);
+ else if (op_num == 0 || op_num == 1)
op = TREE_OPERAND (cond, op_num);
- }
- else
- {
- if (op_num == 2)
- op = gimple_assign_rhs2 (stmt);
- else
- op = gimple_assign_rhs3 (stmt);
- }
+ else
+ {
+ if (op_num == 2)
+ op = gimple_assign_rhs2 (stmt);
+ else
+ op = gimple_assign_rhs3 (stmt);
+ }
+ }
break;
case CALL_EXPR:
diff --git a/gcc/tree-vect-stmts.c b/gcc/tree-vect-stmts.c
index cfe30e067ea..0f64aaf1979 100644
--- a/gcc/tree-vect-stmts.c
+++ b/gcc/tree-vect-stmts.c
@@ -1688,6 +1688,7 @@ vectorizable_mask_load_store (gimple *stmt, gimple_stmt_iterator *gsi,
bool nested_in_vect_loop = nested_in_vect_loop_p (loop, stmt);
struct data_reference *dr = STMT_VINFO_DATA_REF (stmt_info);
tree vectype = STMT_VINFO_VECTYPE (stmt_info);
+ tree rhs_vectype = NULL_TREE;
tree mask_vectype;
tree elem_type;
gimple *new_stmt;
@@ -1757,6 +1758,13 @@ vectorizable_mask_load_store (gimple *stmt, gimple_stmt_iterator *gsi,
if (!mask_vectype)
return false;
+ if (is_store)
+ {
+ tree rhs = gimple_call_arg (stmt, 3);
+ if (!vect_is_simple_use (rhs, loop_vinfo, &def_stmt, &dt, &rhs_vectype))
+ return false;
+ }
+
if (STMT_VINFO_GATHER_SCATTER_P (stmt_info))
{
gimple *def_stmt;
@@ -1790,16 +1798,11 @@ vectorizable_mask_load_store (gimple *stmt, gimple_stmt_iterator *gsi,
else if (!VECTOR_MODE_P (TYPE_MODE (vectype))
|| !can_vec_mask_load_store_p (TYPE_MODE (vectype),
TYPE_MODE (mask_vectype),
- !is_store))
+ !is_store)
+ || (rhs_vectype
+ && !useless_type_conversion_p (vectype, rhs_vectype)))
return false;
- if (is_store)
- {
- tree rhs = gimple_call_arg (stmt, 3);
- if (!vect_is_simple_use (rhs, loop_vinfo, &def_stmt, &dt))
- return false;
- }
-
if (!vec_stmt) /* transformation not required. */
{
STMT_VINFO_TYPE (stmt_info) = call_vec_info_type;
@@ -5461,6 +5464,7 @@ vectorizable_store (gimple *stmt, gimple_stmt_iterator *gsi, gimple **vec_stmt,
group. */
vec_num = SLP_TREE_NUMBER_OF_VEC_STMTS (slp_node);
first_stmt = SLP_TREE_SCALAR_STMTS (slp_node)[0];
+ gcc_assert (GROUP_FIRST_ELEMENT (vinfo_for_stmt (first_stmt)) == first_stmt);
first_dr = STMT_VINFO_DATA_REF (vinfo_for_stmt (first_stmt));
op = gimple_assign_rhs1 (first_stmt);
}
@@ -6655,9 +6659,9 @@ vectorizable_load (gimple *stmt, gimple_stmt_iterator *gsi, gimple **vec_stmt,
if (grouped_load)
{
first_stmt = GROUP_FIRST_ELEMENT (stmt_info);
- if (slp
- && !SLP_TREE_LOAD_PERMUTATION (slp_node).exists ()
- && first_stmt != SLP_TREE_SCALAR_STMTS (slp_node)[0])
+ /* For BB vectorization we directly vectorize a subchain
+ without permutation. */
+ if (slp && ! SLP_TREE_LOAD_PERMUTATION (slp_node).exists ())
first_stmt = SLP_TREE_SCALAR_STMTS (slp_node)[0];
/* Check if the chain of loads is already vectorized. */
@@ -7642,8 +7646,8 @@ vectorizable_comparison (gimple *stmt, gimple_stmt_iterator *gsi,
}
else
{
- vec_rhs1 = vect_get_vec_def_for_operand (rhs1, stmt, NULL);
- vec_rhs2 = vect_get_vec_def_for_operand (rhs2, stmt, NULL);
+ vec_rhs1 = vect_get_vec_def_for_operand (rhs1, stmt, vectype);
+ vec_rhs2 = vect_get_vec_def_for_operand (rhs2, stmt, vectype);
}
}
else
diff --git a/gcc/tree-vectorizer.c b/gcc/tree-vectorizer.c
index 41e87a8d9bd..08c80253caa 100644
--- a/gcc/tree-vectorizer.c
+++ b/gcc/tree-vectorizer.c
@@ -719,12 +719,16 @@ pass_slp_vectorize::execute (function *fun)
scev_initialize ();
}
- /* Mark all stmts as not belonging to the current region. */
+ /* Mark all stmts as not belonging to the current region and unvisited. */
FOR_EACH_BB_FN (bb, fun)
{
for (gimple_stmt_iterator gsi = gsi_start_bb (bb); !gsi_end_p (gsi);
gsi_next (&gsi))
- gimple_set_uid (gsi_stmt (gsi), -1);
+ {
+ gimple *stmt = gsi_stmt (gsi);
+ gimple_set_uid (stmt, -1);
+ gimple_set_visited (stmt, false);
+ }
}
init_stmt_vec_info_vec ();
diff --git a/gcc/tree-vectorizer.h b/gcc/tree-vectorizer.h
index 6ad0cc452f1..1b5c95c10f4 100644
--- a/gcc/tree-vectorizer.h
+++ b/gcc/tree-vectorizer.h
@@ -64,7 +64,8 @@ enum vect_def_type {
/* Define type of reduction. */
enum vect_reduction_type {
TREE_CODE_REDUCTION,
- COND_REDUCTION
+ COND_REDUCTION,
+ INTEGER_INDUC_COND_REDUCTION
};
#define VECTORIZABLE_CYCLE_DEF(D) (((D) == vect_reduction_def) \
@@ -1009,10 +1010,11 @@ extern enum dr_alignment_support vect_supportable_dr_alignment
extern tree vect_get_smallest_scalar_type (gimple *, HOST_WIDE_INT *,
HOST_WIDE_INT *);
extern bool vect_analyze_data_ref_dependences (loop_vec_info, int *);
-extern bool vect_slp_analyze_data_ref_dependences (bb_vec_info);
+extern bool vect_slp_analyze_instance_dependence (slp_instance);
extern bool vect_enhance_data_refs_alignment (loop_vec_info);
-extern bool vect_analyze_data_refs_alignment (vec_info *);
-extern bool vect_verify_datarefs_alignment (vec_info *);
+extern bool vect_analyze_data_refs_alignment (loop_vec_info);
+extern bool vect_verify_datarefs_alignment (loop_vec_info);
+extern bool vect_slp_analyze_and_verify_instance_alignment (slp_instance);
extern bool vect_analyze_data_ref_accesses (vec_info *);
extern bool vect_prune_runtime_alias_test_list (loop_vec_info);
extern tree vect_check_gather_scatter (gimple *, loop_vec_info, tree *, tree *,
diff --git a/gcc/tree-vrp.c b/gcc/tree-vrp.c
index 87c02654c48..e2393e4d3a0 100644
--- a/gcc/tree-vrp.c
+++ b/gcc/tree-vrp.c
@@ -8810,20 +8810,11 @@ vrp_visit_phi_node (gphi *phi)
/* If we dropped either bound to +-INF then if this is a loop
PHI node SCEV may known more about its value-range. */
- if ((cmp_min > 0 || cmp_min < 0
+ if (cmp_min > 0 || cmp_min < 0
|| cmp_max < 0 || cmp_max > 0)
- && (l = loop_containing_stmt (phi))
- && l->header == gimple_bb (phi))
- adjust_range_with_scev (&vr_result, l, phi, lhs);
-
- /* If we will end up with a (-INF, +INF) range, set it to
- VARYING. Same if the previous max value was invalid for
- the type and we end up with vr_result.min > vr_result.max. */
- if ((vrp_val_is_max (vr_result.max)
- && vrp_val_is_min (vr_result.min))
- || compare_values (vr_result.min,
- vr_result.max) > 0)
- goto varying;
+ goto scev_check;
+
+ goto infinite_check;
}
/* If the new range is different than the previous value, keep
@@ -8849,8 +8840,28 @@ update_range:
/* Nothing changed, don't add outgoing edges. */
return SSA_PROP_NOT_INTERESTING;
- /* No match found. Set the LHS to VARYING. */
varying:
+ set_value_range_to_varying (&vr_result);
+
+scev_check:
+ /* If this is a loop PHI node SCEV may known more about its value-range.
+ scev_check can be reached from two paths, one is a fall through from above
+ "varying" label, the other is direct goto from code block which tries to
+ avoid infinite simulation. */
+ if ((l = loop_containing_stmt (phi))
+ && l->header == gimple_bb (phi))
+ adjust_range_with_scev (&vr_result, l, phi, lhs);
+
+infinite_check:
+ /* If we will end up with a (-INF, +INF) range, set it to
+ VARYING. Same if the previous max value was invalid for
+ the type and we end up with vr_result.min > vr_result.max. */
+ if ((vr_result.type == VR_RANGE || vr_result.type == VR_ANTI_RANGE)
+ && !((vrp_val_is_max (vr_result.max) && vrp_val_is_min (vr_result.min))
+ || compare_values (vr_result.min, vr_result.max) > 0))
+ goto update_range;
+
+ /* No match found. Set the LHS to VARYING. */
set_value_range_to_varying (lhs_vr);
return SSA_PROP_VARYING;
}
diff --git a/gcc/tree.c b/gcc/tree.c
index 50e1db019d3..1d770c36a7b 100644
--- a/gcc/tree.c
+++ b/gcc/tree.c
@@ -11789,10 +11789,7 @@ tree_set_block (tree t, tree b)
if (IS_EXPR_CODE_CLASS (c))
{
- if (b)
- t->exp.locus = COMBINE_LOCATION_DATA (line_table, t->exp.locus, b);
- else
- t->exp.locus = LOCATION_LOCUS (t->exp.locus);
+ t->exp.locus = set_block (t->exp.locus, b);
}
else
gcc_unreachable ();
@@ -13813,5 +13810,60 @@ nonnull_arg_p (const_tree arg)
return false;
}
+/* Given location LOC, strip away any packed range information
+ or ad-hoc information. */
+
+static location_t
+get_pure_location (location_t loc)
+{
+ if (IS_ADHOC_LOC (loc))
+ loc
+ = line_table->location_adhoc_data_map.data[loc & MAX_SOURCE_LOCATION].locus;
+
+ if (loc >= LINEMAPS_MACRO_LOWEST_LOCATION (line_table))
+ return loc;
+
+ if (loc < RESERVED_LOCATION_COUNT)
+ return loc;
+
+ const line_map *map = linemap_lookup (line_table, loc);
+ const line_map_ordinary *ordmap = linemap_check_ordinary (map);
+
+ return loc & ~((1 << ordmap->m_range_bits) - 1);
+}
+
+/* Combine LOC and BLOCK to a combined adhoc loc, retaining any range
+ information. */
+
+location_t
+set_block (location_t loc, tree block)
+{
+ location_t pure_loc = get_pure_location (loc);
+ source_range src_range = get_range_from_loc (line_table, loc);
+ return COMBINE_LOCATION_DATA (line_table, pure_loc, src_range, block);
+}
+
+void
+set_source_range (tree expr, location_t start, location_t finish)
+{
+ source_range src_range;
+ src_range.m_start = start;
+ src_range.m_finish = finish;
+ set_source_range (expr, src_range);
+}
+
+void
+set_source_range (tree expr, source_range src_range)
+{
+ if (!EXPR_P (expr))
+ return;
+
+ location_t pure_loc = get_pure_location (EXPR_LOCATION (expr));
+ location_t adhoc = COMBINE_LOCATION_DATA (line_table,
+ pure_loc,
+ src_range,
+ NULL);
+ SET_EXPR_LOCATION (expr, adhoc);
+}
#include "gt-tree.h"
diff --git a/gcc/tree.h b/gcc/tree.h
index 1bb59f2ac8c..0b9c3b915dc 100644
--- a/gcc/tree.h
+++ b/gcc/tree.h
@@ -1096,10 +1096,25 @@ extern void omp_clause_range_check_failed (const_tree, const char *, int,
#define EXPR_FILENAME(NODE) LOCATION_FILE (EXPR_CHECK ((NODE))->exp.locus)
#define EXPR_LINENO(NODE) LOCATION_LINE (EXPR_CHECK (NODE)->exp.locus)
+#define CAN_HAVE_RANGE_P(NODE) (CAN_HAVE_LOCATION_P (NODE))
+#define EXPR_LOCATION_RANGE(NODE) (get_expr_source_range (EXPR_CHECK ((NODE))))
+
+#define EXPR_HAS_RANGE(NODE) \
+ (CAN_HAVE_RANGE_P (NODE) \
+ ? EXPR_LOCATION_RANGE (NODE).m_start != UNKNOWN_LOCATION \
+ : false)
+
/* True if a tree is an expression or statement that can have a
location. */
#define CAN_HAVE_LOCATION_P(NODE) ((NODE) && EXPR_P (NODE))
+static inline source_range
+get_expr_source_range (tree expr)
+{
+ location_t loc = EXPR_LOCATION (expr);
+ return get_range_from_loc (line_table, loc);
+}
+
extern void protected_set_expr_location (tree, location_t);
/* In a TARGET_EXPR node. */
@@ -2172,6 +2187,9 @@ extern machine_mode element_mode (const_tree t);
#define DECL_IS_BUILTIN(DECL) \
(LOCATION_LOCUS (DECL_SOURCE_LOCATION (DECL)) <= BUILTINS_LOCATION)
+#define DECL_LOCATION_RANGE(NODE) \
+ (get_decl_source_range (DECL_MINIMAL_CHECK (NODE)))
+
/* For FIELD_DECLs, this is the RECORD_TYPE, UNION_TYPE, or
QUAL_UNION_TYPE node that the field is a member of. For VAR_DECL,
PARM_DECL, FUNCTION_DECL, LABEL_DECL, RESULT_DECL, and CONST_DECL
@@ -5277,10 +5295,25 @@ type_with_alias_set_p (const_tree t)
return false;
}
+extern location_t set_block (location_t loc, tree block);
+
extern void gt_ggc_mx (tree &);
extern void gt_pch_nx (tree &);
extern void gt_pch_nx (tree &, gt_pointer_operator, void *);
extern bool nonnull_arg_p (const_tree);
+extern void
+set_source_range (tree expr, location_t start, location_t finish);
+
+extern void
+set_source_range (tree expr, source_range src_range);
+
+static inline source_range
+get_decl_source_range (tree decl)
+{
+ location_t loc = DECL_SOURCE_LOCATION (decl);
+ return get_range_from_loc (line_table, loc);
+}
+
#endif /* GCC_TREE_H */
diff --git a/gcc/var-tracking.c b/gcc/var-tracking.c
index 388b5348e5b..9185bfd39cf 100644
--- a/gcc/var-tracking.c
+++ b/gcc/var-tracking.c
@@ -9814,7 +9814,7 @@ vt_initialize (void)
alloc_aux_for_blocks (sizeof (variable_tracking_info));
- empty_shared_hash = new shared_hash;
+ empty_shared_hash = shared_hash_pool.allocate ();
empty_shared_hash->refcount = 1;
empty_shared_hash->htab = new variable_table_type (1);
changed_variables = new variable_table_type (10);
diff --git a/include/ChangeLog b/include/ChangeLog
index 004d355228a..15b77c723f4 100644
--- a/include/ChangeLog
+++ b/include/ChangeLog
@@ -1,3 +1,9 @@
+2015-11-12 James Norris <jnorris@codesourcery.com>
+ Joseph Myers <joseph@codesourcery.com>
+
+ * gomp-constants.h (enum gomp_map_kind): Add GOMP_MAP_DEVICE_RESIDENT
+ and GOMP_MAP_LINK.
+
2015-11-09 Alan Modra <amodra@gmail.com>
PR gdb/17133
diff --git a/include/gomp-constants.h b/include/gomp-constants.h
index 7671dd75fad..dffd631aff6 100644
--- a/include/gomp-constants.h
+++ b/include/gomp-constants.h
@@ -72,6 +72,11 @@ enum gomp_map_kind
POINTER_SIZE_UNITS. */
GOMP_MAP_FORCE_DEVICEPTR = (GOMP_MAP_FLAG_SPECIAL_1 | 0),
/* Do not map, copy bits for firstprivate instead. */
+ /* OpenACC device_resident. */
+ GOMP_MAP_DEVICE_RESIDENT = (GOMP_MAP_FLAG_SPECIAL_1 | 1),
+ /* OpenACC link. */
+ GOMP_MAP_LINK = (GOMP_MAP_FLAG_SPECIAL_1 | 2),
+ /* Allocate. */
GOMP_MAP_FIRSTPRIVATE = (GOMP_MAP_FLAG_SPECIAL | 0),
/* Similarly, but store the value in the pointer rather than
pointed by the pointer. */
diff --git a/libcpp/ChangeLog b/libcpp/ChangeLog
index 57ac5bfbde1..5a87c1791c4 100644
--- a/libcpp/ChangeLog
+++ b/libcpp/ChangeLog
@@ -1,3 +1,85 @@
+2015-11-13 David Malcolm <dmalcolm@redhat.com>
+
+ * errors.c (cpp_diagnostic): Pass pfile->line_table to
+ rich_location ctor.
+ (cpp_diagnostic_with_line): Likewise.
+ * include/cpplib.h (struct cpp_token): Update comment for src_loc
+ to indicate that the range of the token is "baked into" the
+ source_location.
+ * include/line-map.h (source_location): Update the descriptive
+ comment to reflect the packing scheme for short ranges, adding
+ worked examples of location encoding.
+ (struct line_map_ordinary): Drop field "column_bits" in favor
+ of field "m_column_and_range_bits"; add field "m_range_bits".
+ (ORDINARY_MAP_NUMBER_OF_COLUMN_BITS): Delete.
+ (location_adhoc_data): Add source_range field.
+ (struct line_maps): Add fields "default_range_bits",
+ "num_optimized_ranges" and "num_unoptimized_ranges".
+ (get_combined_adhoc_loc): Add source_range param.
+ (get_range_from_loc): New declaration.
+ (pure_location_p): New prototype.
+ (COMBINE_LOCATION_DATA): Add source_range param.
+ (SOURCE_LINE): Update for renaming of column_bits.
+ (SOURCE_COLUMN): Likewise. Shift the column right by the map's
+ range_bits.
+ (LAST_SOURCE_LINE_LOCATION): Update for renaming of column_bits.
+ (linemap_position_for_line_and_column): Add line_maps * params.
+ (rich_location::rich_location): Likewise.
+ * lex.c (_cpp_lex_direct): Capture the range of the token, baking
+ it into token->src_loc via a call to COMBINE_LOCATION_DATA.
+ * line-map.c (LINE_MAP_MAX_COLUMN_NUMBER): Reduce from 1U << 17 to
+ 1U << 12.
+ (location_adhoc_data_hash): Add the src_range into
+ the hash value.
+ (location_adhoc_data_eq): Require equality of the src_range
+ values.
+ (can_be_stored_compactly_p): New function.
+ (get_combined_adhoc_loc): Add src_range param, and store it,
+ via a bit-packing scheme for short ranges, otherwise within the
+ lookaside table. Remove the requirement that data is non-NULL.
+ (get_range_from_adhoc_loc): New function.
+ (get_range_from_loc): New function.
+ (pure_location_p): New function.
+ (linemap_add): Ensure that start_location has zero for the
+ range_bits, unless we're past LINE_MAP_MAX_LOCATION_WITH_COLS.
+ Initialize range_bits to zero. Assert that the start_location
+ is "pure".
+ (linemap_line_start): Assert that the
+ column_and_range_bits >= range_bits.
+ Update determinination of whether we need to start a new map
+ using the effective column bits, without the range bits.
+ Use the set's default_range_bits in new maps, apart from
+ those with column_bits == 0, which should also have 0 range_bits.
+ Increase the column bits for new maps by the range bits.
+ When adding lines to an existing map, use set->highest_line
+ directly rather than offsetting highest by SOURCE_COLUMN.
+ Add assertions to sanity-check the return value.
+ (linemap_position_for_column): Offset to_column by range_bits.
+ Update set->highest_location if necessary.
+ (linemap_position_for_line_and_column): Add line_maps * param.
+ Update the calculation to offset the column by range_bits, and
+ conditionalize it on being <= LINE_MAP_MAX_LOCATION_WITH_COLS.
+ Bound it by LINEMAPS_MACRO_LOWEST_LOCATION. Update
+ set->highest_location if necessary.
+ (linemap_position_for_loc_and_offset): Handle ad-hoc locations;
+ pass "set" to linemap_position_for_line_and_column.
+ (linemap_macro_map_loc_unwind_toward_spelling): Add line_maps
+ param. Handle ad-hoc locations.
+ (linemap_location_in_system_header_p): Pass on "set" to call to
+ linemap_macro_map_loc_unwind_toward_spelling.
+ (linemap_macro_loc_to_spelling_point): Retain ad-hoc locations.
+ Pass on "set" to call to
+ linemap_macro_map_loc_unwind_toward_spelling.
+ (linemap_resolve_location): Retain ad-hoc locations. Pass on
+ "set" to call to linemap_macro_map_loc_unwind_toward_spelling.
+ (linemap_unwind_toward_expansion): Pass on "set" to call to
+ linemap_macro_map_loc_unwind_toward_spelling.
+ (linemap_expand_location): Extract the data pointer before
+ extracting the location.
+ (rich_location::rich_location): Add line_maps param; use it to
+ extract the range from the source_location.
+ * location-example.txt: Regenerate, showing new representation.
+
2015-11-06 David Malcolm <dmalcolm@redhat.com>
* errors.c (cpp_diagnostic): Update for change in signature
diff --git a/libcpp/errors.c b/libcpp/errors.c
index c351c112ad1..8790e10f5c8 100644
--- a/libcpp/errors.c
+++ b/libcpp/errors.c
@@ -57,7 +57,7 @@ cpp_diagnostic (cpp_reader * pfile, int level, int reason,
if (!pfile->cb.error)
abort ();
- rich_location richloc (src_loc);
+ rich_location richloc (pfile->line_table, src_loc);
ret = pfile->cb.error (pfile, level, reason, &richloc, _(msgid), ap);
return ret;
@@ -140,7 +140,7 @@ cpp_diagnostic_with_line (cpp_reader * pfile, int level, int reason,
if (!pfile->cb.error)
abort ();
- rich_location richloc (src_loc);
+ rich_location richloc (pfile->line_table, src_loc);
richloc.override_column (column);
ret = pfile->cb.error (pfile, level, reason, &richloc, _(msgid), ap);
diff --git a/libcpp/include/cpplib.h b/libcpp/include/cpplib.h
index a2bdfa0c808..f5c2a21e952 100644
--- a/libcpp/include/cpplib.h
+++ b/libcpp/include/cpplib.h
@@ -237,7 +237,8 @@ struct GTY(()) cpp_identifier {
/* A preprocessing token. This has been carefully packed and should
occupy 16 bytes on 32-bit hosts and 24 bytes on 64-bit hosts. */
struct GTY(()) cpp_token {
- source_location src_loc; /* Location of first char of token. */
+ source_location src_loc; /* Location of first char of token,
+ together with range of full token. */
ENUM_BITFIELD(cpp_ttype) type : CHAR_BIT; /* token type */
unsigned short flags; /* flags - see above */
diff --git a/libcpp/include/line-map.h b/libcpp/include/line-map.h
index c9340a6eaef..e7608f1e468 100644
--- a/libcpp/include/line-map.h
+++ b/libcpp/include/line-map.h
@@ -47,7 +47,8 @@ enum lc_reason
typedef unsigned int linenum_type;
/* The typedef "source_location" is a key within the location database,
- identifying a source location or macro expansion.
+ identifying a source location or macro expansion, along with range
+ information, and (optionally) a pointer for use by gcc.
This key only has meaning in relation to a line_maps instance. Within
gcc there is a single line_maps instance: "line_table", declared in
@@ -69,13 +70,48 @@ typedef unsigned int linenum_type;
| ordmap[0]->start_location) | first line in ordmap 0
-----------+-------------------------------+-------------------------------
| ordmap[1]->start_location | First line in ordmap 1
- | ordmap[1]->start_location+1 | First column in that line
- | ordmap[1]->start_location+2 | 2nd column in that line
- | | Subsequent lines are offset by
- | | (1 << column_bits),
- | | e.g. 128 for 7 bits, with a
- | | column value of 0 representing
- | | "the whole line".
+ | ordmap[1]->start_location+32 | First column in that line
+ | (assuming range_bits == 5) |
+ | ordmap[1]->start_location+64 | 2nd column in that line
+ | ordmap[1]->start_location+4096| Second line in ordmap 1
+ | (assuming column_bits == 12)
+ |
+ | Subsequent lines are offset by (1 << column_bits),
+ | e.g. 4096 for 12 bits, with a column value of 0 representing
+ | "the whole line".
+ |
+ | Within a line, the low "range_bits" (typically 5) are used for
+ | storing short ranges, so that there's an offset of
+ | (1 << range_bits) between individual columns within a line,
+ | typically 32.
+ | The low range_bits store the offset of the end point from the
+ | start point, and the start point is found by masking away
+ | the range bits.
+ |
+ | For example:
+ | ordmap[1]->start_location+64 "2nd column in that line"
+ | above means a caret at that location, with a range
+ | starting and finishing at the same place (the range bits
+ | are 0), a range of length 1.
+ |
+ | By contrast:
+ | ordmap[1]->start_location+68
+ | has range bits 0x4, meaning a caret with a range starting at
+ | that location, but with endpoint 4 columns further on: a range
+ | of length 5.
+ |
+ | Ranges that have caret != start, or have an endpoint too
+ | far away to fit in range_bits are instead stored as ad-hoc
+ | locations. Hence for range_bits == 5 we can compactly store
+ | tokens of length <= 32 without needing to use the ad-hoc
+ | table.
+ |
+ | This packing scheme means we effectively have
+ | (column_bits - range_bits)
+ | of bits for the columns, typically (12 - 5) = 7, for 128
+ | columns; longer line widths are accomodated by starting a
+ | new ordmap with a higher column_bits.
+ |
| ordmap[2]->start_location-1 | Final location in ordmap 1
-----------+-------------------------------+-------------------------------
| ordmap[2]->start_location | First line in ordmap 2
@@ -127,8 +163,101 @@ typedef unsigned int linenum_type;
0xffffffff | UINT_MAX |
-----------+-------------------------------+-------------------------------
- To see how this works in practice, see the worked example in
- libcpp/location-example.txt. */
+ Examples of location encoding.
+
+ Packed ranges
+ =============
+
+ Consider encoding the location of a token "foo", seen underlined here
+ on line 523, within an ordinary line_map that starts at line 500:
+
+ 11111111112
+ 12345678901234567890
+ 522
+ 523 return foo + bar;
+ ^~~
+ 524
+
+ The location's caret and start are both at line 523, column 11; the
+ location's finish is on the same line, at column 13 (an offset of 2
+ columns, for length 3).
+
+ Line 523 is offset 23 from the starting line of the ordinary line_map.
+
+ caret == start, and the offset of the finish fits within 5 bits, so
+ this can be stored as a packed range.
+
+ This is encoded as:
+ ordmap->start
+ + (line_offset << ordmap->m_column_and_range_bits)
+ + (column << ordmap->m_range_bits)
+ + (range_offset);
+ i.e. (for line offset 23, column 11, range offset 2):
+ ordmap->start
+ + (23 << 12)
+ + (11 << 5)
+ + 2;
+ i.e.:
+ ordmap->start + 0x17162
+ assuming that the line_map uses the default of 7 bits for columns and
+ 5 bits for packed range (giving 12 bits for m_column_and_range_bits).
+
+
+ "Pure" locations
+ ================
+
+ These are a special case of the above, where
+ caret == start == finish
+ They are stored as packed ranges with offset == 0.
+ For example, the location of the "f" of "foo" could be stored
+ as above, but with range offset 0, giving:
+ ordmap->start
+ + (23 << 12)
+ + (11 << 5)
+ + 0;
+ i.e.:
+ ordmap->start + 0x17160
+
+
+ Unoptimized ranges
+ ==================
+
+ Consider encoding the location of the binary expression
+ below:
+
+ 11111111112
+ 12345678901234567890
+ 521
+ 523 return foo + bar;
+ ~~~~^~~~~
+ 523
+
+ The location's caret is at the "+", line 523 column 15, but starts
+ earlier, at the "f" of "foo" at column 11. The finish is at the "r"
+ of "bar" at column 19.
+
+ This can't be stored as a packed range since start != caret.
+ Hence it is stored as an ad-hoc location e.g. 0x80000003.
+
+ Stripping off the top bit gives us an index into the ad-hoc
+ lookaside table:
+
+ line_table->location_adhoc_data_map.data[0x3]
+
+ from which the caret, start and finish can be looked up,
+ encoded as "pure" locations:
+
+ start == ordmap->start + (23 << 12) + (11 << 5)
+ == ordmap->start + 0x17160 (as above; the "f" of "foo")
+
+ caret == ordmap->start + (23 << 12) + (15 << 5)
+ == ordmap->start + 0x171e0
+
+ finish == ordmap->start + (23 << 12) + (19 << 5)
+ == ordmap->start + 0x17260
+
+ To further see how source_location works in practice, see the
+ worked example in libcpp/location-example.txt. */
typedef unsigned int source_location;
/* A range of source locations.
@@ -217,8 +346,9 @@ struct GTY((tag ("0"), desc ("%h.reason == LC_ENTER_MACRO ? 2 : 1"))) line_map {
Physical source file TO_FILE at line TO_LINE at column 0 is represented
by the logical START_LOCATION. TO_LINE+L at column C is represented by
- START_LOCATION+(L*(1<<column_bits))+C, as long as C<(1<<column_bits),
- and the result_location is less than the next line_map's start_location.
+ START_LOCATION+(L*(1<<m_column_and_range_bits))+(C*1<<m_range_bits), as
+ long as C<(1<<effective range bits), and the result_location is less than
+ the next line_map's start_location.
(The top line is line 1 and the leftmost column is column 1; line/column 0
means "entire file/line" or "unknown line/column" or "not applicable".)
@@ -238,8 +368,24 @@ struct GTY((tag ("1"))) line_map_ordinary : public line_map {
cpp_buffer. */
unsigned char sysp;
- /* Number of the low-order source_location bits used for a column number. */
- unsigned int column_bits : 8;
+ /* Number of the low-order source_location bits used for column numbers
+ and ranges. */
+ unsigned int m_column_and_range_bits : 8;
+
+ /* Number of the low-order "column" bits used for storing short ranges
+ inline, rather than in the ad-hoc table.
+ MSB LSB
+ 31 0
+ +-------------------------+-------------------------------------------+
+ | |<---map->column_and_range_bits (e.g. 12)-->|
+ +-------------------------+-----------------------+-------------------+
+ | | column_and_range_bits | map->range_bits |
+ | | - range_bits | |
+ +-------------------------+-----------------------+-------------------+
+ | row bits | effective column bits | short range bits |
+ | | (e.g. 7) | (e.g. 5) |
+ +-------------------------+-----------------------+-------------------+ */
+ unsigned int m_range_bits : 8;
};
/* This is the highest possible source location encoded within an
@@ -435,15 +581,6 @@ ORDINARY_MAP_IN_SYSTEM_HEADER_P (const line_map_ordinary *ord_map)
return ord_map->sysp;
}
-/* Get the number of the low-order source_location bits used for a
- column number within ordinary map MAP. */
-
-inline unsigned char
-ORDINARY_MAP_NUMBER_OF_COLUMN_BITS (const line_map_ordinary *ord_map)
-{
- return ord_map->column_bits;
-}
-
/* Get the filename of ordinary map MAP. */
inline const char *
@@ -524,9 +661,11 @@ struct GTY(()) maps_info_macro {
unsigned int cache;
};
-/* Data structure to associate an arbitrary data to a source location. */
+/* Data structure to associate a source_range together with an arbitrary
+ data pointer with a source location. */
struct GTY(()) location_adhoc_data {
source_location locus;
+ source_range src_range;
void * GTY((skip)) data;
};
@@ -588,6 +727,12 @@ struct GTY(()) line_maps {
/* True if we've seen a #line or # 44 "file" directive. */
bool seen_line_directive;
+
+ /* The default value of range_bits in ordinary line maps. */
+ unsigned int default_range_bits;
+
+ unsigned int num_optimized_ranges;
+ unsigned int num_unoptimized_ranges;
};
/* Returns the number of allocated maps so far. MAP_KIND shall be TRUE
@@ -825,11 +970,15 @@ LINEMAPS_LAST_ALLOCATED_MACRO_MAP (const line_maps *set)
extern void location_adhoc_data_fini (struct line_maps *);
extern source_location get_combined_adhoc_loc (struct line_maps *,
- source_location, void *);
+ source_location,
+ source_range,
+ void *);
extern void *get_data_from_adhoc_loc (struct line_maps *, source_location);
extern source_location get_location_from_adhoc_loc (struct line_maps *,
source_location);
+extern source_range get_range_from_loc (line_maps *set, source_location loc);
+
/* Get whether location LOC is an ad-hoc location. */
inline bool
@@ -838,14 +987,21 @@ IS_ADHOC_LOC (source_location loc)
return (loc & MAX_SOURCE_LOCATION) != loc;
}
+/* Get whether location LOC is a "pure" location, or
+ whether it is an ad-hoc location, or embeds range information. */
+
+bool
+pure_location_p (line_maps *set, source_location loc);
+
/* Combine LOC and BLOCK, giving a combined adhoc location. */
inline source_location
COMBINE_LOCATION_DATA (struct line_maps *set,
source_location loc,
+ source_range src_range,
void *block)
{
- return get_combined_adhoc_loc (set, loc, block);
+ return get_combined_adhoc_loc (set, loc, src_range, block);
}
extern void rebuild_location_adhoc_htab (struct line_maps *);
@@ -931,7 +1087,7 @@ inline linenum_type
SOURCE_LINE (const line_map_ordinary *ord_map, source_location loc)
{
return ((loc - ord_map->start_location)
- >> ord_map->column_bits) + ord_map->to_line;
+ >> ord_map->m_column_and_range_bits) + ord_map->to_line;
}
/* Convert a map and source_location to source column number. */
@@ -939,7 +1095,7 @@ inline linenum_type
SOURCE_COLUMN (const line_map_ordinary *ord_map, source_location loc)
{
return ((loc - ord_map->start_location)
- & ((1 << ord_map->column_bits) - 1));
+ & ((1 << ord_map->m_column_and_range_bits) - 1)) >> ord_map->m_range_bits;
}
/* Return the location of the last source line within an ordinary
@@ -949,7 +1105,7 @@ LAST_SOURCE_LINE_LOCATION (const line_map_ordinary *map)
{
return (((map[1].start_location - 1
- map->start_location)
- & ~((1 << map->column_bits) - 1))
+ & ~((1 << map->m_column_and_range_bits) - 1))
+ map->start_location);
}
@@ -999,7 +1155,8 @@ linemap_position_for_column (struct line_maps *, unsigned int);
/* Encode and return a source location from a given line and
column. */
source_location
-linemap_position_for_line_and_column (const line_map_ordinary *,
+linemap_position_for_line_and_column (line_maps *set,
+ const line_map_ordinary *,
linenum_type, unsigned int);
/* Encode and return a source_location starting from location LOC and
@@ -1187,7 +1344,7 @@ class rich_location
/* Constructors. */
/* Constructing from a location. */
- rich_location (source_location loc);
+ rich_location (line_maps *set, source_location loc);
/* Constructing from a source_range. */
rich_location (source_range src_range);
diff --git a/libcpp/lex.c b/libcpp/lex.c
index 7e97bc2b289..d9b428ad8d8 100644
--- a/libcpp/lex.c
+++ b/libcpp/lex.c
@@ -2723,6 +2723,19 @@ _cpp_lex_direct (cpp_reader *pfile)
break;
}
+ source_range tok_range;
+ tok_range.m_start = result->src_loc;
+ if (result->src_loc >= RESERVED_LOCATION_COUNT)
+ tok_range.m_finish
+ = linemap_position_for_column (pfile->line_table,
+ CPP_BUF_COLUMN (buffer, buffer->cur));
+ else
+ tok_range.m_finish = tok_range.m_start;
+
+ result->src_loc = COMBINE_LOCATION_DATA (pfile->line_table,
+ result->src_loc,
+ tok_range, NULL);
+
return result;
}
diff --git a/libcpp/line-map.c b/libcpp/line-map.c
index 3c19f93b7a5..c5aa4223b1b 100644
--- a/libcpp/line-map.c
+++ b/libcpp/line-map.c
@@ -27,9 +27,9 @@ along with this program; see the file COPYING3. If not see
#include "hashtab.h"
/* Do not track column numbers higher than this one. As a result, the
- range of column_bits is [7, 18] (or 0 if column numbers are
+ range of column_bits is [12, 18] (or 0 if column numbers are
disabled). */
-const unsigned int LINE_MAP_MAX_COLUMN_NUMBER = (1U << 17);
+const unsigned int LINE_MAP_MAX_COLUMN_NUMBER = (1U << 12);
/* Do not track column numbers if locations get higher than this. */
const source_location LINE_MAP_MAX_LOCATION_WITH_COLS = 0x60000000;
@@ -46,7 +46,7 @@ static const line_map_macro* linemap_macro_map_lookup (struct line_maps *,
static source_location linemap_macro_map_loc_to_def_point
(const line_map_macro *, source_location);
static source_location linemap_macro_map_loc_unwind_toward_spelling
-(const line_map_macro *, source_location);
+(line_maps *set, const line_map_macro *, source_location);
static source_location linemap_macro_map_loc_to_exp_point
(const line_map_macro *, source_location);
static source_location linemap_macro_loc_to_spelling_point
@@ -69,7 +69,10 @@ location_adhoc_data_hash (const void *l)
{
const struct location_adhoc_data *lb =
(const struct location_adhoc_data *) l;
- return (hashval_t) lb->locus + (size_t) lb->data;
+ return ((hashval_t) lb->locus
+ + (hashval_t) lb->src_range.m_start
+ + (hashval_t) lb->src_range.m_finish
+ + (size_t) lb->data);
}
/* Compare function for location_adhoc_data hashtable. */
@@ -81,7 +84,10 @@ location_adhoc_data_eq (const void *l1, const void *l2)
(const struct location_adhoc_data *) l1;
const struct location_adhoc_data *lb2 =
(const struct location_adhoc_data *) l2;
- return lb1->locus == lb2->locus && lb1->data == lb2->data;
+ return (lb1->locus == lb2->locus
+ && lb1->src_range.m_start == lb2->src_range.m_start
+ && lb1->src_range.m_finish == lb2->src_range.m_finish
+ && lb1->data == lb2->data);
}
/* Update the hashtable when location_adhoc_data is reallocated. */
@@ -106,23 +112,103 @@ rebuild_location_adhoc_htab (struct line_maps *set)
set->location_adhoc_data_map.data + i, INSERT);
}
+/* Helper function for get_combined_adhoc_loc.
+ Can the given LOCUS + SRC_RANGE and DATA pointer be stored compactly
+ within a source_location, without needing to use an ad-hoc location. */
+
+static bool
+can_be_stored_compactly_p (struct line_maps *set,
+ source_location locus,
+ source_range src_range,
+ void *data)
+{
+ /* If there's an ad-hoc pointer, we can't store it directly in the
+ source_location, we need the lookaside. */
+ if (data)
+ return false;
+
+ /* We only store ranges that begin at the locus and that are sufficiently
+ "sane". */
+ if (src_range.m_start != locus)
+ return false;
+
+ if (src_range.m_finish < src_range.m_start)
+ return false;
+
+ if (src_range.m_start < RESERVED_LOCATION_COUNT)
+ return false;
+
+ if (locus >= LINE_MAP_MAX_LOCATION_WITH_COLS)
+ return false;
+
+ /* All 3 locations must be within ordinary maps, typically, the same
+ ordinary map. */
+ source_location lowest_macro_loc = LINEMAPS_MACRO_LOWEST_LOCATION (set);
+ if (locus >= lowest_macro_loc)
+ return false;
+ if (src_range.m_start >= lowest_macro_loc)
+ return false;
+ if (src_range.m_finish >= lowest_macro_loc)
+ return false;
+
+ /* Passed all tests. */
+ return true;
+}
+
/* Combine LOCUS and DATA to a combined adhoc loc. */
source_location
get_combined_adhoc_loc (struct line_maps *set,
- source_location locus, void *data)
+ source_location locus,
+ source_range src_range,
+ void *data)
{
struct location_adhoc_data lb;
struct location_adhoc_data **slot;
- linemap_assert (data);
-
if (IS_ADHOC_LOC (locus))
locus
= set->location_adhoc_data_map.data[locus & MAX_SOURCE_LOCATION].locus;
if (locus == 0 && data == NULL)
return 0;
+
+ /* Any ordinary locations ought to be "pure" at this point: no
+ compressed ranges. */
+ linemap_assert (locus < RESERVED_LOCATION_COUNT
+ || locus >= LINE_MAP_MAX_LOCATION_WITH_COLS
+ || locus >= LINEMAPS_MACRO_LOWEST_LOCATION (set)
+ || pure_location_p (set, locus));
+
+ /* Consider short-range optimization. */
+ if (can_be_stored_compactly_p (set, locus, src_range, data))
+ {
+ /* The low bits ought to be clear. */
+ linemap_assert (pure_location_p (set, locus));
+ const line_map *map = linemap_lookup (set, locus);
+ const line_map_ordinary *ordmap = linemap_check_ordinary (map);
+ unsigned int int_diff = src_range.m_finish - src_range.m_start;
+ unsigned int col_diff = (int_diff >> ordmap->m_range_bits);
+ if (col_diff < (1U << ordmap->m_range_bits))
+ {
+ source_location packed = locus | col_diff;
+ set->num_optimized_ranges++;
+ return packed;
+ }
+ }
+
+ /* We can also compactly store the reserved locations
+ when locus == start == finish (and data is NULL). */
+ if (locus < RESERVED_LOCATION_COUNT
+ && locus == src_range.m_start
+ && locus == src_range.m_finish
+ && !data)
+ return locus;
+
+ if (!data)
+ set->num_unoptimized_ranges++;
+
lb.locus = locus;
+ lb.src_range = src_range;
lb.data = data;
slot = (struct location_adhoc_data **)
htab_find_slot (set->location_adhoc_data_map.htab, &lb, INSERT);
@@ -177,6 +263,60 @@ get_location_from_adhoc_loc (struct line_maps *set, source_location loc)
return set->location_adhoc_data_map.data[loc & MAX_SOURCE_LOCATION].locus;
}
+/* Return the source_range for adhoc location LOC. */
+
+static source_range
+get_range_from_adhoc_loc (struct line_maps *set, source_location loc)
+{
+ linemap_assert (IS_ADHOC_LOC (loc));
+ return set->location_adhoc_data_map.data[loc & MAX_SOURCE_LOCATION].src_range;
+}
+
+/* Get the source_range of location LOC, either from the ad-hoc
+ lookaside table, or embedded inside LOC itself. */
+
+source_range
+get_range_from_loc (struct line_maps *set,
+ source_location loc)
+{
+ if (IS_ADHOC_LOC (loc))
+ return get_range_from_adhoc_loc (set, loc);
+
+ /* For ordinary maps, extract packed range. */
+ if (loc >= RESERVED_LOCATION_COUNT
+ && loc < LINEMAPS_MACRO_LOWEST_LOCATION (set)
+ && loc <= LINE_MAP_MAX_LOCATION_WITH_COLS)
+ {
+ const line_map *map = linemap_lookup (set, loc);
+ const line_map_ordinary *ordmap = linemap_check_ordinary (map);
+ source_range result;
+ int offset = loc & ((1 << ordmap->m_range_bits) - 1);
+ result.m_start = loc - offset;
+ result.m_finish = result.m_start + (offset << ordmap->m_range_bits);
+ return result;
+ }
+
+ return source_range::from_location (loc);
+}
+
+/* Get whether location LOC is a "pure" location, or
+ whether it is an ad-hoc location, or embeds range information. */
+
+bool
+pure_location_p (line_maps *set, source_location loc)
+{
+ if (IS_ADHOC_LOC (loc))
+ return false;
+
+ const line_map *map = linemap_lookup (set, loc);
+ const line_map_ordinary *ordmap = linemap_check_ordinary (map);
+
+ if (loc & ((1U << ordmap->m_range_bits) - 1))
+ return false;
+
+ return true;
+}
+
/* Finalize the location_adhoc_data structure. */
void
location_adhoc_data_fini (struct line_maps *set)
@@ -319,7 +459,19 @@ const struct line_map *
linemap_add (struct line_maps *set, enum lc_reason reason,
unsigned int sysp, const char *to_file, linenum_type to_line)
{
- source_location start_location = set->highest_location + 1;
+ /* Generate a start_location above the current highest_location.
+ If possible, make the low range bits be zero. */
+ source_location start_location;
+ if (set->highest_location < LINE_MAP_MAX_LOCATION_WITH_COLS)
+ {
+ start_location = set->highest_location + (1 << set->default_range_bits);
+ if (set->default_range_bits)
+ start_location &= ~((1 << set->default_range_bits) - 1);
+ linemap_assert (0 == (start_location
+ & ((1 << set->default_range_bits) - 1)));
+ }
+ else
+ start_location = set->highest_location + 1;
linemap_assert (!(LINEMAPS_ORDINARY_USED (set)
&& (start_location
@@ -398,11 +550,18 @@ linemap_add (struct line_maps *set, enum lc_reason reason,
map->to_file = to_file;
map->to_line = to_line;
LINEMAPS_ORDINARY_CACHE (set) = LINEMAPS_ORDINARY_USED (set) - 1;
- map->column_bits = 0;
+ map->m_column_and_range_bits = 0;
+ map->m_range_bits = 0;
set->highest_location = start_location;
set->highest_line = start_location;
set->max_column_hint = 0;
+ /* This assertion is placed after set->highest_location has
+ been updated, since the latter affects
+ linemap_location_from_macro_expansion_p, which ultimately affects
+ pure_location_p. */
+ linemap_assert (pure_location_p (set, start_location));
+
if (reason == LC_ENTER)
{
map->included_from =
@@ -549,13 +708,14 @@ linemap_line_start (struct line_maps *set, linenum_type to_line,
SOURCE_LINE (map, set->highest_line);
int line_delta = to_line - last_line;
bool add_map = false;
+ linemap_assert (map->m_column_and_range_bits >= map->m_range_bits);
+ int effective_column_bits = map->m_column_and_range_bits - map->m_range_bits;
if (line_delta < 0
|| (line_delta > 10
- && line_delta * ORDINARY_MAP_NUMBER_OF_COLUMN_BITS (map) > 1000)
- || (max_column_hint >= (1U << ORDINARY_MAP_NUMBER_OF_COLUMN_BITS (map)))
- || (max_column_hint <= 80
- && ORDINARY_MAP_NUMBER_OF_COLUMN_BITS (map) >= 10)
+ && line_delta * map->m_column_and_range_bits > 1000)
+ || (max_column_hint >= (1U << effective_column_bits))
+ || (max_column_hint <= 80 && effective_column_bits >= 10)
|| (highest > LINE_MAP_MAX_LOCATION_WITH_COLS
&& (set->max_column_hint || highest >= LINE_MAP_MAX_SOURCE_LOCATION)))
add_map = true;
@@ -564,22 +724,27 @@ linemap_line_start (struct line_maps *set, linenum_type to_line,
if (add_map)
{
int column_bits;
+ int range_bits;
if (max_column_hint > LINE_MAP_MAX_COLUMN_NUMBER
|| highest > LINE_MAP_MAX_LOCATION_WITH_COLS)
{
/* If the column number is ridiculous or we've allocated a huge
- number of source_locations, give up on column numbers. */
+ number of source_locations, give up on column numbers
+ (and on packed ranges). */
max_column_hint = 0;
column_bits = 0;
+ range_bits = 0;
if (highest > LINE_MAP_MAX_SOURCE_LOCATION)
return 0;
}
else
{
column_bits = 7;
+ range_bits = set->default_range_bits;
while (max_column_hint >= (1U << column_bits))
column_bits++;
max_column_hint = 1U << column_bits;
+ column_bits += range_bits;
}
/* Allocate the new line_map. However, if the current map only has a
single line we can sometimes just increase its column_bits instead. */
@@ -592,14 +757,14 @@ linemap_line_start (struct line_maps *set, linenum_type to_line,
ORDINARY_MAP_IN_SYSTEM_HEADER_P (map),
ORDINARY_MAP_FILE_NAME (map),
to_line)));
- map->column_bits = column_bits;
+ map->m_column_and_range_bits = column_bits;
+ map->m_range_bits = range_bits;
r = (MAP_START_LOCATION (map)
+ ((to_line - ORDINARY_MAP_STARTING_LINE_NUMBER (map))
<< column_bits));
}
else
- r = highest - SOURCE_COLUMN (map, highest)
- + (line_delta << ORDINARY_MAP_NUMBER_OF_COLUMN_BITS (map));
+ r = set->highest_line + (line_delta << map->m_column_and_range_bits);
/* Locations of ordinary tokens are always lower than locations of
macro tokens. */
@@ -610,6 +775,18 @@ linemap_line_start (struct line_maps *set, linenum_type to_line,
if (r > set->highest_location)
set->highest_location = r;
set->max_column_hint = max_column_hint;
+
+ /* At this point, we expect one of:
+ (a) the normal case: a "pure" location with 0 range bits, or
+ (b) we've gone past LINE_MAP_MAX_LOCATION_WITH_COLS so can't track
+ columns anymore (or ranges), or
+ (c) we're in a region with a column hint exceeding
+ LINE_MAP_MAX_COLUMN_NUMBER, so column-tracking is off,
+ with column_bits == 0. */
+ linemap_assert (pure_location_p (set, r)
+ || r >= LINE_MAP_MAX_LOCATION_WITH_COLS
+ || map->m_column_and_range_bits == 0);
+ linemap_assert (SOURCE_LINE (map, r) == to_line);
return r;
}
@@ -640,7 +817,8 @@ linemap_position_for_column (struct line_maps *set, unsigned int to_column)
r = linemap_line_start (set, SOURCE_LINE (map, r), to_column + 50);
}
}
- r = r + to_column;
+ line_map_ordinary *map = LINEMAPS_LAST_ORDINARY_MAP (set);
+ r = r + (to_column << map->m_range_bits);
if (r >= set->highest_location)
set->highest_location = r;
return r;
@@ -650,16 +828,25 @@ linemap_position_for_column (struct line_maps *set, unsigned int to_column)
column. */
source_location
-linemap_position_for_line_and_column (const line_map_ordinary *ord_map,
+linemap_position_for_line_and_column (line_maps *set,
+ const line_map_ordinary *ord_map,
linenum_type line,
unsigned column)
{
linemap_assert (ORDINARY_MAP_STARTING_LINE_NUMBER (ord_map) <= line);
- return (MAP_START_LOCATION (ord_map)
- + ((line - ORDINARY_MAP_STARTING_LINE_NUMBER (ord_map))
- << ORDINARY_MAP_NUMBER_OF_COLUMN_BITS (ord_map))
- + (column & ((1 << ORDINARY_MAP_NUMBER_OF_COLUMN_BITS (ord_map)) - 1)));
+ source_location r = MAP_START_LOCATION (ord_map);
+ r += ((line - ORDINARY_MAP_STARTING_LINE_NUMBER (ord_map))
+ << ord_map->m_column_and_range_bits);
+ if (r <= LINE_MAP_MAX_LOCATION_WITH_COLS)
+ r += ((column & ((1 << ord_map->m_column_and_range_bits) - 1))
+ << ord_map->m_range_bits);
+ source_location upper_limit = LINEMAPS_MACRO_LOWEST_LOCATION (set);
+ if (r >= upper_limit)
+ r = upper_limit - 1;
+ if (r > set->highest_location)
+ set->highest_location = r;
+ return r;
}
/* Encode and return a source_location starting from location LOC and
@@ -673,6 +860,9 @@ linemap_position_for_loc_and_offset (struct line_maps *set,
{
const line_map_ordinary * map = NULL;
+ if (IS_ADHOC_LOC (loc))
+ loc = set->location_adhoc_data_map.data[loc & MAX_SOURCE_LOCATION].locus;
+
/* This function does not support virtual locations yet. */
if (linemap_assert_fails
(!linemap_location_from_macro_expansion_p (set, loc)))
@@ -711,11 +901,11 @@ linemap_position_for_loc_and_offset (struct line_maps *set,
}
offset += column;
- if (linemap_assert_fails (offset < (1u << map->column_bits)))
+ if (linemap_assert_fails (offset < (1u << map->m_column_and_range_bits)))
return loc;
source_location r =
- linemap_position_for_line_and_column (map, line, offset);
+ linemap_position_for_line_and_column (set, map, line, offset);
if (linemap_assert_fails (r <= set->highest_location)
|| linemap_assert_fails (map == linemap_lookup (set, r)))
return loc;
@@ -893,14 +1083,19 @@ linemap_macro_map_loc_to_def_point (const line_map_macro *map,
In other words, this returns the xI location presented in the
comments of line_map_macro above. */
source_location
-linemap_macro_map_loc_unwind_toward_spelling (const line_map_macro* map,
+linemap_macro_map_loc_unwind_toward_spelling (line_maps *set,
+ const line_map_macro* map,
source_location location)
{
unsigned token_no;
+ if (IS_ADHOC_LOC (location))
+ location = get_location_from_adhoc_loc (set, location);
+
linemap_assert (linemap_macro_expansion_map_p (map)
&& location >= MAP_START_LOCATION (map));
linemap_assert (location >= RESERVED_LOCATION_COUNT);
+ linemap_assert (!IS_ADHOC_LOC (location));
token_no = location - MAP_START_LOCATION (map);
linemap_assert (token_no < MACRO_MAP_NUM_MACRO_TOKENS (map));
@@ -1010,7 +1205,7 @@ linemap_location_in_system_header_p (struct line_maps *set,
/* It's a token resulting from a macro expansion. */
source_location loc =
- linemap_macro_map_loc_unwind_toward_spelling (macro_map, location);
+ linemap_macro_map_loc_unwind_toward_spelling (set, macro_map, location);
if (loc < RESERVED_LOCATION_COUNT)
/* This token might come from a built-in macro. Let's
look at where that macro got expanded. */
@@ -1183,11 +1378,6 @@ linemap_macro_loc_to_spelling_point (struct line_maps *set,
const line_map_ordinary **original_map)
{
struct line_map *map;
-
- if (IS_ADHOC_LOC (location))
- location = set->location_adhoc_data_map.data[location
- & MAX_SOURCE_LOCATION].locus;
-
linemap_assert (set && location >= RESERVED_LOCATION_COUNT);
while (true)
@@ -1198,7 +1388,7 @@ linemap_macro_loc_to_spelling_point (struct line_maps *set,
location
= linemap_macro_map_loc_unwind_toward_spelling
- (linemap_check_macro (map),
+ (set, linemap_check_macro (map),
location);
}
@@ -1341,10 +1531,11 @@ linemap_resolve_location (struct line_maps *set,
enum location_resolution_kind lrk,
const line_map_ordinary **map)
{
+ source_location locus = loc;
if (IS_ADHOC_LOC (loc))
- loc = set->location_adhoc_data_map.data[loc & MAX_SOURCE_LOCATION].locus;
+ locus = set->location_adhoc_data_map.data[loc & MAX_SOURCE_LOCATION].locus;
- if (loc < RESERVED_LOCATION_COUNT)
+ if (locus < RESERVED_LOCATION_COUNT)
{
/* A reserved location wasn't encoded in a map. Let's return a
NULL map here, just like what linemap_ordinary_map_lookup
@@ -1396,7 +1587,7 @@ linemap_unwind_toward_expansion (struct line_maps *set,
loc = set->location_adhoc_data_map.data[loc & MAX_SOURCE_LOCATION].locus;
resolved_location =
- linemap_macro_map_loc_unwind_toward_spelling (macro_map, loc);
+ linemap_macro_map_loc_unwind_toward_spelling (set, macro_map, loc);
resolved_map = linemap_lookup (set, resolved_location);
if (!linemap_macro_expansion_map_p (resolved_map))
@@ -1478,9 +1669,9 @@ linemap_expand_location (struct line_maps *set,
memset (&xloc, 0, sizeof (xloc));
if (IS_ADHOC_LOC (loc))
{
- loc = set->location_adhoc_data_map.data[loc & MAX_SOURCE_LOCATION].locus;
xloc.data
= set->location_adhoc_data_map.data[loc & MAX_SOURCE_LOCATION].data;
+ loc = set->location_adhoc_data_map.data[loc & MAX_SOURCE_LOCATION].locus;
}
if (loc < RESERVED_LOCATION_COUNT)
@@ -1760,13 +1951,14 @@ line_table_dump (FILE *stream, struct line_maps *set, unsigned int num_ordinary,
/* Construct a rich_location with location LOC as its initial range. */
-rich_location::rich_location (source_location loc) :
+rich_location::rich_location (line_maps *set, source_location loc) :
m_loc (loc),
m_num_ranges (0),
m_have_expanded_location (false)
{
- /* Set up the 0th range: */
- add_range (loc, loc, true);
+ /* Set up the 0th range, extracting any range from LOC. */
+ source_range src_range = get_range_from_loc (set, loc);
+ add_range (src_range, true);
m_ranges[0].m_caret = lazily_expand_location ();
}
diff --git a/libcpp/location-example.txt b/libcpp/location-example.txt
index a5f95b2baf8..14b5c2e284a 100644
--- a/libcpp/location-example.txt
+++ b/libcpp/location-example.txt
@@ -30,142 +30,154 @@ RESERVED LOCATIONS
source_location interval: 0 <= loc < 2
ORDINARY MAP: 0
- source_location interval: 2 <= loc < 3
+ source_location interval: 32 <= loc < 64
file: test.c
starting at line: 1
- column bits: 7
-test.c: 1|loc: 2|#include "test.h"
- |00000001111111111
- |34567890123456789
+ column bits: 12
+ range bits: 5
+test.c: 1|loc: 32|#include "test.h"
+ |69269258258148147
+ |46802468024680246
ORDINARY MAP: 1
- source_location interval: 3 <= loc < 4
+ source_location interval: 64 <= loc < 96
file: <built-in>
starting at line: 0
column bits: 0
+ range bits: 0
ORDINARY MAP: 2
- source_location interval: 4 <= loc < 5
+ source_location interval: 96 <= loc < 128
file: <command-line>
starting at line: 0
column bits: 0
+ range bits: 0
ORDINARY MAP: 3
- source_location interval: 5 <= loc < 5005
+ source_location interval: 128 <= loc < 160128
file: /usr/include/stdc-predef.h
starting at line: 1
- column bits: 7
+ column bits: 12
+ range bits: 5
(contents of /usr/include/stdc-predef.h snipped for brevity)
ORDINARY MAP: 4
- source_location interval: 5005 <= loc < 5006
+ source_location interval: 160128 <= loc < 160160
file: <command-line>
- starting at line: 1
- column bits: 7
+ starting at line: 32
+ column bits: 12
+ range bits: 5
ORDINARY MAP: 5
- source_location interval: 5006 <= loc < 5134
+ source_location interval: 160160 <= loc < 164256
file: test.c
starting at line: 1
- column bits: 7
-test.c: 1|loc: 5006|#include "test.h"
- |55555555555555555
+ column bits: 12
+ range bits: 5
+test.c: 1|loc:160160|#include "test.h"
|00000000000000000
- |00011111111112222
- |78901234567890123
+ |12223334445556667
+ |92582581481470470
+ |24680246802468024
ORDINARY MAP: 6
- source_location interval: 5134 <= loc < 5416
+ source_location interval: 164256 <= loc < 173280
file: test.h
starting at line: 1
- column bits: 7
-test.h: 1|loc: 5134|extern int foo ();
- |555555555555555555
- |111111111111111111
- |333334444444444555
- |567890123456789012
-test.h: 2|loc: 5262|
+ column bits: 12
+ range bits: 5
+test.h: 1|loc:164256|extern int foo ();
+ |444444444444444444
+ |233344455566677788
+ |825814814704703603
+ |802468024680246802
+test.h: 2|loc:168352|
|
|
|
|
-test.h: 3|loc: 5390|#define PLUS(A, B) A + B
- |555555555555555555555555
- |333333333444444444444444
- |999999999000000000011111
- |123456789012345678901234
+test.h: 3|loc:172448|#define PLUS(A, B) A + B
+ |222222222222222223333333
+ |455566677788889990001112
+ |814704703603692692582581
+ |024680246802468024680246
ORDINARY MAP: 7
- source_location interval: 5416 <= loc < 6314
+ source_location interval: 173280 <= loc < 202016
file: test.c
starting at line: 2
- column bits: 7
-test.c: 2|loc: 5416|
+ column bits: 12
+ range bits: 5
+test.c: 2|loc:173280|
|
|
|
|
-test.c: 3|loc: 5544|int
- |555
- |555
+test.c: 3|loc:177376|int
+ |777
|444
- |567
-test.c: 4|loc: 5672|main (int argc, char **argv)
- |5555555555555555555555555555
- |6666666666666666666666666667
- |7777777888888888899999999990
- |3456789012345678901234567890
-test.c: 5|loc: 5800|{
+ |047
+ |802
+test.c: 4|loc:181472|main (int argc, char **argv)
+ |1111111111111111222222222222
+ |5556666777888999000111222333
+ |0360369269258258148147047036
+ |4680246802468024680246802468
+test.c: 5|loc:185568|{
|5
- |8
- |0
- |1
-test.c: 6|loc: 5928| int a = PLUS (1,2);
- |555555555555555555555
- |999999999999999999999
- |233333333334444444444
- |901234567890123456789
-test.c: 7|loc: 6056| int b = PLUS (3,4);
- |666666666666666666666
- |000000000000000000000
- |555666666666677777777
- |789012345678901234567
-test.c: 8|loc: 6184| return 0;
- |66666666666
- |11111111111
- |88888999999
- |56789012345
-test.c: 9|loc: 6312|}
|6
- |3
+ |0
+ |0
+test.c: 6|loc:189664| int a = PLUS (1,2);
+ |999999999900000000000
+ |677788899900011122233
+ |926925825814814704703
+ |680246802468024680246
+test.c: 7|loc:193760| int b = PLUS (3,4);
+ |333333344444444444444
+ |788899900011122233344
+ |925825814814704703603
+ |246802468024680246802
+test.c: 8|loc:197856| return 0;
+ |77778888888
+ |89990001112
+ |82581481470
+ |80246802468
+test.c: 9|loc:201952|}
|1
- |3
+ |9
+ |8
+ |4
UNALLOCATED LOCATIONS
- source_location interval: 6314 <= loc < 2147483633
+ source_location interval: 202016 <= loc < 2147483633
MACRO 1: PLUS (7 tokens)
source_location interval: 2147483633 <= loc < 2147483640
-test.c:7:11: note: expansion point is location 6067
+test.c:7:11: note: expansion point is location 194115
int b = PLUS (3,4);
- ^
+ ^~~~
+
map->start_location: 2147483633
macro_locations:
- 0: 6073, 5410
-test.c:7:17: note: token 0 has x-location == 6073
+ 0: 194304, 173088
+test.c:7:17: note: token 0 has x-location == 194304
int b = PLUS (3,4);
^
-test.c:7:17: note: token 0 has y-location == 5410
- 1: 5412, 5412
+
+test.c:7:17: note: token 0 has y-location == 173088
+ 1: 173152, 173152
In file included from test.c:1:0:
-test.h:3:22: note: token 1 has x-location == y-location == 5412
+test.h:3:22: note: token 1 has x-location == y-location == 173152
#define PLUS(A, B) A + B
^
- 2: 6075, 5414
-test.c:7:19: note: token 2 has x-location == 6075
+
+ 2: 194368, 173216
+test.c:7:19: note: token 2 has x-location == 194368
int b = PLUS (3,4);
^
-test.c:7:19: note: token 2 has y-location == 5414
+
+test.c:7:19: note: token 2 has y-location == 173216
3: 0, 2947526575
cc1: note: token 3 has x-location == 0
cc1: note: token 3 has y-location == 2947526575
@@ -178,26 +190,30 @@ x-location == y-location == 2947526575 encodes token # 800042942
MACRO 0: PLUS (7 tokens)
source_location interval: 2147483640 <= loc < 2147483647
-test.c:6:11: note: expansion point is location 5939
+test.c:6:11: note: expansion point is location 190019
int a = PLUS (1,2);
- ^
+ ^~~~
+
map->start_location: 2147483640
macro_locations:
- 0: 5945, 5410
-test.c:6:17: note: token 0 has x-location == 5945
+ 0: 190208, 173088
+test.c:6:17: note: token 0 has x-location == 190208
int a = PLUS (1,2);
^
-test.c:6:17: note: token 0 has y-location == 5410
- 1: 5412, 5412
+
+test.c:6:17: note: token 0 has y-location == 173088
+ 1: 173152, 173152
In file included from test.c:1:0:
-test.h:3:22: note: token 1 has x-location == y-location == 5412
+test.h:3:22: note: token 1 has x-location == y-location == 173152
#define PLUS(A, B) A + B
^
- 2: 5947, 5414
-test.c:6:19: note: token 2 has x-location == 5947
+
+ 2: 190272, 173216
+test.c:6:19: note: token 2 has x-location == 190272
int a = PLUS (1,2);
^
-test.c:6:19: note: token 2 has y-location == 5414
+
+test.c:6:19: note: token 2 has y-location == 173216
3: 0, 2947526575
cc1: note: token 3 has x-location == 0
cc1: note: token 3 has y-location == 2947526575
diff --git a/libgcc/ChangeLog b/libgcc/ChangeLog
index 13ed8133857..549d0ac3990 100644
--- a/libgcc/ChangeLog
+++ b/libgcc/ChangeLog
@@ -1,3 +1,19 @@
+2015-11-11 Claudiu Zissulescu <claziss@synopsys.com>
+
+ * config/arc/dp-hack.h: Add support for ARCHS.
+ * config/arc/ieee-754/divdf3.S: Likewise.
+ * config/arc/ieee-754/divsf3-stdmul.S: Likewise.
+ * config/arc/ieee-754/muldf3.S: Likewise.
+ * config/arc/ieee-754/mulsf3.S: Likewise
+ * config/arc/lib1funcs.S: Likewise
+ * config/arc/gmon/dcache_linesz.S: Don't read the build register
+ for ARCv2 cores.
+ * config/arc/gmon/profil.S (__profil, __profil_irq): Don't profile
+ for ARCv2 cores.
+ * config/arc/ieee-754/arc-ieee-754.h (MPYHU, MPYH): Define.
+ * config/arc/t-arc700-uClibc: Remove hard selection for ARC 700
+ cores.
+
2015-11-09 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
* config/ia64/crtbegin.S: Check HAVE_INITFINI_ARRAY_SUPPORT
diff --git a/libgcc/config/arc/dp-hack.h b/libgcc/config/arc/dp-hack.h
index c1ab9b2294e..a212e3b8b60 100644
--- a/libgcc/config/arc/dp-hack.h
+++ b/libgcc/config/arc/dp-hack.h
@@ -48,7 +48,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
#define L_mul_df
#define L_div_df
#elif (!defined (__ARC700__) && !defined (__ARC_MUL64__) \
- && !defined(__ARC_MUL32BY16__))
+ && !defined (__ARC_MUL32BY16__) && !defined (__HS__))
#define L_mul_df
#define L_div_df
#undef QUIET_NAN
diff --git a/libgcc/config/arc/gmon/dcache_linesz.S b/libgcc/config/arc/gmon/dcache_linesz.S
index 8cf64426aca..972a5879fed 100644
--- a/libgcc/config/arc/gmon/dcache_linesz.S
+++ b/libgcc/config/arc/gmon/dcache_linesz.S
@@ -38,6 +38,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
.global __dcache_linesz
.balign 4
__dcache_linesz:
+#if !defined (__EM__) && !defined (__HS__)
lr r12,[D_CACHE_BUILD]
extb_s r0,r12
breq_s r0,0,.Lsz_nocache
@@ -51,5 +52,6 @@ __dcache_linesz:
asl_s r0,r0,r12
j_s [blink]
.Lsz_nocache:
+#endif /* !__EM__ && !__HS__ */
mov_s r0,1
j_s [blink]
diff --git a/libgcc/config/arc/gmon/profil.S b/libgcc/config/arc/gmon/profil.S
index 3be2869c924..df10dbd6af7 100644
--- a/libgcc/config/arc/gmon/profil.S
+++ b/libgcc/config/arc/gmon/profil.S
@@ -45,6 +45,7 @@ __profil_offset:
.global __dcache_linesz
.global __profil
FUNC(__profil)
+#if !defined (__EM__) && !defined (__HS__)
.Lstop_profiling:
sr r0,[CONTROL0]
j_s [blink]
@@ -107,6 +108,12 @@ nocache:
j_s [blink]
.balign 4
1: j __profil_irq
+#else
+__profil:
+ .balign 4
+ mov_s r0,-1
+ j_s [blink]
+#endif /* !__EM__ && !__HS__ */
ENDFUNC(__profil)
FUNC(__profil_irq)
@@ -114,6 +121,7 @@ nocache:
.balign 32,0,12 ; make sure the code spans no more that two cache lines
nop_s
__profil_irq:
+#if !defined (__EM__) && !defined (__HS__)
push_s r0
ld r0,[__profil_offset]
push_s r1
@@ -128,6 +136,9 @@ __profil_irq:
nostore:ld.ab r2,[sp,8]
pop_s r0
j.f [ilink1]
+#else
+ rtie
+#endif /* !__EM__ && !__HS__ */
ENDFUNC(__profil_irq)
; could save one cycle if the counters were allocated at link time and
diff --git a/libgcc/config/arc/ieee-754/arc-ieee-754.h b/libgcc/config/arc/ieee-754/arc-ieee-754.h
index 08a14a6f429..f1ac98e4278 100644
--- a/libgcc/config/arc/ieee-754/arc-ieee-754.h
+++ b/libgcc/config/arc/ieee-754/arc-ieee-754.h
@@ -54,3 +54,10 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
#define bmsk_l bmsk
#define bxor_l bxor
#define bcs_s blo_s
+#if defined (__HS__) || defined (__EM__)
+#define MPYHU mpymu
+#define MPYH mpym
+#else
+#define MPYHU mpyhu
+#define MPYH mpyh
+#endif
diff --git a/libgcc/config/arc/ieee-754/divdf3.S b/libgcc/config/arc/ieee-754/divdf3.S
index 2d000e40a04..27705ed5909 100644
--- a/libgcc/config/arc/ieee-754/divdf3.S
+++ b/libgcc/config/arc/ieee-754/divdf3.S
@@ -118,7 +118,7 @@ __divdf3_support: /* This label makes debugger output saner. */
sub r11,r11,11
asl DBL1L,DBL1L,r11
sub r11,r11,1
- mpyhu r5,r4,r8
+ MPYHU r5,r4,r8
sub r7,r7,r11
asl r4,r4,12
b.d .Lpast_denorm_dbl1
@@ -189,25 +189,33 @@ __divdf3:
asl r8,DBL1H,12
lsr r12,DBL1L,20
lsr r4,r8,26
+#ifdef __HS__
+ add3 r10,pcl,60 ; (.Ldivtab-.) >> 3
+#else
add3 r10,pcl,59 ; (.Ldivtab-.) >> 3
+#endif
ld.as r4,[r10,r4]
+#ifdef __HS__
+ ld.as r9,[pcl,182]; [pcl,(-((.-.L7ff00000) >> 2))] ; 0x7ff00000
+#else
ld.as r9,[pcl,180]; [pcl,(-((.-.L7ff00000) >> 2))] ; 0x7ff00000
+#endif
or r8,r8,r12
- mpyhu r5,r4,r8
+ MPYHU r5,r4,r8
and.f r7,DBL1H,r9
asl r4,r4,12 ; having the asl here is a concession to the XMAC pipeline.
beq.d .Ldenorm_dbl1
and r6,DBL0H,r9
.Lpast_denorm_dbl1: ; wb stall
sub r4,r4,r5
- mpyhu r5,r4,r4
+ MPYHU r5,r4,r4
breq.d r6,0,.Ldenorm_dbl0
lsr r8,r8,1
asl r12,DBL0H,11
lsr r10,DBL0L,21
.Lpast_denorm_dbl0: ; wb stall
bset r8,r8,31
- mpyhu r11,r5,r8
+ MPYHU r11,r5,r8
add_s r12,r12,r10
bset r5,r12,31
cmp r5,r8
@@ -215,7 +223,7 @@ __divdf3:
; wb stall
lsr.cc r5,r5,1
sub r4,r4,r11 ; u1.31 inverse, about 30 bit
- mpyhu r11,r5,r4 ; result fraction highpart
+ MPYHU r11,r5,r4 ; result fraction highpart
breq r7,r9,.Linf_nan_dbl1
lsr r8,r8,2 ; u3.29
add r5,r6, /* wait for immediate / XMAC wb stall */ \
@@ -226,7 +234,7 @@ __divdf3:
asl_s DBL1L,DBL1L,9 ; u-29.23:9
sbc r6,r5,r7
; resource conflict (not for XMAC)
- mpyhu r5,r11,DBL1L ; u-28.23:9
+ MPYHU r5,r11,DBL1L ; u-28.23:9
add.cs DBL0L,DBL0L,DBL0L
asl_s DBL0L,DBL0L,6 ; u-26.25:7
asl r10,r11,23
@@ -234,7 +242,7 @@ __divdf3:
; wb stall (before 'and' for XMAC)
lsr r7,r11,9
sub r5,DBL0L,r5 ; rest msw ; u-26.31:0
- mpyh r12,r5,r4 ; result fraction lowpart
+ MPYH r12,r5,r4 ; result fraction lowpart
xor.f 0,DBL0H,DBL1H
and DBL0H,r6,r9
add_s DBL0H,DBL0H,r7 ; (XMAC wb stall)
@@ -261,7 +269,7 @@ __divdf3:
sub.cs DBL0H,DBL0H,1
sub.f r12,r12,2
; resource conflict (not for XMAC)
- mpyhu r7,r12,DBL1L ; u-51.32
+ MPYHU r7,r12,DBL1L ; u-51.32
asl r5,r5,25 ; s-51.7:25
lsr r10,r10,7 ; u-51.30:2
; resource conflict (not for XMAC)
@@ -291,10 +299,21 @@ __divdf3:
rsub r7,r6,5
asr r10,r12,28
bmsk r4,r12,27
+#ifdef __HS__
+ min r7, r7, 31
+ asr DBL0L, r4, r7
+#else
asrs DBL0L,r4,r7
+#endif
add DBL1H,r11,r10
+#ifdef __HS__
+ abs.f r10, r4
+ sub.mi r10, r10, 1
+#endif
add.f r7,r6,32-5
+#ifdef __ARC700__
abss r10,r4
+#endif
asl r4,r4,r7
mov.mi r4,r10
add.f r10,r6,23
@@ -319,7 +338,7 @@ __divdf3:
and r9,DBL0L,1 ; tie-breaker: round to even
lsr r11,r11,7 ; u-51.30:2
; resource conflict (not for XMAC)
- mpyhu r8,r12,DBL1L ; u-51.32
+ MPYHU r8,r12,DBL1L ; u-51.32
sub.mi r11,r11,DBL1L ; signed multiply adjust for r12*DBL1L
add_s DBL1H,DBL1H,r11
; resource conflict (not for XMAC)
diff --git a/libgcc/config/arc/ieee-754/divsf3-stdmul.S b/libgcc/config/arc/ieee-754/divsf3-stdmul.S
index 09861d3318c..f13944ae11a 100644
--- a/libgcc/config/arc/ieee-754/divsf3-stdmul.S
+++ b/libgcc/config/arc/ieee-754/divsf3-stdmul.S
@@ -144,7 +144,7 @@ __divsf3_support: /* This label makes debugger output saner. */
ld.as r5,[r3,r5]
add r4,r6,r6
; load latency
- mpyhu r7,r5,r4
+ MPYHU r7,r5,r4
bic.ne.f 0, \
0x60000000,r0 ; large number / denorm -> Inf
beq_s .Linf_NaN
@@ -152,7 +152,7 @@ __divsf3_support: /* This label makes debugger output saner. */
; wb stall
; slow track
sub r7,r5,r7
- mpyhu r8,r7,r6
+ MPYHU r8,r7,r6
asl_s r12,r12,23
and.f r2,r0,r9
add r2,r2,r12
@@ -160,7 +160,7 @@ __divsf3_support: /* This label makes debugger output saner. */
; wb stall
bne.d .Lpast_denorm_fp1
.Ldenorm_fp0:
- mpyhu r8,r8,r7
+ MPYHU r8,r8,r7
bclr r12,r12,31
norm.f r3,r12 ; flag for 0/x -> 0 check
bic.ne.f 0,0x60000000,r1 ; denorm/large number -> 0
@@ -209,7 +209,7 @@ __divsf3:
ld.as r5,[r3,r2]
asl r4,r1,9
ld.as r9,[pcl,-114]; [pcl,(-((.-.L7f800000) >> 2))] ; 0x7f800000
- mpyhu r7,r5,r4
+ MPYHU r7,r5,r4
asl r6,r1,8
and.f r11,r1,r9
bset r6,r6,31
@@ -217,14 +217,14 @@ __divsf3:
; wb stall
beq .Ldenorm_fp1
sub r7,r5,r7
- mpyhu r8,r7,r6
+ MPYHU r8,r7,r6
breq.d r11,r9,.Linf_nan_fp1
and.f r2,r0,r9
beq.d .Ldenorm_fp0
asl r12,r0,8
; wb stall
breq r2,r9,.Linf_nan_fp0
- mpyhu r8,r8,r7
+ MPYHU r8,r8,r7
.Lpast_denorm_fp1:
bset r3,r12,31
.Lpast_denorm_fp0:
@@ -234,7 +234,7 @@ __divsf3:
/* wb stall */ \
0x3f000000
sub r7,r7,r8 ; u1.31 inverse, about 30 bit
- mpyhu r3,r3,r7
+ MPYHU r3,r3,r7
sbc r2,r2,r11
xor.f 0,r0,r1
and r0,r2,r9
diff --git a/libgcc/config/arc/ieee-754/muldf3.S b/libgcc/config/arc/ieee-754/muldf3.S
index 805db5c8922..5f562e23354 100644
--- a/libgcc/config/arc/ieee-754/muldf3.S
+++ b/libgcc/config/arc/ieee-754/muldf3.S
@@ -132,19 +132,19 @@ __muldf3_support: /* This label makes debugger output saner. */
.balign 4
__muldf3:
ld.as r9,[pcl,0x4b] ; ((.L7ff00000-.+2)/4)]
- mpyhu r4,DBL0L,DBL1L
+ MPYHU r4,DBL0L,DBL1L
bmsk r6,DBL0H,19
bset r6,r6,20
mpyu r7,r6,DBL1L
and r11,DBL0H,r9
breq r11,0,.Ldenorm_dbl0
- mpyhu r8,r6,DBL1L
+ MPYHU r8,r6,DBL1L
bmsk r10,DBL1H,19
bset r10,r10,20
- mpyhu r5,r10,DBL0L
+ MPYHU r5,r10,DBL0L
add.f r4,r4,r7
and r12,DBL1H,r9
- mpyhu r7,r6,r10
+ MPYHU r7,r6,r10
breq r12,0,.Ldenorm_dbl1
adc.f r5,r5,r8
mpyu r8,r10,DBL0L
diff --git a/libgcc/config/arc/ieee-754/mulsf3.S b/libgcc/config/arc/ieee-754/mulsf3.S
index 7a6c7916ddb..df2660a2102 100644
--- a/libgcc/config/arc/ieee-754/mulsf3.S
+++ b/libgcc/config/arc/ieee-754/mulsf3.S
@@ -64,7 +64,7 @@ __mulsf3:
bset r2,r0,23
asl_s r2,r2,8
bset r3,r4,23
- mpyhu r6,r2,r3
+ MPYHU r6,r2,r3
and r11,r0,r9
breq r11,0,.Ldenorm_dbl0
mpyu r7,r2,r3
@@ -144,7 +144,7 @@ __mulsf3:
add_s r2,r2,r2
asl r2,r2,r4
asl r4,r4,23
- mpyhu r6,r2,r3
+ MPYHU r6,r2,r3
breq r12,r9,.Ldenorm_dbl0_inf_nan_dbl1
sub.ne.f r12,r12,r4
mpyu r7,r2,r3
@@ -163,7 +163,7 @@ __mulsf3:
asl r4,r4,r3
sub_s r3,r3,1
asl_s r3,r3,23
- mpyhu r6,r2,r4
+ MPYHU r6,r2,r4
sub.ne.f r11,r11,r3
bmsk r8,r0,30
mpyu r7,r2,r4
diff --git a/libgcc/config/arc/lib1funcs.S b/libgcc/config/arc/lib1funcs.S
index e59340a2242..022a2ea0cbe 100644
--- a/libgcc/config/arc/lib1funcs.S
+++ b/libgcc/config/arc/lib1funcs.S
@@ -79,7 +79,7 @@ SYM(__mulsi3):
j_s.d [blink]
mov_s r0,mlo
ENDFUNC(__mulsi3)
-#elif defined (__ARC700__)
+#elif defined (__ARC700__) || defined (__HS__)
HIDDEN_FUNC(__mulsi3)
mpyu r0,r0,r1
nop_s
@@ -393,7 +393,12 @@ SYM(__udivmodsi4):
lsr_s r1,r1
cmp_s r0,r1
xor.f r2,lp_count,31
+#if !defined (__EM__)
mov_s lp_count,r2
+#else
+ mov lp_count,r2
+ nop_s
+#endif /* !__EM__ */
#endif /* !__ARC_NORM__ */
sub.cc r0,r0,r1
mov_s r3,3
@@ -1260,7 +1265,7 @@ SYM(__ld_r13_to_r14_ret):
#endif
#ifdef L_muldf3
-#ifdef __ARC700__
+#if defined (__ARC700__) || defined (__HS__)
#include "ieee-754/muldf3.S"
#elif defined (__ARC_NORM__) && defined(__ARC_MUL64__)
#include "ieee-754/arc600-mul64/muldf3.S"
@@ -1276,7 +1281,7 @@ SYM(__ld_r13_to_r14_ret):
#endif
#ifdef L_mulsf3
-#ifdef __ARC700__
+#if defined (__ARC700__) || defined (__HS__)
#include "ieee-754/mulsf3.S"
#elif defined (__ARC_NORM__) && defined(__ARC_MUL64__)
#include "ieee-754/arc600-mul64/mulsf3.S"
@@ -1288,7 +1293,7 @@ SYM(__ld_r13_to_r14_ret):
#endif
#ifdef L_divdf3
-#ifdef __ARC700__
+#if defined (__ARC700__) || defined (__HS__)
#include "ieee-754/divdf3.S"
#elif defined (__ARC_NORM__) && defined(__ARC_MUL64__)
#include "ieee-754/arc600-mul64/divdf3.S"
@@ -1298,7 +1303,7 @@ SYM(__ld_r13_to_r14_ret):
#endif
#ifdef L_divsf3
-#ifdef __ARC700__
+#if defined (__ARC700__) || defined (__HS__)
#include "ieee-754/divsf3-stdmul.S"
#elif defined (__ARC_NORM__) && defined(__ARC_MUL64__)
#include "ieee-754/arc600-mul64/divsf3.S"
diff --git a/libgcc/config/arc/t-arc700-uClibc b/libgcc/config/arc/t-arc700-uClibc
index 651c3de5260..ff570398d90 100644
--- a/libgcc/config/arc/t-arc700-uClibc
+++ b/libgcc/config/arc/t-arc700-uClibc
@@ -28,10 +28,10 @@
CRTSTUFF_T_CFLAGS += -mno-sdata
# Compile crtbeginS.o and crtendS.o with pic.
-CRTSTUFF_T_CFLAGS_S = $(CRTSTUFF_T_CFLAGS) -mA7 -fPIC
+CRTSTUFF_T_CFLAGS_S = $(CRTSTUFF_T_CFLAGS) -fPIC
# Compile libgcc2.a with pic.
-TARGET_LIBGCC2_CFLAGS = -mA7 -fPIC
+TARGET_LIBGCC2_CFLAGS = -fPIC
PROFILE_OSDEP = prof-freq.o
diff --git a/libgo/configure b/libgo/configure
index 08a197d5a61..eb37e29d2f8 100755
--- a/libgo/configure
+++ b/libgo/configure
@@ -14249,6 +14249,46 @@ fi
fi
unset ac_cv_func_gethostbyname
+ ac_fn_c_check_func "$LINENO" "sendfile" "ac_cv_func_sendfile"
+if test "x$ac_cv_func_sendfile" = x""yes; then :
+
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lsendfile" >&5
+$as_echo_n "checking for main in -lsendfile... " >&6; }
+if test "${ac_cv_lib_sendfile_main+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lsendfile $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+
+int
+main ()
+{
+return main ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_lib_sendfile_main=yes
+else
+ ac_cv_lib_sendfile_main=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sendfile_main" >&5
+$as_echo "$ac_cv_lib_sendfile_main" >&6; }
+if test "x$ac_cv_lib_sendfile_main" = x""yes; then :
+ libgo_cv_lib_sockets="$libgo_cv_lib_sockets -lsendfile"
+fi
+
+fi
+
LIBS=$libgo_old_libs
fi
diff --git a/libgo/configure.ac b/libgo/configure.ac
index 332e540a302..6e23a85fa6d 100644
--- a/libgo/configure.ac
+++ b/libgo/configure.ac
@@ -473,6 +473,9 @@ AC_CACHE_CHECK([for socket libraries], libgo_cv_lib_sockets,
[AC_CHECK_LIB(nsl, main,
[libgo_cv_lib_sockets="$libgo_cv_lib_sockets -lnsl"])])
unset ac_cv_func_gethostbyname
+ AC_CHECK_FUNC(sendfile, ,
+ [AC_CHECK_LIB(sendfile, main,
+ [libgo_cv_lib_sockets="$libgo_cv_lib_sockets -lsendfile"])])
LIBS=$libgo_old_libs
])
NET_LIBS="$libgo_cv_lib_sockets"
diff --git a/libgo/mksysinfo.sh b/libgo/mksysinfo.sh
index 6d39df96e95..662619f2076 100755
--- a/libgo/mksysinfo.sh
+++ b/libgo/mksysinfo.sh
@@ -1488,4 +1488,24 @@ grep '^type _zone_net_addr_t ' gen-sysinfo.go | \
sed -e 's/_in6_addr/[16]byte/' \
>> ${OUT}
+# The Solaris 12 _flow_arp_desc_t struct.
+grep '^type _flow_arp_desc_t ' gen-sysinfo.go | \
+ sed -e 's/_in6_addr_t/[16]byte/g' \
+ >> ${OUT}
+
+# The Solaris 12 _flow_l3_desc_t struct.
+grep '^type _flow_l3_desc_t ' gen-sysinfo.go | \
+ sed -e 's/_in6_addr_t/[16]byte/g' \
+ >> ${OUT}
+
+# The Solaris 12 _mac_ipaddr_t struct.
+grep '^type _mac_ipaddr_t ' gen-sysinfo.go | \
+ sed -e 's/_in6_addr_t/[16]byte/g' \
+ >> ${OUT}
+
+# The Solaris 12 _mactun_info_t struct.
+grep '^type _mactun_info_t ' gen-sysinfo.go | \
+ sed -e 's/_in6_addr_t/[16]byte/g' \
+ >> ${OUT}
+
exit $?
diff --git a/libgomp/ChangeLog b/libgomp/ChangeLog
index ed86943bb32..2f5a4d189da 100644
--- a/libgomp/ChangeLog
+++ b/libgomp/ChangeLog
@@ -1,3 +1,35 @@
+2015-11-13 Nathan Sidwell <nathan@codesourcery.com>
+
+ * testsuite/libgomp.oacc-c-c++-common/loop-auto-1.c: New.
+
+ * testsuite/libgomp.oacc-c-c++-common/collapse-2.c: Sequential
+ loop is sequential.
+
+2015-11-13 Nathan Sidwell <nathan@codesourcery.com>
+
+ * testsuite/libgomp.oacc-c-c++-common/reduction-cplx-dbl.c: New.
+ * testsuite/libgomp.oacc-c-c++-common/reduction-cplx-flt.c: New.
+
+2015-11-12 James Norris <jnorris@codesourcery.com>
+ Joseph Myers <joseph@codesourcery.com>
+
+ * libgomp.map (GOACC_2.0.1): Export GOACC_declare.
+ * oacc-parallel.c (GOACC_declare): New function.
+ * testsuite/libgomp.oacc-c-c++-common/declare-1.c: New test.
+ * testsuite/libgomp.oacc-c-c++-common/declare-2.c: Likewise.
+ * testsuite/libgomp.oacc-c-c++-common/declare-4.c: Likewise.
+ * testsuite/libgomp.oacc-c-c++-common/declare-5.c: Likewise.
+ * testsuite/libgomp.oacc-c++/declare-1.C: Likewise.
+
+2015-11-12 Nathan Sidwell <nathan@codesourcery.com>
+
+ * testsuite/libgomp.oacc-c-c++-common/default-1.c: New.
+
+2015-11-1 Nathan Sidwell <nathan@codesourcery.com>
+
+ * testsuite/libgomp.oacc-c-c++-common/firstprivate-1.c: New.
+ * testsuite/libgomp.oacc-c-c++-common/firstprivate-2.c: New.
+
2015-11-09 Nathan Sidwell <nathan@codesourcery.com>
* testsuite/libgomp.oacc-c-c++-common/firstprivate-1.c: Remove
diff --git a/libgomp/libgomp.map b/libgomp/libgomp.map
index 39faba95cbd..d16710f44f4 100644
--- a/libgomp/libgomp.map
+++ b/libgomp/libgomp.map
@@ -392,6 +392,7 @@ GOACC_2.0 {
GOACC_2.0.1 {
global:
+ GOACC_declare;
GOACC_parallel_keyed;
} GOACC_2.0;
diff --git a/libgomp/oacc-parallel.c b/libgomp/oacc-parallel.c
index 525846b0098..a80ede40d1d 100644
--- a/libgomp/oacc-parallel.c
+++ b/libgomp/oacc-parallel.c
@@ -501,3 +501,61 @@ GOACC_get_thread_num (void)
{
return 0;
}
+
+void
+GOACC_declare (int device, size_t mapnum,
+ void **hostaddrs, size_t *sizes, unsigned short *kinds)
+{
+ int i;
+
+ for (i = 0; i < mapnum; i++)
+ {
+ unsigned char kind = kinds[i] & 0xff;
+
+ if (kind == GOMP_MAP_POINTER || kind == GOMP_MAP_TO_PSET)
+ continue;
+
+ switch (kind)
+ {
+ case GOMP_MAP_FORCE_ALLOC:
+ case GOMP_MAP_FORCE_DEALLOC:
+ case GOMP_MAP_FORCE_FROM:
+ case GOMP_MAP_FORCE_TO:
+ case GOMP_MAP_POINTER:
+ GOACC_enter_exit_data (device, 1, &hostaddrs[i], &sizes[i],
+ &kinds[i], 0, 0);
+ break;
+
+ case GOMP_MAP_FORCE_DEVICEPTR:
+ break;
+
+ case GOMP_MAP_ALLOC:
+ if (!acc_is_present (hostaddrs[i], sizes[i]))
+ GOACC_enter_exit_data (device, 1, &hostaddrs[i], &sizes[i],
+ &kinds[i], 0, 0);
+ break;
+
+ case GOMP_MAP_TO:
+ GOACC_enter_exit_data (device, 1, &hostaddrs[i], &sizes[i],
+ &kinds[i], 0, 0);
+
+ break;
+
+ case GOMP_MAP_FROM:
+ kinds[i] = GOMP_MAP_FORCE_FROM;
+ GOACC_enter_exit_data (device, 1, &hostaddrs[i], &sizes[i],
+ &kinds[i], 0, 0);
+ break;
+
+ case GOMP_MAP_FORCE_PRESENT:
+ if (!acc_is_present (hostaddrs[i], sizes[i]))
+ gomp_fatal ("[%p,%ld] is not mapped", hostaddrs[i],
+ (unsigned long) sizes[i]);
+ break;
+
+ default:
+ assert (0);
+ break;
+ }
+ }
+}
diff --git a/libgomp/testsuite/libgomp.oacc-c++/declare-1.C b/libgomp/testsuite/libgomp.oacc-c++/declare-1.C
new file mode 100644
index 00000000000..0286955d0c7
--- /dev/null
+++ b/libgomp/testsuite/libgomp.oacc-c++/declare-1.C
@@ -0,0 +1,31 @@
+/* { dg-do run { target openacc_nvidia_accel_selected } } */
+
+#include <stdlib.h>
+
+template<class T>
+T foo()
+{
+ T a, b;
+ #pragma acc declare create (a)
+
+ #pragma acc parallel copyout (b)
+ {
+ a = 5;
+ b = a;
+ }
+
+ return b;
+}
+
+int
+main (void)
+{
+ int rc;
+
+ rc = foo<int>();
+
+ if (rc != 5)
+ abort ();
+
+ return 0;
+}
diff --git a/libgomp/testsuite/libgomp.oacc-c-c++-common/collapse-2.c b/libgomp/testsuite/libgomp.oacc-c-c++-common/collapse-2.c
index 8c56adac0cf..62bb5e0bbd9 100644
--- a/libgomp/testsuite/libgomp.oacc-c-c++-common/collapse-2.c
+++ b/libgomp/testsuite/libgomp.oacc-c-c++-common/collapse-2.c
@@ -9,7 +9,7 @@ main (void)
int m1 = 4, m2 = -5, m3 = 17;
#pragma acc parallel copy(l)
- #pragma acc loop collapse(3) reduction(+:l)
+ #pragma acc loop seq collapse(3) reduction(+:l)
for (i = -2; i < m1; i++)
for (j = m2; j < -2; j++)
{
diff --git a/libgomp/testsuite/libgomp.oacc-c-c++-common/declare-1.c b/libgomp/testsuite/libgomp.oacc-c-c++-common/declare-1.c
new file mode 100644
index 00000000000..c63a68dbab7
--- /dev/null
+++ b/libgomp/testsuite/libgomp.oacc-c-c++-common/declare-1.c
@@ -0,0 +1,122 @@
+/* { dg-do run { target openacc_nvidia_accel_selected } } */
+
+#include <openacc.h>
+#include <stdlib.h>
+#include <stdio.h>
+
+#define N 8
+
+void
+subr2 (int *a)
+{
+ int i;
+ int f[N];
+#pragma acc declare copyout (f)
+
+#pragma acc parallel copy (a[0:N])
+ {
+ for (i = 0; i < N; i++)
+ {
+ f[i] = a[i];
+ a[i] = f[i] + f[i] + f[i];
+ }
+ }
+}
+
+void
+subr1 (int *a)
+{
+ int f[N];
+#pragma acc declare copy (f)
+
+#pragma acc parallel copy (a[0:N])
+ {
+ int i;
+
+ for (i = 0; i < N; i++)
+ {
+ f[i] = a[i];
+ a[i] = f[i] + f[i];
+ }
+ }
+}
+
+int b[8];
+#pragma acc declare create (b)
+
+int d[8] = { 1, 2, 3, 4, 5, 6, 7, 8 };
+#pragma acc declare copyin (d)
+
+int
+main (int argc, char **argv)
+{
+ int a[N];
+ int e[N];
+#pragma acc declare create (e)
+ int i;
+
+ for (i = 0; i < N; i++)
+ a[i] = i + 1;
+
+ if (!acc_is_present (&b, sizeof (b)))
+ abort ();
+
+ if (!acc_is_present (&d, sizeof (d)))
+ abort ();
+
+ if (!acc_is_present (&e, sizeof (e)))
+ abort ();
+
+#pragma acc parallel copyin (a[0:N])
+ {
+ for (i = 0; i < N; i++)
+ {
+ b[i] = a[i];
+ a[i] = b[i];
+ }
+ }
+
+ for (i = 0; i < N; i++)
+ {
+ if (a[i] != i + 1)
+ abort ();
+ }
+
+#pragma acc parallel copy (a[0:N])
+ {
+ for (i = 0; i < N; i++)
+ {
+ e[i] = a[i] + d[i];
+ a[i] = e[i];
+ }
+ }
+
+ for (i = 0; i < N; i++)
+ {
+ if (a[i] != (i + 1) * 2)
+ abort ();
+ }
+
+ for (i = 0; i < N; i++)
+ {
+ a[i] = 1234;
+ }
+
+ subr1 (&a[0]);
+
+ for (i = 0; i < N; i++)
+ {
+ if (a[i] != 1234 * 2)
+ abort ();
+ }
+
+ subr2 (&a[0]);
+
+ for (i = 0; i < 1; i++)
+ {
+ if (a[i] != 1234 * 6)
+ abort ();
+ }
+
+ return 0;
+}
diff --git a/libgomp/testsuite/libgomp.oacc-c-c++-common/declare-2.c b/libgomp/testsuite/libgomp.oacc-c-c++-common/declare-2.c
new file mode 100644
index 00000000000..2078a33afa9
--- /dev/null
+++ b/libgomp/testsuite/libgomp.oacc-c-c++-common/declare-2.c
@@ -0,0 +1,64 @@
+/* { dg-do run { target openacc_nvidia_accel_selected } } */
+
+#include <stdlib.h>
+
+#define N 16
+
+float c[N];
+#pragma acc declare device_resident (c)
+
+#pragma acc routine
+float
+subr2 (float a)
+{
+ int i;
+
+ for (i = 0; i < N; i++)
+ c[i] = 2.0;
+
+ for (i = 0; i < N; i++)
+ a += c[i];
+
+ return a;
+}
+
+float b[N];
+#pragma acc declare copyin (b)
+
+#pragma acc routine
+float
+subr1 (float a)
+{
+ int i;
+
+ for (i = 0; i < N; i++)
+ a += b[i];
+
+ return a;
+}
+
+int
+main (int argc, char **argv)
+{
+ float a;
+ int i;
+
+ for (i = 0; i < 16; i++)
+ b[i] = 1.0;
+
+ a = 0.0;
+
+ a = subr1 (a);
+
+ if (a != 16.0)
+ abort ();
+
+ a = 0.0;
+
+ a = subr2 (a);
+
+ if (a != 32.0)
+ abort ();
+
+ return 0;
+}
diff --git a/libgomp/testsuite/libgomp.oacc-c-c++-common/declare-4.c b/libgomp/testsuite/libgomp.oacc-c-c++-common/declare-4.c
new file mode 100644
index 00000000000..013310ecb7d
--- /dev/null
+++ b/libgomp/testsuite/libgomp.oacc-c-c++-common/declare-4.c
@@ -0,0 +1,41 @@
+/* { dg-do run { target openacc_nvidia_accel_selected } } */
+
+#include <stdlib.h>
+#include <openacc.h>
+
+float b;
+#pragma acc declare link (b)
+
+#pragma acc routine
+int
+func (int a)
+{
+ b = a + 1;
+
+ return b;
+}
+
+int
+main (int argc, char **argv)
+{
+ float a;
+
+ a = 2.0;
+
+#pragma acc parallel copy (a)
+ {
+ b = a;
+ a = 1.0;
+ a = a + b;
+ }
+
+ if (a != 3.0)
+ abort ();
+
+ a = func (a);
+
+ if (a != 4.0)
+ abort ();
+
+ return 0;
+}
diff --git a/libgomp/testsuite/libgomp.oacc-c-c++-common/declare-5.c b/libgomp/testsuite/libgomp.oacc-c-c++-common/declare-5.c
new file mode 100644
index 00000000000..38c5de063d9
--- /dev/null
+++ b/libgomp/testsuite/libgomp.oacc-c-c++-common/declare-5.c
@@ -0,0 +1,15 @@
+/* { dg-do run { target openacc_nvidia_accel_selected } } */
+
+#include <stdio.h>
+
+int
+main (int argc, char **argv)
+{
+ int a[8] __attribute__((unused));
+
+ fprintf (stderr, "CheCKpOInT\n");
+#pragma acc declare present (a)
+}
+
+/* { dg-output "CheCKpOInT" } */
+/* { dg-shouldfail "" } */
diff --git a/libgomp/testsuite/libgomp.oacc-c-c++-common/default-1.c b/libgomp/testsuite/libgomp.oacc-c-c++-common/default-1.c
new file mode 100644
index 00000000000..1ac0b9587b9
--- /dev/null
+++ b/libgomp/testsuite/libgomp.oacc-c-c++-common/default-1.c
@@ -0,0 +1,87 @@
+/* { dg-do run } */
+
+#include <openacc.h>
+
+int test_parallel ()
+{
+ int ok = 1;
+ int val = 2;
+ int ary[32];
+ int ondev = 0;
+
+ for (int i = 0; i < 32; i++)
+ ary[i] = ~0;
+
+ /* val defaults to firstprivate, ary defaults to copy. */
+#pragma acc parallel num_gangs (32) copy (ok) copy(ondev)
+ {
+ ondev = acc_on_device (acc_device_not_host);
+#pragma acc loop gang(static:1)
+ for (unsigned i = 0; i < 32; i++)
+ {
+ if (val != 2)
+ ok = 0;
+ val += i;
+ ary[i] = val;
+ }
+ }
+
+ if (ondev)
+ {
+ if (!ok)
+ return 1;
+ if (val != 2)
+ return 1;
+
+ for (int i = 0; i < 32; i++)
+ if (ary[i] != 2 + i)
+ return 1;
+ }
+
+ return 0;
+}
+
+int test_kernels ()
+{
+ int val = 2;
+ int ary[32];
+ int ondev = 0;
+
+ for (int i = 0; i < 32; i++)
+ ary[i] = ~0;
+
+ /* val defaults to copy, ary defaults to copy. */
+#pragma acc kernels copy(ondev)
+ {
+ ondev = acc_on_device (acc_device_not_host);
+#pragma acc loop
+ for (unsigned i = 0; i < 32; i++)
+ {
+ ary[i] = val;
+ val++;
+ }
+ }
+
+ if (ondev)
+ {
+ if (val != 2 + 32)
+ return 1;
+
+ for (int i = 0; i < 32; i++)
+ if (ary[i] != 2 + i)
+ return 1;
+ }
+
+ return 0;
+}
+
+int main ()
+{
+ if (test_parallel ())
+ return 1;
+
+ if (test_kernels ())
+ return 1;
+
+ return 0;
+}
diff --git a/libgomp/testsuite/libgomp.oacc-c-c++-common/firstprivate-1.c b/libgomp/testsuite/libgomp.oacc-c-c++-common/firstprivate-1.c
new file mode 100644
index 00000000000..7f5d3d37617
--- /dev/null
+++ b/libgomp/testsuite/libgomp.oacc-c-c++-common/firstprivate-1.c
@@ -0,0 +1,41 @@
+/* { dg-do run } */
+
+#include <openacc.h>
+
+int main ()
+{
+ int ok = 1;
+ int val = 2;
+ int ary[32];
+ int ondev = 0;
+
+ for (int i = 0; i < 32; i++)
+ ary[i] = ~0;
+
+#pragma acc parallel num_gangs (32) copy (ok) firstprivate (val) copy(ary, ondev)
+ {
+ ondev = acc_on_device (acc_device_not_host);
+#pragma acc loop gang(static:1)
+ for (unsigned i = 0; i < 32; i++)
+ {
+ if (val != 2)
+ ok = 0;
+ val += i;
+ ary[i] = val;
+ }
+ }
+
+ if (ondev)
+ {
+ if (!ok)
+ return 1;
+ if (val != 2)
+ return 1;
+
+ for (int i = 0; i < 32; i++)
+ if (ary[i] != 2 + i)
+ return 1;
+ }
+
+ return 0;
+}
diff --git a/libgomp/testsuite/libgomp.oacc-c-c++-common/firstprivate-2.c b/libgomp/testsuite/libgomp.oacc-c-c++-common/firstprivate-2.c
new file mode 100644
index 00000000000..9666542fd82
--- /dev/null
+++ b/libgomp/testsuite/libgomp.oacc-c-c++-common/firstprivate-2.c
@@ -0,0 +1,31 @@
+/* { dg-do run } */
+
+#include <openacc.h>
+
+int main ()
+{
+ int ok = 1;
+ int val = 2;
+
+#pragma acc data copy(val)
+ {
+#pragma acc parallel present (val)
+ {
+ val = 7;
+ }
+
+#pragma acc parallel firstprivate (val) copy(ok)
+ {
+ ok = val == 7;
+ val = 9;
+ }
+
+ }
+
+ if (!ok)
+ return 1;
+ if(val != 7)
+ return 1;
+
+ return 0;
+}
diff --git a/libgomp/testsuite/libgomp.oacc-c-c++-common/loop-auto-1.c b/libgomp/testsuite/libgomp.oacc-c-c++-common/loop-auto-1.c
new file mode 100644
index 00000000000..174af919792
--- /dev/null
+++ b/libgomp/testsuite/libgomp.oacc-c-c++-common/loop-auto-1.c
@@ -0,0 +1,225 @@
+/* { dg-do run } */
+/* { dg-additional-options "-O2" */
+
+#include <stdio.h>
+#include <openacc.h>
+
+int check (const int *ary, int size, int gp, int wp, int vp)
+{
+ int exit = 0;
+ int ix;
+ int gangs[32], workers[32], vectors[32];
+
+ for (ix = 0; ix < 32; ix++)
+ gangs[ix] = workers[ix] = vectors[ix] = 0;
+
+ for (ix = 0; ix < size; ix++)
+ {
+ vectors[ary[ix] & 0xff]++;
+ workers[(ary[ix] >> 8) & 0xff]++;
+ gangs[(ary[ix] >> 16) & 0xff]++;
+ }
+
+ for (ix = 0; ix < 32; ix++)
+ {
+ if (gp)
+ {
+ int expect = gangs[0];
+ if (gangs[ix] != expect)
+ {
+ exit = 1;
+ printf ("gang %d not used %d times\n", ix, expect);
+ }
+ }
+ else if (ix && gangs[ix])
+ {
+ exit = 1;
+ printf ("gang %d unexpectedly used\n", ix);
+ }
+
+ if (wp)
+ {
+ int expect = workers[0];
+ if (workers[ix] != expect)
+ {
+ exit = 1;
+ printf ("worker %d not used %d times\n", ix, expect);
+ }
+ }
+ else if (ix && workers[ix])
+ {
+ exit = 1;
+ printf ("worker %d unexpectedly used\n", ix);
+ }
+
+ if (vp)
+ {
+ int expect = vectors[0];
+ if (vectors[ix] != expect)
+ {
+ exit = 1;
+ printf ("vector %d not used %d times\n", ix, expect);
+ }
+ }
+ else if (ix && vectors[ix])
+ {
+ exit = 1;
+ printf ("vector %d unexpectedly used\n", ix);
+ }
+
+ }
+ return exit;
+}
+
+#pragma acc routine seq
+static int __attribute__((noinline)) place ()
+{
+ int r = 0;
+
+ if (acc_on_device (acc_device_nvidia))
+ {
+ int g = 0, w = 0, v = 0;
+
+ __asm__ volatile ("mov.u32 %0,%%ctaid.x;" : "=r" (g));
+ __asm__ volatile ("mov.u32 %0,%%tid.y;" : "=r" (w));
+ __asm__ volatile ("mov.u32 %0,%%tid.x;" : "=r" (v));
+ r = (g << 16) | (w << 8) | v;
+ }
+ return r;
+}
+
+static void clear (int *ary, int size)
+{
+ int ix;
+
+ for (ix = 0; ix < size; ix++)
+ ary[ix] = -1;
+}
+
+int vector_1 (int *ary, int size)
+{
+ clear (ary, size);
+
+#pragma acc parallel num_workers (32) vector_length(32) copy(ary[0:size]) firstprivate (size)
+ {
+#pragma acc loop auto
+ for (int ix = 0; ix < size; ix++)
+ ary[ix] = place ();
+ }
+
+ return check (ary, size, 0, 0, 1);
+}
+
+int vector_2 (int *ary, int size)
+{
+ clear (ary, size);
+
+#pragma acc parallel num_workers (32) vector_length(32) copy(ary[0:size]) firstprivate (size)
+ {
+#pragma acc loop worker
+ for (int jx = 0; jx < size / 64; jx++)
+#pragma acc loop auto
+ for (int ix = 0; ix < 64; ix++)
+ ary[ix + jx * 64] = place ();
+ }
+
+ return check (ary, size, 0, 1, 1);
+}
+
+int worker_1 (int *ary, int size)
+{
+ clear (ary, size);
+
+#pragma acc parallel num_workers (32) vector_length(32) copy(ary[0:size]) firstprivate (size)
+ {
+#pragma acc loop auto
+ for (int jx = 0; jx < size / 64; jx++)
+#pragma acc loop vector
+ for (int ix = 0; ix < 64; ix++)
+ ary[ix + jx * 64] = place ();
+ }
+
+ return check (ary, size, 0, 1, 1);
+}
+
+int worker_2 (int *ary, int size)
+{
+ clear (ary, size);
+
+#pragma acc parallel num_workers (32) vector_length(32) copy(ary[0:size]) firstprivate (size)
+ {
+#pragma acc loop auto
+ for (int jx = 0; jx < size / 64; jx++)
+#pragma acc loop auto
+ for (int ix = 0; ix < 64; ix++)
+ ary[ix + jx * 64] = place ();
+ }
+
+ return check (ary, size, 0, 1, 1);
+}
+
+int gang_1 (int *ary, int size)
+{
+ clear (ary, size);
+
+#pragma acc parallel num_gangs (32) num_workers (32) vector_length(32) copy(ary[0:size]) firstprivate (size)
+ {
+#pragma acc loop auto
+ for (int jx = 0; jx < size / 64; jx++)
+#pragma acc loop worker
+ for (int ix = 0; ix < 64; ix++)
+ ary[ix + jx * 64] = place ();
+ }
+
+ return check (ary, size, 1, 1, 0);
+}
+
+int gang_2 (int *ary, int size)
+{
+ clear (ary, size);
+
+#pragma acc parallel num_gangs (32) num_workers (32) vector_length(32) copy(ary[0:size]) firstprivate (size)
+ {
+#pragma acc loop auto
+ for (int kx = 0; kx < size / (32 * 32); kx++)
+#pragma acc loop auto
+ for (int jx = 0; jx < 32; jx++)
+#pragma acc loop auto
+ for (int ix = 0; ix < 32; ix++)
+ ary[ix + jx * 32 + kx * 32 * 32] = place ();
+ }
+
+ return check (ary, size, 1, 1, 1);
+}
+
+#define N (32*32*32)
+int main ()
+{
+ int ondev = 0;
+
+#pragma acc parallel copy(ondev)
+ {
+ ondev = acc_on_device (acc_device_not_host);
+ }
+ if (!ondev)
+ return 0;
+
+ int ary[N];
+
+ if (vector_1 (ary, N))
+ return 1;
+ if (vector_2 (ary, N))
+ return 1;
+
+ if (worker_1 (ary, N))
+ return 1;
+ if (worker_2 (ary, N))
+ return 1;
+
+ if (gang_1 (ary, N))
+ return 1;
+ if (gang_2 (ary, N))
+ return 1;
+
+ return 0;
+}
diff --git a/libgomp/testsuite/libgomp.oacc-c-c++-common/loop-red-v-2.c b/libgomp/testsuite/libgomp.oacc-c-c++-common/loop-red-v-2.c
index fbed589e146..e66732da32c 100644
--- a/libgomp/testsuite/libgomp.oacc-c-c++-common/loop-red-v-2.c
+++ b/libgomp/testsuite/libgomp.oacc-c-c++-common/loop-red-v-2.c
@@ -1,7 +1,5 @@
/* { dg-do run } */
/* { dg-additional-options "-O2" */
-/* <http://news.gmane.org/find-root.php?message_id=%3C563B78B5.5090506%40acm.org%3E>
- { dg-xfail-if "TODO" { *-*-* } } */
#include <stdio.h>
diff --git a/libgomp/testsuite/libgomp.oacc-c-c++-common/loop-red-w-2.c b/libgomp/testsuite/libgomp.oacc-c-c++-common/loop-red-w-2.c
index 47f1da02e2e..0059077b685 100644
--- a/libgomp/testsuite/libgomp.oacc-c-c++-common/loop-red-w-2.c
+++ b/libgomp/testsuite/libgomp.oacc-c-c++-common/loop-red-w-2.c
@@ -1,7 +1,5 @@
/* { dg-do run } */
/* { dg-additional-options "-O2" */
-/* <http://news.gmane.org/find-root.php?message_id=%3C563B78B5.5090506%40acm.org%3E>
- { dg-xfail-if "TODO" { *-*-* } } */
#include <stdio.h>
diff --git a/libgomp/testsuite/libgomp.oacc-c-c++-common/reduction-cplx-dbl.c b/libgomp/testsuite/libgomp.oacc-c-c++-common/reduction-cplx-dbl.c
new file mode 100644
index 00000000000..314e5118be9
--- /dev/null
+++ b/libgomp/testsuite/libgomp.oacc-c-c++-common/reduction-cplx-dbl.c
@@ -0,0 +1,52 @@
+
+#include <complex.h>
+
+/* Double float has 53 bits of fraction. */
+#define FRAC (1.0 / (1LL << 48))
+
+int close_enough (double _Complex a, double _Complex b)
+{
+ double _Complex diff = a - b;
+ double mag2_a = __real__(a) * __real__ (a) + __imag__ (a) * __imag__ (a);
+ double mag2_diff = (__real__(diff) * __real__ (diff)
+ + __imag__ (diff) * __imag__ (diff));
+
+ return mag2_diff / mag2_a < (FRAC * FRAC);
+}
+
+int main (void)
+{
+#define N 100
+ double _Complex ary[N], sum, prod, tsum, tprod;
+ int ix;
+
+ sum = tsum = 0;
+ prod = tprod = 1;
+
+ for (ix = 0; ix < N; ix++)
+ {
+ double frac = ix * (1.0 / 1024) + 1.0;
+
+ ary[ix] = frac + frac * 2.0i - 1.0i;
+ sum += ary[ix];
+ prod *= ary[ix];
+ }
+
+#pragma acc parallel vector_length(32) copyin(ary) copy (tsum, tprod)
+ {
+#pragma acc loop vector reduction(+:tsum) reduction (*:tprod)
+ for (ix = 0; ix < N; ix++)
+ {
+ tsum += ary[ix];
+ tprod *= ary[ix];
+ }
+ }
+
+ if (!close_enough (sum, tsum))
+ return 1;
+
+ if (!close_enough (prod, tprod))
+ return 1;
+
+ return 0;
+}
diff --git a/libgomp/testsuite/libgomp.oacc-c-c++-common/reduction-cplx-flt.c b/libgomp/testsuite/libgomp.oacc-c-c++-common/reduction-cplx-flt.c
new file mode 100644
index 00000000000..b3bde656079
--- /dev/null
+++ b/libgomp/testsuite/libgomp.oacc-c-c++-common/reduction-cplx-flt.c
@@ -0,0 +1,52 @@
+
+#include <complex.h>
+
+/* Single float has 23 bits of fraction. */
+#define FRAC (1.0f / (1 << 20))
+
+int close_enough (float _Complex a, float _Complex b)
+{
+ float _Complex diff = a - b;
+ float mag2_a = __real__(a) * __real__ (a) + __imag__ (a) * __imag__ (a);
+ float mag2_diff = (__real__(diff) * __real__ (diff)
+ + __imag__ (diff) * __imag__ (diff));
+
+ return mag2_diff / mag2_a < (FRAC * FRAC);
+}
+
+int main (void)
+{
+#define N 100
+ float _Complex ary[N], sum, prod, tsum, tprod;
+ int ix;
+
+ sum = tsum = 0;
+ prod = tprod = 1;
+
+ for (ix = 0; ix < N; ix++)
+ {
+ float frac = ix * (1.0f / 1024) + 1.0f;
+
+ ary[ix] = frac + frac * 2.0i - 1.0i;
+ sum += ary[ix];
+ prod *= ary[ix];
+ }
+
+#pragma acc parallel vector_length(32) copyin(ary) copy (tsum, tprod)
+ {
+#pragma acc loop vector reduction(+:tsum) reduction (*:tprod)
+ for (ix = 0; ix < N; ix++)
+ {
+ tsum += ary[ix];
+ tprod *= ary[ix];
+ }
+ }
+
+ if (!close_enough (sum, tsum))
+ return 1;
+
+ if (!close_enough (prod, tprod))
+ return 1;
+
+ return 0;
+}
diff --git a/libiberty/ChangeLog b/libiberty/ChangeLog
index ca9b61a80af..de47a87d10d 100644
--- a/libiberty/ChangeLog
+++ b/libiberty/ChangeLog
@@ -1,3 +1,7 @@
+2015-11-12 Mike Stump <mikestump@comcast.net>
+
+ * Makefile.in (etags tags TAGS): Use && instead of ;.
+
2015-11-09 Alan Modra <amodra@gmail.com>
* configure.ac: Check size of size_t.
diff --git a/libiberty/Makefile.in b/libiberty/Makefile.in
index 9f7f70dae21..c7a45680917 100644
--- a/libiberty/Makefile.in
+++ b/libiberty/Makefile.in
@@ -409,7 +409,7 @@ stamp-noasandir:
.PHONY: all etags tags TAGS ls clean stage1 stage2
etags tags TAGS: etags-subdir
- cd $(srcdir); etags $(CFILES)
+ cd $(srcdir) && etags $(CFILES)
# The standalone demangler (c++filt) has been moved to binutils.
# But make this target work anyway for demangler hacking.
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog
index 5d41876ac57..2a4cc86fae3 100644
--- a/libstdc++-v3/ChangeLog
+++ b/libstdc++-v3/ChangeLog
@@ -1,3 +1,589 @@
+2015-11-13 Jonathan Wakely <jwakely@redhat.com>
+
+ * include/Makefile.am: Add new header.
+ * include/Makefile.in: Regenerate.
+ * include/experimental/random: New.
+ * testsuite/experimental/random/randint.cc: New.
+
+2015-11-13 John Marino <gnugcc@marino.st>
+
+ * testsuite/22_locale/codecvt/always_noconv/char/wrapped_env.cc:
+ Use portable locale name
+ * testsuite/22_locale/codecvt/always_noconv/char/wrapped_locale.cc:
+ Likewise.
+ * testsuite/22_locale/codecvt/always_noconv/wchar_t/2.cc: Likewise.
+ * testsuite/22_locale/codecvt/always_noconv/wchar_t/3.cc: Likewise.
+ * testsuite/22_locale/codecvt/always_noconv/wchar_t/wrapped_env.cc:
+ Likewise.
+ * testsuite/22_locale/codecvt/always_noconv/wchar_t/wrapped_locale.cc:
+ Likewise.
+ * testsuite/22_locale/codecvt/encoding/char/wrapped_env.cc: Likewise.
+ * testsuite/22_locale/codecvt/encoding/char/wrapped_locale.cc:
+ Likewise.
+ * testsuite/22_locale/codecvt/encoding/wchar_t/2.cc: Likewise.
+ * testsuite/22_locale/codecvt/encoding/wchar_t/3.cc: Likewise.
+ * testsuite/22_locale/codecvt/encoding/wchar_t/wrapped_env.cc:
+ Likewise.
+ * testsuite/22_locale/codecvt/encoding/wchar_t/wrapped_locale.cc:
+ Likewise.
+ * testsuite/22_locale/codecvt/in/char/wrapped_env.cc: Likewise.
+ * testsuite/22_locale/codecvt/in/char/wrapped_locale.cc: Likewise.
+ * testsuite/22_locale/codecvt/in/wchar_t/2.cc: Likewise.
+ * testsuite/22_locale/codecvt/in/wchar_t/wrapped_env.cc: Likewise.
+ * testsuite/22_locale/codecvt/in/wchar_t/wrapped_locale.cc: Likewise.
+ * testsuite/22_locale/codecvt/length/char/wrapped_env.cc: Likewise.
+ * testsuite/22_locale/codecvt/length/char/wrapped_locale.cc: Likewise.
+ * testsuite/22_locale/codecvt/length/wchar_t/2.cc: Likewise.
+ * testsuite/22_locale/codecvt/length/wchar_t/3.cc: Likewise.
+ * testsuite/22_locale/codecvt/length/wchar_t/wrapped_env.cc: Likewise.
+ * testsuite/22_locale/codecvt/length/wchar_t/wrapped_locale.cc:
+ Likewise.
+ * testsuite/22_locale/codecvt/max_length/char/wrapped_env.cc: Likewise.
+ * testsuite/22_locale/codecvt/max_length/char/wrapped_locale.cc:
+ Likewise.
+ * testsuite/22_locale/codecvt/max_length/wchar_t/2.cc: Likewise.
+ * testsuite/22_locale/codecvt/max_length/wchar_t/3.cc: Likewise.
+ * testsuite/22_locale/codecvt/max_length/wchar_t/wrapped_env.cc:
+ Likewise.
+ * testsuite/22_locale/codecvt/max_length/wchar_t/wrapped_locale.cc:
+ Likewise.
+ * testsuite/22_locale/codecvt/out/char/wrapped_env.cc: Likewise.
+ * testsuite/22_locale/codecvt/out/char/wrapped_locale.cc: Likewise.
+ * testsuite/22_locale/codecvt/out/wchar_t/2.cc: Likewise.
+ * testsuite/22_locale/codecvt/out/wchar_t/7.cc: Likewise.
+ * testsuite/22_locale/codecvt/out/wchar_t/wrapped_env.cc: Likewise.
+ * testsuite/22_locale/codecvt/out/wchar_t/wrapped_locale.cc: Likewise.
+ * testsuite/22_locale/codecvt/unshift/char/wrapped_env.cc: Likewise.
+ * testsuite/22_locale/codecvt/unshift/char/wrapped_locale.cc: Likewise.
+ * testsuite/22_locale/codecvt/unshift/wchar_t/2.cc: Likewise.
+ * testsuite/22_locale/codecvt/unshift/wchar_t/3.cc: Likewise.
+ * testsuite/22_locale/codecvt/unshift/wchar_t/wrapped_env.cc: Likewise.
+ * testsuite/22_locale/codecvt/unshift/wchar_t/wrapped_locale.cc:
+ Likewise.
+ * testsuite/22_locale/codecvt_byname/50714.cc: Likewise.
+ * testsuite/22_locale/collate/compare/char/1.cc: Likewise.
+ * testsuite/22_locale/collate/compare/char/2.cc: Likewise.
+ * testsuite/22_locale/collate/compare/char/3.cc: Likewise.
+ * testsuite/22_locale/collate/compare/char/wrapped_env.cc: Likewise.
+ * testsuite/22_locale/collate/compare/char/wrapped_locale.cc: Likewise.
+ * testsuite/22_locale/collate/compare/wchar_t/1.cc: Likewise.
+ * testsuite/22_locale/collate/compare/wchar_t/2.cc: Likewise.
+ * testsuite/22_locale/collate/compare/wchar_t/3.cc: Likewise.
+ * testsuite/22_locale/collate/compare/wchar_t/wrapped_env.cc: Likewise.
+ * testsuite/22_locale/collate/compare/wchar_t/wrapped_locale.cc:
+ Likewise.
+ * testsuite/22_locale/collate/hash/char/2.cc: Likewise.
+ * testsuite/22_locale/collate/hash/char/wrapped_env.cc: Likewise.
+ * testsuite/22_locale/collate/hash/char/wrapped_locale.cc: Likewise.
+ * testsuite/22_locale/collate/hash/wchar_t/2.cc: Likewise.
+ * testsuite/22_locale/collate/hash/wchar_t/wrapped_env.cc: Likewise.
+ * testsuite/22_locale/collate/hash/wchar_t/wrapped_locale.cc: Likewise.
+ * testsuite/22_locale/collate/transform/char/2.cc: Likewise.
+ * testsuite/22_locale/collate/transform/char/3.cc: Likewise.
+ * testsuite/22_locale/collate/transform/char/wrapped_env.cc: Likewise.
+ * testsuite/22_locale/collate/transform/char/wrapped_locale.cc:
+ Likewise.
+ * testsuite/22_locale/collate/transform/wchar_t/2.cc: Likewise.
+ * testsuite/22_locale/collate/transform/wchar_t/3.cc: Likewise.
+ * testsuite/22_locale/collate/transform/wchar_t/wrapped_env.cc:
+ Likewise.
+ * testsuite/22_locale/collate/transform/wchar_t/wrapped_locale.cc:
+ Likewise.
+ * testsuite/22_locale/collate_byname/named_equivalence.cc: Likewise.
+ * testsuite/22_locale/ctype/cons/char/wrapped_env.cc: Likewise.
+ * testsuite/22_locale/ctype/cons/char/wrapped_locale.cc: Likewise.
+ * testsuite/22_locale/ctype/is/char/2.cc: Likewise.
+ * testsuite/22_locale/ctype/is/char/wrapped_env.cc: Likewise.
+ * testsuite/22_locale/ctype/is/char/wrapped_locale.cc: Likewise.
+ * testsuite/22_locale/ctype/is/wchar_t/2.cc: Likewise.
+ * testsuite/22_locale/ctype/is/wchar_t/wrapped_env.cc: Likewise.
+ * testsuite/22_locale/ctype/is/wchar_t/wrapped_locale.cc: Likewise.
+ * testsuite/22_locale/ctype/narrow/char/wrapped_env.cc: Likewise.
+ * testsuite/22_locale/ctype/narrow/char/wrapped_locale.cc: Likewise.
+ * testsuite/22_locale/ctype/narrow/wchar_t/wrapped_env.cc: Likewise.
+ * testsuite/22_locale/ctype/narrow/wchar_t/wrapped_locale.cc: Likewise.
+ * testsuite/22_locale/ctype/scan/char/wrapped_env.cc: Likewise.
+ * testsuite/22_locale/ctype/scan/char/wrapped_locale.cc: Likewise.
+ * testsuite/22_locale/ctype/scan/wchar_t/wrapped_env.cc: Likewise.
+ * testsuite/22_locale/ctype/scan/wchar_t/wrapped_locale.cc: Likewise.
+ * testsuite/22_locale/ctype/to/char/wrapped_env.cc: Likewise.
+ * testsuite/22_locale/ctype/to/char/wrapped_locale.cc: Likewise.
+ * testsuite/22_locale/ctype/to/wchar_t/wrapped_env.cc: Likewise.
+ * testsuite/22_locale/ctype/to/wchar_t/wrapped_locale.cc: Likewise.
+ * testsuite/22_locale/ctype/widen/char/wrapped_env.cc: Likewise.
+ * testsuite/22_locale/ctype/widen/char/wrapped_locale.cc: Likewise.
+ * testsuite/22_locale/ctype/widen/wchar_t/2.cc: Likewise.
+ * testsuite/22_locale/ctype/widen/wchar_t/wrapped_env.cc: Likewise.
+ * testsuite/22_locale/ctype/widen/wchar_t/wrapped_locale.cc: Likewise.
+ * testsuite/22_locale/facet/2.cc: Likewise.
+ * testsuite/22_locale/locale/cons/12352.cc: Likewise.
+ * testsuite/22_locale/locale/cons/12658_thread-1.cc: Likewise.
+ * testsuite/22_locale/locale/cons/12658_thread-2.cc: Likewise.
+ * testsuite/22_locale/locale/cons/2.cc: Likewise.
+ * testsuite/22_locale/locale/cons/38365.cc: Likewise.
+ * testsuite/22_locale/locale/cons/38368.cc: Likewise.
+ * testsuite/22_locale/locale/cons/4.cc: Likewise.
+ * testsuite/22_locale/locale/cons/40184.cc: Likewise.
+ * testsuite/22_locale/locale/cons/7.cc: Likewise.
+ * testsuite/22_locale/locale/global_locale_objects/14071.cc: Likewise.
+ * testsuite/22_locale/locale/global_locale_objects/2.cc: Likewise.
+ * testsuite/22_locale/messages/13631.cc: Likewise.
+ * testsuite/22_locale/messages/members/char/1.cc: Likewise.
+ * testsuite/22_locale/messages/members/char/2.cc: Likewise.
+ * testsuite/22_locale/messages/members/char/3.cc: Likewise.
+ * testsuite/22_locale/messages/members/char/wrapped_env.cc: Likewise.
+ * testsuite/22_locale/messages/members/char/wrapped_locale.cc:
+ Likewise.
+ * testsuite/22_locale/messages_byname/named_equivalence.cc: Likewise.
+ * testsuite/22_locale/money_get/get/char/1.cc: Likewise.
+ * testsuite/22_locale/money_get/get/char/10.cc: Likewise.
+ * testsuite/22_locale/money_get/get/char/11.cc: Likewise.
+ * testsuite/22_locale/money_get/get/char/11528.cc: Likewise.
+ * testsuite/22_locale/money_get/get/char/12.cc: Likewise.
+ * testsuite/22_locale/money_get/get/char/13.cc: Likewise.
+ * testsuite/22_locale/money_get/get/char/15.cc: Likewise.
+ * testsuite/22_locale/money_get/get/char/16.cc: Likewise.
+ * testsuite/22_locale/money_get/get/char/17.cc: Likewise.
+ * testsuite/22_locale/money_get/get/char/18.cc: Likewise.
+ * testsuite/22_locale/money_get/get/char/2.cc: Likewise.
+ * testsuite/22_locale/money_get/get/char/3.cc: Likewise.
+ * testsuite/22_locale/money_get/get/char/4.cc: Likewise.
+ * testsuite/22_locale/money_get/get/char/wrapped_env.cc: Likewise.
+ * testsuite/22_locale/money_get/get/char/wrapped_locale.cc: Likewise.
+ * testsuite/22_locale/money_get/get/wchar_t/1.cc: Likewise.
+ * testsuite/22_locale/money_get/get/wchar_t/10.cc: Likewise.
+ * testsuite/22_locale/money_get/get/wchar_t/11.cc: Likewise.
+ * testsuite/22_locale/money_get/get/wchar_t/11528.cc: Likewise.
+ * testsuite/22_locale/money_get/get/wchar_t/12.cc: Likewise.
+ * testsuite/22_locale/money_get/get/wchar_t/13.cc: Likewise.
+ * testsuite/22_locale/money_get/get/wchar_t/15.cc: Likewise.
+ * testsuite/22_locale/money_get/get/wchar_t/16.cc: Likewise.
+ * testsuite/22_locale/money_get/get/wchar_t/17.cc: Likewise.
+ * testsuite/22_locale/money_get/get/wchar_t/18.cc: Likewise.
+ * testsuite/22_locale/money_get/get/wchar_t/2.cc: Likewise.
+ * testsuite/22_locale/money_get/get/wchar_t/3.cc: Likewise.
+ * testsuite/22_locale/money_get/get/wchar_t/4.cc: Likewise.
+ * testsuite/22_locale/money_get/get/wchar_t/wrapped_env.cc: Likewise.
+ * testsuite/22_locale/money_get/get/wchar_t/wrapped_locale.cc:
+ Likewise.
+ * testsuite/22_locale/money_put/put/char/1.cc: Likewise.
+ * testsuite/22_locale/money_put/put/char/2.cc: Likewise.
+ * testsuite/22_locale/money_put/put/char/3.cc: Likewise.
+ * testsuite/22_locale/money_put/put/char/9780-3.cc: Likewise.
+ * testsuite/22_locale/money_put/put/char/wrapped_env.cc: Likewise.
+ * testsuite/22_locale/money_put/put/char/wrapped_locale.cc: Likewise.
+ * testsuite/22_locale/money_put/put/wchar_t/1.cc: Likewise.
+ * testsuite/22_locale/money_put/put/wchar_t/2.cc: Likewise.
+ * testsuite/22_locale/money_put/put/wchar_t/3.cc: Likewise.
+ * testsuite/22_locale/money_put/put/wchar_t/wrapped_env.cc: Likewise.
+ * testsuite/22_locale/money_put/put/wchar_t/wrapped_locale.cc:
+ Likewise.
+ * testsuite/22_locale/moneypunct/40712.cc: Likewise.
+ * testsuite/22_locale/moneypunct/members/char/2.cc: Likewise.
+ * testsuite/22_locale/moneypunct/members/char/wrapped_env.cc:
+ Likewise.
+ * testsuite/22_locale/moneypunct/members/char/wrapped_locale.cc:
+ Likewise.
+ * testsuite/22_locale/moneypunct/members/wchar_t/2.cc: Likewise.
+ * testsuite/22_locale/moneypunct/members/wchar_t/wrapped_env.cc:
+ Likewise.
+ * testsuite/22_locale/moneypunct/members/wchar_t/wrapped_locale.cc:
+ Likewise.
+ * testsuite/22_locale/moneypunct_byname/named_equivalence.cc:
+ Likewise.
+ * testsuite/22_locale/num_get/get/char/1.cc: Likewise.
+ * testsuite/22_locale/num_get/get/char/3.cc: Likewise.
+ * testsuite/22_locale/num_get/get/char/5.cc: Likewise.
+ * testsuite/22_locale/num_get/get/char/6.cc: Likewise.
+ * testsuite/22_locale/num_get/get/char/9.cc: Likewise.
+ * testsuite/22_locale/num_get/get/char/wrapped_env.cc: Likewise.
+ * testsuite/22_locale/num_get/get/char/wrapped_locale.cc: Likewise.
+ * testsuite/22_locale/num_get/get/wchar_t/1.cc: Likewise.
+ * testsuite/22_locale/num_get/get/wchar_t/3.cc: Likewise.
+ * testsuite/22_locale/num_get/get/wchar_t/5.cc: Likewise.
+ * testsuite/22_locale/num_get/get/wchar_t/6.cc: Likewise.
+ * testsuite/22_locale/num_get/get/wchar_t/9.cc: Likewise.
+ * testsuite/22_locale/num_get/get/wchar_t/wrapped_env.cc: Likewise.
+ * testsuite/22_locale/num_get/get/wchar_t/wrapped_locale.cc: Likewise.
+ * testsuite/22_locale/num_put/put/char/1.cc: Likewise.
+ * testsuite/22_locale/num_put/put/char/20909.cc: Likewise.
+ * testsuite/22_locale/num_put/put/char/20914.cc: Likewise.
+ * testsuite/22_locale/num_put/put/char/3.cc: Likewise.
+ * testsuite/22_locale/num_put/put/char/5.cc: Likewise.
+ * testsuite/22_locale/num_put/put/char/9780-2.cc: Likewise.
+ * testsuite/22_locale/num_put/put/char/wrapped_env.cc: Likewise.
+ * testsuite/22_locale/num_put/put/char/wrapped_locale.cc: Likewise.
+ * testsuite/22_locale/num_put/put/wchar_t/1.cc: Likewise.
+ * testsuite/22_locale/num_put/put/wchar_t/20909.cc: Likewise.
+ * testsuite/22_locale/num_put/put/wchar_t/20914.cc: Likewise.
+ * testsuite/22_locale/num_put/put/wchar_t/3.cc: Likewise.
+ * testsuite/22_locale/num_put/put/wchar_t/5.cc: Likewise.
+ * testsuite/22_locale/num_put/put/wchar_t/wrapped_env.cc: Likewise.
+ * testsuite/22_locale/num_put/put/wchar_t/wrapped_locale.cc: Likewise.
+ * testsuite/22_locale/numpunct/members/char/2.cc: Likewise.
+ * testsuite/22_locale/numpunct/members/char/3.cc: Likewise.
+ * testsuite/22_locale/numpunct/members/char/wrapped_env.cc: Likewise.
+ * testsuite/22_locale/numpunct/members/char/wrapped_locale.cc:
+ Likewise.
+ * testsuite/22_locale/numpunct/members/wchar_t/2.cc: Likewise.
+ * testsuite/22_locale/numpunct/members/wchar_t/wrapped_env.cc:
+ Likewise.
+ * testsuite/22_locale/numpunct/members/wchar_t/wrapped_locale.cc:
+ Likewise.
+ * testsuite/22_locale/numpunct_byname/named_equivalence.cc: Likewise.
+ * testsuite/22_locale/time_get/date_order/char/wrapped_env.cc:
+ Likewise.
+ * testsuite/22_locale/time_get/date_order/char/wrapped_locale.cc:
+ Likewise.
+ * testsuite/22_locale/time_get/date_order/wchar_t/wrapped_env.cc:
+ Likewise.
+ * testsuite/22_locale/time_get/date_order/wchar_t/wrapped_locale.cc:
+ Likewise.
+ * testsuite/22_locale/time_get/get/char/2.cc: Likewise.
+ * testsuite/22_locale/time_get/get/wchar_t/2.cc: Likewise.
+ * testsuite/22_locale/time_get/get_date/char/12750.cc: Likewise.
+ * testsuite/22_locale/time_get/get_date/char/2.cc: Likewise.
+ * testsuite/22_locale/time_get/get_date/char/26701.cc: Likewise.
+ * testsuite/22_locale/time_get/get_date/char/wrapped_env.cc: Likewise.
+ * testsuite/22_locale/time_get/get_date/char/wrapped_locale.cc:
+ Likewise.
+ * testsuite/22_locale/time_get/get_date/wchar_t/12750.cc: Likewise.
+ * testsuite/22_locale/time_get/get_date/wchar_t/2.cc: Likewise.
+ * testsuite/22_locale/time_get/get_date/wchar_t/26701.cc: Likewise.
+ * testsuite/22_locale/time_get/get_date/wchar_t/4.cc: Likewise.
+ * testsuite/22_locale/time_get/get_date/wchar_t/wrapped_env.cc:
+ Likewise.
+ * testsuite/22_locale/time_get/get_date/wchar_t/wrapped_locale.cc:
+ Likewise.
+ * testsuite/22_locale/time_get/get_monthname/char/2.cc: Likewise.
+ * testsuite/22_locale/time_get/get_monthname/char/wrapped_env.cc:
+ Likewise.
+ * testsuite/22_locale/time_get/get_monthname/char/wrapped_locale.cc:
+ Likewise.
+ * testsuite/22_locale/time_get/get_monthname/wchar_t/2.cc: Likewise.
+ * testsuite/22_locale/time_get/get_monthname/wchar_t/wrapped_env.cc:
+ Likewise.
+ * testsuite/22_locale/time_get/get_monthname/wchar_t/wrapped_locale.cc:
+ Likewise.
+ * testsuite/22_locale/time_get/get_time/char/1.cc: Likewise.
+ * testsuite/22_locale/time_get/get_time/char/2.cc: Likewise.
+ * testsuite/22_locale/time_get/get_time/char/wrapped_env.cc:
+ Likewise.
+ * testsuite/22_locale/time_get/get_time/char/wrapped_locale.cc:
+ Likewise.
+ * testsuite/22_locale/time_get/get_time/wchar_t/1.cc: Likewise.
+ * testsuite/22_locale/time_get/get_time/wchar_t/2.cc: Likewise.
+ * testsuite/22_locale/time_get/get_time/wchar_t/wrapped_env.cc:
+ Likewise.
+ * testsuite/22_locale/time_get/get_time/wchar_t/wrapped_locale.cc:
+ Likewise.
+ * testsuite/22_locale/time_get/get_weekday/char/2.cc: Likewise.
+ * testsuite/22_locale/time_get/get_weekday/char/38081-1.cc: Likewise.
+ * testsuite/22_locale/time_get/get_weekday/char/38081-2.cc: Likewise.
+ * testsuite/22_locale/time_get/get_weekday/char/wrapped_env.cc:
+ Likewise.
+ * testsuite/22_locale/time_get/get_weekday/char/wrapped_locale.cc:
+ Likewise.
+ * testsuite/22_locale/time_get/get_weekday/wchar_t/2.cc: Likewise.
+ * testsuite/22_locale/time_get/get_weekday/wchar_t/wrapped_env.cc:
+ Likewise.
+ * testsuite/22_locale/time_get/get_weekday/wchar_t/wrapped_locale.cc:
+ Likewise.
+ * testsuite/22_locale/time_get/get_year/char/wrapped_env.cc: Likewise.
+ * testsuite/22_locale/time_get/get_year/char/wrapped_locale.cc:
+ Likewise.
+ * testsuite/22_locale/time_get/get_year/wchar_t/wrapped_env.cc:
+ Likewise.
+ * testsuite/22_locale/time_get/get_year/wchar_t/wrapped_locale.cc:
+ Likewise.
+ * testsuite/22_locale/time_put/put/char/17038.cc: Likewise.
+ * testsuite/22_locale/time_put/put/char/2.cc: Likewise.
+ * testsuite/22_locale/time_put/put/char/3.cc: Likewise.
+ * testsuite/22_locale/time_put/put/char/4.cc: Likewise.
+ * testsuite/22_locale/time_put/put/char/6.cc: Likewise.
+ * testsuite/22_locale/time_put/put/char/7.cc: Likewise.
+ * testsuite/22_locale/time_put/put/char/8.cc: Likewise.
+ * testsuite/22_locale/time_put/put/char/9780-1.cc: Likewise.
+ * testsuite/22_locale/time_put/put/char/wrapped_env.cc: Likewise.
+ * testsuite/22_locale/time_put/put/char/wrapped_locale.cc: Likewise.
+ * testsuite/22_locale/time_put/put/wchar_t/17038.cc: Likewise.
+ * testsuite/22_locale/time_put/put/wchar_t/2.cc: Likewise.
+ * testsuite/22_locale/time_put/put/wchar_t/3.cc: Likewise.
+ * testsuite/22_locale/time_put/put/wchar_t/4.cc: Likewise.
+ * testsuite/22_locale/time_put/put/wchar_t/6.cc: Likewise.
+ * testsuite/22_locale/time_put/put/wchar_t/7.cc: Likewise.
+ * testsuite/22_locale/time_put/put/wchar_t/8.cc: Likewise.
+ * testsuite/22_locale/time_put/put/wchar_t/wrapped_env.cc: Likewise.
+ * testsuite/22_locale/time_put/put/wchar_t/wrapped_locale.cc: Likewise.
+ * testsuite/27_io/basic_filebuf/imbue/char/13007.cc: Likewise.
+ * testsuite/27_io/basic_filebuf/imbue/char/13171-1.cc: Likewise.
+ * testsuite/27_io/basic_filebuf/imbue/char/13171-2.cc: Likewise.
+ * testsuite/27_io/basic_filebuf/imbue/char/13171-4.cc: Likewise.
+ * testsuite/27_io/basic_filebuf/imbue/char/13582-2.cc: Likewise.
+ * testsuite/27_io/basic_filebuf/imbue/char/14975-1.cc: Likewise.
+ * testsuite/27_io/basic_filebuf/imbue/char/2.cc: Likewise.
+ * testsuite/27_io/basic_filebuf/imbue/char/9322.cc: Likewise.
+ * testsuite/27_io/basic_filebuf/imbue/wchar_t/13007.cc: Likewise.
+ * testsuite/27_io/basic_filebuf/imbue/wchar_t/13171-3.cc: Likewise.
+ * testsuite/27_io/basic_filebuf/imbue/wchar_t/13582-2.cc: Likewise.
+ * testsuite/27_io/basic_filebuf/imbue/wchar_t/13582-3.cc: Likewise.
+ * testsuite/27_io/basic_filebuf/imbue/wchar_t/14975-2.cc: Likewise.
+ * testsuite/27_io/basic_filebuf/imbue/wchar_t/2.cc: Likewise.
+ * testsuite/27_io/basic_filebuf/imbue/wchar_t/9322.cc: Likewise.
+ * testsuite/27_io/basic_filebuf/underflow/wchar_t/9520.cc: Likewise.
+ * testsuite/27_io/basic_ios/copyfmt/char/2.cc: Likewise.
+ * testsuite/27_io/basic_ostream/inserters_arithmetic/char/2.cc:
+ Likewise.
+ * testsuite/27_io/basic_ostream/inserters_arithmetic/wchar_t/2.cc:
+ Likewise.
+ * testsuite/27_io/basic_streambuf/cons/57394.cc: Likewise.
+ * testsuite/27_io/basic_streambuf/imbue/char/13007-2.cc: Likewise.
+ * testsuite/27_io/basic_streambuf/imbue/char/9322.cc: Likewise.
+ * testsuite/27_io/basic_streambuf/imbue/wchar_t/13007-2.cc: Likewise.
+ * testsuite/27_io/basic_streambuf/imbue/wchar_t/9322.cc: Likewise.
+ * testsuite/27_io/basic_stringbuf/imbue/char/9322.cc: Likewise.
+ * testsuite/27_io/basic_stringbuf/imbue/wchar_t/9322.cc: Likewise.
+ * testsuite/27_io/manipulators/extended/get_money/char/1.cc: Likewise.
+ * testsuite/27_io/manipulators/extended/get_money/wchar_t/1.cc:
+ Likewise.
+ * testsuite/27_io/manipulators/extended/get_time/char/2.cc: Likewise.
+ * testsuite/27_io/manipulators/extended/get_time/wchar_t/2.cc:
+ Likewise.
+ * testsuite/27_io/manipulators/extended/put_money/char/1.cc: Likewise.
+ * testsuite/27_io/manipulators/extended/put_money/wchar_t/1.cc:
+ Likewise.
+ * testsuite/27_io/manipulators/extended/put_time/char/2.cc: Likewise.
+ * testsuite/27_io/manipulators/extended/put_time/wchar_t/2.cc:
+ Likewise.
+ * testsuite/27_io/objects/wchar_t/13582-1_xin.cc: Likewise.
+ * testsuite/27_io/objects/wchar_t/9520.cc: Likewise.
+ * testsuite/lib/libstdc++.exp (check_v3_target_namedlocale): Check
+ for named locale as appropriate for target.
+ * testsuite/util/testsuite_hooks.h (ISO_8859): Define macro to form
+ target's preferred form of locale name.
+
+2015-11-13 Jennifer Yao <jenny.hyphen.fa@gmail.com>
+ Jonathan Wakely <jwakely@redhat.com>
+
+ PR libstdc++/58393
+ PR libstdc++/61580
+ * acinclude.m4 (GLIBCXX_ENABLE_C99): Perform tests twice, with
+ -std=c++11 as well as -std=c++98, and define separate macros for each.
+ Cache the results of checking for complex math and wide character
+ functions. Reformat for readability.
+ * config.h.in: Regenerate.
+ * include/bits/c++config: Define _GLIBCXX_USE_C99_XXX macros to
+ either _GLIBCXX98_USE_C99_XXX or _GLIBCXX11_USE_C99_XXX according to
+ language standard in use.
+ * config/locale/dragonfly/c_locale.h (std::__convert_from_v): Replace
+ _GLIBCXX_USE_C99 with _GLIBCXX_USE_C99_STDIO.
+ * config/locale/generic/c_locale.h (std::__convert_from_v): Likewise.
+ * config/locale/gnu/c_locale.h (std::__convert_from_v): Likewise.
+ * config/os/bsd/dragonfly/os_defines.h: Define _GLIBCXX_USE_C99_STDIO,
+ _GLIBCXX_USE_C99_STDLIB, and _GLIBCXX_USE_C99_WCHAR.
+ * configure: Regenerate.
+ * include/bits/basic_string.h: Make numeric conversion functions
+ depend on _GLIBCXX_USE_C99_STDIO, _GLIBCXX_USE_C99_STDLIB, or
+ _GLIBCXX_USE_C99_WCHAR, instead of _GLIBCXX_USE_C99.
+ * include/ext/vstring.h: Likewise.
+ * include/bits/locale_facets.tcc (std::num_put::_M_insert_float):
+ Replace _GLIBCXX_USE_C99 with _GLIBCXX_USE_C99_STDIO.
+ * include/bits/locale_facets_nonio.tcc (std::money_put::do_put):
+ Likewise.
+ * include/c_compatibility/math.h: Replace _GLIBCXX_USE_C99 with
+ _GLIBCXX_USE_C99_MATH.
+ * include/c_compatibility/wchar.h: Replace _GLIBCXX_USE_C99 with
+ _GLIBCXX_USE_C99_WCHAR.
+ * include/c_global/cstdio: Replace _GLIBCXX_USE_C99 with
+ _GLIBCXX_USE_C99_STDIO.
+ * include/c_global/cstdlib: Replace _GLIBCXX_USE_C99 with
+ _GLIBCXX_USE_C99_STDLIB.
+ * include/c_global/cwchar: Replace _GLIBCXX_USE_C99 with
+ _GLIBCXX_USE_C99_WCHAR.
+ * include/c_std/cstdio: Replace _GLIBCXX_USE_C99 with
+ _GLIBCXX_USE_C99_STDIO.
+ * include/c_std/cstdlib: Replace _GLIBCXX_USE_C99 with
+ _GLIBCXX_USE_C99_STDLIB.
+ * include/c_std/cwchar: Replace _GLIBCXX_USE_C99 with
+ _GLIBCXX_USE_C99_WCHAR.
+ * include/tr1/cstdio: Replace _GLIBCXX_USE_C99 with
+ _GLIBCXX_USE_C99_STDIO.
+ * include/tr1/cstdlib: Replace _GLIBCXX_USE_C99 with
+ _GLIBCXX_USE_C99_STDLIB.
+ * include/tr1/cwchar: Replace _GLIBCXX_USE_C99 with
+ _GLIBCXX_USE_C99_WCHAR.
+ * include/tr1/stdlib.h: Replace _GLIBCXX_USE_C99 with
+ _GLIBCXX_USE_C99_STDLIB.
+ * src/c++98/locale_facets.cc (std::__num_base::_S_format_float):
+ Replace _GLIBCXX_USE_C99 with _GLIBCXX_USE_C99_STDIO.
+ * testsuite/18_support/exception_ptr/60612-terminate.cc: Replace
+ _GLIBCXX_USE_C99 with _GLIBCXX_USE_C99_STDLIB.
+ * testsuite/18_support/exception_ptr/60612-unexpected.cc: Likewise.
+ * testsuite/21_strings/basic_string/numeric_conversions/wchar_t/stod.cc
+ (test01): Replace _GLIBCXX_USE_C99 with _GLIBCXX_USE_C99_WCHAR.
+ * testsuite/21_strings/basic_string/numeric_conversions/wchar_t/
+ stof.cc: Likewise.
+ * testsuite/21_strings/basic_string/numeric_conversions/wchar_t/
+ stoi.cc: Likewise.
+ * testsuite/21_strings/basic_string/numeric_conversions/wchar_t/
+ stol.cc: Likewise.
+ * testsuite/21_strings/basic_string/numeric_conversions/wchar_t/
+ stold.cc: Likewise.
+ * testsuite/21_strings/basic_string/numeric_conversions/wchar_t/
+ stoll.cc: Likewise.
+ * testsuite/21_strings/basic_string/numeric_conversions/wchar_t/
+ stoul.cc: Likewise.
+ * testsuite/21_strings/basic_string/numeric_conversions/wchar_t/
+ stoull.cc: Likewise.
+ * testsuite/21_strings/basic_string/numeric_conversions/wchar_t/
+ to_wstring.cc: Likewise.
+ * testsuite/26_numerics/headers/cstdlib/13943.cc: Replace
+ _GLIBCXX_USE_C99 with _GLIBCXX_USE_C99_STDLIB.
+ * testsuite/26_numerics/headers/cstdlib/types_std_c++0x.cc: Likewise.
+ * testsuite/lib/libstdc++.exp (check_v3_target_string_conversions):
+ Change preprocessor #if conditional so that it uses
+ _GLIBCXX_USE_C99_STDIO, _GLIBCXX_USE_C99_STDLIB, and
+ _GLIBCXX_USE_C99_WCHAR, instead of _GLIBCXX_USE_C99.
+ * testsuite/tr1/8_c_compatibility/cmath/templates.cc: Replace
+ _GLIBCXX_USE_C99 with _GLIBCXX_USE_C99_MATH.
+ * testsuite/tr1/8_c_compatibility/cstdio/functions.cc: Replace
+ _GLIBCXX_USE_C99 with _GLIBCXX_USE_C99_STDIO.
+ * testsuite/tr1/8_c_compatibility/cstdlib/functions.cc: Replace
+ _GLIBCXX_USE_C99 with _GLIBCXX_USE_C99_STDLIB.
+ * testsuite/tr1/8_c_compatibility/cstdlib/types_std_tr1.cc: Likewise.
+ * testsuite/tr1/8_c_compatibility/cwchar/functions.cc: Replace
+ _GLIBCXX_USE_C99 with _GLIBCXX_USE_C99_WCHAR.
+ * testsuite/util/testsuite_fs.h: Replace _GLIBCXX_USE_C99 with
+ _GLIBCXX_USE_C99_STDIO.
+
+2015-11-13 Jonathan Wakely <jwakely@redhat.com>
+
+ * include/experimental/bits/shared_ptr.h: Tweak comments.
+
+2015-11-13 Fan You <youfan.noey@gmail.com>
+ Jonathan Wakely <jwakely@redhat.com>
+
+ * include/Makefile.am: Add new header.
+ * include/Makefile.in: Regenerate.
+ * include/experimental/bits/shared_ptr.h: New.
+ * include/experimental/memory: Include new header.
+ * testsuite/experimental/memory/shared_ptr/assign/assign.cc: New.
+ * testsuite/experimental/memory/shared_ptr/cast/cast.cc: New.
+ * testsuite/experimental/memory/shared_ptr/comparison/comparison.cc:
+ New.
+ * testsuite/experimental/memory/shared_ptr/cons/alias_ctor.cc: New.
+ * testsuite/experimental/memory/shared_ptr/cons/alloc_ctor.cc: New.
+ * testsuite/experimental/memory/shared_ptr/cons/copy_ctor.cc: New.
+ * testsuite/experimental/memory/shared_ptr/cons/copy_ctor_neg.cc: New.
+ * testsuite/experimental/memory/shared_ptr/cons/default_ctor.cc: New.
+ * testsuite/experimental/memory/shared_ptr/cons/move_ctor.cc: New.
+ * testsuite/experimental/memory/shared_ptr/cons/pointer_ctor.cc: New.
+ * testsuite/experimental/memory/shared_ptr/cons/unique_ptr_ctor.cc:
+ New.
+ * testsuite/experimental/memory/shared_ptr/cons/weak_ptr_ctor.cc: New.
+ * testsuite/experimental/memory/shared_ptr/dest/dest.cc: New.
+ * testsuite/experimental/memory/shared_ptr/modifiers/reset.cc: New.
+ * testsuite/experimental/memory/shared_ptr/modifiers/swap.cc: New.
+ * testsuite/experimental/memory/shared_ptr/observers/bool_conv.cc:
+ New.
+ * testsuite/experimental/memory/shared_ptr/observers/operators.cc:
+ New.
+ * testsuite/experimental/memory/shared_ptr/observers/owner_before.cc:
+ New.
+ * testsuite/experimental/memory/shared_ptr/observers/use_count.cc: New.
+
+2015-11-13 Jonathan Wakely <jwakely@redhat.com>
+
+ * include/Makefile.am: Add new header.
+ * include/Makefile.in: Regenerate.
+ * include/experimental/memory_resource: Add feature-test macro.
+ * include/experimental/regex: New.
+ * include/experimental/deque: Add alias template using PMR.
+ * include/experimental/forward_list: Likewise.
+ * include/experimental/list: Likewise.
+ * include/experimental/map: Likewise.
+ * include/experimental/set: Likewise.
+ * include/experimental/string: Likewise.
+ * include/experimental/unordered_map: Likewise.
+ * include/experimental/unordered_set: Likewise.
+ * include/experimental/vector: Likewise.
+
+2015-11-13 Fan You <youfan.noey@gmail.com>
+
+ * include/Makefile.am: Add new headers.
+ * include/Makefile.in: Regenerate.
+ * include/bits/uses_allocator.h (__erased_type): Define.
+ (__uses_allocator_helper): Check for __erased_type.
+ * include/experimental/memory_resource: New.
+ * include/experimental/utlity: New.
+ * testsuite/experimental/type_erased_allocator/1.cc: New.
+ * testsuite/experimental/type_erased_allocator/1_neg.cc: New.
+ * testsuite/experimental/type_erased_allocator/2.cc: New.
+ * testsuite/experimental/type_erased_allocator/uses_allocator.cc: New.
+
+2015-11-12 Jonathan Wakely <jwakely@redhat.com>
+
+ PR libstdc++/56158
+ * include/bits/ios_base.h (_Ios_Fmtflags, _Ios_Openmode, _Ios_Iostate):
+ Define enumerators to ensure all values of type int are valid values
+ of the enumeration type.
+ * testsuite/27_io/ios_base/types/fmtflags/case_label.cc: Add new cases.
+ * testsuite/27_io/ios_base/types/iostate/case_label.cc: Likewise.
+ * testsuite/27_io/ios_base/types/openmode/case_label.cc: Likewise.
+
+ * include/std/thread: Include <cerrno> for EINTR.
+
+2015-11-12 Ville Voutilainen <ville.voutilainen@gmail.com>
+
+ Implement D0013R2, logical type traits.
+
+ * include/experimental/type_traits (conjunction, disjunction,
+ negation, conjunction_v, disjunction_v, negation_v): New.
+ * include/std/type_traits (conjunction, disjunction, negation):
+ Likewise.
+ * testsuite/20_util/declval/requirements/1_neg.cc: Adjust.
+ * testsuite/20_util/make_signed/requirements/typedefs_neg.cc: Likewise.
+ * testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc:
+ Likewise.
+ * testsuite/experimental/type_traits/value.cc: Likewise.
+ * testsuite/20_util/logical_traits/requirements/explicit_instantiation.cc: New.
+ * testsuite/20_util/logical_traits/requirements/typedefs.cc: Likewise.
+ * testsuite/20_util/logical_traits/value.cc: Likewise.
+
+2015-11-12 Jonathan Wakely <jwakely@redhat.com>
+
+ * include/experimental/bits/string_view.tcc: Fix doxygen @file.
+
+2015-11-11 Jonathan Wakely <jwakely@redhat.com>
+
+ * libsupc++/new_handler.cc: Fix for explicit constructor change.
+
+ PR libstdc++/60421
+ * include/std/thread (this_thread::sleep_for): Retry on EINTR.
+ (this_thread::sleep_until): Retry if time not reached.
+ * src/c++11/thread.cc (__sleep_for): Retry on EINTR.
+ * testsuite/30_threads/this_thread/60421.cc: Test interruption and
+ non-steady clocks.
+
+2015-11-11 Ville Voutilainen <ville.voutilainen@gmail.com>
+
+ LWG 2510, make the default constructors of library tag types
+ explicit.
+ * include/bits/mutex.h (defer_lock_t, try_lock_t,
+ adopt_lock_t): Add an explicit default constructor.
+ * include/bits/stl_pair.h (piecewise_construct_t): Likewise.
+ * include/bits/uses_allocator.h (allocator_arg_t): Likewise.
+ * libsupc++/new (nothrow_t): Likewise.
+ * testsuite/17_intro/tag_type_explicit_ctor.cc: New.
+
+2015-11-11 Jonathan Wakely <jwakely@redhat.com>
+
+ PR libstdc++/64651
+ * libsupc++/exception_ptr.h (rethrow_exception): Add using-declaration
+ to __exception_ptr namespace.
+ * testsuite/18_support/exception_ptr/rethrow_exception.cc: Test ADL.
+ Remove unnecessary test variables.
+
2015-11-10 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/68190
diff --git a/libstdc++-v3/acinclude.m4 b/libstdc++-v3/acinclude.m4
index abf2e93afd4..deefa04155e 100644
--- a/libstdc++-v3/acinclude.m4
+++ b/libstdc++-v3/acinclude.m4
@@ -915,234 +915,438 @@ AC_DEFUN([GLIBCXX_ENABLE_C99], [
GLIBCXX_ENABLE(c99,$1,,[turns on ISO/IEC 9899:1999 support])
if test x"$enable_c99" = x"yes"; then
+ AC_LANG_SAVE
+ AC_LANG_CPLUSPLUS
- AC_LANG_SAVE
- AC_LANG_CPLUSPLUS
+ # Use -std=c++98 (instead of -std=gnu++98) because leaving __STRICT_ANSI__
+ # undefined may cause fake C99 facilities, like pre-standard snprintf,
+ # to be spuriously enabled.
+ ac_save_CXXFLAGS="$CXXFLAGS"
+ CXXFLAGS="$CXXFLAGS -std=c++98"
+ ac_save_LIBS="$LIBS"
+ ac_save_gcc_no_link="$gcc_no_link"
+
+ if test x$gcc_no_link != xyes; then
+ # Use -fno-exceptions to that the C driver can link these tests without
+ # hitting undefined references to personality routines.
+ CXXFLAGS="$CXXFLAGS -fno-exceptions"
+ AC_CHECK_LIB(m, sin, [LIBS="$LIBS -lm"], [
+ # Use the default compile-only tests in GCC_TRY_COMPILE_OR_LINK
+ gcc_no_link=yes
+ ])
+ fi
- # Use -std=c++98 because the default (-std=gnu++98) leaves __STRICT_ANSI__
- # undefined and fake C99 facilities - like pre-standard snprintf - may be
- # spuriously enabled.
- # Long term, -std=c++0x could be even better, could manage to explicitly
- # request C99 facilities to the underlying C headers.
- ac_save_CXXFLAGS="$CXXFLAGS"
- CXXFLAGS="$CXXFLAGS -std=c++98"
- ac_save_LIBS="$LIBS"
- ac_save_gcc_no_link="$gcc_no_link"
+ # Check for the existence of <math.h> functions used if C99 is enabled.
+ AC_MSG_CHECKING([for ISO C99 support in <math.h> for C++98])
+ AC_CACHE_VAL(glibcxx_cv_c99_math_cxx98, [
+ GCC_TRY_COMPILE_OR_LINK(
+ [#include <math.h>
+ volatile double d1, d2;
+ volatile int i;],
+ [i = fpclassify(d1);
+ i = isfinite(d1);
+ i = isinf(d1);
+ i = isnan(d1);
+ i = isnormal(d1);
+ i = signbit(d1);
+ i = isgreater(d1, d2);
+ i = isgreaterequal(d1, d2);
+ i = isless(d1, d2);
+ i = islessequal(d1, d2);
+ i = islessgreater(d1, d2);
+ i = islessgreater(d1, d2);
+ i = isunordered(d1, d2);
+ ], [glibcxx_cv_c99_math_cxx98=yes], [glibcxx_cv_c99_math_cxx98=no])
+ ])
+ AC_MSG_RESULT($glibcxx_cv_c99_math_cxx98)
+ if test x"$glibcxx_cv_c99_math_cxx98" = x"yes"; then
+ AC_DEFINE(_GLIBCXX98_USE_C99_MATH, 1,
+ [Define if C99 functions or macros in <math.h> should be imported
+ in <cmath> in namespace std for C++98.])
+ fi
- if test x$gcc_no_link != xyes; then
- # Use -fno-exceptions to that the C driver can link these tests without
- # hitting undefined references to personality routines.
- CXXFLAGS="$CXXFLAGS -fno-exceptions"
- AC_CHECK_LIB(m, sin, [
- LIBS="$LIBS -lm"
- ], [
- # Use the default compile-only tests in GCC_TRY_COMPILE_OR_LINK
- gcc_no_link=yes
+ # Check for the existence of <complex.h> complex math functions.
+ # This is necessary even though libstdc++ uses the builtin versions
+ # of these functions, because if the builtin cannot be used, a reference
+ # to the library function is emitted.
+ AC_CHECK_HEADERS(tgmath.h, ac_has_tgmath_h=yes, ac_has_tgmath_h=no)
+ AC_CHECK_HEADERS(complex.h, ac_has_complex_h=yes, ac_has_complex_h=no)
+ if test x"$ac_has_complex_h" = x"yes"; then
+ AC_MSG_CHECKING([for ISO C99 support in <complex.h> for C++98])
+ AC_CACHE_VAL(glibcxx_cv_c99_complex_cxx98, [
+ GCC_TRY_COMPILE_OR_LINK(
+ [#include <complex.h>
+ typedef __complex__ float float_type;
+ typedef __complex__ double double_type;
+ typedef __complex__ long double ld_type;
+ volatile float_type tmpf;
+ volatile double_type tmpd;
+ volatile ld_type tmpld;
+ volatile float f;
+ volatile double d;
+ volatile long double ld;],
+ [f = cabsf(tmpf);
+ f = cargf(tmpf);
+ tmpf = ccosf(tmpf);
+ tmpf = ccoshf(tmpf);
+ tmpf = cexpf(tmpf);
+ tmpf = clogf(tmpf);
+ tmpf = csinf(tmpf);
+ tmpf = csinhf(tmpf);
+ tmpf = csqrtf(tmpf);
+ tmpf = ctanf(tmpf);
+ tmpf = ctanhf(tmpf);
+ tmpf = cpowf(tmpf, tmpf);
+ tmpf = cprojf(tmpf);
+ d = cabs(tmpd);
+ d = carg(tmpd);
+ tmpd = ccos(tmpd);
+ tmpd = ccosh(tmpd);
+ tmpd = cexp(tmpd);
+ tmpd = clog(tmpd);
+ tmpd = csin(tmpd);
+ tmpd = csinh(tmpd);
+ tmpd = csqrt(tmpd);
+ tmpd = ctan(tmpd);
+ tmpd = ctanh(tmpd);
+ tmpd = cpow(tmpd, tmpd);
+ tmpd = cproj(tmpd);
+ ld = cabsl(tmpld);
+ ld = cargl(tmpld);
+ tmpld = ccosl(tmpld);
+ tmpld = ccoshl(tmpld);
+ tmpld = cexpl(tmpld);
+ tmpld = clogl(tmpld);
+ tmpld = csinl(tmpld);
+ tmpld = csinhl(tmpld);
+ tmpld = csqrtl(tmpld);
+ tmpld = ctanl(tmpld);
+ tmpld = ctanhl(tmpld);
+ tmpld = cpowl(tmpld, tmpld);
+ tmpld = cprojl(tmpld);
+ ], [glibcxx_cv_c99_complex_cxx98=yes], [glibcxx_cv_c99_complex_cxx98=no])
+ ])
+ fi
+ AC_MSG_RESULT($glibcxx_cv_c99_complex_cxx98)
+ if test x"$glibcxx_cv_c99_complex_cxx98" = x"yes"; then
+ AC_DEFINE(_GLIBCXX98_USE_C99_COMPLEX, 1,
+ [Define if C99 functions in <complex.h> should be used in
+ <complex> for C++98. Using compiler builtins for these functions
+ requires corresponding C99 library functions to be present.])
+ fi
+
+ # Check for the existence in <stdio.h> of vscanf, et. al.
+ AC_MSG_CHECKING([for ISO C99 support in <stdio.h> for C++98])
+ AC_CACHE_VAL(glibcxx_cv_c99_stdio_cxx98, [
+ GCC_TRY_COMPILE_OR_LINK(
+ [#include <stdio.h>
+ #include <stdarg.h>
+ void foo(char* fmt, ...)
+ {
+ va_list args; va_start(args, fmt);
+ vfscanf(stderr, "%i", args);
+ vscanf("%i", args);
+ vsnprintf(fmt, 0, "%i", args);
+ vsscanf(fmt, "%i", args);
+ snprintf(fmt, 0, "%i");
+ }], [],
+ [glibcxx_cv_c99_stdio_cxx98=yes], [glibcxx_cv_c99_stdio_cxx98=no])
])
- fi
+ AC_MSG_RESULT($glibcxx_cv_c99_stdio_cxx98)
+ if test x"$glibcxx_cv_c99_stdio_cxx98" = x"yes"; then
+ AC_DEFINE(_GLIBCXX98_USE_C99_STDIO, 1,
+ [Define if C99 functions or macros in <stdio.h> should be imported
+ in <cstdio> in namespace std for C++98.])
+ fi
- # Check for the existence of <math.h> functions used if C99 is enabled.
- AC_MSG_CHECKING([for ISO C99 support in <math.h>])
- AC_CACHE_VAL(glibcxx_cv_c99_math, [
- GCC_TRY_COMPILE_OR_LINK(
- [#include <math.h>
- volatile double d1, d2;
- volatile int i;],
- [i = fpclassify(d1);
- i = isfinite(d1);
- i = isinf(d1);
- i = isnan(d1);
- i = isnormal(d1);
- i = signbit(d1);
- i = isgreater(d1, d2);
- i = isgreaterequal(d1, d2);
- i = isless(d1, d2);
- i = islessequal(d1, d2);
- i = islessgreater(d1, d2);
- i = islessgreater(d1, d2);
- i = isunordered(d1, d2);
- ],[glibcxx_cv_c99_math=yes], [glibcxx_cv_c99_math=no])
- ])
- AC_MSG_RESULT($glibcxx_cv_c99_math)
- if test x"$glibcxx_cv_c99_math" = x"yes"; then
- AC_DEFINE(_GLIBCXX_USE_C99_MATH, 1,
- [Define if C99 functions or macros in <math.h> should be imported
- in <cmath> in namespace std.])
- fi
+ # Check for the existence in <wchar.h> of wcstold, etc.
+ if test x"$ac_has_wchar_h" = xyes &&
+ test x"$ac_has_wctype_h" = xyes; then
+ AC_MSG_CHECKING([for ISO C99 support in <wchar.h> for C++98])
+ AC_CACHE_VAL(glibcxx_cv_c99_wchar_cxx98, [
+ AC_TRY_COMPILE([#include <wchar.h>
+ namespace test
+ {
+ using ::wcstold;
+ using ::wcstoll;
+ using ::wcstoull;
+ }
+ ], [], [glibcxx_cv_c99_wchar_cxx98=yes], [glibcxx_cv_c99_wchar_cxx98=no])
+ ])
- # Check for the existence of <complex.h> complex math functions.
- # This is necessary even though libstdc++ uses the builtin versions
- # of these functions, because if the builtin cannot be used, a reference
- # to the library function is emitted.
- AC_CHECK_HEADERS(tgmath.h, ac_has_tgmath_h=yes, ac_has_tgmath_h=no)
- AC_CHECK_HEADERS(complex.h, ac_has_complex_h=yes, ac_has_complex_h=no)
- glibcxx_cv_c99_complex=no;
- if test x"$ac_has_complex_h" = x"yes"; then
- AC_MSG_CHECKING([for ISO C99 support in <complex.h>])
- GCC_TRY_COMPILE_OR_LINK(
- [#include <complex.h>
- typedef __complex__ float float_type;
- typedef __complex__ double double_type;
- typedef __complex__ long double ld_type;
- volatile float_type tmpf;
- volatile double_type tmpd;
- volatile ld_type tmpld;
- volatile float f;
- volatile double d;
- volatile long double ld;],
- [f = cabsf(tmpf);
- f = cargf(tmpf);
- tmpf = ccosf(tmpf);
- tmpf = ccoshf(tmpf);
- tmpf = cexpf(tmpf);
- tmpf = clogf(tmpf);
- tmpf = csinf(tmpf);
- tmpf = csinhf(tmpf);
- tmpf = csqrtf(tmpf);
- tmpf = ctanf(tmpf);
- tmpf = ctanhf(tmpf);
- tmpf = cpowf(tmpf, tmpf);
- tmpf = cprojf(tmpf);
- d = cabs(tmpd);
- d = carg(tmpd);
- tmpd = ccos(tmpd);
- tmpd = ccosh(tmpd);
- tmpd = cexp(tmpd);
- tmpd = clog(tmpd);
- tmpd = csin(tmpd);
- tmpd = csinh(tmpd);
- tmpd = csqrt(tmpd);
- tmpd = ctan(tmpd);
- tmpd = ctanh(tmpd);
- tmpd = cpow(tmpd, tmpd);
- tmpd = cproj(tmpd);
- ld = cabsl(tmpld);
- ld = cargl(tmpld);
- tmpld = ccosl(tmpld);
- tmpld = ccoshl(tmpld);
- tmpld = cexpl(tmpld);
- tmpld = clogl(tmpld);
- tmpld = csinl(tmpld);
- tmpld = csinhl(tmpld);
- tmpld = csqrtl(tmpld);
- tmpld = ctanl(tmpld);
- tmpld = ctanhl(tmpld);
- tmpld = cpowl(tmpld, tmpld);
- tmpld = cprojl(tmpld);
- ],[glibcxx_cv_c99_complex=yes], [glibcxx_cv_c99_complex=no])
- fi
- AC_MSG_RESULT($glibcxx_cv_c99_complex)
- if test x"$glibcxx_cv_c99_complex" = x"yes"; then
- AC_DEFINE(_GLIBCXX_USE_C99_COMPLEX, 1,
- [Define if C99 functions in <complex.h> should be used in
- <complex>. Using compiler builtins for these functions requires
- corresponding C99 library functions to be present.])
- fi
-
- # Check for the existence in <stdio.h> of vscanf, et. al.
- AC_MSG_CHECKING([for ISO C99 support in <stdio.h>])
- AC_CACHE_VAL(glibcxx_cv_c99_stdio, [
- GCC_TRY_COMPILE_OR_LINK(
- [#include <stdio.h>
- #include <stdarg.h>
- void foo(char* fmt, ...)
- {
- va_list args; va_start(args, fmt);
- vfscanf(stderr, "%i", args);
- vscanf("%i", args);
- vsnprintf(fmt, 0, "%i", args);
- vsscanf(fmt, "%i", args);
- snprintf(fmt, 0, "%i");
- }], [],
- [glibcxx_cv_c99_stdio=yes], [glibcxx_cv_c99_stdio=no])
- ])
- AC_MSG_RESULT($glibcxx_cv_c99_stdio)
-
- # Check for the existence in <stdlib.h> of lldiv_t, et. al.
- AC_MSG_CHECKING([for ISO C99 support in <stdlib.h>])
- AC_CACHE_VAL(glibcxx_cv_c99_stdlib, [
- GCC_TRY_COMPILE_OR_LINK(
- [#include <stdlib.h>
- volatile float f;
- volatile long double ld;
- volatile unsigned long long ll;
- lldiv_t mydivt;],
- [char* tmp;
- f = strtof("gnu", &tmp);
- ld = strtold("gnu", &tmp);
- ll = strtoll("gnu", &tmp, 10);
- ll = strtoull("gnu", &tmp, 10);
- ll = llabs(10);
- mydivt = lldiv(10,1);
- ll = mydivt.quot;
- ll = mydivt.rem;
- ll = atoll("10");
- _Exit(0);
- ],[glibcxx_cv_c99_stdlib=yes], [glibcxx_cv_c99_stdlib=no])
- ])
- AC_MSG_RESULT($glibcxx_cv_c99_stdlib)
-
- # Check for the existence in <wchar.h> of wcstold, etc.
- glibcxx_cv_c99_wchar=no;
- if test x"$ac_has_wchar_h" = xyes &&
- test x"$ac_has_wctype_h" = xyes; then
- AC_MSG_CHECKING([for ISO C99 support in <wchar.h>])
- AC_TRY_COMPILE([#include <wchar.h>
- namespace test
- {
- using ::wcstold;
- using ::wcstoll;
- using ::wcstoull;
- }
- ],[],[glibcxx_cv_c99_wchar=yes], [glibcxx_cv_c99_wchar=no])
-
- # Checks for wide character functions that may not be present.
- # Injection of these is wrapped with guard macros.
- # NB: only put functions here, instead of immediately above, if
- # absolutely necessary.
- AC_TRY_COMPILE([#include <wchar.h>
- namespace test { using ::vfwscanf; } ], [],
- [AC_DEFINE(HAVE_VFWSCANF,1,
- [Defined if vfwscanf exists.])],[])
-
- AC_TRY_COMPILE([#include <wchar.h>
- namespace test { using ::vswscanf; } ], [],
- [AC_DEFINE(HAVE_VSWSCANF,1,
- [Defined if vswscanf exists.])],[])
-
- AC_TRY_COMPILE([#include <wchar.h>
- namespace test { using ::vwscanf; } ], [],
- [AC_DEFINE(HAVE_VWSCANF,1,[Defined if vwscanf exists.])],[])
-
- AC_TRY_COMPILE([#include <wchar.h>
- namespace test { using ::wcstof; } ], [],
- [AC_DEFINE(HAVE_WCSTOF,1,[Defined if wcstof exists.])],[])
-
- AC_TRY_COMPILE([#include <wctype.h>],
- [ wint_t t; int i = iswblank(t);],
- [AC_DEFINE(HAVE_ISWBLANK,1,
- [Defined if iswblank exists.])],[])
-
- AC_MSG_RESULT($glibcxx_cv_c99_wchar)
- fi
-
- # Option parsed, now set things appropriately.
- if test x"$glibcxx_cv_c99_math" = x"no" ||
- test x"$glibcxx_cv_c99_complex" = x"no" ||
- test x"$glibcxx_cv_c99_stdio" = x"no" ||
- test x"$glibcxx_cv_c99_stdlib" = x"no" ||
- test x"$glibcxx_cv_c99_wchar" = x"no"; then
- enable_c99=no;
- else
- AC_DEFINE(_GLIBCXX_USE_C99, 1,
- [Define if C99 functions or macros from <wchar.h>, <math.h>,
- <complex.h>, <stdio.h>, and <stdlib.h> can be used or exposed.])
- fi
+ # Checks for wide character functions that may not be present.
+ # Injection of these is wrapped with guard macros.
+ # NB: only put functions here, instead of immediately above, if
+ # absolutely necessary.
+ AC_TRY_COMPILE([#include <wchar.h>
+ namespace test { using ::vfwscanf; }], [],
+ [AC_DEFINE(HAVE_VFWSCANF, 1, [Defined if vfwscanf exists.])], [])
- gcc_no_link="$ac_save_gcc_no_link"
- LIBS="$ac_save_LIBS"
- CXXFLAGS="$ac_save_CXXFLAGS"
- AC_LANG_RESTORE
+ AC_TRY_COMPILE([#include <wchar.h>
+ namespace test { using ::vswscanf; }], [],
+ [AC_DEFINE(HAVE_VSWSCANF, 1, [Defined if vswscanf exists.])], [])
+
+ AC_TRY_COMPILE([#include <wchar.h>
+ namespace test { using ::vwscanf; }], [],
+ [AC_DEFINE(HAVE_VWSCANF, 1, [Defined if vwscanf exists.])], [])
+
+ AC_TRY_COMPILE([#include <wchar.h>
+ namespace test { using ::wcstof; }], [],
+ [AC_DEFINE(HAVE_WCSTOF, 1, [Defined if wcstof exists.])], [])
+
+ AC_TRY_COMPILE([#include <wctype.h>],
+ [wint_t t; int i = iswblank(t);],
+ [AC_DEFINE(HAVE_ISWBLANK, 1, [Defined if iswblank exists.])], [])
+
+ AC_MSG_RESULT($glibcxx_cv_c99_wchar_cxx98)
+ if test x"$glibcxx_cv_c99_wchar_cxx98" = x"yes"; then
+ AC_DEFINE(_GLIBCXX98_USE_C99_WCHAR, 1,
+ [Define if C99 functions or macros in <wchar.h> should be imported
+ in <cwchar> in namespace std for C++98.])
+ fi
+ fi
+
+ # Option parsed, now set things appropriately.
+ if test x"$glibcxx_cv_c99_math_cxx98" = x"no" ||
+ test x"$glibcxx_cv_c99_complex_cxx98" = x"no" ||
+ test x"$glibcxx_cv_c99_stdio_cxx98" = x"no" ||
+ test x"$glibcxx_cv_c99_stdlib_cxx98" = x"no" ||
+ test x"$glibcxx_cv_c99_wchar_cxx98" = x"no"; then
+ enable_c99=no;
+ else
+ AC_DEFINE(_GLIBCXX_USE_C99, 1,
+ [Define if C99 functions or macros from <wchar.h>, <math.h>,
+ <complex.h>, <stdio.h>, and <stdlib.h> can be used or exposed.])
+ fi
+
+ gcc_no_link="$ac_save_gcc_no_link"
+ LIBS="$ac_save_LIBS"
+ CXXFLAGS="$ac_save_CXXFLAGS"
+ AC_LANG_RESTORE
+
+ AC_LANG_SAVE
+ AC_LANG_CPLUSPLUS
+
+ # Use -std=c++11 and test again for C99 library feature in C++11 mode.
+ # For the reasons given above we use -std=c++11 not -std=gnu++11.
+ ac_save_CXXFLAGS="$CXXFLAGS"
+ CXXFLAGS="$CXXFLAGS -std=c++11"
+ ac_save_LIBS="$LIBS"
+ ac_save_gcc_no_link="$gcc_no_link"
+
+ if test x$gcc_no_link != xyes; then
+ # Use -fno-exceptions to that the C driver can link these tests without
+ # hitting undefined references to personality routines.
+ CXXFLAGS="$CXXFLAGS -fno-exceptions"
+ AC_CHECK_LIB(m, sin, [LIBS="$LIBS -lm"], [
+ # Use the default compile-only tests in GCC_TRY_COMPILE_OR_LINK
+ gcc_no_link=yes
+ ])
+ fi
+
+ # Check for the existence of <math.h> functions used if C99 is enabled.
+ AC_MSG_CHECKING([for ISO C99 support in <math.h> for C++11])
+ AC_CACHE_VAL(glibcxx_cv_c99_math_cxx11, [
+ GCC_TRY_COMPILE_OR_LINK(
+ [#include <math.h>
+ volatile double d1, d2;
+ volatile int i;],
+ [i = fpclassify(d1);
+ i = isfinite(d1);
+ i = isinf(d1);
+ i = isnan(d1);
+ i = isnormal(d1);
+ i = signbit(d1);
+ i = isgreater(d1, d2);
+ i = isgreaterequal(d1, d2);
+ i = isless(d1, d2);
+ i = islessequal(d1, d2);
+ i = islessgreater(d1, d2);
+ i = islessgreater(d1, d2);
+ i = isunordered(d1, d2);
+ ], [glibcxx_cv_c99_math_cxx11=yes], [glibcxx_cv_c99_math_cxx11=no])
+ ])
+ AC_MSG_RESULT($glibcxx_cv_c99_math_cxx11)
+ if test x"$glibcxx_cv_c99_math_cxx11" = x"yes"; then
+ AC_DEFINE(_GLIBCXX11_USE_C99_MATH, 1,
+ [Define if C99 functions or macros in <math.h> should be imported
+ in <cmath> in namespace std for C++11.])
+ fi
+
+ # Check for the existence of <complex.h> complex math functions.
+ # This is necessary even though libstdc++ uses the builtin versions
+ # of these functions, because if the builtin cannot be used, a reference
+ # to the library function is emitted.
+ AC_CHECK_HEADERS(tgmath.h, ac_has_tgmath_h=yes, ac_has_tgmath_h=no)
+ AC_CHECK_HEADERS(complex.h, ac_has_complex_h=yes, ac_has_complex_h=no)
+ if test x"$ac_has_complex_h" = x"yes"; then
+ AC_MSG_CHECKING([for ISO C99 support in <complex.h> for C++11])
+ AC_CACHE_VAL(glibcxx_cv_c99_complex_cxx11, [
+ GCC_TRY_COMPILE_OR_LINK(
+ [#include <complex.h>
+ typedef __complex__ float float_type;
+ typedef __complex__ double double_type;
+ typedef __complex__ long double ld_type;
+ volatile float_type tmpf;
+ volatile double_type tmpd;
+ volatile ld_type tmpld;
+ volatile float f;
+ volatile double d;
+ volatile long double ld;],
+ [f = cabsf(tmpf);
+ f = cargf(tmpf);
+ tmpf = ccosf(tmpf);
+ tmpf = ccoshf(tmpf);
+ tmpf = cexpf(tmpf);
+ tmpf = clogf(tmpf);
+ tmpf = csinf(tmpf);
+ tmpf = csinhf(tmpf);
+ tmpf = csqrtf(tmpf);
+ tmpf = ctanf(tmpf);
+ tmpf = ctanhf(tmpf);
+ tmpf = cpowf(tmpf, tmpf);
+ tmpf = cprojf(tmpf);
+ d = cabs(tmpd);
+ d = carg(tmpd);
+ tmpd = ccos(tmpd);
+ tmpd = ccosh(tmpd);
+ tmpd = cexp(tmpd);
+ tmpd = clog(tmpd);
+ tmpd = csin(tmpd);
+ tmpd = csinh(tmpd);
+ tmpd = csqrt(tmpd);
+ tmpd = ctan(tmpd);
+ tmpd = ctanh(tmpd);
+ tmpd = cpow(tmpd, tmpd);
+ tmpd = cproj(tmpd);
+ ld = cabsl(tmpld);
+ ld = cargl(tmpld);
+ tmpld = ccosl(tmpld);
+ tmpld = ccoshl(tmpld);
+ tmpld = cexpl(tmpld);
+ tmpld = clogl(tmpld);
+ tmpld = csinl(tmpld);
+ tmpld = csinhl(tmpld);
+ tmpld = csqrtl(tmpld);
+ tmpld = ctanl(tmpld);
+ tmpld = ctanhl(tmpld);
+ tmpld = cpowl(tmpld, tmpld);
+ tmpld = cprojl(tmpld);
+ ], [glibcxx_cv_c99_complex_cxx11=yes], [glibcxx_cv_c99_complex_cxx11=no])
+ ])
+ fi
+ AC_MSG_RESULT($glibcxx_cv_c99_complex_cxx11)
+ if test x"$glibcxx_cv_c99_complex_cxx11" = x"yes"; then
+ AC_DEFINE(_GLIBCXX11_USE_C99_COMPLEX, 1,
+ [Define if C99 functions in <complex.h> should be used in
+ <complex> for C++11. Using compiler builtins for these functions
+ requires corresponding C99 library functions to be present.])
+ fi
+
+ # Check for the existence in <stdio.h> of vscanf, et. al.
+ AC_MSG_CHECKING([for ISO C99 support in <stdio.h> for C++11])
+ AC_CACHE_VAL(glibcxx_cv_c99_stdio_cxx11, [
+ GCC_TRY_COMPILE_OR_LINK(
+ [#include <stdio.h>
+ #include <stdarg.h>
+ void foo(char* fmt, ...)
+ {
+ va_list args; va_start(args, fmt);
+ vfscanf(stderr, "%i", args);
+ vscanf("%i", args);
+ vsnprintf(fmt, 0, "%i", args);
+ vsscanf(fmt, "%i", args);
+ snprintf(fmt, 0, "%i");
+ }], [],
+ [glibcxx_cv_c99_stdio_cxx11=yes], [glibcxx_cv_c99_stdio_cxx11=no])
+ ])
+ AC_MSG_RESULT($glibcxx_cv_c99_stdio_cxx11)
+ if test x"$glibcxx_cv_c99_stdio_cxx11" = x"yes"; then
+ AC_DEFINE(_GLIBCXX11_USE_C99_STDIO, 1,
+ [Define if C99 functions or macros in <stdio.h> should be imported
+ in <cstdio> in namespace std for C++11.])
+ fi
+
+ # Check for the existence in <stdlib.h> of lldiv_t, et. al.
+ AC_MSG_CHECKING([for ISO C99 support in <stdlib.h> for C++11])
+ AC_CACHE_VAL(glibcxx_cv_c99_stdlib_cxx11, [
+ GCC_TRY_COMPILE_OR_LINK(
+ [#include <stdlib.h>
+ volatile float f;
+ volatile long double ld;
+ volatile unsigned long long ll;
+ lldiv_t mydivt;],
+ [char* tmp;
+ f = strtof("gnu", &tmp);
+ ld = strtold("gnu", &tmp);
+ ll = strtoll("gnu", &tmp, 10);
+ ll = strtoull("gnu", &tmp, 10);
+ ll = llabs(10);
+ mydivt = lldiv(10,1);
+ ll = mydivt.quot;
+ ll = mydivt.rem;
+ ll = atoll("10");
+ _Exit(0);
+ ], [glibcxx_cv_c99_stdlib_cxx11=yes], [glibcxx_cv_c99_stdlib_cxx11=no])
+ ])
+ AC_MSG_RESULT($glibcxx_cv_c99_stdlib_cxx11)
+ if test x"$glibcxx_cv_c99_stdlib_cxx11" = x"yes"; then
+ AC_DEFINE(_GLIBCXX11_USE_C99_STDLIB, 1,
+ [Define if C99 functions or macros in <stdlib.h> should be imported
+ in <cstdlib> in namespace std for C++11.])
+ fi
+
+ # Check for the existence in <wchar.h> of wcstold, etc.
+ if test x"$ac_has_wchar_h" = xyes &&
+ test x"$ac_has_wctype_h" = xyes; then
+ AC_MSG_CHECKING([for ISO C99 support in <wchar.h> for C++11])
+ AC_CACHE_VAL(glibcxx_cv_c99_wchar_cxx11, [
+ AC_TRY_COMPILE([#include <wchar.h>
+ namespace test
+ {
+ using ::wcstold;
+ using ::wcstoll;
+ using ::wcstoull;
+ }
+ ], [], [glibcxx_cv_c99_wchar_cxx11=yes], [glibcxx_cv_c99_wchar_cxx11=no])
+ ])
+
+ # Checks for wide character functions that may not be present.
+ # Injection of these is wrapped with guard macros.
+ # NB: only put functions here, instead of immediately above, if
+ # absolutely necessary.
+ AC_TRY_COMPILE([#include <wchar.h>
+ namespace test { using ::vfwscanf; }], [],
+ [AC_DEFINE(HAVE_VFWSCANF, 1, [Defined if vfwscanf exists.])], [])
+
+ AC_TRY_COMPILE([#include <wchar.h>
+ namespace test { using ::vswscanf; }], [],
+ [AC_DEFINE(HAVE_VSWSCANF, 1, [Defined if vswscanf exists.])], [])
+
+ AC_TRY_COMPILE([#include <wchar.h>
+ namespace test { using ::vwscanf; }], [],
+ [AC_DEFINE(HAVE_VWSCANF, 1, [Defined if vwscanf exists.])], [])
+
+ AC_TRY_COMPILE([#include <wchar.h>
+ namespace test { using ::wcstof; }], [],
+ [AC_DEFINE(HAVE_WCSTOF, 1, [Defined if wcstof exists.])], [])
+
+ AC_TRY_COMPILE([#include <wctype.h>],
+ [wint_t t; int i = iswblank(t);],
+ [AC_DEFINE(HAVE_ISWBLANK, 1, [Defined if iswblank exists.])], [])
+
+ AC_MSG_RESULT($glibcxx_cv_c99_wchar_cxx11)
+ if test x"$glibcxx_cv_c99_wchar_cxx11" = x"yes"; then
+ AC_DEFINE(_GLIBCXX11_USE_C99_WCHAR, 1,
+ [Define if C99 functions or macros in <wchar.h> should be imported
+ in <cwchar> in namespace std for C++11.])
+ fi
+ fi
+
+ gcc_no_link="$ac_save_gcc_no_link"
+ LIBS="$ac_save_LIBS"
+ CXXFLAGS="$ac_save_CXXFLAGS"
+ AC_LANG_RESTORE
fi
AC_MSG_CHECKING([for fully enabled ISO C99 support])
diff --git a/libstdc++-v3/config.h.in b/libstdc++-v3/config.h.in
index 8ae1c5bfe69..f58b2f4e94e 100644
--- a/libstdc++-v3/config.h.in
+++ b/libstdc++-v3/config.h.in
@@ -731,6 +731,44 @@
/* Version number of package */
#undef VERSION
+/* Define if C99 functions in <complex.h> should be used in <complex> for
+ C++11. Using compiler builtins for these functions requires corresponding
+ C99 library functions to be present. */
+#undef _GLIBCXX11_USE_C99_COMPLEX
+
+/* Define if C99 functions or macros in <math.h> should be imported in <cmath>
+ in namespace std for C++11. */
+#undef _GLIBCXX11_USE_C99_MATH
+
+/* Define if C99 functions or macros in <stdio.h> should be imported in
+ <cstdio> in namespace std for C++11. */
+#undef _GLIBCXX11_USE_C99_STDIO
+
+/* Define if C99 functions or macros in <stdlib.h> should be imported in
+ <cstdlib> in namespace std for C++11. */
+#undef _GLIBCXX11_USE_C99_STDLIB
+
+/* Define if C99 functions or macros in <wchar.h> should be imported in
+ <cwchar> in namespace std for C++11. */
+#undef _GLIBCXX11_USE_C99_WCHAR
+
+/* Define if C99 functions in <complex.h> should be used in <complex> for
+ C++98. Using compiler builtins for these functions requires corresponding
+ C99 library functions to be present. */
+#undef _GLIBCXX98_USE_C99_COMPLEX
+
+/* Define if C99 functions or macros in <math.h> should be imported in <cmath>
+ in namespace std for C++98. */
+#undef _GLIBCXX98_USE_C99_MATH
+
+/* Define if C99 functions or macros in <stdio.h> should be imported in
+ <cstdio> in namespace std for C++98. */
+#undef _GLIBCXX98_USE_C99_STDIO
+
+/* Define if C99 functions or macros in <wchar.h> should be imported in
+ <cwchar> in namespace std for C++98. */
+#undef _GLIBCXX98_USE_C99_WCHAR
+
/* Define if the compiler supports C++11 atomics. */
#undef _GLIBCXX_ATOMIC_BUILTINS
@@ -791,11 +829,6 @@
<stdio.h>, and <stdlib.h> can be used or exposed. */
#undef _GLIBCXX_USE_C99
-/* Define if C99 functions in <complex.h> should be used in <complex>. Using
- compiler builtins for these functions requires corresponding C99 library
- functions to be present. */
-#undef _GLIBCXX_USE_C99_COMPLEX
-
/* Define if C99 functions in <complex.h> should be used in <tr1/complex>.
Using compiler builtins for these functions requires corresponding C99
library functions to be present. */
@@ -817,10 +850,6 @@
<tr1/cinttypes> in namespace std::tr1. */
#undef _GLIBCXX_USE_C99_INTTYPES_WCHAR_T_TR1
-/* Define if C99 functions or macros in <math.h> should be imported in <cmath>
- in namespace std. */
-#undef _GLIBCXX_USE_C99_MATH
-
/* Define if C99 functions or macros in <math.h> should be imported in
<tr1/cmath> in namespace std::tr1. */
#undef _GLIBCXX_USE_C99_MATH_TR1
diff --git a/libstdc++-v3/config/locale/dragonfly/c_locale.h b/libstdc++-v3/config/locale/dragonfly/c_locale.h
index 5c17cfe10c3..867a4042cf9 100644
--- a/libstdc++-v3/config/locale/dragonfly/c_locale.h
+++ b/libstdc++-v3/config/locale/dragonfly/c_locale.h
@@ -64,7 +64,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
__builtin_va_list __args;
__builtin_va_start(__args, __fmt);
-#ifdef _GLIBCXX_USE_C99
+#if _GLIBCXX_USE_C99_STDIO
const int __ret = __builtin_vsnprintf(__out, __size, __fmt, __args);
#else
const int __ret = __builtin_vsprintf(__out, __fmt, __args);
diff --git a/libstdc++-v3/config/locale/generic/c_locale.h b/libstdc++-v3/config/locale/generic/c_locale.h
index ee3ef8698b2..fa7629f9b4a 100644
--- a/libstdc++-v3/config/locale/generic/c_locale.h
+++ b/libstdc++-v3/config/locale/generic/c_locale.h
@@ -70,7 +70,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
__builtin_va_list __args;
__builtin_va_start(__args, __fmt);
-#ifdef _GLIBCXX_USE_C99
+#if _GLIBCXX_USE_C99_STDIO
const int __ret = __builtin_vsnprintf(__out, __size, __fmt, __args);
#else
const int __ret = __builtin_vsprintf(__out, __fmt, __args);
diff --git a/libstdc++-v3/config/locale/gnu/c_locale.h b/libstdc++-v3/config/locale/gnu/c_locale.h
index a1dc3d2913b..f8ddfebb544 100644
--- a/libstdc++-v3/config/locale/gnu/c_locale.h
+++ b/libstdc++-v3/config/locale/gnu/c_locale.h
@@ -88,7 +88,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
__builtin_va_list __args;
__builtin_va_start(__args, __fmt);
-#ifdef _GLIBCXX_USE_C99
+#if _GLIBCXX_USE_C99_STDIO
const int __ret = __builtin_vsnprintf(__out, __size, __fmt, __args);
#else
const int __ret = __builtin_vsprintf(__out, __fmt, __args);
diff --git a/libstdc++-v3/config/os/bsd/dragonfly/os_defines.h b/libstdc++-v3/config/os/bsd/dragonfly/os_defines.h
index 2209129145a..055c5b657b0 100644
--- a/libstdc++-v3/config/os/bsd/dragonfly/os_defines.h
+++ b/libstdc++-v3/config/os/bsd/dragonfly/os_defines.h
@@ -30,6 +30,9 @@
// file will come before all others.
#define _GLIBCXX_USE_C99 1
+#define _GLIBCXX_USE_C99_STDIO 1
+#define _GLIBCXX_USE_C99_STDLIB 1
+#define _GLIBCXX_USE_C99_WCHAR 1
#define _GLIBCXX_USE_C99_CHECK 1
#define _GLIBCXX_USE_C99_DYNAMIC (!(__ISO_C_VISIBLE >= 1999))
#define _GLIBCXX_USE_C99_LONG_LONG_CHECK 1
diff --git a/libstdc++-v3/configure b/libstdc++-v3/configure
index 1eb6db4ec4c..991818b3707 100755
--- a/libstdc++-v3/configure
+++ b/libstdc++-v3/configure
@@ -16542,29 +16542,26 @@ fi
if test x"$enable_c99" = x"yes"; then
-
- ac_ext=cpp
+ ac_ext=cpp
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
- # Use -std=c++98 because the default (-std=gnu++98) leaves __STRICT_ANSI__
- # undefined and fake C99 facilities - like pre-standard snprintf - may be
- # spuriously enabled.
- # Long term, -std=c++0x could be even better, could manage to explicitly
- # request C99 facilities to the underlying C headers.
- ac_save_CXXFLAGS="$CXXFLAGS"
- CXXFLAGS="$CXXFLAGS -std=c++98"
- ac_save_LIBS="$LIBS"
- ac_save_gcc_no_link="$gcc_no_link"
+ # Use -std=c++98 (instead of -std=gnu++98) because leaving __STRICT_ANSI__
+ # undefined may cause fake C99 facilities, like pre-standard snprintf,
+ # to be spuriously enabled.
+ ac_save_CXXFLAGS="$CXXFLAGS"
+ CXXFLAGS="$CXXFLAGS -std=c++98"
+ ac_save_LIBS="$LIBS"
+ ac_save_gcc_no_link="$gcc_no_link"
- if test x$gcc_no_link != xyes; then
- # Use -fno-exceptions to that the C driver can link these tests without
- # hitting undefined references to personality routines.
- CXXFLAGS="$CXXFLAGS -fno-exceptions"
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sin in -lm" >&5
+ if test x$gcc_no_link != xyes; then
+ # Use -fno-exceptions to that the C driver can link these tests without
+ # hitting undefined references to personality routines.
+ CXXFLAGS="$CXXFLAGS -fno-exceptions"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sin in -lm" >&5
$as_echo_n "checking for sin in -lm... " >&6; }
if test "${ac_cv_lib_m_sin+set}" = set; then :
$as_echo_n "(cached) " >&6
@@ -16604,56 +16601,646 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_sin" >&5
$as_echo "$ac_cv_lib_m_sin" >&6; }
if test "x$ac_cv_lib_m_sin" = x""yes; then :
+ LIBS="$LIBS -lm"
+else
+
+ # Use the default compile-only tests in GCC_TRY_COMPILE_OR_LINK
+ gcc_no_link=yes
- LIBS="$LIBS -lm"
+fi
+
+ fi
+ # Check for the existence of <math.h> functions used if C99 is enabled.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ISO C99 support in <math.h> for C++98" >&5
+$as_echo_n "checking for ISO C99 support in <math.h> for C++98... " >&6; }
+ if test "${glibcxx_cv_c99_math_cxx98+set}" = set; then :
+ $as_echo_n "(cached) " >&6
else
- # Use the default compile-only tests in GCC_TRY_COMPILE_OR_LINK
- gcc_no_link=yes
+ if test x$gcc_no_link = xyes; then
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <math.h>
+ volatile double d1, d2;
+ volatile int i;
+int
+main ()
+{
+i = fpclassify(d1);
+ i = isfinite(d1);
+ i = isinf(d1);
+ i = isnan(d1);
+ i = isnormal(d1);
+ i = signbit(d1);
+ i = isgreater(d1, d2);
+ i = isgreaterequal(d1, d2);
+ i = isless(d1, d2);
+ i = islessequal(d1, d2);
+ i = islessgreater(d1, d2);
+ i = islessgreater(d1, d2);
+ i = isunordered(d1, d2);
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+ glibcxx_cv_c99_math_cxx98=yes
+else
+ glibcxx_cv_c99_math_cxx98=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+else
+ if test x$gcc_no_link = xyes; then
+ as_fn_error "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5
+fi
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <math.h>
+ volatile double d1, d2;
+ volatile int i;
+int
+main ()
+{
+i = fpclassify(d1);
+ i = isfinite(d1);
+ i = isinf(d1);
+ i = isnan(d1);
+ i = isnormal(d1);
+ i = signbit(d1);
+ i = isgreater(d1, d2);
+ i = isgreaterequal(d1, d2);
+ i = isless(d1, d2);
+ i = islessequal(d1, d2);
+ i = islessgreater(d1, d2);
+ i = islessgreater(d1, d2);
+ i = isunordered(d1, d2);
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_link "$LINENO"; then :
+ glibcxx_cv_c99_math_cxx98=yes
+else
+ glibcxx_cv_c99_math_cxx98=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
fi
- fi
+fi
- # Check for the existence of <math.h> functions used if C99 is enabled.
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ISO C99 support in <math.h>" >&5
-$as_echo_n "checking for ISO C99 support in <math.h>... " >&6; }
- if test "${glibcxx_cv_c99_math+set}" = set; then :
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_c99_math_cxx98" >&5
+$as_echo "$glibcxx_cv_c99_math_cxx98" >&6; }
+ if test x"$glibcxx_cv_c99_math_cxx98" = x"yes"; then
+
+$as_echo "#define _GLIBCXX98_USE_C99_MATH 1" >>confdefs.h
+
+ fi
+
+ # Check for the existence of <complex.h> complex math functions.
+ # This is necessary even though libstdc++ uses the builtin versions
+ # of these functions, because if the builtin cannot be used, a reference
+ # to the library function is emitted.
+ for ac_header in tgmath.h
+do :
+ ac_fn_cxx_check_header_mongrel "$LINENO" "tgmath.h" "ac_cv_header_tgmath_h" "$ac_includes_default"
+if test "x$ac_cv_header_tgmath_h" = x""yes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_TGMATH_H 1
+_ACEOF
+ ac_has_tgmath_h=yes
+else
+ ac_has_tgmath_h=no
+fi
+
+done
+
+ for ac_header in complex.h
+do :
+ ac_fn_cxx_check_header_mongrel "$LINENO" "complex.h" "ac_cv_header_complex_h" "$ac_includes_default"
+if test "x$ac_cv_header_complex_h" = x""yes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_COMPLEX_H 1
+_ACEOF
+ ac_has_complex_h=yes
+else
+ ac_has_complex_h=no
+fi
+
+done
+
+ if test x"$ac_has_complex_h" = x"yes"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ISO C99 support in <complex.h> for C++98" >&5
+$as_echo_n "checking for ISO C99 support in <complex.h> for C++98... " >&6; }
+ if test "${glibcxx_cv_c99_complex_cxx98+set}" = set; then :
$as_echo_n "(cached) " >&6
else
+ if test x$gcc_no_link = xyes; then
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <complex.h>
+ typedef __complex__ float float_type;
+ typedef __complex__ double double_type;
+ typedef __complex__ long double ld_type;
+ volatile float_type tmpf;
+ volatile double_type tmpd;
+ volatile ld_type tmpld;
+ volatile float f;
+ volatile double d;
+ volatile long double ld;
+int
+main ()
+{
+f = cabsf(tmpf);
+ f = cargf(tmpf);
+ tmpf = ccosf(tmpf);
+ tmpf = ccoshf(tmpf);
+ tmpf = cexpf(tmpf);
+ tmpf = clogf(tmpf);
+ tmpf = csinf(tmpf);
+ tmpf = csinhf(tmpf);
+ tmpf = csqrtf(tmpf);
+ tmpf = ctanf(tmpf);
+ tmpf = ctanhf(tmpf);
+ tmpf = cpowf(tmpf, tmpf);
+ tmpf = cprojf(tmpf);
+ d = cabs(tmpd);
+ d = carg(tmpd);
+ tmpd = ccos(tmpd);
+ tmpd = ccosh(tmpd);
+ tmpd = cexp(tmpd);
+ tmpd = clog(tmpd);
+ tmpd = csin(tmpd);
+ tmpd = csinh(tmpd);
+ tmpd = csqrt(tmpd);
+ tmpd = ctan(tmpd);
+ tmpd = ctanh(tmpd);
+ tmpd = cpow(tmpd, tmpd);
+ tmpd = cproj(tmpd);
+ ld = cabsl(tmpld);
+ ld = cargl(tmpld);
+ tmpld = ccosl(tmpld);
+ tmpld = ccoshl(tmpld);
+ tmpld = cexpl(tmpld);
+ tmpld = clogl(tmpld);
+ tmpld = csinl(tmpld);
+ tmpld = csinhl(tmpld);
+ tmpld = csqrtl(tmpld);
+ tmpld = ctanl(tmpld);
+ tmpld = ctanhl(tmpld);
+ tmpld = cpowl(tmpld, tmpld);
+ tmpld = cprojl(tmpld);
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+ glibcxx_cv_c99_complex_cxx98=yes
+else
+ glibcxx_cv_c99_complex_cxx98=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+else
if test x$gcc_no_link = xyes; then
+ as_fn_error "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5
+fi
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <complex.h>
+ typedef __complex__ float float_type;
+ typedef __complex__ double double_type;
+ typedef __complex__ long double ld_type;
+ volatile float_type tmpf;
+ volatile double_type tmpd;
+ volatile ld_type tmpld;
+ volatile float f;
+ volatile double d;
+ volatile long double ld;
+int
+main ()
+{
+f = cabsf(tmpf);
+ f = cargf(tmpf);
+ tmpf = ccosf(tmpf);
+ tmpf = ccoshf(tmpf);
+ tmpf = cexpf(tmpf);
+ tmpf = clogf(tmpf);
+ tmpf = csinf(tmpf);
+ tmpf = csinhf(tmpf);
+ tmpf = csqrtf(tmpf);
+ tmpf = ctanf(tmpf);
+ tmpf = ctanhf(tmpf);
+ tmpf = cpowf(tmpf, tmpf);
+ tmpf = cprojf(tmpf);
+ d = cabs(tmpd);
+ d = carg(tmpd);
+ tmpd = ccos(tmpd);
+ tmpd = ccosh(tmpd);
+ tmpd = cexp(tmpd);
+ tmpd = clog(tmpd);
+ tmpd = csin(tmpd);
+ tmpd = csinh(tmpd);
+ tmpd = csqrt(tmpd);
+ tmpd = ctan(tmpd);
+ tmpd = ctanh(tmpd);
+ tmpd = cpow(tmpd, tmpd);
+ tmpd = cproj(tmpd);
+ ld = cabsl(tmpld);
+ ld = cargl(tmpld);
+ tmpld = ccosl(tmpld);
+ tmpld = ccoshl(tmpld);
+ tmpld = cexpl(tmpld);
+ tmpld = clogl(tmpld);
+ tmpld = csinl(tmpld);
+ tmpld = csinhl(tmpld);
+ tmpld = csqrtl(tmpld);
+ tmpld = ctanl(tmpld);
+ tmpld = ctanhl(tmpld);
+ tmpld = cpowl(tmpld, tmpld);
+ tmpld = cprojl(tmpld);
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_link "$LINENO"; then :
+ glibcxx_cv_c99_complex_cxx98=yes
+else
+ glibcxx_cv_c99_complex_cxx98=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+
+fi
+
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_c99_complex_cxx98" >&5
+$as_echo "$glibcxx_cv_c99_complex_cxx98" >&6; }
+ if test x"$glibcxx_cv_c99_complex_cxx98" = x"yes"; then
+
+$as_echo "#define _GLIBCXX98_USE_C99_COMPLEX 1" >>confdefs.h
+
+ fi
+
+ # Check for the existence in <stdio.h> of vscanf, et. al.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ISO C99 support in <stdio.h> for C++98" >&5
+$as_echo_n "checking for ISO C99 support in <stdio.h> for C++98... " >&6; }
+ if test "${glibcxx_cv_c99_stdio_cxx98+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ if test x$gcc_no_link = xyes; then
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <stdio.h>
+ #include <stdarg.h>
+ void foo(char* fmt, ...)
+ {
+ va_list args; va_start(args, fmt);
+ vfscanf(stderr, "%i", args);
+ vscanf("%i", args);
+ vsnprintf(fmt, 0, "%i", args);
+ vsscanf(fmt, "%i", args);
+ snprintf(fmt, 0, "%i");
+ }
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+ glibcxx_cv_c99_stdio_cxx98=yes
+else
+ glibcxx_cv_c99_stdio_cxx98=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+else
+ if test x$gcc_no_link = xyes; then
+ as_fn_error "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5
+fi
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <stdio.h>
+ #include <stdarg.h>
+ void foo(char* fmt, ...)
+ {
+ va_list args; va_start(args, fmt);
+ vfscanf(stderr, "%i", args);
+ vscanf("%i", args);
+ vsnprintf(fmt, 0, "%i", args);
+ vsscanf(fmt, "%i", args);
+ snprintf(fmt, 0, "%i");
+ }
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_link "$LINENO"; then :
+ glibcxx_cv_c99_stdio_cxx98=yes
+else
+ glibcxx_cv_c99_stdio_cxx98=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+
+fi
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_c99_stdio_cxx98" >&5
+$as_echo "$glibcxx_cv_c99_stdio_cxx98" >&6; }
+ if test x"$glibcxx_cv_c99_stdio_cxx98" = x"yes"; then
+
+$as_echo "#define _GLIBCXX98_USE_C99_STDIO 1" >>confdefs.h
+
+ fi
+
+ # Check for the existence in <wchar.h> of wcstold, etc.
+ if test x"$ac_has_wchar_h" = xyes &&
+ test x"$ac_has_wctype_h" = xyes; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ISO C99 support in <wchar.h> for C++98" >&5
+$as_echo_n "checking for ISO C99 support in <wchar.h> for C++98... " >&6; }
+ if test "${glibcxx_cv_c99_wchar_cxx98+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <wchar.h>
+ namespace test
+ {
+ using ::wcstold;
+ using ::wcstoll;
+ using ::wcstoull;
+ }
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+ glibcxx_cv_c99_wchar_cxx98=yes
+else
+ glibcxx_cv_c99_wchar_cxx98=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+fi
+
+
+ # Checks for wide character functions that may not be present.
+ # Injection of these is wrapped with guard macros.
+ # NB: only put functions here, instead of immediately above, if
+ # absolutely necessary.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <wchar.h>
+ namespace test { using ::vfwscanf; }
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+
+$as_echo "#define HAVE_VFWSCANF 1" >>confdefs.h
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <wchar.h>
+ namespace test { using ::vswscanf; }
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+
+$as_echo "#define HAVE_VSWSCANF 1" >>confdefs.h
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <wchar.h>
+ namespace test { using ::vwscanf; }
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+
+$as_echo "#define HAVE_VWSCANF 1" >>confdefs.h
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <wchar.h>
+ namespace test { using ::wcstof; }
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+
+$as_echo "#define HAVE_WCSTOF 1" >>confdefs.h
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <wctype.h>
+int
+main ()
+{
+wint_t t; int i = iswblank(t);
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+
+$as_echo "#define HAVE_ISWBLANK 1" >>confdefs.h
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_c99_wchar_cxx98" >&5
+$as_echo "$glibcxx_cv_c99_wchar_cxx98" >&6; }
+ if test x"$glibcxx_cv_c99_wchar_cxx98" = x"yes"; then
+
+$as_echo "#define _GLIBCXX98_USE_C99_WCHAR 1" >>confdefs.h
+
+ fi
+ fi
+
+ # Option parsed, now set things appropriately.
+ if test x"$glibcxx_cv_c99_math_cxx98" = x"no" ||
+ test x"$glibcxx_cv_c99_complex_cxx98" = x"no" ||
+ test x"$glibcxx_cv_c99_stdio_cxx98" = x"no" ||
+ test x"$glibcxx_cv_c99_stdlib_cxx98" = x"no" ||
+ test x"$glibcxx_cv_c99_wchar_cxx98" = x"no"; then
+ enable_c99=no;
+ else
+
+$as_echo "#define _GLIBCXX_USE_C99 1" >>confdefs.h
+
+ fi
+
+ gcc_no_link="$ac_save_gcc_no_link"
+ LIBS="$ac_save_LIBS"
+ CXXFLAGS="$ac_save_CXXFLAGS"
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+
+ ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+
+ # Use -std=c++11 and test again for C99 library feature in C++11 mode.
+ # For the reasons given above we use -std=c++11 not -std=gnu++11.
+ ac_save_CXXFLAGS="$CXXFLAGS"
+ CXXFLAGS="$CXXFLAGS -std=c++11"
+ ac_save_LIBS="$LIBS"
+ ac_save_gcc_no_link="$gcc_no_link"
+
+ if test x$gcc_no_link != xyes; then
+ # Use -fno-exceptions to that the C driver can link these tests without
+ # hitting undefined references to personality routines.
+ CXXFLAGS="$CXXFLAGS -fno-exceptions"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sin in -lm" >&5
+$as_echo_n "checking for sin in -lm... " >&6; }
+if test "${ac_cv_lib_m_sin+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lm $LIBS"
+if test x$gcc_no_link = xyes; then
+ as_fn_error "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5
+fi
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char sin ();
+int
+main ()
+{
+return sin ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_link "$LINENO"; then :
+ ac_cv_lib_m_sin=yes
+else
+ ac_cv_lib_m_sin=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_sin" >&5
+$as_echo "$ac_cv_lib_m_sin" >&6; }
+if test "x$ac_cv_lib_m_sin" = x""yes; then :
+ LIBS="$LIBS -lm"
+else
+
+ # Use the default compile-only tests in GCC_TRY_COMPILE_OR_LINK
+ gcc_no_link=yes
+
+fi
+
+ fi
+
+ # Check for the existence of <math.h> functions used if C99 is enabled.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ISO C99 support in <math.h> for C++11" >&5
+$as_echo_n "checking for ISO C99 support in <math.h> for C++11... " >&6; }
+ if test "${glibcxx_cv_c99_math_cxx11+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ if test x$gcc_no_link = xyes; then
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <math.h>
- volatile double d1, d2;
- volatile int i;
+ volatile double d1, d2;
+ volatile int i;
int
main ()
{
i = fpclassify(d1);
- i = isfinite(d1);
- i = isinf(d1);
- i = isnan(d1);
- i = isnormal(d1);
- i = signbit(d1);
- i = isgreater(d1, d2);
- i = isgreaterequal(d1, d2);
- i = isless(d1, d2);
- i = islessequal(d1, d2);
- i = islessgreater(d1, d2);
- i = islessgreater(d1, d2);
- i = isunordered(d1, d2);
+ i = isfinite(d1);
+ i = isinf(d1);
+ i = isnan(d1);
+ i = isnormal(d1);
+ i = signbit(d1);
+ i = isgreater(d1, d2);
+ i = isgreaterequal(d1, d2);
+ i = isless(d1, d2);
+ i = islessequal(d1, d2);
+ i = islessgreater(d1, d2);
+ i = islessgreater(d1, d2);
+ i = isunordered(d1, d2);
;
return 0;
}
_ACEOF
if ac_fn_cxx_try_compile "$LINENO"; then :
- glibcxx_cv_c99_math=yes
+ glibcxx_cv_c99_math_cxx11=yes
else
- glibcxx_cv_c99_math=no
+ glibcxx_cv_c99_math_cxx11=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
else
@@ -16663,33 +17250,33 @@ fi
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <math.h>
- volatile double d1, d2;
- volatile int i;
+ volatile double d1, d2;
+ volatile int i;
int
main ()
{
i = fpclassify(d1);
- i = isfinite(d1);
- i = isinf(d1);
- i = isnan(d1);
- i = isnormal(d1);
- i = signbit(d1);
- i = isgreater(d1, d2);
- i = isgreaterequal(d1, d2);
- i = isless(d1, d2);
- i = islessequal(d1, d2);
- i = islessgreater(d1, d2);
- i = islessgreater(d1, d2);
- i = isunordered(d1, d2);
+ i = isfinite(d1);
+ i = isinf(d1);
+ i = isnan(d1);
+ i = isnormal(d1);
+ i = signbit(d1);
+ i = isgreater(d1, d2);
+ i = isgreaterequal(d1, d2);
+ i = isless(d1, d2);
+ i = islessequal(d1, d2);
+ i = islessgreater(d1, d2);
+ i = islessgreater(d1, d2);
+ i = isunordered(d1, d2);
;
return 0;
}
_ACEOF
if ac_fn_cxx_try_link "$LINENO"; then :
- glibcxx_cv_c99_math=yes
+ glibcxx_cv_c99_math_cxx11=yes
else
- glibcxx_cv_c99_math=no
+ glibcxx_cv_c99_math_cxx11=no
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
@@ -16697,19 +17284,19 @@ fi
fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_c99_math" >&5
-$as_echo "$glibcxx_cv_c99_math" >&6; }
- if test x"$glibcxx_cv_c99_math" = x"yes"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_c99_math_cxx11" >&5
+$as_echo "$glibcxx_cv_c99_math_cxx11" >&6; }
+ if test x"$glibcxx_cv_c99_math_cxx11" = x"yes"; then
-$as_echo "#define _GLIBCXX_USE_C99_MATH 1" >>confdefs.h
+$as_echo "#define _GLIBCXX11_USE_C99_MATH 1" >>confdefs.h
- fi
+ fi
- # Check for the existence of <complex.h> complex math functions.
- # This is necessary even though libstdc++ uses the builtin versions
- # of these functions, because if the builtin cannot be used, a reference
- # to the library function is emitted.
- for ac_header in tgmath.h
+ # Check for the existence of <complex.h> complex math functions.
+ # This is necessary even though libstdc++ uses the builtin versions
+ # of these functions, because if the builtin cannot be used, a reference
+ # to the library function is emitted.
+ for ac_header in tgmath.h
do :
ac_fn_cxx_check_header_mongrel "$LINENO" "tgmath.h" "ac_cv_header_tgmath_h" "$ac_includes_default"
if test "x$ac_cv_header_tgmath_h" = x""yes; then :
@@ -16723,7 +17310,7 @@ fi
done
- for ac_header in complex.h
+ for ac_header in complex.h
do :
ac_fn_cxx_check_header_mongrel "$LINENO" "complex.h" "ac_cv_header_complex_h" "$ac_includes_default"
if test "x$ac_cv_header_complex_h" = x""yes; then :
@@ -16737,74 +17324,77 @@ fi
done
- glibcxx_cv_c99_complex=no;
- if test x"$ac_has_complex_h" = x"yes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ISO C99 support in <complex.h>" >&5
-$as_echo_n "checking for ISO C99 support in <complex.h>... " >&6; }
- if test x$gcc_no_link = xyes; then
+ if test x"$ac_has_complex_h" = x"yes"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ISO C99 support in <complex.h> for C++11" >&5
+$as_echo_n "checking for ISO C99 support in <complex.h> for C++11... " >&6; }
+ if test "${glibcxx_cv_c99_complex_cxx11+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ if test x$gcc_no_link = xyes; then
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <complex.h>
- typedef __complex__ float float_type;
- typedef __complex__ double double_type;
- typedef __complex__ long double ld_type;
- volatile float_type tmpf;
- volatile double_type tmpd;
- volatile ld_type tmpld;
- volatile float f;
- volatile double d;
- volatile long double ld;
+ typedef __complex__ float float_type;
+ typedef __complex__ double double_type;
+ typedef __complex__ long double ld_type;
+ volatile float_type tmpf;
+ volatile double_type tmpd;
+ volatile ld_type tmpld;
+ volatile float f;
+ volatile double d;
+ volatile long double ld;
int
main ()
{
f = cabsf(tmpf);
- f = cargf(tmpf);
- tmpf = ccosf(tmpf);
- tmpf = ccoshf(tmpf);
- tmpf = cexpf(tmpf);
- tmpf = clogf(tmpf);
- tmpf = csinf(tmpf);
- tmpf = csinhf(tmpf);
- tmpf = csqrtf(tmpf);
- tmpf = ctanf(tmpf);
- tmpf = ctanhf(tmpf);
- tmpf = cpowf(tmpf, tmpf);
- tmpf = cprojf(tmpf);
- d = cabs(tmpd);
- d = carg(tmpd);
- tmpd = ccos(tmpd);
- tmpd = ccosh(tmpd);
- tmpd = cexp(tmpd);
- tmpd = clog(tmpd);
- tmpd = csin(tmpd);
- tmpd = csinh(tmpd);
- tmpd = csqrt(tmpd);
- tmpd = ctan(tmpd);
- tmpd = ctanh(tmpd);
- tmpd = cpow(tmpd, tmpd);
- tmpd = cproj(tmpd);
- ld = cabsl(tmpld);
- ld = cargl(tmpld);
- tmpld = ccosl(tmpld);
- tmpld = ccoshl(tmpld);
- tmpld = cexpl(tmpld);
- tmpld = clogl(tmpld);
- tmpld = csinl(tmpld);
- tmpld = csinhl(tmpld);
- tmpld = csqrtl(tmpld);
- tmpld = ctanl(tmpld);
- tmpld = ctanhl(tmpld);
- tmpld = cpowl(tmpld, tmpld);
- tmpld = cprojl(tmpld);
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_cxx_try_compile "$LINENO"; then :
- glibcxx_cv_c99_complex=yes
-else
- glibcxx_cv_c99_complex=no
+ f = cargf(tmpf);
+ tmpf = ccosf(tmpf);
+ tmpf = ccoshf(tmpf);
+ tmpf = cexpf(tmpf);
+ tmpf = clogf(tmpf);
+ tmpf = csinf(tmpf);
+ tmpf = csinhf(tmpf);
+ tmpf = csqrtf(tmpf);
+ tmpf = ctanf(tmpf);
+ tmpf = ctanhf(tmpf);
+ tmpf = cpowf(tmpf, tmpf);
+ tmpf = cprojf(tmpf);
+ d = cabs(tmpd);
+ d = carg(tmpd);
+ tmpd = ccos(tmpd);
+ tmpd = ccosh(tmpd);
+ tmpd = cexp(tmpd);
+ tmpd = clog(tmpd);
+ tmpd = csin(tmpd);
+ tmpd = csinh(tmpd);
+ tmpd = csqrt(tmpd);
+ tmpd = ctan(tmpd);
+ tmpd = ctanh(tmpd);
+ tmpd = cpow(tmpd, tmpd);
+ tmpd = cproj(tmpd);
+ ld = cabsl(tmpld);
+ ld = cargl(tmpld);
+ tmpld = ccosl(tmpld);
+ tmpld = ccoshl(tmpld);
+ tmpld = cexpl(tmpld);
+ tmpld = clogl(tmpld);
+ tmpld = csinl(tmpld);
+ tmpld = csinhl(tmpld);
+ tmpld = csqrtl(tmpld);
+ tmpld = ctanl(tmpld);
+ tmpld = ctanhl(tmpld);
+ tmpld = cpowl(tmpld, tmpld);
+ tmpld = cprojl(tmpld);
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+ glibcxx_cv_c99_complex_cxx11=yes
+else
+ glibcxx_cv_c99_complex_cxx11=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
else
@@ -16814,100 +17404,103 @@ fi
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <complex.h>
- typedef __complex__ float float_type;
- typedef __complex__ double double_type;
- typedef __complex__ long double ld_type;
- volatile float_type tmpf;
- volatile double_type tmpd;
- volatile ld_type tmpld;
- volatile float f;
- volatile double d;
- volatile long double ld;
+ typedef __complex__ float float_type;
+ typedef __complex__ double double_type;
+ typedef __complex__ long double ld_type;
+ volatile float_type tmpf;
+ volatile double_type tmpd;
+ volatile ld_type tmpld;
+ volatile float f;
+ volatile double d;
+ volatile long double ld;
int
main ()
{
f = cabsf(tmpf);
- f = cargf(tmpf);
- tmpf = ccosf(tmpf);
- tmpf = ccoshf(tmpf);
- tmpf = cexpf(tmpf);
- tmpf = clogf(tmpf);
- tmpf = csinf(tmpf);
- tmpf = csinhf(tmpf);
- tmpf = csqrtf(tmpf);
- tmpf = ctanf(tmpf);
- tmpf = ctanhf(tmpf);
- tmpf = cpowf(tmpf, tmpf);
- tmpf = cprojf(tmpf);
- d = cabs(tmpd);
- d = carg(tmpd);
- tmpd = ccos(tmpd);
- tmpd = ccosh(tmpd);
- tmpd = cexp(tmpd);
- tmpd = clog(tmpd);
- tmpd = csin(tmpd);
- tmpd = csinh(tmpd);
- tmpd = csqrt(tmpd);
- tmpd = ctan(tmpd);
- tmpd = ctanh(tmpd);
- tmpd = cpow(tmpd, tmpd);
- tmpd = cproj(tmpd);
- ld = cabsl(tmpld);
- ld = cargl(tmpld);
- tmpld = ccosl(tmpld);
- tmpld = ccoshl(tmpld);
- tmpld = cexpl(tmpld);
- tmpld = clogl(tmpld);
- tmpld = csinl(tmpld);
- tmpld = csinhl(tmpld);
- tmpld = csqrtl(tmpld);
- tmpld = ctanl(tmpld);
- tmpld = ctanhl(tmpld);
- tmpld = cpowl(tmpld, tmpld);
- tmpld = cprojl(tmpld);
+ f = cargf(tmpf);
+ tmpf = ccosf(tmpf);
+ tmpf = ccoshf(tmpf);
+ tmpf = cexpf(tmpf);
+ tmpf = clogf(tmpf);
+ tmpf = csinf(tmpf);
+ tmpf = csinhf(tmpf);
+ tmpf = csqrtf(tmpf);
+ tmpf = ctanf(tmpf);
+ tmpf = ctanhf(tmpf);
+ tmpf = cpowf(tmpf, tmpf);
+ tmpf = cprojf(tmpf);
+ d = cabs(tmpd);
+ d = carg(tmpd);
+ tmpd = ccos(tmpd);
+ tmpd = ccosh(tmpd);
+ tmpd = cexp(tmpd);
+ tmpd = clog(tmpd);
+ tmpd = csin(tmpd);
+ tmpd = csinh(tmpd);
+ tmpd = csqrt(tmpd);
+ tmpd = ctan(tmpd);
+ tmpd = ctanh(tmpd);
+ tmpd = cpow(tmpd, tmpd);
+ tmpd = cproj(tmpd);
+ ld = cabsl(tmpld);
+ ld = cargl(tmpld);
+ tmpld = ccosl(tmpld);
+ tmpld = ccoshl(tmpld);
+ tmpld = cexpl(tmpld);
+ tmpld = clogl(tmpld);
+ tmpld = csinl(tmpld);
+ tmpld = csinhl(tmpld);
+ tmpld = csqrtl(tmpld);
+ tmpld = ctanl(tmpld);
+ tmpld = ctanhl(tmpld);
+ tmpld = cpowl(tmpld, tmpld);
+ tmpld = cprojl(tmpld);
;
return 0;
}
_ACEOF
if ac_fn_cxx_try_link "$LINENO"; then :
- glibcxx_cv_c99_complex=yes
+ glibcxx_cv_c99_complex_cxx11=yes
else
- glibcxx_cv_c99_complex=no
+ glibcxx_cv_c99_complex_cxx11=no
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
fi
- fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_c99_complex" >&5
-$as_echo "$glibcxx_cv_c99_complex" >&6; }
- if test x"$glibcxx_cv_c99_complex" = x"yes"; then
-$as_echo "#define _GLIBCXX_USE_C99_COMPLEX 1" >>confdefs.h
+fi
- fi
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_c99_complex_cxx11" >&5
+$as_echo "$glibcxx_cv_c99_complex_cxx11" >&6; }
+ if test x"$glibcxx_cv_c99_complex_cxx11" = x"yes"; then
+
+$as_echo "#define _GLIBCXX11_USE_C99_COMPLEX 1" >>confdefs.h
- # Check for the existence in <stdio.h> of vscanf, et. al.
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ISO C99 support in <stdio.h>" >&5
-$as_echo_n "checking for ISO C99 support in <stdio.h>... " >&6; }
- if test "${glibcxx_cv_c99_stdio+set}" = set; then :
+ fi
+
+ # Check for the existence in <stdio.h> of vscanf, et. al.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ISO C99 support in <stdio.h> for C++11" >&5
+$as_echo_n "checking for ISO C99 support in <stdio.h> for C++11... " >&6; }
+ if test "${glibcxx_cv_c99_stdio_cxx11+set}" = set; then :
$as_echo_n "(cached) " >&6
else
- if test x$gcc_no_link = xyes; then
+ if test x$gcc_no_link = xyes; then
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <stdio.h>
- #include <stdarg.h>
- void foo(char* fmt, ...)
- {
- va_list args; va_start(args, fmt);
- vfscanf(stderr, "%i", args);
- vscanf("%i", args);
- vsnprintf(fmt, 0, "%i", args);
- vsscanf(fmt, "%i", args);
- snprintf(fmt, 0, "%i");
- }
+ #include <stdarg.h>
+ void foo(char* fmt, ...)
+ {
+ va_list args; va_start(args, fmt);
+ vfscanf(stderr, "%i", args);
+ vscanf("%i", args);
+ vsnprintf(fmt, 0, "%i", args);
+ vsscanf(fmt, "%i", args);
+ snprintf(fmt, 0, "%i");
+ }
int
main ()
{
@@ -16917,9 +17510,9 @@ main ()
}
_ACEOF
if ac_fn_cxx_try_compile "$LINENO"; then :
- glibcxx_cv_c99_stdio=yes
+ glibcxx_cv_c99_stdio_cxx11=yes
else
- glibcxx_cv_c99_stdio=no
+ glibcxx_cv_c99_stdio_cxx11=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
else
@@ -16929,16 +17522,16 @@ fi
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <stdio.h>
- #include <stdarg.h>
- void foo(char* fmt, ...)
- {
- va_list args; va_start(args, fmt);
- vfscanf(stderr, "%i", args);
- vscanf("%i", args);
- vsnprintf(fmt, 0, "%i", args);
- vsscanf(fmt, "%i", args);
- snprintf(fmt, 0, "%i");
- }
+ #include <stdarg.h>
+ void foo(char* fmt, ...)
+ {
+ va_list args; va_start(args, fmt);
+ vfscanf(stderr, "%i", args);
+ vscanf("%i", args);
+ vsnprintf(fmt, 0, "%i", args);
+ vsscanf(fmt, "%i", args);
+ snprintf(fmt, 0, "%i");
+ }
int
main ()
{
@@ -16948,9 +17541,9 @@ main ()
}
_ACEOF
if ac_fn_cxx_try_link "$LINENO"; then :
- glibcxx_cv_c99_stdio=yes
+ glibcxx_cv_c99_stdio_cxx11=yes
else
- glibcxx_cv_c99_stdio=no
+ glibcxx_cv_c99_stdio_cxx11=no
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
@@ -16958,47 +17551,52 @@ fi
fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_c99_stdio" >&5
-$as_echo "$glibcxx_cv_c99_stdio" >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_c99_stdio_cxx11" >&5
+$as_echo "$glibcxx_cv_c99_stdio_cxx11" >&6; }
+ if test x"$glibcxx_cv_c99_stdio_cxx11" = x"yes"; then
+
+$as_echo "#define _GLIBCXX11_USE_C99_STDIO 1" >>confdefs.h
- # Check for the existence in <stdlib.h> of lldiv_t, et. al.
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ISO C99 support in <stdlib.h>" >&5
-$as_echo_n "checking for ISO C99 support in <stdlib.h>... " >&6; }
- if test "${glibcxx_cv_c99_stdlib+set}" = set; then :
+ fi
+
+ # Check for the existence in <stdlib.h> of lldiv_t, et. al.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ISO C99 support in <stdlib.h> for C++11" >&5
+$as_echo_n "checking for ISO C99 support in <stdlib.h> for C++11... " >&6; }
+ if test "${glibcxx_cv_c99_stdlib_cxx11+set}" = set; then :
$as_echo_n "(cached) " >&6
else
- if test x$gcc_no_link = xyes; then
+ if test x$gcc_no_link = xyes; then
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <stdlib.h>
- volatile float f;
- volatile long double ld;
- volatile unsigned long long ll;
- lldiv_t mydivt;
+ volatile float f;
+ volatile long double ld;
+ volatile unsigned long long ll;
+ lldiv_t mydivt;
int
main ()
{
char* tmp;
- f = strtof("gnu", &tmp);
- ld = strtold("gnu", &tmp);
- ll = strtoll("gnu", &tmp, 10);
- ll = strtoull("gnu", &tmp, 10);
- ll = llabs(10);
- mydivt = lldiv(10,1);
- ll = mydivt.quot;
- ll = mydivt.rem;
- ll = atoll("10");
- _Exit(0);
+ f = strtof("gnu", &tmp);
+ ld = strtold("gnu", &tmp);
+ ll = strtoll("gnu", &tmp, 10);
+ ll = strtoull("gnu", &tmp, 10);
+ ll = llabs(10);
+ mydivt = lldiv(10,1);
+ ll = mydivt.quot;
+ ll = mydivt.rem;
+ ll = atoll("10");
+ _Exit(0);
;
return 0;
}
_ACEOF
if ac_fn_cxx_try_compile "$LINENO"; then :
- glibcxx_cv_c99_stdlib=yes
+ glibcxx_cv_c99_stdlib_cxx11=yes
else
- glibcxx_cv_c99_stdlib=no
+ glibcxx_cv_c99_stdlib_cxx11=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
else
@@ -17008,33 +17606,33 @@ fi
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <stdlib.h>
- volatile float f;
- volatile long double ld;
- volatile unsigned long long ll;
- lldiv_t mydivt;
+ volatile float f;
+ volatile long double ld;
+ volatile unsigned long long ll;
+ lldiv_t mydivt;
int
main ()
{
char* tmp;
- f = strtof("gnu", &tmp);
- ld = strtold("gnu", &tmp);
- ll = strtoll("gnu", &tmp, 10);
- ll = strtoull("gnu", &tmp, 10);
- ll = llabs(10);
- mydivt = lldiv(10,1);
- ll = mydivt.quot;
- ll = mydivt.rem;
- ll = atoll("10");
- _Exit(0);
+ f = strtof("gnu", &tmp);
+ ld = strtold("gnu", &tmp);
+ ll = strtoll("gnu", &tmp, 10);
+ ll = strtoull("gnu", &tmp, 10);
+ ll = llabs(10);
+ mydivt = lldiv(10,1);
+ ll = mydivt.quot;
+ ll = mydivt.rem;
+ ll = atoll("10");
+ _Exit(0);
;
return 0;
}
_ACEOF
if ac_fn_cxx_try_link "$LINENO"; then :
- glibcxx_cv_c99_stdlib=yes
+ glibcxx_cv_c99_stdlib_cxx11=yes
else
- glibcxx_cv_c99_stdlib=no
+ glibcxx_cv_c99_stdlib_cxx11=no
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
@@ -17042,24 +17640,32 @@ fi
fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_c99_stdlib" >&5
-$as_echo "$glibcxx_cv_c99_stdlib" >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_c99_stdlib_cxx11" >&5
+$as_echo "$glibcxx_cv_c99_stdlib_cxx11" >&6; }
+ if test x"$glibcxx_cv_c99_stdlib_cxx11" = x"yes"; then
- # Check for the existence in <wchar.h> of wcstold, etc.
- glibcxx_cv_c99_wchar=no;
- if test x"$ac_has_wchar_h" = xyes &&
- test x"$ac_has_wctype_h" = xyes; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ISO C99 support in <wchar.h>" >&5
-$as_echo_n "checking for ISO C99 support in <wchar.h>... " >&6; }
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+$as_echo "#define _GLIBCXX11_USE_C99_STDLIB 1" >>confdefs.h
+
+ fi
+
+ # Check for the existence in <wchar.h> of wcstold, etc.
+ if test x"$ac_has_wchar_h" = xyes &&
+ test x"$ac_has_wctype_h" = xyes; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ISO C99 support in <wchar.h> for C++11" >&5
+$as_echo_n "checking for ISO C99 support in <wchar.h> for C++11... " >&6; }
+ if test "${glibcxx_cv_c99_wchar_cxx11+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <wchar.h>
- namespace test
- {
- using ::wcstold;
- using ::wcstoll;
- using ::wcstoull;
- }
+ namespace test
+ {
+ using ::wcstold;
+ using ::wcstoll;
+ using ::wcstoull;
+ }
int
main ()
@@ -17070,20 +17676,23 @@ main ()
}
_ACEOF
if ac_fn_cxx_try_compile "$LINENO"; then :
- glibcxx_cv_c99_wchar=yes
+ glibcxx_cv_c99_wchar_cxx11=yes
else
- glibcxx_cv_c99_wchar=no
+ glibcxx_cv_c99_wchar_cxx11=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- # Checks for wide character functions that may not be present.
- # Injection of these is wrapped with guard macros.
- # NB: only put functions here, instead of immediately above, if
- # absolutely necessary.
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+fi
+
+
+ # Checks for wide character functions that may not be present.
+ # Injection of these is wrapped with guard macros.
+ # NB: only put functions here, instead of immediately above, if
+ # absolutely necessary.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <wchar.h>
- namespace test { using ::vfwscanf; }
+ namespace test { using ::vfwscanf; }
int
main ()
{
@@ -17099,10 +17708,10 @@ $as_echo "#define HAVE_VFWSCANF 1" >>confdefs.h
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <wchar.h>
- namespace test { using ::vswscanf; }
+ namespace test { using ::vswscanf; }
int
main ()
{
@@ -17118,10 +17727,10 @@ $as_echo "#define HAVE_VSWSCANF 1" >>confdefs.h
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <wchar.h>
- namespace test { using ::vwscanf; }
+ namespace test { using ::vwscanf; }
int
main ()
{
@@ -17137,10 +17746,10 @@ $as_echo "#define HAVE_VWSCANF 1" >>confdefs.h
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <wchar.h>
- namespace test { using ::wcstof; }
+ namespace test { using ::wcstof; }
int
main ()
{
@@ -17156,13 +17765,13 @@ $as_echo "#define HAVE_WCSTOF 1" >>confdefs.h
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <wctype.h>
int
main ()
{
- wint_t t; int i = iswblank(t);
+wint_t t; int i = iswblank(t);
;
return 0;
}
@@ -17174,27 +17783,19 @@ $as_echo "#define HAVE_ISWBLANK 1" >>confdefs.h
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_c99_wchar" >&5
-$as_echo "$glibcxx_cv_c99_wchar" >&6; }
- fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_c99_wchar_cxx11" >&5
+$as_echo "$glibcxx_cv_c99_wchar_cxx11" >&6; }
+ if test x"$glibcxx_cv_c99_wchar_cxx11" = x"yes"; then
- # Option parsed, now set things appropriately.
- if test x"$glibcxx_cv_c99_math" = x"no" ||
- test x"$glibcxx_cv_c99_complex" = x"no" ||
- test x"$glibcxx_cv_c99_stdio" = x"no" ||
- test x"$glibcxx_cv_c99_stdlib" = x"no" ||
- test x"$glibcxx_cv_c99_wchar" = x"no"; then
- enable_c99=no;
- else
+$as_echo "#define _GLIBCXX11_USE_C99_WCHAR 1" >>confdefs.h
-$as_echo "#define _GLIBCXX_USE_C99 1" >>confdefs.h
-
- fi
+ fi
+ fi
- gcc_no_link="$ac_save_gcc_no_link"
- LIBS="$ac_save_LIBS"
- CXXFLAGS="$ac_save_CXXFLAGS"
- ac_ext=c
+ gcc_no_link="$ac_save_gcc_no_link"
+ LIBS="$ac_save_LIBS"
+ CXXFLAGS="$ac_save_CXXFLAGS"
+ ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
diff --git a/libstdc++-v3/include/Makefile.am b/libstdc++-v3/include/Makefile.am
index 2dc0d01241a..5560b9e834e 100644
--- a/libstdc++-v3/include/Makefile.am
+++ b/libstdc++-v3/include/Makefile.am
@@ -656,10 +656,13 @@ experimental_headers = \
${experimental_srcdir}/list \
${experimental_srcdir}/map \
${experimental_srcdir}/memory \
+ ${experimental_srcdir}/memory_resource \
${experimental_srcdir}/numeric \
${experimental_srcdir}/optional \
${experimental_srcdir}/propagate_const \
+ ${experimental_srcdir}/random \
${experimental_srcdir}/ratio \
+ ${experimental_srcdir}/regex \
${experimental_srcdir}/set \
${experimental_srcdir}/string \
${experimental_srcdir}/string_view \
@@ -668,6 +671,7 @@ experimental_headers = \
${experimental_srcdir}/type_traits \
${experimental_srcdir}/unordered_map \
${experimental_srcdir}/unordered_set \
+ ${experimental_srcdir}/utility \
${experimental_srcdir}/vector \
${experimental_filesystem_headers}
@@ -675,6 +679,7 @@ experimental_bits_srcdir = ${glibcxx_srcdir}/include/experimental/bits
experimental_bits_builddir = ./experimental/bits
experimental_bits_headers = \
${experimental_bits_srcdir}/erase_if.h \
+ ${experimental_bits_srcdir}/shared_ptr.h \
${experimental_bits_srcdir}/string_view.tcc \
${experimental_bits_filesystem_headers}
diff --git a/libstdc++-v3/include/Makefile.in b/libstdc++-v3/include/Makefile.in
index d545484a568..077446b49b8 100644
--- a/libstdc++-v3/include/Makefile.in
+++ b/libstdc++-v3/include/Makefile.in
@@ -945,10 +945,13 @@ experimental_headers = \
${experimental_srcdir}/list \
${experimental_srcdir}/map \
${experimental_srcdir}/memory \
+ ${experimental_srcdir}/memory_resource \
${experimental_srcdir}/numeric \
${experimental_srcdir}/optional \
${experimental_srcdir}/propagate_const \
+ ${experimental_srcdir}/random \
${experimental_srcdir}/ratio \
+ ${experimental_srcdir}/regex \
${experimental_srcdir}/set \
${experimental_srcdir}/string \
${experimental_srcdir}/string_view \
@@ -957,6 +960,7 @@ experimental_headers = \
${experimental_srcdir}/type_traits \
${experimental_srcdir}/unordered_map \
${experimental_srcdir}/unordered_set \
+ ${experimental_srcdir}/utility \
${experimental_srcdir}/vector \
${experimental_filesystem_headers}
@@ -964,6 +968,7 @@ experimental_bits_srcdir = ${glibcxx_srcdir}/include/experimental/bits
experimental_bits_builddir = ./experimental/bits
experimental_bits_headers = \
${experimental_bits_srcdir}/erase_if.h \
+ ${experimental_bits_srcdir}/shared_ptr.h \
${experimental_bits_srcdir}/string_view.tcc \
${experimental_bits_filesystem_headers}
diff --git a/libstdc++-v3/include/bits/basic_string.h b/libstdc++-v3/include/bits/basic_string.h
index 35246d945aa..b3853cd5828 100644
--- a/libstdc++-v3/include/bits/basic_string.h
+++ b/libstdc++-v3/include/bits/basic_string.h
@@ -5387,7 +5387,7 @@ _GLIBCXX_END_NAMESPACE_CXX11
_GLIBCXX_END_NAMESPACE_VERSION
} // namespace
-#if __cplusplus >= 201103L && defined(_GLIBCXX_USE_C99)
+#if __cplusplus >= 201103L
#include <ext/string_conversions.h>
@@ -5396,6 +5396,7 @@ namespace std _GLIBCXX_VISIBILITY(default)
_GLIBCXX_BEGIN_NAMESPACE_VERSION
_GLIBCXX_BEGIN_NAMESPACE_CXX11
+#if _GLIBCXX_USE_C99_STDLIB
// 21.4 Numeric Conversions [string.conversions].
inline int
stoi(const string& __str, size_t* __idx = 0, int __base = 10)
@@ -5434,7 +5435,9 @@ _GLIBCXX_BEGIN_NAMESPACE_CXX11
inline long double
stold(const string& __str, size_t* __idx = 0)
{ return __gnu_cxx::__stoa(&std::strtold, "stold", __str.c_str(), __idx); }
+#endif // _GLIBCXX_USE_C99_STDLIB
+#if _GLIBCXX_USE_C99_STDIO
// NB: (v)snprintf vs sprintf.
// DR 1261.
@@ -5498,8 +5501,9 @@ _GLIBCXX_BEGIN_NAMESPACE_CXX11
return __gnu_cxx::__to_xstring<string>(&std::vsnprintf, __n,
"%Lf", __val);
}
+#endif // _GLIBCXX_USE_C99_STDIO
-#ifdef _GLIBCXX_USE_WCHAR_T
+#if defined(_GLIBCXX_USE_WCHAR_T) && defined(_GLIBCXX_USE_C99_WCHAR)
inline int
stoi(const wstring& __str, size_t* __idx = 0, int __base = 10)
{ return __gnu_cxx::__stoa<long, int>(&std::wcstol, "stoi", __str.c_str(),
@@ -5601,13 +5605,13 @@ _GLIBCXX_BEGIN_NAMESPACE_CXX11
L"%Lf", __val);
}
#endif // _GLIBCXX_HAVE_BROKEN_VSWPRINTF
-#endif
+#endif // _GLIBCXX_USE_WCHAR_T && _GLIBCXX_USE_C99_WCHAR
_GLIBCXX_END_NAMESPACE_CXX11
_GLIBCXX_END_NAMESPACE_VERSION
} // namespace
-#endif /* C++11 && _GLIBCXX_USE_C99 ... */
+#endif /* C++11 */
#if __cplusplus >= 201103L
diff --git a/libstdc++-v3/include/bits/c++config b/libstdc++-v3/include/bits/c++config
index 924f13e384c..723feb12ee0 100644
--- a/libstdc++-v3/include/bits/c++config
+++ b/libstdc++-v3/include/bits/c++config
@@ -529,4 +529,40 @@ namespace std
#undef min
#undef max
+// N.B. these _GLIBCXX_USE_C99_XXX macros are defined unconditionally
+// so they should be tested with #if not with #ifdef.
+#if __cplusplus >= 201103L
+# ifndef _GLIBCXX_USE_C99_MATH
+# define _GLIBCXX_USE_C99_MATH _GLIBCXX11_USE_C99_MATH
+# endif
+# ifndef _GLIBCXX_USE_C99_COMPLEX
+# define _GLIBCXX_USE_C99_COMPLEX _GLIBCXX11_USE_C99_COMPLEX
+# endif
+# ifndef _GLIBCXX_USE_C99_STDIO
+# define _GLIBCXX_USE_C99_STDIO _GLIBCXX11_USE_C99_STDIO
+# endif
+# ifndef _GLIBCXX_USE_C99_STDLIB
+# define _GLIBCXX_USE_C99_STDLIB _GLIBCXX11_USE_C99_STDLIB
+# endif
+# ifndef _GLIBCXX_USE_C99_WCHAR
+# define _GLIBCXX_USE_C99_WCHAR _GLIBCXX11_USE_C99_WCHAR
+# endif
+#else
+# ifndef _GLIBCXX_USE_C99_MATH
+# define _GLIBCXX_USE_C99_MATH _GLIBCXX98_USE_C99_MATH
+# endif
+# ifndef _GLIBCXX_USE_C99_COMPLEX
+# define _GLIBCXX_USE_C99_COMPLEX _GLIBCXX98_USE_C99_COMPLEX
+# endif
+# ifndef _GLIBCXX_USE_C99_STDIO
+# define _GLIBCXX_USE_C99_STDIO _GLIBCXX98_USE_C99_STDIO
+# endif
+# ifndef _GLIBCXX_USE_C99_STDLIB
+# define _GLIBCXX_USE_C99_STDLIB _GLIBCXX98_USE_C99_STDLIB
+# endif
+# ifndef _GLIBCXX_USE_C99_WCHAR
+# define _GLIBCXX_USE_C99_WCHAR _GLIBCXX98_USE_C99_WCHAR
+# endif
+#endif
+
// End of prewritten config; the settings discovered at configure time follow.
diff --git a/libstdc++-v3/include/bits/ios_base.h b/libstdc++-v3/include/bits/ios_base.h
index 44029ad2ce6..908ba7c7e4e 100644
--- a/libstdc++-v3/include/bits/ios_base.h
+++ b/libstdc++-v3/include/bits/ios_base.h
@@ -74,7 +74,9 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
_S_adjustfield = _S_left | _S_right | _S_internal,
_S_basefield = _S_dec | _S_oct | _S_hex,
_S_floatfield = _S_scientific | _S_fixed,
- _S_ios_fmtflags_end = 1L << 16
+ _S_ios_fmtflags_end = 1L << 16,
+ _S_ios_fmtflags_max = __INT_MAX__,
+ _S_ios_fmtflags_min = ~__INT_MAX__
};
inline _GLIBCXX_CONSTEXPR _Ios_Fmtflags
@@ -114,7 +116,9 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
_S_in = 1L << 3,
_S_out = 1L << 4,
_S_trunc = 1L << 5,
- _S_ios_openmode_end = 1L << 16
+ _S_ios_openmode_end = 1L << 16,
+ _S_ios_openmode_max = __INT_MAX__,
+ _S_ios_openmode_min = ~__INT_MAX__
};
inline _GLIBCXX_CONSTEXPR _Ios_Openmode
@@ -152,7 +156,9 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
_S_badbit = 1L << 0,
_S_eofbit = 1L << 1,
_S_failbit = 1L << 2,
- _S_ios_iostate_end = 1L << 16
+ _S_ios_iostate_end = 1L << 16,
+ _S_ios_iostate_max = __INT_MAX__,
+ _S_ios_iostate_min = ~__INT_MAX__
};
inline _GLIBCXX_CONSTEXPR _Ios_Iostate
diff --git a/libstdc++-v3/include/bits/locale_facets.tcc b/libstdc++-v3/include/bits/locale_facets.tcc
index bd58771395e..2db2d83a48b 100644
--- a/libstdc++-v3/include/bits/locale_facets.tcc
+++ b/libstdc++-v3/include/bits/locale_facets.tcc
@@ -959,13 +959,13 @@ _GLIBCXX_BEGIN_NAMESPACE_LDBL
}
// The following code uses vsnprintf (or vsprintf(), when
- // _GLIBCXX_USE_C99 is not defined) to convert floating point values
- // for insertion into a stream. An optimization would be to replace
- // them with code that works directly on a wide buffer and then use
- // __pad to do the padding. It would be good to replace them anyway
- // to gain back the efficiency that C++ provides by knowing up front
- // the type of the values to insert. Also, sprintf is dangerous
- // since may lead to accidental buffer overruns. This
+ // _GLIBCXX_USE_C99_STDIO is not defined) to convert floating point
+ // values for insertion into a stream. An optimization would be to
+ // replace them with code that works directly on a wide buffer and
+ // then use __pad to do the padding. It would be good to replace
+ // them anyway to gain back the efficiency that C++ provides by
+ // knowing up front the type of the values to insert. Also, sprintf
+ // is dangerous since may lead to accidental buffer overruns. This
// implementation follows the C++ standard fairly directly as
// outlined in 22.2.2.2 [lib.locale.num.put]
template<typename _CharT, typename _OutIter>
@@ -992,7 +992,7 @@ _GLIBCXX_BEGIN_NAMESPACE_LDBL
char __fbuf[16];
__num_base::_S_format_float(__io, __fbuf, __mod);
-#ifdef _GLIBCXX_USE_C99
+#if _GLIBCXX_USE_C99_STDIO
// Precision is always used except for hexfloat format.
const bool __use_prec =
(__io.flags() & ios_base::floatfield) != ios_base::floatfield;
diff --git a/libstdc++-v3/include/bits/locale_facets_nonio.tcc b/libstdc++-v3/include/bits/locale_facets_nonio.tcc
index 2e73b5d2af0..631ef537791 100644
--- a/libstdc++-v3/include/bits/locale_facets_nonio.tcc
+++ b/libstdc++-v3/include/bits/locale_facets_nonio.tcc
@@ -578,7 +578,7 @@ _GLIBCXX_BEGIN_NAMESPACE_LDBL_OR_CXX11
{
const locale __loc = __io.getloc();
const ctype<_CharT>& __ctype = use_facet<ctype<_CharT> >(__loc);
-#ifdef _GLIBCXX_USE_C99
+#if _GLIBCXX_USE_C99_STDIO
// First try a buffer perhaps big enough.
int __cs_size = 64;
char* __cs = static_cast<char*>(__builtin_alloca(__cs_size));
@@ -751,7 +751,7 @@ _GLIBCXX_END_NAMESPACE_LDBL_OR_CXX11
case 'S':
// Seconds. [tm_sec]
// [00, 60] in C99 (one leap-second), [00, 61] in C89.
-#ifdef _GLIBCXX_USE_C99
+#if _GLIBCXX_USE_C99
__beg = _M_extract_num(__beg, __end, __tm->tm_sec, 0, 60, 2,
#else
__beg = _M_extract_num(__beg, __end, __tm->tm_sec, 0, 61, 2,
diff --git a/libstdc++-v3/include/bits/mutex.h b/libstdc++-v3/include/bits/mutex.h
index 43f5b0b2d60..dd279899ee9 100644
--- a/libstdc++-v3/include/bits/mutex.h
+++ b/libstdc++-v3/include/bits/mutex.h
@@ -129,14 +129,14 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
#endif // _GLIBCXX_HAS_GTHREADS
/// Do not acquire ownership of the mutex.
- struct defer_lock_t { };
+ struct defer_lock_t { explicit defer_lock_t() = default; };
/// Try to acquire ownership of the mutex without blocking.
- struct try_to_lock_t { };
+ struct try_to_lock_t { explicit try_to_lock_t() = default; };
/// Assume the calling thread has already obtained mutex ownership
/// and manage it.
- struct adopt_lock_t { };
+ struct adopt_lock_t { explicit adopt_lock_t() = default; };
constexpr defer_lock_t defer_lock { };
constexpr try_to_lock_t try_to_lock { };
diff --git a/libstdc++-v3/include/bits/stl_pair.h b/libstdc++-v3/include/bits/stl_pair.h
index dfcd357fb3c..d6f6b86bd4c 100644
--- a/libstdc++-v3/include/bits/stl_pair.h
+++ b/libstdc++-v3/include/bits/stl_pair.h
@@ -73,7 +73,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
#if __cplusplus >= 201103L
/// piecewise_construct_t
- struct piecewise_construct_t { };
+ struct piecewise_construct_t { explicit piecewise_construct_t() = default; };
/// piecewise_construct
constexpr piecewise_construct_t piecewise_construct = piecewise_construct_t();
diff --git a/libstdc++-v3/include/bits/uses_allocator.h b/libstdc++-v3/include/bits/uses_allocator.h
index f9ea7d68ec9..f7566a2e522 100644
--- a/libstdc++-v3/include/bits/uses_allocator.h
+++ b/libstdc++-v3/include/bits/uses_allocator.h
@@ -35,8 +35,14 @@ namespace std _GLIBCXX_VISIBILITY(default)
{
_GLIBCXX_BEGIN_NAMESPACE_VERSION
+ struct __erased_type { };
+
+ template<typename _Alloc, typename _Tp>
+ using __is_erased_or_convertible
+ = __or_<is_same<_Tp, __erased_type>, is_convertible<_Alloc, _Tp>>;
+
/// [allocator.tag]
- struct allocator_arg_t { };
+ struct allocator_arg_t { explicit allocator_arg_t() = default; };
constexpr allocator_arg_t allocator_arg = allocator_arg_t();
@@ -47,7 +53,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
template<typename _Tp, typename _Alloc>
struct __uses_allocator_helper<_Tp, _Alloc,
__void_t<typename _Tp::allocator_type>>
- : is_convertible<_Alloc, typename _Tp::allocator_type>::type
+ : __is_erased_or_convertible<_Alloc, typename _Tp::allocator_type>::type
{ };
/// [allocator.uses.trait]
diff --git a/libstdc++-v3/include/c_compatibility/math.h b/libstdc++-v3/include/c_compatibility/math.h
index d6acb6dea62..7729896dd5e 100644
--- a/libstdc++-v3/include/c_compatibility/math.h
+++ b/libstdc++-v3/include/c_compatibility/math.h
@@ -56,7 +56,7 @@ using std::fabs;
using std::floor;
using std::fmod;
-#if _GLIBCXX_USE_C99
+#if _GLIBCXX_USE_C99_MATH
using std::fpclassify;
using std::isfinite;
using std::isinf;
diff --git a/libstdc++-v3/include/c_compatibility/wchar.h b/libstdc++-v3/include/c_compatibility/wchar.h
index 06b5d47b6c7..3bc12d07272 100644
--- a/libstdc++-v3/include/c_compatibility/wchar.h
+++ b/libstdc++-v3/include/c_compatibility/wchar.h
@@ -103,7 +103,7 @@ using std::wmemmove;
using std::wmemset;
using std::wcsftime;
-#if _GLIBCXX_USE_C99
+#if _GLIBCXX_USE_C99_WCHAR
using std::wcstold;
using std::wcstoll;
using std::wcstoull;
diff --git a/libstdc++-v3/include/c_global/cstdio b/libstdc++-v3/include/c_global/cstdio
index d1c958b6383..486cee9905e 100644
--- a/libstdc++-v3/include/c_global/cstdio
+++ b/libstdc++-v3/include/c_global/cstdio
@@ -146,7 +146,7 @@ namespace std
using ::vsprintf;
} // namespace
-#if _GLIBCXX_USE_C99
+#if _GLIBCXX_USE_C99_STDIO
#undef snprintf
#undef vfscanf
@@ -189,6 +189,6 @@ namespace std
using ::__gnu_cxx::vsscanf;
} // namespace std
-#endif // _GLIBCXX_USE_C99
+#endif // _GLIBCXX_USE_C99_STDIO
#endif
diff --git a/libstdc++-v3/include/c_global/cstdlib b/libstdc++-v3/include/c_global/cstdlib
index 7e9bb30f05e..a2f44fc3eaf 100644
--- a/libstdc++-v3/include/c_global/cstdlib
+++ b/libstdc++-v3/include/c_global/cstdlib
@@ -195,7 +195,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
_GLIBCXX_END_NAMESPACE_VERSION
} // namespace
-#if _GLIBCXX_USE_C99
+#if _GLIBCXX_USE_C99_STDLIB
#undef _Exit
#undef llabs
@@ -266,7 +266,7 @@ namespace std
using ::__gnu_cxx::strtold;
} // namespace std
-#endif // _GLIBCXX_USE_C99
+#endif // _GLIBCXX_USE_C99_STDLIB
#endif // !_GLIBCXX_HOSTED
diff --git a/libstdc++-v3/include/c_global/cwchar b/libstdc++-v3/include/c_global/cwchar
index dddb4092bbe..15714633c1e 100644
--- a/libstdc++-v3/include/c_global/cwchar
+++ b/libstdc++-v3/include/c_global/cwchar
@@ -232,7 +232,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
_GLIBCXX_END_NAMESPACE_VERSION
} // namespace
-#if _GLIBCXX_USE_C99
+#if _GLIBCXX_USE_C99_WCHAR
#undef wcstold
#undef wcstoll
@@ -289,7 +289,7 @@ namespace std
using std::vwscanf;
#endif
-#if _GLIBCXX_USE_C99
+#if _GLIBCXX_USE_C99_WCHAR
using std::wcstold;
using std::wcstoll;
using std::wcstoull;
diff --git a/libstdc++-v3/include/c_std/cstdio b/libstdc++-v3/include/c_std/cstdio
index 37f01cad70a..b7860f96853 100644
--- a/libstdc++-v3/include/c_std/cstdio
+++ b/libstdc++-v3/include/c_std/cstdio
@@ -144,7 +144,7 @@ namespace std
using ::vsprintf;
} // namespace std
-#if _GLIBCXX_USE_C99
+#if _GLIBCXX_USE_C99_STDIO
#undef snprintf
#undef vfscanf
diff --git a/libstdc++-v3/include/c_std/cstdlib b/libstdc++-v3/include/c_std/cstdlib
index 0bd70589ee2..7b69884f870 100644
--- a/libstdc++-v3/include/c_std/cstdlib
+++ b/libstdc++-v3/include/c_std/cstdlib
@@ -192,7 +192,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
_GLIBCXX_END_NAMESPACE_VERSION
} // namespace
-#if _GLIBCXX_USE_C99
+#if _GLIBCXX_USE_C99_STDLIB
#undef _Exit
#undef llabs
@@ -263,7 +263,7 @@ namespace std
using ::__gnu_cxx::strtold;
} // namespace std
-#endif // _GLIBCXX_USE_C99
+#endif // _GLIBCXX_USE_C99_STDLIB
#endif // !_GLIBCXX_HOSTED
diff --git a/libstdc++-v3/include/c_std/cwchar b/libstdc++-v3/include/c_std/cwchar
index aa1b2fa024c..5aade7f64ba 100644
--- a/libstdc++-v3/include/c_std/cwchar
+++ b/libstdc++-v3/include/c_std/cwchar
@@ -228,7 +228,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
_GLIBCXX_END_NAMESPACE_VERSION
} // namespace
-#if _GLIBCXX_USE_C99
+#if _GLIBCXX_USE_C99_WCHAR
#undef wcstold
#undef wcstoll
diff --git a/libstdc++-v3/include/experimental/bits/shared_ptr.h b/libstdc++-v3/include/experimental/bits/shared_ptr.h
new file mode 100644
index 00000000000..413652d773d
--- /dev/null
+++ b/libstdc++-v3/include/experimental/bits/shared_ptr.h
@@ -0,0 +1,1197 @@
+// Experimental shared_ptr with array support -*- C++ -*-
+
+// Copyright (C) 2015 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// 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/>.
+
+/** @file experimental/bits/shared_ptr.h
+ * This is an internal header file, included by other library headers.
+ * Do not attempt to use it directly. @headername{experimental/memory}
+ */
+
+#ifndef _GLIBCXX_EXPERIMENTAL_SHARED_PTR_H
+#define _GLIBCXX_EXPERIMENTAL_SHARED_PTR_H 1
+
+#pragma GCC system_header
+
+#if __cplusplus <= 201103L
+# include <bits/c++14_warning.h>
+#else
+
+#include <memory>
+#include <experimental/type_traits>
+
+namespace std _GLIBCXX_VISIBILITY(default)
+{
+namespace experimental
+{
+inline namespace fundamentals_v2
+{
+_GLIBCXX_BEGIN_NAMESPACE_VERSION
+ template<typename _Tp> class enable_shared_from_this;
+_GLIBCXX_END_NAMESPACE_VERSION
+} // namespace fundamentals_v2
+} // namespace experimental
+
+#define __cpp_lib_experimental_shared_ptr_arrays 201406
+
+_GLIBCXX_BEGIN_NAMESPACE_VERSION
+
+ /*
+ * The specification of std::experimental::shared_ptr is slightly different
+ * to std::shared_ptr (specifically in terms of "compatible" pointers) so
+ * to implement std::experimental::shared_ptr without too much duplication
+ * we make it derive from a partial specialization of std::__shared_ptr
+ * using a special tag type, __libfund_v1.
+ *
+ * There are two partial specializations for the tag type, supporting the
+ * different interfaces of the array and non-array forms.
+ */
+
+ template <typename _Tp, bool = is_array<_Tp>::value>
+ struct __libfund_v1 { using type = _Tp; };
+
+ // helper for _Compatible
+ template<typename _From_type, typename _To_type>
+ struct __sp_compatible
+ : is_convertible<_From_type*, _To_type*>::type
+ { };
+
+ template<size_t _Nm, typename _Tp>
+ struct __sp_compatible<_Tp[_Nm], _Tp[]>
+ : true_type
+ { };
+
+ template<size_t _Nm, typename _Tp>
+ struct __sp_compatible<_Tp[_Nm], const _Tp[]>
+ : true_type
+ { };
+
+ // Partial specialization for base class of experimental::shared_ptr<T>
+ // (i.e. the non-array form of experimental::shared_ptr)
+ template<typename _Tp, _Lock_policy _Lp>
+ class __shared_ptr<__libfund_v1<_Tp, false>, _Lp>
+ : private __shared_ptr<_Tp, _Lp>
+ {
+ template<typename _Tp1>
+ using _Compatible
+ = enable_if_t<__sp_compatible<_Tp1, _Tp>::value>;
+
+ using _Base_type = __shared_ptr<_Tp>;
+
+ _Base_type& _M_get_base() { return *this;}
+ const _Base_type& _M_get_base() const { return *this;}
+
+ public:
+ using element_type = _Tp;
+
+ constexpr __shared_ptr() noexcept = default;
+
+ template<typename _Tp1>
+ explicit __shared_ptr(_Tp1* __p)
+ : _Base_type(__p)
+ { }
+
+ template<typename _Tp1, typename _Deleter>
+ __shared_ptr(_Tp1* __p, _Deleter __d)
+ : _Base_type(__p, __d)
+ { }
+
+ template<typename _Tp1, typename _Deleter, typename _Alloc>
+ __shared_ptr(_Tp1* __p, _Deleter __d, _Alloc __a)
+ : _Base_type(__p, __d, __a)
+ { }
+
+ template<typename _Deleter>
+ __shared_ptr(nullptr_t __p, _Deleter __d)
+ : _Base_type(__p, __d)
+ { }
+
+ template<typename _Deleter, typename _Alloc>
+ __shared_ptr(nullptr_t __p, _Deleter __d, _Alloc __a)
+ : _Base_type(__p, __d, __a)
+ { }
+
+ template<typename _Tp1>
+ __shared_ptr(const __shared_ptr<__libfund_v1<_Tp1>, _Lp>& __r,
+ element_type* __p) noexcept
+ : _Base_type(__r._M_get_base(), __p)
+ { }
+
+ __shared_ptr(const __shared_ptr&) noexcept = default;
+ __shared_ptr(__shared_ptr&&) noexcept = default;
+ __shared_ptr& operator=(const __shared_ptr&) noexcept = default;
+ __shared_ptr& operator=(__shared_ptr&&) noexcept = default;
+ ~__shared_ptr() = default;
+
+ template<typename _Tp1, typename = _Compatible<_Tp1>>
+ __shared_ptr(const __shared_ptr<__libfund_v1<_Tp1>, _Lp>& __r) noexcept
+ : _Base_type(__r._M_get_base())
+ { }
+
+ template<typename _Tp1, typename = _Compatible<_Tp1>>
+ __shared_ptr(__shared_ptr<__libfund_v1<_Tp1>, _Lp>&& __r) noexcept
+ : _Base_type(std::move((__r._M_get_base())))
+ { }
+
+ template<typename _Tp1>
+ explicit __shared_ptr(const __weak_ptr<__libfund_v1<_Tp1>, _Lp>& __r)
+ : _Base_type(__r._M_get_base())
+ { }
+
+ template<typename _Tp1, typename _Del, typename
+ = _Compatible<remove_pointer_t<
+ typename unique_ptr<_Tp1, _Del>::pointer>>>
+ __shared_ptr(std::unique_ptr<_Tp1, _Del>&& __r)
+ : _Base_type(std::move(__r))
+ { }
+
+#if _GLIBCXX_USE_DEPRECATED
+ // Postcondition: use_count() == 1 and __r.get() == 0
+ template<typename _Tp1>
+ __shared_ptr(std::auto_ptr<_Tp1>&& __r)
+ : _Base_type(std::move(__r))
+ { }
+#endif
+
+ constexpr __shared_ptr(nullptr_t) noexcept : __shared_ptr() { }
+
+ // reset
+ void
+ reset() noexcept
+ { __shared_ptr(nullptr).swap(*this); }
+
+ template<typename _Tp1>
+ void
+ reset(_Tp1* __p)
+ {
+ _GLIBCXX_DEBUG_ASSERT(__p == 0 || __p != get());
+ __shared_ptr(__p).swap(*this);
+ }
+
+ template<typename _Tp1, typename _Deleter>
+ void
+ reset(_Tp1* __p, _Deleter __d)
+ { __shared_ptr(__p, __d).swap(*this); }
+
+ template<typename _Tp1, typename _Deleter, typename _Alloc>
+ void
+ reset(_Tp1* __p, _Deleter __d, _Alloc __a)
+ { __shared_ptr(__p, __d, std::move(__a)).swap(*this); }
+
+ using _Base_type::operator*;
+ using _Base_type::operator->;
+
+ template<typename _Tp1>
+ __shared_ptr&
+ operator=(const __shared_ptr<__libfund_v1<_Tp1>, _Lp>& __r) noexcept
+ {
+ _Base_type::operator=(__r._M_get_base());
+ return *this;
+ }
+
+ template<class _Tp1>
+ __shared_ptr&
+ operator=(__shared_ptr<__libfund_v1<_Tp1>, _Lp>&& __r) noexcept
+ {
+ _Base_type::operator=(std::move(__r._M_get_base()));
+ return *this;
+ }
+
+ template<typename _Tp1>
+ __shared_ptr&
+ operator=(std::unique_ptr<_Tp1>&& __r)
+ {
+ _Base_type::operator=(std::move(__r));
+ return *this;
+ }
+
+#if _GLIBCXX_USE_DEPRECATED
+ template<typename _Tp1>
+ __shared_ptr&
+ operator=(std::auto_ptr<_Tp1>&& __r)
+ {
+ _Base_type::operator=(std::move(__r));
+ return *this;
+ }
+#endif
+
+ void
+ swap(__shared_ptr& __other) noexcept
+ { _Base_type::swap(__other); }
+
+ template<typename _Tp1>
+ bool
+ owner_before(__shared_ptr<__libfund_v1<_Tp1>, _Lp> const& __rhs) const
+ { return _Base_type::owner_before(__rhs._M_get_base()); }
+
+ template<typename _Tp1>
+ bool
+ owner_before(__weak_ptr<__libfund_v1<_Tp1>, _Lp> const& __rhs) const
+ { return _Base_type::owner_before(__rhs._M_get_base()); }
+
+ using _Base_type::operator bool;
+ using _Base_type::get;
+ using _Base_type::unique;
+ using _Base_type::use_count;
+
+ protected:
+
+ // make_shared not yet support for shared_ptr_arrays
+ //template<typename _Alloc, typename... _Args>
+ // __shared_ptr(_Sp_make_shared_tag __tag, const _Alloc& __a,
+ // _Args&&... __args)
+ // : _M_ptr(), _M_refcount(__tag, (_Tp*)0, __a,
+ // std::forward<_Args>(__args)...)
+ // {
+ // void* __p = _M_refcount._M_get_deleter(typeid(__tag));
+ // _M_ptr = static_cast<_Tp*>(__p);
+ // __enable_shared_from_this_helper(_M_refcount, _M_ptr, _M_ptr);
+ // }
+
+ // __weak_ptr::lock()
+ __shared_ptr(const __weak_ptr<__libfund_v1<_Tp>, _Lp>& __r,
+ std::nothrow_t)
+ : _Base_type(__r._M_get_base(), std::nothrow)
+ { }
+
+ private:
+ template<typename _Tp1, _Lock_policy _Lp1> friend class __weak_ptr;
+ template<typename _Tp1, _Lock_policy _Lp1> friend class __shared_ptr;
+
+ // TODO
+ template<typename _Del, typename _Tp1, _Lock_policy _Lp1>
+ friend _Del* get_deleter(const __shared_ptr<_Tp1, _Lp1>&) noexcept;
+ };
+
+ // Partial specialization for base class of experimental::shared_ptr<T[N]>
+ // and experimental::shared_ptr<T[]> (i.e. the array forms).
+ template<typename _Tp, _Lock_policy _Lp>
+ class __shared_ptr<__libfund_v1<_Tp, true>, _Lp>
+ : private __shared_ptr<remove_extent_t<_Tp>, _Lp>
+ {
+ public:
+ using element_type = remove_extent_t<_Tp>;
+
+ private:
+ struct _Array_Deleter
+ {
+ void
+ operator()(element_type const *__p) const
+ { delete [] __p; }
+ };
+
+ struct _Normal_Deleter
+ {
+ void
+ operator()(element_type const *__p) const
+ { delete __p; }
+ };
+
+ template<typename _Tp1>
+ using _Compatible
+ = enable_if_t<__sp_compatible<_Tp1, _Tp>::value>;
+
+ using _Deleter_type
+ = conditional_t<is_array<_Tp>::value, _Array_Deleter, _Normal_Deleter>;
+
+ using _Base_type = __shared_ptr<element_type>;
+
+ _Base_type& _M_get_base() { return *this;}
+ const _Base_type& _M_get_base() const { return *this;}
+
+ public:
+ constexpr __shared_ptr() noexcept
+ : _Base_type()
+ { }
+
+ template<typename _Tp1>
+ explicit __shared_ptr(_Tp1* __p)
+ : _Base_type(__p, _Deleter_type())
+ { }
+
+ template<typename _Tp1, typename _Deleter>
+ __shared_ptr(_Tp1* __p, _Deleter __d)
+ : _Base_type(__p, __d)
+ { }
+
+ template<typename _Tp1, typename _Deleter, typename _Alloc>
+ __shared_ptr(_Tp1* __p, _Deleter __d, _Alloc __a)
+ : _Base_type(__p, __d, __a)
+ { }
+
+ template<typename _Deleter>
+ __shared_ptr(nullptr_t __p, _Deleter __d)
+ : _Base_type(__p, __d)
+ { }
+
+ template<typename _Deleter, typename _Alloc>
+ __shared_ptr(nullptr_t __p, _Deleter __d, _Alloc __a)
+ : _Base_type(__p, __d, __a)
+ { }
+
+ template<typename _Tp1>
+ __shared_ptr(const __shared_ptr<__libfund_v1<_Tp1>, _Lp>& __r,
+ element_type* __p) noexcept
+ : _Base_type(__r._M_get_base(), __p)
+ { }
+
+ __shared_ptr(const __shared_ptr&) noexcept = default;
+ __shared_ptr(__shared_ptr&&) noexcept = default;
+ __shared_ptr& operator=(const __shared_ptr&) noexcept = default;
+ __shared_ptr& operator=(__shared_ptr&&) noexcept = default;
+ ~__shared_ptr() = default;
+
+ template<typename _Tp1, typename = _Compatible<_Tp1>>
+ __shared_ptr(const __shared_ptr<__libfund_v1<_Tp1>, _Lp>& __r) noexcept
+ : _Base_type(__r._M_get_base())
+ { }
+
+ template<typename _Tp1, typename = _Compatible<_Tp1>>
+ __shared_ptr(__shared_ptr<__libfund_v1<_Tp1>, _Lp>&& __r) noexcept
+ : _Base_type(std::move((__r._M_get_base())))
+ { }
+
+ template<typename _Tp1>
+ explicit __shared_ptr(const __weak_ptr<__libfund_v1<_Tp1>, _Lp>& __r)
+ : _Base_type(__r._M_get_base())
+ { }
+
+ template<typename _Tp1, typename _Del, typename
+ = _Compatible<remove_pointer_t<
+ typename unique_ptr<_Tp1, _Del>::pointer>>>
+ __shared_ptr(std::unique_ptr<_Tp1, _Del>&& __r)
+ : _Base_type(std::move(__r))
+ { }
+
+#if _GLIBCXX_USE_DEPRECATED
+ // Postcondition: use_count() == 1 and __r.get() == 0
+ template<typename _Tp1>
+ __shared_ptr(std::auto_ptr<_Tp1>&& __r)
+ : _Base_type(std::move(__r))
+ { }
+#endif
+
+ constexpr __shared_ptr(nullptr_t) noexcept : __shared_ptr() { }
+
+ // reset
+ void
+ reset() noexcept
+ { __shared_ptr(nullptr).swap(*this); }
+
+ template<typename _Tp1>
+ void
+ reset(_Tp1* __p)
+ {
+ _GLIBCXX_DEBUG_ASSERT(__p == 0 || __p != get());
+ __shared_ptr(__p, _Deleter_type()).swap(*this);
+ }
+
+ template<typename _Tp1, typename _Deleter>
+ void
+ reset(_Tp1* __p, _Deleter __d)
+ { __shared_ptr(__p, __d).swap(*this); }
+
+ template<typename _Tp1, typename _Deleter, typename _Alloc>
+ void
+ reset(_Tp1* __p, _Deleter __d, _Alloc __a)
+ { __shared_ptr(__p, __d, std::move(__a)).swap(*this); }
+
+ element_type&
+ operator[](ptrdiff_t i) const noexcept
+ {
+ _GLIBCXX_DEBUG_ASSERT(get() != 0 && i >= 0);
+ return get()[i];
+ }
+
+ template<typename _Tp1>
+ __shared_ptr&
+ operator=(const __shared_ptr<__libfund_v1<_Tp1>, _Lp>& __r) noexcept
+ {
+ _Base_type::operator=(__r._M_get_base());
+ return *this;
+ }
+
+ template<class _Tp1>
+ __shared_ptr&
+ operator=(__shared_ptr<__libfund_v1<_Tp1>, _Lp>&& __r) noexcept
+ {
+ _Base_type::operator=(std::move(__r._M_get_base()));
+ return *this;
+ }
+
+ template<typename _Tp1>
+ __shared_ptr&
+ operator=(std::unique_ptr<_Tp1>&& __r)
+ {
+ _Base_type::operator=(std::move(__r));
+ return *this;
+ }
+
+#if _GLIBCXX_USE_DEPRECATED
+ template<typename _Tp1>
+ __shared_ptr&
+ operator=(std::auto_ptr<_Tp1>&& __r)
+ {
+ _Base_type::operator=(std::move(__r));
+ return *this;
+ }
+#endif
+
+ void
+ swap(__shared_ptr& __other) noexcept
+ { _Base_type::swap(__other); }
+
+ template<typename _Tp1>
+ bool
+ owner_before(__shared_ptr<__libfund_v1<_Tp1>, _Lp> const& __rhs) const
+ { return _Base_type::owner_before(__rhs._M_get_base()); }
+
+ template<typename _Tp1>
+ bool
+ owner_before(__weak_ptr<__libfund_v1<_Tp1>, _Lp> const& __rhs) const
+ { return _Base_type::owner_before(__rhs._M_get_base()); }
+
+ using _Base_type::operator bool;
+ using _Base_type::get;
+ using _Base_type::unique;
+ using _Base_type::use_count;
+
+ protected:
+
+ // make_shared not yet support for shared_ptr_arrays
+ //template<typename _Alloc, typename... _Args>
+ // __shared_ptr(_Sp_make_shared_tag __tag, const _Alloc& __a,
+ // _Args&&... __args)
+ // : _M_ptr(), _M_refcount(__tag, (_Tp*)0, __a,
+ // std::forward<_Args>(__args)...)
+ // {
+ // void* __p = _M_refcount._M_get_deleter(typeid(__tag));
+ // _M_ptr = static_cast<_Tp*>(__p);
+ // __enable_shared_from_this_helper(_M_refcount, _M_ptr, _M_ptr);
+ // }
+
+ // __weak_ptr::lock()
+ __shared_ptr(const __weak_ptr<__libfund_v1<_Tp>, _Lp>& __r,
+ std::nothrow_t)
+ : _Base_type(__r._M_get_base(), std::nothrow)
+ { }
+
+ private:
+ template<typename _Tp1, _Lock_policy _Lp1> friend class __weak_ptr;
+ template<typename _Tp1, _Lock_policy _Lp1> friend class __shared_ptr;
+
+ // TODO
+ template<typename _Del, typename _Tp1, _Lock_policy _Lp1>
+ friend _Del* get_deleter(const __shared_ptr<_Tp1, _Lp1>&) noexcept;
+ };
+
+ // weak_ptr specialization for __shared_ptr array
+ template<typename _Tp, _Lock_policy _Lp>
+ class __weak_ptr<__libfund_v1<_Tp>, _Lp>
+ : __weak_ptr<remove_extent_t<_Tp>, _Lp>
+ {
+ template<typename _Tp1>
+ using _Compatible = enable_if_t<__sp_compatible<_Tp1, _Tp>::value>;
+
+ using _Base_type = __weak_ptr<remove_extent_t<_Tp>>;
+
+ _Base_type& _M_get_base() { return *this;}
+ const _Base_type& _M_get_base() const { return *this; }
+
+ public:
+ using element_type = remove_extent_t<_Tp>;
+
+ constexpr __weak_ptr() noexcept
+ : _Base_type()
+ { }
+
+ __weak_ptr(const __weak_ptr&) noexcept = default;
+
+ ~__weak_ptr() = default;
+
+ template<typename _Tp1, typename = _Compatible<_Tp1>>
+ __weak_ptr(const __weak_ptr<__libfund_v1<_Tp1>, _Lp>& __r) noexcept
+ : _Base_type(__r._M_get_base())
+ { }
+
+ template<typename _Tp1, typename = _Compatible<_Tp1>>
+ __weak_ptr(const __shared_ptr<__libfund_v1<_Tp1>, _Lp>& __r) noexcept
+ : _Base_type(__r._M_get_base())
+ { }
+
+ __weak_ptr(__weak_ptr&& __r) noexcept
+ : _Base_type(std::move(__r))
+ { }
+
+ template<typename _Tp1, typename = _Compatible<_Tp1>>
+ __weak_ptr(__weak_ptr<__libfund_v1<_Tp1>, _Lp>&& __r) noexcept
+ : _Base_type(std::move(__r._M_get_base()))
+ { }
+
+ __weak_ptr&
+ operator=(const __weak_ptr& __r) noexcept = default;
+
+ template<typename _Tp1>
+ __weak_ptr&
+ operator=(const __weak_ptr<__libfund_v1<_Tp1>, _Lp>& __r) noexcept
+ {
+ this->_Base_type::operator=(__r._M_get_base());
+ return *this;
+ }
+
+ template<typename _Tp1>
+ __weak_ptr&
+ operator=(const __shared_ptr<_Tp1, _Lp>& __r) noexcept
+ {
+ this->_Base_type::operator=(__r._M_get_base());
+ return *this;
+ }
+
+ __weak_ptr&
+ operator=(__weak_ptr&& __r) noexcept
+ {
+ this->_Base_type::operator=(std::move(__r));
+ return *this;
+ }
+
+ template<typename _Tp1>
+ __weak_ptr&
+ operator=(__weak_ptr<_Tp1, _Lp>&& __r) noexcept
+ {
+ this->_Base_type::operator=(std::move(__r._M_get_base()));
+ return *this;
+ }
+
+ void
+ swap(__weak_ptr& __other) noexcept
+ { this->_Base_type::swap(__other); }
+
+ template<typename _Tp1>
+ bool
+ owner_before(const __shared_ptr<__libfund_v1<_Tp1>, _Lp>& __rhs) const
+ { return _Base_type::owner_before(__rhs._M_get_base()); }
+
+ template<typename _Tp1>
+ bool
+ owner_before(const __weak_ptr<__libfund_v1<_Tp1>, _Lp>& __rhs) const
+ { return _Base_type::owner_before(__rhs._M_get_base()); }
+
+ __shared_ptr<__libfund_v1<_Tp>, _Lp>
+ lock() const noexcept // should not be element_type
+ { return __shared_ptr<__libfund_v1<_Tp>, _Lp>(*this, std::nothrow); }
+
+ using _Base_type::use_count;
+ using _Base_type::expired;
+ using _Base_type::reset;
+
+ private:
+ // Used by __enable_shared_from_this.
+ void
+ _M_assign(element_type* __ptr,
+ const __shared_count<_Lp>& __refcount) noexcept
+ { this->_Base_type::_M_assign(__ptr, __refcount); }
+
+ template<typename _Tp1, _Lock_policy _Lp1> friend class __shared_ptr;
+ template<typename _Tp1, _Lock_policy _Lp1> friend class __weak_ptr;
+ friend class __enable_shared_from_this<_Tp, _Lp>;
+ friend class experimental::enable_shared_from_this<_Tp>;
+ friend class enable_shared_from_this<_Tp>;
+ };
+
+_GLIBCXX_END_NAMESPACE_VERSION
+
+namespace experimental
+{
+inline namespace fundamentals_v2
+{
+_GLIBCXX_BEGIN_NAMESPACE_VERSION
+
+ // 8.2.1
+
+ template<typename _Tp> class shared_ptr;
+ template<typename _Tp> class weak_ptr;
+
+ template<typename _Tp, _Lock_policy _Lp = __default_lock_policy>
+ using __shared_ptr = std::__shared_ptr<__libfund_v1<_Tp>, _Lp>;
+
+ template<typename _Tp, _Lock_policy _Lp = __default_lock_policy>
+ using __weak_ptr = std::__weak_ptr<__libfund_v1<_Tp>, _Lp>;
+
+ template<typename _Tp>
+ class shared_ptr : public __shared_ptr<_Tp>
+ {
+ template<typename _Tp1>
+ using _Compatible = enable_if_t<__sp_compatible<_Tp1, _Tp>::value>;
+
+ using _Base_type = __shared_ptr<_Tp>;
+
+ public:
+ using element_type = typename _Base_type::element_type;
+
+ // 8.2.1.1, shared_ptr constructors
+ constexpr shared_ptr() noexcept = default;
+
+ template<typename _Tp1>
+ explicit shared_ptr(_Tp1* __p) : _Base_type(__p) { }
+
+ template<typename _Tp1, typename _Deleter>
+ shared_ptr(_Tp1* __p, _Deleter __d)
+ : _Base_type(__p, __d) { }
+
+ template<typename _Tp1, typename _Deleter, typename _Alloc>
+ shared_ptr(_Tp1* __p, _Deleter __d, _Alloc __a)
+ : _Base_type(__p, __d, __a) { }
+
+ template<typename _Deleter>
+ shared_ptr(nullptr_t __p, _Deleter __d)
+ : _Base_type(__p, __d) { }
+
+ template<typename _Deleter, typename _Alloc>
+ shared_ptr(nullptr_t __p, _Deleter __d, _Alloc __a)
+ : _Base_type(__p, __d, __a) { }
+
+ template<typename _Tp1>
+ shared_ptr(const shared_ptr<_Tp1>& __r, element_type* __p) noexcept
+ : _Base_type(__r, __p) { }
+
+ shared_ptr(const shared_ptr& __r) noexcept
+ : _Base_type(__r) { }
+
+ template<typename _Tp1, typename = _Compatible<_Tp1>>
+ shared_ptr(const shared_ptr<_Tp1>& __r) noexcept
+ : _Base_type(__r) { }
+
+ shared_ptr(const shared_ptr<_Tp>&& __r) noexcept
+ : _Base_type(std::move(__r)) { }
+
+ template<typename _Tp1, typename = _Compatible<_Tp1>>
+ shared_ptr(shared_ptr<_Tp1>&& __r) noexcept
+ : _Base_type(std::move(__r)) { }
+
+ template<typename _Tp1>
+ explicit shared_ptr(const weak_ptr<_Tp1>& __r)
+ : _Base_type(__r) { }
+
+#if _GLIBCXX_USE_DEPRECATED
+ template<typename _Tp1>
+ shared_ptr(std::auto_ptr<_Tp1>&& __r)
+ : _Base_type() { } // TODO
+#endif
+
+ template<typename _Tp1, typename _Del, typename
+ = _Compatible<remove_pointer_t<
+ typename unique_ptr<_Tp1, _Del>::pointer>>>
+ shared_ptr(std::unique_ptr<_Tp1, _Del>&& __r)
+ : _Base_type(std::move(__r)) { }
+
+ constexpr shared_ptr(nullptr_t __p)
+ : _Base_type(__p) { }
+
+ // C++14 ยง20.8.2.2
+ ~shared_ptr() = default;
+
+ // C++14 ยง20.8.2.3
+ shared_ptr& operator=(const shared_ptr&) noexcept = default;
+
+ template <typename _Tp1>
+ shared_ptr&
+ operator=(const shared_ptr<_Tp1>& __r) noexcept
+ {
+ _Base_type::operator=(__r);
+ return *this;
+ }
+
+ shared_ptr&
+ operator=(shared_ptr&& __r) noexcept
+ {
+ _Base_type::operator=(std::move(__r));
+ return *this;
+ }
+
+ template <typename _Tp1>
+ shared_ptr&
+ operator=(shared_ptr<_Tp1>&& __r) noexcept
+ {
+ _Base_type::operator=(std::move(__r));
+ return *this;
+ }
+
+#if _GLIBCXX_USE_DEPRECATED
+ template<typename _Tp1>
+ shared_ptr&
+ operator=(std::auto_ptr<_Tp1>&& __r)
+ {
+ __shared_ptr<_Tp>::operator=(std::move(__r));
+ return *this;
+ }
+#endif
+
+ template <typename _Tp1, typename _Del>
+ shared_ptr&
+ operator=(unique_ptr<_Tp1, _Del>&& __r)
+ {
+ _Base_type::operator=(std::move(__r));
+ return *this;
+ }
+
+ // C++14 ยง20.8.2.2.4
+ // swap & reset
+ // 8.2.1.2 shared_ptr observers
+ // in __shared_ptr
+
+ private:
+ template<typename _Alloc, typename... _Args>
+ shared_ptr(_Sp_make_shared_tag __tag, const _Alloc& __a,
+ _Args&&... __args)
+ : _Base_type(__tag, __a, std::forward<_Args>(__args)...)
+ { }
+
+ template<typename _Tp1, typename _Alloc, typename... _Args>
+ friend shared_ptr<_Tp1>
+ allocate_shared(const _Alloc& __a, _Args&&... __args);
+
+ shared_ptr(const weak_ptr<_Tp>& __r, std::nothrow_t)
+ : _Base_type(__r, std::nothrow) { }
+
+ friend class weak_ptr<_Tp>;
+ };
+
+ // C++14 ยง20.8.2.2.7 //DOING
+ template<typename _Tp1, typename _Tp2>
+ bool operator==(const shared_ptr<_Tp1>& __a,
+ const shared_ptr<_Tp2>& __b) noexcept
+ { return __a.get() == __b.get(); }
+
+ template<typename _Tp>
+ inline bool
+ operator==(const shared_ptr<_Tp>& __a, nullptr_t) noexcept
+ { return !__a; }
+
+ template<typename _Tp>
+ inline bool
+ operator==(nullptr_t, const shared_ptr<_Tp>& __a) noexcept
+ { return !__a; }
+
+ template<typename _Tp1, typename _Tp2>
+ inline bool
+ operator!=(const shared_ptr<_Tp1>& __a,
+ const shared_ptr<_Tp2>& __b) noexcept
+ { return __a.get() != __b.get(); }
+
+ template<typename _Tp>
+ inline bool
+ operator!=(const shared_ptr<_Tp>& __a, nullptr_t) noexcept
+ { return (bool)__a; }
+
+ template<typename _Tp>
+ inline bool
+ operator!=(nullptr_t, const shared_ptr<_Tp>& __a) noexcept
+ { return (bool)__a; }
+
+ template<typename _Tp1, typename _Tp2>
+ inline bool
+ operator<(const shared_ptr<_Tp1>& __a,
+ const shared_ptr<_Tp2>& __b) noexcept
+ {
+ using __elem_t1 = typename shared_ptr<_Tp1>::element_type;
+ using __elem_t2 = typename shared_ptr<_Tp2>::element_type;
+ using _CT = common_type_t<__elem_t1*, __elem_t2*>;
+ return std::less<_CT>()(__a.get(), __b.get());
+ }
+
+ template<typename _Tp>
+ inline bool
+ operator<(const shared_ptr<_Tp>& __a, nullptr_t) noexcept
+ {
+ using __elem_t = typename shared_ptr<_Tp>::element_type;
+ return std::less<__elem_t>()(__a.get(), nullptr);
+ }
+
+ template<typename _Tp>
+ inline bool
+ operator<(nullptr_t, const shared_ptr<_Tp>& __a) noexcept
+ {
+ using __elem_t = typename shared_ptr<_Tp>::element_type;
+ return std::less<__elem_t*>()(nullptr, __a.get());
+ }
+
+ template<typename _Tp1, typename _Tp2>
+ inline bool
+ operator<=(const shared_ptr<_Tp1>& __a,
+ const shared_ptr<_Tp2>& __b) noexcept
+ { return !(__b < __a); }
+
+ template<typename _Tp>
+ inline bool
+ operator<=(const shared_ptr<_Tp>& __a, nullptr_t) noexcept
+ { return !(nullptr < __a); }
+
+ template<typename _Tp>
+ inline bool
+ operator<=(nullptr_t, const shared_ptr<_Tp>& __a) noexcept
+ { return !(__a < nullptr); }
+
+ template<typename _Tp1, typename _Tp2>
+ inline bool
+ operator>(const shared_ptr<_Tp1>& __a,
+ const shared_ptr<_Tp2>& __b) noexcept
+ { return (__b < __a); }
+
+ template<typename _Tp>
+ inline bool
+ operator>(const shared_ptr<_Tp>& __a, nullptr_t) noexcept
+ {
+ using __elem_t = typename shared_ptr<_Tp>::element_type;
+ return std::less<__elem_t*>()(nullptr, __a.get());
+ }
+
+ template<typename _Tp>
+ inline bool
+ operator>(nullptr_t, const shared_ptr<_Tp>& __a) noexcept
+ {
+ using __elem_t = typename shared_ptr<_Tp>::element_type;
+ return std::less<__elem_t*>()(__a.get(), nullptr);
+ }
+
+ template<typename _Tp1, typename _Tp2>
+ inline bool
+ operator>=(const shared_ptr<_Tp1>& __a,
+ const shared_ptr<_Tp2>& __b) noexcept
+ { return !(__a < __b); }
+
+ template<typename _Tp>
+ inline bool
+ operator>=(const shared_ptr<_Tp>& __a, nullptr_t) noexcept
+ { return !(__a < nullptr); }
+
+ template<typename _Tp>
+ inline bool
+ operator>=(nullptr_t, const shared_ptr<_Tp>& __a) noexcept
+ { return !(nullptr < __a); }
+
+ // C++14 ยง20.8.2.2.8
+ template<typename _Tp>
+ inline void
+ swap(shared_ptr<_Tp>& __a, shared_ptr<_Tp>& __b) noexcept
+ { __a.swap(__b); }
+
+ // 8.2.1.3, shared_ptr casts
+ template<typename _Tp, typename _Tp1>
+ inline shared_ptr<_Tp>
+ static_pointer_cast(const shared_ptr<_Tp1>& __r) noexcept
+ {
+ using __elem_t = typename shared_ptr<_Tp>::element_type;
+ return shared_ptr<_Tp>(__r, static_cast<__elem_t*>(__r.get()));
+ }
+
+ template<typename _Tp, typename _Tp1>
+ inline shared_ptr<_Tp>
+ dynamic_pointer_cast(const shared_ptr<_Tp1>& __r) noexcept
+ {
+ using __elem_t = typename shared_ptr<_Tp>::element_type;
+ if (_Tp* __p = dynamic_cast<__elem_t*>(__r.get()))
+ return shared_ptr<_Tp>(__r, __p);
+ return shared_ptr<_Tp>();
+ }
+
+ template<typename _Tp, typename _Tp1>
+ inline shared_ptr<_Tp>
+ const_pointer_cast(const shared_ptr<_Tp1>& __r) noexcept
+ {
+ using __elem_t = typename shared_ptr<_Tp>::element_type;
+ return shared_ptr<_Tp>(__r, const_cast<__elem_t*>(__r.get()));
+ }
+
+ template<typename _Tp, typename _Tp1>
+ inline shared_ptr<_Tp>
+ reinterpret_pointer_cast(const shared_ptr<_Tp1>& __r) noexcept
+ {
+ using __elem_t = typename shared_ptr<_Tp>::element_type;
+ return shared_ptr<_Tp>(__r, reinterpret_cast<__elem_t*>(__r.get()));
+ }
+
+ // C++14 ยง20.8.2.3
+ template<typename _Tp>
+ class weak_ptr : public __weak_ptr<_Tp>
+ {
+ template<typename _Tp1>
+ using _Compatible = enable_if_t<__sp_compatible<_Tp1, _Tp>::value>;
+
+ using _Base_type = __weak_ptr<_Tp>;
+
+ public:
+ constexpr weak_ptr() noexcept = default;
+
+ template<typename _Tp1, typename = _Compatible<_Tp1>>
+ weak_ptr(const shared_ptr<_Tp1>& __r) noexcept
+ : _Base_type(__r) { }
+
+ weak_ptr(const weak_ptr&) noexcept = default;
+
+ template<typename _Tp1, typename = _Compatible<_Tp1>>
+ weak_ptr(const weak_ptr<_Tp1>& __r) noexcept
+ : _Base_type(__r) { }
+
+ weak_ptr(weak_ptr&&) noexcept = default;
+
+ template<typename _Tp1, typename = _Compatible<_Tp1>>
+ weak_ptr(weak_ptr<_Tp1>&& __r) noexcept
+ : _Base_type(std::move(__r)) { }
+
+ weak_ptr&
+ operator=(const weak_ptr& __r) noexcept = default;
+
+ template<typename _Tp1>
+ weak_ptr&
+ operator=(const weak_ptr<_Tp1>& __r) noexcept
+ {
+ this->_Base_type::operator=(__r);
+ return *this;
+ }
+
+ template<typename _Tp1>
+ weak_ptr&
+ operator=(const shared_ptr<_Tp1>& __r) noexcept
+ {
+ this->_Base_type::operator=(__r);
+ return *this;
+ }
+
+ weak_ptr&
+ operator=(weak_ptr&& __r) noexcept = default;
+
+ template<typename _Tp1>
+ weak_ptr&
+ operator=(weak_ptr<_Tp1>&& __r) noexcept
+ {
+ this->_Base_type::operator=(std::move(__r));
+ return *this;
+ }
+
+ shared_ptr<_Tp>
+ lock() const noexcept
+ { return shared_ptr<_Tp>(*this, std::nothrow); }
+
+ friend class enable_shared_from_this<_Tp>;
+ };
+
+ // C++14 ยง20.8.2.3.6
+ template<typename _Tp>
+ inline void
+ swap(weak_ptr<_Tp>& __a, weak_ptr<_Tp>& __b) noexcept
+ { __a.swap(__b); }
+
+ /// C++14 ยง20.8.2.2.10
+ template<typename _Del, typename _Tp, _Lock_policy _Lp>
+ inline _Del*
+ get_deleter(const __shared_ptr<_Tp, _Lp>& __p) noexcept
+ { return std::get_deleter<_Del>(__p); }
+
+ // C++14 ยง20.8.2.2.11
+ template<typename _Ch, typename _Tr, typename _Tp, _Lock_policy _Lp>
+ inline std::basic_ostream<_Ch, _Tr>&
+ operator<<(std::basic_ostream<_Ch, _Tr>& __os,
+ const __shared_ptr<_Tp, _Lp>& __p)
+ {
+ __os << __p.get();
+ return __os;
+ }
+
+ // C++14 ยง20.8.2.4
+ template<typename _Tp = void> class owner_less;
+
+ /// Partial specialization of owner_less for shared_ptr.
+ template<typename _Tp>
+ struct owner_less<shared_ptr<_Tp>>
+ : public _Sp_owner_less<shared_ptr<_Tp>, weak_ptr<_Tp>>
+ { };
+
+ /// Partial specialization of owner_less for weak_ptr.
+ template<typename _Tp>
+ struct owner_less<weak_ptr<_Tp>>
+ : public _Sp_owner_less<weak_ptr<_Tp>, shared_ptr<_Tp>>
+ { };
+
+ template<>
+ class owner_less<void>
+ {
+ template<typename _Tp, typename _Up>
+ bool
+ operator()(shared_ptr<_Tp> const& __lhs,
+ shared_ptr<_Up> const& __rhs) const
+ { return __lhs.owner_before(__rhs); }
+
+ template<typename _Tp, typename _Up>
+ bool
+ operator()(shared_ptr<_Tp> const& __lhs,
+ weak_ptr<_Up> const& __rhs) const
+ { return __lhs.owner_before(__rhs); }
+
+ template<typename _Tp, typename _Up>
+ bool
+ operator()(weak_ptr<_Tp> const& __lhs,
+ shared_ptr<_Up> const& __rhs) const
+ { return __lhs.owner_before(__rhs); }
+
+ template<typename _Tp, typename _Up>
+ bool
+ operator()(weak_ptr<_Tp> const& __lhs,
+ weak_ptr<_Up> const& __rhs) const
+ { return __lhs.owner_before(__rhs); }
+
+ typedef void is_transparent;
+ };
+
+ // C++14 ยง20.8.2.6
+ template<typename _Tp>
+ inline bool
+ atomic_is_lock_free(const shared_ptr<_Tp>* __p)
+ { return std::atomic_is_lock_free<_Tp, __default_lock_policy>(__p); }
+
+ template<typename _Tp>
+ shared_ptr<_Tp> atomic_load(const shared_ptr<_Tp>* __p)
+ { return std::atomic_load<_Tp>(__p); }
+
+ template<typename _Tp>
+ shared_ptr<_Tp>
+ atomic_load_explicit(const shared_ptr<_Tp>* __p, memory_order __mo)
+ { return std::atomic_load_explicit<_Tp>(__p, __mo); }
+
+ template<typename _Tp>
+ void atomic_store(shared_ptr<_Tp>* __p, shared_ptr<_Tp> __r)
+ { return std::atomic_store<_Tp>(__p, __r); }
+
+ template<typename _Tp>
+ shared_ptr<_Tp>
+ atomic_store_explicit(const shared_ptr<_Tp>* __p,
+ shared_ptr<_Tp> __r,
+ memory_order __mo)
+ { return std::atomic_store_explicit<_Tp>(__p, __r, __mo); }
+
+ template<typename _Tp>
+ void atomic_exchange(shared_ptr<_Tp>* __p, shared_ptr<_Tp> __r)
+ { return std::atomic_exchange<_Tp>(__p, __r); }
+
+ template<typename _Tp>
+ shared_ptr<_Tp>
+ atomic_exchange_explicit(const shared_ptr<_Tp>* __p,
+ shared_ptr<_Tp> __r,
+ memory_order __mo)
+ { return std::atomic_exchange_explicit<_Tp>(__p, __r, __mo); }
+
+ template<typename _Tp>
+ bool atomic_compare_exchange_weak(shared_ptr<_Tp>* __p,
+ shared_ptr<_Tp>* __v,
+ shared_ptr<_Tp> __w)
+ { return std::atomic_compare_exchange_weak<_Tp>(__p, __v, __w); }
+
+ template<typename _Tp>
+ bool atomic_compare_exchange_strong(shared_ptr<_Tp>* __p,
+ shared_ptr<_Tp>* __v,
+ shared_ptr<_Tp> __w)
+ { return std::atomic_compare_exchange_strong<_Tp>(__p, __v, __w); }
+
+ template<typename _Tp>
+ bool atomic_compare_exchange_weak_explicit(shared_ptr<_Tp>* __p,
+ shared_ptr<_Tp>* __v,
+ shared_ptr<_Tp> __w,
+ memory_order __success,
+ memory_order __failure)
+ { return std::atomic_compare_exchange_weak_explicit<_Tp>(__p, __v, __w,
+ __success,
+ __failure); }
+
+ template<typename _Tp>
+ bool atomic_compare_exchange_strong_explicit(shared_ptr<_Tp>* __p,
+ shared_ptr<_Tp>* __v,
+ shared_ptr<_Tp> __w,
+ memory_order __success,
+ memory_order __failure)
+ { return std::atomic_compare_exchange_strong_explicit<_Tp>(__p, __v, __w,
+ __success,
+ __failure); }
+
+ //enable_shared_from_this
+ template<typename _Tp>
+ class enable_shared_from_this
+ {
+ protected:
+ constexpr enable_shared_from_this() noexcept { }
+
+ enable_shared_from_this(const enable_shared_from_this&) noexcept { }
+
+ enable_shared_from_this&
+ operator=(const enable_shared_from_this&) noexcept
+ { return *this; }
+
+ ~enable_shared_from_this() { }
+
+ public:
+ shared_ptr<_Tp>
+ shared_from_this()
+ { return shared_ptr<_Tp>(this->_M_weak_this); }
+
+ shared_ptr<const _Tp>
+ shared_from_this() const
+ { return shared_ptr<const _Tp>(this->_M_weak_this); }
+
+ private:
+ template<typename _Tp1>
+ void
+ _M_weak_assign(_Tp1* __p, const __shared_count<>& __n) const noexcept
+ { _M_weak_this._M_assign(__p, __n); }
+
+ template<typename _Tp1>
+ friend void
+ __enable_shared_from_this_helper(const __shared_count<>& __pn,
+ const enable_shared_from_this* __pe,
+ const _Tp1* __px) noexcept
+ {
+ if(__pe != 0)
+ __pe->_M_weak_assign(const_cast<_Tp1*>(__px), __pn);
+ }
+
+ mutable weak_ptr<_Tp> _M_weak_this;
+ };
+
+_GLIBCXX_END_NAMESPACE_VERSION
+} // namespace fundamentals_v2
+} // namespace experimental
+
+_GLIBCXX_BEGIN_NAMESPACE_VERSION
+
+ /// std::hash specialization for shared_ptr.
+ template<typename _Tp>
+ struct hash<experimental::shared_ptr<_Tp>>
+ : public __hash_base<size_t, experimental::shared_ptr<_Tp>>
+ {
+ size_t
+ operator()(const experimental::shared_ptr<_Tp>& __s) const noexcept
+ { return std::hash<_Tp*>()(__s.get()); }
+ };
+
+_GLIBCXX_END_NAMESPACE_VERSION
+} // namespace std
+
+#endif // __cplusplus <= 201103L
+
+#endif // _GLIBCXX_EXPERIMENTAL_SHARED_PTR_H
diff --git a/libstdc++-v3/include/experimental/bits/string_view.tcc b/libstdc++-v3/include/experimental/bits/string_view.tcc
index 75a34f90b2d..0eb4f70a93c 100644
--- a/libstdc++-v3/include/experimental/bits/string_view.tcc
+++ b/libstdc++-v3/include/experimental/bits/string_view.tcc
@@ -22,7 +22,7 @@
// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
// <http://www.gnu.org/licenses/>.
-/** @file experimental/string_view.tcc
+/** @file experimental/bits/string_view.tcc
* This is an internal header file, included by other library headers.
* Do not attempt to use it directly. @headername{string_view}
*/
diff --git a/libstdc++-v3/include/experimental/deque b/libstdc++-v3/include/experimental/deque
index 8d3d8951e3a..72149939a25 100644
--- a/libstdc++-v3/include/experimental/deque
+++ b/libstdc++-v3/include/experimental/deque
@@ -37,6 +37,7 @@
#include <deque>
#include <algorithm>
+#include <experimental/memory_resource>
namespace std _GLIBCXX_VISIBILITY(default)
{
@@ -63,6 +64,16 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
}
_GLIBCXX_END_NAMESPACE_VERSION
+
+namespace pmr {
+_GLIBCXX_BEGIN_NAMESPACE_VERSION
+
+ template<typename _Tp>
+ using deque = std::deque<_Tp, polymorphic_allocator<_Tp>>;
+
+_GLIBCXX_END_NAMESPACE_VERSION
+} // namespace pmr
+
} // namespace fundamentals_v2
} // namespace experimental
} // namespace std
diff --git a/libstdc++-v3/include/experimental/forward_list b/libstdc++-v3/include/experimental/forward_list
index e7e6b33bd00..bceaccc96b1 100644
--- a/libstdc++-v3/include/experimental/forward_list
+++ b/libstdc++-v3/include/experimental/forward_list
@@ -36,6 +36,7 @@
#else
#include <forward_list>
+#include <experimental/memory_resource>
namespace std _GLIBCXX_VISIBILITY(default)
{
@@ -59,6 +60,16 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
}
_GLIBCXX_END_NAMESPACE_VERSION
+
+namespace pmr {
+_GLIBCXX_BEGIN_NAMESPACE_VERSION
+
+ template<typename _Tp>
+ using forward_list = std::forward_list<_Tp, polymorphic_allocator<_Tp>>;
+
+_GLIBCXX_END_NAMESPACE_VERSION
+} // namespace pmr
+
} // namespace fundamentals_v2
} // namespace experimental
} // namespace std
diff --git a/libstdc++-v3/include/experimental/list b/libstdc++-v3/include/experimental/list
index 41d6e1dcbdc..4209d0e9eb4 100644
--- a/libstdc++-v3/include/experimental/list
+++ b/libstdc++-v3/include/experimental/list
@@ -36,6 +36,7 @@
#else
#include <list>
+#include <experimental/memory_resource>
namespace std _GLIBCXX_VISIBILITY(default)
{
@@ -59,6 +60,16 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
}
_GLIBCXX_END_NAMESPACE_VERSION
+
+namespace pmr {
+_GLIBCXX_BEGIN_NAMESPACE_VERSION
+
+ template<typename _Tp>
+ using list = std::list<_Tp, polymorphic_allocator<_Tp>>;
+
+_GLIBCXX_END_NAMESPACE_VERSION
+} // namespace pmr
+
} // namespace fundamentals_v2
} // namespace experimental
} // namespace std
diff --git a/libstdc++-v3/include/experimental/map b/libstdc++-v3/include/experimental/map
index 89bf2605091..757065acf5a 100644
--- a/libstdc++-v3/include/experimental/map
+++ b/libstdc++-v3/include/experimental/map
@@ -37,6 +37,7 @@
#include <map>
#include <experimental/bits/erase_if.h>
+#include <experimental/memory_resource>
namespace std _GLIBCXX_VISIBILITY(default)
{
@@ -59,6 +60,23 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
{ __detail::__erase_nodes_if(__cont, __pred); }
_GLIBCXX_END_NAMESPACE_VERSION
+
+namespace pmr {
+_GLIBCXX_BEGIN_NAMESPACE_VERSION
+
+ template<typename _Key, typename _Tp, typename _Compare = less<_Key>>
+ using map
+ = std::map<_Key, _Tp, _Compare,
+ polymorphic_allocator<pair<const _Key, _Tp>>>;
+
+ template<typename _Key, typename _Tp, typename _Compare = less<_Key>>
+ using multimap
+ = std::multimap<_Key, _Tp, _Compare,
+ polymorphic_allocator<pair<const _Key, _Tp>>>;
+
+_GLIBCXX_END_NAMESPACE_VERSION
+} // namespace pmr
+
} // namespace fundamentals_v2
} // namespace experimental
} // namespace std
diff --git a/libstdc++-v3/include/experimental/memory b/libstdc++-v3/include/experimental/memory
index 08a6b33c7c1..b8c7849e11f 100644
--- a/libstdc++-v3/include/experimental/memory
+++ b/libstdc++-v3/include/experimental/memory
@@ -43,6 +43,7 @@
#include <type_traits>
#include <utility>
#include <functional>
+#include <experimental/bits/shared_ptr.h>
namespace std _GLIBCXX_VISIBILITY(default)
{
@@ -247,7 +248,6 @@ template <typename _Tp>
{
return hash<typename add_pointer<_Tp>::type> {}(__t.get());
}
-
};
} // namespace std
diff --git a/libstdc++-v3/include/experimental/memory_resource b/libstdc++-v3/include/experimental/memory_resource
new file mode 100644
index 00000000000..983b21108e2
--- /dev/null
+++ b/libstdc++-v3/include/experimental/memory_resource
@@ -0,0 +1,385 @@
+// <experimental/memory_resource> -*- C++ -*-
+
+// Copyright (C) 2015 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// 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/>.
+
+/** @file experimental/memory_resource
+ * This is a TS C++ Library header.
+ */
+
+#ifndef _GLIBCXX_EXPERIMENTAL_MEMORY_RESOURCE
+#define _GLIBCXX_EXPERIMENTAL_MEMORY_RESOURCE 1
+
+#include <memory>
+#include <new>
+#include <atomic>
+#include <cstddef>
+#include <bits/alloc_traits.h>
+
+namespace std {
+namespace experimental {
+inline namespace fundamentals_v2 {
+namespace pmr {
+_GLIBCXX_BEGIN_NAMESPACE_VERSION
+
+#define __cpp_lib_experimental_memory_resources 201402L
+
+ class memory_resource;
+
+ template <typename _Tp>
+ class polymorphic_allocator;
+
+ template <typename _Alloc>
+ class __resource_adaptor_imp;
+
+ template <typename _Alloc>
+ using resource_adaptor = __resource_adaptor_imp<
+ typename allocator_traits<_Alloc>::template rebind_alloc<char>>;
+
+ template <typename _Tp>
+ struct __uses_allocator_construction_helper;
+
+ // Global memory resources
+ memory_resource* new_delete_resource() noexcept;
+ memory_resource* null_memory_resource() noexcept;
+
+ // The default memory resource
+ memory_resource* get_default_resource() noexcept;
+ memory_resource* set_default_resource(memory_resource* __r) noexcept;
+
+ // Standard memory resources
+
+ // 8.5 Class memory_resource
+ class memory_resource
+ {
+ static constexpr size_t _S_max_align = alignof(max_align_t);
+
+ public:
+ virtual ~memory_resource() { }
+
+ void*
+ allocate(size_t __bytes, size_t __alignment = _S_max_align)
+ { return do_allocate(__bytes, __alignment); }
+
+ void
+ deallocate(void* __p, size_t __bytes, size_t __alignment = _S_max_align)
+ { return do_deallocate(__p, __bytes, __alignment); }
+
+ bool
+ is_equal(const memory_resource& __other) const noexcept
+ { return do_is_equal(__other); }
+
+ protected:
+ virtual void*
+ do_allocate(size_t __bytes, size_t __alignment) = 0;
+
+ virtual void
+ do_deallocate(void* __p, size_t __bytes, size_t __alignment) = 0;
+
+ virtual bool
+ do_is_equal(const memory_resource& __other) const noexcept = 0;
+ };
+
+ inline bool
+ operator==(const memory_resource& __a,
+ const memory_resource& __b) noexcept
+ { return &__a == &__b || __a.is_equal(__b); }
+
+ inline bool
+ operator!=(const memory_resource& __a,
+ const memory_resource& __b) noexcept
+ { return !(__a == __b); }
+
+
+ // 8.6 Class template polymorphic_allocator
+ template <class _Tp>
+ class polymorphic_allocator
+ {
+ using __uses_alloc1_ = __uses_alloc1<memory_resource*>;
+ using __uses_alloc2_ = __uses_alloc2<memory_resource*>;
+
+ template<typename _Tp1, typename... _Args>
+ void
+ _M_construct(__uses_alloc0, _Tp1* __p, _Args&&... __args)
+ { ::new(__p) _Tp1(std::forward<_Args>(__args)...); }
+
+ template<typename _Tp1, typename... _Args>
+ void
+ _M_construct(__uses_alloc1_, _Tp1* __p, _Args&&... __args)
+ { ::new(__p) _Tp1(allocator_arg, this->resource(),
+ std::forward<_Args>(__args)...); }
+
+ template<typename _Tp1, typename... _Args>
+ void
+ _M_construct(__uses_alloc2_, _Tp1* __p, _Args&&... __args)
+ { ::new(__p) _Tp1(std::forward<_Args>(__args)...,
+ this->resource()); }
+
+ public:
+ using value_type = _Tp;
+
+ polymorphic_allocator() noexcept
+ : _M_resource(get_default_resource())
+ { }
+
+ polymorphic_allocator(memory_resource* __r)
+ : _M_resource(__r)
+ { _GLIBCXX_DEBUG_ASSERT(__r); }
+
+ polymorphic_allocator(const polymorphic_allocator& __other) = default;
+
+ template <typename _Up>
+ polymorphic_allocator(const polymorphic_allocator<_Up>&
+ __other) noexcept
+ : _M_resource(__other.resource())
+ { }
+
+ polymorphic_allocator&
+ operator=(const polymorphic_allocator& __rhs) = default;
+
+ _Tp* allocate(size_t __n)
+ { return static_cast<_Tp*>(_M_resource->allocate(__n * sizeof(_Tp),
+ alignof(_Tp))); }
+
+ void deallocate(_Tp* __p, size_t __n)
+ { _M_resource->deallocate(__p, __n * sizeof(_Tp), alignof(_Tp)); }
+
+ template <typename _Tp1, typename... _Args> //used here
+ void construct(_Tp1* __p, _Args&&... __args)
+ {
+ auto __use_tag = __use_alloc<_Tp1, memory_resource*,
+ _Args...>(this->resource());
+ _M_construct(__use_tag, __p, std::forward<_Args>(__args)...);
+ }
+
+ // Specializations for pair using piecewise construction
+ template <typename _Tp1, typename _Tp2,
+ typename... _Args1, typename... _Args2>
+ void construct(pair<_Tp1, _Tp2>* __p, piecewise_construct_t,
+ tuple<_Args1...> __x,
+ tuple<_Args2...> __y)
+ {
+ auto __x_use_tag =
+ __use_alloc<_Tp1, memory_resource*, _Args1...>(this->resource());
+ auto __y_use_tag =
+ __use_alloc<_Tp2, memory_resource*, _Args2...>(this->resource());
+
+ ::new(__p) std::pair<_Tp1, _Tp2>(piecewise_construct,
+ _M_construct_p(__x_use_tag, __x),
+ _M_construct_p(__y_use_tag, __y));
+ }
+
+ template <typename _Tp1, typename _Tp2>
+ void construct(pair<_Tp1,_Tp2>* __p)
+ { this->construct(__p, piecewise_construct, tuple<>(), tuple<>()); }
+
+ template <typename _Tp1, typename _Tp2, typename _Up, typename _Vp>
+ void construct(pair<_Tp1,_Tp2>* __p, _Up&& __x, _Vp&& __y)
+ { this->construct(__p, piecewise_construct,
+ forward_as_tuple(std::forward<_Up>(__x)),
+ forward_as_tuple(std::forward<_Vp>(__y))); }
+
+ template <typename _Tp1, typename _Tp2, typename _Up, typename _Vp>
+ void construct(pair<_Tp1,_Tp2>* __p, const std::pair<_Up, _Vp>& __pr)
+ { this->construct(__p, piecewise_construct, forward_as_tuple(__pr.first),
+ forward_as_tuple(__pr.second)); }
+
+ template <typename _Tp1, typename _Tp2, typename _Up, typename _Vp>
+ void construct(pair<_Tp1,_Tp2>* __p, pair<_Up, _Vp>&& __pr)
+ { this->construct(__p, piecewise_construct,
+ forward_as_tuple(std::forward<_Up>(__pr.first)),
+ forward_as_tuple(std::forward<_Vp>(__pr.second))); }
+
+ template <typename _Up>
+ void destroy(_Up* __p)
+ { __p->~_Up(); }
+
+ // Return a default-constructed allocator (no allocator propagation)
+ polymorphic_allocator select_on_container_copy_construction() const
+ { return polymorphic_allocator(); }
+
+ memory_resource* resource() const
+ { return _M_resource; }
+
+ private:
+ template<typename _Tuple>
+ _Tuple&&
+ _M_construct_p(__uses_alloc0, _Tuple& __t)
+ { return std::move(__t); }
+
+ template<typename... _Args>
+ decltype(auto)
+ _M_construct_p(__uses_alloc1_ __ua, tuple<_Args...>& __t)
+ { return tuple_cat(make_tuple(allocator_arg, *(__ua._M_a)),
+ std::move(__t)); }
+
+ template<typename... _Args>
+ decltype(auto)
+ _M_construct_p(__uses_alloc2_ __ua, tuple<_Args...>& __t)
+ { return tuple_cat(std::move(__t), make_tuple(*(__ua._M_a))); }
+
+ memory_resource* _M_resource;
+ };
+
+ template <class _Tp1, class _Tp2>
+ bool operator==(const polymorphic_allocator<_Tp1>& __a,
+ const polymorphic_allocator<_Tp2>& __b) noexcept
+ { return *__a.resource() == *__b.resource(); }
+
+ template <class _Tp1, class _Tp2>
+ bool operator!=(const polymorphic_allocator<_Tp1>& __a,
+ const polymorphic_allocator<_Tp2>& __b) noexcept
+ { return !(__a == __b); }
+
+ // 8.7.1 __resource_adaptor_imp
+ template <typename _Alloc>
+ class __resource_adaptor_imp : public memory_resource
+ {
+ public:
+ using allocator_type = _Alloc;
+
+ __resource_adaptor_imp() = default;
+ __resource_adaptor_imp(const __resource_adaptor_imp&) = default;
+ __resource_adaptor_imp(__resource_adaptor_imp&&) = default;
+
+ explicit __resource_adaptor_imp(const _Alloc& __a2)
+ : _M_alloc(__a2)
+ { }
+
+ explicit __resource_adaptor_imp(_Alloc&& __a2)
+ : _M_alloc(std::move(__a2))
+ { }
+
+ __resource_adaptor_imp&
+ operator=(const __resource_adaptor_imp&) = default;
+
+ allocator_type get_allocator() const { return _M_alloc; }
+
+ protected:
+ virtual void*
+ do_allocate(size_t __bytes, size_t __alignment)
+ {
+ using _Aligned_alloc = std::__alloc_rebind<_Alloc, char>;
+ size_t __new_size = _S_aligned_size(__bytes,
+ _S_supported(__alignment) ?
+ __alignment : _S_max_align);
+ return _Aligned_alloc().allocate(__new_size);
+ }
+
+ virtual void
+ do_deallocate(void* __p, size_t __bytes, size_t __alignment)
+ {
+ using _Aligned_alloc = std::__alloc_rebind<_Alloc, char>;
+ size_t __new_size = _S_aligned_size(__bytes,
+ _S_supported(__alignment) ?
+ __alignment : _S_max_align);
+ _Aligned_alloc().deallocate(static_cast<typename
+ _Aligned_alloc::pointer>(__p),
+ __new_size);
+ }
+
+ virtual bool
+ do_is_equal(const memory_resource& __other) const noexcept
+ {
+ auto __p = dynamic_cast<const __resource_adaptor_imp*>(&__other);
+ return __p ? (_M_alloc == __p->_M_alloc) : false;
+ }
+
+ private:
+ // Calculate Aligned Size
+ // Returns a size that is larger than or equal to __size and divided by
+ // __alignment, where __alignment is required to be the power of 2.
+ static size_t
+ _S_aligned_size(size_t __size, size_t __alignment)
+ { return ((__size - 1)|(__alignment - 1)) + 1; }
+
+ // Determine whether alignment meets one of those preconditions:
+ // 1. Equals to Zero
+ // 2. Is power of two
+ static bool
+ _S_supported (size_t __x)
+ { return ((__x != 0) && !(__x & (__x - 1))); }
+
+ _Alloc _M_alloc;
+ };
+
+ // Global memory resources
+ inline std::atomic<memory_resource*>&
+ __get_default_resource()
+ {
+ static atomic<memory_resource*> _S_default_resource(new_delete_resource());
+ return _S_default_resource;
+ }
+
+ inline memory_resource*
+ new_delete_resource() noexcept
+ {
+ static resource_adaptor<std::allocator<char>> __r;
+ return static_cast<memory_resource*>(&__r);
+ }
+
+ template <typename _Alloc>
+ class __null_memory_resource : private memory_resource
+ {
+ protected:
+ void*
+ do_allocate(size_t __bytes, size_t __alignment)
+ { std::__throw_bad_alloc(); }
+
+ void
+ do_deallocate(void* __p, size_t __bytes, size_t __alignment)
+ { }
+
+ bool
+ do_is_equal(const memory_resource& __other) const noexcept
+ { }
+
+ friend memory_resource* null_memory_resource() noexcept;
+ };
+
+ inline memory_resource*
+ null_memory_resource() noexcept
+ {
+ static __null_memory_resource<void> __r;
+ return static_cast<memory_resource*>(&__r);
+ }
+
+ // The default memory resource
+ inline memory_resource*
+ get_default_resource() noexcept
+ { return __get_default_resource().load(); }
+
+ inline memory_resource*
+ set_default_resource(memory_resource* __r) noexcept
+ {
+ if (__r == nullptr)
+ __r = new_delete_resource();
+ return __get_default_resource().exchange(__r);
+ }
+
+_GLIBCXX_END_NAMESPACE_VERSION
+} // namespace pmr
+} // namespace fundamentals_v2
+} // namespace experimental
+} // namespace std
+
+#endif
diff --git a/libstdc++-v3/include/experimental/random b/libstdc++-v3/include/experimental/random
new file mode 100644
index 00000000000..9be1d31647d
--- /dev/null
+++ b/libstdc++-v3/include/experimental/random
@@ -0,0 +1,77 @@
+// <experimental/random> -*- C++ -*-
+
+// Copyright (C) 2015 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// 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/>.
+
+/** @file experimental/random
+ * This is a TS C++ Library header.
+ */
+
+#ifndef _GLIBCXX_EXPERIMENTAL_RANDOM
+#define _GLIBCXX_EXPERIMENTAL_RANDOM 1
+
+#include <random>
+
+namespace std {
+namespace experimental {
+inline namespace fundamentals_v2 {
+_GLIBCXX_BEGIN_NAMESPACE_VERSION
+
+#define __cpp_lib_experimental_randint 201511
+
+ inline std::default_random_engine&
+ _S_randint_engine()
+ {
+ static thread_local default_random_engine __eng{random_device{}()};
+ return __eng;
+ }
+
+ // 13.2.2.1, Function template randint
+ template<typename _IntType>
+ inline _IntType
+ randint(_IntType __a, _IntType __b)
+ {
+ static_assert(is_integral<_IntType>::value && sizeof(_IntType) > 1,
+ "argument must be an integer type");
+ using _Dist = std::uniform_int_distribution<_IntType>;
+ static thread_local _Dist __dist;
+ return __dist(_S_randint_engine(), typename _Dist::param_type{__a, __b});
+ }
+
+ inline void
+ reseed()
+ {
+ _S_randint_engine().seed(random_device{}());
+ }
+
+ inline void
+ reseed(default_random_engine::result_type __value)
+ {
+ _S_randint_engine().seed(__value);
+ }
+
+_GLIBCXX_END_NAMESPACE_VERSION
+} // namespace fundamentals_v2
+} // namespace experimental
+} // namespace std
+
+#endif
diff --git a/libstdc++-v3/include/experimental/regex b/libstdc++-v3/include/experimental/regex
new file mode 100644
index 00000000000..44ebf68ffc8
--- /dev/null
+++ b/libstdc++-v3/include/experimental/regex
@@ -0,0 +1,72 @@
+// <experimental/regex> -*- C++ -*-
+
+// Copyright (C) 2015 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// 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/>.
+
+/** @file experimental/regex
+ * This is a TS C++ Library header.
+ */
+
+#ifndef _GLIBCXX_EXPERIMENTAL_REGEX
+#define _GLIBCXX_EXPERIMENTAL_REGEX 1
+
+#pragma GCC system_header
+
+#if __cplusplus <= 201103L
+# include <bits/c++14_warning.h>
+#else
+
+#include <regex>
+#include <experimental/string>
+
+namespace std _GLIBCXX_VISIBILITY(default)
+{
+namespace experimental
+{
+inline namespace fundamentals_v2
+{
+namespace pmr
+{
+_GLIBCXX_BEGIN_NAMESPACE_VERSION
+_GLIBCXX_BEGIN_NAMESPACE_CXX11
+
+ template<typename _BidirectionalIterator>
+ using match_results
+ = std::match_results<_BidirectionalIterator, polymorphic_allocator<
+ sub_match<_BidirectionalIterator>>>;
+
+ typedef match_results<const char*> cmatch;
+ typedef match_results<const wchar_t*> wcmatch;
+ typedef match_results<string::const_iterator> smatch;
+ typedef match_results<wstring::const_iterator> wsmatch;
+
+_GLIBCXX_END_NAMESPACE_CXX11
+_GLIBCXX_END_NAMESPACE_VERSION
+} // namespace pmr
+
+} // namespace fundamentals_v2
+} // namespace experimental
+} // namespace std
+
+#endif // C++14
+
+#endif // _GLIBCXX_EXPERIMENTAL_REGEX
diff --git a/libstdc++-v3/include/experimental/set b/libstdc++-v3/include/experimental/set
index 709fe327475..be2f213f9d6 100644
--- a/libstdc++-v3/include/experimental/set
+++ b/libstdc++-v3/include/experimental/set
@@ -37,6 +37,7 @@
#include <set>
#include <experimental/bits/erase_if.h>
+#include <experimental/memory_resource>
namespace std _GLIBCXX_VISIBILITY(default)
{
@@ -59,6 +60,20 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
{ __detail::__erase_nodes_if(__cont, __pred); }
_GLIBCXX_END_NAMESPACE_VERSION
+
+namespace pmr {
+_GLIBCXX_BEGIN_NAMESPACE_VERSION
+
+ template<typename _Key, typename _Compare = less<_Key>>
+ using set = std::set<_Key, _Compare, polymorphic_allocator<_Key>>;
+
+ template<typename _Key, typename _Compare = less<_Key>>
+ using multiset = std::multiset<_Key, _Compare,
+ polymorphic_allocator<_Key>>;
+
+_GLIBCXX_END_NAMESPACE_VERSION
+} // namespace pmr
+
} // namespace fundamentals_v2
} // namespace experimental
} // namespace std
diff --git a/libstdc++-v3/include/experimental/string b/libstdc++-v3/include/experimental/string
index 2a04ce0d72d..3549c0933b3 100644
--- a/libstdc++-v3/include/experimental/string
+++ b/libstdc++-v3/include/experimental/string
@@ -37,6 +37,7 @@
#include <string>
#include <algorithm>
+#include <experimental/memory_resource>
namespace std _GLIBCXX_VISIBILITY(default)
{
@@ -64,6 +65,27 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
}
_GLIBCXX_END_NAMESPACE_VERSION
+
+namespace pmr {
+_GLIBCXX_BEGIN_NAMESPACE_VERSION
+_GLIBCXX_BEGIN_NAMESPACE_CXX11
+
+ // basic_string using polymorphic allocator in namespace pmr
+ template<typename _CharT, typename _Traits = char_traits<_CharT>>
+ using basic_string =
+ std::basic_string<_CharT, _Traits, polymorphic_allocator<_CharT>>;
+
+ // basic_string typedef names using polymorphic allocator in namespace
+ // std::experimental::pmr
+ typedef basic_string<char> string;
+ typedef basic_string<char16_t> u16string;
+ typedef basic_string<char32_t> u32string;
+ typedef basic_string<wchar_t> wstring;
+
+_GLIBCXX_END_NAMESPACE_CXX11
+_GLIBCXX_END_NAMESPACE_VERSION
+} // namespace pmr
+
} // namespace fundamentals_v2
} // namespace experimental
} // namespace std
diff --git a/libstdc++-v3/include/experimental/type_traits b/libstdc++-v3/include/experimental/type_traits
index b0ed3b0fa66..e4f3ffef004 100644
--- a/libstdc++-v3/include/experimental/type_traits
+++ b/libstdc++-v3/include/experimental/type_traits
@@ -271,6 +271,35 @@ template<typename _To, template<typename...> class _Op, typename... _Args>
constexpr bool is_detected_convertible_v
= is_detected_convertible<_To, _Op, _Args...>::value;
+#define __cpp_lib_experimental_logical_traits 201511
+
+template<typename... _Bn>
+ struct conjunction
+ : __and_<_Bn...>
+ { };
+
+template<typename... _Bn>
+ struct disjunction
+ : __or_<_Bn...>
+ { };
+
+template<typename _Pp>
+ struct negation
+ : __not_<_Pp>
+ { };
+
+template<typename... _Bn>
+ constexpr bool conjunction_v
+ = conjunction<_Bn...>::value;
+
+template<typename... _Bn>
+ constexpr bool disjunction_v
+ = disjunction<_Bn...>::value;
+
+template<typename _Pp>
+ constexpr bool negation_v
+ = negation<_Pp>::value;
+
_GLIBCXX_END_NAMESPACE_VERSION
} // namespace fundamentals_v2
} // namespace experimental
diff --git a/libstdc++-v3/include/experimental/unordered_map b/libstdc++-v3/include/experimental/unordered_map
index c80c3828ded..9fb14e7d2ce 100644
--- a/libstdc++-v3/include/experimental/unordered_map
+++ b/libstdc++-v3/include/experimental/unordered_map
@@ -37,6 +37,7 @@
#include <unordered_map>
#include <experimental/bits/erase_if.h>
+#include <experimental/memory_resource>
namespace std _GLIBCXX_VISIBILITY(default)
{
@@ -61,6 +62,25 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
{ __detail::__erase_nodes_if(__cont, __pred); }
_GLIBCXX_END_NAMESPACE_VERSION
+
+namespace pmr {
+_GLIBCXX_BEGIN_NAMESPACE_VERSION
+
+ template<typename _Key, typename _Tp, typename _Hash = hash<_Key>,
+ typename _Pred = equal_to<_Key>>
+ using unordered_map
+ = std::unordered_map<_Key, _Tp, _Hash, _Pred,
+ polymorphic_allocator<pair<const _Key, _Tp>>>;
+
+ template<typename _Key, typename _Tp, typename _Hash = hash<_Key>,
+ typename _Pred = equal_to<_Key>>
+ using unordered_multimap
+ = std::unordered_multimap<_Key, _Tp, _Hash, _Pred,
+ polymorphic_allocator<pair<const _Key, _Tp>>>;
+
+_GLIBCXX_END_NAMESPACE_VERSION
+} // namespace pmr
+
} // namespace fundamentals_v2
} // namespace experimental
} // namespace std
diff --git a/libstdc++-v3/include/experimental/unordered_set b/libstdc++-v3/include/experimental/unordered_set
index 8461f9ccb91..038d23498aa 100644
--- a/libstdc++-v3/include/experimental/unordered_set
+++ b/libstdc++-v3/include/experimental/unordered_set
@@ -37,6 +37,7 @@
#include <unordered_set>
#include <experimental/bits/erase_if.h>
+#include <experimental/memory_resource>
namespace std _GLIBCXX_VISIBILITY(default)
{
@@ -61,6 +62,24 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
{ __detail::__erase_nodes_if(__cont, __pred); }
_GLIBCXX_END_NAMESPACE_VERSION
+
+namespace pmr {
+_GLIBCXX_BEGIN_NAMESPACE_VERSION
+
+ template<typename _Key, typename _Hash = hash<_Key>,
+ typename _Pred = equal_to<_Key>>
+ using unordered_set
+ = std::unordered_set<_Key, _Hash, _Pred, polymorphic_allocator<_Key>>;
+
+ template<typename _Key, typename _Hash = hash<_Key>,
+ typename _Pred = equal_to<_Key>>
+ using unordered_multiset
+ = std::unordered_multiset<_Key, _Hash, _Pred,
+ polymorphic_allocator<_Key>>;
+
+_GLIBCXX_END_NAMESPACE_VERSION
+} // namespace pmr
+
} // namespace fundamentals_v2
} // namespace experimental
} // namespace std
diff --git a/libstdc++-v3/include/experimental/utility b/libstdc++-v3/include/experimental/utility
new file mode 100644
index 00000000000..b1aaceee056
--- /dev/null
+++ b/libstdc++-v3/include/experimental/utility
@@ -0,0 +1,48 @@
+// <experimental/utility> -*- C++ -*-
+
+// Copyright (C) 2015 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// 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/>.
+
+/** @file experimental/utility
+ * This is a TS C++ Library header.
+ */
+
+#ifndef _GLIBCXX_EXPERIMENTAL_UTILITY
+#define _GLIBCXX_EXPERIMENTAL_UTILITY 1
+
+#include <utility>
+#include <bits/uses_allocator.h>
+
+namespace std {
+namespace experimental {
+inline namespace fundamentals_v2 {
+_GLIBCXX_BEGIN_NAMESPACE_VERSION
+
+ // 3.1.2, erased-type placeholder
+ using erased_type = std::__erased_type;
+
+_GLIBCXX_END_NAMESPACE_VERSION
+} // namespace fundamentals_v2
+} // namespace experimental
+} // namespace std
+
+#endif
diff --git a/libstdc++-v3/include/experimental/vector b/libstdc++-v3/include/experimental/vector
index 37645a144ca..cddb7473939 100644
--- a/libstdc++-v3/include/experimental/vector
+++ b/libstdc++-v3/include/experimental/vector
@@ -37,6 +37,7 @@
#include <vector>
#include <algorithm>
+#include <experimental/memory_resource>
namespace std _GLIBCXX_VISIBILITY(default)
{
@@ -65,6 +66,16 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
}
_GLIBCXX_END_NAMESPACE_VERSION
+
+namespace pmr {
+_GLIBCXX_BEGIN_NAMESPACE_VERSION
+
+ template<typename _Tp>
+ using vector = std::vector<_Tp, polymorphic_allocator<_Tp>>;
+
+_GLIBCXX_END_NAMESPACE_VERSION
+} // namespace pmr
+
} // namespace fundamentals_v2
} // namespace experimental
} // namespace std
diff --git a/libstdc++-v3/include/ext/vstring.h b/libstdc++-v3/include/ext/vstring.h
index 68acd576528..8732bd38891 100644
--- a/libstdc++-v3/include/ext/vstring.h
+++ b/libstdc++-v3/include/ext/vstring.h
@@ -2680,7 +2680,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
_GLIBCXX_END_NAMESPACE_VERSION
} // namespace
-#if ((__cplusplus >= 201103L) && defined(_GLIBCXX_USE_C99))
+#if __cplusplus >= 201103L
#include <ext/string_conversions.h>
@@ -2688,6 +2688,7 @@ namespace __gnu_cxx _GLIBCXX_VISIBILITY(default)
{
_GLIBCXX_BEGIN_NAMESPACE_VERSION
+#if _GLIBCXX_USE_C99_STDLIB
// 21.4 Numeric Conversions [string.conversions].
inline int
stoi(const __vstring& __str, std::size_t* __idx = 0, int __base = 10)
@@ -2726,7 +2727,9 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
inline long double
stold(const __vstring& __str, std::size_t* __idx = 0)
{ return __gnu_cxx::__stoa(&std::strtold, "stold", __str.c_str(), __idx); }
+#endif // _GLIBCXX_USE_C99_STDLIB
+#if _GLIBCXX_USE_C99_STDIO
// NB: (v)snprintf vs sprintf.
// DR 1261.
@@ -2789,8 +2792,9 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
return __gnu_cxx::__to_xstring<__vstring>(&std::vsnprintf, __n,
"%Lf", __val);
}
+#endif // _GLIBCXX_USE_C99_STDIO
-#ifdef _GLIBCXX_USE_WCHAR_T
+#if defined(_GLIBCXX_USE_WCHAR_T) && defined(_GLIBCXX_USE_C99_WCHAR)
inline int
stoi(const __wvstring& __str, std::size_t* __idx = 0, int __base = 10)
{ return __gnu_cxx::__stoa<long, int>(&std::wcstol, "stoi", __str.c_str(),
@@ -2890,8 +2894,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
return __gnu_cxx::__to_xstring<__wvstring>(&std::vswprintf, __n,
L"%Lf", __val);
}
-#endif
-#endif
+#endif // _GLIBCXX_HAVE_BROKEN_VSWPRINTF
+#endif // _GLIBCXX_USE_WCHAR_T && _GLIBCXX_USE_C99_WCHAR
_GLIBCXX_END_NAMESPACE_VERSION
} // namespace
diff --git a/libstdc++-v3/include/std/complex b/libstdc++-v3/include/std/complex
index 5ed4fd571f1..f1d3b79f504 100644
--- a/libstdc++-v3/include/std/complex
+++ b/libstdc++-v3/include/std/complex
@@ -995,7 +995,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
complex<_Tp>
pow(const complex<_Tp>& __x, const _Tp& __y)
{
-#ifndef _GLIBCXX_USE_C99_COMPLEX
+#if ! _GLIBCXX_USE_C99_COMPLEX
if (__x == _Tp())
return _Tp();
#endif
@@ -1831,7 +1831,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
arg(_Tp __x)
{
typedef typename __gnu_cxx::__promote<_Tp>::__type __type;
-#if (_GLIBCXX_USE_C99_MATH && !_GLIBCXX_USE_C99_FP_MACROS_DYNAMIC)
+#if (_GLIBCXX11_USE_C99_MATH && !_GLIBCXX_USE_C99_FP_MACROS_DYNAMIC)
return std::signbit(__x) ? __type(3.1415926535897932384626433832795029L)
: __type();
#else
diff --git a/libstdc++-v3/include/std/thread b/libstdc++-v3/include/std/thread
index c67ec46123f..8c01feb7927 100644
--- a/libstdc++-v3/include/std/thread
+++ b/libstdc++-v3/include/std/thread
@@ -38,6 +38,7 @@
#include <chrono>
#include <functional>
#include <memory>
+#include <cerrno>
#include <bits/functexcept.h>
#include <bits/functional_hash.h>
#include <bits/gthr.h>
@@ -297,7 +298,8 @@ _GLIBCXX_END_NAMESPACE_VERSION
static_cast<std::time_t>(__s.count()),
static_cast<long>(__ns.count())
};
- ::nanosleep(&__ts, 0);
+ while (::nanosleep(&__ts, &__ts) == -1 && errno == EINTR)
+ { }
#else
__sleep_for(__s, __ns);
#endif
@@ -309,8 +311,17 @@ _GLIBCXX_END_NAMESPACE_VERSION
sleep_until(const chrono::time_point<_Clock, _Duration>& __atime)
{
auto __now = _Clock::now();
- if (__now < __atime)
- sleep_for(__atime - __now);
+ if (_Clock::is_steady)
+ {
+ if (__now < __atime)
+ sleep_for(__atime - __now);
+ return;
+ }
+ while (__now < __atime)
+ {
+ sleep_for(__atime - __now);
+ __now = _Clock::now();
+ }
}
_GLIBCXX_END_NAMESPACE_VERSION
diff --git a/libstdc++-v3/include/std/type_traits b/libstdc++-v3/include/std/type_traits
index 7448d5b836f..e5102def906 100644
--- a/libstdc++-v3/include/std/type_traits
+++ b/libstdc++-v3/include/std/type_traits
@@ -154,6 +154,26 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
: public integral_constant<bool, !_Pp::value>
{ };
+#if __cplusplus > 201402L
+
+#define __cpp_lib_logical_traits 201511
+
+ template<typename... _Bn>
+ struct conjunction
+ : __and_<_Bn...>
+ { };
+
+ template<typename... _Bn>
+ struct disjunction
+ : __or_<_Bn...>
+ { };
+
+ template<typename _Pp>
+ struct negation
+ : __not_<_Pp>
+ { };
+#endif
+
// For several sfinae-friendly trait implementations we transport both the
// result information (as the member type) and the failure information (no
// member type). This is very similar to std::enable_if, but we cannot use
diff --git a/libstdc++-v3/include/tr1/cstdio b/libstdc++-v3/include/tr1/cstdio
index 76818230090..b8fc04f72c6 100644
--- a/libstdc++-v3/include/tr1/cstdio
+++ b/libstdc++-v3/include/tr1/cstdio
@@ -33,7 +33,7 @@
#include <cstdio>
-#if _GLIBCXX_USE_C99
+#if _GLIBCXX_USE_C99_STDIO
namespace std _GLIBCXX_VISIBILITY(default)
{
diff --git a/libstdc++-v3/include/tr1/cstdlib b/libstdc++-v3/include/tr1/cstdlib
index c3c65eb8fbb..35a91334c94 100644
--- a/libstdc++-v3/include/tr1/cstdlib
+++ b/libstdc++-v3/include/tr1/cstdlib
@@ -35,7 +35,7 @@
#if _GLIBCXX_HOSTED
-#if _GLIBCXX_USE_C99
+#if _GLIBCXX_USE_C99_STDLIB
namespace std _GLIBCXX_VISIBILITY(default)
{
@@ -65,7 +65,7 @@ namespace tr1
}
}
-#endif // _GLIBCXX_USE_C99
+#endif // _GLIBCXX_USE_C99_STDLIB
#endif // _GLIBCXX_HOSTED
diff --git a/libstdc++-v3/include/tr1/cwchar b/libstdc++-v3/include/tr1/cwchar
index 10772ee278a..0db2262f7b1 100644
--- a/libstdc++-v3/include/tr1/cwchar
+++ b/libstdc++-v3/include/tr1/cwchar
@@ -52,7 +52,7 @@ namespace tr1
using std::vwscanf;
#endif
-#if _GLIBCXX_USE_C99
+#if _GLIBCXX_USE_C99_WCHAR
using std::wcstold;
using std::wcstoll;
using std::wcstoull;
diff --git a/libstdc++-v3/include/tr1/stdlib.h b/libstdc++-v3/include/tr1/stdlib.h
index 310c7bc67a6..5e826d6270a 100644
--- a/libstdc++-v3/include/tr1/stdlib.h
+++ b/libstdc++-v3/include/tr1/stdlib.h
@@ -33,7 +33,7 @@
#if _GLIBCXX_HOSTED
-#if _GLIBCXX_USE_C99
+#if _GLIBCXX_USE_C99_STDLIB
using std::tr1::atoll;
using std::tr1::strtoll;
diff --git a/libstdc++-v3/libsupc++/exception_ptr.h b/libstdc++-v3/libsupc++/exception_ptr.h
index 8fbad1c86d1..7821c149f0e 100644
--- a/libstdc++-v3/libsupc++/exception_ptr.h
+++ b/libstdc++-v3/libsupc++/exception_ptr.h
@@ -68,6 +68,8 @@ namespace std
namespace __exception_ptr
{
+ using std::rethrow_exception;
+
/**
* @brief An opaque pointer to an arbitrary exception.
* @ingroup exceptions
diff --git a/libstdc++-v3/libsupc++/new b/libstdc++-v3/libsupc++/new
index 0f6a05a9b71..8621f73d5c2 100644
--- a/libstdc++-v3/libsupc++/new
+++ b/libstdc++-v3/libsupc++/new
@@ -79,7 +79,12 @@ namespace std
};
#endif
- struct nothrow_t { };
+ struct nothrow_t
+ {
+#if __cplusplus >= 201103L
+ explicit nothrow_t() = default;
+#endif
+ };
extern const nothrow_t nothrow;
diff --git a/libstdc++-v3/libsupc++/new_handler.cc b/libstdc++-v3/libsupc++/new_handler.cc
index a09012c8db4..4da48b3c21d 100644
--- a/libstdc++-v3/libsupc++/new_handler.cc
+++ b/libstdc++-v3/libsupc++/new_handler.cc
@@ -34,7 +34,7 @@ namespace
}
#endif
-const std::nothrow_t std::nothrow = { };
+const std::nothrow_t std::nothrow = std::nothrow_t{ };
using std::new_handler;
namespace
diff --git a/libstdc++-v3/src/c++11/thread.cc b/libstdc++-v3/src/c++11/thread.cc
index e116afa0ccb..3407e80a0a3 100644
--- a/libstdc++-v3/src/c++11/thread.cc
+++ b/libstdc++-v3/src/c++11/thread.cc
@@ -221,7 +221,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
static_cast<std::time_t>(__s.count()),
static_cast<long>(__ns.count())
};
- ::nanosleep(&__ts, 0);
+ while (::nanosleep(&__ts, &__ts) == -1 && errno == EINTR)
+ { }
#elif defined(_GLIBCXX_HAVE_SLEEP)
# ifdef _GLIBCXX_HAVE_USLEEP
::sleep(__s.count());
diff --git a/libstdc++-v3/src/c++98/locale_facets.cc b/libstdc++-v3/src/c++98/locale_facets.cc
index 071f79ebbae..28b6f3aabb7 100644
--- a/libstdc++-v3/src/c++98/locale_facets.cc
+++ b/libstdc++-v3/src/c++98/locale_facets.cc
@@ -72,7 +72,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
ios_base::fmtflags __fltfield = __flags & ios_base::floatfield;
-#ifdef _GLIBCXX_USE_C99
+#if _GLIBCXX_USE_C99_STDIO
// Precision is always used except for hexfloat format.
if (__fltfield != (ios_base::fixed | ios_base::scientific))
#endif
@@ -89,7 +89,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
*__fptr++ = 'f';
else if (__fltfield == ios_base::scientific)
*__fptr++ = (__flags & ios_base::uppercase) ? 'E' : 'e';
-#ifdef _GLIBCXX_USE_C99
+#if _GLIBCXX_USE_C99_STDIO
else if (__fltfield == (ios_base::fixed | ios_base::scientific))
*__fptr++ = (__flags & ios_base::uppercase) ? 'A' : 'a';
#endif
diff --git a/libstdc++-v3/testsuite/17_intro/tag_type_explicit_ctor.cc b/libstdc++-v3/testsuite/17_intro/tag_type_explicit_ctor.cc
new file mode 100644
index 00000000000..4b9d217ccdb
--- /dev/null
+++ b/libstdc++-v3/testsuite/17_intro/tag_type_explicit_ctor.cc
@@ -0,0 +1,60 @@
+// { dg-do compile }
+// { dg-options "-std=gnu++11" }
+
+// Copyright (C) 2015 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING3. If not see
+// <http://www.gnu.org/licenses/>.
+
+#include <new>
+#include <utility>
+#include <memory>
+#include <mutex>
+
+void f1(std::nothrow_t);
+void f2(std::piecewise_construct_t);
+void f3(std::allocator_arg_t);
+void f4(std::defer_lock_t);
+void f5(std::try_to_lock_t);
+void f6(std::adopt_lock_t);
+
+
+int main()
+{
+ std::nothrow_t v1;
+ std::piecewise_construct_t v2;
+ std::allocator_arg_t v3;
+ std::defer_lock_t v4;
+ std::try_to_lock_t v5;
+ std::try_to_lock_t v6;
+ std::nothrow_t v7 = {}; // { dg-error "explicit" }
+ std::piecewise_construct_t v8 = {}; // { dg-error "explicit" }
+ std::allocator_arg_t v9 = {}; // { dg-error "explicit" }
+ std::defer_lock_t v10 = {}; // { dg-error "explicit" }
+ std::try_to_lock_t v11 = {}; // { dg-error "explicit" }
+ std::try_to_lock_t v12 = {}; // { dg-error "explicit" }
+ f1(std::nothrow_t{});
+ f2(std::piecewise_construct_t{});
+ f3(std::allocator_arg_t{});
+ f4(std::defer_lock_t{});
+ f5(std::try_to_lock_t{});
+ f6(std::adopt_lock_t{});
+ f1({}); // { dg-error "explicit" }
+ f2({}); // { dg-error "explicit" }
+ f3({}); // { dg-error "explicit" }
+ f4({}); // { dg-error "explicit" }
+ f5({}); // { dg-error "explicit" }
+ f6({}); // { dg-error "explicit" }
+}
diff --git a/libstdc++-v3/testsuite/18_support/exception_ptr/60612-terminate.cc b/libstdc++-v3/testsuite/18_support/exception_ptr/60612-terminate.cc
index 5f0a4bfb5e2..1a53c06aa21 100644
--- a/libstdc++-v3/testsuite/18_support/exception_ptr/60612-terminate.cc
+++ b/libstdc++-v3/testsuite/18_support/exception_ptr/60612-terminate.cc
@@ -23,7 +23,7 @@
#include <exception>
#include <stdlib.h>
-#ifdef _GLIBCXX_USE_C99
+#if _GLIBCXX_USE_C99_STDLIB
void terminate() { _Exit(0); }
void f() noexcept
@@ -39,7 +39,7 @@ void f() noexcept
int main()
{
-#ifdef _GLIBCXX_USE_C99
+#if _GLIBCXX_USE_C99_STDLIB
f();
#endif
return 0;
diff --git a/libstdc++-v3/testsuite/18_support/exception_ptr/60612-unexpected.cc b/libstdc++-v3/testsuite/18_support/exception_ptr/60612-unexpected.cc
index ed3930aaf0b..3f8e08d008f 100644
--- a/libstdc++-v3/testsuite/18_support/exception_ptr/60612-unexpected.cc
+++ b/libstdc++-v3/testsuite/18_support/exception_ptr/60612-unexpected.cc
@@ -23,7 +23,7 @@
#include <exception>
#include <stdlib.h>
-#ifdef _GLIBCXX_USE_C99
+#if _GLIBCXX_USE_C99_STDLIB
void unexpected() { _Exit(0); }
void f() throw()
@@ -39,7 +39,7 @@ void f() throw()
int main()
{
-#ifdef _GLIBCXX_USE_C99
+#if _GLIBCXX_USE_C99_STDLIB
f();
#endif
}
diff --git a/libstdc++-v3/testsuite/18_support/exception_ptr/rethrow_exception.cc b/libstdc++-v3/testsuite/18_support/exception_ptr/rethrow_exception.cc
index 31da2ecbe82..7d3989213e3 100644
--- a/libstdc++-v3/testsuite/18_support/exception_ptr/rethrow_exception.cc
+++ b/libstdc++-v3/testsuite/18_support/exception_ptr/rethrow_exception.cc
@@ -30,7 +30,6 @@
void test01()
{
- bool test __attribute__((unused)) = true;
using namespace std;
try {
@@ -54,7 +53,6 @@ void test02()
void test03()
{
- bool test __attribute__((unused)) = true;
using namespace std;
exception_ptr ep;
@@ -71,7 +69,6 @@ void test03()
void test04()
{
- bool test __attribute__((unused)) = true;
using namespace std;
// Weave the exceptions in an attempt to confuse the machinery.
@@ -103,12 +100,23 @@ void test04()
}
}
+void test05()
+{
+ // libstdc++/64651 std::rethrow_exception not found by ADL
+ // This is not required to work but is a conforming extension.
+ try {
+ rethrow_exception(std::make_exception_ptr(0));
+ } catch(...) {
+ }
+}
+
int main()
{
test01();
test02();
test03();
test04();
+ test05();
return 0;
}
diff --git a/libstdc++-v3/testsuite/20_util/declval/requirements/1_neg.cc b/libstdc++-v3/testsuite/20_util/declval/requirements/1_neg.cc
index 4e7deda4a20..37bc6b10da6 100644
--- a/libstdc++-v3/testsuite/20_util/declval/requirements/1_neg.cc
+++ b/libstdc++-v3/testsuite/20_util/declval/requirements/1_neg.cc
@@ -19,7 +19,7 @@
// with this library; see the file COPYING3. If not see
// <http://www.gnu.org/licenses/>.
-// { dg-error "static assertion failed" "" { target *-*-* } 2239 }
+// { dg-error "static assertion failed" "" { target *-*-* } 2259 }
#include <utility>
diff --git a/libstdc++-v3/testsuite/20_util/logical_traits/requirements/explicit_instantiation.cc b/libstdc++-v3/testsuite/20_util/logical_traits/requirements/explicit_instantiation.cc
new file mode 100644
index 00000000000..b2b6c71e6cf
--- /dev/null
+++ b/libstdc++-v3/testsuite/20_util/logical_traits/requirements/explicit_instantiation.cc
@@ -0,0 +1,30 @@
+// { dg-options "-std=gnu++17" }
+// { dg-do compile }
+
+// Copyright (C) 2015 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING3. If not see
+// <http://www.gnu.org/licenses/>.
+
+// NB: This file is for testing type_traits with NO OTHER INCLUDES.
+
+#include <type_traits>
+
+namespace std
+{
+ template struct conjunction<true_type, true_type>;
+ template struct disjunction<false_type, true_type>;
+ template struct negation<false_type>;
+}
diff --git a/libstdc++-v3/testsuite/20_util/logical_traits/requirements/typedefs.cc b/libstdc++-v3/testsuite/20_util/logical_traits/requirements/typedefs.cc
new file mode 100644
index 00000000000..ea102f87206
--- /dev/null
+++ b/libstdc++-v3/testsuite/20_util/logical_traits/requirements/typedefs.cc
@@ -0,0 +1,55 @@
+// { dg-options "-std=gnu++17" }
+//
+// Copyright (C) 2015 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING3. If not see
+// <http://www.gnu.org/licenses/>.
+
+//
+// NB: This file is for testing type_traits with NO OTHER INCLUDES.
+
+#include <type_traits>
+
+// { dg-do compile }
+
+void test01()
+{
+ // Check for required typedefs
+ typedef std::conjunction<std::true_type, std::true_type> test_type;
+ typedef test_type::value_type value_type;
+ typedef test_type::type type;
+ typedef test_type::type::value_type type_value_type;
+ typedef test_type::type::type type_type;
+}
+
+void test02()
+{
+ // Check for required typedefs
+ typedef std::disjunction<std::false_type, std::true_type> test_type;
+ typedef test_type::value_type value_type;
+ typedef test_type::type type;
+ typedef test_type::type::value_type type_value_type;
+ typedef test_type::type::type type_type;
+}
+
+void test03()
+{
+ // Check for required typedefs
+ typedef std::negation<std::false_type> test_type;
+ typedef test_type::value_type value_type;
+ typedef test_type::type type;
+ typedef test_type::type::value_type type_value_type;
+ typedef test_type::type::type type_type;
+}
diff --git a/libstdc++-v3/testsuite/20_util/logical_traits/value.cc b/libstdc++-v3/testsuite/20_util/logical_traits/value.cc
new file mode 100644
index 00000000000..1da95a3e49d
--- /dev/null
+++ b/libstdc++-v3/testsuite/20_util/logical_traits/value.cc
@@ -0,0 +1,45 @@
+// { dg-options "-std=gnu++17" }
+// { dg-do compile }
+//
+// Copyright (C) 2015 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING3. If not see
+// <http://www.gnu.org/licenses/>.
+
+#include <type_traits>
+
+void test01()
+{
+ static_assert(std::negation<std::false_type>{});
+ static_assert(!std::negation<std::true_type>{});
+ static_assert(std::conjunction<>{});
+ static_assert(!std::disjunction<>{});
+ static_assert(std::conjunction<std::true_type>{});
+ static_assert(!std::conjunction<std::false_type>{});
+ static_assert(std::disjunction<std::true_type>{});
+ static_assert(!std::disjunction<std::false_type>{});
+ static_assert(std::conjunction<std::true_type, std::true_type>{});
+ static_assert(!std::conjunction<std::true_type, std::false_type>{});
+ static_assert(std::disjunction<std::false_type, std::true_type>{});
+ static_assert(!std::disjunction<std::false_type, std::false_type>{});
+ static_assert(std::conjunction<std::true_type, std::true_type,
+ std::true_type>{});
+ static_assert(!std::conjunction<std::true_type, std::true_type,
+ std::false_type>{});
+ static_assert(std::disjunction<std::false_type, std::false_type,
+ std::true_type>{});
+ static_assert(!std::disjunction<std::false_type, std::false_type,
+ std::false_type>{});
+}
diff --git a/libstdc++-v3/testsuite/20_util/make_signed/requirements/typedefs_neg.cc b/libstdc++-v3/testsuite/20_util/make_signed/requirements/typedefs_neg.cc
index 8e5fe532f34..9fbd95b2760 100644
--- a/libstdc++-v3/testsuite/20_util/make_signed/requirements/typedefs_neg.cc
+++ b/libstdc++-v3/testsuite/20_util/make_signed/requirements/typedefs_neg.cc
@@ -48,4 +48,4 @@ void test01()
// { dg-error "required from here" "" { target *-*-* } 40 }
// { dg-error "required from here" "" { target *-*-* } 42 }
-// { dg-error "invalid use of incomplete type" "" { target *-*-* } 1904 }
+// { dg-error "invalid use of incomplete type" "" { target *-*-* } 1924 }
diff --git a/libstdc++-v3/testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc b/libstdc++-v3/testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc
index 4cd03115c26..8060aeec854 100644
--- a/libstdc++-v3/testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc
+++ b/libstdc++-v3/testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc
@@ -48,5 +48,5 @@ void test01()
// { dg-error "required from here" "" { target *-*-* } 40 }
// { dg-error "required from here" "" { target *-*-* } 42 }
-// { dg-error "invalid use of incomplete type" "" { target *-*-* } 1800 }
-// { dg-error "declaration of" "" { target *-*-* } 1757 }
+// { dg-error "invalid use of incomplete type" "" { target *-*-* } 1820 }
+// { dg-error "declaration of" "" { target *-*-* } 1777 }
diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/numeric_conversions/wchar_t/stod.cc b/libstdc++-v3/testsuite/21_strings/basic_string/numeric_conversions/wchar_t/stod.cc
index c270d76a21e..ea284ccd529 100644
--- a/libstdc++-v3/testsuite/21_strings/basic_string/numeric_conversions/wchar_t/stod.cc
+++ b/libstdc++-v3/testsuite/21_strings/basic_string/numeric_conversions/wchar_t/stod.cc
@@ -29,7 +29,7 @@
void
test01()
{
-#ifdef _GLIBCXX_USE_C99
+#if _GLIBCXX_USE_C99_WCHAR
bool test __attribute__((unused)) = false;
using namespace std;
diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/numeric_conversions/wchar_t/stof.cc b/libstdc++-v3/testsuite/21_strings/basic_string/numeric_conversions/wchar_t/stof.cc
index 2bb7aea19de..fd54d57c6ff 100644
--- a/libstdc++-v3/testsuite/21_strings/basic_string/numeric_conversions/wchar_t/stof.cc
+++ b/libstdc++-v3/testsuite/21_strings/basic_string/numeric_conversions/wchar_t/stof.cc
@@ -29,7 +29,7 @@
void
test01()
{
-#ifdef _GLIBCXX_USE_C99
+#if _GLIBCXX_USE_C99_WCHAR
bool test __attribute__((unused)) = false;
using namespace std;
diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/numeric_conversions/wchar_t/stoi.cc b/libstdc++-v3/testsuite/21_strings/basic_string/numeric_conversions/wchar_t/stoi.cc
index 24aceb69ee7..8cd0ea1ff99 100644
--- a/libstdc++-v3/testsuite/21_strings/basic_string/numeric_conversions/wchar_t/stoi.cc
+++ b/libstdc++-v3/testsuite/21_strings/basic_string/numeric_conversions/wchar_t/stoi.cc
@@ -29,7 +29,7 @@
void
test01()
{
-#ifdef _GLIBCXX_USE_C99
+#if _GLIBCXX_USE_C99_WCHAR
bool test __attribute__((unused)) = false;
using namespace std;
diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/numeric_conversions/wchar_t/stol.cc b/libstdc++-v3/testsuite/21_strings/basic_string/numeric_conversions/wchar_t/stol.cc
index bc50156747a..9be3f391507 100644
--- a/libstdc++-v3/testsuite/21_strings/basic_string/numeric_conversions/wchar_t/stol.cc
+++ b/libstdc++-v3/testsuite/21_strings/basic_string/numeric_conversions/wchar_t/stol.cc
@@ -29,7 +29,7 @@
void
test01()
{
-#ifdef _GLIBCXX_USE_C99
+#if _GLIBCXX_USE_C99_WCHAR
bool test __attribute__((unused)) = false;
using namespace std;
diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/numeric_conversions/wchar_t/stold.cc b/libstdc++-v3/testsuite/21_strings/basic_string/numeric_conversions/wchar_t/stold.cc
index 1461adbe878..7d9e414970d 100644
--- a/libstdc++-v3/testsuite/21_strings/basic_string/numeric_conversions/wchar_t/stold.cc
+++ b/libstdc++-v3/testsuite/21_strings/basic_string/numeric_conversions/wchar_t/stold.cc
@@ -29,7 +29,7 @@
void
test01()
{
-#ifdef _GLIBCXX_USE_C99
+#if _GLIBCXX_USE_C99_WCHAR
bool test __attribute__((unused)) = false;
using namespace std;
diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/numeric_conversions/wchar_t/stoll.cc b/libstdc++-v3/testsuite/21_strings/basic_string/numeric_conversions/wchar_t/stoll.cc
index cc91c247fb2..2927da3382b 100644
--- a/libstdc++-v3/testsuite/21_strings/basic_string/numeric_conversions/wchar_t/stoll.cc
+++ b/libstdc++-v3/testsuite/21_strings/basic_string/numeric_conversions/wchar_t/stoll.cc
@@ -29,7 +29,7 @@
void
test01()
{
-#ifdef _GLIBCXX_USE_C99
+#if _GLIBCXX_USE_C99_WCHAR
bool test __attribute__((unused)) = false;
using namespace std;
diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/numeric_conversions/wchar_t/stoul.cc b/libstdc++-v3/testsuite/21_strings/basic_string/numeric_conversions/wchar_t/stoul.cc
index 6c26c2bb0f4..256cee546b3 100644
--- a/libstdc++-v3/testsuite/21_strings/basic_string/numeric_conversions/wchar_t/stoul.cc
+++ b/libstdc++-v3/testsuite/21_strings/basic_string/numeric_conversions/wchar_t/stoul.cc
@@ -29,7 +29,7 @@
void
test01()
{
-#ifdef _GLIBCXX_USE_C99
+#if _GLIBCXX_USE_C99_WCHAR
bool test __attribute__((unused)) = false;
using namespace std;
diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/numeric_conversions/wchar_t/stoull.cc b/libstdc++-v3/testsuite/21_strings/basic_string/numeric_conversions/wchar_t/stoull.cc
index 91b64793394..e102c6a0018 100644
--- a/libstdc++-v3/testsuite/21_strings/basic_string/numeric_conversions/wchar_t/stoull.cc
+++ b/libstdc++-v3/testsuite/21_strings/basic_string/numeric_conversions/wchar_t/stoull.cc
@@ -29,7 +29,7 @@
void
test01()
{
-#ifdef _GLIBCXX_USE_C99
+#if _GLIBCXX_USE_C99_WCHAR
bool test __attribute__((unused)) = false;
using namespace std;
diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/numeric_conversions/wchar_t/to_wstring.cc b/libstdc++-v3/testsuite/21_strings/basic_string/numeric_conversions/wchar_t/to_wstring.cc
index e36c30e0955..467bd9fc46e 100644
--- a/libstdc++-v3/testsuite/21_strings/basic_string/numeric_conversions/wchar_t/to_wstring.cc
+++ b/libstdc++-v3/testsuite/21_strings/basic_string/numeric_conversions/wchar_t/to_wstring.cc
@@ -27,7 +27,7 @@
void
test01()
{
-#ifdef _GLIBCXX_USE_C99
+#if _GLIBCXX_USE_C99_WCHAR
bool test __attribute__((unused)) = true;
using namespace std;
diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/always_noconv/char/wrapped_env.cc b/libstdc++-v3/testsuite/22_locale/codecvt/always_noconv/char/wrapped_env.cc
index eddb670b8b9..0e4b03b732f 100644
--- a/libstdc++-v3/testsuite/22_locale/codecvt/always_noconv/char/wrapped_env.cc
+++ b/libstdc++-v3/testsuite/22_locale/codecvt/always_noconv/char/wrapped_env.cc
@@ -1,4 +1,4 @@
-// { dg-require-namedlocale "de_DE" }
+// { dg-require-namedlocale "de_DE.ISO8859-15" }
// 2001-08-15 Benjamin Kosnik <bkoz@redhat.com>
@@ -32,6 +32,6 @@ int main()
using namespace __gnu_test;
func_callback two;
two.push_back(&test01);
- run_tests_wrapped_env("de_DE", "LANG", two);
+ run_tests_wrapped_env(ISO_8859(15,de_DE), "LANG", two);
return 0;
}
diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/always_noconv/char/wrapped_locale.cc b/libstdc++-v3/testsuite/22_locale/codecvt/always_noconv/char/wrapped_locale.cc
index b899fafbe90..43e2381d2cb 100644
--- a/libstdc++-v3/testsuite/22_locale/codecvt/always_noconv/char/wrapped_locale.cc
+++ b/libstdc++-v3/testsuite/22_locale/codecvt/always_noconv/char/wrapped_locale.cc
@@ -1,4 +1,4 @@
-// { dg-require-namedlocale "ja_JP.eucjp" }
+// { dg-require-namedlocale "ja_JP.eucJP" }
// 2001-08-15 Benjamin Kosnik <bkoz@redhat.com>
@@ -32,6 +32,6 @@ int main()
using namespace __gnu_test;
func_callback two;
two.push_back(&test01);
- run_tests_wrapped_locale("ja_JP.eucjp", two);
+ run_tests_wrapped_locale("ja_JP.eucJP", two);
return 0;
}
diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/always_noconv/wchar_t/2.cc b/libstdc++-v3/testsuite/22_locale/codecvt/always_noconv/wchar_t/2.cc
index 37ac8870a9e..7fbcd85f5fb 100644
--- a/libstdc++-v3/testsuite/22_locale/codecvt/always_noconv/wchar_t/2.cc
+++ b/libstdc++-v3/testsuite/22_locale/codecvt/always_noconv/wchar_t/2.cc
@@ -1,4 +1,4 @@
-// { dg-require-namedlocale "en_US.ISO-8859-1" }
+// { dg-require-namedlocale "en_US.ISO8859-1" }
// 2003-02-06 Petur Runolfsson <peturr02@ru.is>
@@ -27,14 +27,14 @@
// Required instantiation
// codecvt<wchar_t, char, mbstate_t>
//
-// Baseline test in ISO-8859-1 locale
+// Baseline test in ISO8859-1 locale
void test02()
{
using namespace std;
bool test __attribute__((unused)) = true;
typedef codecvt<wchar_t, char, mbstate_t> w_codecvt;
- locale loc = locale("en_US.ISO-8859-1");
+ locale loc = locale(ISO_8859(1,en_US));
locale::global(loc);
const w_codecvt* cvt = &use_facet<w_codecvt>(loc);
diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/always_noconv/wchar_t/3.cc b/libstdc++-v3/testsuite/22_locale/codecvt/always_noconv/wchar_t/3.cc
index 9f50fc45bfd..6d737843a14 100644
--- a/libstdc++-v3/testsuite/22_locale/codecvt/always_noconv/wchar_t/3.cc
+++ b/libstdc++-v3/testsuite/22_locale/codecvt/always_noconv/wchar_t/3.cc
@@ -1,4 +1,4 @@
-// { dg-require-namedlocale "en_US.ISO-8859-15" }
+// { dg-require-namedlocale "en_US.ISO8859-1" }
// 2003-02-06 Petur Runolfsson <peturr02@ru.is>
@@ -27,14 +27,14 @@
// Required instantiation
// codecvt<wchar_t, char, mbstate_t>
//
-// Baseline test in ISO-8859-15 locale
+// Baseline test in ISO8859-1 locale
void test03()
{
using namespace std;
bool test __attribute__((unused)) = true;
typedef codecvt<wchar_t, char, mbstate_t> w_codecvt;
- locale loc = locale("en_US.ISO-8859-15");
+ locale loc = locale(ISO_8859(1,en_US));
locale::global(loc);
const w_codecvt* cvt = &use_facet<w_codecvt>(loc);
diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/always_noconv/wchar_t/wrapped_env.cc b/libstdc++-v3/testsuite/22_locale/codecvt/always_noconv/wchar_t/wrapped_env.cc
index eddb670b8b9..0e4b03b732f 100644
--- a/libstdc++-v3/testsuite/22_locale/codecvt/always_noconv/wchar_t/wrapped_env.cc
+++ b/libstdc++-v3/testsuite/22_locale/codecvt/always_noconv/wchar_t/wrapped_env.cc
@@ -1,4 +1,4 @@
-// { dg-require-namedlocale "de_DE" }
+// { dg-require-namedlocale "de_DE.ISO8859-15" }
// 2001-08-15 Benjamin Kosnik <bkoz@redhat.com>
@@ -32,6 +32,6 @@ int main()
using namespace __gnu_test;
func_callback two;
two.push_back(&test01);
- run_tests_wrapped_env("de_DE", "LANG", two);
+ run_tests_wrapped_env(ISO_8859(15,de_DE), "LANG", two);
return 0;
}
diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/always_noconv/wchar_t/wrapped_locale.cc b/libstdc++-v3/testsuite/22_locale/codecvt/always_noconv/wchar_t/wrapped_locale.cc
index b899fafbe90..43e2381d2cb 100644
--- a/libstdc++-v3/testsuite/22_locale/codecvt/always_noconv/wchar_t/wrapped_locale.cc
+++ b/libstdc++-v3/testsuite/22_locale/codecvt/always_noconv/wchar_t/wrapped_locale.cc
@@ -1,4 +1,4 @@
-// { dg-require-namedlocale "ja_JP.eucjp" }
+// { dg-require-namedlocale "ja_JP.eucJP" }
// 2001-08-15 Benjamin Kosnik <bkoz@redhat.com>
@@ -32,6 +32,6 @@ int main()
using namespace __gnu_test;
func_callback two;
two.push_back(&test01);
- run_tests_wrapped_locale("ja_JP.eucjp", two);
+ run_tests_wrapped_locale("ja_JP.eucJP", two);
return 0;
}
diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/encoding/char/wrapped_env.cc b/libstdc++-v3/testsuite/22_locale/codecvt/encoding/char/wrapped_env.cc
index eddb670b8b9..0e4b03b732f 100644
--- a/libstdc++-v3/testsuite/22_locale/codecvt/encoding/char/wrapped_env.cc
+++ b/libstdc++-v3/testsuite/22_locale/codecvt/encoding/char/wrapped_env.cc
@@ -1,4 +1,4 @@
-// { dg-require-namedlocale "de_DE" }
+// { dg-require-namedlocale "de_DE.ISO8859-15" }
// 2001-08-15 Benjamin Kosnik <bkoz@redhat.com>
@@ -32,6 +32,6 @@ int main()
using namespace __gnu_test;
func_callback two;
two.push_back(&test01);
- run_tests_wrapped_env("de_DE", "LANG", two);
+ run_tests_wrapped_env(ISO_8859(15,de_DE), "LANG", two);
return 0;
}
diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/encoding/char/wrapped_locale.cc b/libstdc++-v3/testsuite/22_locale/codecvt/encoding/char/wrapped_locale.cc
index b899fafbe90..43e2381d2cb 100644
--- a/libstdc++-v3/testsuite/22_locale/codecvt/encoding/char/wrapped_locale.cc
+++ b/libstdc++-v3/testsuite/22_locale/codecvt/encoding/char/wrapped_locale.cc
@@ -1,4 +1,4 @@
-// { dg-require-namedlocale "ja_JP.eucjp" }
+// { dg-require-namedlocale "ja_JP.eucJP" }
// 2001-08-15 Benjamin Kosnik <bkoz@redhat.com>
@@ -32,6 +32,6 @@ int main()
using namespace __gnu_test;
func_callback two;
two.push_back(&test01);
- run_tests_wrapped_locale("ja_JP.eucjp", two);
+ run_tests_wrapped_locale("ja_JP.eucJP", two);
return 0;
}
diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/encoding/wchar_t/2.cc b/libstdc++-v3/testsuite/22_locale/codecvt/encoding/wchar_t/2.cc
index 96b15677a25..5e21cbb09f7 100644
--- a/libstdc++-v3/testsuite/22_locale/codecvt/encoding/wchar_t/2.cc
+++ b/libstdc++-v3/testsuite/22_locale/codecvt/encoding/wchar_t/2.cc
@@ -1,4 +1,4 @@
-// { dg-require-namedlocale "en_US.ISO-8859-1" }
+// { dg-require-namedlocale "en_US.ISO8859-1" }
// 2003-02-06 Petur Runolfsson <peturr02@ru.is>
@@ -27,19 +27,19 @@
// Required instantiation
// codecvt<wchar_t, char, mbstate_t>
//
-// Test do_encoding with ISO-8859-1 locale.
+// Test do_encoding with ISO8859-1 locale.
void test02()
{
using namespace std;
typedef codecvt<wchar_t, char, mbstate_t> w_codecvt;
bool test __attribute__((unused)) = true;
- locale loc = locale("en_US.ISO-8859-1");
+ locale loc = locale(ISO_8859(1,en_US));
locale::global(loc);
const w_codecvt* cvt = &use_facet<w_codecvt>(loc);
int i = cvt->encoding();
- VERIFY( i == 1 ); // ISO-8859-1 is a single-byte encoding
+ VERIFY( i == 1 ); // ISO8859-1 is a single-byte encoding
}
int main ()
diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/encoding/wchar_t/3.cc b/libstdc++-v3/testsuite/22_locale/codecvt/encoding/wchar_t/3.cc
index b5d1d40c6fe..a2070f60e40 100644
--- a/libstdc++-v3/testsuite/22_locale/codecvt/encoding/wchar_t/3.cc
+++ b/libstdc++-v3/testsuite/22_locale/codecvt/encoding/wchar_t/3.cc
@@ -1,4 +1,4 @@
-// { dg-require-namedlocale "en_US.ISO-8859-15" }
+// { dg-require-namedlocale "en_US.ISO8859-1" }
// 2003-02-06 Petur Runolfsson <peturr02@ru.is>
@@ -27,19 +27,19 @@
// Required instantiation
// codecvt<wchar_t, char, mbstate_t>
//
-// Test do_encoding with ISO-8859-15 locale.
+// Test do_encoding with ISO8859-1 locale.
void test03()
{
using namespace std;
typedef codecvt<wchar_t, char, mbstate_t> w_codecvt;
bool test __attribute__((unused)) = true;
- locale loc = locale("en_US.ISO-8859-15");
+ locale loc = locale(ISO_8859(1,en_US));
locale::global(loc);
const w_codecvt* cvt = &use_facet<w_codecvt>(loc);
int i = cvt->encoding();
- VERIFY( i == 1 ); // ISO-8859-15 is a single-byte encoding
+ VERIFY( i == 1 ); // ISO8859-1 is a single-byte encoding
}
int main ()
diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/encoding/wchar_t/wrapped_env.cc b/libstdc++-v3/testsuite/22_locale/codecvt/encoding/wchar_t/wrapped_env.cc
index eddb670b8b9..0e4b03b732f 100644
--- a/libstdc++-v3/testsuite/22_locale/codecvt/encoding/wchar_t/wrapped_env.cc
+++ b/libstdc++-v3/testsuite/22_locale/codecvt/encoding/wchar_t/wrapped_env.cc
@@ -1,4 +1,4 @@
-// { dg-require-namedlocale "de_DE" }
+// { dg-require-namedlocale "de_DE.ISO8859-15" }
// 2001-08-15 Benjamin Kosnik <bkoz@redhat.com>
@@ -32,6 +32,6 @@ int main()
using namespace __gnu_test;
func_callback two;
two.push_back(&test01);
- run_tests_wrapped_env("de_DE", "LANG", two);
+ run_tests_wrapped_env(ISO_8859(15,de_DE), "LANG", two);
return 0;
}
diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/encoding/wchar_t/wrapped_locale.cc b/libstdc++-v3/testsuite/22_locale/codecvt/encoding/wchar_t/wrapped_locale.cc
index b899fafbe90..43e2381d2cb 100644
--- a/libstdc++-v3/testsuite/22_locale/codecvt/encoding/wchar_t/wrapped_locale.cc
+++ b/libstdc++-v3/testsuite/22_locale/codecvt/encoding/wchar_t/wrapped_locale.cc
@@ -1,4 +1,4 @@
-// { dg-require-namedlocale "ja_JP.eucjp" }
+// { dg-require-namedlocale "ja_JP.eucJP" }
// 2001-08-15 Benjamin Kosnik <bkoz@redhat.com>
@@ -32,6 +32,6 @@ int main()
using namespace __gnu_test;
func_callback two;
two.push_back(&test01);
- run_tests_wrapped_locale("ja_JP.eucjp", two);
+ run_tests_wrapped_locale("ja_JP.eucJP", two);
return 0;
}
diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/in/char/wrapped_env.cc b/libstdc++-v3/testsuite/22_locale/codecvt/in/char/wrapped_env.cc
index eddb670b8b9..0e4b03b732f 100644
--- a/libstdc++-v3/testsuite/22_locale/codecvt/in/char/wrapped_env.cc
+++ b/libstdc++-v3/testsuite/22_locale/codecvt/in/char/wrapped_env.cc
@@ -1,4 +1,4 @@
-// { dg-require-namedlocale "de_DE" }
+// { dg-require-namedlocale "de_DE.ISO8859-15" }
// 2001-08-15 Benjamin Kosnik <bkoz@redhat.com>
@@ -32,6 +32,6 @@ int main()
using namespace __gnu_test;
func_callback two;
two.push_back(&test01);
- run_tests_wrapped_env("de_DE", "LANG", two);
+ run_tests_wrapped_env(ISO_8859(15,de_DE), "LANG", two);
return 0;
}
diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/in/char/wrapped_locale.cc b/libstdc++-v3/testsuite/22_locale/codecvt/in/char/wrapped_locale.cc
index b899fafbe90..43e2381d2cb 100644
--- a/libstdc++-v3/testsuite/22_locale/codecvt/in/char/wrapped_locale.cc
+++ b/libstdc++-v3/testsuite/22_locale/codecvt/in/char/wrapped_locale.cc
@@ -1,4 +1,4 @@
-// { dg-require-namedlocale "ja_JP.eucjp" }
+// { dg-require-namedlocale "ja_JP.eucJP" }
// 2001-08-15 Benjamin Kosnik <bkoz@redhat.com>
@@ -32,6 +32,6 @@ int main()
using namespace __gnu_test;
func_callback two;
two.push_back(&test01);
- run_tests_wrapped_locale("ja_JP.eucjp", two);
+ run_tests_wrapped_locale("ja_JP.eucJP", two);
return 0;
}
diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/in/wchar_t/2.cc b/libstdc++-v3/testsuite/22_locale/codecvt/in/wchar_t/2.cc
index a0445adb2af..21d1aed7f08 100644
--- a/libstdc++-v3/testsuite/22_locale/codecvt/in/wchar_t/2.cc
+++ b/libstdc++-v3/testsuite/22_locale/codecvt/in/wchar_t/2.cc
@@ -1,4 +1,4 @@
-// { dg-require-namedlocale "en_US.ISO-8859-1" }
+// { dg-require-namedlocale "en_US.ISO8859-1" }
// 2003-02-06 Petur Runolfsson <peturr02@ru.is>
@@ -41,7 +41,7 @@ zero_state(std::mbstate_t& state)
// Required instantiation
// codecvt<wchar_t, char, mbstate_t>
//
-// Baseline test for ISO-8859-1. Converts entire charset.
+// Baseline test for ISO8859-1. Converts entire charset.
void test02()
{
using namespace std;
@@ -90,7 +90,7 @@ void test02()
wmemset(i_ref, 0xdeadbeef, size + 1);
int_type* ito_next;
- locale loc = locale("en_US.ISO-8859-1");
+ locale loc = locale(ISO_8859(1,en_US));
locale::global(loc);
const w_codecvt* cvt = &use_facet<w_codecvt>(loc);
diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/in/wchar_t/wrapped_env.cc b/libstdc++-v3/testsuite/22_locale/codecvt/in/wchar_t/wrapped_env.cc
index eddb670b8b9..0e4b03b732f 100644
--- a/libstdc++-v3/testsuite/22_locale/codecvt/in/wchar_t/wrapped_env.cc
+++ b/libstdc++-v3/testsuite/22_locale/codecvt/in/wchar_t/wrapped_env.cc
@@ -1,4 +1,4 @@
-// { dg-require-namedlocale "de_DE" }
+// { dg-require-namedlocale "de_DE.ISO8859-15" }
// 2001-08-15 Benjamin Kosnik <bkoz@redhat.com>
@@ -32,6 +32,6 @@ int main()
using namespace __gnu_test;
func_callback two;
two.push_back(&test01);
- run_tests_wrapped_env("de_DE", "LANG", two);
+ run_tests_wrapped_env(ISO_8859(15,de_DE), "LANG", two);
return 0;
}
diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/in/wchar_t/wrapped_locale.cc b/libstdc++-v3/testsuite/22_locale/codecvt/in/wchar_t/wrapped_locale.cc
index b899fafbe90..43e2381d2cb 100644
--- a/libstdc++-v3/testsuite/22_locale/codecvt/in/wchar_t/wrapped_locale.cc
+++ b/libstdc++-v3/testsuite/22_locale/codecvt/in/wchar_t/wrapped_locale.cc
@@ -1,4 +1,4 @@
-// { dg-require-namedlocale "ja_JP.eucjp" }
+// { dg-require-namedlocale "ja_JP.eucJP" }
// 2001-08-15 Benjamin Kosnik <bkoz@redhat.com>
@@ -32,6 +32,6 @@ int main()
using namespace __gnu_test;
func_callback two;
two.push_back(&test01);
- run_tests_wrapped_locale("ja_JP.eucjp", two);
+ run_tests_wrapped_locale("ja_JP.eucJP", two);
return 0;
}
diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/length/char/wrapped_env.cc b/libstdc++-v3/testsuite/22_locale/codecvt/length/char/wrapped_env.cc
index eddb670b8b9..0e4b03b732f 100644
--- a/libstdc++-v3/testsuite/22_locale/codecvt/length/char/wrapped_env.cc
+++ b/libstdc++-v3/testsuite/22_locale/codecvt/length/char/wrapped_env.cc
@@ -1,4 +1,4 @@
-// { dg-require-namedlocale "de_DE" }
+// { dg-require-namedlocale "de_DE.ISO8859-15" }
// 2001-08-15 Benjamin Kosnik <bkoz@redhat.com>
@@ -32,6 +32,6 @@ int main()
using namespace __gnu_test;
func_callback two;
two.push_back(&test01);
- run_tests_wrapped_env("de_DE", "LANG", two);
+ run_tests_wrapped_env(ISO_8859(15,de_DE), "LANG", two);
return 0;
}
diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/length/char/wrapped_locale.cc b/libstdc++-v3/testsuite/22_locale/codecvt/length/char/wrapped_locale.cc
index b899fafbe90..43e2381d2cb 100644
--- a/libstdc++-v3/testsuite/22_locale/codecvt/length/char/wrapped_locale.cc
+++ b/libstdc++-v3/testsuite/22_locale/codecvt/length/char/wrapped_locale.cc
@@ -1,4 +1,4 @@
-// { dg-require-namedlocale "ja_JP.eucjp" }
+// { dg-require-namedlocale "ja_JP.eucJP" }
// 2001-08-15 Benjamin Kosnik <bkoz@redhat.com>
@@ -32,6 +32,6 @@ int main()
using namespace __gnu_test;
func_callback two;
two.push_back(&test01);
- run_tests_wrapped_locale("ja_JP.eucjp", two);
+ run_tests_wrapped_locale("ja_JP.eucJP", two);
return 0;
}
diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/length/wchar_t/2.cc b/libstdc++-v3/testsuite/22_locale/codecvt/length/wchar_t/2.cc
index 5c4fbb0a684..d108a431b27 100644
--- a/libstdc++-v3/testsuite/22_locale/codecvt/length/wchar_t/2.cc
+++ b/libstdc++-v3/testsuite/22_locale/codecvt/length/wchar_t/2.cc
@@ -1,4 +1,4 @@
-// { dg-require-namedlocale "en_US.ISO-8859-1" }
+// { dg-require-namedlocale "en_US.ISO8859-1" }
// 2003-02-06 Petur Runolfsson <peturr02@ru.is>
@@ -63,7 +63,7 @@ void test02()
"\xff";
int size = strlen(e_lit);
- locale loc = locale("en_US.ISO-8859-1");
+ locale loc = locale(ISO_8859(1,en_US));
locale::global(loc);
const w_codecvt* cvt = &use_facet<w_codecvt>(loc);
diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/length/wchar_t/3.cc b/libstdc++-v3/testsuite/22_locale/codecvt/length/wchar_t/3.cc
index ed9aec33859..e39a6fa33b9 100644
--- a/libstdc++-v3/testsuite/22_locale/codecvt/length/wchar_t/3.cc
+++ b/libstdc++-v3/testsuite/22_locale/codecvt/length/wchar_t/3.cc
@@ -1,4 +1,4 @@
-// { dg-require-namedlocale "en_US.ISO-8859-15" }
+// { dg-require-namedlocale "en_US.ISO8859-1" }
// 2003-02-06 Petur Runolfsson <peturr02@ru.is>
@@ -63,7 +63,7 @@ void test03()
"\xff";
int size = strlen(e_lit);
- locale loc = locale("en_US.ISO-8859-15");
+ locale loc = locale(ISO_8859(1,en_US));
locale::global(loc);
const w_codecvt* cvt = &use_facet<w_codecvt>(loc);
diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/length/wchar_t/wrapped_env.cc b/libstdc++-v3/testsuite/22_locale/codecvt/length/wchar_t/wrapped_env.cc
index eddb670b8b9..0e4b03b732f 100644
--- a/libstdc++-v3/testsuite/22_locale/codecvt/length/wchar_t/wrapped_env.cc
+++ b/libstdc++-v3/testsuite/22_locale/codecvt/length/wchar_t/wrapped_env.cc
@@ -1,4 +1,4 @@
-// { dg-require-namedlocale "de_DE" }
+// { dg-require-namedlocale "de_DE.ISO8859-15" }
// 2001-08-15 Benjamin Kosnik <bkoz@redhat.com>
@@ -32,6 +32,6 @@ int main()
using namespace __gnu_test;
func_callback two;
two.push_back(&test01);
- run_tests_wrapped_env("de_DE", "LANG", two);
+ run_tests_wrapped_env(ISO_8859(15,de_DE), "LANG", two);
return 0;
}
diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/length/wchar_t/wrapped_locale.cc b/libstdc++-v3/testsuite/22_locale/codecvt/length/wchar_t/wrapped_locale.cc
index b899fafbe90..43e2381d2cb 100644
--- a/libstdc++-v3/testsuite/22_locale/codecvt/length/wchar_t/wrapped_locale.cc
+++ b/libstdc++-v3/testsuite/22_locale/codecvt/length/wchar_t/wrapped_locale.cc
@@ -1,4 +1,4 @@
-// { dg-require-namedlocale "ja_JP.eucjp" }
+// { dg-require-namedlocale "ja_JP.eucJP" }
// 2001-08-15 Benjamin Kosnik <bkoz@redhat.com>
@@ -32,6 +32,6 @@ int main()
using namespace __gnu_test;
func_callback two;
two.push_back(&test01);
- run_tests_wrapped_locale("ja_JP.eucjp", two);
+ run_tests_wrapped_locale("ja_JP.eucJP", two);
return 0;
}
diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/max_length/char/wrapped_env.cc b/libstdc++-v3/testsuite/22_locale/codecvt/max_length/char/wrapped_env.cc
index eddb670b8b9..0e4b03b732f 100644
--- a/libstdc++-v3/testsuite/22_locale/codecvt/max_length/char/wrapped_env.cc
+++ b/libstdc++-v3/testsuite/22_locale/codecvt/max_length/char/wrapped_env.cc
@@ -1,4 +1,4 @@
-// { dg-require-namedlocale "de_DE" }
+// { dg-require-namedlocale "de_DE.ISO8859-15" }
// 2001-08-15 Benjamin Kosnik <bkoz@redhat.com>
@@ -32,6 +32,6 @@ int main()
using namespace __gnu_test;
func_callback two;
two.push_back(&test01);
- run_tests_wrapped_env("de_DE", "LANG", two);
+ run_tests_wrapped_env(ISO_8859(15,de_DE), "LANG", two);
return 0;
}
diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/max_length/char/wrapped_locale.cc b/libstdc++-v3/testsuite/22_locale/codecvt/max_length/char/wrapped_locale.cc
index b899fafbe90..43e2381d2cb 100644
--- a/libstdc++-v3/testsuite/22_locale/codecvt/max_length/char/wrapped_locale.cc
+++ b/libstdc++-v3/testsuite/22_locale/codecvt/max_length/char/wrapped_locale.cc
@@ -1,4 +1,4 @@
-// { dg-require-namedlocale "ja_JP.eucjp" }
+// { dg-require-namedlocale "ja_JP.eucJP" }
// 2001-08-15 Benjamin Kosnik <bkoz@redhat.com>
@@ -32,6 +32,6 @@ int main()
using namespace __gnu_test;
func_callback two;
two.push_back(&test01);
- run_tests_wrapped_locale("ja_JP.eucjp", two);
+ run_tests_wrapped_locale("ja_JP.eucJP", two);
return 0;
}
diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/max_length/wchar_t/2.cc b/libstdc++-v3/testsuite/22_locale/codecvt/max_length/wchar_t/2.cc
index d0d3831a1ff..7b0c286be5d 100644
--- a/libstdc++-v3/testsuite/22_locale/codecvt/max_length/wchar_t/2.cc
+++ b/libstdc++-v3/testsuite/22_locale/codecvt/max_length/wchar_t/2.cc
@@ -1,4 +1,4 @@
-// { dg-require-namedlocale "en_US.ISO-8859-1" }
+// { dg-require-namedlocale "en_US.ISO8859-1" }
// 2003-02-06 Petur Runolfsson <peturr02@ru.is>
@@ -32,12 +32,12 @@ void test02()
bool test __attribute__((unused)) = true;
typedef codecvt<wchar_t, char, mbstate_t> w_codecvt;
- locale loc = locale("en_US.ISO-8859-1");
+ locale loc = locale(ISO_8859(1,en_US));
locale::global(loc);
const w_codecvt* cvt = &use_facet<w_codecvt>(loc);
int k = cvt->max_length();
- VERIFY( k == 1 ); // ISO-8859-1 is a single-byte encoding
+ VERIFY( k == 1 ); // ISO8859-1 is a single-byte encoding
}
int main ()
diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/max_length/wchar_t/3.cc b/libstdc++-v3/testsuite/22_locale/codecvt/max_length/wchar_t/3.cc
index 269a15d8056..3111fc6ad8a 100644
--- a/libstdc++-v3/testsuite/22_locale/codecvt/max_length/wchar_t/3.cc
+++ b/libstdc++-v3/testsuite/22_locale/codecvt/max_length/wchar_t/3.cc
@@ -1,4 +1,4 @@
-// { dg-require-namedlocale "en_US.ISO-8859-15" }
+// { dg-require-namedlocale "en_US.ISO8859-1" }
// 2003-02-06 Petur Runolfsson <peturr02@ru.is>
@@ -32,12 +32,12 @@ void test03()
bool test __attribute__((unused)) = true;
typedef codecvt<wchar_t, char, mbstate_t> w_codecvt;
- locale loc = locale("en_US.ISO-8859-15");
+ locale loc = locale(ISO_8859(1,en_US));
locale::global(loc);
const w_codecvt* cvt = &use_facet<w_codecvt>(loc);
int k = cvt->max_length();
- VERIFY( k == 1 ); // ISO-8859-15 is a single-byte encoding
+ VERIFY( k == 1 ); // ISO8859-1 is a single-byte encoding
}
int main ()
diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/max_length/wchar_t/wrapped_env.cc b/libstdc++-v3/testsuite/22_locale/codecvt/max_length/wchar_t/wrapped_env.cc
index eddb670b8b9..0e4b03b732f 100644
--- a/libstdc++-v3/testsuite/22_locale/codecvt/max_length/wchar_t/wrapped_env.cc
+++ b/libstdc++-v3/testsuite/22_locale/codecvt/max_length/wchar_t/wrapped_env.cc
@@ -1,4 +1,4 @@
-// { dg-require-namedlocale "de_DE" }
+// { dg-require-namedlocale "de_DE.ISO8859-15" }
// 2001-08-15 Benjamin Kosnik <bkoz@redhat.com>
@@ -32,6 +32,6 @@ int main()
using namespace __gnu_test;
func_callback two;
two.push_back(&test01);
- run_tests_wrapped_env("de_DE", "LANG", two);
+ run_tests_wrapped_env(ISO_8859(15,de_DE), "LANG", two);
return 0;
}
diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/max_length/wchar_t/wrapped_locale.cc b/libstdc++-v3/testsuite/22_locale/codecvt/max_length/wchar_t/wrapped_locale.cc
index b899fafbe90..43e2381d2cb 100644
--- a/libstdc++-v3/testsuite/22_locale/codecvt/max_length/wchar_t/wrapped_locale.cc
+++ b/libstdc++-v3/testsuite/22_locale/codecvt/max_length/wchar_t/wrapped_locale.cc
@@ -1,4 +1,4 @@
-// { dg-require-namedlocale "ja_JP.eucjp" }
+// { dg-require-namedlocale "ja_JP.eucJP" }
// 2001-08-15 Benjamin Kosnik <bkoz@redhat.com>
@@ -32,6 +32,6 @@ int main()
using namespace __gnu_test;
func_callback two;
two.push_back(&test01);
- run_tests_wrapped_locale("ja_JP.eucjp", two);
+ run_tests_wrapped_locale("ja_JP.eucJP", two);
return 0;
}
diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/out/char/wrapped_env.cc b/libstdc++-v3/testsuite/22_locale/codecvt/out/char/wrapped_env.cc
index eddb670b8b9..0e4b03b732f 100644
--- a/libstdc++-v3/testsuite/22_locale/codecvt/out/char/wrapped_env.cc
+++ b/libstdc++-v3/testsuite/22_locale/codecvt/out/char/wrapped_env.cc
@@ -1,4 +1,4 @@
-// { dg-require-namedlocale "de_DE" }
+// { dg-require-namedlocale "de_DE.ISO8859-15" }
// 2001-08-15 Benjamin Kosnik <bkoz@redhat.com>
@@ -32,6 +32,6 @@ int main()
using namespace __gnu_test;
func_callback two;
two.push_back(&test01);
- run_tests_wrapped_env("de_DE", "LANG", two);
+ run_tests_wrapped_env(ISO_8859(15,de_DE), "LANG", two);
return 0;
}
diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/out/char/wrapped_locale.cc b/libstdc++-v3/testsuite/22_locale/codecvt/out/char/wrapped_locale.cc
index b899fafbe90..43e2381d2cb 100644
--- a/libstdc++-v3/testsuite/22_locale/codecvt/out/char/wrapped_locale.cc
+++ b/libstdc++-v3/testsuite/22_locale/codecvt/out/char/wrapped_locale.cc
@@ -1,4 +1,4 @@
-// { dg-require-namedlocale "ja_JP.eucjp" }
+// { dg-require-namedlocale "ja_JP.eucJP" }
// 2001-08-15 Benjamin Kosnik <bkoz@redhat.com>
@@ -32,6 +32,6 @@ int main()
using namespace __gnu_test;
func_callback two;
two.push_back(&test01);
- run_tests_wrapped_locale("ja_JP.eucjp", two);
+ run_tests_wrapped_locale("ja_JP.eucJP", two);
return 0;
}
diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/out/wchar_t/2.cc b/libstdc++-v3/testsuite/22_locale/codecvt/out/wchar_t/2.cc
index 9939eb4481b..f3628b4e31c 100644
--- a/libstdc++-v3/testsuite/22_locale/codecvt/out/wchar_t/2.cc
+++ b/libstdc++-v3/testsuite/22_locale/codecvt/out/wchar_t/2.cc
@@ -1,4 +1,4 @@
-// { dg-require-namedlocale "en_US.ISO-8859-1" }
+// { dg-require-namedlocale "en_US.ISO8859-1" }
// 2003-02-06 Petur Runolfsson <peturr02@ru.is>
@@ -88,7 +88,7 @@ void test02()
memset(e_ref, 0xf0, size + 1);
ext_type* eto_next;
- locale loc = locale("en_US.ISO-8859-1");
+ locale loc = locale(ISO_8859(1,en_US));
locale::global(loc);
const w_codecvt* cvt = &use_facet<w_codecvt>(loc);
diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/out/wchar_t/7.cc b/libstdc++-v3/testsuite/22_locale/codecvt/out/wchar_t/7.cc
index 7027815cda6..8fad77fc2ad 100644
--- a/libstdc++-v3/testsuite/22_locale/codecvt/out/wchar_t/7.cc
+++ b/libstdc++-v3/testsuite/22_locale/codecvt/out/wchar_t/7.cc
@@ -1,4 +1,4 @@
-// { dg-require-namedlocale "en_US.ISO-8859-1" }
+// { dg-require-namedlocale "en_US.ISO8859-1" }
// 2003-02-06 Petur Runolfsson <peturr02@ru.is>
@@ -60,7 +60,7 @@ void test03()
memset(e_ref, 0xf0, size + 1);
ext_type* eto_next;
- locale loc = locale("en_US.ISO-8859-1");
+ locale loc = locale(ISO_8859(1,en_US));
locale::global(loc);
const w_codecvt* cvt = &use_facet<w_codecvt>(loc);
diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/out/wchar_t/wrapped_env.cc b/libstdc++-v3/testsuite/22_locale/codecvt/out/wchar_t/wrapped_env.cc
index eddb670b8b9..0e4b03b732f 100644
--- a/libstdc++-v3/testsuite/22_locale/codecvt/out/wchar_t/wrapped_env.cc
+++ b/libstdc++-v3/testsuite/22_locale/codecvt/out/wchar_t/wrapped_env.cc
@@ -1,4 +1,4 @@
-// { dg-require-namedlocale "de_DE" }
+// { dg-require-namedlocale "de_DE.ISO8859-15" }
// 2001-08-15 Benjamin Kosnik <bkoz@redhat.com>
@@ -32,6 +32,6 @@ int main()
using namespace __gnu_test;
func_callback two;
two.push_back(&test01);
- run_tests_wrapped_env("de_DE", "LANG", two);
+ run_tests_wrapped_env(ISO_8859(15,de_DE), "LANG", two);
return 0;
}
diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/out/wchar_t/wrapped_locale.cc b/libstdc++-v3/testsuite/22_locale/codecvt/out/wchar_t/wrapped_locale.cc
index b899fafbe90..43e2381d2cb 100644
--- a/libstdc++-v3/testsuite/22_locale/codecvt/out/wchar_t/wrapped_locale.cc
+++ b/libstdc++-v3/testsuite/22_locale/codecvt/out/wchar_t/wrapped_locale.cc
@@ -1,4 +1,4 @@
-// { dg-require-namedlocale "ja_JP.eucjp" }
+// { dg-require-namedlocale "ja_JP.eucJP" }
// 2001-08-15 Benjamin Kosnik <bkoz@redhat.com>
@@ -32,6 +32,6 @@ int main()
using namespace __gnu_test;
func_callback two;
two.push_back(&test01);
- run_tests_wrapped_locale("ja_JP.eucjp", two);
+ run_tests_wrapped_locale("ja_JP.eucJP", two);
return 0;
}
diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/unshift/char/wrapped_env.cc b/libstdc++-v3/testsuite/22_locale/codecvt/unshift/char/wrapped_env.cc
index eddb670b8b9..0e4b03b732f 100644
--- a/libstdc++-v3/testsuite/22_locale/codecvt/unshift/char/wrapped_env.cc
+++ b/libstdc++-v3/testsuite/22_locale/codecvt/unshift/char/wrapped_env.cc
@@ -1,4 +1,4 @@
-// { dg-require-namedlocale "de_DE" }
+// { dg-require-namedlocale "de_DE.ISO8859-15" }
// 2001-08-15 Benjamin Kosnik <bkoz@redhat.com>
@@ -32,6 +32,6 @@ int main()
using namespace __gnu_test;
func_callback two;
two.push_back(&test01);
- run_tests_wrapped_env("de_DE", "LANG", two);
+ run_tests_wrapped_env(ISO_8859(15,de_DE), "LANG", two);
return 0;
}
diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/unshift/char/wrapped_locale.cc b/libstdc++-v3/testsuite/22_locale/codecvt/unshift/char/wrapped_locale.cc
index b899fafbe90..43e2381d2cb 100644
--- a/libstdc++-v3/testsuite/22_locale/codecvt/unshift/char/wrapped_locale.cc
+++ b/libstdc++-v3/testsuite/22_locale/codecvt/unshift/char/wrapped_locale.cc
@@ -1,4 +1,4 @@
-// { dg-require-namedlocale "ja_JP.eucjp" }
+// { dg-require-namedlocale "ja_JP.eucJP" }
// 2001-08-15 Benjamin Kosnik <bkoz@redhat.com>
@@ -32,6 +32,6 @@ int main()
using namespace __gnu_test;
func_callback two;
two.push_back(&test01);
- run_tests_wrapped_locale("ja_JP.eucjp", two);
+ run_tests_wrapped_locale("ja_JP.eucJP", two);
return 0;
}
diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/unshift/wchar_t/2.cc b/libstdc++-v3/testsuite/22_locale/codecvt/unshift/wchar_t/2.cc
index c39e4a59ac9..7c63cb3298e 100644
--- a/libstdc++-v3/testsuite/22_locale/codecvt/unshift/wchar_t/2.cc
+++ b/libstdc++-v3/testsuite/22_locale/codecvt/unshift/wchar_t/2.cc
@@ -1,4 +1,4 @@
-// { dg-require-namedlocale "en_US.ISO-8859-1" }
+// { dg-require-namedlocale "en_US.ISO8859-1" }
// 2003-02-06 Petur Runolfsson <peturr02@ru.is>
@@ -73,7 +73,7 @@ void test02()
memset(e_ref, 0xf0, size + 1);
ext_type* eto_next;
- locale loc = locale("en_US.ISO-8859-1");
+ locale loc = locale(ISO_8859(1,en_US));
locale::global(loc);
const w_codecvt* cvt = &use_facet<w_codecvt>(loc);
diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/unshift/wchar_t/3.cc b/libstdc++-v3/testsuite/22_locale/codecvt/unshift/wchar_t/3.cc
index 5e1a47f22f7..b048854d676 100644
--- a/libstdc++-v3/testsuite/22_locale/codecvt/unshift/wchar_t/3.cc
+++ b/libstdc++-v3/testsuite/22_locale/codecvt/unshift/wchar_t/3.cc
@@ -1,4 +1,4 @@
-// { dg-require-namedlocale "en_US.ISO-8859-15" }
+// { dg-require-namedlocale "en_US.ISO8859-1" }
// 2003-02-06 Petur Runolfsson <peturr02@ru.is>
@@ -87,7 +87,7 @@ void test03()
memset(e_ref, 0xf0, size + 1);
ext_type* eto_next;
- locale loc = locale("en_US.ISO-8859-15");
+ locale loc = locale(ISO_8859(1,en_US));
locale::global(loc);
const w_codecvt* cvt = &use_facet<w_codecvt>(loc);
diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/unshift/wchar_t/wrapped_env.cc b/libstdc++-v3/testsuite/22_locale/codecvt/unshift/wchar_t/wrapped_env.cc
index eddb670b8b9..0e4b03b732f 100644
--- a/libstdc++-v3/testsuite/22_locale/codecvt/unshift/wchar_t/wrapped_env.cc
+++ b/libstdc++-v3/testsuite/22_locale/codecvt/unshift/wchar_t/wrapped_env.cc
@@ -1,4 +1,4 @@
-// { dg-require-namedlocale "de_DE" }
+// { dg-require-namedlocale "de_DE.ISO8859-15" }
// 2001-08-15 Benjamin Kosnik <bkoz@redhat.com>
@@ -32,6 +32,6 @@ int main()
using namespace __gnu_test;
func_callback two;
two.push_back(&test01);
- run_tests_wrapped_env("de_DE", "LANG", two);
+ run_tests_wrapped_env(ISO_8859(15,de_DE), "LANG", two);
return 0;
}
diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/unshift/wchar_t/wrapped_locale.cc b/libstdc++-v3/testsuite/22_locale/codecvt/unshift/wchar_t/wrapped_locale.cc
index b899fafbe90..43e2381d2cb 100644
--- a/libstdc++-v3/testsuite/22_locale/codecvt/unshift/wchar_t/wrapped_locale.cc
+++ b/libstdc++-v3/testsuite/22_locale/codecvt/unshift/wchar_t/wrapped_locale.cc
@@ -1,4 +1,4 @@
-// { dg-require-namedlocale "ja_JP.eucjp" }
+// { dg-require-namedlocale "ja_JP.eucJP" }
// 2001-08-15 Benjamin Kosnik <bkoz@redhat.com>
@@ -32,6 +32,6 @@ int main()
using namespace __gnu_test;
func_callback two;
two.push_back(&test01);
- run_tests_wrapped_locale("ja_JP.eucjp", two);
+ run_tests_wrapped_locale("ja_JP.eucJP", two);
return 0;
}
diff --git a/libstdc++-v3/testsuite/22_locale/codecvt_byname/50714.cc b/libstdc++-v3/testsuite/22_locale/codecvt_byname/50714.cc
index a728d12050f..1c457968729 100644
--- a/libstdc++-v3/testsuite/22_locale/codecvt_byname/50714.cc
+++ b/libstdc++-v3/testsuite/22_locale/codecvt_byname/50714.cc
@@ -1,4 +1,4 @@
-// { dg-require-namedlocale "de_DE" }
+// { dg-require-namedlocale "de_DE.ISO8859-15" }
// Copyright (C) 2011-2015 Free Software Foundation, Inc.
//
@@ -19,6 +19,7 @@
#include <locale>
#include <ext/pod_char_traits.h>
+#include <testsuite_hooks.h>
#define mychar __gnu_cxx::character<unsigned short, int>
@@ -84,7 +85,7 @@ void test01()
}
{
locale loc2(locale::classic(),
- new codecvt_byname<mychar, char, mbstate_t>("de_DE"));
+ new codecvt_byname<mychar, char, mbstate_t>(ISO_8859(15,de_DE)));
}
}
diff --git a/libstdc++-v3/testsuite/22_locale/collate/compare/char/1.cc b/libstdc++-v3/testsuite/22_locale/collate/compare/char/1.cc
index e13c65e78f6..4f55a555d63 100644
--- a/libstdc++-v3/testsuite/22_locale/collate/compare/char/1.cc
+++ b/libstdc++-v3/testsuite/22_locale/collate/compare/char/1.cc
@@ -1,6 +1,6 @@
-// { dg-require-namedlocale "en_US" }
-// { dg-require-namedlocale "fr_FR" }
-// { dg-require-namedlocale "de_DE" }
+// { dg-require-namedlocale "en_US.ISO8859-1" }
+// { dg-require-namedlocale "fr_FR.ISO8859-15" }
+// { dg-require-namedlocale "de_DE.ISO8859-15" }
// 2001-08-15 Benjamin Kosnik <bkoz@redhat.com>
@@ -36,9 +36,9 @@ void test01()
// basic construction
locale loc_c = locale::classic();
- locale loc_us = locale("en_US");
- locale loc_fr = locale("fr_FR");
- locale loc_de = locale("de_DE");
+ locale loc_us = locale(ISO_8859(1,en_US));
+ locale loc_fr = locale(ISO_8859(15,fr_FR));
+ locale loc_de = locale(ISO_8859(15,de_DE));
VERIFY( loc_c != loc_de );
VERIFY( loc_us != loc_fr );
VERIFY( loc_us != loc_de );
diff --git a/libstdc++-v3/testsuite/22_locale/collate/compare/char/2.cc b/libstdc++-v3/testsuite/22_locale/collate/compare/char/2.cc
index 31e71d5f050..e48ff8a7574 100644
--- a/libstdc++-v3/testsuite/22_locale/collate/compare/char/2.cc
+++ b/libstdc++-v3/testsuite/22_locale/collate/compare/char/2.cc
@@ -1,6 +1,6 @@
-// { dg-require-namedlocale "en_US" }
-// { dg-require-namedlocale "fr_FR" }
-// { dg-require-namedlocale "de_DE" }
+// { dg-require-namedlocale "en_US.ISO8859-1" }
+// { dg-require-namedlocale "fr_FR.ISO8859-15" }
+// { dg-require-namedlocale "de_DE.ISO8859-15" }
// 2001-08-15 Benjamin Kosnik <bkoz@redhat.com>
@@ -26,7 +26,7 @@
#include <locale>
#include <testsuite_hooks.h>
-// Check German "de_DE" locale.
+// Check German "de_DE.ISO8859-15" locale.
void test02()
{
using namespace std;
@@ -36,9 +36,9 @@ void test02()
// basic construction
locale loc_c = locale::classic();
- locale loc_us = locale("en_US");
- locale loc_fr = locale("fr_FR");
- locale loc_de = locale("de_DE");
+ locale loc_us = locale(ISO_8859(1,en_US));
+ locale loc_fr = locale(ISO_8859(15,fr_FR));
+ locale loc_de = locale(ISO_8859(15,de_DE));
VERIFY( loc_c != loc_de );
VERIFY( loc_us != loc_fr );
VERIFY( loc_us != loc_de );
diff --git a/libstdc++-v3/testsuite/22_locale/collate/compare/char/3.cc b/libstdc++-v3/testsuite/22_locale/collate/compare/char/3.cc
index 066e0c98370..d18f66bcd4b 100644
--- a/libstdc++-v3/testsuite/22_locale/collate/compare/char/3.cc
+++ b/libstdc++-v3/testsuite/22_locale/collate/compare/char/3.cc
@@ -1,4 +1,4 @@
-// { dg-require-namedlocale "de_DE" }
+// { dg-require-namedlocale "de_DE.ISO8859-15" }
// 2003-02-24 Petur Runolfsson <peturr02@ru.is>
@@ -34,7 +34,7 @@ void test03()
// basic construction
locale loc_c = locale::classic();
- locale loc_de = locale("de_DE");
+ locale loc_de = locale(ISO_8859(15,de_DE));
VERIFY( loc_c != loc_de );
// cache the collate facets
diff --git a/libstdc++-v3/testsuite/22_locale/collate/compare/char/wrapped_env.cc b/libstdc++-v3/testsuite/22_locale/collate/compare/char/wrapped_env.cc
index 39c151f60c0..85d2910d8a8 100644
--- a/libstdc++-v3/testsuite/22_locale/collate/compare/char/wrapped_env.cc
+++ b/libstdc++-v3/testsuite/22_locale/collate/compare/char/wrapped_env.cc
@@ -1,6 +1,6 @@
-// { dg-require-namedlocale "de_DE" }
-// { dg-require-namedlocale "en_US" }
-// { dg-require-namedlocale "fr_FR" }
+// { dg-require-namedlocale "de_DE.ISO8859-15" }
+// { dg-require-namedlocale "en_US.ISO8859-1" }
+// { dg-require-namedlocale "fr_FR.ISO8859-15" }
// 2001-08-15 Benjamin Kosnik <bkoz@redhat.com>
@@ -39,6 +39,6 @@ int main()
func_callback two;
two.push_back(&test01);
two.push_back(&test02);
- run_tests_wrapped_env("de_DE", "LANG", two);
+ run_tests_wrapped_env(ISO_8859(15,de_DE), "LANG", two);
return 0;
}
diff --git a/libstdc++-v3/testsuite/22_locale/collate/compare/char/wrapped_locale.cc b/libstdc++-v3/testsuite/22_locale/collate/compare/char/wrapped_locale.cc
index de4414bdd2c..c4f10d0f293 100644
--- a/libstdc++-v3/testsuite/22_locale/collate/compare/char/wrapped_locale.cc
+++ b/libstdc++-v3/testsuite/22_locale/collate/compare/char/wrapped_locale.cc
@@ -1,7 +1,7 @@
-// { dg-require-namedlocale "ja_JP.eucjp" }
-// { dg-require-namedlocale "fr_FR" }
-// { dg-require-namedlocale "en_US" }
-// { dg-require-namedlocale "de_DE" }
+// { dg-require-namedlocale "ja_JP.eucJP" }
+// { dg-require-namedlocale "fr_FR.ISO8859-15" }
+// { dg-require-namedlocale "en_US.ISO8859-1" }
+// { dg-require-namedlocale "de_DE.ISO8859-15" }
// 2001-08-15 Benjamin Kosnik <bkoz@redhat.com>
@@ -40,6 +40,6 @@ int main()
func_callback two;
two.push_back(&test01);
two.push_back(&test02);
- run_tests_wrapped_locale("ja_JP.eucjp", two);
+ run_tests_wrapped_locale("ja_JP.eucJP", two);
return 0;
}
diff --git a/libstdc++-v3/testsuite/22_locale/collate/compare/wchar_t/1.cc b/libstdc++-v3/testsuite/22_locale/collate/compare/wchar_t/1.cc
index af0b4e35dce..0541f0a160a 100644
--- a/libstdc++-v3/testsuite/22_locale/collate/compare/wchar_t/1.cc
+++ b/libstdc++-v3/testsuite/22_locale/collate/compare/wchar_t/1.cc
@@ -1,6 +1,6 @@
-// { dg-require-namedlocale "en_US" }
-// { dg-require-namedlocale "fr_FR" }
-// { dg-require-namedlocale "de_DE" }
+// { dg-require-namedlocale "en_US.ISO8859-1" }
+// { dg-require-namedlocale "fr_FR.ISO8859-15" }
+// { dg-require-namedlocale "de_DE.ISO8859-15" }
// 2001-08-15 Benjamin Kosnik <bkoz@redhat.com>
@@ -36,9 +36,9 @@ void test01()
// basic construction
locale loc_c = locale::classic();
- locale loc_us = locale("en_US");
- locale loc_fr = locale("fr_FR");
- locale loc_de = locale("de_DE");
+ locale loc_us = locale(ISO_8859(1,en_US));
+ locale loc_fr = locale(ISO_8859(15,fr_FR));
+ locale loc_de = locale(ISO_8859(15,de_DE));
VERIFY( loc_c != loc_de );
VERIFY( loc_us != loc_fr );
VERIFY( loc_us != loc_de );
diff --git a/libstdc++-v3/testsuite/22_locale/collate/compare/wchar_t/2.cc b/libstdc++-v3/testsuite/22_locale/collate/compare/wchar_t/2.cc
index ccf5efac1c4..cef4f2b82e9 100644
--- a/libstdc++-v3/testsuite/22_locale/collate/compare/wchar_t/2.cc
+++ b/libstdc++-v3/testsuite/22_locale/collate/compare/wchar_t/2.cc
@@ -2,9 +2,9 @@
// { dg-xfail-if "" { "*-*-hpux11.23" } { "*" } { "" } } */
// { dg-options "-finput-charset=ISO8859-1" }
// { dg-require-iconv "ISO8859-1" }
-// { dg-require-namedlocale "en_US" }
-// { dg-require-namedlocale "fr_FR" }
-// { dg-require-namedlocale "de_DE" }
+// { dg-require-namedlocale "en_US.ISO8859-1" }
+// { dg-require-namedlocale "fr_FR.ISO8859-15" }
+// { dg-require-namedlocale "de_DE.ISO8859-15" }
// 2001-08-15 Benjamin Kosnik <bkoz@redhat.com>
@@ -30,7 +30,7 @@
#include <locale>
#include <testsuite_hooks.h>
-// Check German "de_DE" locale.
+// Check German "de_DE.ISO8859-15" locale.
void test02()
{
using namespace std;
@@ -40,9 +40,9 @@ void test02()
// basic construction
locale loc_c = locale::classic();
- locale loc_us = locale("en_US");
- locale loc_fr = locale("fr_FR");
- locale loc_de = locale("de_DE");
+ locale loc_us = locale(ISO_8859(1,en_US));
+ locale loc_fr = locale(ISO_8859(15,fr_FR));
+ locale loc_de = locale(ISO_8859(15,de_DE));
VERIFY( loc_c != loc_de );
VERIFY( loc_us != loc_fr );
VERIFY( loc_us != loc_de );
diff --git a/libstdc++-v3/testsuite/22_locale/collate/compare/wchar_t/3.cc b/libstdc++-v3/testsuite/22_locale/collate/compare/wchar_t/3.cc
index 833abde0c75..7036dfc1c3b 100644
--- a/libstdc++-v3/testsuite/22_locale/collate/compare/wchar_t/3.cc
+++ b/libstdc++-v3/testsuite/22_locale/collate/compare/wchar_t/3.cc
@@ -1,4 +1,4 @@
-// { dg-require-namedlocale "de_DE" }
+// { dg-require-namedlocale "de_DE.ISO8859-15" }
// 2003-02-24 Petur Runolfsson <peturr02@ru.is>
@@ -34,7 +34,7 @@ void test03()
// basic construction
locale loc_c = locale::classic();
- locale loc_de = locale("de_DE");
+ locale loc_de = locale(ISO_8859(15,de_DE));
VERIFY( loc_c != loc_de );
// cache the collate facets
diff --git a/libstdc++-v3/testsuite/22_locale/collate/compare/wchar_t/wrapped_env.cc b/libstdc++-v3/testsuite/22_locale/collate/compare/wchar_t/wrapped_env.cc
index 59b16c728c5..3db0d6d29d1 100644
--- a/libstdc++-v3/testsuite/22_locale/collate/compare/wchar_t/wrapped_env.cc
+++ b/libstdc++-v3/testsuite/22_locale/collate/compare/wchar_t/wrapped_env.cc
@@ -2,9 +2,9 @@
// { dg-xfail-if "" { "*-*-hpux11.23" } { "*" } { "" } } */
// { dg-options "-finput-charset=ISO8859-1" }
// { dg-require-iconv "ISO8859-1" }
-// { dg-require-namedlocale "en_US" }
-// { dg-require-namedlocale "fr_FR" }
-// { dg-require-namedlocale "de_DE" }
+// { dg-require-namedlocale "en_US.ISO8859-1" }
+// { dg-require-namedlocale "fr_FR.ISO8859-15" }
+// { dg-require-namedlocale "de_DE.ISO8859-15" }
// 2001-08-15 Benjamin Kosnik <bkoz@redhat.com>
@@ -43,6 +43,6 @@ int main()
func_callback two;
two.push_back(&test01);
two.push_back(&test02);
- run_tests_wrapped_env("de_DE", "LANG", two);
+ run_tests_wrapped_env(ISO_8859(15,de_DE), "LANG", two);
return 0;
}
diff --git a/libstdc++-v3/testsuite/22_locale/collate/compare/wchar_t/wrapped_locale.cc b/libstdc++-v3/testsuite/22_locale/collate/compare/wchar_t/wrapped_locale.cc
index 4444d0d4452..be590af6a0c 100644
--- a/libstdc++-v3/testsuite/22_locale/collate/compare/wchar_t/wrapped_locale.cc
+++ b/libstdc++-v3/testsuite/22_locale/collate/compare/wchar_t/wrapped_locale.cc
@@ -2,10 +2,10 @@
// { dg-xfail-if "" { "*-*-hpux11.23" } { "*" } { "" } } */
// { dg-options "-finput-charset=ISO8859-1" }
// { dg-require-iconv "ISO8859-1" }
-// { dg-require-namedlocale "ja_JP.eucjp" }
-// { dg-require-namedlocale "en_US" }
-// { dg-require-namedlocale "fr_FR" }
-// { dg-require-namedlocale "de_DE" }
+// { dg-require-namedlocale "ja_JP.eucJP" }
+// { dg-require-namedlocale "en_US.ISO8859-1" }
+// { dg-require-namedlocale "fr_FR.ISO8859-15" }
+// { dg-require-namedlocale "de_DE.ISO8859-15" }
// 2001-08-15 Benjamin Kosnik <bkoz@redhat.com>
@@ -44,6 +44,6 @@ int main()
func_callback two;
two.push_back(&test01);
two.push_back(&test02);
- run_tests_wrapped_locale("ja_JP.eucjp", two);
+ run_tests_wrapped_locale("ja_JP.eucJP", two);
return 0;
}
diff --git a/libstdc++-v3/testsuite/22_locale/collate/hash/char/2.cc b/libstdc++-v3/testsuite/22_locale/collate/hash/char/2.cc
index b4fabd4de14..91b25044bc4 100644
--- a/libstdc++-v3/testsuite/22_locale/collate/hash/char/2.cc
+++ b/libstdc++-v3/testsuite/22_locale/collate/hash/char/2.cc
@@ -1,6 +1,6 @@
-// { dg-require-namedlocale "en_US" }
-// { dg-require-namedlocale "fr_FR" }
-// { dg-require-namedlocale "de_DE" }
+// { dg-require-namedlocale "en_US.ISO8859-1" }
+// { dg-require-namedlocale "fr_FR.ISO8859-15" }
+// { dg-require-namedlocale "de_DE.ISO8859-15" }
// 2001-08-15 Benjamin Kosnik <bkoz@redhat.com>
@@ -26,7 +26,7 @@
#include <locale>
#include <testsuite_hooks.h>
-// Check German "de_DE" locale.
+// Check German "de_DE.ISO8859-15" locale.
void test02()
{
using namespace std;
@@ -36,9 +36,9 @@ void test02()
// basic construction
locale loc_c = locale::classic();
- locale loc_us = locale("en_US");
- locale loc_fr = locale("fr_FR");
- locale loc_de = locale("de_DE");
+ locale loc_us = locale(ISO_8859(1,en_US));
+ locale loc_fr = locale(ISO_8859(15,fr_FR));
+ locale loc_de = locale(ISO_8859(15,de_DE));
VERIFY( loc_c != loc_de );
VERIFY( loc_us != loc_fr );
VERIFY( loc_us != loc_de );
diff --git a/libstdc++-v3/testsuite/22_locale/collate/hash/char/wrapped_env.cc b/libstdc++-v3/testsuite/22_locale/collate/hash/char/wrapped_env.cc
index 3f1eb81802f..7583358394c 100644
--- a/libstdc++-v3/testsuite/22_locale/collate/hash/char/wrapped_env.cc
+++ b/libstdc++-v3/testsuite/22_locale/collate/hash/char/wrapped_env.cc
@@ -1,6 +1,6 @@
-// { dg-require-namedlocale "en_US" }
-// { dg-require-namedlocale "fr_FR" }
-// { dg-require-namedlocale "de_DE" }
+// { dg-require-namedlocale "en_US.ISO8859-1" }
+// { dg-require-namedlocale "fr_FR.ISO8859-15" }
+// { dg-require-namedlocale "de_DE.ISO8859-15" }
// 2001-08-15 Benjamin Kosnik <bkoz@redhat.com>
@@ -39,6 +39,6 @@ int main()
func_callback two;
two.push_back(&test01);
two.push_back(&test02);
- run_tests_wrapped_env("de_DE", "LANG", two);
+ run_tests_wrapped_env(ISO_8859(15,de_DE), "LANG", two);
return 0;
}
diff --git a/libstdc++-v3/testsuite/22_locale/collate/hash/char/wrapped_locale.cc b/libstdc++-v3/testsuite/22_locale/collate/hash/char/wrapped_locale.cc
index b62f4c7561c..75ab62005f0 100644
--- a/libstdc++-v3/testsuite/22_locale/collate/hash/char/wrapped_locale.cc
+++ b/libstdc++-v3/testsuite/22_locale/collate/hash/char/wrapped_locale.cc
@@ -1,7 +1,7 @@
-// { dg-require-namedlocale "en_US" }
-// { dg-require-namedlocale "fr_FR" }
-// { dg-require-namedlocale "de_DE" }
-// { dg-require-namedlocale "ja_JP.eucjp" }
+// { dg-require-namedlocale "en_US.ISO8859-1" }
+// { dg-require-namedlocale "fr_FR.ISO8859-15" }
+// { dg-require-namedlocale "de_DE.ISO8859-15" }
+// { dg-require-namedlocale "ja_JP.eucJP" }
// 2001-08-15 Benjamin Kosnik <bkoz@redhat.com>
@@ -40,6 +40,6 @@ int main()
func_callback two;
two.push_back(&test01);
two.push_back(&test02);
- run_tests_wrapped_locale("ja_JP.eucjp", two);
+ run_tests_wrapped_locale("ja_JP.eucJP", two);
return 0;
}
diff --git a/libstdc++-v3/testsuite/22_locale/collate/hash/wchar_t/2.cc b/libstdc++-v3/testsuite/22_locale/collate/hash/wchar_t/2.cc
index 90627c1603e..5d646a5edc7 100644
--- a/libstdc++-v3/testsuite/22_locale/collate/hash/wchar_t/2.cc
+++ b/libstdc++-v3/testsuite/22_locale/collate/hash/wchar_t/2.cc
@@ -2,9 +2,9 @@
// { dg-xfail-if "" { "*-*-hpux11.23" } { "*" } { "" } } */
// { dg-options "-finput-charset=ISO8859-1" }
// { dg-require-iconv "ISO8859-1" }
-// { dg-require-namedlocale "en_US" }
-// { dg-require-namedlocale "fr_FR" }
-// { dg-require-namedlocale "de_DE" }
+// { dg-require-namedlocale "en_US.ISO8859-1" }
+// { dg-require-namedlocale "fr_FR.ISO8859-15" }
+// { dg-require-namedlocale "de_DE.ISO8859-15" }
// 2001-08-15 Benjamin Kosnik <bkoz@redhat.com>
@@ -30,7 +30,7 @@
#include <locale>
#include <testsuite_hooks.h>
-// Check German "de_DE" locale.
+// Check German "de_DE.ISO8859-15" locale.
void test02()
{
using namespace std;
@@ -39,9 +39,9 @@ void test02()
// basic construction
locale loc_c = locale::classic();
- locale loc_us = locale("en_US");
- locale loc_fr = locale("fr_FR");
- locale loc_de = locale("de_DE");
+ locale loc_us = locale(ISO_8859(1,en_US));
+ locale loc_fr = locale(ISO_8859(15,fr_FR));
+ locale loc_de = locale(ISO_8859(15,de_DE));
VERIFY( loc_c != loc_de );
VERIFY( loc_us != loc_fr );
VERIFY( loc_us != loc_de );
diff --git a/libstdc++-v3/testsuite/22_locale/collate/hash/wchar_t/wrapped_env.cc b/libstdc++-v3/testsuite/22_locale/collate/hash/wchar_t/wrapped_env.cc
index 59b16c728c5..3db0d6d29d1 100644
--- a/libstdc++-v3/testsuite/22_locale/collate/hash/wchar_t/wrapped_env.cc
+++ b/libstdc++-v3/testsuite/22_locale/collate/hash/wchar_t/wrapped_env.cc
@@ -2,9 +2,9 @@
// { dg-xfail-if "" { "*-*-hpux11.23" } { "*" } { "" } } */
// { dg-options "-finput-charset=ISO8859-1" }
// { dg-require-iconv "ISO8859-1" }
-// { dg-require-namedlocale "en_US" }
-// { dg-require-namedlocale "fr_FR" }
-// { dg-require-namedlocale "de_DE" }
+// { dg-require-namedlocale "en_US.ISO8859-1" }
+// { dg-require-namedlocale "fr_FR.ISO8859-15" }
+// { dg-require-namedlocale "de_DE.ISO8859-15" }
// 2001-08-15 Benjamin Kosnik <bkoz@redhat.com>
@@ -43,6 +43,6 @@ int main()
func_callback two;
two.push_back(&test01);
two.push_back(&test02);
- run_tests_wrapped_env("de_DE", "LANG", two);
+ run_tests_wrapped_env(ISO_8859(15,de_DE), "LANG", two);
return 0;
}
diff --git a/libstdc++-v3/testsuite/22_locale/collate/hash/wchar_t/wrapped_locale.cc b/libstdc++-v3/testsuite/22_locale/collate/hash/wchar_t/wrapped_locale.cc
index 4444d0d4452..be590af6a0c 100644
--- a/libstdc++-v3/testsuite/22_locale/collate/hash/wchar_t/wrapped_locale.cc
+++ b/libstdc++-v3/testsuite/22_locale/collate/hash/wchar_t/wrapped_locale.cc
@@ -2,10 +2,10 @@
// { dg-xfail-if "" { "*-*-hpux11.23" } { "*" } { "" } } */
// { dg-options "-finput-charset=ISO8859-1" }
// { dg-require-iconv "ISO8859-1" }
-// { dg-require-namedlocale "ja_JP.eucjp" }
-// { dg-require-namedlocale "en_US" }
-// { dg-require-namedlocale "fr_FR" }
-// { dg-require-namedlocale "de_DE" }
+// { dg-require-namedlocale "ja_JP.eucJP" }
+// { dg-require-namedlocale "en_US.ISO8859-1" }
+// { dg-require-namedlocale "fr_FR.ISO8859-15" }
+// { dg-require-namedlocale "de_DE.ISO8859-15" }
// 2001-08-15 Benjamin Kosnik <bkoz@redhat.com>
@@ -44,6 +44,6 @@ int main()
func_callback two;
two.push_back(&test01);
two.push_back(&test02);
- run_tests_wrapped_locale("ja_JP.eucjp", two);
+ run_tests_wrapped_locale("ja_JP.eucJP", two);
return 0;
}
diff --git a/libstdc++-v3/testsuite/22_locale/collate/transform/char/2.cc b/libstdc++-v3/testsuite/22_locale/collate/transform/char/2.cc
index 1f300c49c29..883200e545c 100644
--- a/libstdc++-v3/testsuite/22_locale/collate/transform/char/2.cc
+++ b/libstdc++-v3/testsuite/22_locale/collate/transform/char/2.cc
@@ -1,6 +1,6 @@
-// { dg-require-namedlocale "en_US" }
-// { dg-require-namedlocale "fr_FR" }
-// { dg-require-namedlocale "de_DE" }
+// { dg-require-namedlocale "en_US.ISO8859-1" }
+// { dg-require-namedlocale "fr_FR.ISO8859-15" }
+// { dg-require-namedlocale "de_DE.ISO8859-15" }
// 2001-08-15 Benjamin Kosnik <bkoz@redhat.com>
@@ -35,9 +35,9 @@ void test02()
// basic construction
locale loc_c = locale::classic();
- locale loc_us = locale("en_US");
- locale loc_fr = locale("fr_FR");
- locale loc_de = locale("de_DE");
+ locale loc_us = locale(ISO_8859(1,en_US));
+ locale loc_fr = locale(ISO_8859(15,fr_FR));
+ locale loc_de = locale(ISO_8859(15,de_DE));
VERIFY( loc_c != loc_de );
VERIFY( loc_us != loc_fr );
VERIFY( loc_us != loc_de );
diff --git a/libstdc++-v3/testsuite/22_locale/collate/transform/char/3.cc b/libstdc++-v3/testsuite/22_locale/collate/transform/char/3.cc
index a83ce0647b5..8c7fe852293 100644
--- a/libstdc++-v3/testsuite/22_locale/collate/transform/char/3.cc
+++ b/libstdc++-v3/testsuite/22_locale/collate/transform/char/3.cc
@@ -1,4 +1,4 @@
-// { dg-require-namedlocale "de_DE" }
+// { dg-require-namedlocale "de_DE.ISO8859-15" }
// 2003-02-24 Petur Runolfsson <peturr02@ru.is>
@@ -33,7 +33,7 @@ void test03()
// basic construction
locale loc_c = locale::classic();
- locale loc_de = locale("de_DE");
+ locale loc_de = locale(ISO_8859(15,de_DE));
VERIFY( loc_c != loc_de );
// cache the collate facets
diff --git a/libstdc++-v3/testsuite/22_locale/collate/transform/char/wrapped_env.cc b/libstdc++-v3/testsuite/22_locale/collate/transform/char/wrapped_env.cc
index 379d2c8474d..27b1bacb3ab 100644
--- a/libstdc++-v3/testsuite/22_locale/collate/transform/char/wrapped_env.cc
+++ b/libstdc++-v3/testsuite/22_locale/collate/transform/char/wrapped_env.cc
@@ -1,6 +1,6 @@
-// { dg-require-namedlocale "en_US" }
-// { dg-require-namedlocale "fr_FR" }
-// { dg-require-namedlocale "de_DE" }
+// { dg-require-namedlocale "en_US.ISO8859-1" }
+// { dg-require-namedlocale "fr_FR.ISO8859-15" }
+// { dg-require-namedlocale "de_DE.ISO8859-15" }
// 2001-08-15 Benjamin Kosnik <bkoz@redhat.com>
@@ -34,6 +34,6 @@ int main()
using namespace __gnu_test;
func_callback two;
two.push_back(&test02);
- run_tests_wrapped_env("de_DE", "LANG", two);
+ run_tests_wrapped_env(ISO_8859(15,de_DE), "LANG", two);
return 0;
}
diff --git a/libstdc++-v3/testsuite/22_locale/collate/transform/char/wrapped_locale.cc b/libstdc++-v3/testsuite/22_locale/collate/transform/char/wrapped_locale.cc
index 93b7c6818b1..6bc03bdcd63 100644
--- a/libstdc++-v3/testsuite/22_locale/collate/transform/char/wrapped_locale.cc
+++ b/libstdc++-v3/testsuite/22_locale/collate/transform/char/wrapped_locale.cc
@@ -1,7 +1,7 @@
-// { dg-require-namedlocale "ja_JP.eucjp" }
-// { dg-require-namedlocale "en_US" }
-// { dg-require-namedlocale "fr_FR" }
-// { dg-require-namedlocale "de_DE" }
+// { dg-require-namedlocale "ja_JP.eucJP" }
+// { dg-require-namedlocale "en_US.ISO8859-1" }
+// { dg-require-namedlocale "fr_FR.ISO8859-15" }
+// { dg-require-namedlocale "de_DE.ISO8859-15" }
// 2001-08-15 Benjamin Kosnik <bkoz@redhat.com>
@@ -35,6 +35,6 @@ int main()
using namespace __gnu_test;
func_callback two;
two.push_back(&test02);
- run_tests_wrapped_locale("ja_JP.eucjp", two);
+ run_tests_wrapped_locale("ja_JP.eucJP", two);
return 0;
}
diff --git a/libstdc++-v3/testsuite/22_locale/collate/transform/wchar_t/2.cc b/libstdc++-v3/testsuite/22_locale/collate/transform/wchar_t/2.cc
index ca65039872d..e5d6c4e2c4c 100644
--- a/libstdc++-v3/testsuite/22_locale/collate/transform/wchar_t/2.cc
+++ b/libstdc++-v3/testsuite/22_locale/collate/transform/wchar_t/2.cc
@@ -2,9 +2,9 @@
// { dg-xfail-if "" { "*-*-hpux11.23" } { "*" } { "" } } */
// { dg-options "-finput-charset=ISO8859-1" }
// { dg-require-iconv "ISO8859-1" }
-// { dg-require-namedlocale "en_US" }
-// { dg-require-namedlocale "fr_FR" }
-// { dg-require-namedlocale "de_DE" }
+// { dg-require-namedlocale "en_US.ISO8859-1" }
+// { dg-require-namedlocale "fr_FR.ISO8859-15" }
+// { dg-require-namedlocale "de_DE.ISO8859-15" }
// 2001-08-15 Benjamin Kosnik <bkoz@redhat.com>
@@ -39,9 +39,9 @@ void test02()
// basic construction
locale loc_c = locale::classic();
- locale loc_us = locale("en_US");
- locale loc_fr = locale("fr_FR");
- locale loc_de = locale("de_DE");
+ locale loc_us = locale(ISO_8859(1,en_US));
+ locale loc_fr = locale(ISO_8859(15,fr_FR));
+ locale loc_de = locale(ISO_8859(15,de_DE));
VERIFY( loc_c != loc_de );
VERIFY( loc_us != loc_fr );
VERIFY( loc_us != loc_de );
diff --git a/libstdc++-v3/testsuite/22_locale/collate/transform/wchar_t/3.cc b/libstdc++-v3/testsuite/22_locale/collate/transform/wchar_t/3.cc
index c360190b293..dd274aac447 100644
--- a/libstdc++-v3/testsuite/22_locale/collate/transform/wchar_t/3.cc
+++ b/libstdc++-v3/testsuite/22_locale/collate/transform/wchar_t/3.cc
@@ -1,4 +1,4 @@
-// { dg-require-namedlocale "de_DE" }
+// { dg-require-namedlocale "de_DE.ISO8859-15" }
// 2003-02-24 Petur Runolfsson <peturr02@ru.is>
@@ -33,7 +33,7 @@ void test03()
// basic construction
locale loc_c = locale::classic();
- locale loc_de = locale("de_DE");
+ locale loc_de = locale(ISO_8859(15,de_DE));
VERIFY( loc_c != loc_de );
// cache the collate facets
diff --git a/libstdc++-v3/testsuite/22_locale/collate/transform/wchar_t/wrapped_env.cc b/libstdc++-v3/testsuite/22_locale/collate/transform/wchar_t/wrapped_env.cc
index 23742832765..40c86d07465 100644
--- a/libstdc++-v3/testsuite/22_locale/collate/transform/wchar_t/wrapped_env.cc
+++ b/libstdc++-v3/testsuite/22_locale/collate/transform/wchar_t/wrapped_env.cc
@@ -2,9 +2,9 @@
// { dg-xfail-if "" { "*-*-hpux11.23" } { "*" } { "" } } */
// { dg-options "-finput-charset=ISO8859-1" }
// { dg-require-iconv "ISO8859-1" }
-// { dg-require-namedlocale "en_US" }
-// { dg-require-namedlocale "fr_FR" }
-// { dg-require-namedlocale "de_DE" }
+// { dg-require-namedlocale "en_US.ISO8859-1" }
+// { dg-require-namedlocale "fr_FR.ISO8859-15" }
+// { dg-require-namedlocale "de_DE.ISO8859-15" }
// 2001-08-15 Benjamin Kosnik <bkoz@redhat.com>
@@ -38,6 +38,6 @@ int main()
using namespace __gnu_test;
func_callback two;
two.push_back(&test02);
- run_tests_wrapped_env("de_DE", "LANG", two);
+ run_tests_wrapped_env(ISO_8859(15,de_DE), "LANG", two);
return 0;
}
diff --git a/libstdc++-v3/testsuite/22_locale/collate/transform/wchar_t/wrapped_locale.cc b/libstdc++-v3/testsuite/22_locale/collate/transform/wchar_t/wrapped_locale.cc
index 4fe0e684300..e2cabbb251d 100644
--- a/libstdc++-v3/testsuite/22_locale/collate/transform/wchar_t/wrapped_locale.cc
+++ b/libstdc++-v3/testsuite/22_locale/collate/transform/wchar_t/wrapped_locale.cc
@@ -2,10 +2,10 @@
// { dg-xfail-if "" { "*-*-hpux11.23" } { "*" } { "" } } */
// { dg-options "-finput-charset=ISO8859-1" }
// { dg-require-iconv "ISO8859-1" }
-// { dg-require-namedlocale "ja_JP.eucjp" }
-// { dg-require-namedlocale "en_US" }
-// { dg-require-namedlocale "fr_FR" }
-// { dg-require-namedlocale "de_DE" }
+// { dg-require-namedlocale "ja_JP.eucJP" }
+// { dg-require-namedlocale "en_US.ISO8859-1" }
+// { dg-require-namedlocale "fr_FR.ISO8859-15" }
+// { dg-require-namedlocale "de_DE.ISO8859-15" }
// 2001-08-15 Benjamin Kosnik <bkoz@redhat.com>
@@ -39,6 +39,6 @@ int main()
using namespace __gnu_test;
func_callback two;
two.push_back(&test02);
- run_tests_wrapped_locale("ja_JP.eucjp", two);
+ run_tests_wrapped_locale("ja_JP.eucJP", two);
return 0;
}
diff --git a/libstdc++-v3/testsuite/22_locale/collate_byname/named_equivalence.cc b/libstdc++-v3/testsuite/22_locale/collate_byname/named_equivalence.cc
index 559cbea15c7..707902fd9a5 100644
--- a/libstdc++-v3/testsuite/22_locale/collate_byname/named_equivalence.cc
+++ b/libstdc++-v3/testsuite/22_locale/collate_byname/named_equivalence.cc
@@ -1,4 +1,4 @@
-// { dg-require-namedlocale "de_DE" }
+// { dg-require-namedlocale "de_DE.ISO8859-15" }
// 2001-08-15 Benjamin Kosnik <bkoz@redhat.com>
@@ -34,10 +34,10 @@ void test01()
string str;
locale loc_c = locale::classic();
- locale loc_de = locale("de_DE");
+ locale loc_de = locale(ISO_8859(15,de_DE));
str = loc_de.name();
- locale loc_byname(locale::classic(), new collate_byname<char>("de_DE"));
+ locale loc_byname(locale::classic(), new collate_byname<char>(ISO_8859(15,de_DE)));
str = loc_byname.name();
VERIFY( loc_de != loc_byname );
@@ -45,7 +45,7 @@ void test01()
// cache the collate facets
const collate<char>& coll_de = use_facet<collate<char> >(loc_de);
- // Check German "de_DE" locale.
+ // Check German "de_DE.ISO8859-15" locale.
int i1;
int i2;
long l1;
diff --git a/libstdc++-v3/testsuite/22_locale/ctype/cons/char/wrapped_env.cc b/libstdc++-v3/testsuite/22_locale/ctype/cons/char/wrapped_env.cc
index eddb670b8b9..0e4b03b732f 100644
--- a/libstdc++-v3/testsuite/22_locale/ctype/cons/char/wrapped_env.cc
+++ b/libstdc++-v3/testsuite/22_locale/ctype/cons/char/wrapped_env.cc
@@ -1,4 +1,4 @@
-// { dg-require-namedlocale "de_DE" }
+// { dg-require-namedlocale "de_DE.ISO8859-15" }
// 2001-08-15 Benjamin Kosnik <bkoz@redhat.com>
@@ -32,6 +32,6 @@ int main()
using namespace __gnu_test;
func_callback two;
two.push_back(&test01);
- run_tests_wrapped_env("de_DE", "LANG", two);
+ run_tests_wrapped_env(ISO_8859(15,de_DE), "LANG", two);
return 0;
}
diff --git a/libstdc++-v3/testsuite/22_locale/ctype/cons/char/wrapped_locale.cc b/libstdc++-v3/testsuite/22_locale/ctype/cons/char/wrapped_locale.cc
index b899fafbe90..43e2381d2cb 100644
--- a/libstdc++-v3/testsuite/22_locale/ctype/cons/char/wrapped_locale.cc
+++ b/libstdc++-v3/testsuite/22_locale/ctype/cons/char/wrapped_locale.cc
@@ -1,4 +1,4 @@
-// { dg-require-namedlocale "ja_JP.eucjp" }
+// { dg-require-namedlocale "ja_JP.eucJP" }
// 2001-08-15 Benjamin Kosnik <bkoz@redhat.com>
@@ -32,6 +32,6 @@ int main()
using namespace __gnu_test;
func_callback two;
two.push_back(&test01);
- run_tests_wrapped_locale("ja_JP.eucjp", two);
+ run_tests_wrapped_locale("ja_JP.eucJP", two);
return 0;
}
diff --git a/libstdc++-v3/testsuite/22_locale/ctype/is/char/2.cc b/libstdc++-v3/testsuite/22_locale/ctype/is/char/2.cc
index 7809399c904..d35e4328f5a 100644
--- a/libstdc++-v3/testsuite/22_locale/ctype/is/char/2.cc
+++ b/libstdc++-v3/testsuite/22_locale/ctype/is/char/2.cc
@@ -1,5 +1,5 @@
// { dg-do run { xfail { ! { *-*-linux* *-*-gnu* } } } }
-// { dg-require-namedlocale "de_DE" }
+// { dg-require-namedlocale "de_DE.ISO8859-15" }
// Copyright (C) 2000-2015 Free Software Foundation, Inc.
//
@@ -59,8 +59,8 @@ void test02()
v_c[i] = mask_is;
}
- // "de_DE"
- locale loc_de = locale("de_DE");
+ // "de_DE.ISO8859-15"
+ locale loc_de = locale(ISO_8859(15,de_DE));
const ctype<char>& ctype_de = use_facet<ctype<char> >(loc_de);
for (int i = 0; i < max; ++i)
{
diff --git a/libstdc++-v3/testsuite/22_locale/ctype/is/char/wrapped_env.cc b/libstdc++-v3/testsuite/22_locale/ctype/is/char/wrapped_env.cc
index 6315acfbb68..53e42ed3af0 100644
--- a/libstdc++-v3/testsuite/22_locale/ctype/is/char/wrapped_env.cc
+++ b/libstdc++-v3/testsuite/22_locale/ctype/is/char/wrapped_env.cc
@@ -1,4 +1,4 @@
-// { dg-require-namedlocale "de_DE" }
+// { dg-require-namedlocale "de_DE.ISO8859-15" }
// 2001-08-15 Benjamin Kosnik <bkoz@redhat.com>
@@ -42,6 +42,6 @@ int main()
two.push_back(&test01);
two.push_back(&test02);
two.push_back(&test03);
- run_tests_wrapped_env("de_DE", "LANG", two);
+ run_tests_wrapped_env(ISO_8859(15,de_DE), "LANG", two);
return 0;
}
diff --git a/libstdc++-v3/testsuite/22_locale/ctype/is/char/wrapped_locale.cc b/libstdc++-v3/testsuite/22_locale/ctype/is/char/wrapped_locale.cc
index 2b6df40f61c..d8e54104066 100644
--- a/libstdc++-v3/testsuite/22_locale/ctype/is/char/wrapped_locale.cc
+++ b/libstdc++-v3/testsuite/22_locale/ctype/is/char/wrapped_locale.cc
@@ -1,5 +1,5 @@
-// { dg-require-namedlocale "de_DE" }
-// { dg-require-namedlocale "ja_JP.eucjp" }
+// { dg-require-namedlocale "de_DE.ISO8859-15" }
+// { dg-require-namedlocale "ja_JP.eucJP" }
// 2001-08-15 Benjamin Kosnik <bkoz@redhat.com>
@@ -43,6 +43,6 @@ int main()
two.push_back(&test01);
two.push_back(&test02);
two.push_back(&test03);
- run_tests_wrapped_locale("ja_JP.eucjp", two);
+ run_tests_wrapped_locale("ja_JP.eucJP", two);
return 0;
}
diff --git a/libstdc++-v3/testsuite/22_locale/ctype/is/wchar_t/2.cc b/libstdc++-v3/testsuite/22_locale/ctype/is/wchar_t/2.cc
index 9978fb98217..8c3aeed9c26 100644
--- a/libstdc++-v3/testsuite/22_locale/ctype/is/wchar_t/2.cc
+++ b/libstdc++-v3/testsuite/22_locale/ctype/is/wchar_t/2.cc
@@ -1,5 +1,5 @@
// { dg-do run { xfail { ! { *-*-linux* *-*-gnu* } } } }
-// { dg-require-namedlocale "de_DE" }
+// { dg-require-namedlocale "de_DE.ISO8859-15" }
// Copyright (C) 2000-2015 Free Software Foundation, Inc.
//
@@ -59,8 +59,8 @@ void test02()
v_c[i] = mask_is;
}
- // "de_DE"
- locale loc_de = locale("de_DE");
+ // "de_DE.ISO8859-15"
+ locale loc_de = locale(ISO_8859(15,de_DE));
const ctype<wchar_t>& ctype_de = use_facet<ctype<wchar_t> >(loc_de);
for (int i = 0; i < max; ++i)
{
diff --git a/libstdc++-v3/testsuite/22_locale/ctype/is/wchar_t/wrapped_env.cc b/libstdc++-v3/testsuite/22_locale/ctype/is/wchar_t/wrapped_env.cc
index d4f22931887..608bb21baeb 100644
--- a/libstdc++-v3/testsuite/22_locale/ctype/is/wchar_t/wrapped_env.cc
+++ b/libstdc++-v3/testsuite/22_locale/ctype/is/wchar_t/wrapped_env.cc
@@ -1,4 +1,4 @@
-// { dg-require-namedlocale "de_DE" }
+// { dg-require-namedlocale "de_DE.ISO8859-15" }
// 2001-08-15 Benjamin Kosnik <bkoz@redhat.com>
@@ -37,6 +37,6 @@ int main()
func_callback two;
two.push_back(&test01);
two.push_back(&test02);
- run_tests_wrapped_env("de_DE", "LANG", two);
+ run_tests_wrapped_env(ISO_8859(15,de_DE), "LANG", two);
return 0;
}
diff --git a/libstdc++-v3/testsuite/22_locale/ctype/is/wchar_t/wrapped_locale.cc b/libstdc++-v3/testsuite/22_locale/ctype/is/wchar_t/wrapped_locale.cc
index 7e8facf9c15..40254ab1f7b 100644
--- a/libstdc++-v3/testsuite/22_locale/ctype/is/wchar_t/wrapped_locale.cc
+++ b/libstdc++-v3/testsuite/22_locale/ctype/is/wchar_t/wrapped_locale.cc
@@ -1,5 +1,5 @@
-// { dg-require-namedlocale "de_DE" }
-// { dg-require-namedlocale "ja_JP.eucjp" }
+// { dg-require-namedlocale "de_DE.ISO8859-15" }
+// { dg-require-namedlocale "ja_JP.eucJP" }
// 2001-08-15 Benjamin Kosnik <bkoz@redhat.com>
@@ -38,6 +38,6 @@ int main()
func_callback two;
two.push_back(&test01);
two.push_back(&test02);
- run_tests_wrapped_locale("ja_JP.eucjp", two);
+ run_tests_wrapped_locale("ja_JP.eucJP", two);
return 0;
}
diff --git a/libstdc++-v3/testsuite/22_locale/ctype/narrow/char/wrapped_env.cc b/libstdc++-v3/testsuite/22_locale/ctype/narrow/char/wrapped_env.cc
index d4f22931887..608bb21baeb 100644
--- a/libstdc++-v3/testsuite/22_locale/ctype/narrow/char/wrapped_env.cc
+++ b/libstdc++-v3/testsuite/22_locale/ctype/narrow/char/wrapped_env.cc
@@ -1,4 +1,4 @@
-// { dg-require-namedlocale "de_DE" }
+// { dg-require-namedlocale "de_DE.ISO8859-15" }
// 2001-08-15 Benjamin Kosnik <bkoz@redhat.com>
@@ -37,6 +37,6 @@ int main()
func_callback two;
two.push_back(&test01);
two.push_back(&test02);
- run_tests_wrapped_env("de_DE", "LANG", two);
+ run_tests_wrapped_env(ISO_8859(15,de_DE), "LANG", two);
return 0;
}
diff --git a/libstdc++-v3/testsuite/22_locale/ctype/narrow/char/wrapped_locale.cc b/libstdc++-v3/testsuite/22_locale/ctype/narrow/char/wrapped_locale.cc
index 17e070c1c89..d27d9f84e0e 100644
--- a/libstdc++-v3/testsuite/22_locale/ctype/narrow/char/wrapped_locale.cc
+++ b/libstdc++-v3/testsuite/22_locale/ctype/narrow/char/wrapped_locale.cc
@@ -1,4 +1,4 @@
-// { dg-require-namedlocale "ja_JP.eucjp" }
+// { dg-require-namedlocale "ja_JP.eucJP" }
// 2001-08-15 Benjamin Kosnik <bkoz@redhat.com>
@@ -37,6 +37,6 @@ int main()
func_callback two;
two.push_back(&test01);
two.push_back(&test02);
- run_tests_wrapped_locale("ja_JP.eucjp", two);
+ run_tests_wrapped_locale("ja_JP.eucJP", two);
return 0;
}
diff --git a/libstdc++-v3/testsuite/22_locale/ctype/narrow/wchar_t/wrapped_env.cc b/libstdc++-v3/testsuite/22_locale/ctype/narrow/wchar_t/wrapped_env.cc
index d4f22931887..608bb21baeb 100644
--- a/libstdc++-v3/testsuite/22_locale/ctype/narrow/wchar_t/wrapped_env.cc
+++ b/libstdc++-v3/testsuite/22_locale/ctype/narrow/wchar_t/wrapped_env.cc
@@ -1,4 +1,4 @@
-// { dg-require-namedlocale "de_DE" }
+// { dg-require-namedlocale "de_DE.ISO8859-15" }
// 2001-08-15 Benjamin Kosnik <bkoz@redhat.com>
@@ -37,6 +37,6 @@ int main()
func_callback two;
two.push_back(&test01);
two.push_back(&test02);
- run_tests_wrapped_env("de_DE", "LANG", two);
+ run_tests_wrapped_env(ISO_8859(15,de_DE), "LANG", two);
return 0;
}
diff --git a/libstdc++-v3/testsuite/22_locale/ctype/narrow/wchar_t/wrapped_locale.cc b/libstdc++-v3/testsuite/22_locale/ctype/narrow/wchar_t/wrapped_locale.cc
index 17e070c1c89..d27d9f84e0e 100644
--- a/libstdc++-v3/testsuite/22_locale/ctype/narrow/wchar_t/wrapped_locale.cc
+++ b/libstdc++-v3/testsuite/22_locale/ctype/narrow/wchar_t/wrapped_locale.cc
@@ -1,4 +1,4 @@
-// { dg-require-namedlocale "ja_JP.eucjp" }
+// { dg-require-namedlocale "ja_JP.eucJP" }
// 2001-08-15 Benjamin Kosnik <bkoz@redhat.com>
@@ -37,6 +37,6 @@ int main()
func_callback two;
two.push_back(&test01);
two.push_back(&test02);
- run_tests_wrapped_locale("ja_JP.eucjp", two);
+ run_tests_wrapped_locale("ja_JP.eucJP", two);
return 0;
}
diff --git a/libstdc++-v3/testsuite/22_locale/ctype/scan/char/wrapped_env.cc b/libstdc++-v3/testsuite/22_locale/ctype/scan/char/wrapped_env.cc
index eddb670b8b9..0e4b03b732f 100644
--- a/libstdc++-v3/testsuite/22_locale/ctype/scan/char/wrapped_env.cc
+++ b/libstdc++-v3/testsuite/22_locale/ctype/scan/char/wrapped_env.cc
@@ -1,4 +1,4 @@
-// { dg-require-namedlocale "de_DE" }
+// { dg-require-namedlocale "de_DE.ISO8859-15" }
// 2001-08-15 Benjamin Kosnik <bkoz@redhat.com>
@@ -32,6 +32,6 @@ int main()
using namespace __gnu_test;
func_callback two;
two.push_back(&test01);
- run_tests_wrapped_env("de_DE", "LANG", two);
+ run_tests_wrapped_env(ISO_8859(15,de_DE), "LANG", two);
return 0;
}
diff --git a/libstdc++-v3/testsuite/22_locale/ctype/scan/char/wrapped_locale.cc b/libstdc++-v3/testsuite/22_locale/ctype/scan/char/wrapped_locale.cc
index b899fafbe90..43e2381d2cb 100644
--- a/libstdc++-v3/testsuite/22_locale/ctype/scan/char/wrapped_locale.cc
+++ b/libstdc++-v3/testsuite/22_locale/ctype/scan/char/wrapped_locale.cc
@@ -1,4 +1,4 @@
-// { dg-require-namedlocale "ja_JP.eucjp" }
+// { dg-require-namedlocale "ja_JP.eucJP" }
// 2001-08-15 Benjamin Kosnik <bkoz@redhat.com>
@@ -32,6 +32,6 @@ int main()
using namespace __gnu_test;
func_callback two;
two.push_back(&test01);
- run_tests_wrapped_locale("ja_JP.eucjp", two);
+ run_tests_wrapped_locale("ja_JP.eucJP", two);
return 0;
}
diff --git a/libstdc++-v3/testsuite/22_locale/ctype/scan/wchar_t/wrapped_env.cc b/libstdc++-v3/testsuite/22_locale/ctype/scan/wchar_t/wrapped_env.cc
index eddb670b8b9..0e4b03b732f 100644
--- a/libstdc++-v3/testsuite/22_locale/ctype/scan/wchar_t/wrapped_env.cc
+++ b/libstdc++-v3/testsuite/22_locale/ctype/scan/wchar_t/wrapped_env.cc
@@ -1,4 +1,4 @@
-// { dg-require-namedlocale "de_DE" }
+// { dg-require-namedlocale "de_DE.ISO8859-15" }
// 2001-08-15 Benjamin Kosnik <bkoz@redhat.com>
@@ -32,6 +32,6 @@ int main()
using namespace __gnu_test;
func_callback two;
two.push_back(&test01);
- run_tests_wrapped_env("de_DE", "LANG", two);
+ run_tests_wrapped_env(ISO_8859(15,de_DE), "LANG", two);
return 0;
}
diff --git a/libstdc++-v3/testsuite/22_locale/ctype/scan/wchar_t/wrapped_locale.cc b/libstdc++-v3/testsuite/22_locale/ctype/scan/wchar_t/wrapped_locale.cc
index b899fafbe90..43e2381d2cb 100644
--- a/libstdc++-v3/testsuite/22_locale/ctype/scan/wchar_t/wrapped_locale.cc
+++ b/libstdc++-v3/testsuite/22_locale/ctype/scan/wchar_t/wrapped_locale.cc
@@ -1,4 +1,4 @@
-// { dg-require-namedlocale "ja_JP.eucjp" }
+// { dg-require-namedlocale "ja_JP.eucJP" }
// 2001-08-15 Benjamin Kosnik <bkoz@redhat.com>
@@ -32,6 +32,6 @@ int main()
using namespace __gnu_test;
func_callback two;
two.push_back(&test01);
- run_tests_wrapped_locale("ja_JP.eucjp", two);
+ run_tests_wrapped_locale("ja_JP.eucJP", two);
return 0;
}
diff --git a/libstdc++-v3/testsuite/22_locale/ctype/to/char/wrapped_env.cc b/libstdc++-v3/testsuite/22_locale/ctype/to/char/wrapped_env.cc
index eddb670b8b9..0e4b03b732f 100644
--- a/libstdc++-v3/testsuite/22_locale/ctype/to/char/wrapped_env.cc
+++ b/libstdc++-v3/testsuite/22_locale/ctype/to/char/wrapped_env.cc
@@ -1,4 +1,4 @@
-// { dg-require-namedlocale "de_DE" }
+// { dg-require-namedlocale "de_DE.ISO8859-15" }
// 2001-08-15 Benjamin Kosnik <bkoz@redhat.com>
@@ -32,6 +32,6 @@ int main()
using namespace __gnu_test;
func_callback two;
two.push_back(&test01);
- run_tests_wrapped_env("de_DE", "LANG", two);
+ run_tests_wrapped_env(ISO_8859(15,de_DE), "LANG", two);
return 0;
}
diff --git a/libstdc++-v3/testsuite/22_locale/ctype/to/char/wrapped_locale.cc b/libstdc++-v3/testsuite/22_locale/ctype/to/char/wrapped_locale.cc
index b899fafbe90..43e2381d2cb 100644
--- a/libstdc++-v3/testsuite/22_locale/ctype/to/char/wrapped_locale.cc
+++ b/libstdc++-v3/testsuite/22_locale/ctype/to/char/wrapped_locale.cc
@@ -1,4 +1,4 @@
-// { dg-require-namedlocale "ja_JP.eucjp" }
+// { dg-require-namedlocale "ja_JP.eucJP" }
// 2001-08-15 Benjamin Kosnik <bkoz@redhat.com>
@@ -32,6 +32,6 @@ int main()
using namespace __gnu_test;
func_callback two;
two.push_back(&test01);
- run_tests_wrapped_locale("ja_JP.eucjp", two);
+ run_tests_wrapped_locale("ja_JP.eucJP", two);
return 0;
}
diff --git a/libstdc++-v3/testsuite/22_locale/ctype/to/wchar_t/wrapped_env.cc b/libstdc++-v3/testsuite/22_locale/ctype/to/wchar_t/wrapped_env.cc
index eddb670b8b9..0e4b03b732f 100644
--- a/libstdc++-v3/testsuite/22_locale/ctype/to/wchar_t/wrapped_env.cc
+++ b/libstdc++-v3/testsuite/22_locale/ctype/to/wchar_t/wrapped_env.cc
@@ -1,4 +1,4 @@
-// { dg-require-namedlocale "de_DE" }
+// { dg-require-namedlocale "de_DE.ISO8859-15" }
// 2001-08-15 Benjamin Kosnik <bkoz@redhat.com>
@@ -32,6 +32,6 @@ int main()
using namespace __gnu_test;
func_callback two;
two.push_back(&test01);
- run_tests_wrapped_env("de_DE", "LANG", two);
+ run_tests_wrapped_env(ISO_8859(15,de_DE), "LANG", two);
return 0;
}
diff --git a/libstdc++-v3/testsuite/22_locale/ctype/to/wchar_t/wrapped_locale.cc b/libstdc++-v3/testsuite/22_locale/ctype/to/wchar_t/wrapped_locale.cc
index b899fafbe90..43e2381d2cb 100644
--- a/libstdc++-v3/testsuite/22_locale/ctype/to/wchar_t/wrapped_locale.cc
+++ b/libstdc++-v3/testsuite/22_locale/ctype/to/wchar_t/wrapped_locale.cc
@@ -1,4 +1,4 @@
-// { dg-require-namedlocale "ja_JP.eucjp" }
+// { dg-require-namedlocale "ja_JP.eucJP" }
// 2001-08-15 Benjamin Kosnik <bkoz@redhat.com>
@@ -32,6 +32,6 @@ int main()
using namespace __gnu_test;
func_callback two;
two.push_back(&test01);
- run_tests_wrapped_locale("ja_JP.eucjp", two);
+ run_tests_wrapped_locale("ja_JP.eucJP", two);
return 0;
}
diff --git a/libstdc++-v3/testsuite/22_locale/ctype/widen/char/wrapped_env.cc b/libstdc++-v3/testsuite/22_locale/ctype/widen/char/wrapped_env.cc
index eddb670b8b9..0e4b03b732f 100644
--- a/libstdc++-v3/testsuite/22_locale/ctype/widen/char/wrapped_env.cc
+++ b/libstdc++-v3/testsuite/22_locale/ctype/widen/char/wrapped_env.cc
@@ -1,4 +1,4 @@
-// { dg-require-namedlocale "de_DE" }
+// { dg-require-namedlocale "de_DE.ISO8859-15" }
// 2001-08-15 Benjamin Kosnik <bkoz@redhat.com>
@@ -32,6 +32,6 @@ int main()
using namespace __gnu_test;
func_callback two;
two.push_back(&test01);
- run_tests_wrapped_env("de_DE", "LANG", two);
+ run_tests_wrapped_env(ISO_8859(15,de_DE), "LANG", two);
return 0;
}
diff --git a/libstdc++-v3/testsuite/22_locale/ctype/widen/char/wrapped_locale.cc b/libstdc++-v3/testsuite/22_locale/ctype/widen/char/wrapped_locale.cc
index b899fafbe90..43e2381d2cb 100644
--- a/libstdc++-v3/testsuite/22_locale/ctype/widen/char/wrapped_locale.cc
+++ b/libstdc++-v3/testsuite/22_locale/ctype/widen/char/wrapped_locale.cc
@@ -1,4 +1,4 @@
-// { dg-require-namedlocale "ja_JP.eucjp" }
+// { dg-require-namedlocale "ja_JP.eucJP" }
// 2001-08-15 Benjamin Kosnik <bkoz@redhat.com>
@@ -32,6 +32,6 @@ int main()
using namespace __gnu_test;
func_callback two;
two.push_back(&test01);
- run_tests_wrapped_locale("ja_JP.eucjp", two);
+ run_tests_wrapped_locale("ja_JP.eucJP", two);
return 0;
}
diff --git a/libstdc++-v3/testsuite/22_locale/ctype/widen/wchar_t/2.cc b/libstdc++-v3/testsuite/22_locale/ctype/widen/wchar_t/2.cc
index 7d2a142aaf8..e88eb1e906c 100644
--- a/libstdc++-v3/testsuite/22_locale/ctype/widen/wchar_t/2.cc
+++ b/libstdc++-v3/testsuite/22_locale/ctype/widen/wchar_t/2.cc
@@ -1,4 +1,4 @@
-// { dg-require-namedlocale "en_US.ISO-8859-1" }
+// { dg-require-namedlocale "en_US.ISO8859-1" }
// 2003-03-12 Petur Runolfsson <peturr02@ru.is>
@@ -31,7 +31,7 @@ void test02()
using namespace std;
bool test __attribute__((unused)) = true;
- locale loc = locale("en_US.ISO-8859-1");
+ locale loc = locale(ISO_8859(1,en_US));
const ctype<wchar_t>& wct = use_facet<ctype<wchar_t> >(loc);
char c = 0xff;
diff --git a/libstdc++-v3/testsuite/22_locale/ctype/widen/wchar_t/wrapped_env.cc b/libstdc++-v3/testsuite/22_locale/ctype/widen/wchar_t/wrapped_env.cc
index eddb670b8b9..0e4b03b732f 100644
--- a/libstdc++-v3/testsuite/22_locale/ctype/widen/wchar_t/wrapped_env.cc
+++ b/libstdc++-v3/testsuite/22_locale/ctype/widen/wchar_t/wrapped_env.cc
@@ -1,4 +1,4 @@
-// { dg-require-namedlocale "de_DE" }
+// { dg-require-namedlocale "de_DE.ISO8859-15" }
// 2001-08-15 Benjamin Kosnik <bkoz@redhat.com>
@@ -32,6 +32,6 @@ int main()
using namespace __gnu_test;
func_callback two;
two.push_back(&test01);
- run_tests_wrapped_env("de_DE", "LANG", two);
+ run_tests_wrapped_env(ISO_8859(15,de_DE), "LANG", two);
return 0;
}
diff --git a/libstdc++-v3/testsuite/22_locale/ctype/widen/wchar_t/wrapped_locale.cc b/libstdc++-v3/testsuite/22_locale/ctype/widen/wchar_t/wrapped_locale.cc
index b899fafbe90..43e2381d2cb 100644
--- a/libstdc++-v3/testsuite/22_locale/ctype/widen/wchar_t/wrapped_locale.cc
+++ b/libstdc++-v3/testsuite/22_locale/ctype/widen/wchar_t/wrapped_locale.cc
@@ -1,4 +1,4 @@
-// { dg-require-namedlocale "ja_JP.eucjp" }
+// { dg-require-namedlocale "ja_JP.eucJP" }
// 2001-08-15 Benjamin Kosnik <bkoz@redhat.com>
@@ -32,6 +32,6 @@ int main()
using namespace __gnu_test;
func_callback two;
two.push_back(&test01);
- run_tests_wrapped_locale("ja_JP.eucjp", two);
+ run_tests_wrapped_locale("ja_JP.eucJP", two);
return 0;
}
diff --git a/libstdc++-v3/testsuite/22_locale/facet/2.cc b/libstdc++-v3/testsuite/22_locale/facet/2.cc
index 6f8aabf1cee..7772be22e02 100644
--- a/libstdc++-v3/testsuite/22_locale/facet/2.cc
+++ b/libstdc++-v3/testsuite/22_locale/facet/2.cc
@@ -1,4 +1,4 @@
-// { dg-require-namedlocale "es_MX" }
+// { dg-require-namedlocale "es_MX.ISO8859-1" }
// 2000-08-31 Benjamin Kosnik <bkoz@redhat.com>
@@ -84,7 +84,7 @@ void test02()
// 4: Named locale should destroy facets when it goes out of scope.
// Not quite sure how to test for this w/o valgrind at the moment.
{
- locale loc03 = locale("es_MX");
+ locale loc03 = locale(ISO_8859(1,es_MX));
}
}
diff --git a/libstdc++-v3/testsuite/22_locale/locale/cons/12352.cc b/libstdc++-v3/testsuite/22_locale/locale/cons/12352.cc
index 9fac2993e84..e91758f7c96 100644
--- a/libstdc++-v3/testsuite/22_locale/locale/cons/12352.cc
+++ b/libstdc++-v3/testsuite/22_locale/locale/cons/12352.cc
@@ -1,5 +1,5 @@
// { dg-require-namedlocale "" }
-// { dg-require-namedlocale "en_US" }
+// { dg-require-namedlocale "en_US.ISO8859-1" }
// Copyright (C) 2003-2015 Free Software Foundation, Inc.
//
@@ -106,7 +106,7 @@ void test01(int iters)
std::locale loc1 = std::locale("");
std::locale loc2(loc1, std::locale::classic(),
std::locale::numeric);
- std::locale loc3 = std::locale("en_US");
+ std::locale loc3 = std::locale(ISO_8859(1,en_US));
std::locale loc4(loc3, std::locale::classic(),
std::locale::numeric);
}
diff --git a/libstdc++-v3/testsuite/22_locale/locale/cons/12658_thread-1.cc b/libstdc++-v3/testsuite/22_locale/locale/cons/12658_thread-1.cc
index e42678661b9..dea1c1ae6ad 100644
--- a/libstdc++-v3/testsuite/22_locale/locale/cons/12658_thread-1.cc
+++ b/libstdc++-v3/testsuite/22_locale/locale/cons/12658_thread-1.cc
@@ -1,8 +1,8 @@
// { dg-do run { target *-*-freebsd* *-*-dragonfly* *-*-netbsd* *-*-linux* *-*-gnu* *-*-solaris* *-*-cygwin *-*-rtems* *-*-darwin* } }
// { dg-options "-pthread" { target *-*-freebsd* *-*-dragonfly* *-*-netbsd* *-*-linux* *-*-gnu* } }
// { dg-options "-pthreads" { target *-*-solaris* } }
-// { dg-require-namedlocale "en_US" }
-// { dg-require-namedlocale "fr_FR" }
+// { dg-require-namedlocale "en_US.ISO8859-1" }
+// { dg-require-namedlocale "fr_FR.ISO8859-15" }
// Copyright (C) 2004-2015 Free Software Foundation, Inc.
//
@@ -39,7 +39,7 @@ void* thread_main(void*)
std::locale loc_c = std::locale::classic();
std::locale loc[max_locales];
for (int j = 0; j < max_locales; ++j)
- loc[j] = std::locale(j % 2 ? "en_US" : "fr_FR");
+ loc[j] = std::locale(j % 2 ? ISO_8859(1,en_US) : ISO_8859(15,fr_FR));
for (int i = 0; i < max_loop_count; ++i)
{
diff --git a/libstdc++-v3/testsuite/22_locale/locale/cons/12658_thread-2.cc b/libstdc++-v3/testsuite/22_locale/locale/cons/12658_thread-2.cc
index 279c9833450..4c51cb8e0a3 100644
--- a/libstdc++-v3/testsuite/22_locale/locale/cons/12658_thread-2.cc
+++ b/libstdc++-v3/testsuite/22_locale/locale/cons/12658_thread-2.cc
@@ -1,8 +1,8 @@
// { dg-do run { target *-*-freebsd* *-*-dragonfly* *-*-netbsd* *-*-linux* *-*-gnu* *-*-solaris* *-*-cygwin *-*-rtems* *-*-darwin* } }
// { dg-options "-pthread" { target *-*-freebsd* *-*-dragonfly* *-*-netbsd* *-*-linux* *-*-gnu* } }
// { dg-options "-pthreads" { target *-*-solaris* } }
-// { dg-require-namedlocale "en_US" }
-// { dg-require-namedlocale "fr_FR" }
+// { dg-require-namedlocale "en_US.ISO8859-1" }
+// { dg-require-namedlocale "fr_FR.ISO8859-15" }
// Copyright (C) 2004-2015 Free Software Foundation, Inc.
//
@@ -53,7 +53,7 @@ main()
pthread_t tid[max_thread_count];
for (int j = 0; j < max_locales; ++j)
- loc[j] = std::locale(j % 2 ? "en_US" : "fr_FR");
+ loc[j] = std::locale(j % 2 ? ISO_8859(1,en_US) : ISO_8859(15,fr_FR));
for (int i = 0; i < max_thread_count; i++)
pthread_create(&tid[i], 0, thread_main, 0);
diff --git a/libstdc++-v3/testsuite/22_locale/locale/cons/2.cc b/libstdc++-v3/testsuite/22_locale/locale/cons/2.cc
index 463f147d903..5e90feb5bd3 100644
--- a/libstdc++-v3/testsuite/22_locale/locale/cons/2.cc
+++ b/libstdc++-v3/testsuite/22_locale/locale/cons/2.cc
@@ -1,4 +1,4 @@
-// { dg-require-namedlocale "fr_FR" }
+// { dg-require-namedlocale "fr_FR.ISO8859-15" }
// 2000-09-13 Benjamin Kosnik <bkoz@redhat.com>
@@ -87,10 +87,10 @@ void test01()
// 3
// explicit locale(const char* std_name)
- locale loc06 = locale("fr_FR");
+ locale loc06 = locale(ISO_8859(15,fr_FR));
VERIFY( loc06 != loc01 );
VERIFY( loc06 != loc02 );
- VERIFY( loc06.name() == "fr_FR");
+ VERIFY( loc06.name() == ISO_8859(15,fr_FR));
locale loc07("");
VERIFY( loc07 != loc02 );
VERIFY( loc07.name() != "" );
@@ -113,7 +113,7 @@ void test01()
{
// This is the same as 5 only use "C" for loc("C")
locale loc09(loc06, "C", locale::ctype);
- VERIFY( loc09.name() != "fr_FR" );
+ VERIFY( loc09.name() != ISO_8859(15,fr_FR) );
VERIFY( loc09.name() != "C" );
VERIFY( loc09.name() != "*" );
VERIFY( loc09 != loc01 );
@@ -143,11 +143,11 @@ void test01()
{ VERIFY( false ); }
locale loc14(loc06, "C", locale::none);
- VERIFY( loc14.name() == "fr_FR" );
+ VERIFY( loc14.name() == ISO_8859(15,fr_FR) );
VERIFY( loc14 == loc06 );
locale loc15(loc06, "C", locale::collate );
- VERIFY( loc15.name() != "fr_FR" );
+ VERIFY( loc15.name() != ISO_8859(15,fr_FR) );
VERIFY( loc15.name() != "C" );
VERIFY( loc15.name() != "*" );
VERIFY( loc15.name() != loc09.name() );
@@ -161,7 +161,7 @@ void test01()
{
// This is the exact same as 4, with locale("C") for "C"
locale loc09(loc06, loc01, locale::ctype);
- VERIFY( loc09.name() != "fr_FR" );
+ VERIFY( loc09.name() != ISO_8859(15,fr_FR) );
VERIFY( loc09.name() != "C" );
VERIFY( loc09.name() != "*" );
VERIFY( loc09 != loc01 );
@@ -191,11 +191,11 @@ void test01()
{ VERIFY( false ); }
locale loc14(loc06, loc01, locale::none);
- VERIFY( loc14.name() == "fr_FR" );
+ VERIFY( loc14.name() == ISO_8859(15,fr_FR) );
VERIFY( loc14 == loc06 );
locale loc15(loc06, loc01, locale::collate);
- VERIFY( loc15.name() != "fr_FR" );
+ VERIFY( loc15.name() != ISO_8859(15,fr_FR) );
VERIFY( loc15.name() != "C" );
VERIFY( loc15.name() != "*" );
VERIFY( loc15.name() != loc09.name() );
diff --git a/libstdc++-v3/testsuite/22_locale/locale/cons/38365.cc b/libstdc++-v3/testsuite/22_locale/locale/cons/38365.cc
index dda44d9d16c..9d3faf2f42f 100644
--- a/libstdc++-v3/testsuite/22_locale/locale/cons/38365.cc
+++ b/libstdc++-v3/testsuite/22_locale/locale/cons/38365.cc
@@ -1,4 +1,4 @@
-// { dg-require-namedlocale "en_US" }
+// { dg-require-namedlocale "en_US.ISO8859-1" }
// Copyright (C) 2008-2015 Free Software Foundation, Inc.
//
@@ -29,7 +29,7 @@ void test01()
bool test __attribute__((unused)) = true;
locale other(locale("C"));
- locale one(locale("en_US"), new ctype<char>());
+ locale one(locale(ISO_8859(1,en_US)), new ctype<char>());
locale loc(other, one, locale::collate);
VERIFY( one.name() == "*" );
diff --git a/libstdc++-v3/testsuite/22_locale/locale/cons/38368.cc b/libstdc++-v3/testsuite/22_locale/locale/cons/38368.cc
index b9e20b33b3a..2f468eb04e4 100644
--- a/libstdc++-v3/testsuite/22_locale/locale/cons/38368.cc
+++ b/libstdc++-v3/testsuite/22_locale/locale/cons/38368.cc
@@ -1,4 +1,4 @@
-// { dg-require-namedlocale "en_US" }
+// { dg-require-namedlocale "en_US.ISO8859-1" }
// Copyright (C) 2008-2015 Free Software Foundation, Inc.
//
@@ -28,7 +28,7 @@ void test01()
using namespace std;
bool test __attribute__((unused)) = true;
- locale loc(locale("C"), "en_US", locale::collate);
+ locale loc(locale("C"), ISO_8859(1,en_US), locale::collate);
locale loc_copy(loc.name().c_str());
const moneypunct<char, true>& mpunt =
diff --git a/libstdc++-v3/testsuite/22_locale/locale/cons/4.cc b/libstdc++-v3/testsuite/22_locale/locale/cons/4.cc
index 064cec2051f..9d7fb34ac21 100644
--- a/libstdc++-v3/testsuite/22_locale/locale/cons/4.cc
+++ b/libstdc++-v3/testsuite/22_locale/locale/cons/4.cc
@@ -1,4 +1,4 @@
-// { dg-require-namedlocale "it_IT" }
+// { dg-require-namedlocale "it_IT.ISO8859-15" }
// 2000-09-13 Benjamin Kosnik <bkoz@redhat.com>
@@ -33,10 +33,10 @@ void test03()
bool test __attribute__((unused)) = true;
#ifdef _GLIBCXX_HAVE_SETENV
const char* LC_ALL_orig = getenv("LC_ALL");
- if (!setenv("LC_ALL", "it_IT", 1))
+ if (!setenv("LC_ALL", ISO_8859(15,it_IT), 1))
{
std::locale loc = std::locale("");
- VERIFY( loc.name() == "it_IT" );
+ VERIFY( loc.name() == ISO_8859(15,it_IT) );
setenv("LC_ALL", LC_ALL_orig ? LC_ALL_orig : "", 1);
}
#endif
diff --git a/libstdc++-v3/testsuite/22_locale/locale/cons/40184.cc b/libstdc++-v3/testsuite/22_locale/locale/cons/40184.cc
index 0977caf99d5..2ec464364a3 100644
--- a/libstdc++-v3/testsuite/22_locale/locale/cons/40184.cc
+++ b/libstdc++-v3/testsuite/22_locale/locale/cons/40184.cc
@@ -1,4 +1,4 @@
-// { dg-require-namedlocale "ja_JP.eucjp" }
+// { dg-require-namedlocale "ja_JP.eucJP" }
// Copyright (C) 2009-2015 Free Software Foundation, Inc.
//
@@ -29,7 +29,7 @@ void test01()
using namespace std;
bool test __attribute__((unused)) = true;
- locale locf(locale("C"), "ja_JP.eucjp", locale::monetary);
+ locale locf(locale("C"), "ja_JP.eucJP", locale::monetary);
const moneypunct<wchar_t, false>& mpf =
use_facet<moneypunct<wchar_t, false> >(locf);
@@ -40,7 +40,7 @@ void test01()
VERIFY( mpf.curr_symbol() == mpf_copy.curr_symbol() );
- locale loct(locale("C"), "ja_JP.eucjp", locale::monetary);
+ locale loct(locale("C"), "ja_JP.eucJP", locale::monetary);
const moneypunct<wchar_t, true>& mpt =
use_facet<moneypunct<wchar_t, true> >(loct);
diff --git a/libstdc++-v3/testsuite/22_locale/locale/cons/7.cc b/libstdc++-v3/testsuite/22_locale/locale/cons/7.cc
index 21d4ed32261..cef8d7e5a39 100644
--- a/libstdc++-v3/testsuite/22_locale/locale/cons/7.cc
+++ b/libstdc++-v3/testsuite/22_locale/locale/cons/7.cc
@@ -1,4 +1,4 @@
-// { dg-require-namedlocale "is_IS" }
+// { dg-require-namedlocale "is_IS.ISO8859-1" }
// 2001-01-19 Benjamin Kosnik <bkoz@redhat.com>
@@ -36,9 +36,9 @@ test02()
// construct a locale object with the specialized facet.
locale loc_c = locale::classic();
- locale loc_is = locale("is_IS");
+ locale loc_is = locale(ISO_8859(1,is_IS));
locale loc_1(locale::classic(),
- new numpunct_byname<char>("is_IS"));
+ new numpunct_byname<char>(ISO_8859(1,is_IS)));
// check names
VERIFY( loc_c.name() == name_c );
diff --git a/libstdc++-v3/testsuite/22_locale/locale/global_locale_objects/14071.cc b/libstdc++-v3/testsuite/22_locale/locale/global_locale_objects/14071.cc
index e0243645e0e..623117e8e55 100644
--- a/libstdc++-v3/testsuite/22_locale/locale/global_locale_objects/14071.cc
+++ b/libstdc++-v3/testsuite/22_locale/locale/global_locale_objects/14071.cc
@@ -1,5 +1,5 @@
-// { dg-require-namedlocale "is_IS" }
-// { dg-require-namedlocale "en_US" }
+// { dg-require-namedlocale "is_IS.ISO8859-1" }
+// { dg-require-namedlocale "en_US.ISO8859-1" }
// 2004-02-09 Petur Runolfsson <peturr02@ru.is>
@@ -32,8 +32,8 @@ void test01()
using namespace std;
bool test __attribute__((unused)) = true;
- const locale loc_is = locale("is_IS");
- const locale loc_en = locale("en_US");
+ const locale loc_is = locale(ISO_8859(1,is_IS));
+ const locale loc_en = locale(ISO_8859(1,en_US));
const locale loc(loc_is, loc_en, locale::monetary);
diff --git a/libstdc++-v3/testsuite/22_locale/locale/global_locale_objects/2.cc b/libstdc++-v3/testsuite/22_locale/locale/global_locale_objects/2.cc
index 3676634c947..6ffe72c0edd 100644
--- a/libstdc++-v3/testsuite/22_locale/locale/global_locale_objects/2.cc
+++ b/libstdc++-v3/testsuite/22_locale/locale/global_locale_objects/2.cc
@@ -1,5 +1,5 @@
-// { dg-require-namedlocale "en_PH" }
-// { dg-require-namedlocale "es_MX" }
+// { dg-require-namedlocale "en_PH.ISO8859-1" }
+// { dg-require-namedlocale "es_MX.ISO8859-1" }
// 2000-09-13 Benjamin Kosnik <bkoz@redhat.com>
@@ -32,8 +32,8 @@ void test02()
using namespace std;
bool test __attribute__((unused)) = true;
- const string ph("en_PH");
- const string mx("es_MX");
+ const string ph(ISO_8859(1,en_PH));
+ const string mx(ISO_8859(1,es_MX));
const char* orig = setlocale(LC_ALL, 0);
const char* testph = setlocale(LC_ALL, ph.c_str());
const char* testmx = setlocale(LC_ALL, mx.c_str());
diff --git a/libstdc++-v3/testsuite/22_locale/messages/13631.cc b/libstdc++-v3/testsuite/22_locale/messages/13631.cc
index fb93c000f4c..b9856a0a228 100644
--- a/libstdc++-v3/testsuite/22_locale/messages/13631.cc
+++ b/libstdc++-v3/testsuite/22_locale/messages/13631.cc
@@ -1,4 +1,4 @@
-// { dg-require-namedlocale "fr_FR" }
+// { dg-require-namedlocale "fr_FR.ISO8859-15" }
// Copyright (C) 2014-2015 Free Software Foundation, Inc.
//
@@ -27,7 +27,7 @@ void test01()
// This is defined through CXXFLAGS in scripts/testsuite_flags[.in].
const char* dir = LOCALEDIR;
- std::locale l("fr_FR");
+ std::locale l(ISO_8859(15,fr_FR));
typedef std::messages<char> messages;
@@ -63,7 +63,7 @@ void test02()
// This is defined through CXXFLAGS in scripts/testsuite_flags[.in].
const char* dir = LOCALEDIR;
- std::locale l("fr_FR");
+ std::locale l(ISO_8859(15,fr_FR));
typedef std::messages<wchar_t> messages;
diff --git a/libstdc++-v3/testsuite/22_locale/messages/members/char/1.cc b/libstdc++-v3/testsuite/22_locale/messages/members/char/1.cc
index ff60a1842c7..8cfbaae00ee 100644
--- a/libstdc++-v3/testsuite/22_locale/messages/members/char/1.cc
+++ b/libstdc++-v3/testsuite/22_locale/messages/members/char/1.cc
@@ -1,4 +1,4 @@
-// { dg-require-namedlocale "de_DE" }
+// { dg-require-namedlocale "de_DE.ISO8859-15" }
// 2001-07-17 Benjamin Kosnik <bkoz@redhat.com>
@@ -36,7 +36,7 @@ void test01()
// basic construction
locale loc_c = locale::classic();
- locale loc_de = locale("de_DE");
+ locale loc_de = locale(ISO_8859(15,de_DE));
VERIFY( loc_c != loc_de );
// cache the messages facets
@@ -46,7 +46,7 @@ void test01()
// string_type get(catalog, int, int, const string_type& ) const;
// void close(catalog) const;
- // Check German (de_DE) locale.
+ // Check German (de_DE.ISO8859-15) locale.
catalog cat_de = mssg_de.open("libstdc++", loc_c, dir);
string s01 = mssg_de.get(cat_de, 0, 0, "please");
string s02 = mssg_de.get(cat_de, 0, 0, "thank you");
diff --git a/libstdc++-v3/testsuite/22_locale/messages/members/char/2.cc b/libstdc++-v3/testsuite/22_locale/messages/members/char/2.cc
index 11ced8fb95f..699ca2d8e69 100644
--- a/libstdc++-v3/testsuite/22_locale/messages/members/char/2.cc
+++ b/libstdc++-v3/testsuite/22_locale/messages/members/char/2.cc
@@ -1,4 +1,4 @@
-// { dg-require-namedlocale "fr_FR" }
+// { dg-require-namedlocale "fr_FR.ISO8859-15" }
// 2001-07-17 Benjamin Kosnik <bkoz@redhat.com>
@@ -35,7 +35,7 @@ void test02()
const char* dir = LOCALEDIR;
// basic construction
- locale loc_fr = locale("fr_FR");
+ locale loc_fr = locale(ISO_8859(15,fr_FR));
VERIFY( locale::classic() != loc_fr );
// cache the messages facets
diff --git a/libstdc++-v3/testsuite/22_locale/messages/members/char/3.cc b/libstdc++-v3/testsuite/22_locale/messages/members/char/3.cc
index 8ed0a7a81fc..889e3857814 100644
--- a/libstdc++-v3/testsuite/22_locale/messages/members/char/3.cc
+++ b/libstdc++-v3/testsuite/22_locale/messages/members/char/3.cc
@@ -1,5 +1,5 @@
-// { dg-require-namedlocale "en_US" }
-// { dg-require-namedlocale "fr_FR" }
+// { dg-require-namedlocale "en_US.ISO8859-1" }
+// { dg-require-namedlocale "fr_FR.ISO8859-15" }
// 2001-07-17 Benjamin Kosnik <bkoz@redhat.com>
@@ -37,8 +37,8 @@ void test03()
// basic construction
locale loc_c = locale::classic();
- locale loc_us = locale("en_US");
- locale loc_fr = locale("fr_FR");
+ locale loc_us = locale(ISO_8859(1,en_US));
+ locale loc_fr = locale(ISO_8859(15,fr_FR));
VERIFY( loc_c != loc_us );
VERIFY( loc_us != loc_fr );
diff --git a/libstdc++-v3/testsuite/22_locale/messages/members/char/wrapped_env.cc b/libstdc++-v3/testsuite/22_locale/messages/members/char/wrapped_env.cc
index 77a4ffe0453..97513fa42b5 100644
--- a/libstdc++-v3/testsuite/22_locale/messages/members/char/wrapped_env.cc
+++ b/libstdc++-v3/testsuite/22_locale/messages/members/char/wrapped_env.cc
@@ -1,6 +1,6 @@
-// { dg-require-namedlocale "de_DE" }
-// { dg-require-namedlocale "fr_FR" }
-// { dg-require-namedlocale "en_US" }
+// { dg-require-namedlocale "de_DE.ISO8859-15" }
+// { dg-require-namedlocale "fr_FR.ISO8859-15" }
+// { dg-require-namedlocale "en_US.ISO8859-1" }
// 2001-08-15 Benjamin Kosnik <bkoz@redhat.com>
@@ -44,6 +44,6 @@ int main()
two.push_back(&test01);
two.push_back(&test02);
two.push_back(&test03);
- run_tests_wrapped_env("de_DE", "LANG", two);
+ run_tests_wrapped_env(ISO_8859(15,de_DE), "LANG", two);
return 0;
}
diff --git a/libstdc++-v3/testsuite/22_locale/messages/members/char/wrapped_locale.cc b/libstdc++-v3/testsuite/22_locale/messages/members/char/wrapped_locale.cc
index 8dd71b5982c..26fb30241fa 100644
--- a/libstdc++-v3/testsuite/22_locale/messages/members/char/wrapped_locale.cc
+++ b/libstdc++-v3/testsuite/22_locale/messages/members/char/wrapped_locale.cc
@@ -1,7 +1,7 @@
-// { dg-require-namedlocale "ja_JP.eucjp" }
-// { dg-require-namedlocale "de_DE" }
-// { dg-require-namedlocale "fr_FR" }
-// { dg-require-namedlocale "en_US" }
+// { dg-require-namedlocale "ja_JP.eucJP" }
+// { dg-require-namedlocale "de_DE.ISO8859-15" }
+// { dg-require-namedlocale "fr_FR.ISO8859-15" }
+// { dg-require-namedlocale "en_US.ISO8859-1" }
// 2001-08-15 Benjamin Kosnik <bkoz@redhat.com>
@@ -45,6 +45,6 @@ int main()
two.push_back(&test01);
two.push_back(&test02);
two.push_back(&test03);
- run_tests_wrapped_locale("ja_JP.eucjp", two);
+ run_tests_wrapped_locale("ja_JP.eucJP", two);
return 0;
}
diff --git a/libstdc++-v3/testsuite/22_locale/messages_byname/named_equivalence.cc b/libstdc++-v3/testsuite/22_locale/messages_byname/named_equivalence.cc
index b30ee772d84..4229caef164 100644
--- a/libstdc++-v3/testsuite/22_locale/messages_byname/named_equivalence.cc
+++ b/libstdc++-v3/testsuite/22_locale/messages_byname/named_equivalence.cc
@@ -1,4 +1,4 @@
-// { dg-require-namedlocale "de_DE" }
+// { dg-require-namedlocale "de_DE.ISO8859-15" }
// 2001-07-17 Benjamin Kosnik <bkoz@redhat.com>
@@ -36,10 +36,10 @@ void test01()
const char* dir = LOCALEDIR;
locale loc_c = locale::classic();
- locale loc_de = locale("de_DE");
+ locale loc_de = locale(ISO_8859(15,de_DE));
str = loc_de.name();
- locale loc_byname(locale::classic(), new messages_byname<char>("de_DE"));
+ locale loc_byname(locale::classic(), new messages_byname<char>(ISO_8859(15,de_DE)));
str = loc_byname.name();
VERIFY( loc_de != loc_byname );
@@ -52,7 +52,7 @@ void test01()
// string_type get(catalog, int, int, const string_type& ) const;
// void close(catalog) const;
- // Check German (de_DE) locale.
+ // Check German (de_DE.ISO8859-15) locale.
catalog cat_de = mssg_de.open("libstdc++", loc_c, dir);
string s01 = mssg_de.get(cat_de, 0, 0, "please");
string s02 = mssg_de.get(cat_de, 0, 0, "thank you");
diff --git a/libstdc++-v3/testsuite/22_locale/money_get/get/char/1.cc b/libstdc++-v3/testsuite/22_locale/money_get/get/char/1.cc
index 2513d7d789c..e9de263632d 100644
--- a/libstdc++-v3/testsuite/22_locale/money_get/get/char/1.cc
+++ b/libstdc++-v3/testsuite/22_locale/money_get/get/char/1.cc
@@ -1,4 +1,4 @@
-// { dg-require-namedlocale "de_DE@euro" }
+// { dg-require-namedlocale "de_DE.ISO8859-15" }
// 2001-09-12 Benjamin Kosnik <bkoz@redhat.com>
@@ -35,7 +35,7 @@ void test01()
// basic construction
locale loc_c = locale::classic();
- locale loc_de = locale("de_DE@euro");
+ locale loc_de = locale(ISO_8859(15,de_DE));
VERIFY( loc_c != loc_de );
// sanity check the data is correct.
diff --git a/libstdc++-v3/testsuite/22_locale/money_get/get/char/10.cc b/libstdc++-v3/testsuite/22_locale/money_get/get/char/10.cc
index f484576a47c..bf5e8aaa9d9 100644
--- a/libstdc++-v3/testsuite/22_locale/money_get/get/char/10.cc
+++ b/libstdc++-v3/testsuite/22_locale/money_get/get/char/10.cc
@@ -1,4 +1,4 @@
-// { dg-require-namedlocale "en_US" }
+// { dg-require-namedlocale "en_US.ISO8859-1" }
// 2003-10-23 Paolo Carlini <pcarlini@suse.de>
@@ -32,7 +32,7 @@ void test01()
bool test __attribute__((unused)) = true;
- locale loc_us = locale("en_US");
+ locale loc_us = locale(ISO_8859(1,en_US));
iterator_type end;
istringstream iss;
diff --git a/libstdc++-v3/testsuite/22_locale/money_get/get/char/11.cc b/libstdc++-v3/testsuite/22_locale/money_get/get/char/11.cc
index a5fdb418e3a..f3d340b6f76 100644
--- a/libstdc++-v3/testsuite/22_locale/money_get/get/char/11.cc
+++ b/libstdc++-v3/testsuite/22_locale/money_get/get/char/11.cc
@@ -1,4 +1,4 @@
-// { dg-require-namedlocale "de_DE@euro" }
+// { dg-require-namedlocale "de_DE.ISO8859-15" }
// 2003-10-24 Paolo Carlini <pcarlini@suse.de>
@@ -34,7 +34,7 @@ void test01()
bool test __attribute__((unused)) = true;
// basic construction
- locale loc_de = locale("de_DE@euro");
+ locale loc_de = locale(ISO_8859(15,de_DE));
iterator_type end;
istringstream iss;
diff --git a/libstdc++-v3/testsuite/22_locale/money_get/get/char/11528.cc b/libstdc++-v3/testsuite/22_locale/money_get/get/char/11528.cc
index 187158259c1..5c21de57430 100644
--- a/libstdc++-v3/testsuite/22_locale/money_get/get/char/11528.cc
+++ b/libstdc++-v3/testsuite/22_locale/money_get/get/char/11528.cc
@@ -1,4 +1,4 @@
-// { dg-require-namedlocale "en_US" }
+// { dg-require-namedlocale "en_US.ISO8859-1" }
// Copyright (C) 2003-2015 Free Software Foundation, Inc.
//
@@ -30,7 +30,7 @@ void test01()
bool test __attribute__((unused)) = true;
- locale loc_us = locale("en_US");
+ locale loc_us = locale(ISO_8859(1,en_US));
iterator_type end;
istringstream iss;
diff --git a/libstdc++-v3/testsuite/22_locale/money_get/get/char/12.cc b/libstdc++-v3/testsuite/22_locale/money_get/get/char/12.cc
index c39bcb5b5d2..cdf0505e194 100644
--- a/libstdc++-v3/testsuite/22_locale/money_get/get/char/12.cc
+++ b/libstdc++-v3/testsuite/22_locale/money_get/get/char/12.cc
@@ -1,4 +1,4 @@
-// { dg-require-namedlocale "de_DE@euro" }
+// { dg-require-namedlocale "de_DE.ISO8859-15" }
// 2004-02-05 Paolo Carlini <pcarlini@suse.de>
@@ -35,7 +35,7 @@ void test01()
// basic construction
locale loc_c = locale::classic();
- locale loc_de = locale("de_DE@euro");
+ locale loc_de = locale(ISO_8859(15,de_DE));
VERIFY( loc_c != loc_de );
// total EPA budget FY 2002
diff --git a/libstdc++-v3/testsuite/22_locale/money_get/get/char/13.cc b/libstdc++-v3/testsuite/22_locale/money_get/get/char/13.cc
index a12970edd58..f5f4fd9ec0f 100644
--- a/libstdc++-v3/testsuite/22_locale/money_get/get/char/13.cc
+++ b/libstdc++-v3/testsuite/22_locale/money_get/get/char/13.cc
@@ -1,4 +1,4 @@
-// { dg-require-namedlocale "de_DE@euro" }
+// { dg-require-namedlocale "de_DE.ISO8859-15" }
// 2004-02-05 Paolo Carlini <pcarlini@suse.de>
@@ -35,7 +35,7 @@ void test01()
// basic construction
locale loc_c = locale::classic();
- locale loc_de = locale("de_DE@euro");
+ locale loc_de = locale(ISO_8859(15,de_DE));
VERIFY( loc_c != loc_de );
iterator_type end01, end02;
diff --git a/libstdc++-v3/testsuite/22_locale/money_get/get/char/15.cc b/libstdc++-v3/testsuite/22_locale/money_get/get/char/15.cc
index 3684694c626..9978694c117 100644
--- a/libstdc++-v3/testsuite/22_locale/money_get/get/char/15.cc
+++ b/libstdc++-v3/testsuite/22_locale/money_get/get/char/15.cc
@@ -1,4 +1,4 @@
-// { dg-require-namedlocale "de_DE@euro" }
+// { dg-require-namedlocale "de_DE.ISO8859-15" }
// 2004-03-01 Paolo Carlini <pcarlini@suse.de>
@@ -36,7 +36,7 @@ void test01()
// basic construction
locale loc_c = locale::classic();
- locale loc_de = locale("de_DE@euro");
+ locale loc_de = locale(ISO_8859(15,de_DE));
VERIFY( loc_c != loc_de );
iterator_type end01, end02;
diff --git a/libstdc++-v3/testsuite/22_locale/money_get/get/char/16.cc b/libstdc++-v3/testsuite/22_locale/money_get/get/char/16.cc
index 9f4c3482792..0278cba8ae2 100644
--- a/libstdc++-v3/testsuite/22_locale/money_get/get/char/16.cc
+++ b/libstdc++-v3/testsuite/22_locale/money_get/get/char/16.cc
@@ -1,5 +1,5 @@
-// { dg-require-namedlocale "de_DE@euro" }
-// { dg-require-namedlocale "en_HK" }
+// { dg-require-namedlocale "de_DE.ISO8859-15" }
+// { dg-require-namedlocale "en_HK.ISO8859-1" }
// 2004-03-02 Paolo Carlini <pcarlini@suse.de>
@@ -36,8 +36,8 @@ void test01()
// basic construction
locale loc_c = locale::classic();
- locale loc_de = locale("de_DE@euro");
- locale loc_hk = locale("en_HK");
+ locale loc_de = locale(ISO_8859(15,de_DE));
+ locale loc_hk = locale(ISO_8859(1,en_HK));
VERIFY( loc_hk != loc_de );
VERIFY( loc_c != loc_hk );
diff --git a/libstdc++-v3/testsuite/22_locale/money_get/get/char/17.cc b/libstdc++-v3/testsuite/22_locale/money_get/get/char/17.cc
index af88c50c4b4..6a30990a43a 100644
--- a/libstdc++-v3/testsuite/22_locale/money_get/get/char/17.cc
+++ b/libstdc++-v3/testsuite/22_locale/money_get/get/char/17.cc
@@ -1,4 +1,4 @@
-// { dg-require-namedlocale "de_DE@euro" }
+// { dg-require-namedlocale "de_DE.ISO8859-15" }
// 2004-03-08 Paolo Carlini <pcarlini@suse.de>
@@ -36,7 +36,7 @@ void test01()
// basic construction
locale loc_c = locale::classic();
- locale loc_de = locale("de_DE@euro");
+ locale loc_de = locale(ISO_8859(15,de_DE));
VERIFY( loc_c != loc_de );
iterator_type end, end02;
diff --git a/libstdc++-v3/testsuite/22_locale/money_get/get/char/18.cc b/libstdc++-v3/testsuite/22_locale/money_get/get/char/18.cc
index 7d4066d9c71..a66705831e6 100644
--- a/libstdc++-v3/testsuite/22_locale/money_get/get/char/18.cc
+++ b/libstdc++-v3/testsuite/22_locale/money_get/get/char/18.cc
@@ -1,4 +1,4 @@
-// { dg-require-namedlocale "en_HK" }
+// { dg-require-namedlocale "en_HK.ISO8859-1" }
// 2004-03-15 Paolo Carlini <pcarlini@suse.de>
@@ -36,7 +36,7 @@ void test01()
// basic construction
locale loc_c = locale::classic();
- locale loc_hk = locale("en_HK");
+ locale loc_hk = locale(ISO_8859(1,en_HK));
VERIFY( loc_c != loc_hk );
iterator_type end, end01, end02;
diff --git a/libstdc++-v3/testsuite/22_locale/money_get/get/char/2.cc b/libstdc++-v3/testsuite/22_locale/money_get/get/char/2.cc
index 3d384fd5d5e..a18dbd3b07e 100644
--- a/libstdc++-v3/testsuite/22_locale/money_get/get/char/2.cc
+++ b/libstdc++-v3/testsuite/22_locale/money_get/get/char/2.cc
@@ -1,4 +1,4 @@
-// { dg-require-namedlocale "en_HK" }
+// { dg-require-namedlocale "en_HK.ISO8859-1" }
// 2001-09-12 Benjamin Kosnik <bkoz@redhat.com>
@@ -35,7 +35,7 @@ void test02()
// basic construction
locale loc_c = locale::classic();
- locale loc_hk = locale("en_HK");
+ locale loc_hk = locale(ISO_8859(1,en_HK));
VERIFY( loc_c != loc_hk );
// total EPA budget FY 2002
@@ -80,7 +80,7 @@ void test02()
VERIFY( result11 == digits4 );
VERIFY( err11 == ios_base::eofbit );
- // for the "en_HK" locale the parsing of the very same input streams must
+ // for the "en_HK.ISO8859-1" locale the parsing of the very same input streams must
// be successful without showbase too, since the symbol field appears in
// the first positions in the format and the symbol, when present, must be
// consumed.
diff --git a/libstdc++-v3/testsuite/22_locale/money_get/get/char/3.cc b/libstdc++-v3/testsuite/22_locale/money_get/get/char/3.cc
index c2cbda993b3..86b84a387f1 100644
--- a/libstdc++-v3/testsuite/22_locale/money_get/get/char/3.cc
+++ b/libstdc++-v3/testsuite/22_locale/money_get/get/char/3.cc
@@ -1,4 +1,4 @@
-// { dg-require-namedlocale "de_DE@euro" }
+// { dg-require-namedlocale "de_DE.ISO8859-15" }
// 2001-09-12 Benjamin Kosnik <bkoz@redhat.com>
@@ -35,7 +35,7 @@ void test03()
// basic construction
locale loc_c = locale::classic();
- locale loc_de = locale("de_DE@euro");
+ locale loc_de = locale(ISO_8859(15,de_DE));
VERIFY( loc_c != loc_de );
// total EPA budget FY 2002
diff --git a/libstdc++-v3/testsuite/22_locale/money_get/get/char/4.cc b/libstdc++-v3/testsuite/22_locale/money_get/get/char/4.cc
index 2db1a091fcc..cc84f2eb04a 100644
--- a/libstdc++-v3/testsuite/22_locale/money_get/get/char/4.cc
+++ b/libstdc++-v3/testsuite/22_locale/money_get/get/char/4.cc
@@ -1,4 +1,4 @@
-// { dg-require-namedlocale "en_HK" }
+// { dg-require-namedlocale "en_HK.ISO8859-1" }
// 2001-09-12 Benjamin Kosnik <bkoz@redhat.com>
@@ -35,7 +35,7 @@ void test04()
// basic construction
locale loc_c = locale::classic();
- locale loc_hk = locale("en_HK");
+ locale loc_hk = locale(ISO_8859(1,en_HK));
VERIFY( loc_c != loc_hk );
// input less than frac_digits
diff --git a/libstdc++-v3/testsuite/22_locale/money_get/get/char/wrapped_env.cc b/libstdc++-v3/testsuite/22_locale/money_get/get/char/wrapped_env.cc
index dce4cb05c91..9e2c2381841 100644
--- a/libstdc++-v3/testsuite/22_locale/money_get/get/char/wrapped_env.cc
+++ b/libstdc++-v3/testsuite/22_locale/money_get/get/char/wrapped_env.cc
@@ -1,6 +1,6 @@
-// { dg-require-namedlocale "de_DE" }
-// { dg-require-namedlocale "de_DE@euro" }
-// { dg-require-namedlocale "en_HK" }
+// { dg-require-namedlocale "de_DE.ISO8859-15" }
+// { dg-require-namedlocale "de_DE.ISO8859-15" }
+// { dg-require-namedlocale "en_HK.ISO8859-1" }
// 2001-08-15 Benjamin Kosnik <bkoz@redhat.com>
@@ -69,6 +69,6 @@ int main()
two.push_back(&test06);
two.push_back(&test07);
two.push_back(&test08);
- run_tests_wrapped_env("de_DE", "LANG", two);
+ run_tests_wrapped_env(ISO_8859(15,de_DE), "LANG", two);
return 0;
}
diff --git a/libstdc++-v3/testsuite/22_locale/money_get/get/char/wrapped_locale.cc b/libstdc++-v3/testsuite/22_locale/money_get/get/char/wrapped_locale.cc
index c6a60547395..8b93bc0c1ab 100644
--- a/libstdc++-v3/testsuite/22_locale/money_get/get/char/wrapped_locale.cc
+++ b/libstdc++-v3/testsuite/22_locale/money_get/get/char/wrapped_locale.cc
@@ -1,6 +1,6 @@
-// { dg-require-namedlocale "ja_JP.eucjp" }
-// { dg-require-namedlocale "de_DE@euro" }
-// { dg-require-namedlocale "en_HK" }
+// { dg-require-namedlocale "ja_JP.eucJP" }
+// { dg-require-namedlocale "de_DE.ISO8859-15" }
+// { dg-require-namedlocale "en_HK.ISO8859-1" }
// 2001-08-15 Benjamin Kosnik <bkoz@redhat.com>
@@ -69,6 +69,6 @@ int main()
two.push_back(&test06);
two.push_back(&test07);
two.push_back(&test08);
- run_tests_wrapped_locale("ja_JP.eucjp", two);
+ run_tests_wrapped_locale("ja_JP.eucJP", two);
return 0;
}
diff --git a/libstdc++-v3/testsuite/22_locale/money_get/get/wchar_t/1.cc b/libstdc++-v3/testsuite/22_locale/money_get/get/wchar_t/1.cc
index 8500817fb46..eb9eb2c5aa0 100644
--- a/libstdc++-v3/testsuite/22_locale/money_get/get/wchar_t/1.cc
+++ b/libstdc++-v3/testsuite/22_locale/money_get/get/wchar_t/1.cc
@@ -1,4 +1,4 @@
-// { dg-require-namedlocale "de_DE@euro" }
+// { dg-require-namedlocale "de_DE.ISO8859-15" }
// 2001-09-12 Benjamin Kosnik <bkoz@redhat.com>
@@ -35,7 +35,7 @@ void test01()
// basic construction
locale loc_c = locale::classic();
- locale loc_de = locale("de_DE@euro");
+ locale loc_de = locale(ISO_8859(15,de_DE));
VERIFY( loc_c != loc_de );
// sanity check the data is correct.
diff --git a/libstdc++-v3/testsuite/22_locale/money_get/get/wchar_t/10.cc b/libstdc++-v3/testsuite/22_locale/money_get/get/wchar_t/10.cc
index f827d3835e6..bc993bdfe74 100644
--- a/libstdc++-v3/testsuite/22_locale/money_get/get/wchar_t/10.cc
+++ b/libstdc++-v3/testsuite/22_locale/money_get/get/wchar_t/10.cc
@@ -1,4 +1,4 @@
-// { dg-require-namedlocale "en_US" }
+// { dg-require-namedlocale "en_US.ISO8859-1" }
// 2003-10-23 Paolo Carlini <pcarlini@suse.de>
@@ -32,7 +32,7 @@ void test01()
bool test __attribute__((unused)) = true;
- locale loc_us = locale("en_US");
+ locale loc_us = locale(ISO_8859(1,en_US));
iterator_type end;
wistringstream iss;
diff --git a/libstdc++-v3/testsuite/22_locale/money_get/get/wchar_t/11.cc b/libstdc++-v3/testsuite/22_locale/money_get/get/wchar_t/11.cc
index eba0990ee86..57da1532668 100644
--- a/libstdc++-v3/testsuite/22_locale/money_get/get/wchar_t/11.cc
+++ b/libstdc++-v3/testsuite/22_locale/money_get/get/wchar_t/11.cc
@@ -1,4 +1,4 @@
-// { dg-require-namedlocale "de_DE@euro" }
+// { dg-require-namedlocale "de_DE.ISO8859-15" }
// 2003-10-24 Paolo Carlini <pcarlini@suse.de>
@@ -34,7 +34,7 @@ void test01()
bool test __attribute__((unused)) = true;
// basic construction
- locale loc_de = locale("de_DE@euro");
+ locale loc_de = locale(ISO_8859(15,de_DE));
iterator_type end;
wistringstream iss;
diff --git a/libstdc++-v3/testsuite/22_locale/money_get/get/wchar_t/11528.cc b/libstdc++-v3/testsuite/22_locale/money_get/get/wchar_t/11528.cc
index bd9a5906285..e57ddf349ec 100644
--- a/libstdc++-v3/testsuite/22_locale/money_get/get/wchar_t/11528.cc
+++ b/libstdc++-v3/testsuite/22_locale/money_get/get/wchar_t/11528.cc
@@ -1,4 +1,4 @@
-// { dg-require-namedlocale "en_US" }
+// { dg-require-namedlocale "en_US.ISO8859-1" }
// Copyright (C) 2003-2015 Free Software Foundation, Inc.
//
@@ -30,7 +30,7 @@ void test01()
bool test __attribute__((unused)) = true;
- locale loc_us = locale("en_US");
+ locale loc_us = locale(ISO_8859(1,en_US));
iterator_type end;
wistringstream iss;
diff --git a/libstdc++-v3/testsuite/22_locale/money_get/get/wchar_t/12.cc b/libstdc++-v3/testsuite/22_locale/money_get/get/wchar_t/12.cc
index 87348cf77ab..0fdbd995a74 100644
--- a/libstdc++-v3/testsuite/22_locale/money_get/get/wchar_t/12.cc
+++ b/libstdc++-v3/testsuite/22_locale/money_get/get/wchar_t/12.cc
@@ -1,4 +1,4 @@
-// { dg-require-namedlocale "de_DE@euro" }
+// { dg-require-namedlocale "de_DE.ISO8859-15" }
// 2004-02-05 Paolo Carlini <pcarlini@suse.de>
@@ -35,7 +35,7 @@ void test01()
// basic construction
locale loc_c = locale::classic();
- locale loc_de = locale("de_DE@euro");
+ locale loc_de = locale(ISO_8859(15,de_DE));
VERIFY( loc_c != loc_de );
// total EPA budget FY 2002
diff --git a/libstdc++-v3/testsuite/22_locale/money_get/get/wchar_t/13.cc b/libstdc++-v3/testsuite/22_locale/money_get/get/wchar_t/13.cc
index d2cdba0a2a3..546e50a8f97 100644
--- a/libstdc++-v3/testsuite/22_locale/money_get/get/wchar_t/13.cc
+++ b/libstdc++-v3/testsuite/22_locale/money_get/get/wchar_t/13.cc
@@ -1,4 +1,4 @@
-// { dg-require-namedlocale "de_DE@euro" }
+// { dg-require-namedlocale "de_DE.ISO8859-15" }
// 2004-02-05 Paolo Carlini <pcarlini@suse.de>
@@ -35,7 +35,7 @@ void test01()
// basic construction
locale loc_c = locale::classic();
- locale loc_de = locale("de_DE@euro");
+ locale loc_de = locale(ISO_8859(15,de_DE));
VERIFY( loc_c != loc_de );
iterator_type end01, end02;
diff --git a/libstdc++-v3/testsuite/22_locale/money_get/get/wchar_t/15.cc b/libstdc++-v3/testsuite/22_locale/money_get/get/wchar_t/15.cc
index fd5e7257e08..9e72ed81deb 100644
--- a/libstdc++-v3/testsuite/22_locale/money_get/get/wchar_t/15.cc
+++ b/libstdc++-v3/testsuite/22_locale/money_get/get/wchar_t/15.cc
@@ -1,4 +1,4 @@
-// { dg-require-namedlocale "de_DE@euro" }
+// { dg-require-namedlocale "de_DE.ISO8859-15" }
// 2004-03-01 Paolo Carlini <pcarlini@suse.de>
@@ -36,7 +36,7 @@ void test01()
// basic construction
locale loc_c = locale::classic();
- locale loc_de = locale("de_DE@euro");
+ locale loc_de = locale(ISO_8859(15,de_DE));
VERIFY( loc_c != loc_de );
iterator_type end01, end02;
diff --git a/libstdc++-v3/testsuite/22_locale/money_get/get/wchar_t/16.cc b/libstdc++-v3/testsuite/22_locale/money_get/get/wchar_t/16.cc
index 0d0077f8cdc..833e8277036 100644
--- a/libstdc++-v3/testsuite/22_locale/money_get/get/wchar_t/16.cc
+++ b/libstdc++-v3/testsuite/22_locale/money_get/get/wchar_t/16.cc
@@ -1,5 +1,5 @@
-// { dg-require-namedlocale "de_DE@euro" }
-// { dg-require-namedlocale "en_HK" }
+// { dg-require-namedlocale "de_DE.ISO8859-15" }
+// { dg-require-namedlocale "en_HK.ISO8859-1" }
// 2004-03-02 Paolo Carlini <pcarlini@suse.de>
@@ -36,8 +36,8 @@ void test01()
// basic construction
locale loc_c = locale::classic();
- locale loc_de = locale("de_DE@euro");
- locale loc_hk = locale("en_HK");
+ locale loc_de = locale(ISO_8859(15,de_DE));
+ locale loc_hk = locale(ISO_8859(1,en_HK));
VERIFY( loc_hk != loc_de );
VERIFY( loc_c != loc_hk );
diff --git a/libstdc++-v3/testsuite/22_locale/money_get/get/wchar_t/17.cc b/libstdc++-v3/testsuite/22_locale/money_get/get/wchar_t/17.cc
index 2c6e86fab71..d688f818ce6 100644
--- a/libstdc++-v3/testsuite/22_locale/money_get/get/wchar_t/17.cc
+++ b/libstdc++-v3/testsuite/22_locale/money_get/get/wchar_t/17.cc
@@ -1,4 +1,4 @@
-// { dg-require-namedlocale "de_DE@euro" }
+// { dg-require-namedlocale "de_DE.ISO8859-15" }
// 2004-03-08 Paolo Carlini <pcarlini@suse.de>
@@ -36,7 +36,7 @@ void test01()
// basic construction
locale loc_c = locale::classic();
- locale loc_de = locale("de_DE@euro");
+ locale loc_de = locale(ISO_8859(15,de_DE));
VERIFY( loc_c != loc_de );
iterator_type end, end02;
diff --git a/libstdc++-v3/testsuite/22_locale/money_get/get/wchar_t/18.cc b/libstdc++-v3/testsuite/22_locale/money_get/get/wchar_t/18.cc
index 936b5937f32..a357f7f943e 100644
--- a/libstdc++-v3/testsuite/22_locale/money_get/get/wchar_t/18.cc
+++ b/libstdc++-v3/testsuite/22_locale/money_get/get/wchar_t/18.cc
@@ -1,4 +1,4 @@
-// { dg-require-namedlocale "en_HK" }
+// { dg-require-namedlocale "en_HK.ISO8859-1" }
// 2004-03-15 Paolo Carlini <pcarlini@suse.de>
@@ -36,7 +36,7 @@ void test01()
// basic construction
locale loc_c = locale::classic();
- locale loc_hk = locale("en_HK");
+ locale loc_hk = locale(ISO_8859(1,en_HK));
VERIFY( loc_c != loc_hk );
iterator_type end, end01, end02;
diff --git a/libstdc++-v3/testsuite/22_locale/money_get/get/wchar_t/2.cc b/libstdc++-v3/testsuite/22_locale/money_get/get/wchar_t/2.cc
index 079d07617a7..0cafe2aee3f 100644
--- a/libstdc++-v3/testsuite/22_locale/money_get/get/wchar_t/2.cc
+++ b/libstdc++-v3/testsuite/22_locale/money_get/get/wchar_t/2.cc
@@ -1,4 +1,4 @@
-// { dg-require-namedlocale "en_HK" }
+// { dg-require-namedlocale "en_HK.ISO8859-1" }
// 2001-09-12 Benjamin Kosnik <bkoz@redhat.com>
@@ -35,7 +35,7 @@ void test02()
// basic construction
locale loc_c = locale::classic();
- locale loc_hk = locale("en_HK");
+ locale loc_hk = locale(ISO_8859(1,en_HK));
VERIFY( loc_c != loc_hk );
// total EPA budget FY 2002
@@ -80,7 +80,7 @@ void test02()
VERIFY( result11 == digits4 );
VERIFY( err11 == ios_base::eofbit );
- // for the "en_HK" locale the parsing of the very same input streams must
+ // for the "en_HK.ISO8859-1" locale the parsing of the very same input streams must
// be successful without showbase too, since the symbol field appears in
// the first positions in the format and the symbol, when present, must be
// consumed.
diff --git a/libstdc++-v3/testsuite/22_locale/money_get/get/wchar_t/3.cc b/libstdc++-v3/testsuite/22_locale/money_get/get/wchar_t/3.cc
index 969f108e752..b67fafef17e 100644
--- a/libstdc++-v3/testsuite/22_locale/money_get/get/wchar_t/3.cc
+++ b/libstdc++-v3/testsuite/22_locale/money_get/get/wchar_t/3.cc
@@ -1,4 +1,4 @@
-// { dg-require-namedlocale "de_DE@euro" }
+// { dg-require-namedlocale "de_DE.ISO8859-15" }
// 2001-09-12 Benjamin Kosnik <bkoz@redhat.com>
@@ -35,7 +35,7 @@ void test03()
// basic construction
locale loc_c = locale::classic();
- locale loc_de = locale("de_DE@euro");
+ locale loc_de = locale(ISO_8859(15,de_DE));
VERIFY( loc_c != loc_de );
// total EPA budget FY 2002
diff --git a/libstdc++-v3/testsuite/22_locale/money_get/get/wchar_t/4.cc b/libstdc++-v3/testsuite/22_locale/money_get/get/wchar_t/4.cc
index 6170e5c8c96..e0d5674d8c1 100644
--- a/libstdc++-v3/testsuite/22_locale/money_get/get/wchar_t/4.cc
+++ b/libstdc++-v3/testsuite/22_locale/money_get/get/wchar_t/4.cc
@@ -1,4 +1,4 @@
-// { dg-require-namedlocale "en_HK" }
+// { dg-require-namedlocale "en_HK.ISO8859-1" }
// 2001-09-12 Benjamin Kosnik <bkoz@redhat.com>
@@ -35,7 +35,7 @@ void test04()
// basic construction
locale loc_c = locale::classic();
- locale loc_hk = locale("en_HK");
+ locale loc_hk = locale(ISO_8859(1,en_HK));
VERIFY( loc_c != loc_hk );
// input less than frac_digits
diff --git a/libstdc++-v3/testsuite/22_locale/money_get/get/wchar_t/wrapped_env.cc b/libstdc++-v3/testsuite/22_locale/money_get/get/wchar_t/wrapped_env.cc
index dce4cb05c91..9e2c2381841 100644
--- a/libstdc++-v3/testsuite/22_locale/money_get/get/wchar_t/wrapped_env.cc
+++ b/libstdc++-v3/testsuite/22_locale/money_get/get/wchar_t/wrapped_env.cc
@@ -1,6 +1,6 @@
-// { dg-require-namedlocale "de_DE" }
-// { dg-require-namedlocale "de_DE@euro" }
-// { dg-require-namedlocale "en_HK" }
+// { dg-require-namedlocale "de_DE.ISO8859-15" }
+// { dg-require-namedlocale "de_DE.ISO8859-15" }
+// { dg-require-namedlocale "en_HK.ISO8859-1" }
// 2001-08-15 Benjamin Kosnik <bkoz@redhat.com>
@@ -69,6 +69,6 @@ int main()
two.push_back(&test06);
two.push_back(&test07);
two.push_back(&test08);
- run_tests_wrapped_env("de_DE", "LANG", two);
+ run_tests_wrapped_env(ISO_8859(15,de_DE), "LANG", two);
return 0;
}
diff --git a/libstdc++-v3/testsuite/22_locale/money_get/get/wchar_t/wrapped_locale.cc b/libstdc++-v3/testsuite/22_locale/money_get/get/wchar_t/wrapped_locale.cc
index c6a60547395..8b93bc0c1ab 100644
--- a/libstdc++-v3/testsuite/22_locale/money_get/get/wchar_t/wrapped_locale.cc
+++ b/libstdc++-v3/testsuite/22_locale/money_get/get/wchar_t/wrapped_locale.cc
@@ -1,6 +1,6 @@
-// { dg-require-namedlocale "ja_JP.eucjp" }
-// { dg-require-namedlocale "de_DE@euro" }
-// { dg-require-namedlocale "en_HK" }
+// { dg-require-namedlocale "ja_JP.eucJP" }
+// { dg-require-namedlocale "de_DE.ISO8859-15" }
+// { dg-require-namedlocale "en_HK.ISO8859-1" }
// 2001-08-15 Benjamin Kosnik <bkoz@redhat.com>
@@ -69,6 +69,6 @@ int main()
two.push_back(&test06);
two.push_back(&test07);
two.push_back(&test08);
- run_tests_wrapped_locale("ja_JP.eucjp", two);
+ run_tests_wrapped_locale("ja_JP.eucJP", two);
return 0;
}
diff --git a/libstdc++-v3/testsuite/22_locale/money_put/put/char/1.cc b/libstdc++-v3/testsuite/22_locale/money_put/put/char/1.cc
index 62ef407b0cd..8c493e6f688 100644
--- a/libstdc++-v3/testsuite/22_locale/money_put/put/char/1.cc
+++ b/libstdc++-v3/testsuite/22_locale/money_put/put/char/1.cc
@@ -1,4 +1,4 @@
-// { dg-require-namedlocale "de_DE@euro" }
+// { dg-require-namedlocale "de_DE.ISO8859-15" }
// 2001-08-27 Benjamin Kosnik <bkoz@redhat.com>
@@ -35,7 +35,7 @@ void test01()
// basic construction
locale loc_c = locale::classic();
- locale loc_de = locale("de_DE@euro");
+ locale loc_de = locale(ISO_8859(15,de_DE));
VERIFY( loc_c != loc_de );
// sanity check the data is correct.
diff --git a/libstdc++-v3/testsuite/22_locale/money_put/put/char/2.cc b/libstdc++-v3/testsuite/22_locale/money_put/put/char/2.cc
index 8d58abaab40..40dd26373e3 100644
--- a/libstdc++-v3/testsuite/22_locale/money_put/put/char/2.cc
+++ b/libstdc++-v3/testsuite/22_locale/money_put/put/char/2.cc
@@ -1,4 +1,4 @@
-// { dg-require-namedlocale "en_HK" }
+// { dg-require-namedlocale "en_HK.ISO8859-1" }
// 2001-08-27 Benjamin Kosnik <bkoz@redhat.com>
@@ -35,7 +35,7 @@ void test02()
// basic construction
locale loc_c = locale::classic();
- locale loc_hk = locale("en_HK");
+ locale loc_hk = locale(ISO_8859(1,en_HK));
VERIFY( loc_c != loc_hk );
// sanity check the data is correct.
diff --git a/libstdc++-v3/testsuite/22_locale/money_put/put/char/3.cc b/libstdc++-v3/testsuite/22_locale/money_put/put/char/3.cc
index d15ccc55100..386e08bba97 100644
--- a/libstdc++-v3/testsuite/22_locale/money_put/put/char/3.cc
+++ b/libstdc++-v3/testsuite/22_locale/money_put/put/char/3.cc
@@ -1,4 +1,4 @@
-// { dg-require-namedlocale "de_DE@euro" }
+// { dg-require-namedlocale "de_DE.ISO8859-15" }
// 2001-08-27 Benjamin Kosnik <bkoz@redhat.com>
@@ -35,7 +35,7 @@ void test03()
// basic construction
locale loc_c = locale::classic();
- locale loc_de = locale("de_DE@euro");
+ locale loc_de = locale(ISO_8859(15,de_DE));
VERIFY( loc_c != loc_de );
// sanity check the data is correct.
diff --git a/libstdc++-v3/testsuite/22_locale/money_put/put/char/9780-3.cc b/libstdc++-v3/testsuite/22_locale/money_put/put/char/9780-3.cc
index 33b5be87ef5..dc0396173d3 100644
--- a/libstdc++-v3/testsuite/22_locale/money_put/put/char/9780-3.cc
+++ b/libstdc++-v3/testsuite/22_locale/money_put/put/char/9780-3.cc
@@ -1,5 +1,5 @@
-// { dg-require-namedlocale "de_DE" }
-// { dg-require-namedlocale "es_ES" }
+// { dg-require-namedlocale "de_DE.ISO8859-15" }
+// { dg-require-namedlocale "es_ES.ISO8859-15" }
// Copyright (C) 2004-2015 Free Software Foundation, Inc.
//
@@ -27,8 +27,8 @@ int main()
using namespace std;
bool test __attribute__((unused)) = true;
- locale l1 = locale("de_DE");
- locale l2 = locale("es_ES");
+ locale l1 = locale(ISO_8859(15,de_DE));
+ locale l2 = locale(ISO_8859(15,es_ES));
const money_put<char>& mp = use_facet<money_put<char> >(l1);
ostringstream oss;
diff --git a/libstdc++-v3/testsuite/22_locale/money_put/put/char/wrapped_env.cc b/libstdc++-v3/testsuite/22_locale/money_put/put/char/wrapped_env.cc
index 6d33c558855..6666050d496 100644
--- a/libstdc++-v3/testsuite/22_locale/money_put/put/char/wrapped_env.cc
+++ b/libstdc++-v3/testsuite/22_locale/money_put/put/char/wrapped_env.cc
@@ -1,6 +1,6 @@
-// { dg-require-namedlocale "de_DE" }
-// { dg-require-namedlocale "de_DE@euro" }
-// { dg-require-namedlocale "en_HK" }
+// { dg-require-namedlocale "de_DE.ISO8859-15" }
+// { dg-require-namedlocale "de_DE.ISO8859-15" }
+// { dg-require-namedlocale "en_HK.ISO8859-1" }
// 2001-08-15 Benjamin Kosnik <bkoz@redhat.com>
@@ -59,6 +59,6 @@ int main()
two.push_back(&test04);
two.push_back(&test05);
two.push_back(&test06);
- run_tests_wrapped_env("de_DE", "LANG", two);
+ run_tests_wrapped_env(ISO_8859(15,de_DE), "LANG", two);
return 0;
}
diff --git a/libstdc++-v3/testsuite/22_locale/money_put/put/char/wrapped_locale.cc b/libstdc++-v3/testsuite/22_locale/money_put/put/char/wrapped_locale.cc
index 7b773998148..eacfcbcd46d 100644
--- a/libstdc++-v3/testsuite/22_locale/money_put/put/char/wrapped_locale.cc
+++ b/libstdc++-v3/testsuite/22_locale/money_put/put/char/wrapped_locale.cc
@@ -1,6 +1,6 @@
-// { dg-require-namedlocale "ja_JP.eucjp" }
-// { dg-require-namedlocale "de_DE@euro" }
-// { dg-require-namedlocale "en_HK" }
+// { dg-require-namedlocale "ja_JP.eucJP" }
+// { dg-require-namedlocale "de_DE.ISO8859-15" }
+// { dg-require-namedlocale "en_HK.ISO8859-1" }
// 2001-08-15 Benjamin Kosnik <bkoz@redhat.com>
@@ -59,6 +59,6 @@ int main()
two.push_back(&test04);
two.push_back(&test05);
two.push_back(&test06);
- run_tests_wrapped_locale("ja_JP.eucjp", two);
+ run_tests_wrapped_locale("ja_JP.eucJP", two);
return 0;
}
diff --git a/libstdc++-v3/testsuite/22_locale/money_put/put/wchar_t/1.cc b/libstdc++-v3/testsuite/22_locale/money_put/put/wchar_t/1.cc
index 1594874ceef..35666414293 100644
--- a/libstdc++-v3/testsuite/22_locale/money_put/put/wchar_t/1.cc
+++ b/libstdc++-v3/testsuite/22_locale/money_put/put/wchar_t/1.cc
@@ -1,4 +1,4 @@
-// { dg-require-namedlocale "de_DE@euro" }
+// { dg-require-namedlocale "de_DE.ISO8859-15" }
// 2001-08-27 Benjamin Kosnik <bkoz@redhat.com>
@@ -35,7 +35,7 @@ void test01()
// basic construction
locale loc_c = locale::classic();
- locale loc_de = locale("de_DE@euro");
+ locale loc_de = locale(ISO_8859(15,de_DE));
VERIFY( loc_c != loc_de );
// sanity check the data is correct.
diff --git a/libstdc++-v3/testsuite/22_locale/money_put/put/wchar_t/2.cc b/libstdc++-v3/testsuite/22_locale/money_put/put/wchar_t/2.cc
index b75b88b0e14..69ce62c5ff5 100644
--- a/libstdc++-v3/testsuite/22_locale/money_put/put/wchar_t/2.cc
+++ b/libstdc++-v3/testsuite/22_locale/money_put/put/wchar_t/2.cc
@@ -1,4 +1,4 @@
-// { dg-require-namedlocale "en_HK" }
+// { dg-require-namedlocale "en_HK.ISO8859-1" }
// 2001-08-27 Benjamin Kosnik <bkoz@redhat.com>
@@ -35,7 +35,7 @@ void test02()
// basic construction
locale loc_c = locale::classic();
- locale loc_hk = locale("en_HK");
+ locale loc_hk = locale(ISO_8859(1,en_HK));
VERIFY( loc_c != loc_hk );
// sanity check the data is correct.
diff --git a/libstdc++-v3/testsuite/22_locale/money_put/put/wchar_t/3.cc b/libstdc++-v3/testsuite/22_locale/money_put/put/wchar_t/3.cc
index 7c5dec2c28d..e54c692be91 100644
--- a/libstdc++-v3/testsuite/22_locale/money_put/put/wchar_t/3.cc
+++ b/libstdc++-v3/testsuite/22_locale/money_put/put/wchar_t/3.cc
@@ -1,4 +1,4 @@
-// { dg-require-namedlocale "de_DE@euro" }
+// { dg-require-namedlocale "de_DE.ISO8859-15" }
// 2001-08-27 Benjamin Kosnik <bkoz@redhat.com>
@@ -35,7 +35,7 @@ void test03()
// basic construction
locale loc_c = locale::classic();
- locale loc_de = locale("de_DE@euro");
+ locale loc_de = locale(ISO_8859(15,de_DE));
VERIFY( loc_c != loc_de );
// sanity check the data is correct.
diff --git a/libstdc++-v3/testsuite/22_locale/money_put/put/wchar_t/wrapped_env.cc b/libstdc++-v3/testsuite/22_locale/money_put/put/wchar_t/wrapped_env.cc
index 6d33c558855..6666050d496 100644
--- a/libstdc++-v3/testsuite/22_locale/money_put/put/wchar_t/wrapped_env.cc
+++ b/libstdc++-v3/testsuite/22_locale/money_put/put/wchar_t/wrapped_env.cc
@@ -1,6 +1,6 @@
-// { dg-require-namedlocale "de_DE" }
-// { dg-require-namedlocale "de_DE@euro" }
-// { dg-require-namedlocale "en_HK" }
+// { dg-require-namedlocale "de_DE.ISO8859-15" }
+// { dg-require-namedlocale "de_DE.ISO8859-15" }
+// { dg-require-namedlocale "en_HK.ISO8859-1" }
// 2001-08-15 Benjamin Kosnik <bkoz@redhat.com>
@@ -59,6 +59,6 @@ int main()
two.push_back(&test04);
two.push_back(&test05);
two.push_back(&test06);
- run_tests_wrapped_env("de_DE", "LANG", two);
+ run_tests_wrapped_env(ISO_8859(15,de_DE), "LANG", two);
return 0;
}
diff --git a/libstdc++-v3/testsuite/22_locale/money_put/put/wchar_t/wrapped_locale.cc b/libstdc++-v3/testsuite/22_locale/money_put/put/wchar_t/wrapped_locale.cc
index 7b773998148..eacfcbcd46d 100644
--- a/libstdc++-v3/testsuite/22_locale/money_put/put/wchar_t/wrapped_locale.cc
+++ b/libstdc++-v3/testsuite/22_locale/money_put/put/wchar_t/wrapped_locale.cc
@@ -1,6 +1,6 @@
-// { dg-require-namedlocale "ja_JP.eucjp" }
-// { dg-require-namedlocale "de_DE@euro" }
-// { dg-require-namedlocale "en_HK" }
+// { dg-require-namedlocale "ja_JP.eucJP" }
+// { dg-require-namedlocale "de_DE.ISO8859-15" }
+// { dg-require-namedlocale "en_HK.ISO8859-1" }
// 2001-08-15 Benjamin Kosnik <bkoz@redhat.com>
@@ -59,6 +59,6 @@ int main()
two.push_back(&test04);
two.push_back(&test05);
two.push_back(&test06);
- run_tests_wrapped_locale("ja_JP.eucjp", two);
+ run_tests_wrapped_locale("ja_JP.eucJP", two);
return 0;
}
diff --git a/libstdc++-v3/testsuite/22_locale/moneypunct/40712.cc b/libstdc++-v3/testsuite/22_locale/moneypunct/40712.cc
index eb3c0b5069e..f0ff60ab0be 100644
--- a/libstdc++-v3/testsuite/22_locale/moneypunct/40712.cc
+++ b/libstdc++-v3/testsuite/22_locale/moneypunct/40712.cc
@@ -1,4 +1,4 @@
-// { dg-require-namedlocale "en_US" }
+// { dg-require-namedlocale "en_US.ISO8859-1" }
// 2009-07-18 Paolo Carlini <paolo.carlini@oracle.com>
@@ -22,6 +22,7 @@
// 22.2.6.3 Template class moneypunct
#include <locale>
+#include <testsuite_hooks.h>
// libstdc++/40712
void test01()
@@ -29,7 +30,7 @@ void test01()
bool test __attribute__((unused)) = true;
using namespace std;
- locale loc(locale("C"), "en_US", locale::monetary);
+ locale loc(locale("C"), ISO_8859(1,en_US), locale::monetary);
use_facet<moneypunct<char> >(loc).grouping();
}
diff --git a/libstdc++-v3/testsuite/22_locale/moneypunct/members/char/2.cc b/libstdc++-v3/testsuite/22_locale/moneypunct/members/char/2.cc
index 2f486cea505..abfd7e4fe62 100644
--- a/libstdc++-v3/testsuite/22_locale/moneypunct/members/char/2.cc
+++ b/libstdc++-v3/testsuite/22_locale/moneypunct/members/char/2.cc
@@ -1,4 +1,4 @@
-// { dg-require-namedlocale "de_DE" }
+// { dg-require-namedlocale "de_DE.ISO8859-15" }
// 2001-08-23 Benjamin Kosnik <bkoz@redhat.com>
@@ -35,7 +35,7 @@ void test02()
// basic construction
locale loc_c = locale::classic();
- locale loc_de = locale("de_DE");
+ locale loc_de = locale(ISO_8859(15,de_DE));
// cache the moneypunct facets
typedef moneypunct<char, true> __money_true;
diff --git a/libstdc++-v3/testsuite/22_locale/moneypunct/members/char/wrapped_env.cc b/libstdc++-v3/testsuite/22_locale/moneypunct/members/char/wrapped_env.cc
index d4f22931887..608bb21baeb 100644
--- a/libstdc++-v3/testsuite/22_locale/moneypunct/members/char/wrapped_env.cc
+++ b/libstdc++-v3/testsuite/22_locale/moneypunct/members/char/wrapped_env.cc
@@ -1,4 +1,4 @@
-// { dg-require-namedlocale "de_DE" }
+// { dg-require-namedlocale "de_DE.ISO8859-15" }
// 2001-08-15 Benjamin Kosnik <bkoz@redhat.com>
@@ -37,6 +37,6 @@ int main()
func_callback two;
two.push_back(&test01);
two.push_back(&test02);
- run_tests_wrapped_env("de_DE", "LANG", two);
+ run_tests_wrapped_env(ISO_8859(15,de_DE), "LANG", two);
return 0;
}
diff --git a/libstdc++-v3/testsuite/22_locale/moneypunct/members/char/wrapped_locale.cc b/libstdc++-v3/testsuite/22_locale/moneypunct/members/char/wrapped_locale.cc
index 5d2fb2e9bc6..fe62c903888 100644
--- a/libstdc++-v3/testsuite/22_locale/moneypunct/members/char/wrapped_locale.cc
+++ b/libstdc++-v3/testsuite/22_locale/moneypunct/members/char/wrapped_locale.cc
@@ -1,5 +1,5 @@
-// { dg-require-namedlocale "ja_JP.eucjp" }
-// { dg-require-namedlocale "de_DE" }
+// { dg-require-namedlocale "ja_JP.eucJP" }
+// { dg-require-namedlocale "de_DE.ISO8859-15" }
// 2001-08-15 Benjamin Kosnik <bkoz@redhat.com>
@@ -38,6 +38,6 @@ int main()
func_callback two;
two.push_back(&test01);
two.push_back(&test02);
- run_tests_wrapped_locale("ja_JP.eucjp", two);
+ run_tests_wrapped_locale("ja_JP.eucJP", two);
return 0;
}
diff --git a/libstdc++-v3/testsuite/22_locale/moneypunct/members/wchar_t/2.cc b/libstdc++-v3/testsuite/22_locale/moneypunct/members/wchar_t/2.cc
index 028a8157544..a8c277fc841 100644
--- a/libstdc++-v3/testsuite/22_locale/moneypunct/members/wchar_t/2.cc
+++ b/libstdc++-v3/testsuite/22_locale/moneypunct/members/wchar_t/2.cc
@@ -1,4 +1,4 @@
-// { dg-require-namedlocale "de_DE" }
+// { dg-require-namedlocale "de_DE.ISO8859-15" }
// 2001-08-23 Benjamin Kosnik <bkoz@redhat.com>
@@ -35,7 +35,7 @@ void test02()
// basic construction
locale loc_c = locale::classic();
- locale loc_de = locale("de_DE");
+ locale loc_de = locale(ISO_8859(15,de_DE));
// cache the moneypunct facets
typedef moneypunct<wchar_t, true> __money_true;
diff --git a/libstdc++-v3/testsuite/22_locale/moneypunct/members/wchar_t/wrapped_env.cc b/libstdc++-v3/testsuite/22_locale/moneypunct/members/wchar_t/wrapped_env.cc
index d4f22931887..608bb21baeb 100644
--- a/libstdc++-v3/testsuite/22_locale/moneypunct/members/wchar_t/wrapped_env.cc
+++ b/libstdc++-v3/testsuite/22_locale/moneypunct/members/wchar_t/wrapped_env.cc
@@ -1,4 +1,4 @@
-// { dg-require-namedlocale "de_DE" }
+// { dg-require-namedlocale "de_DE.ISO8859-15" }
// 2001-08-15 Benjamin Kosnik <bkoz@redhat.com>
@@ -37,6 +37,6 @@ int main()
func_callback two;
two.push_back(&test01);
two.push_back(&test02);
- run_tests_wrapped_env("de_DE", "LANG", two);
+ run_tests_wrapped_env(ISO_8859(15,de_DE), "LANG", two);
return 0;
}
diff --git a/libstdc++-v3/testsuite/22_locale/moneypunct/members/wchar_t/wrapped_locale.cc b/libstdc++-v3/testsuite/22_locale/moneypunct/members/wchar_t/wrapped_locale.cc
index 7e8facf9c15..40254ab1f7b 100644
--- a/libstdc++-v3/testsuite/22_locale/moneypunct/members/wchar_t/wrapped_locale.cc
+++ b/libstdc++-v3/testsuite/22_locale/moneypunct/members/wchar_t/wrapped_locale.cc
@@ -1,5 +1,5 @@
-// { dg-require-namedlocale "de_DE" }
-// { dg-require-namedlocale "ja_JP.eucjp" }
+// { dg-require-namedlocale "de_DE.ISO8859-15" }
+// { dg-require-namedlocale "ja_JP.eucJP" }
// 2001-08-15 Benjamin Kosnik <bkoz@redhat.com>
@@ -38,6 +38,6 @@ int main()
func_callback two;
two.push_back(&test01);
two.push_back(&test02);
- run_tests_wrapped_locale("ja_JP.eucjp", two);
+ run_tests_wrapped_locale("ja_JP.eucJP", two);
return 0;
}
diff --git a/libstdc++-v3/testsuite/22_locale/moneypunct_byname/named_equivalence.cc b/libstdc++-v3/testsuite/22_locale/moneypunct_byname/named_equivalence.cc
index 11b324bc2b0..a3d91094ba1 100644
--- a/libstdc++-v3/testsuite/22_locale/moneypunct_byname/named_equivalence.cc
+++ b/libstdc++-v3/testsuite/22_locale/moneypunct_byname/named_equivalence.cc
@@ -1,4 +1,4 @@
-// { dg-require-namedlocale "de_DE" }
+// { dg-require-namedlocale "de_DE.ISO8859-15" }
// 2001-08-24 Benjamin Kosnik <bkoz@redhat.com>
@@ -33,10 +33,10 @@ void test01()
bool test __attribute__((unused)) = true;
string str;
- locale loc_de = locale("de_DE");
+ locale loc_de = locale(ISO_8859(15,de_DE));
str = loc_de.name();
- locale loc_byname(locale::classic(), new moneypunct_byname<char>("de_DE"));
+ locale loc_byname(locale::classic(), new moneypunct_byname<char>(ISO_8859(15,de_DE)));
str = loc_byname.name();
locale loc_c = locale::classic();
diff --git a/libstdc++-v3/testsuite/22_locale/num_get/get/char/1.cc b/libstdc++-v3/testsuite/22_locale/num_get/get/char/1.cc
index 99faa87ccb1..9685a6f3f8c 100644
--- a/libstdc++-v3/testsuite/22_locale/num_get/get/char/1.cc
+++ b/libstdc++-v3/testsuite/22_locale/num_get/get/char/1.cc
@@ -1,4 +1,4 @@
-// { dg-require-namedlocale "de_DE" }
+// { dg-require-namedlocale "de_DE.ISO8859-15" }
// 2001-11-21 Benjamin Kosnik <bkoz@redhat.com>
@@ -34,7 +34,7 @@ void test01()
// basic construction
locale loc_c = locale::classic();
- locale loc_de = locale("de_DE");
+ locale loc_de = locale(ISO_8859(15,de_DE));
VERIFY( loc_c != loc_de );
// sanity check the data is correct.
diff --git a/libstdc++-v3/testsuite/22_locale/num_get/get/char/3.cc b/libstdc++-v3/testsuite/22_locale/num_get/get/char/3.cc
index 48ea5dce4a6..b51cf699d28 100644
--- a/libstdc++-v3/testsuite/22_locale/num_get/get/char/3.cc
+++ b/libstdc++-v3/testsuite/22_locale/num_get/get/char/3.cc
@@ -1,4 +1,4 @@
-// { dg-require-namedlocale "en_HK" }
+// { dg-require-namedlocale "en_HK.ISO8859-1" }
// 2001-11-21 Benjamin Kosnik <bkoz@redhat.com>
@@ -34,7 +34,7 @@ void test03()
// basic construction
locale loc_c = locale::classic();
- locale loc_hk = locale("en_HK");
+ locale loc_hk = locale(ISO_8859(1,en_HK));
VERIFY( loc_c != loc_hk );
// sanity check the data is correct.
diff --git a/libstdc++-v3/testsuite/22_locale/num_get/get/char/5.cc b/libstdc++-v3/testsuite/22_locale/num_get/get/char/5.cc
index 13fb837a1b4..14c54961b56 100644
--- a/libstdc++-v3/testsuite/22_locale/num_get/get/char/5.cc
+++ b/libstdc++-v3/testsuite/22_locale/num_get/get/char/5.cc
@@ -1,4 +1,4 @@
-// { dg-require-namedlocale "de_DE" }
+// { dg-require-namedlocale "de_DE.ISO8859-15" }
// 2001-11-21 Benjamin Kosnik <bkoz@redhat.com>
@@ -37,7 +37,7 @@ void test05()
istringstream iss;
// A locale that expects grouping
- locale loc_de = locale("de_DE");
+ locale loc_de = locale(ISO_8859(15,de_DE));
iss.imbue(loc_de);
const num_get<char>& ng = use_facet<num_get<char> >(iss.getloc());
diff --git a/libstdc++-v3/testsuite/22_locale/num_get/get/char/6.cc b/libstdc++-v3/testsuite/22_locale/num_get/get/char/6.cc
index d1af38cd60d..06a25464edb 100644
--- a/libstdc++-v3/testsuite/22_locale/num_get/get/char/6.cc
+++ b/libstdc++-v3/testsuite/22_locale/num_get/get/char/6.cc
@@ -1,4 +1,4 @@
-// { dg-require-namedlocale "de_DE" }
+// { dg-require-namedlocale "de_DE.ISO8859-15" }
// 2001-11-21 Benjamin Kosnik <bkoz@redhat.com>
@@ -34,7 +34,7 @@ void test06()
double d = 0.0;
istringstream iss;
- locale loc_de = locale("de_DE");
+ locale loc_de = locale(ISO_8859(15,de_DE));
iss.imbue(loc_de);
const num_get<char>& ng = use_facet<num_get<char> >(iss.getloc());
diff --git a/libstdc++-v3/testsuite/22_locale/num_get/get/char/9.cc b/libstdc++-v3/testsuite/22_locale/num_get/get/char/9.cc
index 058b562b1c7..16c914a1b99 100644
--- a/libstdc++-v3/testsuite/22_locale/num_get/get/char/9.cc
+++ b/libstdc++-v3/testsuite/22_locale/num_get/get/char/9.cc
@@ -1,4 +1,4 @@
-// { dg-require-namedlocale "de_DE" }
+// { dg-require-namedlocale "de_DE.ISO8859-15" }
// 2003-12-19 Paolo Carlini <pcarlini@suse.de>
@@ -33,7 +33,7 @@ void test01()
bool test __attribute__((unused)) = true;
// A locale that expects grouping
- locale loc_de = locale("de_DE");
+ locale loc_de = locale(ISO_8859(15,de_DE));
istringstream iss;
iss.imbue(loc_de);
diff --git a/libstdc++-v3/testsuite/22_locale/num_get/get/char/wrapped_env.cc b/libstdc++-v3/testsuite/22_locale/num_get/get/char/wrapped_env.cc
index fa4f92469cf..c864049e583 100644
--- a/libstdc++-v3/testsuite/22_locale/num_get/get/char/wrapped_env.cc
+++ b/libstdc++-v3/testsuite/22_locale/num_get/get/char/wrapped_env.cc
@@ -1,5 +1,5 @@
-// { dg-require-namedlocale "de_DE" }
-// { dg-require-namedlocale "en_HK" }
+// { dg-require-namedlocale "de_DE.ISO8859-15" }
+// { dg-require-namedlocale "en_HK.ISO8859-1" }
// 2001-08-15 Benjamin Kosnik <bkoz@redhat.com>
@@ -58,6 +58,6 @@ int main()
two.push_back(&test04);
two.push_back(&test05);
two.push_back(&test06);
- run_tests_wrapped_env("de_DE", "LANG", two);
+ run_tests_wrapped_env(ISO_8859(15,de_DE), "LANG", two);
return 0;
}
diff --git a/libstdc++-v3/testsuite/22_locale/num_get/get/char/wrapped_locale.cc b/libstdc++-v3/testsuite/22_locale/num_get/get/char/wrapped_locale.cc
index c488ecc9619..eacfcbcd46d 100644
--- a/libstdc++-v3/testsuite/22_locale/num_get/get/char/wrapped_locale.cc
+++ b/libstdc++-v3/testsuite/22_locale/num_get/get/char/wrapped_locale.cc
@@ -1,6 +1,6 @@
-// { dg-require-namedlocale "ja_JP.eucjp" }
-// { dg-require-namedlocale "de_DE" }
-// { dg-require-namedlocale "en_HK" }
+// { dg-require-namedlocale "ja_JP.eucJP" }
+// { dg-require-namedlocale "de_DE.ISO8859-15" }
+// { dg-require-namedlocale "en_HK.ISO8859-1" }
// 2001-08-15 Benjamin Kosnik <bkoz@redhat.com>
@@ -59,6 +59,6 @@ int main()
two.push_back(&test04);
two.push_back(&test05);
two.push_back(&test06);
- run_tests_wrapped_locale("ja_JP.eucjp", two);
+ run_tests_wrapped_locale("ja_JP.eucJP", two);
return 0;
}
diff --git a/libstdc++-v3/testsuite/22_locale/num_get/get/wchar_t/1.cc b/libstdc++-v3/testsuite/22_locale/num_get/get/wchar_t/1.cc
index 6d3c9cd2e31..a4f35e749a3 100644
--- a/libstdc++-v3/testsuite/22_locale/num_get/get/wchar_t/1.cc
+++ b/libstdc++-v3/testsuite/22_locale/num_get/get/wchar_t/1.cc
@@ -1,4 +1,4 @@
-// { dg-require-namedlocale "de_DE" }
+// { dg-require-namedlocale "de_DE.ISO8859-15" }
// 2001-11-21 Benjamin Kosnik <bkoz@redhat.com>
@@ -34,7 +34,7 @@ void test01()
// basic construction
locale loc_c = locale::classic();
- locale loc_de = locale("de_DE");
+ locale loc_de = locale(ISO_8859(15,de_DE));
VERIFY( loc_c != loc_de );
// sanity check the data is correct.
diff --git a/libstdc++-v3/testsuite/22_locale/num_get/get/wchar_t/3.cc b/libstdc++-v3/testsuite/22_locale/num_get/get/wchar_t/3.cc
index d0776dcda09..d599347ddab 100644
--- a/libstdc++-v3/testsuite/22_locale/num_get/get/wchar_t/3.cc
+++ b/libstdc++-v3/testsuite/22_locale/num_get/get/wchar_t/3.cc
@@ -1,4 +1,4 @@
-// { dg-require-namedlocale "en_HK" }
+// { dg-require-namedlocale "en_HK.ISO8859-1" }
// 2001-11-21 Benjamin Kosnik <bkoz@redhat.com>
@@ -34,7 +34,7 @@ void test03()
// basic construction
locale loc_c = locale::classic();
- locale loc_hk = locale("en_HK");
+ locale loc_hk = locale(ISO_8859(1,en_HK));
VERIFY( loc_c != loc_hk );
// sanity check the data is correct.
diff --git a/libstdc++-v3/testsuite/22_locale/num_get/get/wchar_t/5.cc b/libstdc++-v3/testsuite/22_locale/num_get/get/wchar_t/5.cc
index cc4aae193df..ed78cc32c87 100644
--- a/libstdc++-v3/testsuite/22_locale/num_get/get/wchar_t/5.cc
+++ b/libstdc++-v3/testsuite/22_locale/num_get/get/wchar_t/5.cc
@@ -1,4 +1,4 @@
-// { dg-require-namedlocale "de_DE" }
+// { dg-require-namedlocale "de_DE.ISO8859-15" }
// 2001-11-21 Benjamin Kosnik <bkoz@redhat.com>
@@ -37,7 +37,7 @@ void test05()
wistringstream iss;
// A locale that expects grouping
- locale loc_de = locale("de_DE");
+ locale loc_de = locale(ISO_8859(15,de_DE));
iss.imbue(loc_de);
const num_get<wchar_t>& ng = use_facet<num_get<wchar_t> >(iss.getloc());
diff --git a/libstdc++-v3/testsuite/22_locale/num_get/get/wchar_t/6.cc b/libstdc++-v3/testsuite/22_locale/num_get/get/wchar_t/6.cc
index 8e0dc5b171d..e3e06c9b305 100644
--- a/libstdc++-v3/testsuite/22_locale/num_get/get/wchar_t/6.cc
+++ b/libstdc++-v3/testsuite/22_locale/num_get/get/wchar_t/6.cc
@@ -1,4 +1,4 @@
-// { dg-require-namedlocale "de_DE" }
+// { dg-require-namedlocale "de_DE.ISO8859-15" }
// 2001-11-21 Benjamin Kosnik <bkoz@redhat.com>
@@ -34,7 +34,7 @@ void test06()
double d = 0.0;
wistringstream iss;
- locale loc_de = locale("de_DE");
+ locale loc_de = locale(ISO_8859(15,de_DE));
iss.imbue(loc_de);
const num_get<wchar_t>& ng = use_facet<num_get<wchar_t> >(iss.getloc());
diff --git a/libstdc++-v3/testsuite/22_locale/num_get/get/wchar_t/9.cc b/libstdc++-v3/testsuite/22_locale/num_get/get/wchar_t/9.cc
index 953f3ec83cd..f18c67cea6d 100644
--- a/libstdc++-v3/testsuite/22_locale/num_get/get/wchar_t/9.cc
+++ b/libstdc++-v3/testsuite/22_locale/num_get/get/wchar_t/9.cc
@@ -1,4 +1,4 @@
-// { dg-require-namedlocale "de_DE" }
+// { dg-require-namedlocale "de_DE.ISO8859-15" }
// 2003-12-19 Paolo Carlini <pcarlini@suse.de>
@@ -33,7 +33,7 @@ void test01()
bool test __attribute__((unused)) = true;
// A locale that expects grouping
- locale loc_de = locale("de_DE");
+ locale loc_de = locale(ISO_8859(15,de_DE));
wistringstream iss;
iss.imbue(loc_de);
diff --git a/libstdc++-v3/testsuite/22_locale/num_get/get/wchar_t/wrapped_env.cc b/libstdc++-v3/testsuite/22_locale/num_get/get/wchar_t/wrapped_env.cc
index fa4f92469cf..c864049e583 100644
--- a/libstdc++-v3/testsuite/22_locale/num_get/get/wchar_t/wrapped_env.cc
+++ b/libstdc++-v3/testsuite/22_locale/num_get/get/wchar_t/wrapped_env.cc
@@ -1,5 +1,5 @@
-// { dg-require-namedlocale "de_DE" }
-// { dg-require-namedlocale "en_HK" }
+// { dg-require-namedlocale "de_DE.ISO8859-15" }
+// { dg-require-namedlocale "en_HK.ISO8859-1" }
// 2001-08-15 Benjamin Kosnik <bkoz@redhat.com>
@@ -58,6 +58,6 @@ int main()
two.push_back(&test04);
two.push_back(&test05);
two.push_back(&test06);
- run_tests_wrapped_env("de_DE", "LANG", two);
+ run_tests_wrapped_env(ISO_8859(15,de_DE), "LANG", two);
return 0;
}
diff --git a/libstdc++-v3/testsuite/22_locale/num_get/get/wchar_t/wrapped_locale.cc b/libstdc++-v3/testsuite/22_locale/num_get/get/wchar_t/wrapped_locale.cc
index c488ecc9619..eacfcbcd46d 100644
--- a/libstdc++-v3/testsuite/22_locale/num_get/get/wchar_t/wrapped_locale.cc
+++ b/libstdc++-v3/testsuite/22_locale/num_get/get/wchar_t/wrapped_locale.cc
@@ -1,6 +1,6 @@
-// { dg-require-namedlocale "ja_JP.eucjp" }
-// { dg-require-namedlocale "de_DE" }
-// { dg-require-namedlocale "en_HK" }
+// { dg-require-namedlocale "ja_JP.eucJP" }
+// { dg-require-namedlocale "de_DE.ISO8859-15" }
+// { dg-require-namedlocale "en_HK.ISO8859-1" }
// 2001-08-15 Benjamin Kosnik <bkoz@redhat.com>
@@ -59,6 +59,6 @@ int main()
two.push_back(&test04);
two.push_back(&test05);
two.push_back(&test06);
- run_tests_wrapped_locale("ja_JP.eucjp", two);
+ run_tests_wrapped_locale("ja_JP.eucJP", two);
return 0;
}
diff --git a/libstdc++-v3/testsuite/22_locale/num_put/put/char/1.cc b/libstdc++-v3/testsuite/22_locale/num_put/put/char/1.cc
index a1aa072a636..8d448d9cfda 100644
--- a/libstdc++-v3/testsuite/22_locale/num_put/put/char/1.cc
+++ b/libstdc++-v3/testsuite/22_locale/num_put/put/char/1.cc
@@ -1,4 +1,4 @@
-// { dg-require-namedlocale "de_DE" }
+// { dg-require-namedlocale "de_DE.ISO8859-15" }
// 2001-11-19 Benjamin Kosnik <bkoz@redhat.com>
@@ -34,7 +34,7 @@ void test01()
// basic construction
locale loc_c = locale::classic();
- locale loc_de = locale("de_DE");
+ locale loc_de = locale(ISO_8859(15,de_DE));
VERIFY( loc_c != loc_de );
// cache the numpunct facets
diff --git a/libstdc++-v3/testsuite/22_locale/num_put/put/char/20909.cc b/libstdc++-v3/testsuite/22_locale/num_put/put/char/20909.cc
index 65a886a5d1e..aa03a60e6cc 100644
--- a/libstdc++-v3/testsuite/22_locale/num_put/put/char/20909.cc
+++ b/libstdc++-v3/testsuite/22_locale/num_put/put/char/20909.cc
@@ -1,4 +1,4 @@
-// { dg-require-namedlocale "de_DE" }
+// { dg-require-namedlocale "de_DE.ISO8859-15" }
// 2005-04-08 Paolo Carlini <pcarlini@suse.de>
@@ -32,7 +32,7 @@ void test01()
bool test __attribute__((unused)) = true;
// A locale that expects grouping.
- locale loc_de = locale("de_DE");
+ locale loc_de = locale(ISO_8859(15,de_DE));
const string empty;
string result;
diff --git a/libstdc++-v3/testsuite/22_locale/num_put/put/char/20914.cc b/libstdc++-v3/testsuite/22_locale/num_put/put/char/20914.cc
index 0b617d760f8..7aa2c0c6291 100644
--- a/libstdc++-v3/testsuite/22_locale/num_put/put/char/20914.cc
+++ b/libstdc++-v3/testsuite/22_locale/num_put/put/char/20914.cc
@@ -1,4 +1,4 @@
-// { dg-require-namedlocale "de_DE" }
+// { dg-require-namedlocale "de_DE.ISO8859-15" }
// 2005-04-17 Paolo Carlini <pcarlini@suse.de>
@@ -32,7 +32,7 @@ void test01()
bool test __attribute__((unused)) = true;
// A locale that expects grouping.
- locale loc_de = locale("de_DE");
+ locale loc_de = locale(ISO_8859(15,de_DE));
const string empty;
string result;
diff --git a/libstdc++-v3/testsuite/22_locale/num_put/put/char/3.cc b/libstdc++-v3/testsuite/22_locale/num_put/put/char/3.cc
index 781e3745dd2..ce6afd4fefe 100644
--- a/libstdc++-v3/testsuite/22_locale/num_put/put/char/3.cc
+++ b/libstdc++-v3/testsuite/22_locale/num_put/put/char/3.cc
@@ -1,4 +1,4 @@
-// { dg-require-namedlocale "en_HK" }
+// { dg-require-namedlocale "en_HK.ISO8859-1" }
// 2001-11-19 Benjamin Kosnik <bkoz@redhat.com>
@@ -34,7 +34,7 @@ void test03()
// basic construction
locale loc_c = locale::classic();
- locale loc_hk = locale("en_HK");
+ locale loc_hk = locale(ISO_8859(1,en_HK));
VERIFY( loc_c != loc_hk );
// sanity check the data is correct.
diff --git a/libstdc++-v3/testsuite/22_locale/num_put/put/char/5.cc b/libstdc++-v3/testsuite/22_locale/num_put/put/char/5.cc
index d3b6e8d11a4..bada771c2ee 100644
--- a/libstdc++-v3/testsuite/22_locale/num_put/put/char/5.cc
+++ b/libstdc++-v3/testsuite/22_locale/num_put/put/char/5.cc
@@ -1,4 +1,4 @@
-// { dg-require-namedlocale "de_DE" }
+// { dg-require-namedlocale "de_DE.ISO8859-15" }
// 2001-11-19 Benjamin Kosnik <bkoz@redhat.com>
@@ -34,7 +34,7 @@ void test05()
bool test __attribute__((unused)) = true;
// A locale that expects grouping.
- locale loc_de = locale("de_DE");
+ locale loc_de = locale(ISO_8859(15,de_DE));
const string empty;
string result;
diff --git a/libstdc++-v3/testsuite/22_locale/num_put/put/char/9780-2.cc b/libstdc++-v3/testsuite/22_locale/num_put/put/char/9780-2.cc
index 8fa28607fc0..0b8d14af2ce 100644
--- a/libstdc++-v3/testsuite/22_locale/num_put/put/char/9780-2.cc
+++ b/libstdc++-v3/testsuite/22_locale/num_put/put/char/9780-2.cc
@@ -1,5 +1,5 @@
-// { dg-require-namedlocale "de_DE" }
-// { dg-require-namedlocale "es_ES" }
+// { dg-require-namedlocale "de_DE.ISO8859-15" }
+// { dg-require-namedlocale "es_ES.ISO8859-15" }
// Copyright (C) 2004-2015 Free Software Foundation, Inc.
//
@@ -24,7 +24,7 @@
// Make sure that formatted output uses the locale in the output stream.
using namespace std;
-locale l1 = locale("de_DE");
+locale l1 = locale(ISO_8859(15,de_DE));
const num_put<char>& np = use_facet<num_put<char> >(l1);
const numpunct<char>& npunct = use_facet<numpunct<char> >(l1);
@@ -51,7 +51,7 @@ void test02()
{
bool test __attribute__((unused)) = true;
- locale l2 = locale("es_ES");
+ locale l2 = locale(ISO_8859(15,es_ES));
const numpunct<char>& npunct3 = use_facet<numpunct<char> >(l2);
char c __attribute__((unused)) = npunct3.thousands_sep();
string s = npunct3.grouping();
diff --git a/libstdc++-v3/testsuite/22_locale/num_put/put/char/wrapped_env.cc b/libstdc++-v3/testsuite/22_locale/num_put/put/char/wrapped_env.cc
index d8d6cc66ca7..d5ea3a54794 100644
--- a/libstdc++-v3/testsuite/22_locale/num_put/put/char/wrapped_env.cc
+++ b/libstdc++-v3/testsuite/22_locale/num_put/put/char/wrapped_env.cc
@@ -1,6 +1,6 @@
-// { dg-require-namedlocale "de_DE" }
-// { dg-require-namedlocale "en_HK" }
-// { dg-require-namedlocale "es_ES" }
+// { dg-require-namedlocale "de_DE.ISO8859-15" }
+// { dg-require-namedlocale "en_HK.ISO8859-1" }
+// { dg-require-namedlocale "es_ES.ISO8859-15" }
// 2001-08-15 Benjamin Kosnik <bkoz@redhat.com>
@@ -54,6 +54,6 @@ int main()
two.push_back(&test03);
two.push_back(&test04);
two.push_back(&test05);
- run_tests_wrapped_env("de_DE", "LANG", two);
+ run_tests_wrapped_env(ISO_8859(15,de_DE), "LANG", two);
return 0;
}
diff --git a/libstdc++-v3/testsuite/22_locale/num_put/put/char/wrapped_locale.cc b/libstdc++-v3/testsuite/22_locale/num_put/put/char/wrapped_locale.cc
index e43cb6017be..69b9dc317d8 100644
--- a/libstdc++-v3/testsuite/22_locale/num_put/put/char/wrapped_locale.cc
+++ b/libstdc++-v3/testsuite/22_locale/num_put/put/char/wrapped_locale.cc
@@ -1,7 +1,7 @@
-// { dg-require-namedlocale "ja_JP.eucjp" }
-// { dg-require-namedlocale "de_DE" }
-// { dg-require-namedlocale "en_HK" }
-// { dg-require-namedlocale "es_ES" }
+// { dg-require-namedlocale "ja_JP.eucJP" }
+// { dg-require-namedlocale "de_DE.ISO8859-15" }
+// { dg-require-namedlocale "en_HK.ISO8859-1" }
+// { dg-require-namedlocale "es_ES.ISO8859-15" }
// 2001-08-15 Benjamin Kosnik <bkoz@redhat.com>
@@ -55,6 +55,6 @@ int main()
two.push_back(&test03);
two.push_back(&test04);
two.push_back(&test05);
- run_tests_wrapped_locale("ja_JP.eucjp", two);
+ run_tests_wrapped_locale("ja_JP.eucJP", two);
return 0;
}
diff --git a/libstdc++-v3/testsuite/22_locale/num_put/put/wchar_t/1.cc b/libstdc++-v3/testsuite/22_locale/num_put/put/wchar_t/1.cc
index 6d514079e79..116044b1eb9 100644
--- a/libstdc++-v3/testsuite/22_locale/num_put/put/wchar_t/1.cc
+++ b/libstdc++-v3/testsuite/22_locale/num_put/put/wchar_t/1.cc
@@ -1,4 +1,4 @@
-// { dg-require-namedlocale "de_DE" }
+// { dg-require-namedlocale "de_DE.ISO8859-15" }
// 2001-11-19 Benjamin Kosnik <bkoz@redhat.com>
@@ -34,7 +34,7 @@ void test01()
// basic construction
locale loc_c = locale::classic();
- locale loc_de = locale("de_DE");
+ locale loc_de = locale(ISO_8859(15,de_DE));
VERIFY( loc_c != loc_de );
// cache the numpunct facets
diff --git a/libstdc++-v3/testsuite/22_locale/num_put/put/wchar_t/20909.cc b/libstdc++-v3/testsuite/22_locale/num_put/put/wchar_t/20909.cc
index 5923860f066..8cca878d0fd 100644
--- a/libstdc++-v3/testsuite/22_locale/num_put/put/wchar_t/20909.cc
+++ b/libstdc++-v3/testsuite/22_locale/num_put/put/wchar_t/20909.cc
@@ -1,4 +1,4 @@
-// { dg-require-namedlocale "de_DE" }
+// { dg-require-namedlocale "de_DE.ISO8859-15" }
// 2005-04-08 Paolo Carlini <pcarlini@suse.de>
@@ -32,7 +32,7 @@ void test01()
bool test __attribute__((unused)) = true;
// A locale that expects grouping.
- locale loc_de = locale("de_DE");
+ locale loc_de = locale(ISO_8859(15,de_DE));
const wstring empty;
wstring result;
diff --git a/libstdc++-v3/testsuite/22_locale/num_put/put/wchar_t/20914.cc b/libstdc++-v3/testsuite/22_locale/num_put/put/wchar_t/20914.cc
index cdffd52b65f..ab92f031d3d 100644
--- a/libstdc++-v3/testsuite/22_locale/num_put/put/wchar_t/20914.cc
+++ b/libstdc++-v3/testsuite/22_locale/num_put/put/wchar_t/20914.cc
@@ -1,4 +1,4 @@
-// { dg-require-namedlocale "de_DE" }
+// { dg-require-namedlocale "de_DE.ISO8859-15" }
// 2005-04-17 Paolo Carlini <pcarlini@suse.de>
@@ -32,7 +32,7 @@ void test01()
bool test __attribute__((unused)) = true;
// A locale that expects grouping.
- locale loc_de = locale("de_DE");
+ locale loc_de = locale(ISO_8859(15,de_DE));
const wstring empty;
wstring result;
diff --git a/libstdc++-v3/testsuite/22_locale/num_put/put/wchar_t/3.cc b/libstdc++-v3/testsuite/22_locale/num_put/put/wchar_t/3.cc
index 4180382fe2f..d2c5be454f6 100644
--- a/libstdc++-v3/testsuite/22_locale/num_put/put/wchar_t/3.cc
+++ b/libstdc++-v3/testsuite/22_locale/num_put/put/wchar_t/3.cc
@@ -1,4 +1,4 @@
-// { dg-require-namedlocale "en_HK" }
+// { dg-require-namedlocale "en_HK.ISO8859-1" }
// 2001-11-19 Benjamin Kosnik <bkoz@redhat.com>
@@ -34,7 +34,7 @@ void test03()
// basic construction
locale loc_c = locale::classic();
- locale loc_hk = locale("en_HK");
+ locale loc_hk = locale(ISO_8859(1,en_HK));
VERIFY( loc_c != loc_hk );
// sanity check the data is correct.
diff --git a/libstdc++-v3/testsuite/22_locale/num_put/put/wchar_t/5.cc b/libstdc++-v3/testsuite/22_locale/num_put/put/wchar_t/5.cc
index beaa319a55e..f2efb162347 100644
--- a/libstdc++-v3/testsuite/22_locale/num_put/put/wchar_t/5.cc
+++ b/libstdc++-v3/testsuite/22_locale/num_put/put/wchar_t/5.cc
@@ -1,4 +1,4 @@
-// { dg-require-namedlocale "de_DE" }
+// { dg-require-namedlocale "de_DE.ISO8859-15" }
// 2001-11-19 Benjamin Kosnik <bkoz@redhat.com>
@@ -34,7 +34,7 @@ void test05()
bool test __attribute__((unused)) = true;
// A locale that expects grouping.
- locale loc_de = locale("de_DE");
+ locale loc_de = locale(ISO_8859(15,de_DE));
const wstring empty;
wstring result;
diff --git a/libstdc++-v3/testsuite/22_locale/num_put/put/wchar_t/wrapped_env.cc b/libstdc++-v3/testsuite/22_locale/num_put/put/wchar_t/wrapped_env.cc
index e372f2a0464..4856dea8eed 100644
--- a/libstdc++-v3/testsuite/22_locale/num_put/put/wchar_t/wrapped_env.cc
+++ b/libstdc++-v3/testsuite/22_locale/num_put/put/wchar_t/wrapped_env.cc
@@ -1,5 +1,5 @@
-// { dg-require-namedlocale "de_DE" }
-// { dg-require-namedlocale "en_HK" }
+// { dg-require-namedlocale "de_DE.ISO8859-15" }
+// { dg-require-namedlocale "en_HK.ISO8859-1" }
// 2001-08-15 Benjamin Kosnik <bkoz@redhat.com>
@@ -53,6 +53,6 @@ int main()
two.push_back(&test03);
two.push_back(&test04);
two.push_back(&test05);
- run_tests_wrapped_env("de_DE", "LANG", two);
+ run_tests_wrapped_env(ISO_8859(15,de_DE), "LANG", two);
return 0;
}
diff --git a/libstdc++-v3/testsuite/22_locale/num_put/put/wchar_t/wrapped_locale.cc b/libstdc++-v3/testsuite/22_locale/num_put/put/wchar_t/wrapped_locale.cc
index ce69346738d..17bb2a31b5e 100644
--- a/libstdc++-v3/testsuite/22_locale/num_put/put/wchar_t/wrapped_locale.cc
+++ b/libstdc++-v3/testsuite/22_locale/num_put/put/wchar_t/wrapped_locale.cc
@@ -1,6 +1,6 @@
-// { dg-require-namedlocale "ja_JP.eucjp" }
-// { dg-require-namedlocale "de_DE" }
-// { dg-require-namedlocale "en_HK" }
+// { dg-require-namedlocale "ja_JP.eucJP" }
+// { dg-require-namedlocale "de_DE.ISO8859-15" }
+// { dg-require-namedlocale "en_HK.ISO8859-1" }
// 2001-08-15 Benjamin Kosnik <bkoz@redhat.com>
@@ -54,6 +54,6 @@ int main()
two.push_back(&test03);
two.push_back(&test04);
two.push_back(&test05);
- run_tests_wrapped_locale("ja_JP.eucjp", two);
+ run_tests_wrapped_locale("ja_JP.eucJP", two);
return 0;
}
diff --git a/libstdc++-v3/testsuite/22_locale/numpunct/members/char/2.cc b/libstdc++-v3/testsuite/22_locale/numpunct/members/char/2.cc
index e9c13cf1949..ce3ce0b2f80 100644
--- a/libstdc++-v3/testsuite/22_locale/numpunct/members/char/2.cc
+++ b/libstdc++-v3/testsuite/22_locale/numpunct/members/char/2.cc
@@ -1,6 +1,6 @@
-// { dg-require-namedlocale "en_US" }
-// { dg-require-namedlocale "is_IS" }
-// { dg-require-namedlocale "de_DE" }
+// { dg-require-namedlocale "en_US.ISO8859-1" }
+// { dg-require-namedlocale "is_IS.ISO8859-1" }
+// { dg-require-namedlocale "de_DE.ISO8859-15" }
// 2001-01-17 Benjamin Kosnik <bkoz@redhat.com>
@@ -34,9 +34,9 @@ void test02()
// basic construction
locale loc_c = locale::classic();
- locale loc_us = locale("en_US");
- locale loc_is = locale("is_IS");
- locale loc_de = locale("de_DE");
+ locale loc_us = locale(ISO_8859(1,en_US));
+ locale loc_is = locale(ISO_8859(1,is_IS));
+ locale loc_de = locale(ISO_8859(15,de_DE));
VERIFY( loc_c != loc_de );
VERIFY( loc_us != loc_is );
VERIFY( loc_us != loc_de );
diff --git a/libstdc++-v3/testsuite/22_locale/numpunct/members/char/3.cc b/libstdc++-v3/testsuite/22_locale/numpunct/members/char/3.cc
index 8de6dda3e18..18075a58764 100644
--- a/libstdc++-v3/testsuite/22_locale/numpunct/members/char/3.cc
+++ b/libstdc++-v3/testsuite/22_locale/numpunct/members/char/3.cc
@@ -1,4 +1,4 @@
-// { dg-require-namedlocale "it_IT" }
+// { dg-require-namedlocale "it_IT.ISO8859-15" }
// 2001-01-24 Benjamin Kosnik <bkoz@redhat.com>
@@ -30,7 +30,7 @@ void test02()
bool test __attribute__((unused)) = true;
- locale loc_it = locale("it_IT");
+ locale loc_it = locale(ISO_8859(15,it_IT));
const numpunct<char>& nump_it = use_facet<numpunct<char> >(loc_it);
diff --git a/libstdc++-v3/testsuite/22_locale/numpunct/members/char/wrapped_env.cc b/libstdc++-v3/testsuite/22_locale/numpunct/members/char/wrapped_env.cc
index ab24f85624d..e92737be777 100644
--- a/libstdc++-v3/testsuite/22_locale/numpunct/members/char/wrapped_env.cc
+++ b/libstdc++-v3/testsuite/22_locale/numpunct/members/char/wrapped_env.cc
@@ -1,6 +1,6 @@
-// { dg-require-namedlocale "de_DE" }
-// { dg-require-namedlocale "en_US" }
-// { dg-require-namedlocale "is_IS" }
+// { dg-require-namedlocale "de_DE.ISO8859-15" }
+// { dg-require-namedlocale "en_US.ISO8859-1" }
+// { dg-require-namedlocale "is_IS.ISO8859-1" }
// 2001-08-15 Benjamin Kosnik <bkoz@redhat.com>
@@ -39,6 +39,6 @@ int main()
func_callback two;
two.push_back(&test01);
two.push_back(&test02);
- run_tests_wrapped_env("de_DE", "LANG", two);
+ run_tests_wrapped_env(ISO_8859(15,de_DE), "LANG", two);
return 0;
}
diff --git a/libstdc++-v3/testsuite/22_locale/numpunct/members/char/wrapped_locale.cc b/libstdc++-v3/testsuite/22_locale/numpunct/members/char/wrapped_locale.cc
index 5cfd13410d4..996b4452a6c 100644
--- a/libstdc++-v3/testsuite/22_locale/numpunct/members/char/wrapped_locale.cc
+++ b/libstdc++-v3/testsuite/22_locale/numpunct/members/char/wrapped_locale.cc
@@ -1,7 +1,7 @@
-// { dg-require-namedlocale "ja_JP.eucjp" }
-// { dg-require-namedlocale "de_DE" }
-// { dg-require-namedlocale "en_US" }
-// { dg-require-namedlocale "is_IS" }
+// { dg-require-namedlocale "ja_JP.eucJP" }
+// { dg-require-namedlocale "de_DE.ISO8859-15" }
+// { dg-require-namedlocale "en_US.ISO8859-1" }
+// { dg-require-namedlocale "is_IS.ISO8859-1" }
// 2001-08-15 Benjamin Kosnik <bkoz@redhat.com>
@@ -40,6 +40,6 @@ int main()
func_callback two;
two.push_back(&test01);
two.push_back(&test02);
- run_tests_wrapped_locale("ja_JP.eucjp", two);
+ run_tests_wrapped_locale("ja_JP.eucJP", two);
return 0;
}
diff --git a/libstdc++-v3/testsuite/22_locale/numpunct/members/wchar_t/2.cc b/libstdc++-v3/testsuite/22_locale/numpunct/members/wchar_t/2.cc
index 72d84a9b578..352d7a92bd6 100644
--- a/libstdc++-v3/testsuite/22_locale/numpunct/members/wchar_t/2.cc
+++ b/libstdc++-v3/testsuite/22_locale/numpunct/members/wchar_t/2.cc
@@ -1,6 +1,6 @@
-// { dg-require-namedlocale "en_US" }
-// { dg-require-namedlocale "is_IS" }
-// { dg-require-namedlocale "de_DE" }
+// { dg-require-namedlocale "en_US.ISO8859-1" }
+// { dg-require-namedlocale "is_IS.ISO8859-1" }
+// { dg-require-namedlocale "de_DE.ISO8859-15" }
// 2001-01-17 Benjamin Kosnik <bkoz@redhat.com>
@@ -34,9 +34,9 @@ void test02()
// basic construction
locale loc_c = locale::classic();
- locale loc_us = locale("en_US");
- locale loc_is = locale("is_IS");
- locale loc_de = locale("de_DE");
+ locale loc_us = locale(ISO_8859(1,en_US));
+ locale loc_is = locale(ISO_8859(1,is_IS));
+ locale loc_de = locale(ISO_8859(15,de_DE));
VERIFY( loc_c != loc_de );
VERIFY( loc_us != loc_is );
VERIFY( loc_us != loc_de );
diff --git a/libstdc++-v3/testsuite/22_locale/numpunct/members/wchar_t/wrapped_env.cc b/libstdc++-v3/testsuite/22_locale/numpunct/members/wchar_t/wrapped_env.cc
index ab24f85624d..e92737be777 100644
--- a/libstdc++-v3/testsuite/22_locale/numpunct/members/wchar_t/wrapped_env.cc
+++ b/libstdc++-v3/testsuite/22_locale/numpunct/members/wchar_t/wrapped_env.cc
@@ -1,6 +1,6 @@
-// { dg-require-namedlocale "de_DE" }
-// { dg-require-namedlocale "en_US" }
-// { dg-require-namedlocale "is_IS" }
+// { dg-require-namedlocale "de_DE.ISO8859-15" }
+// { dg-require-namedlocale "en_US.ISO8859-1" }
+// { dg-require-namedlocale "is_IS.ISO8859-1" }
// 2001-08-15 Benjamin Kosnik <bkoz@redhat.com>
@@ -39,6 +39,6 @@ int main()
func_callback two;
two.push_back(&test01);
two.push_back(&test02);
- run_tests_wrapped_env("de_DE", "LANG", two);
+ run_tests_wrapped_env(ISO_8859(15,de_DE), "LANG", two);
return 0;
}
diff --git a/libstdc++-v3/testsuite/22_locale/numpunct/members/wchar_t/wrapped_locale.cc b/libstdc++-v3/testsuite/22_locale/numpunct/members/wchar_t/wrapped_locale.cc
index 5cfd13410d4..996b4452a6c 100644
--- a/libstdc++-v3/testsuite/22_locale/numpunct/members/wchar_t/wrapped_locale.cc
+++ b/libstdc++-v3/testsuite/22_locale/numpunct/members/wchar_t/wrapped_locale.cc
@@ -1,7 +1,7 @@
-// { dg-require-namedlocale "ja_JP.eucjp" }
-// { dg-require-namedlocale "de_DE" }
-// { dg-require-namedlocale "en_US" }
-// { dg-require-namedlocale "is_IS" }
+// { dg-require-namedlocale "ja_JP.eucJP" }
+// { dg-require-namedlocale "de_DE.ISO8859-15" }
+// { dg-require-namedlocale "en_US.ISO8859-1" }
+// { dg-require-namedlocale "is_IS.ISO8859-1" }
// 2001-08-15 Benjamin Kosnik <bkoz@redhat.com>
@@ -40,6 +40,6 @@ int main()
func_callback two;
two.push_back(&test01);
two.push_back(&test02);
- run_tests_wrapped_locale("ja_JP.eucjp", two);
+ run_tests_wrapped_locale("ja_JP.eucJP", two);
return 0;
}
diff --git a/libstdc++-v3/testsuite/22_locale/numpunct_byname/named_equivalence.cc b/libstdc++-v3/testsuite/22_locale/numpunct_byname/named_equivalence.cc
index 0d13315e1d4..8cc768a0c6b 100644
--- a/libstdc++-v3/testsuite/22_locale/numpunct_byname/named_equivalence.cc
+++ b/libstdc++-v3/testsuite/22_locale/numpunct_byname/named_equivalence.cc
@@ -1,4 +1,4 @@
-// { dg-require-namedlocale "de_DE" }
+// { dg-require-namedlocale "de_DE.ISO8859-15" }
// 2001-01-24 Benjamin Kosnik <bkoz@redhat.com>
@@ -31,10 +31,10 @@ void test01()
bool test __attribute__((unused)) = true;
string str;
- locale loc_de = locale("de_DE");
+ locale loc_de = locale(ISO_8859(15,de_DE));
str = loc_de.name();
- locale loc_byname(locale::classic(), new numpunct_byname<char>("de_DE"));
+ locale loc_byname(locale::classic(), new numpunct_byname<char>(ISO_8859(15,de_DE)));
str = loc_byname.name();
locale loc_c = locale::classic();
diff --git a/libstdc++-v3/testsuite/22_locale/time_get/date_order/char/wrapped_env.cc b/libstdc++-v3/testsuite/22_locale/time_get/date_order/char/wrapped_env.cc
index eddb670b8b9..0e4b03b732f 100644
--- a/libstdc++-v3/testsuite/22_locale/time_get/date_order/char/wrapped_env.cc
+++ b/libstdc++-v3/testsuite/22_locale/time_get/date_order/char/wrapped_env.cc
@@ -1,4 +1,4 @@
-// { dg-require-namedlocale "de_DE" }
+// { dg-require-namedlocale "de_DE.ISO8859-15" }
// 2001-08-15 Benjamin Kosnik <bkoz@redhat.com>
@@ -32,6 +32,6 @@ int main()
using namespace __gnu_test;
func_callback two;
two.push_back(&test01);
- run_tests_wrapped_env("de_DE", "LANG", two);
+ run_tests_wrapped_env(ISO_8859(15,de_DE), "LANG", two);
return 0;
}
diff --git a/libstdc++-v3/testsuite/22_locale/time_get/date_order/char/wrapped_locale.cc b/libstdc++-v3/testsuite/22_locale/time_get/date_order/char/wrapped_locale.cc
index b899fafbe90..43e2381d2cb 100644
--- a/libstdc++-v3/testsuite/22_locale/time_get/date_order/char/wrapped_locale.cc
+++ b/libstdc++-v3/testsuite/22_locale/time_get/date_order/char/wrapped_locale.cc
@@ -1,4 +1,4 @@
-// { dg-require-namedlocale "ja_JP.eucjp" }
+// { dg-require-namedlocale "ja_JP.eucJP" }
// 2001-08-15 Benjamin Kosnik <bkoz@redhat.com>
@@ -32,6 +32,6 @@ int main()
using namespace __gnu_test;
func_callback two;
two.push_back(&test01);
- run_tests_wrapped_locale("ja_JP.eucjp", two);
+ run_tests_wrapped_locale("ja_JP.eucJP", two);
return 0;
}
diff --git a/libstdc++-v3/testsuite/22_locale/time_get/date_order/wchar_t/wrapped_env.cc b/libstdc++-v3/testsuite/22_locale/time_get/date_order/wchar_t/wrapped_env.cc
index eddb670b8b9..0e4b03b732f 100644
--- a/libstdc++-v3/testsuite/22_locale/time_get/date_order/wchar_t/wrapped_env.cc
+++ b/libstdc++-v3/testsuite/22_locale/time_get/date_order/wchar_t/wrapped_env.cc
@@ -1,4 +1,4 @@
-// { dg-require-namedlocale "de_DE" }
+// { dg-require-namedlocale "de_DE.ISO8859-15" }
// 2001-08-15 Benjamin Kosnik <bkoz@redhat.com>
@@ -32,6 +32,6 @@ int main()
using namespace __gnu_test;
func_callback two;
two.push_back(&test01);
- run_tests_wrapped_env("de_DE", "LANG", two);
+ run_tests_wrapped_env(ISO_8859(15,de_DE), "LANG", two);
return 0;
}
diff --git a/libstdc++-v3/testsuite/22_locale/time_get/date_order/wchar_t/wrapped_locale.cc b/libstdc++-v3/testsuite/22_locale/time_get/date_order/wchar_t/wrapped_locale.cc
index b899fafbe90..43e2381d2cb 100644
--- a/libstdc++-v3/testsuite/22_locale/time_get/date_order/wchar_t/wrapped_locale.cc
+++ b/libstdc++-v3/testsuite/22_locale/time_get/date_order/wchar_t/wrapped_locale.cc
@@ -1,4 +1,4 @@
-// { dg-require-namedlocale "ja_JP.eucjp" }
+// { dg-require-namedlocale "ja_JP.eucJP" }
// 2001-08-15 Benjamin Kosnik <bkoz@redhat.com>
@@ -32,6 +32,6 @@ int main()
using namespace __gnu_test;
func_callback two;
two.push_back(&test01);
- run_tests_wrapped_locale("ja_JP.eucjp", two);
+ run_tests_wrapped_locale("ja_JP.eucJP", two);
return 0;
}
diff --git a/libstdc++-v3/testsuite/22_locale/time_get/get/char/2.cc b/libstdc++-v3/testsuite/22_locale/time_get/get/char/2.cc
index 1ea933df0e9..3e351b4df98 100644
--- a/libstdc++-v3/testsuite/22_locale/time_get/get/char/2.cc
+++ b/libstdc++-v3/testsuite/22_locale/time_get/get/char/2.cc
@@ -1,4 +1,4 @@
-// { dg-require-namedlocale "de_DE.utf8" }
+// { dg-require-namedlocale "de_DE.UTF-8" }
// { dg-options " -std=gnu++11 " }
// 2014-04-14 Rรผdiger Sonderfeld <ruediger@c-plusplus.de>
@@ -41,7 +41,7 @@ void test02()
bool test __attribute__((unused)) = true;
locale loc_c = locale::classic();
- locale loc_de = locale("de_DE.utf8");
+ locale loc_de = locale("de_DE.UTF-8");
VERIFY( loc_de != loc_c );
istringstream iss;
diff --git a/libstdc++-v3/testsuite/22_locale/time_get/get/wchar_t/2.cc b/libstdc++-v3/testsuite/22_locale/time_get/get/wchar_t/2.cc
index 1f1582e5a34..89f26c45b18 100644
--- a/libstdc++-v3/testsuite/22_locale/time_get/get/wchar_t/2.cc
+++ b/libstdc++-v3/testsuite/22_locale/time_get/get/wchar_t/2.cc
@@ -1,4 +1,4 @@
-// { dg-require-namedlocale "de_DE.utf8" }
+// { dg-require-namedlocale "de_DE.UTF-8" }
// { dg-options " -std=gnu++11 " }
// 2014-04-14 Rรผdiger Sonderfeld <ruediger@c-plusplus.de>
@@ -41,7 +41,7 @@ void test02()
bool test __attribute__((unused)) = true;
locale loc_c = locale::classic();
- locale loc_de = locale("de_DE.utf8");
+ locale loc_de = locale("de_DE.UTF-8");
VERIFY( loc_de != loc_c );
wistringstream iss;
diff --git a/libstdc++-v3/testsuite/22_locale/time_get/get_date/char/12750.cc b/libstdc++-v3/testsuite/22_locale/time_get/get_date/char/12750.cc
index b95610ab03e..d2cf27432aa 100644
--- a/libstdc++-v3/testsuite/22_locale/time_get/get_date/char/12750.cc
+++ b/libstdc++-v3/testsuite/22_locale/time_get/get_date/char/12750.cc
@@ -1,4 +1,4 @@
-// { dg-require-namedlocale "is_IS" }
+// { dg-require-namedlocale "is_IS.ISO8859-1" }
// 2003-10-27 Paolo Carlini <pcarlini@suse.de>
@@ -34,7 +34,7 @@ void test01()
bool test __attribute__((unused)) = true;
// basic construction
- locale loc_is = locale("is_IS");
+ locale loc_is = locale(ISO_8859(1,is_IS));
// create an ostream-derived object, cache the time_get facet
iterator_type end;
diff --git a/libstdc++-v3/testsuite/22_locale/time_get/get_date/char/2.cc b/libstdc++-v3/testsuite/22_locale/time_get/get_date/char/2.cc
index 366610687b0..4f77123794b 100644
--- a/libstdc++-v3/testsuite/22_locale/time_get/get_date/char/2.cc
+++ b/libstdc++-v3/testsuite/22_locale/time_get/get_date/char/2.cc
@@ -1,5 +1,5 @@
-// { dg-require-namedlocale "en_HK" }
-// { dg-require-namedlocale "de_DE" }
+// { dg-require-namedlocale "en_HK.ISO8859-1" }
+// { dg-require-namedlocale "de_DE.ISO8859-15" }
// 2001-09-21 Benjamin Kosnik <bkoz@redhat.com>
@@ -35,8 +35,8 @@ void test02()
// basic construction and sanity checks.
locale loc_c = locale::classic();
- locale loc_hk = locale("en_HK");
- locale loc_de = locale("de_DE");
+ locale loc_hk = locale(ISO_8859(1,en_HK));
+ locale loc_de = locale(ISO_8859(15,de_DE));
VERIFY( loc_hk != loc_c );
VERIFY( loc_hk != loc_de );
@@ -63,7 +63,7 @@ void test02()
iterator_type is_it01(iss);
errorstate = good;
- // inspection of named locales, de_DE
+ // inspection of named locales, de_DE.ISO8859-15
iss.imbue(loc_de);
iss.str("04.04.1971");
iterator_type is_it10(iss);
diff --git a/libstdc++-v3/testsuite/22_locale/time_get/get_date/char/26701.cc b/libstdc++-v3/testsuite/22_locale/time_get/get_date/char/26701.cc
index a46b94b916e..52b74bc66b6 100644
--- a/libstdc++-v3/testsuite/22_locale/time_get/get_date/char/26701.cc
+++ b/libstdc++-v3/testsuite/22_locale/time_get/get_date/char/26701.cc
@@ -1,4 +1,4 @@
-// { dg-require-namedlocale "en_GB" }
+// { dg-require-namedlocale "en_GB.ISO8859-1" }
// 2010-01-06 Paolo Carlini <paolo.carlini@oracle.com>
@@ -33,7 +33,7 @@ void test01()
typedef istreambuf_iterator<char> iterator_type;
- locale loc_en = locale("en_GB");
+ locale loc_en = locale(ISO_8859(1,en_GB));
tm tm0 = __gnu_test::test_tm(0, 0, 0, 0, 0, 0, 0, 0, 0);
diff --git a/libstdc++-v3/testsuite/22_locale/time_get/get_date/char/wrapped_env.cc b/libstdc++-v3/testsuite/22_locale/time_get/get_date/char/wrapped_env.cc
index e7a40edc897..3f3ec38f0f3 100644
--- a/libstdc++-v3/testsuite/22_locale/time_get/get_date/char/wrapped_env.cc
+++ b/libstdc++-v3/testsuite/22_locale/time_get/get_date/char/wrapped_env.cc
@@ -1,5 +1,5 @@
-// { dg-require-namedlocale "de_DE" }
-// { dg-require-namedlocale "en_HK" }
+// { dg-require-namedlocale "de_DE.ISO8859-15" }
+// { dg-require-namedlocale "en_HK.ISO8859-1" }
// 2001-08-15 Benjamin Kosnik <bkoz@redhat.com>
@@ -43,6 +43,6 @@ int main()
two.push_back(&test01);
two.push_back(&test02);
two.push_back(&test03);
- run_tests_wrapped_env("de_DE", "LANG", two);
+ run_tests_wrapped_env(ISO_8859(15,de_DE), "LANG", two);
return 0;
}
diff --git a/libstdc++-v3/testsuite/22_locale/time_get/get_date/char/wrapped_locale.cc b/libstdc++-v3/testsuite/22_locale/time_get/get_date/char/wrapped_locale.cc
index 0853219a1d9..742a5b9339c 100644
--- a/libstdc++-v3/testsuite/22_locale/time_get/get_date/char/wrapped_locale.cc
+++ b/libstdc++-v3/testsuite/22_locale/time_get/get_date/char/wrapped_locale.cc
@@ -1,6 +1,6 @@
-// { dg-require-namedlocale "ja_JP.eucjp" }
-// { dg-require-namedlocale "de_DE" }
-// { dg-require-namedlocale "en_HK" }
+// { dg-require-namedlocale "ja_JP.eucJP" }
+// { dg-require-namedlocale "de_DE.ISO8859-15" }
+// { dg-require-namedlocale "en_HK.ISO8859-1" }
// 2001-08-15 Benjamin Kosnik <bkoz@redhat.com>
@@ -44,6 +44,6 @@ int main()
two.push_back(&test01);
two.push_back(&test02);
two.push_back(&test03);
- run_tests_wrapped_locale("ja_JP.eucjp", two);
+ run_tests_wrapped_locale("ja_JP.eucJP", two);
return 0;
}
diff --git a/libstdc++-v3/testsuite/22_locale/time_get/get_date/wchar_t/12750.cc b/libstdc++-v3/testsuite/22_locale/time_get/get_date/wchar_t/12750.cc
index 65eec12b5a4..7a6ad65d51e 100644
--- a/libstdc++-v3/testsuite/22_locale/time_get/get_date/wchar_t/12750.cc
+++ b/libstdc++-v3/testsuite/22_locale/time_get/get_date/wchar_t/12750.cc
@@ -1,4 +1,4 @@
-// { dg-require-namedlocale "is_IS" }
+// { dg-require-namedlocale "is_IS.ISO8859-1" }
// 2003-10-27 Paolo Carlini <pcarlini@suse.de>
@@ -34,7 +34,7 @@ void test01()
bool test __attribute__((unused)) = true;
// basic construction
- locale loc_is = locale("is_IS");
+ locale loc_is = locale(ISO_8859(1,is_IS));
// create an ostream-derived object, cache the time_get facet
iterator_type end;
diff --git a/libstdc++-v3/testsuite/22_locale/time_get/get_date/wchar_t/2.cc b/libstdc++-v3/testsuite/22_locale/time_get/get_date/wchar_t/2.cc
index aa3df0058d0..0bbd1ce864c 100644
--- a/libstdc++-v3/testsuite/22_locale/time_get/get_date/wchar_t/2.cc
+++ b/libstdc++-v3/testsuite/22_locale/time_get/get_date/wchar_t/2.cc
@@ -1,5 +1,5 @@
-// { dg-require-namedlocale "en_HK" }
-// { dg-require-namedlocale "de_DE" }
+// { dg-require-namedlocale "en_HK.ISO8859-1" }
+// { dg-require-namedlocale "de_DE.ISO8859-15" }
// 2001-09-21 Benjamin Kosnik <bkoz@redhat.com>
@@ -35,8 +35,8 @@ void test02()
// basic construction and sanity checks.
locale loc_c = locale::classic();
- locale loc_hk = locale("en_HK");
- locale loc_de = locale("de_DE");
+ locale loc_hk = locale(ISO_8859(1,en_HK));
+ locale loc_de = locale(ISO_8859(15,de_DE));
VERIFY( loc_hk != loc_c );
VERIFY( loc_hk != loc_de );
@@ -63,7 +63,7 @@ void test02()
iterator_type is_it01(iss);
errorstate = good;
- // inspection of named locales, de_DE
+ // inspection of named locales, de_DE.ISO8859-15
iss.imbue(loc_de);
iss.str(L"04.04.1971");
iterator_type is_it10(iss);
diff --git a/libstdc++-v3/testsuite/22_locale/time_get/get_date/wchar_t/26701.cc b/libstdc++-v3/testsuite/22_locale/time_get/get_date/wchar_t/26701.cc
index b15305e50df..4ea1d71a2cb 100644
--- a/libstdc++-v3/testsuite/22_locale/time_get/get_date/wchar_t/26701.cc
+++ b/libstdc++-v3/testsuite/22_locale/time_get/get_date/wchar_t/26701.cc
@@ -1,4 +1,4 @@
-// { dg-require-namedlocale "en_GB" }
+// { dg-require-namedlocale "en_GB.ISO8859-1" }
// 2010-01-06 Paolo Carlini <paolo.carlini@oracle.com>
@@ -33,7 +33,7 @@ void test01()
typedef istreambuf_iterator<wchar_t> iterator_type;
- locale loc_en = locale("en_GB");
+ locale loc_en = locale(ISO_8859(1,en_GB));
tm tm0 = __gnu_test::test_tm(0, 0, 0, 0, 0, 0, 0, 0, 0);
diff --git a/libstdc++-v3/testsuite/22_locale/time_get/get_date/wchar_t/4.cc b/libstdc++-v3/testsuite/22_locale/time_get/get_date/wchar_t/4.cc
index 25e79732435..a177ba78750 100644
--- a/libstdc++-v3/testsuite/22_locale/time_get/get_date/wchar_t/4.cc
+++ b/libstdc++-v3/testsuite/22_locale/time_get/get_date/wchar_t/4.cc
@@ -1,4 +1,4 @@
-// { dg-require-namedlocale "zh_TW" }
+// { dg-require-namedlocale "zh_TW.UTF-8" }
// 2003-12-17 Paolo Carlini <pcarlini@suse.de>
@@ -32,7 +32,7 @@ void test01()
typedef istreambuf_iterator<wchar_t> iterator_type;
- locale loc_tw = locale("zh_TW");
+ locale loc_tw = locale("zh_TW.UTF-8");
iterator_type end;
diff --git a/libstdc++-v3/testsuite/22_locale/time_get/get_date/wchar_t/wrapped_env.cc b/libstdc++-v3/testsuite/22_locale/time_get/get_date/wchar_t/wrapped_env.cc
index e7a40edc897..3f3ec38f0f3 100644
--- a/libstdc++-v3/testsuite/22_locale/time_get/get_date/wchar_t/wrapped_env.cc
+++ b/libstdc++-v3/testsuite/22_locale/time_get/get_date/wchar_t/wrapped_env.cc
@@ -1,5 +1,5 @@
-// { dg-require-namedlocale "de_DE" }
-// { dg-require-namedlocale "en_HK" }
+// { dg-require-namedlocale "de_DE.ISO8859-15" }
+// { dg-require-namedlocale "en_HK.ISO8859-1" }
// 2001-08-15 Benjamin Kosnik <bkoz@redhat.com>
@@ -43,6 +43,6 @@ int main()
two.push_back(&test01);
two.push_back(&test02);
two.push_back(&test03);
- run_tests_wrapped_env("de_DE", "LANG", two);
+ run_tests_wrapped_env(ISO_8859(15,de_DE), "LANG", two);
return 0;
}
diff --git a/libstdc++-v3/testsuite/22_locale/time_get/get_date/wchar_t/wrapped_locale.cc b/libstdc++-v3/testsuite/22_locale/time_get/get_date/wchar_t/wrapped_locale.cc
index 0853219a1d9..742a5b9339c 100644
--- a/libstdc++-v3/testsuite/22_locale/time_get/get_date/wchar_t/wrapped_locale.cc
+++ b/libstdc++-v3/testsuite/22_locale/time_get/get_date/wchar_t/wrapped_locale.cc
@@ -1,6 +1,6 @@
-// { dg-require-namedlocale "ja_JP.eucjp" }
-// { dg-require-namedlocale "de_DE" }
-// { dg-require-namedlocale "en_HK" }
+// { dg-require-namedlocale "ja_JP.eucJP" }
+// { dg-require-namedlocale "de_DE.ISO8859-15" }
+// { dg-require-namedlocale "en_HK.ISO8859-1" }
// 2001-08-15 Benjamin Kosnik <bkoz@redhat.com>
@@ -44,6 +44,6 @@ int main()
two.push_back(&test01);
two.push_back(&test02);
two.push_back(&test03);
- run_tests_wrapped_locale("ja_JP.eucjp", two);
+ run_tests_wrapped_locale("ja_JP.eucJP", two);
return 0;
}
diff --git a/libstdc++-v3/testsuite/22_locale/time_get/get_monthname/char/2.cc b/libstdc++-v3/testsuite/22_locale/time_get/get_monthname/char/2.cc
index 158047299ac..7ceb6c46784 100644
--- a/libstdc++-v3/testsuite/22_locale/time_get/get_monthname/char/2.cc
+++ b/libstdc++-v3/testsuite/22_locale/time_get/get_monthname/char/2.cc
@@ -1,5 +1,5 @@
-// { dg-require-namedlocale "en_HK" }
-// { dg-require-namedlocale "de_DE" }
+// { dg-require-namedlocale "en_HK.ISO8859-1" }
+// { dg-require-namedlocale "de_DE.ISO8859-15" }
// 2001-09-21 Benjamin Kosnik <bkoz@redhat.com>
@@ -35,8 +35,8 @@ void test02()
// basic construction and sanity checks.
locale loc_c = locale::classic();
- locale loc_hk = locale("en_HK");
- locale loc_de = locale("de_DE");
+ locale loc_hk = locale(ISO_8859(1,en_HK));
+ locale loc_de = locale(ISO_8859(15,de_DE));
VERIFY( loc_hk != loc_c );
VERIFY( loc_hk != loc_de );
@@ -54,7 +54,7 @@ void test02()
iss.imbue(loc_de);
const time_get<char>& tim_get = use_facet<time_get<char> >(iss.getloc());
- // inspection of named locales, de_DE
+ // inspection of named locales, de_DE.ISO8859-15
iss.str("April");
iterator_type is_it10(iss);
tm time10;
diff --git a/libstdc++-v3/testsuite/22_locale/time_get/get_monthname/char/wrapped_env.cc b/libstdc++-v3/testsuite/22_locale/time_get/get_monthname/char/wrapped_env.cc
index e7a40edc897..3f3ec38f0f3 100644
--- a/libstdc++-v3/testsuite/22_locale/time_get/get_monthname/char/wrapped_env.cc
+++ b/libstdc++-v3/testsuite/22_locale/time_get/get_monthname/char/wrapped_env.cc
@@ -1,5 +1,5 @@
-// { dg-require-namedlocale "de_DE" }
-// { dg-require-namedlocale "en_HK" }
+// { dg-require-namedlocale "de_DE.ISO8859-15" }
+// { dg-require-namedlocale "en_HK.ISO8859-1" }
// 2001-08-15 Benjamin Kosnik <bkoz@redhat.com>
@@ -43,6 +43,6 @@ int main()
two.push_back(&test01);
two.push_back(&test02);
two.push_back(&test03);
- run_tests_wrapped_env("de_DE", "LANG", two);
+ run_tests_wrapped_env(ISO_8859(15,de_DE), "LANG", two);
return 0;
}
diff --git a/libstdc++-v3/testsuite/22_locale/time_get/get_monthname/char/wrapped_locale.cc b/libstdc++-v3/testsuite/22_locale/time_get/get_monthname/char/wrapped_locale.cc
index 0853219a1d9..742a5b9339c 100644
--- a/libstdc++-v3/testsuite/22_locale/time_get/get_monthname/char/wrapped_locale.cc
+++ b/libstdc++-v3/testsuite/22_locale/time_get/get_monthname/char/wrapped_locale.cc
@@ -1,6 +1,6 @@
-// { dg-require-namedlocale "ja_JP.eucjp" }
-// { dg-require-namedlocale "de_DE" }
-// { dg-require-namedlocale "en_HK" }
+// { dg-require-namedlocale "ja_JP.eucJP" }
+// { dg-require-namedlocale "de_DE.ISO8859-15" }
+// { dg-require-namedlocale "en_HK.ISO8859-1" }
// 2001-08-15 Benjamin Kosnik <bkoz@redhat.com>
@@ -44,6 +44,6 @@ int main()
two.push_back(&test01);
two.push_back(&test02);
two.push_back(&test03);
- run_tests_wrapped_locale("ja_JP.eucjp", two);
+ run_tests_wrapped_locale("ja_JP.eucJP", two);
return 0;
}
diff --git a/libstdc++-v3/testsuite/22_locale/time_get/get_monthname/wchar_t/2.cc b/libstdc++-v3/testsuite/22_locale/time_get/get_monthname/wchar_t/2.cc
index b97f66c59d9..d3a92cb7059 100644
--- a/libstdc++-v3/testsuite/22_locale/time_get/get_monthname/wchar_t/2.cc
+++ b/libstdc++-v3/testsuite/22_locale/time_get/get_monthname/wchar_t/2.cc
@@ -1,5 +1,5 @@
-// { dg-require-namedlocale "en_HK" }
-// { dg-require-namedlocale "de_DE" }
+// { dg-require-namedlocale "en_HK.ISO8859-1" }
+// { dg-require-namedlocale "de_DE.ISO8859-15" }
// 2001-09-21 Benjamin Kosnik <bkoz@redhat.com>
@@ -35,8 +35,8 @@ void test02()
// basic construction and sanity checks.
locale loc_c = locale::classic();
- locale loc_hk = locale("en_HK");
- locale loc_de = locale("de_DE");
+ locale loc_hk = locale(ISO_8859(1,en_HK));
+ locale loc_de = locale(ISO_8859(15,de_DE));
VERIFY( loc_hk != loc_c );
VERIFY( loc_hk != loc_de );
@@ -54,7 +54,7 @@ void test02()
iss.imbue(loc_de);
const time_get<wchar_t>& tim_get = use_facet<time_get<wchar_t> >(iss.getloc());
- // inspection of named locales, de_DE
+ // inspection of named locales, de_DE.ISO8859-15
iss.str(L"April");
iterator_type is_it10(iss);
tm time10;
diff --git a/libstdc++-v3/testsuite/22_locale/time_get/get_monthname/wchar_t/wrapped_env.cc b/libstdc++-v3/testsuite/22_locale/time_get/get_monthname/wchar_t/wrapped_env.cc
index e7a40edc897..3f3ec38f0f3 100644
--- a/libstdc++-v3/testsuite/22_locale/time_get/get_monthname/wchar_t/wrapped_env.cc
+++ b/libstdc++-v3/testsuite/22_locale/time_get/get_monthname/wchar_t/wrapped_env.cc
@@ -1,5 +1,5 @@
-// { dg-require-namedlocale "de_DE" }
-// { dg-require-namedlocale "en_HK" }
+// { dg-require-namedlocale "de_DE.ISO8859-15" }
+// { dg-require-namedlocale "en_HK.ISO8859-1" }
// 2001-08-15 Benjamin Kosnik <bkoz@redhat.com>
@@ -43,6 +43,6 @@ int main()
two.push_back(&test01);
two.push_back(&test02);
two.push_back(&test03);
- run_tests_wrapped_env("de_DE", "LANG", two);
+ run_tests_wrapped_env(ISO_8859(15,de_DE), "LANG", two);
return 0;
}
diff --git a/libstdc++-v3/testsuite/22_locale/time_get/get_monthname/wchar_t/wrapped_locale.cc b/libstdc++-v3/testsuite/22_locale/time_get/get_monthname/wchar_t/wrapped_locale.cc
index 0853219a1d9..742a5b9339c 100644
--- a/libstdc++-v3/testsuite/22_locale/time_get/get_monthname/wchar_t/wrapped_locale.cc
+++ b/libstdc++-v3/testsuite/22_locale/time_get/get_monthname/wchar_t/wrapped_locale.cc
@@ -1,6 +1,6 @@
-// { dg-require-namedlocale "ja_JP.eucjp" }
-// { dg-require-namedlocale "de_DE" }
-// { dg-require-namedlocale "en_HK" }
+// { dg-require-namedlocale "ja_JP.eucJP" }
+// { dg-require-namedlocale "de_DE.ISO8859-15" }
+// { dg-require-namedlocale "en_HK.ISO8859-1" }
// 2001-08-15 Benjamin Kosnik <bkoz@redhat.com>
@@ -44,6 +44,6 @@ int main()
two.push_back(&test01);
two.push_back(&test02);
two.push_back(&test03);
- run_tests_wrapped_locale("ja_JP.eucjp", two);
+ run_tests_wrapped_locale("ja_JP.eucJP", two);
return 0;
}
diff --git a/libstdc++-v3/testsuite/22_locale/time_get/get_time/char/1.cc b/libstdc++-v3/testsuite/22_locale/time_get/get_time/char/1.cc
index 3445a9a371d..027492a910f 100644
--- a/libstdc++-v3/testsuite/22_locale/time_get/get_time/char/1.cc
+++ b/libstdc++-v3/testsuite/22_locale/time_get/get_time/char/1.cc
@@ -1,4 +1,4 @@
-// { dg-require-namedlocale "de_DE" }
+// { dg-require-namedlocale "de_DE.ISO8859-15" }
// 2001-09-21 Benjamin Kosnik <bkoz@redhat.com>
@@ -34,7 +34,7 @@ void test01()
// basic construction and sanity checks.
locale loc_c = locale::classic();
- locale loc_de = locale("de_DE");
+ locale loc_de = locale(ISO_8859(15,de_DE));
VERIFY( loc_de != loc_c );
const string empty;
@@ -94,7 +94,7 @@ void test01()
VERIFY( *ret04 == 'a' );
VERIFY( errorstate == ios_base::failbit );
- // inspection of named locales, de_DE
+ // inspection of named locales, de_DE.ISO8859-15
iss.imbue(loc_de);
iss.str("12:00:00");
iterator_type is_it10(iss);
diff --git a/libstdc++-v3/testsuite/22_locale/time_get/get_time/char/2.cc b/libstdc++-v3/testsuite/22_locale/time_get/get_time/char/2.cc
index 8f946587921..75d7e4a34a1 100644
--- a/libstdc++-v3/testsuite/22_locale/time_get/get_time/char/2.cc
+++ b/libstdc++-v3/testsuite/22_locale/time_get/get_time/char/2.cc
@@ -1,4 +1,4 @@
-// { dg-require-namedlocale "en_HK" }
+// { dg-require-namedlocale "en_HK.ISO8859-1" }
// 2001-09-21 Benjamin Kosnik <bkoz@redhat.com>
@@ -34,7 +34,7 @@ void test02()
// basic construction and sanity check
locale loc_c = locale::classic();
- locale loc_hk = locale("en_HK");
+ locale loc_hk = locale(ISO_8859(1,en_HK));
VERIFY( loc_hk != loc_c );
const string empty;
diff --git a/libstdc++-v3/testsuite/22_locale/time_get/get_time/char/wrapped_env.cc b/libstdc++-v3/testsuite/22_locale/time_get/get_time/char/wrapped_env.cc
index e7a40edc897..3f3ec38f0f3 100644
--- a/libstdc++-v3/testsuite/22_locale/time_get/get_time/char/wrapped_env.cc
+++ b/libstdc++-v3/testsuite/22_locale/time_get/get_time/char/wrapped_env.cc
@@ -1,5 +1,5 @@
-// { dg-require-namedlocale "de_DE" }
-// { dg-require-namedlocale "en_HK" }
+// { dg-require-namedlocale "de_DE.ISO8859-15" }
+// { dg-require-namedlocale "en_HK.ISO8859-1" }
// 2001-08-15 Benjamin Kosnik <bkoz@redhat.com>
@@ -43,6 +43,6 @@ int main()
two.push_back(&test01);
two.push_back(&test02);
two.push_back(&test03);
- run_tests_wrapped_env("de_DE", "LANG", two);
+ run_tests_wrapped_env(ISO_8859(15,de_DE), "LANG", two);
return 0;
}
diff --git a/libstdc++-v3/testsuite/22_locale/time_get/get_time/char/wrapped_locale.cc b/libstdc++-v3/testsuite/22_locale/time_get/get_time/char/wrapped_locale.cc
index 0853219a1d9..742a5b9339c 100644
--- a/libstdc++-v3/testsuite/22_locale/time_get/get_time/char/wrapped_locale.cc
+++ b/libstdc++-v3/testsuite/22_locale/time_get/get_time/char/wrapped_locale.cc
@@ -1,6 +1,6 @@
-// { dg-require-namedlocale "ja_JP.eucjp" }
-// { dg-require-namedlocale "de_DE" }
-// { dg-require-namedlocale "en_HK" }
+// { dg-require-namedlocale "ja_JP.eucJP" }
+// { dg-require-namedlocale "de_DE.ISO8859-15" }
+// { dg-require-namedlocale "en_HK.ISO8859-1" }
// 2001-08-15 Benjamin Kosnik <bkoz@redhat.com>
@@ -44,6 +44,6 @@ int main()
two.push_back(&test01);
two.push_back(&test02);
two.push_back(&test03);
- run_tests_wrapped_locale("ja_JP.eucjp", two);
+ run_tests_wrapped_locale("ja_JP.eucJP", two);
return 0;
}
diff --git a/libstdc++-v3/testsuite/22_locale/time_get/get_time/wchar_t/1.cc b/libstdc++-v3/testsuite/22_locale/time_get/get_time/wchar_t/1.cc
index 0f5c4d9f1cf..1415e3d829e 100644
--- a/libstdc++-v3/testsuite/22_locale/time_get/get_time/wchar_t/1.cc
+++ b/libstdc++-v3/testsuite/22_locale/time_get/get_time/wchar_t/1.cc
@@ -1,4 +1,4 @@
-// { dg-require-namedlocale "de_DE" }
+// { dg-require-namedlocale "de_DE.ISO8859-15" }
// 2001-09-21 Benjamin Kosnik <bkoz@redhat.com>
@@ -34,7 +34,7 @@ void test01()
// basic construction and sanity checks.
locale loc_c = locale::classic();
- locale loc_de = locale("de_DE");
+ locale loc_de = locale(ISO_8859(15,de_DE));
VERIFY( loc_de != loc_c );
const wstring empty;
@@ -94,7 +94,7 @@ void test01()
VERIFY( *ret04 == L'a' );
VERIFY( errorstate == ios_base::failbit );
- // inspection of named locales, de_DE
+ // inspection of named locales, de_DE.ISO8859-15
iss.imbue(loc_de);
iss.str(L"12:00:00");
iterator_type is_it10(iss);
diff --git a/libstdc++-v3/testsuite/22_locale/time_get/get_time/wchar_t/2.cc b/libstdc++-v3/testsuite/22_locale/time_get/get_time/wchar_t/2.cc
index 7d3f6d554fc..f32067d76d7 100644
--- a/libstdc++-v3/testsuite/22_locale/time_get/get_time/wchar_t/2.cc
+++ b/libstdc++-v3/testsuite/22_locale/time_get/get_time/wchar_t/2.cc
@@ -1,4 +1,4 @@
-// { dg-require-namedlocale "en_HK" }
+// { dg-require-namedlocale "en_HK.ISO8859-1" }
// 2001-09-21 Benjamin Kosnik <bkoz@redhat.com>
@@ -34,7 +34,7 @@ void test02()
// basic construction and sanity check
locale loc_c = locale::classic();
- locale loc_hk = locale("en_HK");
+ locale loc_hk = locale(ISO_8859(1,en_HK));
VERIFY( loc_hk != loc_c );
const wstring empty;
diff --git a/libstdc++-v3/testsuite/22_locale/time_get/get_time/wchar_t/wrapped_env.cc b/libstdc++-v3/testsuite/22_locale/time_get/get_time/wchar_t/wrapped_env.cc
index e7a40edc897..3f3ec38f0f3 100644
--- a/libstdc++-v3/testsuite/22_locale/time_get/get_time/wchar_t/wrapped_env.cc
+++ b/libstdc++-v3/testsuite/22_locale/time_get/get_time/wchar_t/wrapped_env.cc
@@ -1,5 +1,5 @@
-// { dg-require-namedlocale "de_DE" }
-// { dg-require-namedlocale "en_HK" }
+// { dg-require-namedlocale "de_DE.ISO8859-15" }
+// { dg-require-namedlocale "en_HK.ISO8859-1" }
// 2001-08-15 Benjamin Kosnik <bkoz@redhat.com>
@@ -43,6 +43,6 @@ int main()
two.push_back(&test01);
two.push_back(&test02);
two.push_back(&test03);
- run_tests_wrapped_env("de_DE", "LANG", two);
+ run_tests_wrapped_env(ISO_8859(15,de_DE), "LANG", two);
return 0;
}
diff --git a/libstdc++-v3/testsuite/22_locale/time_get/get_time/wchar_t/wrapped_locale.cc b/libstdc++-v3/testsuite/22_locale/time_get/get_time/wchar_t/wrapped_locale.cc
index 0853219a1d9..742a5b9339c 100644
--- a/libstdc++-v3/testsuite/22_locale/time_get/get_time/wchar_t/wrapped_locale.cc
+++ b/libstdc++-v3/testsuite/22_locale/time_get/get_time/wchar_t/wrapped_locale.cc
@@ -1,6 +1,6 @@
-// { dg-require-namedlocale "ja_JP.eucjp" }
-// { dg-require-namedlocale "de_DE" }
-// { dg-require-namedlocale "en_HK" }
+// { dg-require-namedlocale "ja_JP.eucJP" }
+// { dg-require-namedlocale "de_DE.ISO8859-15" }
+// { dg-require-namedlocale "en_HK.ISO8859-1" }
// 2001-08-15 Benjamin Kosnik <bkoz@redhat.com>
@@ -44,6 +44,6 @@ int main()
two.push_back(&test01);
two.push_back(&test02);
two.push_back(&test03);
- run_tests_wrapped_locale("ja_JP.eucjp", two);
+ run_tests_wrapped_locale("ja_JP.eucJP", two);
return 0;
}
diff --git a/libstdc++-v3/testsuite/22_locale/time_get/get_weekday/char/2.cc b/libstdc++-v3/testsuite/22_locale/time_get/get_weekday/char/2.cc
index 3a936d06173..47076ea2ce1 100644
--- a/libstdc++-v3/testsuite/22_locale/time_get/get_weekday/char/2.cc
+++ b/libstdc++-v3/testsuite/22_locale/time_get/get_weekday/char/2.cc
@@ -1,5 +1,5 @@
-// { dg-require-namedlocale "en_HK" }
-// { dg-require-namedlocale "de_DE" }
+// { dg-require-namedlocale "en_HK.ISO8859-1" }
+// { dg-require-namedlocale "de_DE.ISO8859-15" }
// 2001-09-21 Benjamin Kosnik <bkoz@redhat.com>
@@ -35,8 +35,8 @@ void test02()
// basic construction and sanity checks.
locale loc_c = locale::classic();
- locale loc_hk = locale("en_HK");
- locale loc_de = locale("de_DE");
+ locale loc_hk = locale(ISO_8859(1,en_HK));
+ locale loc_de = locale(ISO_8859(15,de_DE));
VERIFY( loc_hk != loc_c );
VERIFY( loc_hk != loc_de );
@@ -54,7 +54,7 @@ void test02()
// create "C" time objects
const tm time_bday = __gnu_test::test_tm(0, 0, 12, 4, 3, 71, 0, 93, 0);
- // inspection of named locales, de_DE
+ // inspection of named locales, de_DE.ISO8859-15
iss.imbue(loc_de);
iss.str("Sonntag");
iterator_type is_it10(iss);
diff --git a/libstdc++-v3/testsuite/22_locale/time_get/get_weekday/char/38081-1.cc b/libstdc++-v3/testsuite/22_locale/time_get/get_weekday/char/38081-1.cc
index 5ae798d73cc..27b5da8575f 100644
--- a/libstdc++-v3/testsuite/22_locale/time_get/get_weekday/char/38081-1.cc
+++ b/libstdc++-v3/testsuite/22_locale/time_get/get_weekday/char/38081-1.cc
@@ -1,4 +1,4 @@
-// { dg-require-namedlocale "ru_RU.ISO-8859-5" }
+// { dg-require-namedlocale "ru_RU.ISO8859-5" }
// Copyright (C) 2010-2015 Free Software Foundation, Inc.
//
@@ -33,7 +33,7 @@ void test01()
typedef istreambuf_iterator<char> iterator_type;
// basic construction
- locale loc("ru_RU.ISO-8859-5");
+ locale loc(ISO_8859(5,ru_RU));
// create an ostream-derived object, cache the time_get facet
iterator_type end;
diff --git a/libstdc++-v3/testsuite/22_locale/time_get/get_weekday/char/38081-2.cc b/libstdc++-v3/testsuite/22_locale/time_get/get_weekday/char/38081-2.cc
index 79b280bfa7a..5a8bc480914 100644
--- a/libstdc++-v3/testsuite/22_locale/time_get/get_weekday/char/38081-2.cc
+++ b/libstdc++-v3/testsuite/22_locale/time_get/get_weekday/char/38081-2.cc
@@ -1,4 +1,4 @@
-// { dg-require-namedlocale "ru_RU.UTF8" }
+// { dg-require-namedlocale "ru_RU.UTF-8" }
// 2010-01-05 Paolo Carlini <paolo.carlini@oracle.com>
@@ -34,7 +34,7 @@ void test01()
typedef istreambuf_iterator<char> iterator_type;
// basic construction
- locale loc("ru_RU.UTF8");
+ locale loc("ru_RU.UTF-8");
// create an ostream-derived object, cache the time_get facet
iterator_type end;
diff --git a/libstdc++-v3/testsuite/22_locale/time_get/get_weekday/char/wrapped_env.cc b/libstdc++-v3/testsuite/22_locale/time_get/get_weekday/char/wrapped_env.cc
index e7a40edc897..3f3ec38f0f3 100644
--- a/libstdc++-v3/testsuite/22_locale/time_get/get_weekday/char/wrapped_env.cc
+++ b/libstdc++-v3/testsuite/22_locale/time_get/get_weekday/char/wrapped_env.cc
@@ -1,5 +1,5 @@
-// { dg-require-namedlocale "de_DE" }
-// { dg-require-namedlocale "en_HK" }
+// { dg-require-namedlocale "de_DE.ISO8859-15" }
+// { dg-require-namedlocale "en_HK.ISO8859-1" }
// 2001-08-15 Benjamin Kosnik <bkoz@redhat.com>
@@ -43,6 +43,6 @@ int main()
two.push_back(&test01);
two.push_back(&test02);
two.push_back(&test03);
- run_tests_wrapped_env("de_DE", "LANG", two);
+ run_tests_wrapped_env(ISO_8859(15,de_DE), "LANG", two);
return 0;
}
diff --git a/libstdc++-v3/testsuite/22_locale/time_get/get_weekday/char/wrapped_locale.cc b/libstdc++-v3/testsuite/22_locale/time_get/get_weekday/char/wrapped_locale.cc
index 0853219a1d9..742a5b9339c 100644
--- a/libstdc++-v3/testsuite/22_locale/time_get/get_weekday/char/wrapped_locale.cc
+++ b/libstdc++-v3/testsuite/22_locale/time_get/get_weekday/char/wrapped_locale.cc
@@ -1,6 +1,6 @@
-// { dg-require-namedlocale "ja_JP.eucjp" }
-// { dg-require-namedlocale "de_DE" }
-// { dg-require-namedlocale "en_HK" }
+// { dg-require-namedlocale "ja_JP.eucJP" }
+// { dg-require-namedlocale "de_DE.ISO8859-15" }
+// { dg-require-namedlocale "en_HK.ISO8859-1" }
// 2001-08-15 Benjamin Kosnik <bkoz@redhat.com>
@@ -44,6 +44,6 @@ int main()
two.push_back(&test01);
two.push_back(&test02);
two.push_back(&test03);
- run_tests_wrapped_locale("ja_JP.eucjp", two);
+ run_tests_wrapped_locale("ja_JP.eucJP", two);
return 0;
}
diff --git a/libstdc++-v3/testsuite/22_locale/time_get/get_weekday/wchar_t/2.cc b/libstdc++-v3/testsuite/22_locale/time_get/get_weekday/wchar_t/2.cc
index 47102a3e521..d557c18eb9a 100644
--- a/libstdc++-v3/testsuite/22_locale/time_get/get_weekday/wchar_t/2.cc
+++ b/libstdc++-v3/testsuite/22_locale/time_get/get_weekday/wchar_t/2.cc
@@ -1,5 +1,5 @@
-// { dg-require-namedlocale "en_HK" }
-// { dg-require-namedlocale "de_DE" }
+// { dg-require-namedlocale "en_HK.ISO8859-1" }
+// { dg-require-namedlocale "de_DE.ISO8859-15" }
// 2001-09-21 Benjamin Kosnik <bkoz@redhat.com>
@@ -35,8 +35,8 @@ void test02()
// basic construction and sanity checks.
locale loc_c = locale::classic();
- locale loc_hk = locale("en_HK");
- locale loc_de = locale("de_DE");
+ locale loc_hk = locale(ISO_8859(1,en_HK));
+ locale loc_de = locale(ISO_8859(15,de_DE));
VERIFY( loc_hk != loc_c );
VERIFY( loc_hk != loc_de );
@@ -54,7 +54,7 @@ void test02()
// create "C" time objects
const tm time_bday = __gnu_test::test_tm(0, 0, 12, 4, 3, 71, 0, 93, 0);
- // inspection of named locales, de_DE
+ // inspection of named locales, de_DE.ISO8859-15
iss.imbue(loc_de);
iss.str(L"Sonntag");
iterator_type is_it10(iss);
diff --git a/libstdc++-v3/testsuite/22_locale/time_get/get_weekday/wchar_t/wrapped_env.cc b/libstdc++-v3/testsuite/22_locale/time_get/get_weekday/wchar_t/wrapped_env.cc
index e1789beda11..5102a79dd14 100644
--- a/libstdc++-v3/testsuite/22_locale/time_get/get_weekday/wchar_t/wrapped_env.cc
+++ b/libstdc++-v3/testsuite/22_locale/time_get/get_weekday/wchar_t/wrapped_env.cc
@@ -1,5 +1,5 @@
-// { dg-require-namedlocale "en_HK" }
-// { dg-require-namedlocale "de_DE" }
+// { dg-require-namedlocale "en_HK.ISO8859-1" }
+// { dg-require-namedlocale "de_DE.ISO8859-15" }
// 2001-08-15 Benjamin Kosnik <bkoz@redhat.com>
@@ -43,6 +43,6 @@ int main()
two.push_back(&test01);
two.push_back(&test02);
two.push_back(&test03);
- run_tests_wrapped_env("de_DE", "LANG", two);
+ run_tests_wrapped_env(ISO_8859(15,de_DE), "LANG", two);
return 0;
}
diff --git a/libstdc++-v3/testsuite/22_locale/time_get/get_weekday/wchar_t/wrapped_locale.cc b/libstdc++-v3/testsuite/22_locale/time_get/get_weekday/wchar_t/wrapped_locale.cc
index 691253d2235..896d5982db2 100644
--- a/libstdc++-v3/testsuite/22_locale/time_get/get_weekday/wchar_t/wrapped_locale.cc
+++ b/libstdc++-v3/testsuite/22_locale/time_get/get_weekday/wchar_t/wrapped_locale.cc
@@ -1,6 +1,6 @@
-// { dg-require-namedlocale "en_HK" }
-// { dg-require-namedlocale "de_DE" }
-// { dg-require-namedlocale "ja_JP.eucjp" }
+// { dg-require-namedlocale "en_HK.ISO8859-1" }
+// { dg-require-namedlocale "de_DE.ISO8859-15" }
+// { dg-require-namedlocale "ja_JP.eucJP" }
// 2001-08-15 Benjamin Kosnik <bkoz@redhat.com>
@@ -44,6 +44,6 @@ int main()
two.push_back(&test01);
two.push_back(&test02);
two.push_back(&test03);
- run_tests_wrapped_locale("ja_JP.eucjp", two);
+ run_tests_wrapped_locale("ja_JP.eucJP", two);
return 0;
}
diff --git a/libstdc++-v3/testsuite/22_locale/time_get/get_year/char/wrapped_env.cc b/libstdc++-v3/testsuite/22_locale/time_get/get_year/char/wrapped_env.cc
index 85cb3de61eb..4fe83399ec1 100644
--- a/libstdc++-v3/testsuite/22_locale/time_get/get_year/char/wrapped_env.cc
+++ b/libstdc++-v3/testsuite/22_locale/time_get/get_year/char/wrapped_env.cc
@@ -1,4 +1,4 @@
-// { dg-require-namedlocale "de_DE" }
+// { dg-require-namedlocale "de_DE.ISO8859-15" }
// 2001-08-15 Benjamin Kosnik <bkoz@redhat.com>
@@ -37,6 +37,6 @@ int main()
func_callback two;
two.push_back(&test01);
two.push_back(&test03);
- run_tests_wrapped_env("de_DE", "LANG", two);
+ run_tests_wrapped_env(ISO_8859(15,de_DE), "LANG", two);
return 0;
}
diff --git a/libstdc++-v3/testsuite/22_locale/time_get/get_year/char/wrapped_locale.cc b/libstdc++-v3/testsuite/22_locale/time_get/get_year/char/wrapped_locale.cc
index d7b5b1886d9..57e2bc85026 100644
--- a/libstdc++-v3/testsuite/22_locale/time_get/get_year/char/wrapped_locale.cc
+++ b/libstdc++-v3/testsuite/22_locale/time_get/get_year/char/wrapped_locale.cc
@@ -1,4 +1,4 @@
-// { dg-require-namedlocale "ja_JP.eucjp" }
+// { dg-require-namedlocale "ja_JP.eucJP" }
// 2001-08-15 Benjamin Kosnik <bkoz@redhat.com>
@@ -37,6 +37,6 @@ int main()
func_callback two;
two.push_back(&test01);
two.push_back(&test03);
- run_tests_wrapped_locale("ja_JP.eucjp", two);
+ run_tests_wrapped_locale("ja_JP.eucJP", two);
return 0;
}
diff --git a/libstdc++-v3/testsuite/22_locale/time_get/get_year/wchar_t/wrapped_env.cc b/libstdc++-v3/testsuite/22_locale/time_get/get_year/wchar_t/wrapped_env.cc
index 85cb3de61eb..4fe83399ec1 100644
--- a/libstdc++-v3/testsuite/22_locale/time_get/get_year/wchar_t/wrapped_env.cc
+++ b/libstdc++-v3/testsuite/22_locale/time_get/get_year/wchar_t/wrapped_env.cc
@@ -1,4 +1,4 @@
-// { dg-require-namedlocale "de_DE" }
+// { dg-require-namedlocale "de_DE.ISO8859-15" }
// 2001-08-15 Benjamin Kosnik <bkoz@redhat.com>
@@ -37,6 +37,6 @@ int main()
func_callback two;
two.push_back(&test01);
two.push_back(&test03);
- run_tests_wrapped_env("de_DE", "LANG", two);
+ run_tests_wrapped_env(ISO_8859(15,de_DE), "LANG", two);
return 0;
}
diff --git a/libstdc++-v3/testsuite/22_locale/time_get/get_year/wchar_t/wrapped_locale.cc b/libstdc++-v3/testsuite/22_locale/time_get/get_year/wchar_t/wrapped_locale.cc
index d7b5b1886d9..57e2bc85026 100644
--- a/libstdc++-v3/testsuite/22_locale/time_get/get_year/wchar_t/wrapped_locale.cc
+++ b/libstdc++-v3/testsuite/22_locale/time_get/get_year/wchar_t/wrapped_locale.cc
@@ -1,4 +1,4 @@
-// { dg-require-namedlocale "ja_JP.eucjp" }
+// { dg-require-namedlocale "ja_JP.eucJP" }
// 2001-08-15 Benjamin Kosnik <bkoz@redhat.com>
@@ -37,6 +37,6 @@ int main()
func_callback two;
two.push_back(&test01);
two.push_back(&test03);
- run_tests_wrapped_locale("ja_JP.eucjp", two);
+ run_tests_wrapped_locale("ja_JP.eucJP", two);
return 0;
}
diff --git a/libstdc++-v3/testsuite/22_locale/time_put/put/char/17038.cc b/libstdc++-v3/testsuite/22_locale/time_put/put/char/17038.cc
index 84523248dca..f9a2557df33 100644
--- a/libstdc++-v3/testsuite/22_locale/time_put/put/char/17038.cc
+++ b/libstdc++-v3/testsuite/22_locale/time_put/put/char/17038.cc
@@ -1,4 +1,4 @@
-// { dg-require-namedlocale "ta_IN" }
+// { dg-require-namedlocale "ta_IN.UTF-8" }
// 2004-08-25 Paolo Carlini <pcarlini@suse.de>
@@ -38,7 +38,7 @@ void test01()
// basic construction
locale loc_c = locale::classic();
- locale loc_in = locale("ta_IN");
+ locale loc_in = locale("ta_IN.UTF-8");
VERIFY( loc_in != loc_c );
// create an ostream-derived object, cache the time_put facet
@@ -51,7 +51,7 @@ void test01()
string result1 = oss.str();
char time_buffer[128];
- setlocale(LC_ALL, "ta_IN");
+ setlocale(LC_ALL, "ta_IN.UTF-8");
VERIFY( strftime(time_buffer, 128, "%c", &time1) );
VERIFY( result1 == time_buffer );
diff --git a/libstdc++-v3/testsuite/22_locale/time_put/put/char/2.cc b/libstdc++-v3/testsuite/22_locale/time_put/put/char/2.cc
index 42aa63590d5..c120be5ec47 100644
--- a/libstdc++-v3/testsuite/22_locale/time_put/put/char/2.cc
+++ b/libstdc++-v3/testsuite/22_locale/time_put/put/char/2.cc
@@ -1,4 +1,4 @@
-// { dg-require-namedlocale "de_DE" }
+// { dg-require-namedlocale "de_DE.ISO8859-15" }
// 2001-09-17 Benjamin Kosnik <bkoz@redhat.com>
@@ -37,7 +37,7 @@ void test02()
// basic construction and sanity check
locale loc_c = locale::classic();
- locale loc_de = locale("de_DE");
+ locale loc_de = locale(ISO_8859(15,de_DE));
VERIFY( loc_de != loc_c );
// create an ostream-derived object, cache the time_put facet
diff --git a/libstdc++-v3/testsuite/22_locale/time_put/put/char/3.cc b/libstdc++-v3/testsuite/22_locale/time_put/put/char/3.cc
index 3aa6f68dcd4..ff567f271a6 100644
--- a/libstdc++-v3/testsuite/22_locale/time_put/put/char/3.cc
+++ b/libstdc++-v3/testsuite/22_locale/time_put/put/char/3.cc
@@ -1,4 +1,4 @@
-// { dg-require-namedlocale "en_HK" }
+// { dg-require-namedlocale "en_HK.ISO8859-1" }
// 2001-09-17 Benjamin Kosnik <bkoz@redhat.com>
@@ -37,7 +37,7 @@ void test03()
// basic construction and sanity check.
locale loc_c = locale::classic();
- locale loc_hk = locale("en_HK");
+ locale loc_hk = locale(ISO_8859(1,en_HK));
VERIFY( loc_hk != loc_c );
// create an ostream-derived object, cache the time_put facet
diff --git a/libstdc++-v3/testsuite/22_locale/time_put/put/char/4.cc b/libstdc++-v3/testsuite/22_locale/time_put/put/char/4.cc
index 82b8cc6b22a..5fe87460b88 100644
--- a/libstdc++-v3/testsuite/22_locale/time_put/put/char/4.cc
+++ b/libstdc++-v3/testsuite/22_locale/time_put/put/char/4.cc
@@ -1,4 +1,4 @@
-// { dg-require-namedlocale "es_ES" }
+// { dg-require-namedlocale "es_ES.ISO8859-15" }
// 2001-09-17 Benjamin Kosnik <bkoz@redhat.com>
@@ -37,7 +37,7 @@ void test04()
// basic construction and sanity check
locale loc_c = locale::classic();
- locale loc_es = locale("es_ES");
+ locale loc_es = locale(ISO_8859(15,es_ES));
VERIFY( loc_es != loc_c );
// create an ostream-derived object, cache the time_put facet
diff --git a/libstdc++-v3/testsuite/22_locale/time_put/put/char/6.cc b/libstdc++-v3/testsuite/22_locale/time_put/put/char/6.cc
index 704610d3435..b2d308d61d4 100644
--- a/libstdc++-v3/testsuite/22_locale/time_put/put/char/6.cc
+++ b/libstdc++-v3/testsuite/22_locale/time_put/put/char/6.cc
@@ -1,4 +1,4 @@
-// { dg-require-namedlocale "de_DE" }
+// { dg-require-namedlocale "de_DE.ISO8859-15" }
// 2001-09-17 Benjamin Kosnik <bkoz@redhat.com>
@@ -40,7 +40,7 @@ void test06()
// basic construction and sanity check
locale loc_c = locale::classic();
- locale loc_de = locale("de_DE");
+ locale loc_de = locale(ISO_8859(15,de_DE));
VERIFY( loc_de != loc_c );
// create an ostream-derived object, cache the time_put facet
diff --git a/libstdc++-v3/testsuite/22_locale/time_put/put/char/7.cc b/libstdc++-v3/testsuite/22_locale/time_put/put/char/7.cc
index 1a1775634cb..77e1a5fc217 100644
--- a/libstdc++-v3/testsuite/22_locale/time_put/put/char/7.cc
+++ b/libstdc++-v3/testsuite/22_locale/time_put/put/char/7.cc
@@ -1,4 +1,4 @@
-// { dg-require-namedlocale "en_HK" }
+// { dg-require-namedlocale "en_HK.ISO8859-1" }
// 2001-09-17 Benjamin Kosnik <bkoz@redhat.com>
@@ -40,7 +40,7 @@ void test07()
// basic construction and sanity check
locale loc_c = locale::classic();
- locale loc_hk = locale("en_HK");
+ locale loc_hk = locale(ISO_8859(1,en_HK));
VERIFY( loc_hk != loc_c );
// create an ostream-derived object, cache the time_put facet
diff --git a/libstdc++-v3/testsuite/22_locale/time_put/put/char/8.cc b/libstdc++-v3/testsuite/22_locale/time_put/put/char/8.cc
index 840b504d7a9..ea86b4aba34 100644
--- a/libstdc++-v3/testsuite/22_locale/time_put/put/char/8.cc
+++ b/libstdc++-v3/testsuite/22_locale/time_put/put/char/8.cc
@@ -1,4 +1,4 @@
-// { dg-require-namedlocale "fr_FR@euro" }
+// { dg-require-namedlocale "fr_FR.ISO8859-15" }
// 2001-09-17 Benjamin Kosnik <bkoz@redhat.com>
@@ -40,7 +40,7 @@ void test08()
// basic construction and sanity check
locale loc_c = locale::classic();
- locale loc_fr = locale("fr_FR@euro");
+ locale loc_fr = locale(ISO_8859(15,fr_FR));
VERIFY( loc_fr != loc_c );
// create an ostream-derived object, cache the time_put facet
diff --git a/libstdc++-v3/testsuite/22_locale/time_put/put/char/9780-1.cc b/libstdc++-v3/testsuite/22_locale/time_put/put/char/9780-1.cc
index 012244c18eb..4e5a2944a28 100644
--- a/libstdc++-v3/testsuite/22_locale/time_put/put/char/9780-1.cc
+++ b/libstdc++-v3/testsuite/22_locale/time_put/put/char/9780-1.cc
@@ -1,5 +1,5 @@
-// { dg-require-namedlocale "de_DE" }
-// { dg-require-namedlocale "es_ES" }
+// { dg-require-namedlocale "de_DE.ISO8859-15" }
+// { dg-require-namedlocale "es_ES.ISO8859-15" }
// Copyright (C) 2004-2015 Free Software Foundation, Inc.
//
@@ -27,8 +27,8 @@ int main()
using namespace std;
bool test __attribute__((unused)) = true;
- locale l1 = locale("de_DE");
- locale l2 = locale("es_ES");
+ locale l1 = locale(ISO_8859(15,de_DE));
+ locale l2 = locale(ISO_8859(15,es_ES));
const time_put<char> &tp = use_facet<time_put<char> >(l1);
ostringstream oss;
@@ -104,7 +104,7 @@ The problems with the first approach, as above, are numerous.
/*
With GCC/libstdc++, the output of the program with the arguments
-of de_DE es_ES is:
+of de_DE.ISO8859-15 es_ES is:
domingo
lunes
martes
diff --git a/libstdc++-v3/testsuite/22_locale/time_put/put/char/wrapped_env.cc b/libstdc++-v3/testsuite/22_locale/time_put/put/char/wrapped_env.cc
index cedfadd82bb..e3ddf588714 100644
--- a/libstdc++-v3/testsuite/22_locale/time_put/put/char/wrapped_env.cc
+++ b/libstdc++-v3/testsuite/22_locale/time_put/put/char/wrapped_env.cc
@@ -1,7 +1,7 @@
-// { dg-require-namedlocale "de_DE" }
-// { dg-require-namedlocale "en_HK" }
-// { dg-require-namedlocale "es_ES" }
-// { dg-require-namedlocale "fr_FR@euro" }
+// { dg-require-namedlocale "de_DE.ISO8859-15" }
+// { dg-require-namedlocale "en_HK.ISO8859-1" }
+// { dg-require-namedlocale "es_ES.ISO8859-15" }
+// { dg-require-namedlocale "fr_FR.ISO8859-15" }
// 2001-08-15 Benjamin Kosnik <bkoz@redhat.com>
@@ -80,6 +80,6 @@ int main()
two.push_back(&test08);
two.push_back(&test09);
two.push_back(&test10);
- run_tests_wrapped_env("de_DE", "LANG", two);
+ run_tests_wrapped_env(ISO_8859(15,de_DE), "LANG", two);
return 0;
}
diff --git a/libstdc++-v3/testsuite/22_locale/time_put/put/char/wrapped_locale.cc b/libstdc++-v3/testsuite/22_locale/time_put/put/char/wrapped_locale.cc
index af9583365ec..0ee4db510ce 100644
--- a/libstdc++-v3/testsuite/22_locale/time_put/put/char/wrapped_locale.cc
+++ b/libstdc++-v3/testsuite/22_locale/time_put/put/char/wrapped_locale.cc
@@ -1,7 +1,7 @@
-// { dg-require-namedlocale "de_DE" }
-// { dg-require-namedlocale "en_HK" }
-// { dg-require-namedlocale "es_ES" }
-// { dg-require-namedlocale "fr_FR@euro" }
+// { dg-require-namedlocale "de_DE.ISO8859-15" }
+// { dg-require-namedlocale "en_HK.ISO8859-1" }
+// { dg-require-namedlocale "es_ES.ISO8859-15" }
+// { dg-require-namedlocale "fr_FR.ISO8859-15" }
// 2001-08-15 Benjamin Kosnik <bkoz@redhat.com>
@@ -80,6 +80,6 @@ int main()
two.push_back(&test08);
two.push_back(&test09);
two.push_back(&test10);
- run_tests_wrapped_locale("ja_JP.eucjp", two);
+ run_tests_wrapped_locale("ja_JP.eucJP", two);
return 0;
}
diff --git a/libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/17038.cc b/libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/17038.cc
index 2b2cd531a41..2580b4c5961 100644
--- a/libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/17038.cc
+++ b/libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/17038.cc
@@ -1,4 +1,4 @@
-// { dg-require-namedlocale "ta_IN" }
+// { dg-require-namedlocale "ta_IN.UTF-8" }
// 2004-08-25 Paolo Carlini <pcarlini@suse.de>
@@ -38,7 +38,7 @@ void test01()
// basic construction
locale loc_c = locale::classic();
- locale loc_in = locale("ta_IN");
+ locale loc_in = locale("ta_IN.UTF-8");
VERIFY( loc_in != loc_c );
// create an ostream-derived object, cache the time_put facet
@@ -51,7 +51,7 @@ void test01()
wstring result1 = oss.str();
wchar_t time_buffer[128];
- setlocale(LC_ALL, "ta_IN");
+ setlocale(LC_ALL, "ta_IN.UTF-8");
VERIFY( wcsftime(time_buffer, 128, L"%c", &time1) );
VERIFY( result1 == time_buffer );
diff --git a/libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/2.cc b/libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/2.cc
index f2d0bd8f3e2..0605ba419a8 100644
--- a/libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/2.cc
+++ b/libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/2.cc
@@ -1,4 +1,4 @@
-// { dg-require-namedlocale "de_DE" }
+// { dg-require-namedlocale "de_DE.ISO8859-15" }
// 2001-09-17 Benjamin Kosnik <bkoz@redhat.com>
@@ -37,7 +37,7 @@ void test02()
// basic construction and sanity check
locale loc_c = locale::classic();
- locale loc_de = locale("de_DE");
+ locale loc_de = locale(ISO_8859(15,de_DE));
VERIFY( loc_de != loc_c );
// create an ostream-derived object, cache the time_put facet
diff --git a/libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/3.cc b/libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/3.cc
index 6fa664aa4d1..76eb05346b9 100644
--- a/libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/3.cc
+++ b/libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/3.cc
@@ -1,4 +1,4 @@
-// { dg-require-namedlocale "en_HK" }
+// { dg-require-namedlocale "en_HK.ISO8859-1" }
// 2001-09-17 Benjamin Kosnik <bkoz@redhat.com>
@@ -37,7 +37,7 @@ void test03()
// basic construction and sanity check
locale loc_c = locale::classic();
- locale loc_hk = locale("en_HK");
+ locale loc_hk = locale(ISO_8859(1,en_HK));
VERIFY( loc_hk != loc_c );
// create an ostream-derived object, cache the time_put facet
diff --git a/libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/4.cc b/libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/4.cc
index a6e4b634fd9..11cdf804539 100644
--- a/libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/4.cc
+++ b/libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/4.cc
@@ -1,4 +1,4 @@
-// { dg-require-namedlocale "es_ES" }
+// { dg-require-namedlocale "es_ES.ISO8859-15" }
// 2001-09-17 Benjamin Kosnik <bkoz@redhat.com>
@@ -37,7 +37,7 @@ void test04()
// basic construction and sanity check
locale loc_c = locale::classic();
- locale loc_es = locale("es_ES");
+ locale loc_es = locale(ISO_8859(15,es_ES));
VERIFY( loc_es != loc_c );
// create an ostream-derived object, cache the time_put facet
diff --git a/libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/6.cc b/libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/6.cc
index 062c218264f..b9629084b8e 100644
--- a/libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/6.cc
+++ b/libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/6.cc
@@ -1,4 +1,4 @@
-// { dg-require-namedlocale "de_DE" }
+// { dg-require-namedlocale "de_DE.ISO8859-15" }
// 2001-09-17 Benjamin Kosnik <bkoz@redhat.com>
@@ -40,7 +40,7 @@ void test06()
// basic construction and sanity check
locale loc_c = locale::classic();
- locale loc_de = locale("de_DE");
+ locale loc_de = locale(ISO_8859(15,de_DE));
VERIFY( loc_de != loc_c );
// create an ostream-derived object, cache the time_put facet
diff --git a/libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/7.cc b/libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/7.cc
index eaf49fc44a8..0749172b9af 100644
--- a/libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/7.cc
+++ b/libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/7.cc
@@ -1,4 +1,4 @@
-// { dg-require-namedlocale "en_HK" }
+// { dg-require-namedlocale "en_HK.ISO8859-1" }
// 2001-09-17 Benjamin Kosnik <bkoz@redhat.com>
@@ -40,7 +40,7 @@ void test07()
// basic construction and sanity check
locale loc_c = locale::classic();
- locale loc_hk = locale("en_HK");
+ locale loc_hk = locale(ISO_8859(1,en_HK));
VERIFY( loc_hk != loc_c );
// create an ostream-derived object, cache the time_put facet
diff --git a/libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/8.cc b/libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/8.cc
index fad15ee7119..62a4eddfc79 100644
--- a/libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/8.cc
+++ b/libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/8.cc
@@ -1,4 +1,4 @@
-// { dg-require-namedlocale "fr_FR@euro" }
+// { dg-require-namedlocale "fr_FR.ISO8859-15" }
// 2001-09-17 Benjamin Kosnik <bkoz@redhat.com>
@@ -40,7 +40,7 @@ void test08()
// basic construction and sanity check
locale loc_c = locale::classic();
- locale loc_fr = locale("fr_FR@euro");
+ locale loc_fr = locale(ISO_8859(15,fr_FR));
VERIFY( loc_fr != loc_c );
// create an ostream-derived object, cache the time_put facet
diff --git a/libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/wrapped_env.cc b/libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/wrapped_env.cc
index cedfadd82bb..e3ddf588714 100644
--- a/libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/wrapped_env.cc
+++ b/libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/wrapped_env.cc
@@ -1,7 +1,7 @@
-// { dg-require-namedlocale "de_DE" }
-// { dg-require-namedlocale "en_HK" }
-// { dg-require-namedlocale "es_ES" }
-// { dg-require-namedlocale "fr_FR@euro" }
+// { dg-require-namedlocale "de_DE.ISO8859-15" }
+// { dg-require-namedlocale "en_HK.ISO8859-1" }
+// { dg-require-namedlocale "es_ES.ISO8859-15" }
+// { dg-require-namedlocale "fr_FR.ISO8859-15" }
// 2001-08-15 Benjamin Kosnik <bkoz@redhat.com>
@@ -80,6 +80,6 @@ int main()
two.push_back(&test08);
two.push_back(&test09);
two.push_back(&test10);
- run_tests_wrapped_env("de_DE", "LANG", two);
+ run_tests_wrapped_env(ISO_8859(15,de_DE), "LANG", two);
return 0;
}
diff --git a/libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/wrapped_locale.cc b/libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/wrapped_locale.cc
index bb9170772e7..5695dacad94 100644
--- a/libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/wrapped_locale.cc
+++ b/libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/wrapped_locale.cc
@@ -1,8 +1,8 @@
-// { dg-require-namedlocale "de_DE" }
-// { dg-require-namedlocale "en_HK" }
-// { dg-require-namedlocale "es_ES" }
-// { dg-require-namedlocale "fr_FR@euro" }
-// { dg-require-namedlocale "ja_JP.eucjp" }
+// { dg-require-namedlocale "de_DE.ISO8859-15" }
+// { dg-require-namedlocale "en_HK.ISO8859-1" }
+// { dg-require-namedlocale "es_ES.ISO8859-15" }
+// { dg-require-namedlocale "fr_FR.ISO8859-15" }
+// { dg-require-namedlocale "ja_JP.eucJP" }
// 2001-08-15 Benjamin Kosnik <bkoz@redhat.com>
@@ -81,6 +81,6 @@ int main()
two.push_back(&test08);
two.push_back(&test09);
two.push_back(&test10);
- run_tests_wrapped_locale("ja_JP.eucjp", two);
+ run_tests_wrapped_locale("ja_JP.eucJP", two);
return 0;
}
diff --git a/libstdc++-v3/testsuite/26_numerics/headers/cstdlib/13943.cc b/libstdc++-v3/testsuite/26_numerics/headers/cstdlib/13943.cc
index 33f80008c0a..50c6b328355 100644
--- a/libstdc++-v3/testsuite/26_numerics/headers/cstdlib/13943.cc
+++ b/libstdc++-v3/testsuite/26_numerics/headers/cstdlib/13943.cc
@@ -19,7 +19,7 @@
#include <cstdlib>
#include <testsuite_hooks.h>
-#if _GLIBCXX_USE_C99
+#if _GLIBCXX_USE_C99_STDLIB
// libstdc++/13943
void test01()
{
@@ -36,7 +36,7 @@ void test01()
int main()
{
-#if _GLIBCXX_USE_C99
+#if _GLIBCXX_USE_C99_STDLIB
test01();
#endif
return 0;
diff --git a/libstdc++-v3/testsuite/26_numerics/headers/cstdlib/types_std_c++0x.cc b/libstdc++-v3/testsuite/26_numerics/headers/cstdlib/types_std_c++0x.cc
index 05110432e73..bfcbe9a3543 100644
--- a/libstdc++-v3/testsuite/26_numerics/headers/cstdlib/types_std_c++0x.cc
+++ b/libstdc++-v3/testsuite/26_numerics/headers/cstdlib/types_std_c++0x.cc
@@ -24,10 +24,10 @@
void test01()
{
-#if _GLIBCXX_USE_C99
+#if _GLIBCXX_USE_C99_STDLIB
typedef std::lldiv_t my_lldiv_t;
-
+
#endif
}
diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/imbue/char/13007.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/imbue/char/13007.cc
index 9f2b65bbeaf..2fbfae316af 100644
--- a/libstdc++-v3/testsuite/27_io/basic_filebuf/imbue/char/13007.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/imbue/char/13007.cc
@@ -1,4 +1,4 @@
-// { dg-require-namedlocale "fr_FR" }
+// { dg-require-namedlocale "fr_FR.ISO8859-15" }
// Copyright (C) 2003-2015 Free Software Foundation, Inc.
//
@@ -46,7 +46,7 @@ void test01()
bool test __attribute__((unused)) = true;
Buf buf;
- std::locale loc(std::locale("fr_FR"));
+ std::locale loc(std::locale(ISO_8859(15,fr_FR)));
buf.pubimbue(loc);
diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/imbue/char/13171-1.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/imbue/char/13171-1.cc
index db3c0745878..7647defecb7 100644
--- a/libstdc++-v3/testsuite/27_io/basic_filebuf/imbue/char/13171-1.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/imbue/char/13171-1.cc
@@ -1,4 +1,4 @@
-// { dg-require-namedlocale "en_US" }
+// { dg-require-namedlocale "en_US.ISO8859-1" }
// Copyright (C) 2003-2015 Free Software Foundation, Inc.
//
@@ -31,8 +31,8 @@ void test01()
filebuf fb;
- fb.pubimbue(locale("en_US"));
- fb.pubimbue(locale("en_US"));
+ fb.pubimbue(locale(ISO_8859(1,en_US)));
+ fb.pubimbue(locale(ISO_8859(1,en_US)));
fb.open("tmp_13171-1", ios_base::out);
fb.sputc('F');
diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/imbue/char/13171-2.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/imbue/char/13171-2.cc
index 3eef707b861..19ad9fb145d 100644
--- a/libstdc++-v3/testsuite/27_io/basic_filebuf/imbue/char/13171-2.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/imbue/char/13171-2.cc
@@ -1,5 +1,5 @@
-// { dg-require-namedlocale "fr_FR" }
-// { dg-require-namedlocale "en_US" }
+// { dg-require-namedlocale "fr_FR.ISO8859-15" }
+// { dg-require-namedlocale "en_US.ISO8859-1" }
// { dg-require-fork "" }
// { dg-require-mkfifo "" }
@@ -41,8 +41,8 @@ bool test01()
using namespace std;
using namespace __gnu_test;
- locale loc_fr(locale("fr_FR"));
- locale loc_en(locale("en_US"));
+ locale loc_fr(locale(ISO_8859(15,fr_FR)));
+ locale loc_en(locale(ISO_8859(1,en_US)));
const char* name = "tmp_fifo_13171-2";
unlink(name);
diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/imbue/char/13171-4.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/imbue/char/13171-4.cc
index 685302c9ab2..0d9cc8eea55 100644
--- a/libstdc++-v3/testsuite/27_io/basic_filebuf/imbue/char/13171-4.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/imbue/char/13171-4.cc
@@ -1,5 +1,5 @@
-// { dg-require-namedlocale "en_US" }
-// { dg-require-namedlocale "fr_FR" }
+// { dg-require-namedlocale "en_US.ISO8859-1" }
+// { dg-require-namedlocale "fr_FR.ISO8859-15" }
// Copyright (C) 2003-2015 Free Software Foundation, Inc.
//
@@ -41,9 +41,9 @@ void test01()
using namespace std;
filebuf fb;
- fb.pubimbue(locale(locale("en_US"), new Cvt));
+ fb.pubimbue(locale(locale(ISO_8859(1,en_US)), new Cvt));
fb.open("tmp_13171-4", ios_base::out);
- fb.pubimbue(locale("fr_FR"));
+ fb.pubimbue(locale(ISO_8859(15,fr_FR)));
fb.sputc('N');
fb.pubsync();
fb.close();
diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/imbue/char/13582-2.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/imbue/char/13582-2.cc
index fb2cd2aed94..165cba11147 100644
--- a/libstdc++-v3/testsuite/27_io/basic_filebuf/imbue/char/13582-2.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/imbue/char/13582-2.cc
@@ -1,5 +1,5 @@
-// { dg-require-namedlocale "en_US" }
-// { dg-require-namedlocale "fr_FR" }
+// { dg-require-namedlocale "en_US.ISO8859-1" }
+// { dg-require-namedlocale "fr_FR.ISO8859-15" }
// { dg-require-fork "" }
// { dg-require-mkfifo "" }
@@ -41,8 +41,8 @@ void test01()
using namespace std;
using namespace __gnu_test;
- locale loc_en(locale("en_US"));
- locale loc_fr(locale("fr_FR"));
+ locale loc_en(locale(ISO_8859(1,en_US)));
+ locale loc_fr(locale(ISO_8859(15,fr_FR)));
const char* name = "tmp_fifo_13582-2";
unlink(name);
diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/imbue/char/14975-1.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/imbue/char/14975-1.cc
index e5aae9ff85f..3a65a99b6fa 100644
--- a/libstdc++-v3/testsuite/27_io/basic_filebuf/imbue/char/14975-1.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/imbue/char/14975-1.cc
@@ -1,4 +1,4 @@
-// { dg-require-namedlocale "en_US" }
+// { dg-require-namedlocale "en_US.ISO8859-1" }
// 2004-04-16 Petur Runolfsson <peturr02@ru.is>
@@ -43,7 +43,7 @@ void test01()
bool test __attribute__((unused)) = true;
Buf fb;
- locale loc_us = locale("en_US");
+ locale loc_us = locale(ISO_8859(1,en_US));
fb.pubimbue(loc_us);
fb.open("tmp_14975-1", ios_base::out);
diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/imbue/char/2.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/imbue/char/2.cc
index 07776b8a1dc..d5bc14b05d8 100644
--- a/libstdc++-v3/testsuite/27_io/basic_filebuf/imbue/char/2.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/imbue/char/2.cc
@@ -1,4 +1,4 @@
-// { dg-require-namedlocale "de_DE" }
+// { dg-require-namedlocale "de_DE.ISO8859-15" }
// 2003-05-13 Benjamin Kosnik <bkoz@redhat.com>
@@ -43,7 +43,7 @@ void test02()
VERIFY( p != bad);
// According to 27.5.2.2.1, loc == getloc() after pubimbue(loc).
- locale loc_de = locale("de_DE");
+ locale loc_de = locale(ISO_8859(15,de_DE));
locale ret = ob.pubimbue(loc_de);
VERIFY( ob.getloc() == loc_de );
}
diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/imbue/char/9322.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/imbue/char/9322.cc
index 27abe85184b..27eecb33467 100644
--- a/libstdc++-v3/testsuite/27_io/basic_filebuf/imbue/char/9322.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/imbue/char/9322.cc
@@ -1,5 +1,5 @@
-// { dg-require-namedlocale "en_US" }
-// { dg-require-namedlocale "de_DE" }
+// { dg-require-namedlocale "en_US.ISO8859-1" }
+// { dg-require-namedlocale "de_DE.ISO8859-15" }
// 2001-05-21 Benjamin Kosnik <bkoz@redhat.com>
@@ -36,10 +36,10 @@ void test07()
std::filebuf ob;
VERIFY( ob.getloc() == loc );
- locale::global(locale("en_US"));
+ locale::global(locale(ISO_8859(1,en_US)));
VERIFY( ob.getloc() == loc );
- locale loc_de = locale("de_DE");
+ locale loc_de = locale(ISO_8859(15,de_DE));
locale ret = ob.pubimbue(loc_de);
VERIFY( ob.getloc() == loc_de );
VERIFY( ret == loc );
diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/imbue/wchar_t/13007.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/imbue/wchar_t/13007.cc
index 0502e912c27..9d33dfb5044 100644
--- a/libstdc++-v3/testsuite/27_io/basic_filebuf/imbue/wchar_t/13007.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/imbue/wchar_t/13007.cc
@@ -1,4 +1,4 @@
-// { dg-require-namedlocale "fr_FR" }
+// { dg-require-namedlocale "fr_FR.ISO8859-15" }
// Copyright (C) 2003-2015 Free Software Foundation, Inc.
//
@@ -46,7 +46,7 @@ void test01()
bool test __attribute__((unused)) = true;
Buf buf;
- std::locale loc(std::locale("fr_FR"));
+ std::locale loc(std::locale(ISO_8859(15,fr_FR)));
buf.pubimbue(loc);
diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/imbue/wchar_t/13171-3.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/imbue/wchar_t/13171-3.cc
index f71a385ce85..3ca37bad495 100644
--- a/libstdc++-v3/testsuite/27_io/basic_filebuf/imbue/wchar_t/13171-3.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/imbue/wchar_t/13171-3.cc
@@ -1,6 +1,6 @@
-// { dg-require-namedlocale "fr_FR" }
-// { dg-require-namedlocale "en_US" }
-// { dg-require-namedlocale "de_DE" }
+// { dg-require-namedlocale "fr_FR.ISO8859-15" }
+// { dg-require-namedlocale "en_US.ISO8859-1" }
+// { dg-require-namedlocale "de_DE.ISO8859-15" }
// Copyright (C) 2003-2015 Free Software Foundation, Inc.
//
@@ -31,19 +31,19 @@ void test01()
bool test __attribute__((unused)) = true;
using namespace std;
- locale::global(locale("fr_FR"));
+ locale::global(locale(ISO_8859(15,fr_FR)));
ios_base::sync_with_stdio(false);
- locale::global(locale("en_US"));
- cin.imbue(locale("en_US"));
- cout.imbue(locale("en_US"));
- cerr.imbue(locale("en_US"));
- clog.imbue(locale("de_DE"));
- wcin.imbue(locale("en_US"));
- wcout.imbue(locale("en_US"));
- wcerr.imbue(locale("en_US"));
- wclog.imbue(locale("de_DE"));
+ locale::global(locale(ISO_8859(1,en_US)));
+ cin.imbue(locale(ISO_8859(1,en_US)));
+ cout.imbue(locale(ISO_8859(1,en_US)));
+ cerr.imbue(locale(ISO_8859(1,en_US)));
+ clog.imbue(locale(ISO_8859(15,de_DE)));
+ wcin.imbue(locale(ISO_8859(1,en_US)));
+ wcout.imbue(locale(ISO_8859(1,en_US)));
+ wcerr.imbue(locale(ISO_8859(1,en_US)));
+ wclog.imbue(locale(ISO_8859(15,de_DE)));
cout << 'f' << endl;
cerr << 'r' << endl;
diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/imbue/wchar_t/13582-2.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/imbue/wchar_t/13582-2.cc
index cb44bdfc39d..5982f28d124 100644
--- a/libstdc++-v3/testsuite/27_io/basic_filebuf/imbue/wchar_t/13582-2.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/imbue/wchar_t/13582-2.cc
@@ -1,5 +1,5 @@
-// { dg-require-namedlocale "en_US" }
-// { dg-require-namedlocale "fr_FR" }
+// { dg-require-namedlocale "en_US.ISO8859-1" }
+// { dg-require-namedlocale "fr_FR.ISO8859-15" }
// { dg-require-fork "" }
// { dg-require-mkfifo "" }
@@ -41,8 +41,8 @@ void test01()
using namespace std;
using namespace __gnu_test;
- locale loc_en(locale("en_US"));
- locale loc_fr(locale("fr_FR"));
+ locale loc_en(locale(ISO_8859(1,en_US)));
+ locale loc_fr(locale(ISO_8859(15,fr_FR)));
const char* name = "tmp_fifo_13582-2";
unlink(name);
diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/imbue/wchar_t/13582-3.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/imbue/wchar_t/13582-3.cc
index 169f2409fed..2f46d9c0114 100644
--- a/libstdc++-v3/testsuite/27_io/basic_filebuf/imbue/wchar_t/13582-3.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/imbue/wchar_t/13582-3.cc
@@ -1,5 +1,5 @@
-// { dg-require-namedlocale "en_US" }
-// { dg-require-namedlocale "fr_FR" }
+// { dg-require-namedlocale "en_US.ISO8859-1" }
+// { dg-require-namedlocale "fr_FR.ISO8859-15" }
// 2004-01-11 Petur Runolfsson <peturr02@ru.is>
@@ -32,8 +32,8 @@ void test01()
bool test __attribute__((unused)) = true;
using namespace std;
- locale loc_en(locale("en_US"));
- locale loc_fr(locale("fr_FR"));
+ locale loc_en(locale(ISO_8859(1,en_US)));
+ locale loc_fr(locale(ISO_8859(15,fr_FR)));
const char* name = "tmp_13582-3.tst";
diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/imbue/wchar_t/14975-2.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/imbue/wchar_t/14975-2.cc
index b3b08ad38e4..85984b29f87 100644
--- a/libstdc++-v3/testsuite/27_io/basic_filebuf/imbue/wchar_t/14975-2.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/imbue/wchar_t/14975-2.cc
@@ -1,4 +1,4 @@
-// { dg-require-namedlocale "en_US" }
+// { dg-require-namedlocale "en_US.ISO8859-1" }
// { dg-require-fork "" }
// { dg-require-mkfifo "" }
@@ -42,7 +42,7 @@ bool test01()
using namespace __gnu_test;
bool test __attribute__((unused)) = true;
- locale loc_us = locale("en_US");
+ locale loc_us = locale(ISO_8859(1,en_US));
const char* name = "tmp_14975-2";
diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/imbue/wchar_t/2.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/imbue/wchar_t/2.cc
index 8c663da964e..3a6650d5d52 100644
--- a/libstdc++-v3/testsuite/27_io/basic_filebuf/imbue/wchar_t/2.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/imbue/wchar_t/2.cc
@@ -1,4 +1,4 @@
-// { dg-require-namedlocale "de_DE" }
+// { dg-require-namedlocale "de_DE.ISO8859-15" }
// 2003-05-13 Benjamin Kosnik <bkoz@redhat.com>
@@ -43,7 +43,7 @@ void test02()
VERIFY( p != bad);
// According to 27.5.2.2.1, p1, loc == getloc() after pubimbue(loc).
- locale loc_de = locale("de_DE");
+ locale loc_de = locale(ISO_8859(15,de_DE));
locale ret = ob.pubimbue(loc_de);
VERIFY( ob.getloc() == loc_de );
}
diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/imbue/wchar_t/9322.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/imbue/wchar_t/9322.cc
index 6b15839bf4d..9e17218883d 100644
--- a/libstdc++-v3/testsuite/27_io/basic_filebuf/imbue/wchar_t/9322.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/imbue/wchar_t/9322.cc
@@ -1,5 +1,5 @@
-// { dg-require-namedlocale "en_US" }
-// { dg-require-namedlocale "de_DE" }
+// { dg-require-namedlocale "en_US.ISO8859-1" }
+// { dg-require-namedlocale "de_DE.ISO8859-15" }
// 2001-05-21 Benjamin Kosnik <bkoz@redhat.com>
@@ -36,10 +36,10 @@ void test07()
std::wfilebuf ob;
VERIFY( ob.getloc() == loc );
- locale::global(locale("en_US"));
+ locale::global(locale(ISO_8859(1,en_US)));
VERIFY( ob.getloc() == loc );
- locale loc_de = locale("de_DE");
+ locale loc_de = locale(ISO_8859(15,de_DE));
locale ret = ob.pubimbue(loc_de);
VERIFY( ob.getloc() == loc_de );
VERIFY( ret == loc );
diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/underflow/wchar_t/9520.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/underflow/wchar_t/9520.cc
index 297bdcad7bd..6e3e56fa6ef 100644
--- a/libstdc++-v3/testsuite/27_io/basic_filebuf/underflow/wchar_t/9520.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/underflow/wchar_t/9520.cc
@@ -1,4 +1,4 @@
-// { dg-require-namedlocale "de_DE.ISO-8859-15@euro" }
+// { dg-require-namedlocale "de_DE.ISO8859-15" }
// 2003-05-03 Petur Runolfsson <peturr02@ru.is>
@@ -36,7 +36,7 @@ void test01()
putc(static_cast<unsigned char>(i), file);
fclose(file);
- locale loc (locale("de_DE.ISO-8859-15@euro"));
+ locale loc (locale(ISO_8859(15,de_DE)));
wchar_t buf[1];
wfilebuf fb;
fb.pubimbue(loc);
diff --git a/libstdc++-v3/testsuite/27_io/basic_ios/copyfmt/char/2.cc b/libstdc++-v3/testsuite/27_io/basic_ios/copyfmt/char/2.cc
index 61cf9fe312c..d7cd719d820 100644
--- a/libstdc++-v3/testsuite/27_io/basic_ios/copyfmt/char/2.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_ios/copyfmt/char/2.cc
@@ -1,4 +1,4 @@
-// { dg-require-namedlocale "de_DE" }
+// { dg-require-namedlocale "de_DE.ISO8859-15" }
// 1999-09-20 bkoz
@@ -36,7 +36,7 @@ void test03()
typedef std::ios_base::fmtflags fmtflags;
typedef std::ios_base::iostate iostate;
locale loc_c = locale::classic();
- locale loc_de = locale("de_DE");
+ locale loc_de = locale(ISO_8859(15,de_DE));
std::ios ios_01(0);
std::ios ios_02(0);
ios_01.imbue(loc_c);
diff --git a/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_arithmetic/char/2.cc b/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_arithmetic/char/2.cc
index 666b672d3a8..306cd60d436 100644
--- a/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_arithmetic/char/2.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_arithmetic/char/2.cc
@@ -1,4 +1,4 @@
-// { dg-require-namedlocale "de_DE" }
+// { dg-require-namedlocale "de_DE.ISO8859-15" }
// 1999-11-15 Kevin Ediger <kediger@licor.com>
// test the floating point inserters (facet num_put)
@@ -42,7 +42,7 @@ test02()
os2.setf(ios::fixed);
// Check it can be done in a locale with grouping on.
- locale loc2 = locale("de_DE");
+ locale loc2 = locale(ISO_8859(15,de_DE));
os2.imbue(loc2);
os2 << fixed << setprecision(3) << val2 << endl;
os2 << endl;
diff --git a/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_arithmetic/wchar_t/2.cc b/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_arithmetic/wchar_t/2.cc
index da1e13d0120..a88d4811c20 100644
--- a/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_arithmetic/wchar_t/2.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_arithmetic/wchar_t/2.cc
@@ -1,4 +1,4 @@
-// { dg-require-namedlocale "de_DE" }
+// { dg-require-namedlocale "de_DE.ISO8859-15" }
// Copyright (C) 2005-2015 Free Software Foundation, Inc.
//
@@ -39,7 +39,7 @@ test02()
os2.setf(wios::fixed);
// Check it can be done in a locale with grouping on.
- locale loc2 = locale("de_DE");
+ locale loc2 = locale(ISO_8859(15,de_DE));
os2.imbue(loc2);
os2 << fixed << setprecision(3) << val2 << endl;
os2 << endl;
diff --git a/libstdc++-v3/testsuite/27_io/basic_streambuf/cons/57394.cc b/libstdc++-v3/testsuite/27_io/basic_streambuf/cons/57394.cc
index afea72c7176..624fe727298 100644
--- a/libstdc++-v3/testsuite/27_io/basic_streambuf/cons/57394.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_streambuf/cons/57394.cc
@@ -16,7 +16,7 @@
// <http://www.gnu.org/licenses/>.
// { dg-options "-std=gnu++11" }
-// { dg-require-namedlocale "de_DE" }
+// { dg-require-namedlocale "de_DE.ISO8859-15" }
// 27.6.3 template class basic_streambuf
@@ -105,7 +105,7 @@ void streambuf::test_swap() const
int main()
{
- std::locale loc("de_DE");
+ std::locale loc(ISO_8859(15,de_DE));
streambuf s(loc);
s.test_copy();
s.test_assign();
diff --git a/libstdc++-v3/testsuite/27_io/basic_streambuf/imbue/char/13007-2.cc b/libstdc++-v3/testsuite/27_io/basic_streambuf/imbue/char/13007-2.cc
index f7b069a97e3..6567615b021 100644
--- a/libstdc++-v3/testsuite/27_io/basic_streambuf/imbue/char/13007-2.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_streambuf/imbue/char/13007-2.cc
@@ -1,4 +1,4 @@
-// { dg-require-namedlocale "en_US" }
+// { dg-require-namedlocale "en_US.ISO8859-1" }
// Copyright (C) 2003-2015 Free Software Foundation, Inc.
//
@@ -46,7 +46,7 @@ void test02()
bool test __attribute__((unused)) = true;
Buf2 buf;
- std::locale loc(std::locale("en_US"));
+ std::locale loc(std::locale(ISO_8859(1,en_US)));
buf.pubimbue(loc);
diff --git a/libstdc++-v3/testsuite/27_io/basic_streambuf/imbue/char/9322.cc b/libstdc++-v3/testsuite/27_io/basic_streambuf/imbue/char/9322.cc
index 70a65f4982a..00e89322e9a 100644
--- a/libstdc++-v3/testsuite/27_io/basic_streambuf/imbue/char/9322.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_streambuf/imbue/char/9322.cc
@@ -1,5 +1,5 @@
-// { dg-require-namedlocale "en_US" }
-// { dg-require-namedlocale "de_DE" }
+// { dg-require-namedlocale "en_US.ISO8859-1" }
+// { dg-require-namedlocale "de_DE.ISO8859-15" }
// 1999-10-11 bkoz
@@ -45,10 +45,10 @@ void test08()
testbuf ob;
VERIFY( ob.getloc() == loc );
- locale::global(locale("en_US"));
+ locale::global(locale(ISO_8859(1,en_US)));
VERIFY( ob.getloc() == loc );
- locale loc_de = locale("de_DE");
+ locale loc_de = locale(ISO_8859(15,de_DE));
locale ret = ob.pubimbue(loc_de);
VERIFY( ob.getloc() == loc_de );
VERIFY( ret == loc );
diff --git a/libstdc++-v3/testsuite/27_io/basic_streambuf/imbue/wchar_t/13007-2.cc b/libstdc++-v3/testsuite/27_io/basic_streambuf/imbue/wchar_t/13007-2.cc
index 87293b0977c..56176c1a853 100644
--- a/libstdc++-v3/testsuite/27_io/basic_streambuf/imbue/wchar_t/13007-2.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_streambuf/imbue/wchar_t/13007-2.cc
@@ -1,4 +1,4 @@
-// { dg-require-namedlocale "en_US" }
+// { dg-require-namedlocale "en_US.ISO8859-1" }
// Copyright (C) 2003-2015 Free Software Foundation, Inc.
//
@@ -46,7 +46,7 @@ void test02()
bool test __attribute__((unused)) = true;
Buf2 buf;
- std::locale loc(std::locale("en_US"));
+ std::locale loc(std::locale(ISO_8859(1,en_US)));
buf.pubimbue(loc);
diff --git a/libstdc++-v3/testsuite/27_io/basic_streambuf/imbue/wchar_t/9322.cc b/libstdc++-v3/testsuite/27_io/basic_streambuf/imbue/wchar_t/9322.cc
index 23528cecade..f5f5cd89e9e 100644
--- a/libstdc++-v3/testsuite/27_io/basic_streambuf/imbue/wchar_t/9322.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_streambuf/imbue/wchar_t/9322.cc
@@ -1,5 +1,5 @@
-// { dg-require-namedlocale "en_US" }
-// { dg-require-namedlocale "de_DE" }
+// { dg-require-namedlocale "en_US.ISO8859-1" }
+// { dg-require-namedlocale "de_DE.ISO8859-15" }
// 1999-10-11 bkoz
@@ -45,10 +45,10 @@ void test08()
testbuf ob;
VERIFY( ob.getloc() == loc );
- locale::global(locale("en_US"));
+ locale::global(locale(ISO_8859(1,en_US)));
VERIFY( ob.getloc() == loc );
- locale loc_de = locale("de_DE");
+ locale loc_de = locale(ISO_8859(15,de_DE));
locale ret = ob.pubimbue(loc_de);
VERIFY( ob.getloc() == loc_de );
VERIFY( ret == loc );
diff --git a/libstdc++-v3/testsuite/27_io/basic_stringbuf/imbue/char/9322.cc b/libstdc++-v3/testsuite/27_io/basic_stringbuf/imbue/char/9322.cc
index 9770cb63901..e2ac91afb64 100644
--- a/libstdc++-v3/testsuite/27_io/basic_stringbuf/imbue/char/9322.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_stringbuf/imbue/char/9322.cc
@@ -1,5 +1,5 @@
-// { dg-require-namedlocale "en_US" }
-// { dg-require-namedlocale "de_DE" }
+// { dg-require-namedlocale "en_US.ISO8859-1" }
+// { dg-require-namedlocale "de_DE.ISO8859-15" }
// 2001-05-21 Benjamin Kosnik <bkoz@redhat.com>
@@ -35,10 +35,10 @@ void test03()
std::stringbuf ob;
VERIFY( ob.getloc() == loc );
- locale::global(locale("en_US"));
+ locale::global(locale(ISO_8859(1,en_US)));
VERIFY( ob.getloc() == loc );
- locale loc_de = locale("de_DE");
+ locale loc_de = locale(ISO_8859(15,de_DE));
locale ret = ob.pubimbue(loc_de);
VERIFY( ob.getloc() == loc_de );
VERIFY( ret == loc );
diff --git a/libstdc++-v3/testsuite/27_io/basic_stringbuf/imbue/wchar_t/9322.cc b/libstdc++-v3/testsuite/27_io/basic_stringbuf/imbue/wchar_t/9322.cc
index ca5b4995b5b..ae32971c05b 100644
--- a/libstdc++-v3/testsuite/27_io/basic_stringbuf/imbue/wchar_t/9322.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_stringbuf/imbue/wchar_t/9322.cc
@@ -1,5 +1,5 @@
-// { dg-require-namedlocale "en_US" }
-// { dg-require-namedlocale "de_DE" }
+// { dg-require-namedlocale "en_US.ISO8859-1" }
+// { dg-require-namedlocale "de_DE.ISO8859-15" }
// 2001-05-21 Benjamin Kosnik <bkoz@redhat.com>
@@ -35,10 +35,10 @@ void test03()
std::wstringbuf ob;
VERIFY( ob.getloc() == loc );
- locale::global(locale("en_US"));
+ locale::global(locale(ISO_8859(1,en_US)));
VERIFY( ob.getloc() == loc );
- locale loc_de = locale("de_DE");
+ locale loc_de = locale(ISO_8859(15,de_DE));
locale ret = ob.pubimbue(loc_de);
VERIFY( ob.getloc() == loc_de );
VERIFY( ret == loc );
diff --git a/libstdc++-v3/testsuite/27_io/ios_base/types/fmtflags/case_label.cc b/libstdc++-v3/testsuite/27_io/ios_base/types/fmtflags/case_label.cc
index 591e3714366..e8820c5e84a 100644
--- a/libstdc++-v3/testsuite/27_io/ios_base/types/fmtflags/case_label.cc
+++ b/libstdc++-v3/testsuite/27_io/ios_base/types/fmtflags/case_label.cc
@@ -70,5 +70,9 @@ case_labels(bitmask_type b)
break;
case std::_S_ios_fmtflags_end:
break;
+ case std::_S_ios_fmtflags_min:
+ break;
+ case std::_S_ios_fmtflags_max:
+ break;
}
}
diff --git a/libstdc++-v3/testsuite/27_io/ios_base/types/iostate/case_label.cc b/libstdc++-v3/testsuite/27_io/ios_base/types/iostate/case_label.cc
index 44fb44e7a8a..4e4e4f5e623 100644
--- a/libstdc++-v3/testsuite/27_io/ios_base/types/iostate/case_label.cc
+++ b/libstdc++-v3/testsuite/27_io/ios_base/types/iostate/case_label.cc
@@ -42,5 +42,9 @@ case_labels(bitmask_type b)
break;
case std::_S_ios_iostate_end:
break;
+ case std::_S_ios_iostate_min:
+ break;
+ case std::_S_ios_iostate_max:
+ break;
}
}
diff --git a/libstdc++-v3/testsuite/27_io/ios_base/types/openmode/case_label.cc b/libstdc++-v3/testsuite/27_io/ios_base/types/openmode/case_label.cc
index 267f8a228b4..8c6672f65ce 100644
--- a/libstdc++-v3/testsuite/27_io/ios_base/types/openmode/case_label.cc
+++ b/libstdc++-v3/testsuite/27_io/ios_base/types/openmode/case_label.cc
@@ -46,5 +46,9 @@ case_labels(bitmask_type b)
break;
case std::_S_ios_openmode_end:
break;
+ case std::_S_ios_openmode_min:
+ break;
+ case std::_S_ios_openmode_max:
+ break;
}
}
diff --git a/libstdc++-v3/testsuite/27_io/manipulators/extended/get_money/char/1.cc b/libstdc++-v3/testsuite/27_io/manipulators/extended/get_money/char/1.cc
index 4347557b06e..8514eaefd7b 100644
--- a/libstdc++-v3/testsuite/27_io/manipulators/extended/get_money/char/1.cc
+++ b/libstdc++-v3/testsuite/27_io/manipulators/extended/get_money/char/1.cc
@@ -1,5 +1,5 @@
// { dg-options "-std=gnu++11" }
-// { dg-require-namedlocale "de_DE@euro" }
+// { dg-require-namedlocale "de_DE.ISO8859-1" }
// 2010-03-01 Paolo Carlini <paolo.carlini@oracle.com>
@@ -28,7 +28,7 @@ void test01()
{
bool test __attribute__((unused)) = true;
- std::locale loc_de = std::locale("de_DE@euro");
+ std::locale loc_de = std::locale(ISO_8859(15,de_DE));
std::istringstream iss;
iss.imbue(loc_de);
diff --git a/libstdc++-v3/testsuite/27_io/manipulators/extended/get_money/wchar_t/1.cc b/libstdc++-v3/testsuite/27_io/manipulators/extended/get_money/wchar_t/1.cc
index 054dea9e4aa..ee54d3fc733 100644
--- a/libstdc++-v3/testsuite/27_io/manipulators/extended/get_money/wchar_t/1.cc
+++ b/libstdc++-v3/testsuite/27_io/manipulators/extended/get_money/wchar_t/1.cc
@@ -1,5 +1,5 @@
// { dg-options "-std=gnu++11" }
-// { dg-require-namedlocale "de_DE@euro" }
+// { dg-require-namedlocale "de_DE.ISO8859-15" }
// 2010-03-01 Paolo Carlini <paolo.carlini@oracle.com>
@@ -28,7 +28,7 @@ void test01()
{
bool test __attribute__((unused)) = true;
- std::locale loc_de = std::locale("de_DE@euro");
+ std::locale loc_de = std::locale(ISO_8859(15,de_DE));
std::wistringstream iss;
iss.imbue(loc_de);
diff --git a/libstdc++-v3/testsuite/27_io/manipulators/extended/get_time/char/2.cc b/libstdc++-v3/testsuite/27_io/manipulators/extended/get_time/char/2.cc
index 527278fbca7..ecf097e23b7 100644
--- a/libstdc++-v3/testsuite/27_io/manipulators/extended/get_time/char/2.cc
+++ b/libstdc++-v3/testsuite/27_io/manipulators/extended/get_time/char/2.cc
@@ -1,4 +1,4 @@
-// { dg-require-namedlocale "de_DE.utf8" }
+// { dg-require-namedlocale "de_DE.UTF-8" }
// { dg-options " -std=gnu++11 " }
// 2014-04-14 Rรผdiger Sonderfeld <ruediger@c-plusplus.de>
@@ -32,7 +32,7 @@ void test01()
using namespace std;
bool test __attribute__((unused)) = true;
locale loc_c = locale::classic();
- locale loc_de = locale("de_DE.utf8");
+ locale loc_de = locale("de_DE.UTF-8");
VERIFY( loc_de != loc_c );
istringstream iss;
iss.imbue(loc_de);
diff --git a/libstdc++-v3/testsuite/27_io/manipulators/extended/get_time/wchar_t/2.cc b/libstdc++-v3/testsuite/27_io/manipulators/extended/get_time/wchar_t/2.cc
index ec109605f7d..cf8dd1c170e 100644
--- a/libstdc++-v3/testsuite/27_io/manipulators/extended/get_time/wchar_t/2.cc
+++ b/libstdc++-v3/testsuite/27_io/manipulators/extended/get_time/wchar_t/2.cc
@@ -1,4 +1,4 @@
-// { dg-require-namedlocale "de_DE.utf8" }
+// { dg-require-namedlocale "de_DE.UTF-8" }
// { dg-options " -std=gnu++11 " }
// 2014-04-14 Rรผdiger Sonderfeld <ruediger@c-plusplus.de>
@@ -33,7 +33,7 @@ void test01()
using namespace std;
bool test __attribute__((unused)) = true;
locale loc_c = locale::classic();
- locale loc_de = locale("de_DE.utf8");
+ locale loc_de = locale("de_DE.UTF-8");
VERIFY( loc_de != loc_c );
wistringstream iss;
iss.imbue(loc_de);
diff --git a/libstdc++-v3/testsuite/27_io/manipulators/extended/put_money/char/1.cc b/libstdc++-v3/testsuite/27_io/manipulators/extended/put_money/char/1.cc
index e01ccba09d4..b4e20928435 100644
--- a/libstdc++-v3/testsuite/27_io/manipulators/extended/put_money/char/1.cc
+++ b/libstdc++-v3/testsuite/27_io/manipulators/extended/put_money/char/1.cc
@@ -1,5 +1,5 @@
// { dg-options "-std=gnu++11" }
-// { dg-require-namedlocale "de_DE@euro" }
+// { dg-require-namedlocale "de_DE.ISO8859-15" }
// 2010-03-01 Paolo Carlini <paolo.carlini@oracle.com>
@@ -28,7 +28,7 @@ void test01()
{
bool test __attribute__((unused)) = true;
- std::locale loc_de = std::locale("de_DE@euro");
+ std::locale loc_de = std::locale(ISO_8859(15,de_DE));
std::ostringstream oss;
oss.imbue(loc_de);
diff --git a/libstdc++-v3/testsuite/27_io/manipulators/extended/put_money/wchar_t/1.cc b/libstdc++-v3/testsuite/27_io/manipulators/extended/put_money/wchar_t/1.cc
index f39e854164e..d67570ab350 100644
--- a/libstdc++-v3/testsuite/27_io/manipulators/extended/put_money/wchar_t/1.cc
+++ b/libstdc++-v3/testsuite/27_io/manipulators/extended/put_money/wchar_t/1.cc
@@ -1,5 +1,5 @@
// { dg-options "-std=gnu++11" }
-// { dg-require-namedlocale "de_DE@euro" }
+// { dg-require-namedlocale "de_DE.ISO8859-15" }
// 2010-03-01 Paolo Carlini <paolo.carlini@oracle.com>
@@ -28,7 +28,7 @@ void test01()
{
bool test __attribute__((unused)) = true;
- std::locale loc_de = std::locale("de_DE@euro");
+ std::locale loc_de = std::locale(ISO_8859(15,de_DE));
std::wostringstream oss;
oss.imbue(loc_de);
diff --git a/libstdc++-v3/testsuite/27_io/manipulators/extended/put_time/char/2.cc b/libstdc++-v3/testsuite/27_io/manipulators/extended/put_time/char/2.cc
index 25cf6c46b79..82a92e31e47 100644
--- a/libstdc++-v3/testsuite/27_io/manipulators/extended/put_time/char/2.cc
+++ b/libstdc++-v3/testsuite/27_io/manipulators/extended/put_time/char/2.cc
@@ -1,4 +1,4 @@
-// { dg-require-namedlocale "de_DE.utf8" }
+// { dg-require-namedlocale "de_DE.UTF-8" }
// { dg-options " -std=gnu++11 " }
// 2014-04-14 Rรผdiger Sonderfeld <ruediger@c-plusplus.de>
@@ -32,7 +32,7 @@ void test01()
using namespace std;
bool test __attribute__((unused)) = true;
locale loc_c = locale::classic();
- locale loc_de = locale("de_DE.utf8");
+ locale loc_de = locale("de_DE.UTF-8");
VERIFY( loc_de != loc_c );
ostringstream oss;
oss.imbue(loc_de);
diff --git a/libstdc++-v3/testsuite/27_io/manipulators/extended/put_time/wchar_t/2.cc b/libstdc++-v3/testsuite/27_io/manipulators/extended/put_time/wchar_t/2.cc
index 44521fc5ed0..dafa83580a7 100644
--- a/libstdc++-v3/testsuite/27_io/manipulators/extended/put_time/wchar_t/2.cc
+++ b/libstdc++-v3/testsuite/27_io/manipulators/extended/put_time/wchar_t/2.cc
@@ -1,4 +1,4 @@
-// { dg-require-namedlocale "de_DE.utf8" }
+// { dg-require-namedlocale "de_DE.UTF-8" }
// { dg-options " -std=gnu++11 " }
// 2014-04-14 Rรผdiger Sonderfeld <ruediger@c-plusplus.de>
@@ -32,7 +32,7 @@ void test01()
using namespace std;
bool test __attribute__((unused)) = true;
locale loc_c = locale::classic();
- locale loc_de = locale("de_DE.utf8");
+ locale loc_de = locale("de_DE.UTF-8");
VERIFY( loc_de != loc_c );
wostringstream oss;
oss.imbue(loc_de);
diff --git a/libstdc++-v3/testsuite/27_io/objects/wchar_t/13582-1_xin.cc b/libstdc++-v3/testsuite/27_io/objects/wchar_t/13582-1_xin.cc
index 47a419f2e0d..4fd1bfae023 100644
--- a/libstdc++-v3/testsuite/27_io/objects/wchar_t/13582-1_xin.cc
+++ b/libstdc++-v3/testsuite/27_io/objects/wchar_t/13582-1_xin.cc
@@ -36,13 +36,13 @@ void test01()
if (wcin.get(c) && !isspace(c, wcin.getloc()))
{
str.push_back(c);
- wcin.imbue(locale("en_US"));
+ wcin.imbue(locale(ISO_8859(1,en_US)));
}
if (wcin.get(c) && !isspace(c, wcin.getloc()))
{
str.push_back(c);
- wcin.imbue(locale("fr_FR"));
+ wcin.imbue(locale(ISO_8859(15,fr_FR)));
}
while (wcin.get(c) && !isspace(c, wcin.getloc()))
diff --git a/libstdc++-v3/testsuite/27_io/objects/wchar_t/9520.cc b/libstdc++-v3/testsuite/27_io/objects/wchar_t/9520.cc
index e2412e4996c..94d3415bc9b 100644
--- a/libstdc++-v3/testsuite/27_io/objects/wchar_t/9520.cc
+++ b/libstdc++-v3/testsuite/27_io/objects/wchar_t/9520.cc
@@ -1,4 +1,4 @@
-// { dg-require-namedlocale "de_DE.ISO-8859-15@euro" }
+// { dg-require-namedlocale "de_DE.ISO8859-15" }
// 2003-04-30 Petur Runolfsson <peturr02@ru.is>
@@ -35,7 +35,7 @@ void test01()
putc(static_cast<unsigned char>(i), file);
fclose(file);
- locale loc (locale("de_DE.ISO-8859-15@euro"));
+ locale loc (locale(ISO_8859(15,de_DE)));
locale::global(loc); // Set locale for stdin
VERIFY( freopen(name, "r", stdin) );
diff --git a/libstdc++-v3/testsuite/30_threads/this_thread/60421.cc b/libstdc++-v3/testsuite/30_threads/this_thread/60421.cc
index ecc4deb4a0f..5dbf257ac58 100644
--- a/libstdc++-v3/testsuite/30_threads/this_thread/60421.cc
+++ b/libstdc++-v3/testsuite/30_threads/this_thread/60421.cc
@@ -15,12 +15,19 @@
// with this library; see the file COPYING3. If not see
// <http://www.gnu.org/licenses/>.
-// { dg-options "-std=gnu++11" }
+// { dg-do run { target *-*-freebsd* *-*-dragonfly* *-*-netbsd* *-*-linux* *-*-gnu* *-*-solaris* *-*-cygwin *-*-rtems* *-*-darwin* powerpc-ibm-aix* } }
+// { dg-options " -std=gnu++11 -pthread" { target *-*-freebsd* *-*-dragonfly* *-*-netbsd* *-*-linux* *-*-gnu* powerpc-ibm-aix* } }
+// { dg-options " -std=gnu++11 -pthreads" { target *-*-solaris* } }
+// { dg-options " -std=gnu++11 " { target *-*-cygwin *-*-rtems* *-*-darwin* } }
// { dg-require-cstdint "" }
+// { dg-require-gthreads "" }
// { dg-require-time "" }
#include <thread>
#include <chrono>
+#include <atomic>
+#include <cstdint>
+#include <signal.h>
#include <testsuite_hooks.h>
void
@@ -28,11 +35,64 @@ test01()
{
std::this_thread::sleep_for(std::chrono::seconds(0));
std::this_thread::sleep_for(std::chrono::seconds(-1));
- std::this_thread::sleep_for(std::chrono::duration<uint64_t>::zero());
+ std::this_thread::sleep_for(std::chrono::duration<std::uint64_t>::zero());
+}
+
+void
+test02()
+{
+ bool test __attribute__((unused)) = true;
+
+ // test interruption of this_thread::sleep_for() by a signal
+ struct sigaction sa{ };
+ sa.sa_handler = +[](int) { };
+ sigaction(SIGUSR1, &sa, 0);
+ bool result = false;
+ std::atomic<bool> sleeping{false};
+ std::thread t([&result, &sleeping] {
+ auto start = std::chrono::system_clock::now();
+ auto time = std::chrono::seconds(3);
+ sleeping = true;
+ std::this_thread::sleep_for(time);
+ result = std::chrono::system_clock::now() >= (start + time);
+ });
+ while (!sleeping) { }
+ std::this_thread::sleep_for(std::chrono::milliseconds(500));
+ pthread_kill(t.native_handle(), SIGUSR1);
+ t.join();
+ VERIFY( result );
+}
+
+struct slow_clock
+{
+ using rep = std::chrono::system_clock::rep;
+ using period = std::chrono::system_clock::period;
+ using duration = std::chrono::system_clock::duration;
+ using time_point = std::chrono::time_point<slow_clock, duration>;
+ static constexpr bool is_steady = false;
+
+ static time_point now()
+ {
+ auto real = std::chrono::system_clock::now();
+ return time_point{real.time_since_epoch() / 2};
+ }
+};
+
+void
+test03()
+{
+ bool test __attribute__((unused)) = true;
+
+ // test that this_thread::sleep_until() handles clock adjustments
+ auto when = slow_clock::now() + std::chrono::seconds(2);
+ std::this_thread::sleep_until(when);
+ VERIFY( slow_clock::now() >= when );
}
int
main()
{
test01();
+ test02();
+ test03();
}
diff --git a/libstdc++-v3/testsuite/experimental/memory/shared_ptr/assign/assign.cc b/libstdc++-v3/testsuite/experimental/memory/shared_ptr/assign/assign.cc
new file mode 100644
index 00000000000..7656c98c327
--- /dev/null
+++ b/libstdc++-v3/testsuite/experimental/memory/shared_ptr/assign/assign.cc
@@ -0,0 +1,120 @@
+// { dg-options "-std=gnu++1y" }
+
+// Copyright (C) 2015 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING3. If not see
+// <http://www.gnu.org/licenses/>.
+
+// 8.2.1 Class template shared_ptr [memory.smartptr.shared]
+
+
+#include <experimental/memory>
+#include <testsuite_hooks.h>
+
+struct A
+{
+ A() { ++ctor_count; }
+ virtual ~A() { ++dtor_count; }
+ static long ctor_count;
+ static long dtor_count;
+};
+long A::ctor_count = 0;
+long A::dtor_count = 0;
+
+struct B : A
+{
+ B() { ++ctor_count; }
+ virtual ~B() { ++dtor_count; }
+ static long ctor_count;
+ static long dtor_count;
+};
+long B::ctor_count = 0;
+long B::dtor_count = 0;
+
+struct reset_count_struct
+{
+ ~reset_count_struct()
+ {
+ A::ctor_count = 0;
+ A::dtor_count = 0;
+ B::ctor_count = 0;
+ B::dtor_count = 0;
+ }
+};
+
+// C++14 ยง20.8.2.2.3 shared_ptr assignment
+
+void
+test01()
+{
+ reset_count_struct __attribute__((unused)) reset;
+ bool test __attribute__((unused)) = true;
+
+ std::experimental::shared_ptr<A[5]> a;
+ std::experimental::shared_ptr<A[]> a1;
+ std::experimental::shared_ptr<B[5]> a2;
+
+ a = std::experimental::shared_ptr<A[5]> ();
+ VERIFY( a.get() == 0 );
+ VERIFY( A::ctor_count == 0 );
+ VERIFY( A::dtor_count == 0 );
+ VERIFY( B::ctor_count == 0 );
+ VERIFY( B::dtor_count == 0 );
+
+ a = std::experimental::shared_ptr<A[5]> (new A[5]);
+ VERIFY( a.get() != 0 );
+ VERIFY( A::ctor_count == 5 );
+ VERIFY( A::dtor_count == 0 );
+ VERIFY( B::ctor_count == 0 );
+ VERIFY( B::dtor_count == 0 );
+
+ a1 = std::experimental::shared_ptr<A[5]> (new A[5]);
+ VERIFY( a1.get() != 0 );
+ VERIFY( A::ctor_count == 10 );
+ VERIFY( A::dtor_count == 0 );
+ VERIFY( B::ctor_count == 0 );
+ VERIFY( B::dtor_count == 0 );
+
+ a2 = std::experimental::shared_ptr<B[5]> (new B[5]);
+ VERIFY( a2.get() != 0 );
+ VERIFY( A::ctor_count == 15 );
+ VERIFY( A::dtor_count == 0 );
+ VERIFY( B::ctor_count == 5 );
+ VERIFY( B::dtor_count == 0 );
+}
+
+void
+test02()
+{
+ bool test __attribute__((unused)) = true;
+
+ std::experimental::shared_ptr<A[5]> p(new A[5]);
+ std::experimental::shared_ptr<A[5]> p1;
+ std::experimental::shared_ptr<A[]> p2;
+
+ p1 = p;
+ VERIFY( p.get() == p1.get() );
+
+ p2 = p1;
+ VERIFY( p1.get() == p2.get() );
+}
+
+int
+main()
+{
+ test01();
+ test02();
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/experimental/memory/shared_ptr/cast/cast.cc b/libstdc++-v3/testsuite/experimental/memory/shared_ptr/cast/cast.cc
new file mode 100644
index 00000000000..18c2ba4a4ec
--- /dev/null
+++ b/libstdc++-v3/testsuite/experimental/memory/shared_ptr/cast/cast.cc
@@ -0,0 +1,44 @@
+// { dg-options "-std=gnu++1y" }
+
+// Copyright (C) 2015 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING3. If not see
+// <http://www.gnu.org/licenses/>.
+
+// 8.2.1.3 shared_ptr casts [memory.smartptr.shared.cast]
+
+#include <experimental/memory>
+#include <testsuite_tr1.h>
+
+// { dg-do compile }
+
+struct A { };
+
+int
+main()
+{
+ using __gnu_test::check_ret_type;
+ using std::experimental::shared_ptr;
+ using std::experimental::static_pointer_cast;
+ using std::experimental::const_pointer_cast;
+ using std::experimental::dynamic_pointer_cast;
+
+ shared_ptr<A[5]> spa;
+ shared_ptr<const A[5]> spa1;
+
+ check_ret_type<shared_ptr<A[]> >(static_pointer_cast<A[]>(spa));
+ check_ret_type<shared_ptr<A[]> >(const_pointer_cast<A[]>(spa1));
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/experimental/memory/shared_ptr/comparison/comparison.cc b/libstdc++-v3/testsuite/experimental/memory/shared_ptr/comparison/comparison.cc
new file mode 100644
index 00000000000..52fc1934ed2
--- /dev/null
+++ b/libstdc++-v3/testsuite/experimental/memory/shared_ptr/comparison/comparison.cc
@@ -0,0 +1,84 @@
+// { dg-options "-std=gnu++1y" }
+
+// Copyright (C) 2015 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING3. If not see
+// <http://www.gnu.org/licenses/>.
+
+// 8.2.1 Class template shared_ptr [memory.smartptr.shared]
+
+#include <experimental/memory>
+#include <testsuite_hooks.h>
+
+struct A
+{
+ virtual ~A() { }
+};
+
+struct B : A
+{
+};
+
+// 20.8.2.2.7 shared_ptr comparison
+
+int
+test01()
+{
+ bool test __attribute__((unused)) = true;
+
+ // test empty shared_ptrs compare equivalent
+ std::experimental::shared_ptr<A[5]> p1;
+ std::experimental::shared_ptr<B[5]> p2;
+ VERIFY( p1 == p2 );
+ VERIFY( !(p1 != p2) );
+ VERIFY( !(p1 < p2) && !(p2 < p1) );
+ return 0;
+}
+
+int
+test02()
+{
+ bool test __attribute__((unused)) = true;
+
+ std::experimental::shared_ptr<A[5]> A_default;
+
+ std::experimental::shared_ptr<A[5]> A_from_A(new A[5]);
+ VERIFY( A_default != A_from_A );
+ VERIFY( !(A_default == A_from_A) );
+ VERIFY( (A_default < A_from_A) || (A_from_A < A_default) );
+
+ std::experimental::shared_ptr<B[5]> B_from_B(new B[5]);
+ VERIFY( B_from_B != A_from_A );
+ VERIFY( !(B_from_B == A_from_A) );
+ VERIFY( (B_from_B < A_from_A) || (A_from_A < B_from_B) );
+
+ A_from_A.reset();
+ VERIFY( A_default == A_from_A );
+ VERIFY( !(A_default != A_from_A) );
+ VERIFY( !(A_default < A_from_A) && !(A_from_A < A_default));
+
+ B_from_B.reset();
+ VERIFY( B_from_B == A_from_A );
+ VERIFY( !(B_from_B != A_from_A) );
+ VERIFY( !(B_from_B < A_from_A) && !(A_from_A < B_from_B) );
+
+ return 0;
+}
+
+int
+main()
+{
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/experimental/memory/shared_ptr/cons/alias_ctor.cc b/libstdc++-v3/testsuite/experimental/memory/shared_ptr/cons/alias_ctor.cc
new file mode 100644
index 00000000000..15d1de8e12a
--- /dev/null
+++ b/libstdc++-v3/testsuite/experimental/memory/shared_ptr/cons/alias_ctor.cc
@@ -0,0 +1,100 @@
+// { dg-options "-std=gnu++1y" }
+
+// Copyright (C) 2015 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING3. If not see
+// <http://www.gnu.org/licenses/>.
+
+// 8.2.1 Class template shared_ptr [memory.smartptr.shared]
+
+#include <experimental/memory>
+#include <testsuite_hooks.h>
+
+struct A
+{
+ A() : i() { }
+ virtual ~A() { }
+ int i;
+};
+
+struct B : A
+{
+ B() : A(), a() { }
+ virtual ~B() { }
+ A a;
+};
+
+// 8.2.1.1 shared_ptr constructors [memory.smartptr.shared.const]
+
+// Aliasing constructors
+
+void
+test01()
+{
+ bool test __attribute__((unused)) = true;
+
+ std::experimental::shared_ptr<A[5]> a;
+ std::experimental::shared_ptr<bool> b1(a, &test);
+ VERIFY( b1.use_count() == 0 );
+ VERIFY( a.get() == 0 );
+ VERIFY( b1.get() == &test );
+
+ std::experimental::shared_ptr<bool> b2(b1);
+ VERIFY( b2.use_count() == 0 );
+ VERIFY( b1.get() == b2.get() );
+}
+
+void
+test02()
+{
+ bool test __attribute__((unused)) = true;
+
+ std::experimental::shared_ptr<A[5]> a(new A[5]);
+ std::experimental::shared_ptr<int> i1(a, &a[0].i);
+ VERIFY( i1.use_count() == 2 );
+
+ std::experimental::shared_ptr<int> i2(i1);
+ VERIFY( i2.use_count() == 3 );
+ VERIFY( i2.get() == &a[0].i );
+}
+
+void
+test03()
+{
+ bool test __attribute__((unused)) = true;
+
+ std::experimental::shared_ptr<B> b(new B);
+ std::experimental::shared_ptr<A> a1(b, b.get());
+ std::experimental::shared_ptr<A> a2(b, &b->a);
+ VERIFY( a2.use_count() == 3 );
+ VERIFY( a1 == b );
+ VERIFY( a2 != b );
+ VERIFY( a1.get() != a2.get() );
+
+ std::experimental::shared_ptr<A> a3(a1);
+ VERIFY( a3 == b );
+
+ a3 = a2;
+ VERIFY( a3.get() == &b->a );
+}
+
+int
+main()
+{
+ test01();
+ test02();
+ test03();
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/experimental/memory/shared_ptr/cons/alloc_ctor.cc b/libstdc++-v3/testsuite/experimental/memory/shared_ptr/cons/alloc_ctor.cc
new file mode 100644
index 00000000000..12eb15ccef6
--- /dev/null
+++ b/libstdc++-v3/testsuite/experimental/memory/shared_ptr/cons/alloc_ctor.cc
@@ -0,0 +1,73 @@
+// { dg-options "-std=gnu++1y" }
+
+// Copyright (C) 2015 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING3. If not see
+// <http://www.gnu.org/licenses/>.
+
+// 8.2.1 Class template shared_ptr [memory.smartptr.shared]
+
+#include <experimental/memory>
+#include <testsuite_hooks.h>
+#include <testsuite_allocator.h>
+
+using __gnu_test::tracker_allocator_counter;
+using __gnu_test::tracker_allocator;
+
+struct A { };
+void deletefunc(A* p) { delete [] p; }
+struct D
+{
+ void operator()(A* p) { delete [] p; ++delete_count; }
+ static long delete_count;
+};
+long D::delete_count = 0;
+
+// 8.2.1.1 shared_ptr constructors [memory.smartptr.shared.const]
+
+// Construction with allocator
+
+int
+test01()
+{
+ bool test __attribute__((unused)) = true;
+ tracker_allocator_counter::reset();
+
+ std::experimental::shared_ptr<A[5]> p1(new A[5], deletefunc, tracker_allocator<A[5]>());
+ std::size_t const sz = tracker_allocator_counter::get_allocation_count();
+ VERIFY( sz > 0 );
+ {
+ std::experimental::shared_ptr<A[5]> p2(p1);
+ VERIFY( p2.use_count() == 2 );
+ VERIFY( tracker_allocator_counter::get_allocation_count() == sz );
+ VERIFY( tracker_allocator_counter::get_deallocation_count() == 0 );
+ }
+ VERIFY( p1.use_count() == 1 );
+ VERIFY( tracker_allocator_counter::get_allocation_count() == sz);
+ VERIFY( tracker_allocator_counter::get_deallocation_count() == 0 );
+ p1.reset();
+ VERIFY( p1.use_count() == 0 );
+ VERIFY( tracker_allocator_counter::get_allocation_count() == sz );
+ VERIFY( tracker_allocator_counter::get_deallocation_count() == sz );
+
+ return 0;
+}
+
+int
+main()
+{
+ test01();
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/experimental/memory/shared_ptr/cons/copy_ctor.cc b/libstdc++-v3/testsuite/experimental/memory/shared_ptr/cons/copy_ctor.cc
new file mode 100644
index 00000000000..4c3680ed156
--- /dev/null
+++ b/libstdc++-v3/testsuite/experimental/memory/shared_ptr/cons/copy_ctor.cc
@@ -0,0 +1,178 @@
+// { dg-options "-std=gnu++1y" }
+
+// Copyright (C) 2015 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING3. If not see
+// <http://www.gnu.org/licenses/>.
+
+// 8.2.1 Class template shared_ptr [memory.smartptr.shared]
+
+#include <experimental/memory>
+#include <testsuite_hooks.h>
+
+struct A
+{
+ A() { ++ctor_count; }
+ virtual ~A() { ++dtor_count; }
+ static long ctor_count;
+ static long dtor_count;
+};
+long A::ctor_count = 0;
+long A::dtor_count = 0;
+
+struct B : A
+{
+ B() { ++ctor_count; }
+ virtual ~B() { ++dtor_count; }
+ static long ctor_count;
+ static long dtor_count;
+};
+long B::ctor_count = 0;
+long B::dtor_count = 0;
+
+void deleter(A* p) { delete [] p; }
+
+struct reset_count_struct
+{
+ ~reset_count_struct()
+ {
+ A::ctor_count = 0;
+ A::dtor_count = 0;
+ B::ctor_count = 0;
+ B::dtor_count = 0;
+ }
+};
+
+// 8.2.1.1 shared_ptr constructors [memory.smartptr.shared.const]
+
+// Copy construction
+
+int
+test01()
+{
+ reset_count_struct __attribute__((unused)) reset;
+ bool test __attribute__((unused)) = true;
+
+ std::experimental::shared_ptr<A[5]> a1;
+ std::experimental::shared_ptr<A[5]> a2(a1);
+ VERIFY( a2.use_count() == 0 );
+ VERIFY( A::ctor_count == 0 );
+ VERIFY( A::dtor_count == 0 );
+ VERIFY( B::ctor_count == 0 );
+ VERIFY( B::dtor_count == 0 );
+
+ return 0;
+}
+
+int
+test02()
+{
+ reset_count_struct __attribute__((unused)) reset;
+ bool test __attribute__((unused)) = true;
+
+ std::experimental::shared_ptr<A[5]> a1(new A[5]);
+ std::experimental::shared_ptr<A[5]> a2(a1);
+ VERIFY( a2.use_count() == 2 );
+ VERIFY( A::ctor_count == 5 );
+ VERIFY( A::dtor_count == 0 );
+ VERIFY( B::ctor_count == 0 );
+ VERIFY( B::dtor_count == 0 );
+
+ return 0;
+}
+
+int
+test03()
+{
+ reset_count_struct __attribute__((unused)) reset;
+ bool test __attribute__((unused)) = true;
+
+ std::experimental::shared_ptr<A[5]> a1(new A[5], &deleter);
+ std::experimental::shared_ptr<A[5]> a2(a1);
+ VERIFY( a2.use_count() == 2 );
+ VERIFY( A::ctor_count == 5 );
+ VERIFY( A::dtor_count == 0 );
+ VERIFY( B::ctor_count == 0 );
+ VERIFY( B::dtor_count == 0 );
+
+ return 0;
+}
+
+int
+test04()
+{
+ reset_count_struct __attribute__((unused)) reset;
+ bool test __attribute__((unused)) = true;
+
+ std::experimental::shared_ptr<A[5]> a1(std::experimental::shared_ptr<A[5]>
+ (new A[5]));
+ VERIFY( a1.use_count() == 1 );
+ VERIFY( A::ctor_count == 5 );
+ VERIFY( A::dtor_count == 0 );
+ VERIFY( B::ctor_count == 0 );
+ VERIFY( B::dtor_count == 0 );
+
+ return 0;
+}
+
+int
+test05()
+{
+ reset_count_struct __attribute__((unused)) reset;
+ bool test __attribute__((unused)) = true;
+
+ std::experimental::shared_ptr<A[5]> a1(new A[5]);
+ std::experimental::shared_ptr<A[]> a2(a1);
+
+ VERIFY( a2.use_count() == 2 );
+ VERIFY( a2.get() == a1.get() );
+ VERIFY( A::ctor_count == 5 );
+ VERIFY( A::dtor_count == 0 );
+ VERIFY( B::ctor_count == 0 );
+ VERIFY( B::dtor_count == 0 );
+
+ return 0;
+}
+
+int
+test06()
+{
+ reset_count_struct __attribute__((unused)) reset;
+ bool test __attribute__((unused)) = true;
+
+ std::experimental::shared_ptr<B> a1(new B);
+ std::experimental::shared_ptr<A> a2(a1);
+
+ VERIFY( a2.use_count() == 2 );
+ VERIFY( a2.get() == a1.get() );
+ VERIFY( A::ctor_count == 1 );
+ VERIFY( A::dtor_count == 0 );
+ VERIFY( B::ctor_count == 1 );
+ VERIFY( B::dtor_count == 0 );
+
+ return 0;
+}
+
+int
+main()
+{
+ test01();
+ test02();
+ test03();
+ test04();
+ test05();
+ test06();
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/experimental/memory/shared_ptr/cons/copy_ctor_neg.cc b/libstdc++-v3/testsuite/experimental/memory/shared_ptr/cons/copy_ctor_neg.cc
new file mode 100644
index 00000000000..d3c94cf3405
--- /dev/null
+++ b/libstdc++-v3/testsuite/experimental/memory/shared_ptr/cons/copy_ctor_neg.cc
@@ -0,0 +1,59 @@
+// { dg-options "-std=gnu++1y" }
+
+// Copyright (C) 2015 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING3. If not see
+// <http://www.gnu.org/licenses/>.
+
+// 8.2.1 Class template shared_ptr [memory.smartptr.shared]
+
+
+#include <experimental/memory>
+#include <testsuite_hooks.h>
+
+
+struct A { virtual ~A() { } };
+struct B : A { };
+
+
+// 8.2.1.1 shared_ptr constructors [memory.smartptr.shared.const]
+
+// Copy construction
+
+void
+test01()
+{
+ bool test __attribute__((unused)) = true;
+
+ std::experimental::shared_ptr<A[3]> a;
+ a = std::experimental::shared_ptr<B[3]> (new B[3]); // { dg-excess-errors "no matching" }
+}
+
+void
+test02()
+{
+ bool test __attribute__((unused)) = true;
+
+ std::experimental::shared_ptr<A[]> a(new A[3]);
+ std::experimental::shared_ptr<A[2]> spa(a); // { dg-excess-errors "no matching" }
+}
+
+int
+main()
+{
+ test01();
+ test02();
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/experimental/memory/shared_ptr/cons/default_ctor.cc b/libstdc++-v3/testsuite/experimental/memory/shared_ptr/cons/default_ctor.cc
new file mode 100644
index 00000000000..794e86528c0
--- /dev/null
+++ b/libstdc++-v3/testsuite/experimental/memory/shared_ptr/cons/default_ctor.cc
@@ -0,0 +1,46 @@
+// { dg-options "-std=gnu++1y" }
+
+// Copyright (C) 2015 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING3. If not see
+// <http://www.gnu.org/licenses/>.
+
+// 8.2.1 Class template shared_ptr [memory.smartptr.shared]
+
+#include <experimental/memory>
+#include <testsuite_hooks.h>
+
+struct A { };
+
+// 8.2.1.1 shared_ptr constructors [memory.smartptr.shared.const]
+
+// Default construction
+int
+test01()
+{
+ bool test __attribute__((unused)) = true;
+
+ std::experimental::shared_ptr<A[5]> a;
+ VERIFY( a.get() == 0 );
+
+ return 0;
+}
+
+int
+main()
+{
+ test01();
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/experimental/memory/shared_ptr/cons/move_ctor.cc b/libstdc++-v3/testsuite/experimental/memory/shared_ptr/cons/move_ctor.cc
new file mode 100644
index 00000000000..3c070fe669e
--- /dev/null
+++ b/libstdc++-v3/testsuite/experimental/memory/shared_ptr/cons/move_ctor.cc
@@ -0,0 +1,146 @@
+// { dg-options "-std=gnu++1y" }
+
+// Copyright (C) 2015 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING3. If not see
+// <http://www.gnu.org/licenses/>.
+
+// 8.2.1 Class template shared_ptr [memory.smartptr.shared]
+
+#include <experimental/memory>
+#include <testsuite_hooks.h>
+
+struct A
+{
+ A() { ++ctor_count; }
+ virtual ~A() { ++dtor_count; }
+ static long ctor_count;
+ static long dtor_count;
+};
+long A::ctor_count = 0;
+long A::dtor_count = 0;
+
+struct D
+{
+ void operator()(A* p) const { delete [] p; ++delete_count; }
+ static long delete_count;
+};
+long D::delete_count = 0;
+
+struct reset_count_struct
+{
+ ~reset_count_struct()
+ {
+ A::ctor_count = 0;
+ A::dtor_count = 0;
+ D::delete_count = 0;
+ }
+};
+
+// 8.2.1.1 shared_ptr constructors [memory.smartptr.shared.const]
+
+// Rvalue construction
+int test01()
+{
+ reset_count_struct __attribute__((unused)) reset;
+ bool test __attribute__((unused)) = true;
+
+ std::experimental::shared_ptr<A[5]> a1;
+ std::experimental::shared_ptr<A[5]> a2(std::move(a1));
+ VERIFY( a1.use_count() == 0 );
+ VERIFY( a2.use_count() == 0 );
+ VERIFY( A::ctor_count == 0 );
+ VERIFY( A::dtor_count == 0 );
+
+ return 0;
+}
+
+int
+test02()
+{
+ reset_count_struct __attribute__((unused)) reset;
+ bool test __attribute__((unused)) = true;
+
+ std::experimental::shared_ptr<A[5]> a1(new A[5]);
+ std::experimental::shared_ptr<A[5]> a2(std::move(a1));
+ VERIFY( a2.use_count() == 1 );
+ VERIFY( A::ctor_count == 5 );
+ VERIFY( A::dtor_count == 0 );
+
+ return 0;
+}
+
+int
+test03()
+{
+ reset_count_struct __attribute__((unused)) reset;
+ bool test __attribute__((unused)) = true;
+
+ std::experimental::shared_ptr<A[5]> b(new A[5], D());
+ std::experimental::shared_ptr<A[5]> b1(std::move(b));
+ VERIFY( b.use_count() == 0 );
+ VERIFY( b1.use_count() == 1 );
+ VERIFY( A::ctor_count == 5 );
+ VERIFY( A::dtor_count == 0 );
+
+ b1 = std::move(std::experimental::shared_ptr<A[5]> ());
+
+ VERIFY( A::ctor_count == 5 );
+ VERIFY( A::dtor_count == 5 );
+ VERIFY( D::delete_count == 1 );
+
+ return 0;
+}
+
+void
+test04()
+{
+ reset_count_struct __attribute__((unused)) reset;
+ bool test __attribute__((unused)) = true;
+
+ std::experimental::shared_ptr<A[5]> a(std::move(std::experimental
+ ::shared_ptr<A[5]>
+ (new A[5])));
+
+ VERIFY( a.use_count() == 1 );
+ VERIFY( A::ctor_count == 5 );
+ VERIFY( A::dtor_count == 0 );
+}
+
+void
+test05()
+{
+ reset_count_struct __attribute__((unused)) reset;
+ bool test __attribute__((unused)) = true;
+
+ std::experimental::shared_ptr<A[]> a(std::move(std::experimental
+ ::shared_ptr<A[5]>
+ (new A[5])));
+
+ VERIFY( a.use_count() == 1 );
+ VERIFY( A::ctor_count == 5 );
+ VERIFY( A::dtor_count == 0 );
+}
+
+int
+main()
+{
+ test01();
+ test02();
+ test03();
+ test04();
+ test05();
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/experimental/memory/shared_ptr/cons/pointer_ctor.cc b/libstdc++-v3/testsuite/experimental/memory/shared_ptr/cons/pointer_ctor.cc
new file mode 100644
index 00000000000..d9ae591a41d
--- /dev/null
+++ b/libstdc++-v3/testsuite/experimental/memory/shared_ptr/cons/pointer_ctor.cc
@@ -0,0 +1,75 @@
+// { dg-options "-std=gnu++1y" }
+
+// Copyright (C) 2015 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING3. If not see
+// <http://www.gnu.org/licenses/>.
+
+// 8.2.1 Class template shared_ptr [memory.smartptr.shared]
+
+#include <experimental/memory>
+#include <testsuite_hooks.h>
+
+struct A { };
+struct B : A { };
+
+// 8.2.1.1 shared_ptr constructors [memory.smartptr.shared.const]
+
+// Construction from pointer
+int
+test01()
+{
+ bool test __attribute__((unused)) = true;
+
+ A * const a = 0;
+ std::experimental::shared_ptr<A> p(a);
+ VERIFY( p.get() == 0 );
+ VERIFY( p.use_count() == 1 );
+ return 0;
+}
+
+int
+test02()
+{
+ bool test __attribute__((unused)) = true;
+
+ A * const a = new A[5];
+ std::experimental::shared_ptr<A[5]> p(a);
+ VERIFY( p.get() == a );
+ VERIFY( p.use_count() == 1 );
+ return 0;
+}
+
+int
+test03()
+{
+ bool test __attribute__((unused)) = true;
+
+ B * const b = new B[5];
+ std::experimental::shared_ptr<A[5]> p(b);
+ VERIFY( p.get() == b );
+ VERIFY( p.use_count() == 1 );
+
+ return 0;
+}
+
+int
+main()
+{
+ test01();
+ test02();
+ test03();
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/experimental/memory/shared_ptr/cons/unique_ptr_ctor.cc b/libstdc++-v3/testsuite/experimental/memory/shared_ptr/cons/unique_ptr_ctor.cc
new file mode 100644
index 00000000000..35fb82f36bf
--- /dev/null
+++ b/libstdc++-v3/testsuite/experimental/memory/shared_ptr/cons/unique_ptr_ctor.cc
@@ -0,0 +1,60 @@
+// { dg-options "-std=gnu++1y" }
+
+// Copyright (C) 2015 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING3. If not see
+// <http://www.gnu.org/licenses/>.
+
+// 8.2.1 Class template shared_ptr [memory.smartptr.shared]
+
+#include <experimental/memory>
+#include <testsuite_hooks.h>
+
+int destroyed = 0;
+
+struct A : std::experimental::enable_shared_from_this<A>
+{
+ ~A() { ++destroyed; }
+};
+
+// 8.2.1.1 shared_ptr constructors [memory.smartptr.shared.const]
+
+// Construction from unique_ptr<A[]>
+
+int
+test01()
+{
+ bool test __attribute__((unused)) = true;
+
+ std::unique_ptr<A[]> up(new A[5]);
+ std::experimental::shared_ptr<A> sp(std::move(up));
+ VERIFY( up.get() == 0 );
+ VERIFY( sp.get() != 0 );
+ VERIFY( sp.use_count() == 1 );
+
+ VERIFY( sp->shared_from_this() != nullptr );
+
+ sp.reset();
+ VERIFY( destroyed == 5 );
+
+ return 0;
+}
+
+int
+main()
+{
+ test01();
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/experimental/memory/shared_ptr/cons/weak_ptr_ctor.cc b/libstdc++-v3/testsuite/experimental/memory/shared_ptr/cons/weak_ptr_ctor.cc
new file mode 100644
index 00000000000..342b37baa0d
--- /dev/null
+++ b/libstdc++-v3/testsuite/experimental/memory/shared_ptr/cons/weak_ptr_ctor.cc
@@ -0,0 +1,54 @@
+// { dg-options "-std=gnu++1y" }
+
+// Copyright (C) 2015 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING3. If not see
+// <http://www.gnu.org/licenses/>.
+
+// 8.2.1 Class template shared_ptr [memory.smartptr.shared]
+
+#include <experimental/memory>
+#include <testsuite_hooks.h>
+
+struct A { };
+
+// 8.2.1.1 shared_ptr constructors [memory.smartptr.shared.const]
+
+// Construction from weak_ptr
+int
+test01()
+{
+ bool test __attribute__((unused)) = true;
+
+ A * a = new A[5];
+ std::experimental::shared_ptr<A[5]> a1(a);
+ std::experimental::weak_ptr<A[5]> wa(a1);
+ std::experimental::shared_ptr<A[5]> a2(wa);
+ std::experimental::shared_ptr<A[5]> a3 = wa.lock();
+ VERIFY( a2.get() == a );
+ VERIFY( a3.get() == a );
+ VERIFY( a2.use_count() == wa.use_count() );
+ VERIFY( a3.use_count() == wa.use_count() );
+
+ return 0;
+}
+
+
+int
+main()
+{
+ test01();
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/experimental/memory/shared_ptr/dest/dest.cc b/libstdc++-v3/testsuite/experimental/memory/shared_ptr/dest/dest.cc
new file mode 100644
index 00000000000..989121df909
--- /dev/null
+++ b/libstdc++-v3/testsuite/experimental/memory/shared_ptr/dest/dest.cc
@@ -0,0 +1,129 @@
+// { dg-options "-std=gnu++1y" }
+
+// Copyright (C) 2015 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING3. If not see
+// <http://www.gnu.org/licenses/>.
+
+// 8.2.1 Class template shared_ptr [memory.smartptr.shared]
+
+#include <experimental/memory>
+#include <testsuite_hooks.h>
+
+struct A
+{
+ A() { ++ctor_count; }
+ ~A() { ++dtor_count; }
+ static long ctor_count;
+ static long dtor_count;
+};
+long A::ctor_count = 0;
+long A::dtor_count = 0;
+
+struct B : A
+{
+ B() { ++ctor_count; }
+ ~B() { ++dtor_count; }
+ static long ctor_count;
+ static long dtor_count;
+};
+long B::ctor_count = 0;
+long B::dtor_count = 0;
+
+struct D
+{
+ void operator()(const B* p) { delete [] p; ++delete_count; }
+ static long delete_count;
+};
+long D::delete_count = 0;
+
+struct reset_count_struct
+{
+ ~reset_count_struct()
+ {
+ A::ctor_count = 0;
+ A::dtor_count = 0;
+ B::ctor_count = 0;
+ B::dtor_count = 0;
+ D::delete_count = 0;
+ }
+};
+
+// 20.8.2.2.2 shared_ptr destructor
+
+int
+test01()
+{
+ reset_count_struct __attribute__((unused)) reset;
+ bool test __attribute__((unused)) = true;
+
+ {
+ std::experimental::shared_ptr<A[5]> a;
+ }
+ VERIFY( A::ctor_count == 0 );
+ VERIFY( A::dtor_count == 0 );
+ VERIFY( B::ctor_count == 0 );
+ VERIFY( B::dtor_count == 0 );
+ VERIFY( D::delete_count == 0 );
+
+ return 0;
+}
+
+int
+test02()
+{
+ reset_count_struct __attribute__((unused)) reset;
+ bool test __attribute__((unused)) = true;
+
+ {
+ std::experimental::shared_ptr<B[5]> a;
+ a = std::experimental::shared_ptr<B[5]>(new B[5], D());
+ }
+ VERIFY( A::ctor_count == 5 );
+ VERIFY( A::dtor_count == 5 );
+ VERIFY( B::ctor_count == 5 );
+ VERIFY( B::dtor_count == 5 );
+ VERIFY( D::delete_count == 1 );
+
+ return 0;
+}
+
+int
+test03()
+{
+ reset_count_struct __attribute__((unused)) reset;
+ bool test __attribute__((unused)) = true;
+
+ {
+ std::experimental::shared_ptr<B[]> a;
+ a = std::experimental::shared_ptr<B[5]>(new B[5], D());
+ }
+ VERIFY( A::ctor_count == 5 );
+ VERIFY( A::dtor_count == 5 );
+ VERIFY( B::ctor_count == 5 );
+ VERIFY( B::dtor_count == 5 );
+ VERIFY( D::delete_count == 1 );
+
+ return 0;
+}
+
+int
+main()
+{
+ test01();
+ test02();
+ test03();
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/experimental/memory/shared_ptr/modifiers/reset.cc b/libstdc++-v3/testsuite/experimental/memory/shared_ptr/modifiers/reset.cc
new file mode 100644
index 00000000000..bd1ce1d24b9
--- /dev/null
+++ b/libstdc++-v3/testsuite/experimental/memory/shared_ptr/modifiers/reset.cc
@@ -0,0 +1,89 @@
+// { dg-options "-std=gnu++1y" }
+
+// Copyright (C) 2015 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING3. If not see
+// <http://www.gnu.org/licenses/>.
+
+// 8.2.1 Class template shared_ptr [memory.smartptr.shared]
+
+#include <experimental/memory>
+#include <testsuite_hooks.h>
+
+struct A { };
+struct B : A { };
+struct D
+{
+ void operator()(B* p) { delete [] p; ++delete_count; }
+ static long delete_count;
+};
+long D::delete_count = 0;
+
+// C++14 ยง20.8.2.2.4
+
+// reset
+int
+test01()
+{
+ bool test __attribute__((unused)) = true;
+
+ A * const a = new A[5];
+ std::experimental::shared_ptr<A[5]> p1(a);
+ std::experimental::shared_ptr<A[5]> p2(p1);
+ p1.reset();
+ VERIFY( p1.get() == 0 );
+ VERIFY( p2.get() == a );
+
+ return 0;
+}
+
+int
+test02()
+{
+ bool test __attribute__((unused)) = true;
+
+ A * const a = new A[5];
+ B * const b = new B[5];
+ std::experimental::shared_ptr<A[5]> p1(a);
+ std::experimental::shared_ptr<A[5]> p2(p1);
+ p1.reset(b);
+ VERIFY( p1.get() == b );
+ VERIFY( p2.get() == a );
+
+ return 0;
+}
+
+int
+test03()
+{
+ bool test __attribute__((unused)) = true;
+
+ {
+ std::experimental::shared_ptr<A[5]> p1;
+ p1.reset(new B[5], D());
+ }
+ VERIFY( D::delete_count == 1 );
+
+ return 0;
+}
+
+int
+main()
+{
+ test01();
+ test02();
+ test03();
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/experimental/memory/shared_ptr/modifiers/swap.cc b/libstdc++-v3/testsuite/experimental/memory/shared_ptr/modifiers/swap.cc
new file mode 100644
index 00000000000..758042caf3a
--- /dev/null
+++ b/libstdc++-v3/testsuite/experimental/memory/shared_ptr/modifiers/swap.cc
@@ -0,0 +1,53 @@
+// { dg-options "-std=gnu++1y" }
+
+// Copyright (C) 2015 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING3. If not see
+// <http://www.gnu.org/licenses/>.
+
+// 8.2.1 Class template shared_ptr [memory.smartptr.shared]
+
+#include <experimental/memory>
+#include <testsuite_hooks.h>
+
+struct A { };
+
+// C++14 ยง20.8.2.2.4
+
+// swap
+int
+test01()
+{
+ bool test __attribute__((unused)) = true;
+
+ A * const a1 = new A[5];
+ A * const a2 = new A[5];
+ std::experimental::shared_ptr<A[5]> p1(a1);
+ std::experimental::shared_ptr<A[5]> p2(a2);
+ p1.swap(p2);
+ VERIFY( p1.get() == a2 );
+ VERIFY( p2.get() == a1 );
+
+ return 0;
+}
+
+
+
+int
+main()
+{
+ test01();
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/experimental/memory/shared_ptr/observers/bool_conv.cc b/libstdc++-v3/testsuite/experimental/memory/shared_ptr/observers/bool_conv.cc
new file mode 100644
index 00000000000..7e4c750a3cf
--- /dev/null
+++ b/libstdc++-v3/testsuite/experimental/memory/shared_ptr/observers/bool_conv.cc
@@ -0,0 +1,74 @@
+// { dg-options "-std=gnu++1y" }
+
+// Copyright (C) 2015 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING3. If not see
+// <http://www.gnu.org/licenses/>.
+
+// 8.2.1 Class template shared_ptr [memory.smartptr.shared]
+
+#include <experimental/memory>
+#include <testsuite_hooks.h>
+
+struct A { };
+
+// 8.2.1.2 shared_ptr observers [memory.smartptr.shared.obs]
+
+// Conversion to bool
+void
+test01()
+{
+ bool test __attribute__((unused)) = true;
+
+ const std::experimental::shared_ptr<A[5]> p1;
+ VERIFY( static_cast<bool>(p1) == false );
+ const std::experimental::shared_ptr<A[5]> p2(p1);
+ VERIFY( static_cast<bool>(p2) == false );
+}
+
+void
+test02()
+{
+ bool test __attribute__((unused)) = true;
+
+ std::experimental::shared_ptr<A[5]> p1(new A[5]);
+ VERIFY( static_cast<bool>(p1) );
+ std::experimental::shared_ptr<A[5]> p2(p1);
+ VERIFY( static_cast<bool>(p2) );
+ p1.reset();
+ VERIFY( !static_cast<bool>(p1) );
+ VERIFY( static_cast<bool>(p2) );
+}
+
+void
+test03()
+{
+ bool test __attribute__((unused)) = true;
+
+ std::experimental::shared_ptr<A[5]> p1(new A[5]);
+ std::experimental::shared_ptr<A[5]> p2(p1);
+ p2.reset(new A[5]);
+ VERIFY( static_cast<bool>(p1) );
+ VERIFY( static_cast<bool>(p2) );
+}
+
+int
+main()
+{
+ test01();
+ test02();
+ test03();
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/experimental/memory/shared_ptr/observers/operators.cc b/libstdc++-v3/testsuite/experimental/memory/shared_ptr/observers/operators.cc
new file mode 100644
index 00000000000..d32c89978aa
--- /dev/null
+++ b/libstdc++-v3/testsuite/experimental/memory/shared_ptr/observers/operators.cc
@@ -0,0 +1,93 @@
+// { dg-options "-std=gnu++1y" }
+
+// Copyright (C) 2015 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING3. If not see
+// <http://www.gnu.org/licenses/>.
+
+// 8.2.1 Class template shared_ptr [memory.smartptr.shared]
+
+#include <experimental/memory>
+#include <testsuite_hooks.h>
+
+struct A
+{
+ A() : i() {}
+ int i;
+};
+
+// 8.2.1.2 shared_ptr observers [memory.smartptr.shared.obs]
+
+// get
+void
+test01()
+{
+ bool test __attribute__((unused)) = true;
+
+ A * const a = new A[5];
+ const std::experimental::shared_ptr<A[5]> p(a);
+ VERIFY( p.get() == a );
+}
+
+// operator []
+int
+test02()
+{
+ A * p = new A[5];
+ std::experimental::shared_ptr<A[5]> a(p);
+
+ for(int j = 0; j < 5; j++)
+ { a[j].i = j; }
+
+ VERIFY(a.get() == p);
+ VERIFY(a.use_count() == 1);
+
+ for(int j = 0; j < 5; j++)
+ { VERIFY(a[j].i == j); }
+
+ return 0;
+}
+
+// operator*
+void
+test03()
+{
+ bool test __attribute__((unused)) = true;
+
+ A * const a = new A[5];
+ const std::experimental::shared_ptr<A[5]> p(a);
+ VERIFY( p.get() == a );
+}
+
+// operator->
+void
+test04()
+{
+ bool test __attribute__((unused)) = true;
+
+ A * const a = new A[5];
+ const std::experimental::shared_ptr<A[5]> p(a);
+ VERIFY( &p[0].i == &a[0].i );
+}
+
+int
+main()
+{
+ test01();
+ test02();
+ test03();
+ test04();
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/experimental/memory/shared_ptr/observers/owner_before.cc b/libstdc++-v3/testsuite/experimental/memory/shared_ptr/observers/owner_before.cc
new file mode 100644
index 00000000000..24a658a96f8
--- /dev/null
+++ b/libstdc++-v3/testsuite/experimental/memory/shared_ptr/observers/owner_before.cc
@@ -0,0 +1,86 @@
+// { dg-options "-std=gnu++1y" }
+
+// Copyright (C) 2015 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING3. If not see
+// <http://www.gnu.org/licenses/>.
+
+// 8.2.1 Class template shared_ptr [memory.smartptr.shared]
+
+#include <experimental/memory>
+#include <testsuite_hooks.h>
+
+struct A
+{
+ int i;
+ virtual ~A() { }
+};
+
+struct B : A { };
+
+// 8.2.1.2 shared_ptr observers [memory.smartptr.shared.obs]
+
+// owner_before
+void
+test01()
+{
+ bool test __attribute__((unused)) = true;
+
+ // test empty shared_ptrs compare equivalent
+ std::experimental::shared_ptr<A[5]> p1;
+ std::experimental::shared_ptr<B[5]> p2;
+ VERIFY( !p1.owner_before(p2) && !p2.owner_before(p1) );
+}
+
+void
+test02()
+{
+ bool test __attribute__((unused)) = true;
+
+ std::experimental::shared_ptr<A[5]> a0;
+
+ std::experimental::shared_ptr<A[5]> a1(new A[5]);
+ VERIFY( a1.owner_before(a0) || a0.owner_before(a1) );
+ VERIFY( !(a1.owner_before(a0) && a0.owner_before(a1)) );
+
+ std::experimental::shared_ptr<B[5]> b1(new B[5]);
+ VERIFY( a1.owner_before(b1) || b1.owner_before(a1) );
+ VERIFY( !(a1.owner_before(b1) && b1.owner_before(a1)) );
+
+ std::experimental::shared_ptr<A[5]> a2(a1);
+ VERIFY( !a1.owner_before(a2) && !a2.owner_before(a1) );
+
+ std::experimental::weak_ptr<A[5]> w1(a1);
+ VERIFY( !a1.owner_before(w1) && !w1.owner_before(a1) );
+}
+
+void
+test03()
+{
+ bool test __attribute__((unused)) = true;
+
+ std::experimental::shared_ptr<A[5]> p1(new A[5]);
+ std::experimental::shared_ptr<int> p2(p1, &p1[0].i);
+ VERIFY( !p1.owner_before(p2) && !p2.owner_before(p1) );
+}
+
+int
+main()
+{
+ test01();
+ test02();
+ test03();
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/experimental/memory/shared_ptr/observers/use_count.cc b/libstdc++-v3/testsuite/experimental/memory/shared_ptr/observers/use_count.cc
new file mode 100644
index 00000000000..fc48bf2160d
--- /dev/null
+++ b/libstdc++-v3/testsuite/experimental/memory/shared_ptr/observers/use_count.cc
@@ -0,0 +1,73 @@
+// { dg-options "-std=gnu++1y" }
+
+// Copyright (C) 2015 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING3. If not see
+// <http://www.gnu.org/licenses/>.
+
+// 8.2.1 Class template shared_ptr [memory.smartptr.shared]
+
+#include <experimental/memory>
+#include <testsuite_hooks.h>
+
+struct A { };
+struct B : A { };
+
+// 8.2.1.2 shared_ptr observers [memory.smartptr.shared.obs]
+
+// use_count
+void
+test01()
+{
+ bool test __attribute__((unused)) = true;
+
+ const std::experimental::shared_ptr<A[5]> p1;
+ VERIFY( p1.use_count() == 0 );
+ const std::experimental::shared_ptr<A[5]> p2(p1);
+ VERIFY( p1.use_count() == 0 );
+}
+
+void
+test02()
+{
+ bool test __attribute__((unused)) = true;
+
+ std::experimental::shared_ptr<A[5]> p1(new A[5]);
+ std::experimental::shared_ptr<A[5]> p2(p1);
+ p1.reset();
+ VERIFY( p1.use_count() == 0 );
+ VERIFY( p2.use_count() == 1 );
+}
+
+void
+test03()
+{
+ bool test __attribute__((unused)) = true;
+
+ std::experimental::shared_ptr<A[5]> p1(new A[5]);
+ std::experimental::shared_ptr<A[5]> p2(p1);
+ p2.reset(new B[5]);
+ VERIFY( p1.use_count() == 1 );
+ VERIFY( p2.use_count() == 1 );
+}
+
+int
+main()
+{
+ test01();
+ test02();
+ test03();
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/experimental/random/randint.cc b/libstdc++-v3/testsuite/experimental/random/randint.cc
new file mode 100644
index 00000000000..d5238361f7f
--- /dev/null
+++ b/libstdc++-v3/testsuite/experimental/random/randint.cc
@@ -0,0 +1,84 @@
+// { dg-options "-std=gnu++14" }
+// { dg-require-effective-target tls_runtime }
+
+// Copyright (C) 2015 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a moved_to of the GNU General Public License along
+// with this library; see the file COPYING3. If not see
+// <http://www.gnu.org/licenses/>.
+
+#include <experimental/random>
+#include <testsuite_hooks.h>
+
+void
+test01()
+{
+ for (int i = 0; i < 100; ++i)
+ {
+ const int n = std::experimental::randint(-10, i);
+ VERIFY( -10 <= n && n <= i );
+ }
+
+ std::experimental::reseed(99u);
+ const long n1[] = {
+ std::experimental::randint(0, 100),
+ std::experimental::randint(0, 100),
+ std::experimental::randint(0, 100),
+ std::experimental::randint(0, 100),
+ std::experimental::randint(0, 100)
+ };
+ std::experimental::reseed(99u);
+ const long n2[] = {
+ std::experimental::randint(0, 100),
+ std::experimental::randint(0, 100),
+ std::experimental::randint(0, 100),
+ std::experimental::randint(0, 100),
+ std::experimental::randint(0, 100)
+ };
+ for (int i = 0; i < 5; ++i)
+ VERIFY( n1[i] == n2[i] );
+
+ std::experimental::reseed();
+ const long n3[] = {
+ std::experimental::randint(0, 100),
+ std::experimental::randint(0, 100),
+ std::experimental::randint(0, 100)
+ };
+ VERIFY( !(n3[0] == n1[0] && n3[1] == n1[1] && n3[2] == n1[2]) );
+}
+
+void
+test02()
+{
+ auto check = [](auto v) {
+ auto n = std::experimental::randint(decltype(v)(0), v);
+ static_assert(std::is_same<decltype(n), decltype(v)>::value,
+ "return type is correct");
+ VERIFY(0 <= n && n <= v);
+ };
+ check( (short)10 );
+ check( 100 );
+ check( 1000L );
+ check( 10000LL );
+ check( (unsigned short)10 );
+ check( 100U );
+ check( 1000UL );
+ check( 10000ULL );
+}
+
+int main()
+{
+ test01();
+ test02();
+}
diff --git a/libstdc++-v3/testsuite/experimental/type_erased_allocator/1.cc b/libstdc++-v3/testsuite/experimental/type_erased_allocator/1.cc
new file mode 100644
index 00000000000..9545edff54d
--- /dev/null
+++ b/libstdc++-v3/testsuite/experimental/type_erased_allocator/1.cc
@@ -0,0 +1,147 @@
+// { dg-options "-std=gnu++14" }
+
+// Copyright (C) 2015 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING3. If not see
+// <http://www.gnu.org/licenses/>.
+
+#include <memory>
+#include <experimental/memory_resource>
+#include <vector>
+#include <bits/uses_allocator.h>
+#include <testsuite_hooks.h>
+#include <testsuite_allocator.h>
+
+using std::experimental::pmr::polymorphic_allocator;
+using std::experimental::pmr::memory_resource;
+using std::experimental::pmr::new_delete_resource;
+using std::experimental::pmr::get_default_resource;
+using std::experimental::pmr::set_default_resource;
+
+struct A
+{
+ A() { ++ctor_count; }
+ ~A() { ++dtor_count; }
+ static int ctor_count;
+ static int dtor_count;
+};
+int A::ctor_count = 0;
+int A::dtor_count = 0;
+
+struct CountedResource : public memory_resource
+{
+public:
+ CountedResource() = default;
+ ~ CountedResource() = default;
+
+ static size_t get_alloc_count() { return alloc_count; }
+ static size_t get_dalloc_count() { return dalloc_count; }
+
+ static size_t alloc_count;
+ static size_t dalloc_count;
+protected:
+ void* do_allocate(size_t bytes, size_t alignment)
+ {
+ alloc_count += bytes;
+ if (auto ptr = std::malloc(bytes)) {
+ return ptr;
+ }
+ throw std::bad_alloc();
+ }
+
+ void do_deallocate(void *p, size_t bytes, size_t alignment)
+ {
+ dalloc_count += bytes;
+ free(p);
+ }
+
+ bool do_is_equal(const memory_resource& __other) const noexcept
+ { return this == &__other; }
+};
+ size_t CountedResource::alloc_count = 0;
+ size_t CountedResource::dalloc_count = 0;
+
+void clear()
+{
+ CountedResource::alloc_count = 0;
+ CountedResource::dalloc_count = 0;
+ A::ctor_count = 0;
+ A::dtor_count = 0;
+}
+
+// memory resource
+void test01()
+{
+ memory_resource* r = new_delete_resource();
+ VERIFY(get_default_resource() == r);
+ void *p = get_default_resource()->allocate(5);
+ VERIFY(p);
+ get_default_resource()->deallocate(p, 5);
+
+ clear();
+ CountedResource* cr = new CountedResource();
+ set_default_resource(cr);
+ VERIFY(get_default_resource() == cr);
+ void *pc = get_default_resource()->allocate(5);
+ VERIFY(pc);
+ get_default_resource()->deallocate(pc, 5);
+ VERIFY(CountedResource::get_alloc_count() == 5);
+ VERIFY(CountedResource::get_dalloc_count() == 5);
+}
+
+// polymorphic_allocator
+void test02()
+{
+ clear();
+ {
+ CountedResource cr;
+ polymorphic_allocator<A> pa(&cr);
+ std::vector<A, polymorphic_allocator<A>> v(5, A(), pa);
+ }
+ VERIFY(A::ctor_count == 1);
+ VERIFY(A::dtor_count == 6);
+ VERIFY(CountedResource::get_alloc_count() == 5);
+ VERIFY(CountedResource::get_dalloc_count() == 5);
+}
+
+void test03() {
+ clear();
+ CountedResource cr;
+ polymorphic_allocator<A> pa(&cr);
+ A* p = pa.allocate(1);
+ pa.construct(p);
+ pa.destroy(p);
+ pa.deallocate(p, 1);
+ VERIFY(A::ctor_count == 1);
+ VERIFY(A::dtor_count == 1);
+ VERIFY(CountedResource::get_alloc_count() == 1);
+ VERIFY(CountedResource::get_dalloc_count() == 1);
+}
+
+void test04() {
+ polymorphic_allocator<A> pa1(get_default_resource());
+ polymorphic_allocator<A> pa2(get_default_resource());
+ VERIFY(pa1 == pa2);
+ polymorphic_allocator<A> pa3 = pa2.select_on_container_copy_construction();
+ VERIFY(pa1 == pa3);
+}
+
+int main() {
+ test01();
+ test02();
+ test03();
+ test04();
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/experimental/type_erased_allocator/1_neg.cc b/libstdc++-v3/testsuite/experimental/type_erased_allocator/1_neg.cc
new file mode 100644
index 00000000000..b85e0ea469f
--- /dev/null
+++ b/libstdc++-v3/testsuite/experimental/type_erased_allocator/1_neg.cc
@@ -0,0 +1,37 @@
+// { dg-do run { xfail *-*-* } }
+// { dg-options "-std=gnu++14" }
+
+// Copyright (C) 2015 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING3. If not see
+// <http://www.gnu.org/licenses/>.
+
+#include <experimental/memory_resource>
+#include <bits/uses_allocator.h>
+#include <testsuite_hooks.h>
+#include <testsuite_allocator.h>
+
+using std::experimental::pmr::polymorphic_allocator;
+using std::experimental::pmr::null_memory_resource;
+using std::experimental::pmr::memory_resource;
+
+void test01() {
+ memory_resource* r = null_memory_resource();
+ auto p = r->allocate(1);
+}
+
+int main() {
+ test01();
+}
diff --git a/libstdc++-v3/testsuite/experimental/type_erased_allocator/2.cc b/libstdc++-v3/testsuite/experimental/type_erased_allocator/2.cc
new file mode 100644
index 00000000000..014c357e5fa
--- /dev/null
+++ b/libstdc++-v3/testsuite/experimental/type_erased_allocator/2.cc
@@ -0,0 +1,202 @@
+// { dg-options "-std=gnu++14" }
+
+// Copyright (C) 2015 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING3. If not see
+// <http://www.gnu.org/licenses/>.
+
+#include <memory>
+#include <experimental/memory_resource>
+#include <experimental/utility>
+#include <bits/uses_allocator.h>
+#include <testsuite_hooks.h>
+#include <testsuite_allocator.h>
+
+using std::experimental::pmr::polymorphic_allocator;
+using std::experimental::pmr::memory_resource;
+using std::experimental::pmr::new_delete_resource;
+using std::experimental::pmr::get_default_resource;
+using std::experimental::pmr::set_default_resource;
+using std::allocator_arg_t;
+
+enum CtorType { Default, Copy, Move, Other, Tuple, Piecewise_Default, Piecewise_Copy};
+
+// type that takes a memory_resource before other ctor args
+struct A
+{
+ using allocator_type = std::experimental::erased_type;
+
+ CtorType type;
+ memory_resource* alloc = nullptr;
+
+ A() : type(Default) { }
+ A(allocator_arg_t, memory_resource* a) : type(Default), alloc(a) { }
+ A(const A&) : type(Copy) { }
+ A(allocator_arg_t, memory_resource* a, const A&) : type(Copy), alloc(a) { }
+ A(A&&) : type (Move) { }
+ A(allocator_arg_t, memory_resource* a, A&&) : type (Move), alloc(a) { }
+ A(int) : type(Other) { }
+ A(allocator_arg_t, memory_resource* a, int) : type(Other), alloc(a) { }
+};
+
+// type that takes a memory_resource after other ctor args
+struct B
+{
+ using allocator_type = std::experimental::erased_type;
+
+ CtorType type;
+ memory_resource* alloc = nullptr;
+
+ B() : type(Default) { }
+ B(memory_resource* a) : type(Default), alloc(a) { }
+ B(const B&) : type(Copy) { }
+ B(const B&, memory_resource* a) : type(Copy), alloc(a) { }
+ B(B&&) : type (Move) { }
+ B(B&&, memory_resource* a) : type(Move), alloc(a) { }
+ B(int) : type(Other) { }
+ B(int, memory_resource* a) : type(Other), alloc(a) { }
+};
+
+// type that takes no memory_resource
+struct C
+{
+ CtorType type;
+ C() : type(Default) { }
+ C(const C&) : type(Copy) { }
+ C(C&&) : type(Move) { }
+ C(int) : type(Other) { }
+};
+
+// test construct for type that
+// uses memory_resource* as allocator
+template<typename A>
+void test_uses_alloc() {
+ polymorphic_allocator<A> pa;
+ A* p = pa.allocate(1);
+ A a;
+
+ pa.construct(p);
+ VERIFY(p->alloc == get_default_resource());
+ VERIFY(p->type == Default);
+ pa.destroy(p);
+
+ pa.construct(p, a);
+ VERIFY(p->type == Copy);
+ pa.destroy(p);
+
+ pa.construct(p, A());
+ VERIFY(p->type == Move);
+ pa.destroy(p);
+
+ pa.construct(p, 1);
+ VERIFY(p->type == Other);
+ pa.destroy(p);
+
+ pa.deallocate(p, 1);
+}
+
+// test construct for type that not using allocator
+template <typename C>
+void test_non_alloc() {
+ polymorphic_allocator<C> pa;
+ C* p = pa.allocate(1);
+ C b;
+
+ pa.construct(p);
+ VERIFY(p->type == Default);
+ pa.destroy(p);
+
+ pa.construct(p, b);
+ VERIFY(p->type == Copy);
+ pa.destroy(p);
+
+ pa.construct(p, C());
+ VERIFY(p->type == Move);
+ pa.destroy(p);
+
+ pa.construct(p, 1);
+ VERIFY(p->type == Other);
+ pa.destroy(p);
+
+ pa.deallocate(p, 1);
+}
+
+// test piecewise_construct
+template <typename A, typename B>
+void test_pair() {
+ polymorphic_allocator<std::pair<A, B>> pa;
+ std::pair<A, B>* p = pa.allocate(1);
+ std::tuple<> t;
+
+ // construct(pair<T1, T2>* p, piecewise_construct_t, tuple<...>, tuple<...>)
+ pa.construct(p, std::piecewise_construct, t, t);
+ VERIFY(p->first.type == Default);
+ VERIFY(p->second.type == Default);
+ pa.destroy(p);
+
+ // construct(pair<T1, T2>* __p)
+ pa.construct(p);
+ VERIFY(p->first.type == Default);
+ VERIFY(p->second.type == Default);
+ pa.destroy(p);
+
+ // construct(pair<T1, T2>* p, U&& x, V&& y)
+ A a; B b;
+ pa.construct(p, a, b);
+ VERIFY(p->first.type == Copy);
+ VERIFY(p->second.type == Copy);
+ pa.destroy(p);
+
+ pa.construct(p, A(), B());
+ VERIFY(p->first.type == Move);
+ VERIFY(p->second.type == Move);
+ auto pp = *p;
+ pa.destroy(p);
+
+ // construct(pair<T1, T2>* p, const pair<U, V>& x)
+ pa.construct(p, pp);
+ VERIFY(p->first.type == Copy);
+ VERIFY(p->second.type == Copy);
+ pa.destroy(p);
+
+ // construct(pair<T1, T2>* p, pair<U, V>&& x)
+ pa.construct(p, std::move(pp));
+ VERIFY(p->first.type == Move);
+ VERIFY(p->second.type == Move);
+ pa.destroy(p);
+ pa.deallocate(p, 1);
+}
+
+void test01() {
+ test_uses_alloc<A>();
+ test_uses_alloc<B>();
+ test_non_alloc<C>();
+}
+
+void test02() {
+ test_pair<A, A>();
+ test_pair<A, B>();
+ test_pair<A, C>();
+ test_pair<B, B>();
+ test_pair<B, A>();
+ test_pair<B, C>();
+ test_pair<C, C>();
+}
+
+
+int main() {
+ test01();
+ test02();
+}
diff --git a/libstdc++-v3/testsuite/experimental/type_erased_allocator/uses_allocator.cc b/libstdc++-v3/testsuite/experimental/type_erased_allocator/uses_allocator.cc
new file mode 100644
index 00000000000..fc8acf16dcd
--- /dev/null
+++ b/libstdc++-v3/testsuite/experimental/type_erased_allocator/uses_allocator.cc
@@ -0,0 +1,22 @@
+#include <bits/uses_allocator.h>
+#include <vector>
+#include <experimental/utility>
+#include <memory>
+
+using std::vector;
+using std::allocator;
+using std::uses_allocator;
+
+struct A {
+ using allocator_type = std::experimental::erased_type;
+};
+
+void test01() {
+ static_assert(uses_allocator<vector<int>, allocator<int>>());
+ static_assert(uses_allocator<A, allocator<A>>());
+}
+
+int main() {
+ test01();
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/experimental/type_traits/value.cc b/libstdc++-v3/testsuite/experimental/type_traits/value.cc
index fefe52391a2..d52b454fa69 100644
--- a/libstdc++-v3/testsuite/experimental/type_traits/value.cc
+++ b/libstdc++-v3/testsuite/experimental/type_traits/value.cc
@@ -21,7 +21,7 @@
#include <experimental/type_traits>
using namespace std;
-using namespace std::experimental;
+using namespace experimental;
// These tests are rather simple, the front-end tests already test
// variable templates, and the library tests for the underlying
@@ -322,3 +322,24 @@ static_assert(is_convertible_v<int&, const int&>
&& is_convertible<int&, const int&>::value, "");
static_assert(!is_convertible_v<const int&, int&>
&& !is_convertible<const int&, int&>::value, "");
+
+static_assert(negation_v<false_type>);
+static_assert(!negation_v<true_type>);
+static_assert(conjunction_v<>);
+static_assert(!disjunction_v<>);
+static_assert(conjunction_v<true_type>);
+static_assert(!conjunction_v<false_type>);
+static_assert(disjunction_v<true_type>);
+static_assert(!disjunction_v<false_type>);
+static_assert(conjunction_v<true_type, true_type>);
+static_assert(!conjunction_v<true_type, false_type>);
+static_assert(disjunction_v<false_type, true_type>);
+static_assert(!disjunction_v<false_type, false_type>);
+static_assert(conjunction_v<true_type, true_type,
+ true_type>);
+static_assert(!conjunction_v<true_type, true_type,
+ false_type>);
+static_assert(disjunction_v<false_type, false_type,
+ true_type>);
+static_assert(!disjunction_v<false_type, false_type,
+ false_type>);
diff --git a/libstdc++-v3/testsuite/lib/libstdc++.exp b/libstdc++-v3/testsuite/lib/libstdc++.exp
index 9a6726c8ce7..f5528a02e96 100644
--- a/libstdc++-v3/testsuite/lib/libstdc++.exp
+++ b/libstdc++-v3/testsuite/lib/libstdc++.exp
@@ -895,7 +895,7 @@ proc check_v3_target_time { } {
proc check_v3_target_namedlocale { args } {
global et_namedlocale
- global tool
+ global tool
set et_namedlocale 0
@@ -909,24 +909,41 @@ proc check_v3_target_namedlocale { args } {
set f [open $src "w"]
puts $f "#include <locale>"
puts $f "#include <cstdio>"
- puts $f "using namespace std;"
+ puts $f "#include <cstring>"
+ puts $f "using namespace std;"
+ puts $f "char *transform_locale(const char *name)"
+ puts $f "{"
+ puts $f " char *result = new char\[50\];"
+ puts $f " strcpy(result, name);"
+ puts $f "#if defined __FreeBSD__ || defined __DragonFly__ || defined __NetBSD__"
+ puts $f " /* fall-through */"
+ puts $f "#else"
+ puts $f " if (strstr(result, \"ISO8859-15\")) {"
+ puts $f " strcat(result, \"@euro\");"
+ puts $f " }"
+ puts $f "#endif"
+ puts $f " return result;"
+ puts $f "}"
puts $f "int main (int argc, char** argv)"
puts $f "{"
puts $f " if (argc < 2)"
puts $f " {"
puts $f " printf(\"locale support test not supported\\n\");"
puts $f " return 1;"
- puts $f " }"
- puts $f " try"
+ puts $f " }"
+ puts $f " const char *namedloc = transform_locale(*(argv + 1));"
+ puts $f " try"
puts $f " {"
- puts $f " locale(*(argv + 1));"
+ puts $f " locale((const char*)namedloc);"
+ puts $f " delete namedloc;"
puts $f " return 0;"
puts $f " }"
puts $f " catch(...)"
puts $f " {"
- puts $f " printf(\"locale '%s' not supported\\n\", *(argv + 1));"
+ puts $f " printf(\"locale '%s' not supported\\n\", namedloc);"
+ puts $f " delete namedloc;"
puts $f " return 1;"
- puts $f " }"
+ puts $f " }"
puts $f "}"
close $f
@@ -1614,7 +1631,7 @@ proc check_v3_target_string_conversions { } {
set f [open $src "w"]
puts $f "#include <bits/c++config.h>"
- puts $f "#if !defined(_GLIBCXX_USE_C99) || defined(_GLIBCXX_HAVE_BROKEN_VSWPRINTF)"
+ puts $f "#if !(_GLIBCXX_USE_C99_STDIO && _GLIBCXX_USE_C99_STDLIB && _GLIBCXX_USE_C99_WCHAR) || defined(_GLIBCXX_HAVE_BROKEN_VSWPRINTF)"
puts $f "# error No string conversions"
puts $f "#endif"
close $f
diff --git a/libstdc++-v3/testsuite/tr1/8_c_compatibility/cmath/templates.cc b/libstdc++-v3/testsuite/tr1/8_c_compatibility/cmath/templates.cc
index b75fda20889..ac8933c97e8 100644
--- a/libstdc++-v3/testsuite/tr1/8_c_compatibility/cmath/templates.cc
+++ b/libstdc++-v3/testsuite/tr1/8_c_compatibility/cmath/templates.cc
@@ -23,7 +23,7 @@
#include <tr1/cmath>
-#if _GLIBCXX_USE_C99
+#if _GLIBCXX_USE_C99_MATH
#if !_GLIBCXX_USE_C99_FP_MACROS_DYNAMIC
template<typename T>
diff --git a/libstdc++-v3/testsuite/tr1/8_c_compatibility/cstdio/functions.cc b/libstdc++-v3/testsuite/tr1/8_c_compatibility/cstdio/functions.cc
index 0c913e025f3..5a9eb6c2c4f 100644
--- a/libstdc++-v3/testsuite/tr1/8_c_compatibility/cstdio/functions.cc
+++ b/libstdc++-v3/testsuite/tr1/8_c_compatibility/cstdio/functions.cc
@@ -30,7 +30,7 @@ void test01(int dummy, ...)
std::va_list ap;
va_start(ap, dummy);
-#if _GLIBCXX_USE_C99
+#if _GLIBCXX_USE_C99_STDIO
char* s = 0;
const char* cs = 0;
diff --git a/libstdc++-v3/testsuite/tr1/8_c_compatibility/cstdlib/functions.cc b/libstdc++-v3/testsuite/tr1/8_c_compatibility/cstdlib/functions.cc
index cfa748d5eb8..dfa08ef894d 100644
--- a/libstdc++-v3/testsuite/tr1/8_c_compatibility/cstdlib/functions.cc
+++ b/libstdc++-v3/testsuite/tr1/8_c_compatibility/cstdlib/functions.cc
@@ -27,7 +27,7 @@
void test01()
{
-#if _GLIBCXX_USE_C99
+#if _GLIBCXX_USE_C99_STDLIB
long long i = 0;
const char* s = 0;
diff --git a/libstdc++-v3/testsuite/tr1/8_c_compatibility/cstdlib/types_std_tr1.cc b/libstdc++-v3/testsuite/tr1/8_c_compatibility/cstdlib/types_std_tr1.cc
index 002b6a59c83..12524634b33 100644
--- a/libstdc++-v3/testsuite/tr1/8_c_compatibility/cstdlib/types_std_tr1.cc
+++ b/libstdc++-v3/testsuite/tr1/8_c_compatibility/cstdlib/types_std_tr1.cc
@@ -27,10 +27,10 @@
void test01()
{
-#if _GLIBCXX_USE_C99
+#if _GLIBCXX_USE_C99_STDLIB
typedef std::tr1::lldiv_t my_lldiv_t;
-
+
#endif
}
diff --git a/libstdc++-v3/testsuite/tr1/8_c_compatibility/cwchar/functions.cc b/libstdc++-v3/testsuite/tr1/8_c_compatibility/cwchar/functions.cc
index b964661995f..c745b19dc41 100644
--- a/libstdc++-v3/testsuite/tr1/8_c_compatibility/cwchar/functions.cc
+++ b/libstdc++-v3/testsuite/tr1/8_c_compatibility/cwchar/functions.cc
@@ -67,7 +67,7 @@ void test01(int dummy, ...)
ret3 = ret3; // Suppress unused warning.
#endif
-#if _GLIBCXX_USE_C99
+#if _GLIBCXX_USE_C99_WCHAR
const wchar_t* nptr2 = 0;
wchar_t** endptr2 = 0;
diff --git a/libstdc++-v3/testsuite/util/testsuite_fs.h b/libstdc++-v3/testsuite/util/testsuite_fs.h
index 44aef115ff3..ddcbdccf442 100644
--- a/libstdc++-v3/testsuite/util/testsuite_fs.h
+++ b/libstdc++-v3/testsuite/util/testsuite_fs.h
@@ -83,7 +83,7 @@ namespace __gnu_test
p = tmp;
#else
char buf[64];
-#if _GLIBCXX_USE_C99
+#if _GLIBCXX_USE_C99_STDIO
std::snprintf(buf, 64, "filesystem-ts-test.%lu", (unsigned long)::getpid());
#else
std::sprintf(buf, "filesystem-ts-test.%lu", (unsigned long)::getpid());
diff --git a/libstdc++-v3/testsuite/util/testsuite_hooks.h b/libstdc++-v3/testsuite/util/testsuite_hooks.h
index d0c8b1d6bfd..0d8afbd2a3f 100644
--- a/libstdc++-v3/testsuite/util/testsuite_hooks.h
+++ b/libstdc++-v3/testsuite/util/testsuite_hooks.h
@@ -67,6 +67,13 @@
# define unlink(x)
#endif
+#if defined __FreeBSD__ || defined __DragonFly__ || defined __NetBSD__
+# define ISO_8859(part,langTERR) #langTERR ".ISO8859-" #part
+#else
+# define ISO_8859(part,langTERR) ((part) == 15 ?\
+ #langTERR ".ISO8859-" #part "@euro" : #langTERR ".ISO8859-" #part)
+#endif
+
namespace __gnu_test
{
// All macros are defined in GLIBCXX_CONFIGURE_TESTSUITE and imported