aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Murray <mark.murray@arm.com>2017-10-17 13:32:43 +0100
committerYvan Roux <yvan.roux@linaro.org>2017-10-18 10:42:17 +0200
commit623985a83f232c2429d2a70166b454762eb7c549 (patch)
treecaede91e02c192494defede23809b24626423a07
parent4c0f8e7f95836cc5a9b59599c419181be2da7eaf (diff)
Merge branches/gcc-5-branch rev 253576
Change-Id: Id5d48f9003c8024d3bf507fd8bbcd51ce9641a55
-rw-r--r--ChangeLog4
-rw-r--r--boehm-gc/ChangeLog4
-rw-r--r--config/ChangeLog4
-rw-r--r--contrib/ChangeLog8
-rwxr-xr-xcontrib/gcc_update4
-rw-r--r--contrib/reghunt/ChangeLog4
-rw-r--r--contrib/regression/ChangeLog4
-rw-r--r--fixincludes/ChangeLog4
-rw-r--r--gcc/BASE-VER2
-rw-r--r--gcc/ChangeLog1259
-rw-r--r--gcc/DATESTAMP2
-rw-r--r--gcc/Makefile.in1
-rw-r--r--gcc/ada/ChangeLog4
-rw-r--r--gcc/asan.c329
-rw-r--r--gcc/auto-profile.c12
-rw-r--r--gcc/bb-reorder.c6
-rw-r--r--gcc/builtins.c12
-rw-r--r--gcc/c-family/ChangeLog53
-rw-r--r--gcc/c-family/c-common.c27
-rw-r--r--gcc/c-family/c-cppbuiltin.c2
-rw-r--r--gcc/c-family/c-omp.c21
-rw-r--r--gcc/c/ChangeLog46
-rw-r--r--gcc/c/c-decl.c16
-rw-r--r--gcc/c/c-objc-common.c2
-rw-r--r--gcc/c/c-parser.c5
-rw-r--r--gcc/c/c-typeck.c16
-rw-r--r--gcc/cgraph.c13
-rw-r--r--gcc/cgraphunit.c4
-rw-r--r--gcc/combine.c8
-rw-r--r--gcc/common.opt2
-rw-r--r--gcc/config/aarch64/aarch64.c22
-rw-r--r--gcc/config/arm/arm-builtins.c4
-rw-r--r--gcc/config/avr/avr.c105
-rw-r--r--gcc/config/avr/avr.opt4
-rw-r--r--gcc/config/i386/avx2intrin.h488
-rw-r--r--gcc/config/i386/avx512bwintrin.h132
-rw-r--r--gcc/config/i386/avx512fintrin.h94
-rw-r--r--gcc/config/i386/avx512pfintrin.h88
-rw-r--r--gcc/config/i386/avx512vlintrin.h1200
-rw-r--r--gcc/config/i386/cpuid.h2
-rw-r--r--gcc/config/i386/gmm_malloc.h36
-rw-r--r--gcc/config/i386/i386.c139
-rw-r--r--gcc/config/i386/i386.md63
-rw-r--r--gcc/config/i386/ia32intrin.h8
-rw-r--r--gcc/config/i386/lwpintrin.h22
-rw-r--r--gcc/config/i386/mmx.md20
-rw-r--r--gcc/config/i386/pmm_malloc.h20
-rw-r--r--gcc/config/i386/rdseedintrin.h12
-rw-r--r--gcc/config/i386/rtmintrin.h4
-rw-r--r--gcc/config/i386/sse.md26
-rw-r--r--gcc/config/rs6000/altivec.md78
-rw-r--r--gcc/config/rs6000/rs6000.c148
-rw-r--r--gcc/config/rs6000/rs6000.md11
-rw-r--r--gcc/config/rs6000/vector.md7
-rw-r--r--gcc/config/sh/sh.c2
-rw-r--r--gcc/config/sh/sh_treg_combine.cc7
-rw-r--r--gcc/config/sparc/sparc.c3
-rw-r--r--gcc/config/sparc/sparc.md8
-rw-r--r--gcc/config/xtensa/xtensa.c29
-rw-r--r--gcc/config/xtensa/xtensa.h4
-rw-r--r--gcc/config/xtensa/xtensa.md7
-rw-r--r--gcc/coverage.c12
-rw-r--r--gcc/coverage.h1
-rw-r--r--gcc/cp/ChangeLog182
-rw-r--r--gcc/cp/class.c2
-rw-r--r--gcc/cp/constexpr.c172
-rw-r--r--gcc/cp/cp-gimplify.c36
-rw-r--r--gcc/cp/decl.c10
-rw-r--r--gcc/cp/error.c3
-rw-r--r--gcc/cp/init.c16
-rw-r--r--gcc/cp/mangle.c2
-rw-r--r--gcc/cp/parser.c54
-rw-r--r--gcc/cp/pt.c2
-rw-r--r--gcc/cp/semantics.c24
-rw-r--r--gcc/cp/tree.c11
-rw-r--r--gcc/cp/typeck.c2
-rw-r--r--gcc/cselib.c36
-rw-r--r--gcc/diagnostic.c2
-rw-r--r--gcc/doc/extend.texi2
-rw-r--r--gcc/doc/gcov-dump.texi10
-rw-r--r--gcc/doc/gcov-tool.texi50
-rw-r--r--gcc/doc/gcov.texi153
-rw-r--r--gcc/doc/install.texi10
-rw-r--r--gcc/doc/invoke.texi10
-rw-r--r--gcc/doc/lto.texi2
-rw-r--r--gcc/dwarf2out.c3
-rw-r--r--gcc/expmed.c54
-rw-r--r--gcc/expr.c44
-rw-r--r--gcc/fold-const.c68
-rw-r--r--gcc/fortran/ChangeLog52
-rw-r--r--gcc/fortran/error.c2
-rw-r--r--gcc/fortran/expr.c3
-rw-r--r--gcc/fortran/openmp.c5
-rw-r--r--gcc/fortran/trans-common.c2
-rw-r--r--gcc/fortran/trans-expr.c2
-rw-r--r--gcc/fortran/trans-openmp.c36
-rw-r--r--gcc/fortran/trans.c4
-rw-r--r--gcc/function.c17
-rw-r--r--gcc/gcc.c3
-rw-r--r--gcc/gcov-dump.c2
-rw-r--r--gcc/gcov-io.c8
-rw-r--r--gcc/gcov-tool.c18
-rw-r--r--gcc/gcov.c72
-rw-r--r--gcc/genmatch.c1
-rw-r--r--gcc/gimple-fold.c7
-rw-r--r--gcc/gimple-ssa-strength-reduction.c192
-rw-r--r--gcc/gimplify.c8
-rw-r--r--gcc/go/ChangeLog4
-rw-r--r--gcc/graphite-isl-ast-to-gimple.c2
-rw-r--r--gcc/internal-fn.c5
-rw-r--r--gcc/ipa-cp.c6
-rw-r--r--gcc/ipa-devirt.c10
-rw-r--r--gcc/ipa-icf-gimple.c27
-rw-r--r--gcc/ipa-icf-gimple.h6
-rw-r--r--gcc/ipa-icf.c2
-rw-r--r--gcc/ipa-pure-const.c3
-rw-r--r--gcc/ipa-split.c9
-rw-r--r--gcc/ipa-visibility.c3
-rw-r--r--gcc/ira-costs.c2
-rw-r--r--gcc/ira-int.h2
-rw-r--r--gcc/java/ChangeLog4
-rw-r--r--gcc/jit/ChangeLog4
-rw-r--r--gcc/loop-doloop.c11
-rw-r--r--gcc/lra-constraints.c7
-rw-r--r--gcc/lto/ChangeLog13
-rw-r--r--gcc/lto/lto-lang.c6
-rw-r--r--gcc/objc/ChangeLog4
-rw-r--r--gcc/objcp/ChangeLog4
-rw-r--r--gcc/omp-low.c43
-rw-r--r--gcc/params.def2
-rw-r--r--gcc/po/ChangeLog4
-rw-r--r--gcc/pretty-print.c2
-rw-r--r--gcc/real.c6
-rw-r--r--gcc/sel-sched.c1
-rw-r--r--gcc/simplify-rtx.c41
-rw-r--r--gcc/system.h12
-rw-r--r--gcc/testsuite/ChangeLog788
-rw-r--r--gcc/testsuite/c-c++-common/Wunused-var-16.c15
-rw-r--r--gcc/testsuite/c-c++-common/asan/pr79944.c18
-rw-r--r--gcc/testsuite/c-c++-common/builtin-shuffle-1.c22
-rw-r--r--gcc/testsuite/c-c++-common/gomp/pr79512.c14
-rw-r--r--gcc/testsuite/c-c++-common/gomp/pr81006.c10
-rw-r--r--gcc/testsuite/c-c++-common/pr77624-1.c14
-rw-r--r--gcc/testsuite/c-c++-common/pr77624-2.c26
-rw-r--r--gcc/testsuite/c-c++-common/pr79641.c4
-rw-r--r--gcc/testsuite/c-c++-common/pr81052.c28
-rw-r--r--gcc/testsuite/c-c++-common/pr82112.c13
-rw-r--r--gcc/testsuite/c-c++-common/tsan/pr68260.c28
-rw-r--r--gcc/testsuite/c-c++-common/ubsan/float-cast-overflow-1.c3
-rw-r--r--gcc/testsuite/c-c++-common/ubsan/pr81604.c31
-rw-r--r--gcc/testsuite/g++.dg/asan/pr77396-2.C12
-rw-r--r--gcc/testsuite/g++.dg/asan/pr77396.C12
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/constexpr-list1.C15
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/gen-attrs-62.C5
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/initlist-base2.C21
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/initlist-base3.C17
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/mutable1.C12
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/pr78341.C4
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/pr78649.C16
-rw-r--r--gcc/testsuite/g++.dg/cpp1y/constexpr-77467.C128
-rw-r--r--gcc/testsuite/g++.dg/cpp1y/constexpr-empty3.C14
-rw-r--r--gcc/testsuite/g++.dg/cpp1y/constexpr-switch4.C27
-rw-r--r--gcc/testsuite/g++.dg/cpp1y/feat-cxx11.C6
-rw-r--r--gcc/testsuite/g++.dg/cpp1y/feat-cxx14.C6
-rw-r--r--gcc/testsuite/g++.dg/cpp1y/feat-cxx98.C8
-rw-r--r--gcc/testsuite/g++.dg/cpp1y/feat-neg.C8
-rw-r--r--gcc/testsuite/g++.dg/cpp1y/pr77739.C15
-rw-r--r--gcc/testsuite/g++.dg/debug/dwarf2/pr77363.C20
-rw-r--r--gcc/testsuite/g++.dg/ext/altivec-18.C14
-rw-r--r--gcc/testsuite/g++.dg/ext/int128-5.C10
-rw-r--r--gcc/testsuite/g++.dg/ext/pr80363.C12
-rw-r--r--gcc/testsuite/g++.dg/gomp/pr71910.C13
-rw-r--r--gcc/testsuite/g++.dg/gomp/pr79664.C142
-rw-r--r--gcc/testsuite/g++.dg/gomp/pr80141.C8
-rw-r--r--gcc/testsuite/g++.dg/gomp/pr81154.C51
-rw-r--r--gcc/testsuite/g++.dg/init/ref23.C15
-rw-r--r--gcc/testsuite/g++.dg/ipa/pr77905.C21
-rw-r--r--gcc/testsuite/g++.dg/ipa/pr79931.C24
-rw-r--r--gcc/testsuite/g++.dg/ipa/pr80205.C34
-rw-r--r--gcc/testsuite/g++.dg/opt/nrv18.C12
-rw-r--r--gcc/testsuite/g++.dg/opt/pr79396.C13
-rw-r--r--gcc/testsuite/g++.dg/opt/pr80385.C14
-rw-r--r--gcc/testsuite/g++.dg/other/i386-11.C57
-rw-r--r--gcc/testsuite/g++.dg/template/init11.C9
-rw-r--r--gcc/testsuite/g++.dg/tls/pr77285-1.C7
-rw-r--r--gcc/testsuite/g++.dg/tls/pr77285-2.C17
-rw-r--r--gcc/testsuite/g++.dg/torture/pr77919-2.C10
-rw-r--r--gcc/testsuite/g++.dg/torture/pr77919.C11
-rw-r--r--gcc/testsuite/g++.dg/torture/pr80129.C14
-rw-r--r--gcc/testsuite/g++.dg/torture/pr80171.C184
-rw-r--r--gcc/testsuite/g++.dg/torture/pr80334.C19
-rw-r--r--gcc/testsuite/g++.dg/torture/pr81354.C24
-rw-r--r--gcc/testsuite/g++.dg/torture/pr81987.C61
-rw-r--r--gcc/testsuite/g++.dg/ubsan/return-4.C18
-rw-r--r--gcc/testsuite/g++.dg/ubsan/return-5.C19
-rw-r--r--gcc/testsuite/g++.dg/ubsan/return-6.C20
-rw-r--r--gcc/testsuite/g++.dg/vect/simd-clone-7.cc10
-rw-r--r--gcc/testsuite/gcc.c-torture/compile/pr79197.c10
-rw-r--r--gcc/testsuite/gcc.c-torture/compile/pr79411.c22
-rw-r--r--gcc/testsuite/gcc.c-torture/compile/pr82337.c25
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/ieee/pr72824-2.c21
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/ieee/pr72824.c19
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/pr77767.c16
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/pr78378.c18
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/pr80692.c13
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/pr81503.c15
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/pr81555.c24
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/pr81556.c23
-rw-r--r--gcc/testsuite/gcc.dg/align-3.c11
-rw-r--r--gcc/testsuite/gcc.dg/asan/pr80166.c24
-rw-r--r--gcc/testsuite/gcc.dg/asan/pr80168.c12
-rw-r--r--gcc/testsuite/gcc.dg/ipa/pr48195.c2
-rw-r--r--gcc/testsuite/gcc.dg/ipa/pr80104.c15
-rw-r--r--gcc/testsuite/gcc.dg/ipa/pr81696.c26
-rw-r--r--gcc/testsuite/gcc.dg/ipa/pr82001.c21
-rw-r--r--gcc/testsuite/gcc.dg/lto/pr50199_0.c17
-rw-r--r--gcc/testsuite/gcc.dg/pch/pr66343-1.c15
-rw-r--r--gcc/testsuite/gcc.dg/pch/pr66343-1.hs8
-rw-r--r--gcc/testsuite/gcc.dg/pch/pr66343-2.c10
-rw-r--r--gcc/testsuite/gcc.dg/pch/pr66343-2.hs8
-rw-r--r--gcc/testsuite/gcc.dg/pr67410.c15
-rw-r--r--gcc/testsuite/gcc.dg/pr72816.c9
-rw-r--r--gcc/testsuite/gcc.dg/pr77587.c14
-rw-r--r--gcc/testsuite/gcc.dg/pr77587a.c23
-rw-r--r--gcc/testsuite/gcc.dg/pr79494.c22
-rw-r--r--gcc/testsuite/gcc.dg/pr79499.c13
-rw-r--r--gcc/testsuite/gcc.dg/pr79570.c12
-rw-r--r--gcc/testsuite/gcc.dg/pr80112.c21
-rw-r--r--gcc/testsuite/gcc.dg/pr80286.c23
-rw-r--r--gcc/testsuite/gcc.dg/pr81192.c22
-rw-r--r--gcc/testsuite/gcc.dg/pr81621.c5
-rw-r--r--gcc/testsuite/gcc.dg/pr82112.c21
-rw-r--r--gcc/testsuite/gcc.dg/tls/pr78796.c32
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr68528.c17
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr75964.c28
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr78416.c17
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr79666.c30
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr79732.c5
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr80025.c24
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr80122.c52
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr80362.c10
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr80539.c22
-rw-r--r--gcc/testsuite/gcc.dg/ubsan/pr70878.c9
-rw-r--r--gcc/testsuite/gcc.dg/ubsan/pr80097.c10
-rw-r--r--gcc/testsuite/gcc.dg/ubsan/pr81162.c17
-rw-r--r--gcc/testsuite/gcc.dg/vector-1.c8
-rw-r--r--gcc/testsuite/gcc.target/arm/fpscr.c16
-rw-r--r--gcc/testsuite/gcc.target/avr/isr-test.h282
-rw-r--r--gcc/testsuite/gcc.target/avr/torture/isr-01-simple.c98
-rw-r--r--gcc/testsuite/gcc.target/avr/torture/isr-02-call.c60
-rw-r--r--gcc/testsuite/gcc.target/avr/torture/isr-03-fixed.c146
-rw-r--r--gcc/testsuite/gcc.target/i386/avx-pr80286.c26
-rw-r--r--gcc/testsuite/gcc.target/i386/mpx/pr79987.c5
-rw-r--r--gcc/testsuite/gcc.target/i386/pr77377.c6
-rw-r--r--gcc/testsuite/gcc.target/i386/pr77594.c11
-rw-r--r--gcc/testsuite/gcc.target/i386/pr78227-1.c30
-rw-r--r--gcc/testsuite/gcc.target/i386/pr78227-2.c30
-rw-r--r--gcc/testsuite/gcc.target/i386/pr79559.c11
-rw-r--r--gcc/testsuite/gcc.target/i386/pr79568-1.c18
-rw-r--r--gcc/testsuite/gcc.target/i386/pr79568-2.c18
-rw-r--r--gcc/testsuite/gcc.target/i386/pr79568-3.c19
-rw-r--r--gcc/testsuite/gcc.target/i386/pr79729.c8
-rw-r--r--gcc/testsuite/gcc.target/i386/pr79807.c12
-rw-r--r--gcc/testsuite/gcc.target/i386/pr79901.c22
-rw-r--r--gcc/testsuite/gcc.target/i386/pr79932-1.c19
-rw-r--r--gcc/testsuite/gcc.target/i386/pr79932-2.c78
-rw-r--r--gcc/testsuite/gcc.target/i386/pr80569.c9
-rw-r--r--gcc/testsuite/gcc.target/i386/pr81128.c65
-rw-r--r--gcc/testsuite/gcc.target/i386/pr81300.c30
-rw-r--r--gcc/testsuite/gcc.target/i386/pr81375.c10
-rw-r--r--gcc/testsuite/gcc.target/i386/pr81471.c13
-rw-r--r--gcc/testsuite/gcc.target/i386/pr81766.c5
-rw-r--r--gcc/testsuite/gcc.target/powerpc/pr79197.c11
-rw-r--r--gcc/testsuite/gcc.target/powerpc/pr80210.c10
-rw-r--r--gcc/testsuite/gcc.target/powerpc/pr81833-1.c59
-rw-r--r--gcc/testsuite/gcc.target/powerpc/pr81833-2.c59
-rw-r--r--gcc/testsuite/gcc.target/powerpc/pr82112.c16
-rw-r--r--gcc/testsuite/gcc.target/sparc/sparc-ret-3.c53
-rw-r--r--gcc/testsuite/gfortran.dg/gomp/map-1.f902
-rw-r--r--gcc/testsuite/gfortran.dg/gomp/pr69183.f9011
-rw-r--r--gcc/testsuite/gfortran.dg/gomp/pr77500.f909
-rw-r--r--gcc/testsuite/gfortran.dg/gomp/pr77516.f9012
-rw-r--r--gcc/testsuite/gfortran.dg/gomp/pr77665.f9018
-rw-r--r--gcc/testsuite/gfortran.dg/gomp/pr77666.f9026
-rw-r--r--gcc/testsuite/gfortran.dg/gomp/pr78298.f9028
-rw-r--r--gcc/testsuite/gfortran.dg/gomp/pr78866-1.f9019
-rw-r--r--gcc/testsuite/gfortran.dg/gomp/pr78866-2.f909
-rw-r--r--gcc/testsuite/gfortran.dg/proc_ptr_comp_50.f9026
-rw-r--r--gcc/testsuite/gfortran.dg/warn_target_lifetime_3.f902
-rw-r--r--gcc/testsuite/gfortran.dg/warn_target_lifetime_4.f9028
-rw-r--r--gcc/toplev.c5
-rw-r--r--gcc/tree-cfg.c50
-rw-r--r--gcc/tree-chkp.c3
-rw-r--r--gcc/tree-chrec.c14
-rw-r--r--gcc/tree-eh.c6
-rw-r--r--gcc/tree-inline.c120
-rw-r--r--gcc/tree-inline.h2
-rw-r--r--gcc/tree-loop-distribution.c31
-rw-r--r--gcc/tree-nested.c44
-rw-r--r--gcc/tree-ssa-loop-ivopts.c6
-rw-r--r--gcc/tree-ssa-reassoc.c30
-rw-r--r--gcc/tree-ssa-structalias.c21
-rw-r--r--gcc/tree-ssa-tail-merge.c3
-rw-r--r--gcc/tree-vect-data-refs.c2
-rw-r--r--gcc/tree-vrp.c26
-rw-r--r--gcc/tsan.c65
-rw-r--r--gcc/ubsan.c33
-rw-r--r--gnattools/ChangeLog4
-rw-r--r--gotools/ChangeLog4
-rw-r--r--include/ChangeLog4
-rw-r--r--intl/ChangeLog4
-rw-r--r--libada/ChangeLog4
-rw-r--r--libatomic/ChangeLog4
-rw-r--r--libbacktrace/ChangeLog4
-rw-r--r--libcc1/ChangeLog4
-rw-r--r--libcilkrts/ChangeLog4
-rw-r--r--libcpp/ChangeLog4
-rw-r--r--libcpp/po/ChangeLog4
-rw-r--r--libdecnumber/ChangeLog4
-rw-r--r--libffi/ChangeLog4
-rw-r--r--libgcc/ChangeLog95
-rw-r--r--libgcc/config.host2
-rw-r--r--libgcc/config/aarch64/linux-unwind.h2
-rw-r--r--libgcc/config/alpha/linux-unwind.h2
-rw-r--r--libgcc/config/arm/unwind-arm.c22
-rw-r--r--libgcc/config/arm/unwind-arm.h7
-rw-r--r--libgcc/config/bfin/linux-unwind.h2
-rw-r--r--libgcc/config/i386/linux-unwind.h4
-rw-r--r--libgcc/config/libbid/ChangeLog4
-rw-r--r--libgcc/config/m68k/linux-unwind.h2
-rw-r--r--libgcc/config/nios2/linux-unwind.h2
-rw-r--r--libgcc/config/pa/linux-unwind.h2
-rw-r--r--libgcc/config/sh/linux-unwind.h2
-rw-r--r--libgcc/config/sparc/lb1spc.S6
-rw-r--r--libgcc/config/tilepro/linux-unwind.h2
-rw-r--r--libgcc/config/xtensa/ieee754-df.S2
-rw-r--r--libgcc/config/xtensa/ieee754-sf.S2
-rw-r--r--libgcc/config/xtensa/linux-unwind.h32
-rw-r--r--libgcc/config/xtensa/t-elf2
-rw-r--r--libgcc/config/xtensa/t-linux2
-rw-r--r--libgcc/config/xtensa/t-windowed2
-rw-r--r--libgcc/config/xtensa/unwind-dw2-xtensa.c2
-rw-r--r--libgcc/libgcov-driver.c9
-rw-r--r--libgfortran/ChangeLog12
-rw-r--r--libgfortran/libgfortran.h4
-rw-r--r--libgfortran/runtime/environ.c11
-rw-r--r--libgo/go/syscall/syscall_linux_s390.go25
-rw-r--r--libgo/go/syscall/syscall_linux_s390x.go25
-rw-r--r--libgomp/ChangeLog36
-rw-r--r--libgomp/env.c2
-rw-r--r--libgomp/hashtab.h34
-rw-r--r--libgomp/testsuite/libgomp.c++/pr45784.C5
-rw-r--r--libgomp/testsuite/libgomp.c/pr45784.c41
-rw-r--r--libgomp/testsuite/libgomp.c/pr80394.c22
-rw-r--r--libgomp/testsuite/libgomp.c/pr81687-1.c23
-rw-r--r--libgomp/testsuite/libgomp.c/pr81687-2.c27
-rw-r--r--libiberty/ChangeLog13
-rw-r--r--libiberty/cp-demangle.c6
-rw-r--r--libiberty/testsuite/demangle-expected3
-rw-r--r--libitm/ChangeLog4
-rw-r--r--libjava/ChangeLog11
-rw-r--r--libjava/classpath/ChangeLog4
-rw-r--r--libjava/include/i386-signal.h2
-rw-r--r--libjava/include/s390-signal.h2
-rw-r--r--libjava/include/x86_64-signal.h2
-rw-r--r--libjava/libltdl/ChangeLog4
-rw-r--r--libmpx/ChangeLog4
-rw-r--r--libobjc/ChangeLog4
-rw-r--r--liboffloadmic/ChangeLog4
-rw-r--r--libquadmath/ChangeLog9
-rw-r--r--libquadmath/math/roundq.c4
-rw-r--r--libsanitizer/ChangeLog52
-rw-r--r--libsanitizer/asan/asan_globals.cc7
-rw-r--r--libsanitizer/asan/asan_linux.cc1
-rw-r--r--libsanitizer/sanitizer_common/sanitizer_common_interceptors.inc3
-rw-r--r--libsanitizer/sanitizer_common/sanitizer_linux.cc3
-rw-r--r--libsanitizer/sanitizer_common/sanitizer_linux.h4
-rw-r--r--libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.h14
-rw-r--r--libsanitizer/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cc2
-rw-r--r--libsanitizer/tsan/tsan_platform_linux.cc2
-rw-r--r--libssp/ChangeLog4
-rw-r--r--libstdc++-v3/ChangeLog304
-rw-r--r--libstdc++-v3/config/io/basic_file_stdio.cc8
-rw-r--r--libstdc++-v3/config/os/mingw32-w64/error_constants.h101
-rw-r--r--libstdc++-v3/doc/doxygen/mainpage.html6
-rw-r--r--libstdc++-v3/doc/html/faq.html2
-rw-r--r--libstdc++-v3/doc/html/manual/abi.html38
-rw-r--r--libstdc++-v3/doc/html/manual/ext_demangling.html2
-rw-r--r--libstdc++-v3/doc/html/manual/memory.html10
-rw-r--r--libstdc++-v3/doc/html/manual/mt_allocator_impl.html2
-rw-r--r--libstdc++-v3/doc/html/manual/source_code_style.html2
-rw-r--r--libstdc++-v3/doc/html/manual/source_organization.html4
-rw-r--r--libstdc++-v3/doc/html/manual/status.html2
-rw-r--r--libstdc++-v3/doc/xml/manual/abi.xml72
-rw-r--r--libstdc++-v3/doc/xml/manual/allocator.xml10
-rw-r--r--libstdc++-v3/doc/xml/manual/appendix_contributing.xml6
-rw-r--r--libstdc++-v3/doc/xml/manual/extensions.xml2
-rw-r--r--libstdc++-v3/doc/xml/manual/mt_allocator.xml2
-rw-r--r--libstdc++-v3/doc/xml/manual/status_cxx2011.xml5
-rw-r--r--libstdc++-v3/include/bits/basic_ios.h4
-rw-r--r--libstdc++-v3/include/bits/basic_string.h5
-rw-r--r--libstdc++-v3/include/bits/hashtable.h13
-rw-r--r--libstdc++-v3/include/bits/ios_base.h4
-rw-r--r--libstdc++-v3/include/bits/istream.tcc50
-rw-r--r--libstdc++-v3/include/bits/locale_conv.h3
-rw-r--r--libstdc++-v3/include/bits/regex.h2
-rw-r--r--libstdc++-v3/include/bits/regex.tcc17
-rw-r--r--libstdc++-v3/include/bits/regex_compiler.h7
-rw-r--r--libstdc++-v3/include/bits/shared_ptr_base.h14
-rw-r--r--libstdc++-v3/include/bits/sstream.tcc19
-rw-r--r--libstdc++-v3/include/bits/stl_stack.h2
-rw-r--r--libstdc++-v3/include/experimental/fs_dir.h7
-rw-r--r--libstdc++-v3/include/ext/new_allocator.h4
-rw-r--r--libstdc++-v3/include/ext/pb_ds/detail/binary_heap_/binary_heap_.hpp21
-rw-r--r--libstdc++-v3/include/ext/pb_ds/detail/binary_heap_/insert_fn_imps.hpp1
-rw-r--r--libstdc++-v3/include/std/chrono3
-rw-r--r--libstdc++-v3/include/std/functional12
-rw-r--r--libstdc++-v3/include/std/istream12
-rw-r--r--libstdc++-v3/include/std/scoped_allocator56
-rw-r--r--libstdc++-v3/include/std/sstream21
-rw-r--r--libstdc++-v3/include/std/utility19
-rw-r--r--libstdc++-v3/libsupc++/cxxabi.h2
-rw-r--r--libstdc++-v3/python/libstdcxx/v6/printers.py28
-rw-r--r--libstdc++-v3/python/libstdcxx/v6/xmethods.py2
-rw-r--r--libstdc++-v3/testsuite/18_support/bad_exception/23591_thread-1.c1
-rw-r--r--libstdc++-v3/testsuite/19_diagnostics/headers/system_error/errc_std_c++0x.cc2
-rw-r--r--libstdc++-v3/testsuite/20_util/duration/cons/dr1177.cc42
-rw-r--r--libstdc++-v3/testsuite/20_util/duration/literals/range.cc2
-rw-r--r--libstdc++-v3/testsuite/20_util/function/assign/move.cc5
-rw-r--r--libstdc++-v3/testsuite/20_util/function/cons/move.cc5
-rw-r--r--libstdc++-v3/testsuite/20_util/owner_less/noexcept.cc32
-rw-r--r--libstdc++-v3/testsuite/20_util/reference_wrapper/80504.cc35
-rw-r--r--libstdc++-v3/testsuite/20_util/reference_wrapper/invoke.cc11
-rw-r--r--libstdc++-v3/testsuite/20_util/scoped_allocator/3.cc67
-rw-r--r--libstdc++-v3/testsuite/20_util/scoped_allocator/outermost.cc92
-rw-r--r--libstdc++-v3/testsuite/20_util/shared_ptr/observers/owner_before.cc6
-rw-r--r--libstdc++-v3/testsuite/20_util/time_point/cons/81468.cc35
-rw-r--r--libstdc++-v3/testsuite/20_util/weak_ptr/observers/owner_before.cc11
-rw-r--r--libstdc++-v3/testsuite/22_locale/codecvt/codecvt_utf16/79980.cc2
-rw-r--r--libstdc++-v3/testsuite/22_locale/codecvt/codecvt_utf16/80041.cc2
-rw-r--r--libstdc++-v3/testsuite/22_locale/codecvt/codecvt_utf16/members.cc2
-rw-r--r--libstdc++-v3/testsuite/22_locale/codecvt/codecvt_utf16/misaligned.cc2
-rw-r--r--libstdc++-v3/testsuite/22_locale/codecvt/codecvt_utf8/79980.cc2
-rw-r--r--libstdc++-v3/testsuite/22_locale/codecvt/codecvt_utf8/members.cc2
-rw-r--r--libstdc++-v3/testsuite/22_locale/codecvt/codecvt_utf8_utf16/79511.cc2
-rw-r--r--libstdc++-v3/testsuite/22_locale/codecvt/codecvt_utf8_utf16/members.cc2
-rw-r--r--libstdc++-v3/testsuite/22_locale/conversions/buffer/2.cc40
-rw-r--r--libstdc++-v3/testsuite/23_containers/unordered_map/cons/81891.cc68
-rw-r--r--libstdc++-v3/testsuite/27_io/basic_fstream/53984.cc64
-rw-r--r--libstdc++-v3/testsuite/27_io/basic_istream/sentry/char/53984.cc41
-rw-r--r--libstdc++-v3/testsuite/27_io/basic_stringstream/assign/81338.cc40
-rw-r--r--libstdc++-v3/testsuite/28_regex/basic_regex/ctors/basic/iter.cc32
-rw-r--r--libstdc++-v3/testsuite/28_regex/regression.cc22
-rw-r--r--libstdc++-v3/testsuite/abi/header_cxxabi.c1
-rw-r--r--libstdc++-v3/testsuite/ext/pb_ds/regression/priority_queue_binary_heap-62045.cc51
-rw-r--r--libstdc++-v3/testsuite/ext/pb_ds/regression/priority_queues.cc2
-rw-r--r--libstdc++-v3/testsuite/ext/stdio_filebuf/char/79820.cc39
-rw-r--r--libstdc++-v3/testsuite/ext/stdio_filebuf/char/81751.cc53
-rw-r--r--libstdc++-v3/testsuite/libstdc++-prettyprinters/59161.cc69
-rw-r--r--libstdc++-v3/testsuite/libstdc++-prettyprinters/simple.cc28
-rw-r--r--libstdc++-v3/testsuite/libstdc++-prettyprinters/simple11.cc28
-rw-r--r--libstdc++-v3/testsuite/libstdc++-xmethods/list.cc3
-rw-r--r--libstdc++-v3/testsuite/util/testsuite_hooks.h6
-rw-r--r--libvtv/ChangeLog4
-rw-r--r--lto-plugin/ChangeLog13
-rw-r--r--lto-plugin/lto-plugin.c13
-rw-r--r--maintainer-scripts/ChangeLog4
-rw-r--r--zlib/ChangeLog4
468 files changed, 11388 insertions, 2509 deletions
diff --git a/ChangeLog b/ChangeLog
index e036320a1b8..a5c86b4ff38 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2017-10-10 Release Manager
+
+ * GCC 5.5.0 released.
+
2017-01-09 Andreas Tobler <andreast@gcc.gnu.org>
Backport from mainline
diff --git a/boehm-gc/ChangeLog b/boehm-gc/ChangeLog
index 71511de87e4..6ed8c4e8b94 100644
--- a/boehm-gc/ChangeLog
+++ b/boehm-gc/ChangeLog
@@ -1,3 +1,7 @@
+2017-10-10 Release Manager
+
+ * GCC 5.5.0 released.
+
2016-06-03 Release Manager
* GCC 5.4.0 released.
diff --git a/config/ChangeLog b/config/ChangeLog
index 210ecccb3fc..9ee090c1049 100644
--- a/config/ChangeLog
+++ b/config/ChangeLog
@@ -1,3 +1,7 @@
+2017-10-10 Release Manager
+
+ * GCC 5.5.0 released.
+
2016-06-03 Release Manager
* GCC 5.4.0 released.
diff --git a/contrib/ChangeLog b/contrib/ChangeLog
index 56f239ec37b..17fdf3a5504 100644
--- a/contrib/ChangeLog
+++ b/contrib/ChangeLog
@@ -1,3 +1,11 @@
+2017-10-10 Release Manager
+
+ * GCC 5.5.0 released.
+
+2017-10-02 Thomas Schwinge <thomas@codesourcery.com>
+
+ * gcc_update (files_and_dependencies): Handle libbacktrace.
+
2016-06-03 Release Manager
* GCC 5.4.0 released.
diff --git a/contrib/gcc_update b/contrib/gcc_update
index 2df9da407ef..29329d58075 100755
--- a/contrib/gcc_update
+++ b/contrib/gcc_update
@@ -173,6 +173,10 @@ liboffloadmic/configure: liboffloadmic/configure.ac
liboffloadmic/plugin/aclocal.m4: liboffloadmic/plugin/configure.ac
liboffloadmic/plugin/Makefile.in: liboffloadmic/plugin/Makefile.am
liboffloadmic/plugin/configure: liboffloadmic/plugin/configure.ac
+libbacktrace/aclocal.m4: libbacktrace/configure.ac
+libbacktrace/Makefile.in: libbacktrace/Makefile.am libbacktrace/aclocal.m4
+libbacktrace/configure: libbacktrace/configure.ac libbacktrace/aclocal.m4
+libbacktrace/config.h.in: libbacktrace/configure.ac libbacktrace/aclocal.m4
# Top level
Makefile.in: Makefile.tpl Makefile.def
configure: configure.ac config/acx.m4
diff --git a/contrib/reghunt/ChangeLog b/contrib/reghunt/ChangeLog
index b11274798da..eb2b8a152ea 100644
--- a/contrib/reghunt/ChangeLog
+++ b/contrib/reghunt/ChangeLog
@@ -1,3 +1,7 @@
+2017-10-10 Release Manager
+
+ * GCC 5.5.0 released.
+
2016-06-03 Release Manager
* GCC 5.4.0 released.
diff --git a/contrib/regression/ChangeLog b/contrib/regression/ChangeLog
index 170e5368100..fb615212436 100644
--- a/contrib/regression/ChangeLog
+++ b/contrib/regression/ChangeLog
@@ -1,3 +1,7 @@
+2017-10-10 Release Manager
+
+ * GCC 5.5.0 released.
+
2016-06-03 Release Manager
* GCC 5.4.0 released.
diff --git a/fixincludes/ChangeLog b/fixincludes/ChangeLog
index 7de49ed6993..2abaaedb953 100644
--- a/fixincludes/ChangeLog
+++ b/fixincludes/ChangeLog
@@ -1,3 +1,7 @@
+2017-10-10 Release Manager
+
+ * GCC 5.5.0 released.
+
2017-01-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
Backport from mainline
diff --git a/gcc/BASE-VER b/gcc/BASE-VER
index ade65226e0a..d50359de185 100644
--- a/gcc/BASE-VER
+++ b/gcc/BASE-VER
@@ -1 +1 @@
-5.4.1
+5.5.0
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 583f500bbe8..54fa6c604b1 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,1237 @@
+2017-10-10 Release Manager
+
+ * GCC 5.5.0 released.
+
+2017-10-02 Jakub Jelinek <jakub@redhat.com>
+
+ Backported from mainline
+ 2017-09-30 Jakub Jelinek <jakub@redhat.com>
+
+ * config/i386/i386.c (ix86_split_idivmod): Use mode instead of
+ always SImode for DIV and MOD in REG_EQUAL notes.
+
+2017-10-02 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
+
+ Backport from mainline
+ 2017-09-29 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
+
+ PR tree-optimization/82337
+ * gimple-ssa-strength-reduction.c (find_phi_def): Don't record a
+ phi definition if the PHI result appears in an abnormal PHI.
+ (find_basis_for_base_expr): Don't record a basis if the LHS of the
+ basis appears in an abnormal PHI.
+
+2017-09-26 Iain Sandoe <iain@codesourcery.com>
+ Ryan Mounce <ryan@mounce.com.au>
+
+ PR bootstrap/81037
+ Backport from mainline r235362
+ 2016-04-22 Szabolcs Nagy <szabolcs.nagy@arm.com>
+
+ * system.h (list, map, set, vector): Include conditionally.
+ * auto-profile.c (INCLUDE_MAP, INCLUDE_SET): Define.
+ * graphite-isl-ast-to-gimple.c (INCLUDE_MAP): Define.
+ * ipa-icf.c (INCLUDE_LIST): Define.
+ * ipa-icf-gimple.c (INCLUDE_LIST): Define.
+ * config/sh/sh.c (INCLUDE_VECTOR): Define.
+ * config/sh/sh_treg_combine.cc (INCLUDE_ALGORITHM): Define.
+ (INCLUDE_LIST, INCLUDE_VECTOR): Define.
+ * fortran/trans-common.c (INCLUDE_MAP): Define.
+
+ Backport from mainline r235361
+ 2016-04-22 Szabolcs Nagy <szabolcs.nagy@arm.com>
+
+ * auto-profile.c: Remove <string.h> include.
+ * diagnostic.c: Remove <new> include.
+ * genmatch.c: Likewise.
+ * pretty-print.c: Likewise.
+ * toplev.c: Likewise
+ * c/c-objc-common.c: Likewise.
+ * cp/error.c: Likewise.
+ * fortran/error.c: Likewise.
+
+2017-09-22 Alexander Monakov <amonakov@ispras.ru>
+
+ PR tree-optimization/71702
+ Backport r230667
+ 2015-11-20 Jim Wilson <jim.wilson@linaro.org>
+
+ * tree-vect-data-refs.c (compare_tree): Call STRIP_NOPS.
+
+2017-09-21 Alan Modra <amodra@gmail.com>
+
+ PR target/81996
+ * gcc/config/rs6000/rs6000.c (rs6000_return_addr): Use
+ stack_pointer_rtx for count 0. Update comments. Break up
+ large rtl expression.
+
+2017-09-19 Martin Liska <mliska@suse.cz>
+
+ PR c++/81355
+ * config/i386/i386.c (sorted_attr_string): Skip empty strings.
+
+2017-09-19 Martin Liska <mliska@suse.cz>
+
+ Revert backport:
+ 2017-08-10 Martin Liska <mliska@suse.cz>
+
+ PR c++/81355
+ * c-attribs.c (handle_target_attribute):
+ Report warning for an empty string argument of target attribute.
+
+2017-09-18 Richard Biener <rguenther@suse.de>
+
+ Backport from mainline
+ 2017-04-10 Richard Biener <rguenther@suse.de>
+
+ PR middle-end/80362
+ * fold-const.c (fold_binary_loc): Look at unstripped ops when
+ looking for NEGATE_EXPR in -A / -B to A / B folding.
+
+ 2015-11-25 Richard Biener <rguenther@suse.de>
+
+ PR middle-end/68528
+ * fold-const.c (fold_binary_loc): Do not call negate_expr_p
+ on stripped operands.
+
+ 2017-03-27 Richard Biener <rguenther@suse.de>
+
+ PR middle-end/80171
+ * gimple-fold.c (fold_ctor_reference): Properly guard against
+ NULL return value from canonicalize_constructor_val.
+
+ 2016-06-13 Richard Biener <rguenther@suse.de>
+
+ PR middle-end/64516
+ * fold-const.c (fold_unary_loc): Preserve alignment when
+ folding a VIEW_CONVERT_EXPR into a MEM_REF.
+
+2017-09-16 Jakub Jelinek <jakub@redhat.com>
+
+ Backported from mainline
+ 2017-08-09 Jakub Jelinek <jakub@redhat.com>
+
+ PR c/81687
+ * omp-low.c (omp_copy_decl): Don't remap FORCED_LABEL or DECL_NONLOCAL
+ LABEL_DECLs.
+ * tree-cfg.c (move_stmt_op): Don't adjust DECL_CONTEXT of FORCED_LABEL
+ or DECL_NONLOCAL labels.
+ (move_stmt_r) <case GIMPLE_LABEL>: Adjust DECL_CONTEXT of FORCED_LABEL
+ or DECL_NONLOCAL labels here.
+
+ 2017-08-08 Richard Biener <rguenther@suse.de>
+
+ PR middle-end/81766
+ * function.c (thread_prologue_and_epilogue_insns): Restore
+ behavior of always calling find_many_sub_basic_blocks on
+ the inserted prologue.
+
+ 2017-08-03 Jakub Jelinek <jakub@redhat.com>
+
+ PR target/81621
+ * bb-reorder.c (pass_partition_blocks::execute): Return TODO_df_finish
+ after setting changeable df flags.
+
+ PR middle-end/81052
+ * omp-low.c (diagnose_sb_0): Handle flag_openmp_simd like flag_openmp.
+ (pass_diagnose_omp_blocks::gate): Enable also for flag_openmp_simd.
+
+ 2017-08-02 Jakub Jelinek <jakub@redhat.com>
+
+ PR middle-end/79499
+ * function.c (thread_prologue_and_epilogue_insns): Determine blocks
+ for find_many_sub_basic_blocks bitmap by looking up BLOCK_FOR_INSN
+ of first NONDEBUG_INSN_P in each of the split_prologue_seq and
+ prologue_seq sequences - if any.
+
+2017-09-15 Martin Liska <mliska@suse.cz>
+
+ Backport from mainline
+ 2017-08-11 Martin Liska <mliska@suse.cz>
+
+ PR tree-opt/79987
+ * tree-chkp.c (chkp_get_bounds_for_decl_addr): Do not instrument
+ variables of void type.
+
+2017-09-15 Martin Liska <mliska@suse.cz>
+
+ Backport from mainline
+ 2017-06-28 Martin Liska <mliska@suse.cz>
+
+ PR sanitizer/81224
+ * asan.c (instrument_derefs): Bail out inner references
+ that are hard register variables.
+
+2017-09-15 Martin Liska <mliska@suse.cz>
+
+ Backport from mainline
+ 2017-08-30 Martin Liska <mliska@suse.cz>
+
+ PR inline-asm/82001
+ * ipa-icf-gimple.c (func_checker::compare_tree_list_operand):
+ Rename to ...
+ (func_checker::compare_asm_inputs_outputs): ... this function.
+ (func_checker::compare_gimple_asm): Use the function to compare
+ also ASM constrains.
+ * ipa-icf-gimple.h: Rename the function.
+
+2017-09-15 Martin Liska <mliska@suse.cz>
+
+ Backport from mainline
+ 2017-08-10 Martin Liska <mliska@suse.cz>
+
+ PR c++/81355
+ * c-attribs.c (handle_target_attribute):
+ Report warning for an empty string argument of target attribute.
+
+2017-09-15 Martin Liska <mliska@suse.cz>
+
+ Backport from mainline
+ 2017-08-08 Martin Liska <mliska@suse.cz>
+
+ PR tree-opt/81696
+ * ipa-icf-gimple.c (func_checker::compare_cst_or_decl): Consider
+ LABEL_DECLs that can be from a different function.
+
+2017-09-15 Martin Liska <mliska@suse.cz>
+
+ Backport from mainline
+ 2017-06-28 Martin Liska <mliska@suse.cz>
+
+ PR ipa/81128
+ * ipa-visibility.c (non_local_p): Handle visibility.
+
+2017-09-12 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
+
+ Backport from mainline
+ 2017-09-05 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
+
+ PR target/81833
+ * config/rs6000/altivec.md (altivec_vsum2sws): Convert from a
+ define_insn to a define_expand.
+ (altivec_vsum2sws_direct): New define_insn.
+ (altivec_vsumsws): Convert from a define_insn to a define_expand.
+
+2017-09-11 Max Filippov <jcmvbkbc@gmail.com>
+
+ Backport from mainline
+ PR target/82181
+ * config/xtensa/xtensa.c (xtensa_mem_offset): Check that both
+ words of DImode object are reachable by xtensa_uimm8x4 access.
+
+2017-09-06 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
+
+ Backport from mainline:
+ 2017-08-30 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
+
+ PR tree-optimization/81987
+ * gimple-ssa-strength-reduction.c (insert_initializers): Don't
+ insert an initializer in a location not dominated by the stride
+ definition.
+
+2017-09-05 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
+
+ Backport from mainline
+ 2017-08-29 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
+ Jakub Jelinek <jakub@redhat.com>
+ Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/81503
+ * gimple-ssa-strength-reduction.c (replace_mult_candidate): Ensure
+ folded constant fits in the target type; reorder tests for clarity.
+
+2017-08-22 Peter Bergner <bergner@vnet.ibm.com>
+
+ Backport from mainline
+ 2017-08-17 Peter Bergner <bergner@vnet.ibm.com>
+
+ PR target/80210
+ * config/rs6000/rs6000.c (rs6000_activate_target_options): New function.
+ (rs6000_set_current_function): Rewrite function to use it.
+
+2017-08-22 Georg-Johann Lay <avr@gjlay.de>
+
+ Backport from 2017-07-26 gcc-7-branch r250562.
+
+ PR 81487
+ * tree-ssa-structalias.c (alias_get_name): Use xasprintf instead
+ of asprintf.
+
+2017-08-22 Georg-Johann Lay <avr@gjlay.de>
+
+ Backport from trunk r247719.
+ 2017-05-06 Richard Sandiford <richard.sandiford@linaro.org>
+
+ PR rtl-optimization/75964
+ * simplify-rtx.c (simplify_const_relational_operation): Remove
+ invalid handling of comparisons of integer ABS.
+
+2017-08-22 Georg-Johann Lay <avr@gjlay.de>
+
+ Backport from 2017-07-05 trunk r249995.
+
+ PR target/81305
+ * config/avr/avr.c (avr_out_movhi_mr_r_xmega) [CONSTANT_ADDRESS_P]:
+ Don't depend on "optimize > 0".
+ (out_movhi_r_mr, out_movqi_mr_r): Same.
+ (out_movhi_mr_r, out_movqi_r_mr): Same.
+ (avr_address_cost) [CONSTANT_ADDRESS_P]: Don't depend cost for
+ io_address_operand on "optimize > 0".
+
+2017-08-22 Georg-Johann Lay <avr@gjlay.de>
+
+ Backport from 2016-06-15 trunk r237486.
+ Backport from 2017-07-12 trunk r250156.
+
+ PR target/79883
+ PR target/67353
+ * config/avr/avr.c (avr_set_current_function): Warn misspelled ISR
+ only if -Wmisspelled-isr is on. In diagnostic messages: Quote
+ keywords and (parts of) identifiers.
+ [WITH_AVRLIBC]: Warn functions named "ISR", "SIGNAL" or "INTERUPT".
+ * doc/invoke.texi (AVR Options) <-Wmisspelled-isr>: Document.
+
+2017-08-22 Georg-Johann Lay <avr@gjlay.de>
+
+ Backport from 2017-04-19 trunk r246997.
+
+ PR target/80462
+ * config/avr/avr.c (tree.h): Include it.
+ (hash-table.h): Include it.
+ (hash-set.h): Include it.
+ (symtab.h): Include it.
+ (inchash.h): Include it.
+ (function.h): Include it.
+ (hash-map.h): Include it.
+ (plugin-api.h): Include it.
+ (ipa-ref.h): Include it.
+ (cgraph.h): Include it.
+ (avr_encode_section_info): Don't warn for uninitialized progmem
+ variable if it's just an alias.
+
+ Backport from 2017-07-12 trunk r250151.
+
+ PR target/81407
+ * config/avr/avr.c (avr_encode_section_info)
+ [progmem && !TREE_READONLY]: Error if progmem object needs
+ constructing.
+
+2017-08-22 Georg-Johann Lay <avr@gjlay.de>
+
+ Backport from 2017-08-22 trunk r251256.
+
+ PR target/81910
+ * config/avr/avr.c (avr_handle_addr_attribute): Early return if
+ not VAR_P. Filter attribute warnings with OPT_Wattributes.
+ (avr_attribute_table) <io, io_low, address>: Initialize
+ .decl_required with true.
+
+2017-08-19 Uros Bizjak <ubizjak@gmail.com>
+
+ PR target/81894
+ * doc/extend.texi (x86 Built-in Functions): Correct the name of
+ __builtin_ia32_lzcnt_u16.
+
+2017-08-17 Uros Bizjak <ubizjak@gmail.com>
+
+ Backport from mainline
+ 2017-08-17 Maxim Ostapenko <m.ostapenko@samsung.com>
+
+ PR target/81861
+ * config/i386/i386.c (ix86_option_override_internal): Save target
+ specific options after ix86_stack_protector_guard_reg was changed.
+
+2017-08-16 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
+
+ Backport from mainline
+ 2017-08-08 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
+
+ PR tree-optimization/81354
+ * gimple-ssa-strength-reduction.c (create_add_on_incoming_edge):
+ Insert on edges rather than explicitly creating landing pads.
+ (analyze_candidates_and_replace): Commit edge inserts.
+
+2017-07-31 Jakub Jelinek <jakub@redhat.com>
+
+ PR sanitizer/81604
+ * ubsan.c (ubsan_type_descriptor): For UBSAN_PRINT_ARRAY don't
+ change type to the element type, instead add eltype variable and
+ use it where we are interested in the element type.
+
+2017-07-27 Jakub Jelinek <jakub@redhat.com>
+
+ PR tree-optimization/81555
+ PR tree-optimization/81556
+ * tree-ssa-reassoc.c (rewrite_expr_tree): Add NEXT_CHANGED argument,
+ if true, force CHANGED for the recursive invocation.
+ (reassociate_bb): Remember original length of ops array, pass
+ len != orig_len as NEXT_CHANGED in rewrite_expr_tree call.
+
+2017-07-26 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
+
+ Backport from mainline r235874
+ 2016-05-04 Alan Modra <amodra@gmail.com>
+
+ * config/rs6000/rs6000.c (rs6000_elf_output_toc_section_asm_op):
+ Align .toc.
+
+2016-07-25 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
+
+ Backport from mainline
+ 2016-07-14 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
+
+ PR tree-optimization/81162
+ * gimple-ssa-strength-reduction.c (replace_mult_candidate): Don't
+ replace a negate with an add.
+
+2017-07-24 Uros Bizjak <ubizjak@gmail.com>
+
+ PR target/80569
+ * config/i386/i386.c (ix86_option_override_internal): Disable
+ BMI, BMI2 and TBM instructions for -m16.
+
+2017-07-18 Uros Bizjak <ubizjak@gmail.com>
+
+ PR target/81471
+ * config/i386/i386.md (rorx_immediate_operand): New mode attribute.
+ (*bmi2_rorx<mode>3_1): Use rorx_immediate_operand as
+ operand 2 predicate.
+ (*bmi2_rorxsi3_1_zext): Use const_0_to_31_operand as
+ operand 2 predicate.
+ (ror,rol -> rorx splitters): Use const_int_operand as
+ operand 2 predicate.
+
+2017-07-14 Uros Bizjak <ubizjak@gmail.com>
+
+ Backport from mainline
+ 2017-07-10 Uros Bizjak <ubizjak@gmail.com>
+
+ PR target/81375
+ * config/i386/i386.md (divsf3): Add TARGET_SSE to TARGET_SSE_MATH.
+ (rcpps): Ditto.
+ (*rsqrtsf2_sse): Ditto.
+ (rsqrtsf2): Ditto.
+ (div<mode>3): Macroize insn from divdf3 and divsf3
+ using MODEF mode iterator.
+
+ Backport from mainline
+ 2017-07-04 Uros Bizjak <ubizjak@gmail.com>
+
+ PR target/81300
+ * config/i386/i386.md (setcc + movzbl/and to xor + setcc peepholes):
+ Require dead FLAGS_REG at the beginning of a peephole.
+
+2017-07-03 Tom de Vries <tom@codesourcery.com>
+
+ backport from mainline:
+ PR tree-optimization/81192
+ 2017-07-03 Tom de Vries <tom@codesourcery.com>
+
+ * tree-ssa-tail-merge.c (same_succ_flush_bb): Handle
+ BB_SAME_SUCC (bb) == NULL.
+
+2017-06-27 Segher Boessenkool <segher@kernel.crashing.org>
+
+ Revert:
+ Backports from trunk:
+
+ 2017-04-12 Segher Boessenkool <segher@kernel.crashing.org>
+ PR target/80382
+ * config/rs6000/sync.md (atomic_load<mode>, atomic_store<mode): Test
+ for quad_address_p for TImode, instead of just not indexed_address.
+
+ 2017-06-09 Segher Boessenkool <segher@kernel.crashing.org>
+ PR target/80966
+ * config/rs6000/rs6000.c (rs6000_emit_allocate_stack): Assert that
+ gen_add3_insn did not fail.
+ * config/rs6000/rs6000.md (add<mode>3): If asked to add a constant to
+ r0, construct that number in a temporary reg and add that reg to r0.
+ If asked to put the result in r0 as well, fail.
+
+2017-06-27 Segher Boessenkool <segher@kernel.crashing.org>
+
+ Backports from trunk:
+
+ 2016-08-15 Segher Boessenkool <segher@kernel.crashing.org>
+ PR rtl-optimization/73650
+ * lra-constraints.c (simple_move_p): If the insn is multiple_sets
+ it is not a simple move.
+
+ 2017-01-20 Segher Boessenkool <segher@kernel.crashing.org>
+ PR target/61729
+ PR target/77850
+ * config/rs6000/rs6000.c (rs6000_gimplify_va_arg): Adjust address to
+ read from, for big endian.
+
+ 2017-04-12 Segher Boessenkool <segher@kernel.crashing.org>
+ PR target/80382
+ * config/rs6000/sync.md (atomic_load<mode>, atomic_store<mode): Test
+ for quad_address_p for TImode, instead of just not indexed_address.
+
+ 2017-05-17 Segher Boessenkool <segher@kernel.crashing.org>
+ PR middle-end/80692
+ * real.c (do_compare): Give decimal_do_compare preference over
+ comparing just the signs.
+
+ 2017-05-31 Segher Boessenkool <segher@kernel.crashing.org>
+ PR target/80618
+ * config/rs6000/vector.md (*vector_uneq<mode>): Write the nor in the
+ splitter result in the canonical way.
+
+ 2017-06-09 Segher Boessenkool <segher@kernel.crashing.org>
+ PR target/80966
+ * config/rs6000/rs6000.c (rs6000_emit_allocate_stack): Assert that
+ gen_add3_insn did not fail.
+ * config/rs6000/rs6000.md (add<mode>3): If asked to add a constant to
+ r0, construct that number in a temporary reg and add that reg to r0.
+ If asked to put the result in r0 as well, fail.
+
+ 2017-06-23 Segher Boessenkool <segher@kernel.crashing.org>
+ PR middle-end/80902
+ * builtins.c (expand_builtin_atomic_fetch_op): If emitting code after
+ a call, force the call to not be a tail call.
+
+2017-06-23 Thomas Preud'homme <thomas.preudhomme@arm.com>
+
+ Backport from mainline
+ 2017-05-04 Prakhar Bahuguna <prakhar.bahuguna@arm.com>
+
+ * config/arm/arm-builtins.c (arm_init_builtins): Rename
+ __builtin_arm_ldfscr to __builtin_arm_get_fpscr, and rename
+ __builtin_arm_stfscr to __builtin_arm_set_fpscr.
+
+2017-06-22 Martin Liska <mliska@suse.cz>
+
+ Backport from mainline
+ 2017-05-31 Martin Liska <mliska@suse.cz>
+
+ PR target/79155
+ * config/i386/cpuid.h: Fix typo in a comment in cpuid.h.
+
+2017-06-22 Martin Liska <mliska@suse.cz>
+
+ Backport from mainline
+ 2017-05-30 Martin Liska <mliska@suse.cz>
+
+ PR other/80909
+ * auto-profile.c (get_function_decl_from_block): Fix
+ parenthesis.
+
+2017-06-22 Martin Liska <mliska@suse.cz>
+
+ Backport from mainline
+ 2017-05-26 Martin Liska <mliska@suse.cz>
+
+ PR ipa/80663
+ * params.def: Bound partial-inlining-entry-probability param.
+
+2017-06-22 Martin Liska <mliska@suse.cz>
+
+ Backport from mainline
+ 2017-05-16 Martin Liska <mliska@suse.cz>
+
+ PR ipa/79850.
+ * ipa-devirt.c (odr_types_equivalent_p): Fix typo.
+
+2017-06-22 Martin Liska <mliska@suse.cz>
+
+ Backport from mainline
+ 2017-05-15 Martin Liska <mliska@suse.cz>
+
+ PR driver/31468
+ * gcc.c (process_command): Do not allow empty argument of -o option.
+
+2017-06-22 Martin Liska <mliska@suse.cz>
+
+ Backport from mainline
+ 2017-05-02 Martin Liska <mliska@suse.cz>
+
+ * doc/gcov.texi: Add missing preposition.
+ * gcov.c (function_info::function_info): Properly fill up
+ all member variables.
+
+2017-06-22 Martin Liska <mliska@suse.cz>
+
+ Backport from mainline
+ 2017-05-02 Martin Liska <mliska@suse.cz>
+
+ PR other/80589
+ * common.opt: Fix typo.
+ * doc/invoke.texi: Likewise.
+
+2017-06-22 Martin Liska <mliska@suse.cz>
+
+ Backport from mainline
+ 2017-04-28 Martin Liska <mliska@suse.cz>
+
+ * doc/gcov.texi: Enhance documentation of gcov.
+
+2017-06-22 Martin Liska <mliska@suse.cz>
+
+ Backport from mainline
+ 2017-04-28 Martin Liska <mliska@suse.cz>
+
+ * doc/gcov.texi: Sort options in alphabetic order.
+ * doc/gcov-dump.texi: Likewise.
+ * doc/gcov-tool.texi: Likewise.
+ * gcov.c (print_usage): Likewise.
+ * gcov-dump.c (print_usage): Likewise.
+ * gcov-tool.c (print_merge_usage_message): Likewise.
+ (print_rewrite_usage_message): Likewise.
+ (print_overlap_usage_message): Likewise.
+
+2017-06-22 Martin Liska <mliska@suse.cz>
+
+ Backport from mainline
+ 2017-04-28 Martin Liska <mliska@suse.cz>
+
+ PR gcov-profile/53915
+ * gcov.c (format_gcov): Print 'NAN %' when top > bottom.
+
+2017-06-22 Martin Liska <mliska@suse.cz>
+
+ Backport from mainline
+ 2017-04-28 Martin Liska <mliska@suse.cz>
+
+ PR driver/56469
+ * coverage.c (coverage_remove_note_file): New function.
+ * coverage.h: Declare the function.
+ * toplev.c (finalize): Clean if an error has been seen.
+
+2017-06-09 David S. Miller <davem@davemloft.net>
+
+ PR target/80968
+ * config/sparc/sparc.c (sparc_flat_expand_epilogue): Don't
+ emit frame blockage here.
+ (sparc_expand_epilogue): Do it here.
+ * config/sparc/sparc.md (return expander): Emit frame blockage
+ for alloca here too.
+
+2017-06-06 David S. Miller <davem@davemloft.net>
+
+ PR target/80968
+ * config/sparc/sparc.c (sparc_expand_prologue): Emit frame
+ blockage if function uses alloca.
+
+2017-06-01 Jakub Jelinek <jakub@redhat.com>
+
+ Backported from mainline
+ 2016-08-19 Jakub Jelinek <jakub@redhat.com>
+
+ * config/i386/rdseedintrin.h (_rdseed16_step, _rdseed32_step,
+ _rdseed64_step): Uglify argument names and/or local variable names
+ in inline functions.
+ * config/i386/rtmintrin.h (_xabort): Likewise.
+ * config/i386/avx512vlintrin.h (_mm256_ternarylogic_epi64,
+ _mm256_mask_ternarylogic_epi64, _mm256_maskz_ternarylogic_epi64,
+ _mm256_ternarylogic_epi32, _mm256_mask_ternarylogic_epi32,
+ _mm256_maskz_ternarylogic_epi32, _mm_ternarylogic_epi64,
+ _mm_mask_ternarylogic_epi64, _mm_maskz_ternarylogic_epi64,
+ _mm_ternarylogic_epi32, _mm_mask_ternarylogic_epi32,
+ _mm_maskz_ternarylogic_epi32): Likewise.
+ * config/i386/lwpintrin.h (__llwpcb, __lwpval32, __lwpval64,
+ __lwpins32, __lwpins64): Likewise.
+ * config/i386/avx2intrin.h (_mm_i32gather_pd, _mm_mask_i32gather_pd,
+ _mm256_i32gather_pd, _mm256_mask_i32gather_pd, _mm_i64gather_pd,
+ _mm_mask_i64gather_pd, _mm256_i64gather_pd, _mm256_mask_i64gather_pd,
+ _mm_i32gather_ps, _mm_mask_i32gather_ps, _mm256_i32gather_ps,
+ _mm256_mask_i32gather_ps, _mm_i64gather_ps, _mm_mask_i64gather_ps,
+ _mm256_i64gather_ps, _mm256_mask_i64gather_ps, _mm_i32gather_epi64,
+ _mm_mask_i32gather_epi64, _mm256_i32gather_epi64,
+ _mm256_mask_i32gather_epi64, _mm_i64gather_epi64,
+ _mm_mask_i64gather_epi64, _mm256_i64gather_epi64,
+ _mm256_mask_i64gather_epi64, _mm_i32gather_epi32,
+ _mm_mask_i32gather_epi32, _mm256_i32gather_epi32,
+ _mm256_mask_i32gather_epi32, _mm_i64gather_epi32,
+ _mm_mask_i64gather_epi32, _mm256_i64gather_epi32,
+ _mm256_mask_i64gather_epi32): Likewise.
+ * config/i386/pmm_malloc.h (_mm_malloc, _mm_free): Likewise.
+ * config/i386/ia32intrin.h (__writeeflags): Likewise.
+ * config/i386/avx512pfintrin.h (_mm512_mask_prefetch_i32gather_pd,
+ _mm512_mask_prefetch_i32gather_ps, _mm512_mask_prefetch_i64gather_pd,
+ _mm512_mask_prefetch_i64gather_ps, _mm512_prefetch_i32scatter_pd,
+ _mm512_prefetch_i32scatter_ps, _mm512_mask_prefetch_i32scatter_pd,
+ _mm512_mask_prefetch_i32scatter_ps, _mm512_prefetch_i64scatter_pd,
+ _mm512_prefetch_i64scatter_ps, _mm512_mask_prefetch_i64scatter_pd,
+ _mm512_mask_prefetch_i64scatter_ps): Likewise.
+ * config/i386/gmm_malloc.h (_mm_malloc, _mm_free): Likewise.
+ * config/i386/avx512fintrin.h (_mm512_ternarylogic_epi64,
+ _mm512_mask_ternarylogic_epi64, _mm512_maskz_ternarylogic_epi64,
+ _mm512_ternarylogic_epi32, _mm512_mask_ternarylogic_epi32,
+ _mm512_maskz_ternarylogic_epi32, _mm512_i32gather_ps,
+ _mm512_mask_i32gather_ps, _mm512_i32gather_pd, _mm512_i64gather_ps,
+ _mm512_i64gather_pd, _mm512_i32gather_epi32, _mm512_i32gather_epi64,
+ _mm512_i64gather_epi32, _mm512_i64gather_epi64): Likewise.
+
+2017-05-30 Max Filippov <jcmvbkbc@gmail.com>
+
+ Backport from mainline
+ 2017-05-29 Max Filippov <jcmvbkbc@gmail.com>
+
+ * config/xtensa/xtensa.c (xtensa_emit_call): Use
+ HOST_WIDE_INT_PRINT_HEX instead of 0x%lx format string.
+ (print_operand): Use HOST_WIDE_INT_PRINT_DEC instead of %ld
+ format string.
+
+2017-05-30 Max Filippov <jcmvbkbc@gmail.com>
+
+ Backport from mainline
+ 2016-11-29 Max Filippov <jcmvbkbc@gmail.com>
+
+ * config/xtensa/xtensa.c (hwloop_optimize): Don't emit zero
+ overhead loop start between a call and its CALL_ARG_LOCATION
+ note.
+
+2017-05-30 Max Filippov <jcmvbkbc@gmail.com>
+
+ Backport from mainline
+ 2015-09-15 Max Filippov <jcmvbkbc@gmail.com>
+
+ * config/xtensa/xtensa.h (DWARF_ALT_FRAME_RETURN_COLUMN): New
+ definition.
+ (DWARF_FRAME_REGISTERS): Reserve space for one extra register in
+ call0 ABI.
+
+2017-05-30 Max Filippov <jcmvbkbc@gmail.com>
+
+ Backport from mainline
+ 2015-09-15 Max Filippov <jcmvbkbc@gmail.com>
+
+ * config/xtensa/xtensa.c (xtensa_call_tls_desc): Use a10 or a2
+ to pass TLS call argument, according to current ABI.
+ * config/xtensa/xtensa.md (tls_call pattern): Use callx8 or
+ callx0 for TLS call, according to current ABI.
+
+2017-05-30 Jakub Jelinek <jakub@redhat.com>
+
+ Backported from mainline
+ 2017-04-25 Jakub Jelinek <jakub@redhat.com>
+
+ * Makefile.in (s-options): Invoke opt-gather.awk with LC_ALL=C in the
+ environment.
+
+ 2017-04-11 Jakub Jelinek <jakub@redhat.com>
+
+ PR rtl-optimization/80385
+ * simplify-rtx.c (simplify_unary_operation_1): Don't transform
+ (not (neg X)) into (plus X -1) for complex or non-integral modes.
+
+ PR libgomp/80394
+ * omp-low.c (scan_omp_task): Don't optimize away empty tasks
+ if they have any depend clauses.
+
+ 2017-04-04 Jakub Jelinek <jakub@redhat.com>
+
+ PR target/80286
+ * config/i386/i386.c (ix86_expand_args_builtin): If op has scalar
+ int mode, convert_modes it to mode as unsigned, otherwise use
+ lowpart_subreg to mode rather than SImode.
+ * config/i386/sse.md (<mask_codefor>ashr<mode>3<mask_name>,
+ ashr<mode>3, ashr<mode>3<mask_name>, <shift_insn><mode>3<mask_name>):
+ Use DImode instead of SImode for the shift count operand.
+ * config/i386/mmx.md (mmx_ashr<mode>3, mmx_<shift_insn><mode>3):
+ Likewise.
+
+ 2017-03-31 Jakub Jelinek <jakub@redhat.com>
+
+ PR debug/80025
+ * cselib.c (cselib_hasher::equal): Pass 0 to rtx_equal_for_cselib_1.
+ (rtx_equal_for_cselib_1): Add depth argument. If depth
+ is 128, don't look up VALUE locs and punt. Increment
+ depth in recursive calls when walking VALUE locs.
+
+ 2017-03-27 Jakub Jelinek <jakub@redhat.com>
+
+ PR sanitizer/80168
+ * asan.c (instrument_derefs): Copy over last operand from
+ original COMPONENT_REF to the new COMPONENT_REF with
+ DECL_BIT_FIELD_REPRESENTATIVE.
+ * ubsan.c (instrument_object_size): Likewise.
+
+ 2017-03-24 Jakub Jelinek <jakub@redhat.com>
+
+ PR rtl-optimization/80112
+ * loop-doloop.c (doloop_condition_get): Don't check condition
+ if cmp isn't SET with IF_THEN_ELSE src.
+
+ 2017-03-22 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/80129
+ * gimplify.c (gimplify_modify_expr_rhs) <case COND_EXPR>: Clear
+ TREE_READONLY on result if writing it more than once.
+
+ 2017-03-09 Jakub Jelinek <jakub@redhat.com>
+
+ PR sanitizer/79944
+ * asan.c (get_mem_refs_of_builtin_call): For BUILT_IN_ATOMIC* and
+ BUILT_IN_SYNC*, determine the access type from the size suffix and
+ always build a MEM_REF with that type. Handle forgotten
+ BUILT_IN_SYNC_FETCH_AND_NAND_16 and BUILT_IN_SYNC_NAND_AND_FETCH_16.
+
+ PR target/79932
+ * config/i386/avx512vlintrin.h (_mm256_cmpge_epi32_mask,
+ _mm256_cmpge_epi64_mask, _mm256_cmpge_epu32_mask,
+ _mm256_cmpge_epu64_mask, _mm256_cmple_epi32_mask,
+ _mm256_cmple_epi64_mask, _mm256_cmple_epu32_mask,
+ _mm256_cmple_epu64_mask, _mm256_cmplt_epi32_mask,
+ _mm256_cmplt_epi64_mask, _mm256_cmplt_epu32_mask,
+ _mm256_cmplt_epu64_mask, _mm256_cmpneq_epi32_mask,
+ _mm256_cmpneq_epi64_mask, _mm256_cmpneq_epu32_mask,
+ _mm256_cmpneq_epu64_mask, _mm256_mask_cmpge_epi32_mask,
+ _mm256_mask_cmpge_epi64_mask, _mm256_mask_cmpge_epu32_mask,
+ _mm256_mask_cmpge_epu64_mask, _mm256_mask_cmple_epi32_mask,
+ _mm256_mask_cmple_epi64_mask, _mm256_mask_cmple_epu32_mask,
+ _mm256_mask_cmple_epu64_mask, _mm256_mask_cmplt_epi32_mask,
+ _mm256_mask_cmplt_epi64_mask, _mm256_mask_cmplt_epu32_mask,
+ _mm256_mask_cmplt_epu64_mask, _mm256_mask_cmpneq_epi32_mask,
+ _mm256_mask_cmpneq_epi64_mask, _mm256_mask_cmpneq_epu32_mask,
+ _mm256_mask_cmpneq_epu64_mask, _mm_cmpge_epi32_mask,
+ _mm_cmpge_epi64_mask, _mm_cmpge_epu32_mask, _mm_cmpge_epu64_mask,
+ _mm_cmple_epi32_mask, _mm_cmple_epi64_mask, _mm_cmple_epu32_mask,
+ _mm_cmple_epu64_mask, _mm_cmplt_epi32_mask, _mm_cmplt_epi64_mask,
+ _mm_cmplt_epu32_mask, _mm_cmplt_epu64_mask, _mm_cmpneq_epi32_mask,
+ _mm_cmpneq_epi64_mask, _mm_cmpneq_epu32_mask, _mm_cmpneq_epu64_mask,
+ _mm_mask_cmpge_epi32_mask, _mm_mask_cmpge_epi64_mask,
+ _mm_mask_cmpge_epu32_mask, _mm_mask_cmpge_epu64_mask,
+ _mm_mask_cmple_epi32_mask, _mm_mask_cmple_epi64_mask,
+ _mm_mask_cmple_epu32_mask, _mm_mask_cmple_epu64_mask,
+ _mm_mask_cmplt_epi32_mask, _mm_mask_cmplt_epi64_mask,
+ _mm_mask_cmplt_epu32_mask, _mm_mask_cmplt_epu64_mask,
+ _mm_mask_cmpneq_epi32_mask, _mm_mask_cmpneq_epi64_mask,
+ _mm_mask_cmpneq_epu32_mask, _mm_mask_cmpneq_epu64_mask): Move
+ definitions outside of __OPTIMIZE__ guarded section.
+
+ PR target/79932
+ * config/i386/avx512bwintrin.h (_mm512_packs_epi32,
+ _mm512_maskz_packs_epi32, _mm512_mask_packs_epi32,
+ _mm512_packus_epi32, _mm512_maskz_packus_epi32,
+ _mm512_mask_packus_epi32): Move definitions outside of __OPTIMIZE__
+ guarded section.
+
+ 2017-03-07 Jakub Jelinek <jakub@redhat.com>
+
+ PR rtl-optimization/79901
+ * config/i386/sse.md (*avx512bw_<code><mode>3<mask_name>): Renamed to
+ ...
+ (*avx512f_<code><mode>3<mask_name>): ... this.
+ (<code><mode>3 with maxmin code iterator): Use VI8_AVX2_AVX512F
+ iterator instead of VI8_AVX2_AVX512BW.
+
+ PR rtl-optimization/79901
+ * expr.c (expand_expr_real_2): For vector MIN/MAX, if there is no
+ min/max expander, expand it using expand_vec_cond_expr.
+
+ 2017-03-03 Jakub Jelinek <jakub@redhat.com>
+
+ PR target/79807
+ * config/i386/i386.c (ix86_expand_multi_arg_builtin): If target
+ is a memory operand, increase num_memory.
+ (ix86_expand_args_builtin): Likewise.
+
+ 2017-02-28 Jakub Jelinek <jakub@redhat.com>
+
+ PR target/79729
+ * config/i386/i386.c (ix86_print_operand) <case 'R'>: Replace
+ gcc_unreachable with output_operand_lossage.
+
+ 2017-02-25 Jakub Jelinek <jakub@redhat.com>
+
+ PR middle-end/79396
+ * tree-eh.c (operation_could_trap_p, stmt_could_throw_1_p): Handle
+ FMA_EXPR like tcc_binary or tcc_unary.
+
+ 2017-02-21 Jakub Jelinek <jakub@redhat.com>
+
+ PR target/79570
+ * sel-sched.c (moveup_expr_cached): Don't call sel_bb_head
+ on temporarily removed DEBUG_INSNs.
+
+ PR target/79494
+ * config/i386/i386.c (ix86_expand_split_stack_prologue): Call
+ make_reg_eh_region_note_nothrow_nononlocal on call_insn.
+
+ 2017-02-20 Jakub Jelinek <jakub@redhat.com>
+
+ PR target/79568
+ * config/i386/i386.c (ix86_expand_builtin): Handle
+ OPTION_MASK_ISA_AVX512VL and OPTION_MASK_ISA_64BIT in
+ ix86_builtins_isa[fcode].isa as a requirement of those
+ flags and any other flag in the bitmask.
+ (ix86_init_mmx_sse_builtins): Use 0 instead of
+ ~OPTION_MASK_ISA_64BIT as mask.
+ * config/i386/i386-builtin.def (bdesc_special_args,
+ bdesc_args): Likewise.
+
+ 2017-02-18 Jakub Jelinek <jakub@redhat.com>
+
+ PR target/79559
+ * config/i386/i386.c (ix86_print_operand): Use output_operand_lossage
+ instead of gcc_assert for K, r and R code checks. Formatting fixes.
+
+ 2017-02-10 Jakub Jelinek <jakub@redhat.com>
+
+ PR tree-optimization/79411
+ * tree-ssa-reassoc.c (is_reassociable_op): Return false if
+ stmt operands are SSA_NAMEs used in abnormal phis.
+ (can_reassociate_p): Return false if op is SSA_NAME used in abnormal
+ phis.
+
+ 2017-02-07 Jakub Jelinek <jakub@redhat.com>
+ Richard Biener <rguenther@suse.de>
+
+ PR middle-end/79399
+ * ira-int.h (struct target_ira_int): Change x_max_struct_costs_size
+ type from int to size_t.
+ * ira-costs.c (struct_costs_size): Change type from int to size_t.
+
+ 2017-02-02 Jakub Jelinek <jakub@redhat.com>
+
+ PR target/79197
+ * config/rs6000/rs6000.md (*fixuns_trunc<mode>di2_fctiduz): Rename to ...
+ (fixuns_trunc<mode>di2): ... this, remove previous expander. Put all
+ conditions on a single line.
+
+ 2016-12-13 Jakub Jelinek <jakub@redhat.com>
+
+ PR ipa/77905
+ * ipa-pure-const.c (cdtor_p): Return true for
+ DECL_STATIC_{CON,DE}STRUCTOR even when it is
+ DECL_LOOPING_CONST_OR_PURE_P.
+
+ 2016-12-14 Wilco Dijkstra <wdijkstr@arm.com>
+ Jakub Jelinek <jakub@redhat.com>
+
+ PR target/78796
+ * config/aarch64/aarch64.c (aarch64_classify_symbol): Merge large
+ model checks into switch.
+
+ 2016-11-28 Jakub Jelinek <jakub@redhat.com>
+
+ PR fortran/78298
+ * tree-nested.c (convert_local_reference_stmt): After adding
+ shared (FRAME.NN) clause to omp parallel, task or target,
+ add it also to all outer omp parallel, task or target constructs.
+
+ 2016-11-23 Jakub Jelinek <jakub@redhat.com>
+
+ PR middle-end/69183
+ * omp-low.c (build_outer_var_ref): Change lastprivate argument
+ to code, pass it recursively, adjust uses. For OMP_CLAUSE_PRIVATE
+ on worksharing constructs, treat it like clauses on simd construct.
+ Formatting fix.
+ (lower_rec_input_clauses): For OMP_CLAUSE_PRIVATE_OUTER_REF pass
+ OMP_CLAUSE_PRIVATE as last argument to build_outer_var_ref.
+ (lower_lastprivate_clauses): Pass OMP_CLAUSE_LASTPRIVATE instead
+ of true as last argument to build_outer_var_ref.
+
+ 2016-11-22 Jakub Jelinek <jakub@redhat.com>
+
+ PR middle-end/78416
+ * expmed.c (expand_divmod): Use wide_int for computation of
+ op1_is_pow2. Don't set it if op1 is 0. Formatting fixes.
+ Use size <= HOST_BITS_PER_WIDE_INT instead of
+ HOST_BITS_PER_WIDE_INT >= size.
+
+ 2016-11-21 Jakub Jelinek <jakub@redhat.com>
+
+ PR middle-end/67335
+ * omp-low.c (simd_clone_adjust_argument_types): Use NULL prefix
+ for tmp simd array if DECL_NAME (parm) is NULL.
+
+ 2016-11-16 Jakub Jelinek <jakub@redhat.com>
+
+ PR rtl-optimization/78378
+ * combine.c (make_extraction): Use force_to_mode for non-{REG,MEM}
+ inner only if pos is 0. Fix up formatting.
+
+ 2016-11-07 Jakub Jelinek <jakub@redhat.com>
+
+ PR target/78227
+ * config/i386/i386.c (ix86_expand_sse_cmp): Force dest into
+ cmp_mode argument even for -O0 if cmp_mode != mode and maskcmp.
+
+ 2016-10-29 Jakub Jelinek <jakub@redhat.com>
+
+ PR rtl-optimization/77919
+ * expr.c (expand_expr_real_1) <normal_inner_ref>: Only avoid forcing
+ into memory if both modes are complex and their inner modes have the
+ same precision. If the two modes are different complex modes, convert
+ each part separately and generate a new CONCAT.
+
+ 2016-10-28 Jakub Jelinek <jakub@redhat.com>
+
+ PR rtl-optimization/77919
+ * expr.c (expand_expr_real_1) <normal_inner_ref>: Force CONCAT into
+ MEM if mode1 is not a complex mode.
+
+ 2016-10-05 Jakub Jelinek <jakub@redhat.com>
+
+ PR sanitizer/66343
+ * ubsan.c (ubsan_ids): New GTY(()) array.
+ (ubsan_type_descriptor, ubsan_create_data): Use ubsan_ids
+ instead of static local counters.
+
+ 2016-09-22 Jakub Jelinek <jakub@redhat.com>
+
+ PR fortran/77665
+ * tree-inline.c (remap_gimple_stmt): Set has_simduid_loops
+ for all IFN_GOMP_SIMD_* internal fns.
+
+ 2016-09-20 Jakub Jelinek <jakub@redhat.com>
+
+ PR middle-end/77624
+ * builtins.c (fold_builtin_atomic_always_lock_free): Only look through
+ cast to void * if the cast is from some other pointer type.
+
+ 2016-09-19 Jakub Jelinek <jakub@redhat.com>
+ Jan Hubicka <jh@suse.cz>
+
+ PR target/77587
+ * cgraph.c (cgraph_node::rtl_info): Pass &avail to
+ ultimate_alias_target call, return NULL if avail < AVAIL_AVAILABLE.
+ Call ultimate_alias_target just once, not up to 4 times.
+
+ 2016-09-16 Jakub Jelinek <jakub@redhat.com>
+ Eric Botcazou <ebotcazou@adacore.com>
+
+ PR middle-end/77594
+ * internal-fn.c (expand_arith_overflow) <case MINUS_EXPR>: Don't fall
+ through into expand_addsub_overflow after expand_neg_overflow.
+
+ 2016-09-14 Jakub Jelinek <jakub@redhat.com>
+
+ PR sanitizer/68260
+ * tsan.c: Include target.h.
+ (enum tsan_atomic_action): Add bool_clear and bool_test_and_set.
+ (BOOL_CLEAR, BOOL_TEST_AND_SET): Define.
+ (tsan_atomic_table): Add BUILT_IN_ATOMIC_CLEAR and
+ BUILT_IN_ATOMIC_TEST_AND_SET entries.
+ (instrument_builtin_call): Handle bool_clear and bool_test_and_set.
+
+ 2016-09-08 Jakub Jelinek <jakub@redhat.com>
+
+ PR fortran/77516
+ * omp-low.c (lower_rec_simd_input_clauses): Use max_vf for non-positive
+ OMP_CLAUSE_SAFELEN_EXPR.
+
+ 2016-08-30 Jakub Jelinek <jakub@redhat.com>
+
+ PR debug/77363
+ * dwarf2out.c (modified_type_die): Use lookup_type_die (type)
+ instead of lookup_type_die (type_main_variant (type)) even for array
+ types.
+
+ PR middle-end/77377
+ * simplify-rtx.c (avoid_constant_pool_reference): For out of bounds
+ constant pool reference return x instead of c.
+
+ 2016-08-16 Jakub Jelinek <jakub@redhat.com>
+
+ PR target/71910
+ * tree-cfg.c (execute_fixup_cfg): Add node variable, use it. Before inlining,
+ add cgraph edge for the added __builtin_unreachable call.
+
+ 2016-08-15 Martin Liska <mliska@suse.cz>
+ Jakub Jelinek <jakub@redhat.com>
+
+ PR tree-optimization/72824
+ * tree-loop-distribution.c (const_with_all_bytes_same)
+ <case VECTOR_CST>: Fix a typo.
+
+ 2016-08-09 Jakub Jelinek <jakub@redhat.com>
+
+ PR tree-optimization/72824
+ * tree-loop-distribution.c (const_with_all_bytes_same): Verify
+ real_zerop is not negative.
+
+ 2016-07-21 Jakub Jelinek <jakub@redhat.com>
+
+ PR sanitizer/71953
+ * asan.c (asan_dynamic_init_call): Call asan_init_shadow_ptr_types
+ before builtin_decl_implicit.
+
+2017-05-29 Eric Botcazou <ebotcazou@adacore.com>
+
+ * doc/install.texi (Options specification): Move entry of
+ --enable-sjlj-exceptions.
+
+2017-05-29 Martin Liska <mliska@suse.cz>
+
+ Backport from mainline
+ 2017-04-24 Jan Hubicka <hubicka@ucw.cz>
+
+ PR middle-end/79931
+ * ipa-devirt.c (dump_possible_polymorphic_call_targets): Fix ICE.
+
+2017-05-29 Martin Liska <mliska@suse.cz>
+
+ Backport from mainline
+ 2017-04-19 Richard Biener <rguenther@suse.de>
+
+ PR ipa/65972
+ * auto-profile.c (afdo_vpt_for_early_inline): Update SSA
+ when needed by AutoPGO.
+
+2017-05-29 Martin Liska <mliska@suse.cz>
+
+ Backport from mainline
+ 2017-04-19 Paulo J. Matos <paulo@matos-sorge.com>
+
+ PR lto/50345
+ * doc/lto.texi: Remove an extra 'that'.
+
+2017-05-29 Martin Liska <mliska@suse.cz>
+
+ Backport from mainline
+ 2017-04-18 Martin Liska <mliska@suse.cz>
+
+ PR gcov-profile/78783
+ * gcov-tool.c (gcov_output_files): Validate that destination
+ file is either removed by the tool or by a user.
+
+2017-05-29 Martin Liska <mliska@suse.cz>
+
+ Backport from mainline
+ 2017-04-13 Martin Liska <mliska@suse.cz>
+
+ PR gcov-profile/80413
+ * gcov-io.c (gcov_write_string): Copy to buffer just when
+ allocated size is greater than zero.
+
+2017-05-29 Martin Liska <mliska@suse.cz>
+
+ Backport from mainline
+ 2017-04-11 Martin Liska <mliska@suse.cz>
+
+ PR ipa/80212
+ * cgraph.c (cgraph_node::dump): Dump calls_comdat_local.
+ * ipa-split.c (split_function): Create a local comdat symbol
+ if caller is in a comdat group.
+
+2017-05-29 Martin Liska <mliska@suse.cz>
+
+ Backport from mainline
+ 2017-04-11 Martin Liska <mliska@suse.cz>
+
+ PR ipa/80212
+ * ipa-cp.c (determine_versionability): Handle calls_comdat_local
+ flags.
+
+2017-05-29 Martin Liska <mliska@suse.cz>
+
+ Backport from mainline
+ 2017-04-11 Martin Liska <mliska@suse.cz>
+
+ PR sanitizer/70878
+ * ubsan.c (instrument_object_size): Do not instrument register
+ variables.
+
+2017-05-29 Martin Liska <mliska@suse.cz>
+
+ Backport from mainline
+ 2017-04-10 Martin Liska <mliska@suse.cz>
+
+ PR gcov-profile/80224
+ * gcov.c (print_usage): Fix usage string.
+ (get_gcov_intermediate_filename): Remove.
+ (output_gcov_file): Use both for normal and intermediate format.
+ (generate_results): Do not initialize special file for
+ intermediate format.
+
+2017-05-29 Martin Liska <mliska@suse.cz>
+
+ Backport from mainline
+ 2017-03-28 Richard Biener <rguenther@suse.de>
+
+ PR ipa/80205
+ * tree-inline.c (copy_phis_for_bb): Do not create PHI node
+ without arguments, generate default definition of a SSA name.
+
+2017-05-29 Martin Liska <mliska@suse.cz>
+
+ Backport from mainline
+ 2017-03-28 Martin Liska <mliska@suse.cz>
+
+ PR ipa/80104
+ * cgraphunit.c (cgraph_node::expand_thunk): Mark argument of a
+ thunk call as DECL_GIMPLE_REG_P when vector or complex type.
+
+2017-05-26 Sheldon Lobo <smlobo@sheldon.us.oracle.com>
+
+ Backported from mainline
+ 2017-05-24 Sheldon Lobo <smlobo@sheldon.us.oracle.com>
+
+ * config/sparc/sparc.md (length): Return the correct value for -mflat
+ sibcalls to match output_sibcall.
+
+2017-05-19 Uros Bizjak <ubizjak@gmail.com>
+
+ Backport from mainline
+ 2017-05-18 Uros Bizjak <ubizjak@gmail.com>
+
+ PR target/80799
+ * config/i386/mmx.md (*mov<mode>_internal): Enable
+ alternatives 11, 12, 13 and 14 also for 32bit targets.
+ Remove alternatives 15, 16, 17 and 18.
+ * config/i386/sse.md (vec_concatv2di): Change
+ alternative (!x, *y) to (x, ?!*Yn).
+
+2017-05-15 Richard Biener <rguenther@suse.de>
+
+ Revert backport of
+ PR middle-end/80222
+ * gimple-fold.c (gimple_fold_indirect_ref): Do not touch
+ TYPE_REF_CAN_ALIAS_ALL references.
+ * fold-const.c (fold_indirect_ref_1): Likewise.
+
+2017-05-10 Richard Biener <rguenther@suse.de>
+
+ Backport from mainline
+ 2017-02-28 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/79732
+ * tree-inline.c (expand_call_inline): Handle anonymous
+ SSA lhs properly when inlining a function without return
+ value.
+
+ 2017-02-22 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/79666
+ * tree-vrp.c (extract_range_from_binary_expr_1): Make sure
+ to not symbolically negate if that may introduce undefined
+ overflow.
+
+2017-05-10 Richard Biener <rguenther@suse.de>
+
+ Backport from mainline
+ 2017-03-21 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/80122
+ * tree-inline.c (copy_bb): Do not expans va-arg packs or
+ va_arg_pack_len when the inlined call stmt requires pack
+ expansion itself.
+ * tree-inline.h (struct copy_body_data): Make call_stmt a gcall *.
+
+ 2017-03-28 Richard Biener <rguenther@suse.de>
+
+ PR middle-end/80222
+ * gimple-fold.c (gimple_fold_indirect_ref): Do not touch
+ TYPE_REF_CAN_ALIAS_ALL references.
+ * fold-const.c (fold_indirect_ref_1): Likewise.
+
+ 2017-04-06 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/80334
+ * tree-ssa-loop-ivopts.c (rewrite_use_address): Properly
+ preserve alignment of accesses.
+
+ 2017-04-27 Richard Biener <rguenther@suse.de>
+
+ PR middle-end/80539
+ * tree-chrec.c (chrec_fold_plus_poly_poly): Deal with not
+ being in loop-closed SSA form conservatively.
+ (chrec_fold_multiply_poly_poly): Likewise.
+
2016-05-08 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
Backport from mainline
@@ -78,13 +1312,13 @@
Backport from mainline
2017-03-30 Martin Jambor <mjambor@suse.cz>
- PR ipa/77333
- * cgraph.h (cgraph_build_function_type_skip_args): Declare.
- * cgraph.c (redirect_call_stmt_to_callee): Set gimple fntype so that
- it reflects the signature changes performed at the callee side.
- * cgraphclones.c (build_function_type_skip_args): Make public, renamed
- to cgraph_build_function_type_skip_args.
- (build_function_decl_skip_args): Adjust call to the above function.
+ PR ipa/77333
+ * cgraph.h (cgraph_build_function_type_skip_args): Declare.
+ * cgraph.c (redirect_call_stmt_to_callee): Set gimple fntype so that
+ it reflects the signature changes performed at the callee side.
+ * cgraphclones.c (build_function_type_skip_args): Make public, renamed
+ to cgraph_build_function_type_skip_args.
+ (build_function_decl_skip_args): Adjust call to the above function.
2017-04-11 Bin Cheng <bin.cheng@arm.com>
@@ -141,6 +1375,7 @@
<IX86_BUILTIN_RDRAND{16,32,64}_STEP>: Ditto. Use non-flags reg
clobbering instructions to zero extend op2.
+>>>>>>> .r248557
2017-03-22 Martin Liska <mliska@suse.cz>
Backport from mainline
@@ -970,11 +2205,11 @@
Backport from mainline
2016-11-07 Bernd Schmidt <bschmidt@redhat.com>
- PR rtl-optimization/77309
- * combine.c (make_compound_operation): Allow EQ for IN_CODE, and
- don't assume an equality comparison for plain COMPARE.
- (simplify_comparison): Pass a more accurate code to
- make_compound_operation.
+ PR rtl-optimization/77309
+ * combine.c (make_compound_operation): Allow EQ for IN_CODE, and
+ don't assume an equality comparison for plain COMPARE.
+ (simplify_comparison): Pass a more accurate code to
+ make_compound_operation.
2016-12-07 Segher Boessenkool <segher@kernel.crashing.org>
diff --git a/gcc/DATESTAMP b/gcc/DATESTAMP
index 05d952cb71f..915b0fd713c 100644
--- a/gcc/DATESTAMP
+++ b/gcc/DATESTAMP
@@ -1 +1 @@
-20170510
+20171010
diff --git a/gcc/Makefile.in b/gcc/Makefile.in
index 851567da6cc..23d78b14194 100644
--- a/gcc/Makefile.in
+++ b/gcc/Makefile.in
@@ -2001,6 +2001,7 @@ s-specs : Makefile
optionlist: s-options ; @true
s-options: $(ALL_OPT_FILES) Makefile $(srcdir)/opt-gather.awk
+ LC_ALL=C ; export LC_ALL ; \
$(AWK) -f $(srcdir)/opt-gather.awk $(ALL_OPT_FILES) > tmp-optionlist
$(SHELL) $(srcdir)/../move-if-change tmp-optionlist optionlist
$(STAMP) s-options
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog
index a77d28783ea..54173e786cf 100644
--- a/gcc/ada/ChangeLog
+++ b/gcc/ada/ChangeLog
@@ -1,3 +1,7 @@
+2017-10-10 Release Manager
+
+ * GCC 5.5.0 released.
+
2017-02-24 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/trans.c (gnat_to_gnu): Do not apply special handling
diff --git a/gcc/asan.c b/gcc/asan.c
index 3b5722a4c9a..3edbdf37612 100644
--- a/gcc/asan.c
+++ b/gcc/asan.c
@@ -606,218 +606,208 @@ get_mem_refs_of_builtin_call (const gcall *call,
case BUILT_IN_STRLEN:
source0 = gimple_call_arg (call, 0);
len = gimple_call_lhs (call);
- break ;
+ break;
/* And now the __atomic* and __sync builtins.
These are handled differently from the classical memory memory
access builtins above. */
case BUILT_IN_ATOMIC_LOAD_1:
- case BUILT_IN_ATOMIC_LOAD_2:
- case BUILT_IN_ATOMIC_LOAD_4:
- case BUILT_IN_ATOMIC_LOAD_8:
- case BUILT_IN_ATOMIC_LOAD_16:
is_store = false;
- /* fall through. */
-
+ /* FALLTHRU */
case BUILT_IN_SYNC_FETCH_AND_ADD_1:
- case BUILT_IN_SYNC_FETCH_AND_ADD_2:
- case BUILT_IN_SYNC_FETCH_AND_ADD_4:
- case BUILT_IN_SYNC_FETCH_AND_ADD_8:
- case BUILT_IN_SYNC_FETCH_AND_ADD_16:
-
case BUILT_IN_SYNC_FETCH_AND_SUB_1:
- case BUILT_IN_SYNC_FETCH_AND_SUB_2:
- case BUILT_IN_SYNC_FETCH_AND_SUB_4:
- case BUILT_IN_SYNC_FETCH_AND_SUB_8:
- case BUILT_IN_SYNC_FETCH_AND_SUB_16:
-
case BUILT_IN_SYNC_FETCH_AND_OR_1:
- case BUILT_IN_SYNC_FETCH_AND_OR_2:
- case BUILT_IN_SYNC_FETCH_AND_OR_4:
- case BUILT_IN_SYNC_FETCH_AND_OR_8:
- case BUILT_IN_SYNC_FETCH_AND_OR_16:
-
case BUILT_IN_SYNC_FETCH_AND_AND_1:
- case BUILT_IN_SYNC_FETCH_AND_AND_2:
- case BUILT_IN_SYNC_FETCH_AND_AND_4:
- case BUILT_IN_SYNC_FETCH_AND_AND_8:
- case BUILT_IN_SYNC_FETCH_AND_AND_16:
-
case BUILT_IN_SYNC_FETCH_AND_XOR_1:
- case BUILT_IN_SYNC_FETCH_AND_XOR_2:
- case BUILT_IN_SYNC_FETCH_AND_XOR_4:
- case BUILT_IN_SYNC_FETCH_AND_XOR_8:
- case BUILT_IN_SYNC_FETCH_AND_XOR_16:
-
case BUILT_IN_SYNC_FETCH_AND_NAND_1:
- case BUILT_IN_SYNC_FETCH_AND_NAND_2:
- case BUILT_IN_SYNC_FETCH_AND_NAND_4:
- case BUILT_IN_SYNC_FETCH_AND_NAND_8:
-
case BUILT_IN_SYNC_ADD_AND_FETCH_1:
- case BUILT_IN_SYNC_ADD_AND_FETCH_2:
- case BUILT_IN_SYNC_ADD_AND_FETCH_4:
- case BUILT_IN_SYNC_ADD_AND_FETCH_8:
- case BUILT_IN_SYNC_ADD_AND_FETCH_16:
-
case BUILT_IN_SYNC_SUB_AND_FETCH_1:
- case BUILT_IN_SYNC_SUB_AND_FETCH_2:
- case BUILT_IN_SYNC_SUB_AND_FETCH_4:
- case BUILT_IN_SYNC_SUB_AND_FETCH_8:
- case BUILT_IN_SYNC_SUB_AND_FETCH_16:
-
case BUILT_IN_SYNC_OR_AND_FETCH_1:
- case BUILT_IN_SYNC_OR_AND_FETCH_2:
- case BUILT_IN_SYNC_OR_AND_FETCH_4:
- case BUILT_IN_SYNC_OR_AND_FETCH_8:
- case BUILT_IN_SYNC_OR_AND_FETCH_16:
-
case BUILT_IN_SYNC_AND_AND_FETCH_1:
- case BUILT_IN_SYNC_AND_AND_FETCH_2:
- case BUILT_IN_SYNC_AND_AND_FETCH_4:
- case BUILT_IN_SYNC_AND_AND_FETCH_8:
- case BUILT_IN_SYNC_AND_AND_FETCH_16:
-
case BUILT_IN_SYNC_XOR_AND_FETCH_1:
- case BUILT_IN_SYNC_XOR_AND_FETCH_2:
- case BUILT_IN_SYNC_XOR_AND_FETCH_4:
- case BUILT_IN_SYNC_XOR_AND_FETCH_8:
- case BUILT_IN_SYNC_XOR_AND_FETCH_16:
-
case BUILT_IN_SYNC_NAND_AND_FETCH_1:
- case BUILT_IN_SYNC_NAND_AND_FETCH_2:
- case BUILT_IN_SYNC_NAND_AND_FETCH_4:
- case BUILT_IN_SYNC_NAND_AND_FETCH_8:
-
case BUILT_IN_SYNC_BOOL_COMPARE_AND_SWAP_1:
- case BUILT_IN_SYNC_BOOL_COMPARE_AND_SWAP_2:
- case BUILT_IN_SYNC_BOOL_COMPARE_AND_SWAP_4:
- case BUILT_IN_SYNC_BOOL_COMPARE_AND_SWAP_8:
- case BUILT_IN_SYNC_BOOL_COMPARE_AND_SWAP_16:
-
case BUILT_IN_SYNC_VAL_COMPARE_AND_SWAP_1:
- case BUILT_IN_SYNC_VAL_COMPARE_AND_SWAP_2:
- case BUILT_IN_SYNC_VAL_COMPARE_AND_SWAP_4:
- case BUILT_IN_SYNC_VAL_COMPARE_AND_SWAP_8:
- case BUILT_IN_SYNC_VAL_COMPARE_AND_SWAP_16:
-
case BUILT_IN_SYNC_LOCK_TEST_AND_SET_1:
- case BUILT_IN_SYNC_LOCK_TEST_AND_SET_2:
- case BUILT_IN_SYNC_LOCK_TEST_AND_SET_4:
- case BUILT_IN_SYNC_LOCK_TEST_AND_SET_8:
- case BUILT_IN_SYNC_LOCK_TEST_AND_SET_16:
-
case BUILT_IN_SYNC_LOCK_RELEASE_1:
- case BUILT_IN_SYNC_LOCK_RELEASE_2:
- case BUILT_IN_SYNC_LOCK_RELEASE_4:
- case BUILT_IN_SYNC_LOCK_RELEASE_8:
- case BUILT_IN_SYNC_LOCK_RELEASE_16:
-
case BUILT_IN_ATOMIC_EXCHANGE_1:
- case BUILT_IN_ATOMIC_EXCHANGE_2:
- case BUILT_IN_ATOMIC_EXCHANGE_4:
- case BUILT_IN_ATOMIC_EXCHANGE_8:
- case BUILT_IN_ATOMIC_EXCHANGE_16:
-
case BUILT_IN_ATOMIC_COMPARE_EXCHANGE_1:
- case BUILT_IN_ATOMIC_COMPARE_EXCHANGE_2:
- case BUILT_IN_ATOMIC_COMPARE_EXCHANGE_4:
- case BUILT_IN_ATOMIC_COMPARE_EXCHANGE_8:
- case BUILT_IN_ATOMIC_COMPARE_EXCHANGE_16:
-
case BUILT_IN_ATOMIC_STORE_1:
- case BUILT_IN_ATOMIC_STORE_2:
- case BUILT_IN_ATOMIC_STORE_4:
- case BUILT_IN_ATOMIC_STORE_8:
- case BUILT_IN_ATOMIC_STORE_16:
-
case BUILT_IN_ATOMIC_ADD_FETCH_1:
- case BUILT_IN_ATOMIC_ADD_FETCH_2:
- case BUILT_IN_ATOMIC_ADD_FETCH_4:
- case BUILT_IN_ATOMIC_ADD_FETCH_8:
- case BUILT_IN_ATOMIC_ADD_FETCH_16:
-
case BUILT_IN_ATOMIC_SUB_FETCH_1:
- case BUILT_IN_ATOMIC_SUB_FETCH_2:
- case BUILT_IN_ATOMIC_SUB_FETCH_4:
- case BUILT_IN_ATOMIC_SUB_FETCH_8:
- case BUILT_IN_ATOMIC_SUB_FETCH_16:
-
case BUILT_IN_ATOMIC_AND_FETCH_1:
- case BUILT_IN_ATOMIC_AND_FETCH_2:
- case BUILT_IN_ATOMIC_AND_FETCH_4:
- case BUILT_IN_ATOMIC_AND_FETCH_8:
- case BUILT_IN_ATOMIC_AND_FETCH_16:
-
case BUILT_IN_ATOMIC_NAND_FETCH_1:
- case BUILT_IN_ATOMIC_NAND_FETCH_2:
- case BUILT_IN_ATOMIC_NAND_FETCH_4:
- case BUILT_IN_ATOMIC_NAND_FETCH_8:
- case BUILT_IN_ATOMIC_NAND_FETCH_16:
-
case BUILT_IN_ATOMIC_XOR_FETCH_1:
- case BUILT_IN_ATOMIC_XOR_FETCH_2:
- case BUILT_IN_ATOMIC_XOR_FETCH_4:
- case BUILT_IN_ATOMIC_XOR_FETCH_8:
- case BUILT_IN_ATOMIC_XOR_FETCH_16:
-
case BUILT_IN_ATOMIC_OR_FETCH_1:
- case BUILT_IN_ATOMIC_OR_FETCH_2:
- case BUILT_IN_ATOMIC_OR_FETCH_4:
- case BUILT_IN_ATOMIC_OR_FETCH_8:
- case BUILT_IN_ATOMIC_OR_FETCH_16:
-
case BUILT_IN_ATOMIC_FETCH_ADD_1:
- case BUILT_IN_ATOMIC_FETCH_ADD_2:
- case BUILT_IN_ATOMIC_FETCH_ADD_4:
- case BUILT_IN_ATOMIC_FETCH_ADD_8:
- case BUILT_IN_ATOMIC_FETCH_ADD_16:
-
case BUILT_IN_ATOMIC_FETCH_SUB_1:
- case BUILT_IN_ATOMIC_FETCH_SUB_2:
- case BUILT_IN_ATOMIC_FETCH_SUB_4:
- case BUILT_IN_ATOMIC_FETCH_SUB_8:
- case BUILT_IN_ATOMIC_FETCH_SUB_16:
-
case BUILT_IN_ATOMIC_FETCH_AND_1:
- case BUILT_IN_ATOMIC_FETCH_AND_2:
- case BUILT_IN_ATOMIC_FETCH_AND_4:
- case BUILT_IN_ATOMIC_FETCH_AND_8:
- case BUILT_IN_ATOMIC_FETCH_AND_16:
-
case BUILT_IN_ATOMIC_FETCH_NAND_1:
- case BUILT_IN_ATOMIC_FETCH_NAND_2:
- case BUILT_IN_ATOMIC_FETCH_NAND_4:
- case BUILT_IN_ATOMIC_FETCH_NAND_8:
- case BUILT_IN_ATOMIC_FETCH_NAND_16:
-
case BUILT_IN_ATOMIC_FETCH_XOR_1:
- case BUILT_IN_ATOMIC_FETCH_XOR_2:
- case BUILT_IN_ATOMIC_FETCH_XOR_4:
- case BUILT_IN_ATOMIC_FETCH_XOR_8:
- case BUILT_IN_ATOMIC_FETCH_XOR_16:
-
case BUILT_IN_ATOMIC_FETCH_OR_1:
+ access_size = 1;
+ goto do_atomic;
+
+ case BUILT_IN_ATOMIC_LOAD_2:
+ is_store = false;
+ /* FALLTHRU */
+ case BUILT_IN_SYNC_FETCH_AND_ADD_2:
+ case BUILT_IN_SYNC_FETCH_AND_SUB_2:
+ case BUILT_IN_SYNC_FETCH_AND_OR_2:
+ case BUILT_IN_SYNC_FETCH_AND_AND_2:
+ case BUILT_IN_SYNC_FETCH_AND_XOR_2:
+ case BUILT_IN_SYNC_FETCH_AND_NAND_2:
+ case BUILT_IN_SYNC_ADD_AND_FETCH_2:
+ case BUILT_IN_SYNC_SUB_AND_FETCH_2:
+ case BUILT_IN_SYNC_OR_AND_FETCH_2:
+ case BUILT_IN_SYNC_AND_AND_FETCH_2:
+ case BUILT_IN_SYNC_XOR_AND_FETCH_2:
+ case BUILT_IN_SYNC_NAND_AND_FETCH_2:
+ case BUILT_IN_SYNC_BOOL_COMPARE_AND_SWAP_2:
+ case BUILT_IN_SYNC_VAL_COMPARE_AND_SWAP_2:
+ case BUILT_IN_SYNC_LOCK_TEST_AND_SET_2:
+ case BUILT_IN_SYNC_LOCK_RELEASE_2:
+ case BUILT_IN_ATOMIC_EXCHANGE_2:
+ case BUILT_IN_ATOMIC_COMPARE_EXCHANGE_2:
+ case BUILT_IN_ATOMIC_STORE_2:
+ case BUILT_IN_ATOMIC_ADD_FETCH_2:
+ case BUILT_IN_ATOMIC_SUB_FETCH_2:
+ case BUILT_IN_ATOMIC_AND_FETCH_2:
+ case BUILT_IN_ATOMIC_NAND_FETCH_2:
+ case BUILT_IN_ATOMIC_XOR_FETCH_2:
+ case BUILT_IN_ATOMIC_OR_FETCH_2:
+ case BUILT_IN_ATOMIC_FETCH_ADD_2:
+ case BUILT_IN_ATOMIC_FETCH_SUB_2:
+ case BUILT_IN_ATOMIC_FETCH_AND_2:
+ case BUILT_IN_ATOMIC_FETCH_NAND_2:
+ case BUILT_IN_ATOMIC_FETCH_XOR_2:
case BUILT_IN_ATOMIC_FETCH_OR_2:
+ access_size = 2;
+ goto do_atomic;
+
+ case BUILT_IN_ATOMIC_LOAD_4:
+ is_store = false;
+ /* FALLTHRU */
+ case BUILT_IN_SYNC_FETCH_AND_ADD_4:
+ case BUILT_IN_SYNC_FETCH_AND_SUB_4:
+ case BUILT_IN_SYNC_FETCH_AND_OR_4:
+ case BUILT_IN_SYNC_FETCH_AND_AND_4:
+ case BUILT_IN_SYNC_FETCH_AND_XOR_4:
+ case BUILT_IN_SYNC_FETCH_AND_NAND_4:
+ case BUILT_IN_SYNC_ADD_AND_FETCH_4:
+ case BUILT_IN_SYNC_SUB_AND_FETCH_4:
+ case BUILT_IN_SYNC_OR_AND_FETCH_4:
+ case BUILT_IN_SYNC_AND_AND_FETCH_4:
+ case BUILT_IN_SYNC_XOR_AND_FETCH_4:
+ case BUILT_IN_SYNC_NAND_AND_FETCH_4:
+ case BUILT_IN_SYNC_BOOL_COMPARE_AND_SWAP_4:
+ case BUILT_IN_SYNC_VAL_COMPARE_AND_SWAP_4:
+ case BUILT_IN_SYNC_LOCK_TEST_AND_SET_4:
+ case BUILT_IN_SYNC_LOCK_RELEASE_4:
+ case BUILT_IN_ATOMIC_EXCHANGE_4:
+ case BUILT_IN_ATOMIC_COMPARE_EXCHANGE_4:
+ case BUILT_IN_ATOMIC_STORE_4:
+ case BUILT_IN_ATOMIC_ADD_FETCH_4:
+ case BUILT_IN_ATOMIC_SUB_FETCH_4:
+ case BUILT_IN_ATOMIC_AND_FETCH_4:
+ case BUILT_IN_ATOMIC_NAND_FETCH_4:
+ case BUILT_IN_ATOMIC_XOR_FETCH_4:
+ case BUILT_IN_ATOMIC_OR_FETCH_4:
+ case BUILT_IN_ATOMIC_FETCH_ADD_4:
+ case BUILT_IN_ATOMIC_FETCH_SUB_4:
+ case BUILT_IN_ATOMIC_FETCH_AND_4:
+ case BUILT_IN_ATOMIC_FETCH_NAND_4:
+ case BUILT_IN_ATOMIC_FETCH_XOR_4:
case BUILT_IN_ATOMIC_FETCH_OR_4:
+ access_size = 4;
+ goto do_atomic;
+
+ case BUILT_IN_ATOMIC_LOAD_8:
+ is_store = false;
+ /* FALLTHRU */
+ case BUILT_IN_SYNC_FETCH_AND_ADD_8:
+ case BUILT_IN_SYNC_FETCH_AND_SUB_8:
+ case BUILT_IN_SYNC_FETCH_AND_OR_8:
+ case BUILT_IN_SYNC_FETCH_AND_AND_8:
+ case BUILT_IN_SYNC_FETCH_AND_XOR_8:
+ case BUILT_IN_SYNC_FETCH_AND_NAND_8:
+ case BUILT_IN_SYNC_ADD_AND_FETCH_8:
+ case BUILT_IN_SYNC_SUB_AND_FETCH_8:
+ case BUILT_IN_SYNC_OR_AND_FETCH_8:
+ case BUILT_IN_SYNC_AND_AND_FETCH_8:
+ case BUILT_IN_SYNC_XOR_AND_FETCH_8:
+ case BUILT_IN_SYNC_NAND_AND_FETCH_8:
+ case BUILT_IN_SYNC_BOOL_COMPARE_AND_SWAP_8:
+ case BUILT_IN_SYNC_VAL_COMPARE_AND_SWAP_8:
+ case BUILT_IN_SYNC_LOCK_TEST_AND_SET_8:
+ case BUILT_IN_SYNC_LOCK_RELEASE_8:
+ case BUILT_IN_ATOMIC_EXCHANGE_8:
+ case BUILT_IN_ATOMIC_COMPARE_EXCHANGE_8:
+ case BUILT_IN_ATOMIC_STORE_8:
+ case BUILT_IN_ATOMIC_ADD_FETCH_8:
+ case BUILT_IN_ATOMIC_SUB_FETCH_8:
+ case BUILT_IN_ATOMIC_AND_FETCH_8:
+ case BUILT_IN_ATOMIC_NAND_FETCH_8:
+ case BUILT_IN_ATOMIC_XOR_FETCH_8:
+ case BUILT_IN_ATOMIC_OR_FETCH_8:
+ case BUILT_IN_ATOMIC_FETCH_ADD_8:
+ case BUILT_IN_ATOMIC_FETCH_SUB_8:
+ case BUILT_IN_ATOMIC_FETCH_AND_8:
+ case BUILT_IN_ATOMIC_FETCH_NAND_8:
+ case BUILT_IN_ATOMIC_FETCH_XOR_8:
case BUILT_IN_ATOMIC_FETCH_OR_8:
+ access_size = 8;
+ goto do_atomic;
+
+ case BUILT_IN_ATOMIC_LOAD_16:
+ is_store = false;
+ /* FALLTHRU */
+ case BUILT_IN_SYNC_FETCH_AND_ADD_16:
+ case BUILT_IN_SYNC_FETCH_AND_SUB_16:
+ case BUILT_IN_SYNC_FETCH_AND_OR_16:
+ case BUILT_IN_SYNC_FETCH_AND_AND_16:
+ case BUILT_IN_SYNC_FETCH_AND_XOR_16:
+ case BUILT_IN_SYNC_FETCH_AND_NAND_16:
+ case BUILT_IN_SYNC_ADD_AND_FETCH_16:
+ case BUILT_IN_SYNC_SUB_AND_FETCH_16:
+ case BUILT_IN_SYNC_OR_AND_FETCH_16:
+ case BUILT_IN_SYNC_AND_AND_FETCH_16:
+ case BUILT_IN_SYNC_XOR_AND_FETCH_16:
+ case BUILT_IN_SYNC_NAND_AND_FETCH_16:
+ case BUILT_IN_SYNC_BOOL_COMPARE_AND_SWAP_16:
+ case BUILT_IN_SYNC_VAL_COMPARE_AND_SWAP_16:
+ case BUILT_IN_SYNC_LOCK_TEST_AND_SET_16:
+ case BUILT_IN_SYNC_LOCK_RELEASE_16:
+ case BUILT_IN_ATOMIC_EXCHANGE_16:
+ case BUILT_IN_ATOMIC_COMPARE_EXCHANGE_16:
+ case BUILT_IN_ATOMIC_STORE_16:
+ case BUILT_IN_ATOMIC_ADD_FETCH_16:
+ case BUILT_IN_ATOMIC_SUB_FETCH_16:
+ case BUILT_IN_ATOMIC_AND_FETCH_16:
+ case BUILT_IN_ATOMIC_NAND_FETCH_16:
+ case BUILT_IN_ATOMIC_XOR_FETCH_16:
+ case BUILT_IN_ATOMIC_OR_FETCH_16:
+ case BUILT_IN_ATOMIC_FETCH_ADD_16:
+ case BUILT_IN_ATOMIC_FETCH_SUB_16:
+ case BUILT_IN_ATOMIC_FETCH_AND_16:
+ case BUILT_IN_ATOMIC_FETCH_NAND_16:
+ case BUILT_IN_ATOMIC_FETCH_XOR_16:
case BUILT_IN_ATOMIC_FETCH_OR_16:
+ access_size = 16;
+ /* FALLTHRU */
+ do_atomic:
{
dest = gimple_call_arg (call, 0);
/* DEST represents the address of a memory location.
instrument_derefs wants the memory location, so lets
dereference the address DEST before handing it to
instrument_derefs. */
- if (TREE_CODE (dest) == ADDR_EXPR)
- dest = TREE_OPERAND (dest, 0);
- else if (TREE_CODE (dest) == SSA_NAME || TREE_CODE (dest) == INTEGER_CST)
- dest = build2 (MEM_REF, TREE_TYPE (TREE_TYPE (dest)),
- dest, build_int_cst (TREE_TYPE (dest), 0));
- else
- gcc_unreachable ();
-
- access_size = int_size_in_bytes (TREE_TYPE (dest));
+ tree type = build_nonstandard_integer_type (access_size
+ * BITS_PER_UNIT, 1);
+ dest = build2 (MEM_REF, type, dest,
+ build_int_cst (build_pointer_type (char_type_node), 0));
+ break;
}
default:
@@ -1803,7 +1793,8 @@ instrument_derefs (gimple_stmt_iterator *iter, tree t,
tree repr = DECL_BIT_FIELD_REPRESENTATIVE (TREE_OPERAND (t, 1));
instrument_derefs (iter, build3 (COMPONENT_REF, TREE_TYPE (repr),
TREE_OPERAND (t, 0), repr,
- NULL_TREE), location, is_store);
+ TREE_OPERAND (t, 2)),
+ location, is_store);
return;
}
@@ -1811,6 +1802,9 @@ instrument_derefs (gimple_stmt_iterator *iter, tree t,
|| bitsize != size_in_bytes * BITS_PER_UNIT)
return;
+ if (TREE_CODE (inner) == VAR_DECL && DECL_HARD_REGISTER (inner))
+ return;
+
if (TREE_CODE (inner) == VAR_DECL
&& offset == NULL_TREE
&& bitpos >= 0
@@ -2129,6 +2123,9 @@ transform_statements (void)
tree
asan_dynamic_init_call (bool after_p)
{
+ if (shadow_ptr_types[0] == NULL_TREE)
+ asan_init_shadow_ptr_types ();
+
tree fn = builtin_decl_implicit (after_p
? BUILT_IN_ASAN_AFTER_DYNAMIC_INIT
: BUILT_IN_ASAN_BEFORE_DYNAMIC_INIT);
@@ -2138,8 +2135,6 @@ asan_dynamic_init_call (bool after_p)
pretty_printer module_name_pp;
pp_string (&module_name_pp, main_input_filename);
- if (shadow_ptr_types[0] == NULL_TREE)
- asan_init_shadow_ptr_types ();
module_name_cst = asan_pp_string (&module_name_pp);
module_name_cst = fold_convert (const_ptr_type_node,
module_name_cst);
diff --git a/gcc/auto-profile.c b/gcc/auto-profile.c
index ba2d5ab654e..7bbd8140c45 100644
--- a/gcc/auto-profile.c
+++ b/gcc/auto-profile.c
@@ -19,12 +19,10 @@ along with GCC; see the file COPYING3. If not see
<http://www.gnu.org/licenses/>. */
#include "config.h"
+#define INCLUDE_MAP
+#define INCLUDE_SET
#include "system.h"
-#include <string.h>
-#include <map>
-#include <set>
-
#include "coretypes.h"
#include "hash-set.h"
#include "machmode.h"
@@ -390,7 +388,7 @@ get_function_decl_from_block (tree block)
{
tree decl;
- if (LOCATION_LOCUS (BLOCK_SOURCE_LOCATION (block) == UNKNOWN_LOCATION))
+ if (LOCATION_LOCUS (BLOCK_SOURCE_LOCATION (block)) == UNKNOWN_LOCATION)
return NULL_TREE;
for (decl = BLOCK_ABSTRACT_ORIGIN (block);
@@ -1469,7 +1467,9 @@ afdo_vpt_for_early_inline (stmt_set *promoted_stmts)
if (has_vpt)
{
- optimize_inline_calls (current_function_decl);
+ unsigned todo = optimize_inline_calls (current_function_decl);
+ if (todo & TODO_update_ssa_any)
+ update_ssa (TODO_update_ssa);
return true;
}
diff --git a/gcc/bb-reorder.c b/gcc/bb-reorder.c
index 7d5073b0247..90dbcd4c947 100644
--- a/gcc/bb-reorder.c
+++ b/gcc/bb-reorder.c
@@ -2744,7 +2744,8 @@ pass_partition_blocks::execute (function *fun)
crossing_edges = find_rarely_executed_basic_blocks_and_crossing_edges ();
if (!crossing_edges.exists ())
- return 0;
+ /* Make sure to process deferred rescans and clear changeable df flags. */
+ return TODO_df_finish;
crtl->has_bb_partition = true;
@@ -2810,7 +2811,8 @@ pass_partition_blocks::execute (function *fun)
df_analyze ();
}
- return 0;
+ /* Make sure to process deferred rescans and clear changeable df flags. */
+ return TODO_df_finish;
}
} // anon namespace
diff --git a/gcc/builtins.c b/gcc/builtins.c
index ca24982b67d..3a55eaeb9f6 100644
--- a/gcc/builtins.c
+++ b/gcc/builtins.c
@@ -5595,6 +5595,12 @@ expand_builtin_atomic_fetch_op (machine_mode mode, tree exp, rtx target,
gcc_assert (TREE_OPERAND (addr, 0) == fndecl);
TREE_OPERAND (addr, 0) = builtin_decl_explicit (ext_call);
+ /* If we will emit code after the call, the call can not be a tail call.
+ If it is emitted as a tail call, a barrier is emitted after it, and
+ then all trailing code is removed. */
+ if (!ignore)
+ CALL_EXPR_TAILCALL (exp) = 0;
+
/* Expand the call here so we can emit trailing code. */
ret = expand_call (exp, target, ignore);
@@ -5720,8 +5726,10 @@ fold_builtin_atomic_always_lock_free (tree arg0, tree arg1)
end before anything else has a chance to look at it. The pointer
parameter at this point is usually cast to a void *, so check for that
and look past the cast. */
- if (CONVERT_EXPR_P (arg1) && POINTER_TYPE_P (ttype)
- && VOID_TYPE_P (TREE_TYPE (ttype)))
+ if (CONVERT_EXPR_P (arg1)
+ && POINTER_TYPE_P (ttype)
+ && VOID_TYPE_P (TREE_TYPE (ttype))
+ && POINTER_TYPE_P (TREE_TYPE (TREE_OPERAND (arg1, 0))))
arg1 = TREE_OPERAND (arg1, 0);
ttype = TREE_TYPE (arg1);
diff --git a/gcc/c-family/ChangeLog b/gcc/c-family/ChangeLog
index 5251b684d06..a4fe8ccd311 100644
--- a/gcc/c-family/ChangeLog
+++ b/gcc/c-family/ChangeLog
@@ -1,3 +1,56 @@
+2017-10-10 Release Manager
+
+ * GCC 5.5.0 released.
+
+2017-09-16 Jakub Jelinek <jakub@redhat.com>
+
+ Backported from mainline
+ 2017-09-12 Jakub Jelinek <jakub@redhat.com>
+
+ PR target/82112
+ * c-common.c (sync_resolve_size): Instead of c_dialect_cxx ()
+ assertion check that in the condition.
+ (get_atomic_generic_size): Likewise. Before testing if parameter
+ has pointer type, if it has array type, call for C++
+ default_conversion to perform array-to-pointer conversion.
+
+ 2017-07-27 Jakub Jelinek <jakub@redhat.com>
+
+ PR c/45784
+ * c-omp.c (c_finish_omp_for): If the condition is wrapped in
+ rhs of COMPOUND_EXPR(s), skip them and readd their lhs into
+ new COMPOUND_EXPRs around the rhs of the comparison.
+
+2017-09-15 Martin Liska <mliska@suse.cz>
+
+ Backport from mainline
+ 2017-06-28 Martin Liska <mliska@suse.cz>
+
+ PR ipa/81128
+ * c-attribs.c (handle_alias_ifunc_attribute): Append ifunc alias
+ to a function declaration.
+
+2017-09-11 Jonathan Wakely <jwakely@redhat.com>
+
+ PR c++/81852
+ * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_threadsafe_static_init.
+
+2017-05-30 Jakub Jelinek <jakub@redhat.com>
+
+ Backported from mainline
+ 2017-02-21 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/79641
+ * c-common.c (handle_mode_attribute): Use build_qualified_type to
+ preserve quals.
+
+2017-05-10 Richard Biener <rguenther@suse.de>
+
+ Backport from mainline
+ PR c/79756
+ * c-common.c (c_common_mark_addressable_vec): Look through
+ C_MAYBE_CONST_EXPR.
+
2017-03-22 Martin Liska <mliska@suse.cz>
Backport from mainline
diff --git a/gcc/c-family/c-common.c b/gcc/c-family/c-common.c
index d8c038ccf6c..998d7c275ca 100644
--- a/gcc/c-family/c-common.c
+++ b/gcc/c-family/c-common.c
@@ -7564,7 +7564,7 @@ handle_mode_attribute (tree *node, tree name, tree args,
return NULL_TREE;
}
- *node = typefm;
+ *node = build_qualified_type (typefm, TYPE_QUALS (type));
}
return NULL_TREE;
@@ -7962,9 +7962,14 @@ handle_alias_ifunc_attribute (bool is_alias, tree *node, tree name, tree args,
TREE_STATIC (decl) = 1;
if (!is_alias)
- /* ifuncs are also aliases, so set that attribute too. */
- DECL_ATTRIBUTES (decl)
- = tree_cons (get_identifier ("alias"), args, DECL_ATTRIBUTES (decl));
+ {
+ /* ifuncs are also aliases, so set that attribute too. */
+ DECL_ATTRIBUTES (decl)
+ = tree_cons (get_identifier ("alias"), args,
+ DECL_ATTRIBUTES (decl));
+ DECL_ATTRIBUTES (decl) = tree_cons (get_identifier ("ifunc"),
+ NULL, DECL_ATTRIBUTES (decl));
+ }
}
else
{
@@ -10495,6 +10500,8 @@ complete_array_type (tree *ptype, tree initial_value, bool do_default)
void
c_common_mark_addressable_vec (tree t)
{
+ if (TREE_CODE (t) == C_MAYBE_CONST_EXPR)
+ t = C_MAYBE_CONST_EXPR_EXPR (t);
while (handled_component_p (t))
t = TREE_OPERAND (t, 0);
if (!VAR_P (t)
@@ -10536,10 +10543,9 @@ sync_resolve_size (tree function, vec<tree, va_gc> *params)
}
type = TREE_TYPE ((*params)[0]);
- if (TREE_CODE (type) == ARRAY_TYPE)
+ if (TREE_CODE (type) == ARRAY_TYPE && c_dialect_cxx ())
{
/* Force array-to-pointer decay for C++. */
- gcc_assert (c_dialect_cxx());
(*params)[0] = default_conversion ((*params)[0]);
type = TREE_TYPE ((*params)[0]);
}
@@ -10694,10 +10700,9 @@ get_atomic_generic_size (location_t loc, tree function,
/* Get type of first parameter, and determine its size. */
type_0 = TREE_TYPE ((*params)[0]);
- if (TREE_CODE (type_0) == ARRAY_TYPE)
+ if (TREE_CODE (type_0) == ARRAY_TYPE && c_dialect_cxx ())
{
/* Force array-to-pointer decay for C++. */
- gcc_assert (c_dialect_cxx());
(*params)[0] = default_conversion ((*params)[0]);
type_0 = TREE_TYPE ((*params)[0]);
}
@@ -10736,6 +10741,12 @@ get_atomic_generic_size (location_t loc, tree function,
/* __atomic_compare_exchange has a bool in the 4th position, skip it. */
if (n_param == 6 && x == 3)
continue;
+ if (TREE_CODE (type) == ARRAY_TYPE && c_dialect_cxx ())
+ {
+ /* Force array-to-pointer decay for C++. */
+ (*params)[x] = default_conversion ((*params)[x]);
+ type = TREE_TYPE ((*params)[x]);
+ }
if (!POINTER_TYPE_P (type))
{
error_at (loc, "argument %d of %qE must be a pointer type", x + 1,
diff --git a/gcc/c-family/c-cppbuiltin.c b/gcc/c-family/c-cppbuiltin.c
index 8753ea1c32c..e4e7b5290c4 100644
--- a/gcc/c-family/c-cppbuiltin.c
+++ b/gcc/c-family/c-cppbuiltin.c
@@ -876,6 +876,8 @@ c_cpp_builtins (cpp_reader *pfile)
}
if (flag_sized_deallocation)
cpp_define (pfile, "__cpp_sized_deallocation=201309");
+ if (flag_threadsafe_statics)
+ cpp_define (pfile, "__cpp_threadsafe_static_init=200806");
}
/* Note that we define this for C as well, so that we know if
__attribute__((cleanup)) will interface with EH. */
diff --git a/gcc/c-family/c-omp.c b/gcc/c-family/c-omp.c
index 987845ba2ce..15df9858366 100644
--- a/gcc/c-family/c-omp.c
+++ b/gcc/c-family/c-omp.c
@@ -511,6 +511,12 @@ c_finish_omp_for (location_t locus, enum tree_code code, tree declv,
{
bool cond_ok = false;
+ /* E.g. C sizeof (vla) could add COMPOUND_EXPRs with
+ evaluation of the vla VAR_DECL. We need to readd
+ them to the non-decl operand. See PR45784. */
+ while (TREE_CODE (cond) == COMPOUND_EXPR)
+ cond = TREE_OPERAND (cond, 1);
+
if (EXPR_HAS_LOCATION (cond))
elocus = EXPR_LOCATION (cond);
@@ -585,6 +591,21 @@ c_finish_omp_for (location_t locus, enum tree_code code, tree declv,
else if (code != CILK_SIMD && code != CILK_FOR)
cond_ok = false;
}
+
+ if (cond_ok && TREE_VEC_ELT (condv, i) != cond)
+ {
+ tree ce = NULL_TREE, *pce = &ce;
+ tree type = TREE_TYPE (TREE_OPERAND (cond, 1));
+ for (tree c = TREE_VEC_ELT (condv, i); c != cond;
+ c = TREE_OPERAND (c, 1))
+ {
+ *pce = build2 (COMPOUND_EXPR, type, TREE_OPERAND (c, 0),
+ TREE_OPERAND (cond, 1));
+ pce = &TREE_OPERAND (*pce, 1);
+ }
+ TREE_OPERAND (cond, 1) = ce;
+ TREE_VEC_ELT (condv, i) = cond;
+ }
}
if (!cond_ok)
diff --git a/gcc/c/ChangeLog b/gcc/c/ChangeLog
index 85f9e9a0f5b..d5d41af7002 100644
--- a/gcc/c/ChangeLog
+++ b/gcc/c/ChangeLog
@@ -1,3 +1,49 @@
+2017-10-10 Release Manager
+
+ * GCC 5.5.0 released.
+
+2017-06-08 Jakub Jelinek <jakub@redhat.com>
+
+ PR c/81006
+ * c-typeck.c (handle_omp_array_sections_1): Convert TYPE_MAX_VALUE
+ to sizetype before size_binop.
+
+2017-05-30 Jakub Jelinek <jakub@redhat.com>
+
+ Backported from mainline
+ 2017-03-21 Jakub Jelinek <jakub@redhat.com>
+
+ PR c/80097
+ * c-typeck.c (build_binary_op): Add EXCESS_PRECISION_EXPR only around
+ optional COMPOUND_EXPR with ubsan instrumentation.
+
+ 2017-02-16 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/79512
+ * c-parser.c (c_parser_omp_target): For -fopenmp-simd
+ ignore #pragma omp target even when not followed by identifier.
+
+ 2016-12-21 Jakub Jelinek <jakub@redhat.com>
+
+ PR c/77767
+ * c-decl.c (grokdeclarator): If *expr is non-NULL, append expression
+ to *expr instead of overwriting it.
+
+ 2016-08-12 Jakub Jelinek <jakub@redhat.com>
+ Martin Liska <mliska@suse.cz>
+
+ PR c/67410
+ * c-typeck.c (set_nonincremental_init_from_string): Use / instead of
+ % to determine val element to change. Assert that
+ wchar_bytes * charwidth fits into val array.
+
+ 2016-08-11 Jakub Jelinek <jakub@redhat.com>
+
+ PR c/72816
+ * c-decl.c (grokdeclarator): When adding TYPE_DOMAIN for flexible
+ array member through typedef, for orig_qual_indirect == 0 clear
+ orig_qual_type.
+
2016-11-05 Martin Sebor <msebor@redhat.com>
Backport from trunk.
diff --git a/gcc/c/c-decl.c b/gcc/c/c-decl.c
index 33ad00f913f..a5b222f9386 100644
--- a/gcc/c/c-decl.c
+++ b/gcc/c/c-decl.c
@@ -5415,11 +5415,21 @@ grokdeclarator (const struct c_declarator *declarator,
if (TREE_CODE (type) == ERROR_MARK)
return error_mark_node;
if (expr == NULL)
- expr = &expr_dummy;
+ {
+ expr = &expr_dummy;
+ expr_dummy = NULL_TREE;
+ }
if (expr_const_operands == NULL)
expr_const_operands = &expr_const_operands_dummy;
- *expr = declspecs->expr;
+ if (declspecs->expr)
+ {
+ if (*expr)
+ *expr = build2 (COMPOUND_EXPR, TREE_TYPE (declspecs->expr), *expr,
+ declspecs->expr);
+ else
+ *expr = declspecs->expr;
+ }
*expr_const_operands = declspecs->expr_const_operands;
if (decl_context == FUNCDEF)
@@ -6578,6 +6588,8 @@ grokdeclarator (const struct c_declarator *declarator,
type = build_distinct_type_copy (TYPE_MAIN_VARIANT (type));
TYPE_DOMAIN (type) = build_range_type (sizetype, size_zero_node,
NULL_TREE);
+ if (orig_qual_indirect == 0)
+ orig_qual_type = NULL_TREE;
}
type = c_build_qualified_type (type, type_quals, orig_qual_type,
orig_qual_indirect);
diff --git a/gcc/c/c-objc-common.c b/gcc/c/c-objc-common.c
index 344d4e2949c..c1ec601f93c 100644
--- a/gcc/c/c-objc-common.c
+++ b/gcc/c/c-objc-common.c
@@ -38,8 +38,6 @@ along with GCC; see the file COPYING3. If not see
#include "langhooks.h"
#include "c-objc-common.h"
-#include <new> // For placement new.
-
static bool c_tree_printer (pretty_printer *, text_info *, const char *,
int, bool, bool, bool);
diff --git a/gcc/c/c-parser.c b/gcc/c/c-parser.c
index c5378fec81e..002e6a1bb7b 100644
--- a/gcc/c/c-parser.c
+++ b/gcc/c/c-parser.c
@@ -13980,6 +13980,11 @@ c_parser_omp_target (c_parser *parser, enum pragma_context context)
}
}
+ if (!flag_openmp) /* flag_openmp_simd */
+ {
+ c_parser_skip_to_pragma_eol (parser, false);
+ return false;
+ }
tree stmt = make_node (OMP_TARGET);
TREE_TYPE (stmt) = void_type_node;
diff --git a/gcc/c/c-typeck.c b/gcc/c/c-typeck.c
index 2f7a9e66b0c..0f9122f3499 100644
--- a/gcc/c/c-typeck.c
+++ b/gcc/c/c-typeck.c
@@ -8248,6 +8248,8 @@ set_nonincremental_init_from_string (tree str,
wchar_bytes = TYPE_PRECISION (TREE_TYPE (TREE_TYPE (str))) / BITS_PER_UNIT;
charwidth = TYPE_PRECISION (char_type_node);
+ gcc_assert ((size_t) wchar_bytes * charwidth
+ <= ARRAY_SIZE (val) * HOST_BITS_PER_WIDE_INT);
type = TREE_TYPE (constructor_type);
p = TREE_STRING_POINTER (str);
end = p + TREE_STRING_LENGTH (str);
@@ -8273,7 +8275,7 @@ set_nonincremental_init_from_string (tree str,
bitpos = (wchar_bytes - byte - 1) * charwidth;
else
bitpos = byte * charwidth;
- val[bitpos % HOST_BITS_PER_WIDE_INT]
+ val[bitpos / HOST_BITS_PER_WIDE_INT]
|= ((unsigned HOST_WIDE_INT) ((unsigned char) *p++))
<< (bitpos % HOST_BITS_PER_WIDE_INT);
}
@@ -11336,14 +11338,16 @@ build_binary_op (location_t location, enum tree_code code,
else if (TREE_CODE (ret) != INTEGER_CST && int_operands
&& !in_late_binary_op)
ret = note_integer_operands (ret);
- if (semantic_result_type)
- ret = build1 (EXCESS_PRECISION_EXPR, semantic_result_type, ret);
protected_set_expr_location (ret, location);
if (instrument_expr != NULL)
ret = fold_build2 (COMPOUND_EXPR, TREE_TYPE (ret),
instrument_expr, ret);
+ if (semantic_result_type)
+ ret = build1_loc (location, EXCESS_PRECISION_EXPR,
+ semantic_result_type, ret);
+
return ret;
}
@@ -11750,9 +11754,9 @@ handle_omp_array_sections_1 (tree c, tree t, vec<tree> &types,
&& TREE_CODE (TYPE_MAX_VALUE (TYPE_DOMAIN (type)))
== INTEGER_CST)
{
- tree size = size_binop (PLUS_EXPR,
- TYPE_MAX_VALUE (TYPE_DOMAIN (type)),
- size_one_node);
+ tree size
+ = fold_convert (sizetype, TYPE_MAX_VALUE (TYPE_DOMAIN (type)));
+ size = size_binop (PLUS_EXPR, size, size_one_node);
if (TREE_CODE (low_bound) == INTEGER_CST)
{
if (tree_int_cst_lt (size, low_bound))
diff --git a/gcc/cgraph.c b/gcc/cgraph.c
index 448e940586f..fee3ee0e6e2 100644
--- a/gcc/cgraph.c
+++ b/gcc/cgraph.c
@@ -1914,11 +1914,14 @@ cgraph_node::rtl_info (tree decl)
cgraph_node *node = get (decl);
if (!node)
return NULL;
- node = node->ultimate_alias_target ();
- if (node->decl != current_function_decl
- && !TREE_ASM_WRITTEN (node->decl))
+ enum availability avail;
+ node = node->ultimate_alias_target (&avail);
+ if (decl != current_function_decl
+ && (avail < AVAIL_AVAILABLE
+ || (node->decl != current_function_decl
+ && !TREE_ASM_WRITTEN (node->decl))))
return NULL;
- return &node->ultimate_alias_target ()->rtl;
+ return &node->rtl;
}
/* Return a string describing the failure REASON. */
@@ -2027,6 +2030,8 @@ cgraph_node::dump (FILE *f)
fprintf (f, " only_called_at_exit");
if (tm_clone)
fprintf (f, " tm_clone");
+ if (calls_comdat_local)
+ fprintf (f, " calls_comdat_local");
if (icf_merged)
fprintf (f, " icf_merged");
if (nonfreeing_fn)
diff --git a/gcc/cgraphunit.c b/gcc/cgraphunit.c
index d4db126cbd5..5f0b06ebec0 100644
--- a/gcc/cgraphunit.c
+++ b/gcc/cgraphunit.c
@@ -1673,6 +1673,10 @@ cgraph_node::expand_thunk (bool output_asm_thunks, bool force_gimple_thunk)
for (; i < nargs; i++, arg = DECL_CHAIN (arg))
{
tree tmp = arg;
+ if (VECTOR_TYPE_P (TREE_TYPE (arg))
+ || TREE_CODE (TREE_TYPE (arg)) == COMPLEX_TYPE)
+ DECL_GIMPLE_REG_P (arg) = 1;
+
if (!is_gimple_val (arg))
{
tmp = create_tmp_reg (TYPE_MAIN_VARIANT
diff --git a/gcc/combine.c b/gcc/combine.c
index 1cb2bb06f65..9612824a3f9 100644
--- a/gcc/combine.c
+++ b/gcc/combine.c
@@ -7411,6 +7411,7 @@ make_extraction (machine_mode mode, rtx inner, HOST_WIDE_INT pos,
if (tmode != BLKmode
&& ((pos_rtx == 0 && (pos % BITS_PER_WORD) == 0
&& !MEM_P (inner)
+ && (pos == 0 || REG_P (inner))
&& (inner_mode == tmode
|| !REG_P (inner)
|| TRULY_NOOP_TRUNCATION_MODES_P (tmode, inner_mode)
@@ -7487,10 +7488,9 @@ make_extraction (machine_mode mode, rtx inner, HOST_WIDE_INT pos,
}
else
new_rtx = force_to_mode (inner, tmode,
- len >= HOST_BITS_PER_WIDE_INT
- ? ~(unsigned HOST_WIDE_INT) 0
- : ((unsigned HOST_WIDE_INT) 1 << len) - 1,
- 0);
+ len >= HOST_BITS_PER_WIDE_INT
+ ? ~(unsigned HOST_WIDE_INT) 0
+ : ((unsigned HOST_WIDE_INT) 1 << len) - 1, 0);
/* If this extraction is going into the destination of a SET,
make a STRICT_LOW_PART unless we made a MEM. */
diff --git a/gcc/common.opt b/gcc/common.opt
index 751d990302b..98293ed1699 100644
--- a/gcc/common.opt
+++ b/gcc/common.opt
@@ -2277,7 +2277,7 @@ flow and turn the statement with erroneous or undefined behavior into a trap.
fisolate-erroneous-paths-attribute
Common Report Var(flag_isolate_erroneous_paths_attribute) Optimization
-Detect paths that trigger erroneous or undefined behavior due a null value
+Detect paths that trigger erroneous or undefined behavior due to a null value
being used in a way forbidden by a returns_nonnull or nonnull
attribute. Isolate those paths from the main control flow and turn the
statement with erroneous or undefined behavior into a trap.
diff --git a/gcc/config/aarch64/aarch64.c b/gcc/config/aarch64/aarch64.c
index c1078820742..945ecde262d 100644
--- a/gcc/config/aarch64/aarch64.c
+++ b/gcc/config/aarch64/aarch64.c
@@ -8913,18 +8913,6 @@ aarch64_classify_symbol (rtx x, rtx offset)
if (GET_CODE (x) == SYMBOL_REF)
{
- if (aarch64_cmodel == AARCH64_CMODEL_LARGE)
- {
- /* This is alright even in PIC code as the constant
- pool reference is always PC relative and within
- the same translation unit. */
- if (nopcrelative_literal_loads
- && CONSTANT_POOL_ADDRESS_P (x))
- return SYMBOL_SMALL_ABSOLUTE;
- else
- return SYMBOL_FORCE_TO_MEM;
- }
-
if (aarch64_tls_symbol_p (x))
return aarch64_classify_tls_symbol (x);
@@ -8965,6 +8953,16 @@ aarch64_classify_symbol (rtx x, rtx offset)
? SYMBOL_SMALL_GOT_28K : SYMBOL_SMALL_GOT_4G);
return SYMBOL_SMALL_ABSOLUTE;
+ case AARCH64_CMODEL_LARGE:
+ /* This is alright even in PIC code as the constant
+ pool reference is always PC relative and within
+ the same translation unit. */
+ if (nopcrelative_literal_loads
+ && CONSTANT_POOL_ADDRESS_P (x))
+ return SYMBOL_SMALL_ABSOLUTE;
+ else
+ return SYMBOL_FORCE_TO_MEM;
+
default:
gcc_unreachable ();
}
diff --git a/gcc/config/arm/arm-builtins.c b/gcc/config/arm/arm-builtins.c
index 9c3a7e2dc7e..34cde17b53f 100644
--- a/gcc/config/arm/arm-builtins.c
+++ b/gcc/config/arm/arm-builtins.c
@@ -1796,10 +1796,10 @@ arm_init_builtins (void)
= build_function_type_list (unsigned_type_node, NULL);
arm_builtin_decls[ARM_BUILTIN_GET_FPSCR]
- = add_builtin_function ("__builtin_arm_ldfscr", ftype_get_fpscr,
+ = add_builtin_function ("__builtin_arm_get_fpscr", ftype_get_fpscr,
ARM_BUILTIN_GET_FPSCR, BUILT_IN_MD, NULL, NULL_TREE);
arm_builtin_decls[ARM_BUILTIN_SET_FPSCR]
- = add_builtin_function ("__builtin_arm_stfscr", ftype_set_fpscr,
+ = add_builtin_function ("__builtin_arm_set_fpscr", ftype_set_fpscr,
ARM_BUILTIN_SET_FPSCR, BUILT_IN_MD, NULL, NULL_TREE);
}
}
diff --git a/gcc/config/avr/avr.c b/gcc/config/avr/avr.c
index 4ffb38c571f..b4f41ead478 100644
--- a/gcc/config/avr/avr.c
+++ b/gcc/config/avr/avr.c
@@ -21,9 +21,19 @@
#include "config.h"
#include "system.h"
#include "coretypes.h"
+#include "hash-table.h"
#include "tm.h"
#include "hard-reg-set.h"
#include "rtl.h"
+#include "hash-set.h"
+#include "symtab.h"
+#include "inchash.h"
+#include "tree.h"
+#include "function.h"
+#include "hash-map.h"
+#include "plugin-api.h"
+#include "ipa-ref.h"
+#include "cgraph.h"
#include "regs.h"
#include "insn-config.h"
#include "conditions.h"
@@ -759,12 +769,6 @@ avr_set_current_function (tree decl)
name = default_strip_name_encoding (name);
- /* Silently ignore 'signal' if 'interrupt' is present. AVR-LibC startet
- using this when it switched from SIGNAL and INTERRUPT to ISR. */
-
- if (cfun->machine->is_interrupt)
- cfun->machine->is_signal = 0;
-
/* Interrupt handlers must be void __vector (void) functions. */
if (args && TREE_CODE (TREE_VALUE (args)) != VOID_TYPE)
@@ -773,15 +777,37 @@ avr_set_current_function (tree decl)
if (TREE_CODE (ret) != VOID_TYPE)
error_at (loc, "%qs function cannot return a value", isr);
+#if defined WITH_AVRLIBC
+ /* Silently ignore 'signal' if 'interrupt' is present. AVR-LibC startet
+ using this when it switched from SIGNAL and INTERRUPT to ISR. */
+
+ if (cfun->machine->is_interrupt)
+ cfun->machine->is_signal = 0;
+
/* If the function has the 'signal' or 'interrupt' attribute, ensure
that the name of the function is "__vector_NN" so as to catch
when the user misspells the vector name. */
if (!STR_PREFIX_P (name, "__vector"))
- warning_at (loc, 0, "%qs appears to be a misspelled %s handler",
- name, isr);
+ warning_at (loc, OPT_Wmisspelled_isr, "%qs appears to be a misspelled "
+ "%qs handler, missing %<__vector%> prefix", name, isr);
+#endif // AVR-LibC naming conventions
}
+#if defined WITH_AVRLIBC
+ // Common problem is using "ISR" without first including avr/interrupt.h.
+ const char *name = IDENTIFIER_POINTER (DECL_NAME (decl));
+ name = default_strip_name_encoding (name);
+ if (0 == strcmp ("ISR", name)
+ || 0 == strcmp ("INTERRUPT", name)
+ || 0 == strcmp ("SIGNAL", name))
+ {
+ warning_at (loc, OPT_Wmisspelled_isr, "%qs is a reserved identifier"
+ " in AVR-LibC. Consider %<#include <avr/interrupt.h>%>"
+ " before using the %qs macro", name, name);
+ }
+#endif // AVR-LibC naming conventions
+
/* Don't print the above diagnostics more than once. */
cfun->machine->attributes_checked_p = 1;
@@ -3494,7 +3520,7 @@ out_movqi_r_mr (rtx_insn *insn, rtx op[], int *plen)
if (CONSTANT_ADDRESS_P (x))
{
int n_words = AVR_TINY ? 1 : 2;
- return optimize > 0 && io_address_operand (x, QImode)
+ return io_address_operand (x, QImode)
? avr_asm_len ("in %0,%i1", op, plen, -1)
: avr_asm_len ("lds %0,%m1", op, plen, -n_words);
}
@@ -3749,7 +3775,7 @@ out_movhi_r_mr (rtx_insn *insn, rtx op[], int *plen)
else if (CONSTANT_ADDRESS_P (base))
{
int n_words = AVR_TINY ? 2 : 4;
- return optimize > 0 && io_address_operand (base, HImode)
+ return io_address_operand (base, HImode)
? avr_asm_len ("in %A0,%i1" CR_TAB
"in %B0,%i1+1", op, plen, -2)
@@ -4877,7 +4903,7 @@ out_movqi_mr_r (rtx_insn *insn, rtx op[], int *plen)
if (CONSTANT_ADDRESS_P (x))
{
int n_words = AVR_TINY ? 1 : 2;
- return optimize > 0 && io_address_operand (x, QImode)
+ return io_address_operand (x, QImode)
? avr_asm_len ("out %i0,%1", op, plen, -1)
: avr_asm_len ("sts %m0,%1", op, plen, -n_words);
}
@@ -4953,13 +4979,12 @@ avr_out_movhi_mr_r_xmega (rtx_insn *insn, rtx op[], int *plen)
if (CONSTANT_ADDRESS_P (base))
{
- int n_words = AVR_TINY ? 2 : 4;
- return optimize > 0 && io_address_operand (base, HImode)
+ return io_address_operand (base, HImode)
? avr_asm_len ("out %i0,%A1" CR_TAB
"out %i0+1,%B1", op, plen, -2)
: avr_asm_len ("sts %m0,%A1" CR_TAB
- "sts %m0+1,%B1", op, plen, -n_words);
+ "sts %m0+1,%B1", op, plen, -4);
}
if (reg_base > 0)
@@ -5136,7 +5161,7 @@ out_movhi_mr_r (rtx_insn *insn, rtx op[], int *plen)
if (CONSTANT_ADDRESS_P (base))
{
int n_words = AVR_TINY ? 2 : 4;
- return optimize > 0 && io_address_operand (base, HImode)
+ return io_address_operand (base, HImode)
? avr_asm_len ("out %i0+1,%B1" CR_TAB
"out %i0,%A1", op, plen, -2)
@@ -9059,10 +9084,12 @@ avr_handle_addr_attribute (tree *node, tree name, tree args,
bool io_p = (strncmp (IDENTIFIER_POINTER (name), "io", 2) == 0);
location_t loc = DECL_SOURCE_LOCATION (*node);
- if (TREE_CODE (*node) != VAR_DECL)
+ if (!VAR_P (*node))
{
- warning_at (loc, 0, "%qE attribute only applies to variables", name);
+ warning_at (loc, OPT_Wattributes, "%qE attribute only applies to "
+ "variables", name);
*no_add = true;
+ return NULL_TREE;
}
if (args != NULL_TREE)
@@ -9072,8 +9099,8 @@ avr_handle_addr_attribute (tree *node, tree name, tree args,
tree arg = TREE_VALUE (args);
if (TREE_CODE (arg) != INTEGER_CST)
{
- warning (0, "%qE attribute allows only an integer constant argument",
- name);
+ warning_at (loc, OPT_Wattributes, "%qE attribute allows only an "
+ "integer constant argument", name);
*no_add = true;
}
else if (io_p
@@ -9082,19 +9109,20 @@ avr_handle_addr_attribute (tree *node, tree name, tree args,
? low_io_address_operand : io_address_operand)
(GEN_INT (TREE_INT_CST_LOW (arg)), QImode)))
{
- warning_at (loc, 0, "%qE attribute address out of range", name);
+ warning_at (loc, OPT_Wattributes, "%qE attribute address "
+ "out of range", name);
*no_add = true;
}
else
{
tree attribs = DECL_ATTRIBUTES (*node);
- const char *names[] = { "io", "io_low", "address", NULL } ;
+ const char *names[] = { "io", "io_low", "address", NULL };
for (const char **p = names; *p; p++)
{
tree other = lookup_attribute (*p, attribs);
if (other && TREE_VALUE (other))
{
- warning_at (loc, 0,
+ warning_at (loc, OPT_Wattributes,
"both %s and %qE attribute provide address",
*p, name);
*no_add = true;
@@ -9105,7 +9133,8 @@ avr_handle_addr_attribute (tree *node, tree name, tree args,
}
if (*no_add == false && io_p && !TREE_THIS_VOLATILE (*node))
- warning_at (loc, 0, "%qE attribute on non-volatile variable", name);
+ warning_at (loc, OPT_Wattributes, "%qE attribute on non-volatile variable",
+ name);
return NULL_TREE;
}
@@ -9153,11 +9182,11 @@ avr_attribute_table[] =
false },
{ "OS_main", 0, 0, false, true, true, avr_handle_fntype_attribute,
false },
- { "io", 0, 1, false, false, false, avr_handle_addr_attribute,
+ { "io", 0, 1, true, false, false, avr_handle_addr_attribute,
false },
- { "io_low", 0, 1, false, false, false, avr_handle_addr_attribute,
+ { "io_low", 0, 1, true, false, false, avr_handle_addr_attribute,
false },
- { "address", 1, 1, false, false, false, avr_handle_addr_attribute,
+ { "address", 1, 1, true, false, false, avr_handle_addr_attribute,
false },
{ NULL, 0, 0, false, false, false, NULL, false }
};
@@ -9672,13 +9701,26 @@ avr_encode_section_info (tree decl, rtx rtl, int new_decl_p)
if (new_decl_p
&& decl && DECL_P (decl)
- && NULL_TREE == DECL_INITIAL (decl)
&& !DECL_EXTERNAL (decl)
&& avr_progmem_p (decl, DECL_ATTRIBUTES (decl)))
{
- warning (OPT_Wuninitialized,
- "uninitialized variable %q+D put into "
- "program memory area", decl);
+ if (!TREE_READONLY (decl))
+ {
+ // This might happen with C++ if stuff needs constructing.
+ error ("variable %q+D with dynamic initialization put "
+ "into program memory area", decl);
+ }
+ else if (NULL_TREE == DECL_INITIAL (decl))
+ {
+ // Don't warn for (implicit) aliases like in PR80462.
+ tree asmname = DECL_ASSEMBLER_NAME (decl);
+ varpool_node *node = varpool_node::get_for_asmname (asmname);
+ bool alias_p = node && node->alias;
+
+ if (!alias_p)
+ warning (OPT_Wuninitialized, "uninitialized variable %q+D put "
+ "into program memory area", decl);
+ }
}
default_encode_section_info (decl, rtl, new_decl_p);
@@ -10848,8 +10890,7 @@ avr_address_cost (rtx x, machine_mode mode ATTRIBUTE_UNUSED,
}
else if (CONSTANT_ADDRESS_P (x))
{
- if (optimize > 0
- && io_address_operand (x, QImode))
+ if (io_address_operand (x, QImode))
cost = 2;
}
diff --git a/gcc/config/avr/avr.opt b/gcc/config/avr/avr.opt
index 7e32ce5a350..dc7326c3d12 100644
--- a/gcc/config/avr/avr.opt
+++ b/gcc/config/avr/avr.opt
@@ -91,6 +91,10 @@ Waddr-space-convert
Warning C Report Var(avr_warn_addr_space_convert) Init(0)
Warn if the address space of an address is changed.
+Wmisspelled-isr
+Warning C C++ Report Var(avr_warn_misspelled_isr) Init(1)
+Warn if the ISR is misspelled, i.e. without __vector prefix. Enabled by default.
+
mfract-convert-truncate
Target Report Mask(FRACT_CONV_TRUNC)
Allow to use truncation instead of rounding towards 0 for fractional int types
diff --git a/gcc/config/i386/avx2intrin.h b/gcc/config/i386/avx2intrin.h
index b2a2f488c01..187b87593a1 100644
--- a/gcc/config/i386/avx2intrin.h
+++ b/gcc/config/i386/avx2intrin.h
@@ -1246,422 +1246,426 @@ _mm_srlv_epi64 (__m128i __X, __m128i __Y)
#ifdef __OPTIMIZE__
extern __inline __m128d
__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm_i32gather_pd (double const *base, __m128i index, const int scale)
+_mm_i32gather_pd (double const *__base, __m128i __index, const int __scale)
{
- __v2df zero = _mm_setzero_pd ();
- __v2df mask = _mm_cmpeq_pd (zero, zero);
+ __v2df __zero = _mm_setzero_pd ();
+ __v2df __mask = _mm_cmpeq_pd (__zero, __zero);
return (__m128d) __builtin_ia32_gathersiv2df (_mm_undefined_pd (),
- base,
- (__v4si)index,
- mask,
- scale);
+ __base,
+ (__v4si)__index,
+ __mask,
+ __scale);
}
extern __inline __m128d
__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm_mask_i32gather_pd (__m128d src, double const *base, __m128i index,
- __m128d mask, const int scale)
+_mm_mask_i32gather_pd (__m128d __src, double const *__base, __m128i __index,
+ __m128d __mask, const int __scale)
{
- return (__m128d) __builtin_ia32_gathersiv2df ((__v2df)src,
- base,
- (__v4si)index,
- (__v2df)mask,
- scale);
+ return (__m128d) __builtin_ia32_gathersiv2df ((__v2df)__src,
+ __base,
+ (__v4si)__index,
+ (__v2df)__mask,
+ __scale);
}
extern __inline __m256d
__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_i32gather_pd (double const *base, __m128i index, const int scale)
+_mm256_i32gather_pd (double const *__base, __m128i __index, const int __scale)
{
- __v4df zero = _mm256_setzero_pd ();
- __v4df mask = _mm256_cmp_pd (zero, zero, _CMP_EQ_OQ);
+ __v4df __zero = _mm256_setzero_pd ();
+ __v4df __mask = _mm256_cmp_pd (__zero, __zero, _CMP_EQ_OQ);
return (__m256d) __builtin_ia32_gathersiv4df (_mm256_undefined_pd (),
- base,
- (__v4si)index,
- mask,
- scale);
+ __base,
+ (__v4si)__index,
+ __mask,
+ __scale);
}
extern __inline __m256d
__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_mask_i32gather_pd (__m256d src, double const *base,
- __m128i index, __m256d mask, const int scale)
+_mm256_mask_i32gather_pd (__m256d __src, double const *__base,
+ __m128i __index, __m256d __mask, const int __scale)
{
- return (__m256d) __builtin_ia32_gathersiv4df ((__v4df)src,
- base,
- (__v4si)index,
- (__v4df)mask,
- scale);
+ return (__m256d) __builtin_ia32_gathersiv4df ((__v4df)__src,
+ __base,
+ (__v4si)__index,
+ (__v4df)__mask,
+ __scale);
}
extern __inline __m128d
__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm_i64gather_pd (double const *base, __m128i index, const int scale)
+_mm_i64gather_pd (double const *__base, __m128i __index, const int __scale)
{
- __v2df src = _mm_setzero_pd ();
- __v2df mask = _mm_cmpeq_pd (src, src);
+ __v2df __src = _mm_setzero_pd ();
+ __v2df __mask = _mm_cmpeq_pd (__src, __src);
- return (__m128d) __builtin_ia32_gatherdiv2df (src,
- base,
- (__v2di)index,
- mask,
- scale);
+ return (__m128d) __builtin_ia32_gatherdiv2df (__src,
+ __base,
+ (__v2di)__index,
+ __mask,
+ __scale);
}
extern __inline __m128d
__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm_mask_i64gather_pd (__m128d src, double const *base, __m128i index,
- __m128d mask, const int scale)
+_mm_mask_i64gather_pd (__m128d __src, double const *__base, __m128i __index,
+ __m128d __mask, const int __scale)
{
- return (__m128d) __builtin_ia32_gatherdiv2df ((__v2df)src,
- base,
- (__v2di)index,
- (__v2df)mask,
- scale);
+ return (__m128d) __builtin_ia32_gatherdiv2df ((__v2df)__src,
+ __base,
+ (__v2di)__index,
+ (__v2df)__mask,
+ __scale);
}
extern __inline __m256d
__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_i64gather_pd (double const *base, __m256i index, const int scale)
+_mm256_i64gather_pd (double const *__base, __m256i __index, const int __scale)
{
- __v4df src = _mm256_setzero_pd ();
- __v4df mask = _mm256_cmp_pd (src, src, _CMP_EQ_OQ);
+ __v4df __src = _mm256_setzero_pd ();
+ __v4df __mask = _mm256_cmp_pd (__src, __src, _CMP_EQ_OQ);
- return (__m256d) __builtin_ia32_gatherdiv4df (src,
- base,
- (__v4di)index,
- mask,
- scale);
+ return (__m256d) __builtin_ia32_gatherdiv4df (__src,
+ __base,
+ (__v4di)__index,
+ __mask,
+ __scale);
}
extern __inline __m256d
__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_mask_i64gather_pd (__m256d src, double const *base,
- __m256i index, __m256d mask, const int scale)
+_mm256_mask_i64gather_pd (__m256d __src, double const *__base,
+ __m256i __index, __m256d __mask, const int __scale)
{
- return (__m256d) __builtin_ia32_gatherdiv4df ((__v4df)src,
- base,
- (__v4di)index,
- (__v4df)mask,
- scale);
+ return (__m256d) __builtin_ia32_gatherdiv4df ((__v4df)__src,
+ __base,
+ (__v4di)__index,
+ (__v4df)__mask,
+ __scale);
}
extern __inline __m128
__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm_i32gather_ps (float const *base, __m128i index, const int scale)
+_mm_i32gather_ps (float const *__base, __m128i __index, const int __scale)
{
- __v4sf src = _mm_setzero_ps ();
- __v4sf mask = _mm_cmpeq_ps (src, src);
+ __v4sf __src = _mm_setzero_ps ();
+ __v4sf __mask = _mm_cmpeq_ps (__src, __src);
- return (__m128) __builtin_ia32_gathersiv4sf (src,
- base,
- (__v4si)index,
- mask,
- scale);
+ return (__m128) __builtin_ia32_gathersiv4sf (__src,
+ __base,
+ (__v4si)__index,
+ __mask,
+ __scale);
}
extern __inline __m128
__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm_mask_i32gather_ps (__m128 src, float const *base, __m128i index,
- __m128 mask, const int scale)
+_mm_mask_i32gather_ps (__m128 __src, float const *__base, __m128i __index,
+ __m128 __mask, const int __scale)
{
- return (__m128) __builtin_ia32_gathersiv4sf ((__v4sf)src,
- base,
- (__v4si)index,
- (__v4sf)mask,
- scale);
+ return (__m128) __builtin_ia32_gathersiv4sf ((__v4sf)__src,
+ __base,
+ (__v4si)__index,
+ (__v4sf)__mask,
+ __scale);
}
extern __inline __m256
__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_i32gather_ps (float const *base, __m256i index, const int scale)
+_mm256_i32gather_ps (float const *__base, __m256i __index, const int __scale)
{
- __v8sf src = _mm256_setzero_ps ();
- __v8sf mask = _mm256_cmp_ps (src, src, _CMP_EQ_OQ);
+ __v8sf __src = _mm256_setzero_ps ();
+ __v8sf __mask = _mm256_cmp_ps (__src, __src, _CMP_EQ_OQ);
- return (__m256) __builtin_ia32_gathersiv8sf (src,
- base,
- (__v8si)index,
- mask,
- scale);
+ return (__m256) __builtin_ia32_gathersiv8sf (__src,
+ __base,
+ (__v8si)__index,
+ __mask,
+ __scale);
}
extern __inline __m256
__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_mask_i32gather_ps (__m256 src, float const *base,
- __m256i index, __m256 mask, const int scale)
+_mm256_mask_i32gather_ps (__m256 __src, float const *__base,
+ __m256i __index, __m256 __mask, const int __scale)
{
- return (__m256) __builtin_ia32_gathersiv8sf ((__v8sf)src,
- base,
- (__v8si)index,
- (__v8sf)mask,
- scale);
+ return (__m256) __builtin_ia32_gathersiv8sf ((__v8sf)__src,
+ __base,
+ (__v8si)__index,
+ (__v8sf)__mask,
+ __scale);
}
extern __inline __m128
__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm_i64gather_ps (float const *base, __m128i index, const int scale)
+_mm_i64gather_ps (float const *__base, __m128i __index, const int __scale)
{
- __v4sf src = _mm_setzero_ps ();
- __v4sf mask = _mm_cmpeq_ps (src, src);
+ __v4sf __src = _mm_setzero_ps ();
+ __v4sf __mask = _mm_cmpeq_ps (__src, __src);
- return (__m128) __builtin_ia32_gatherdiv4sf (src,
- base,
- (__v2di)index,
- mask,
- scale);
+ return (__m128) __builtin_ia32_gatherdiv4sf (__src,
+ __base,
+ (__v2di)__index,
+ __mask,
+ __scale);
}
extern __inline __m128
__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm_mask_i64gather_ps (__m128 src, float const *base, __m128i index,
- __m128 mask, const int scale)
+_mm_mask_i64gather_ps (__m128 __src, float const *__base, __m128i __index,
+ __m128 __mask, const int __scale)
{
- return (__m128) __builtin_ia32_gatherdiv4sf ((__v4sf)src,
- base,
- (__v2di)index,
- (__v4sf)mask,
- scale);
+ return (__m128) __builtin_ia32_gatherdiv4sf ((__v4sf)__src,
+ __base,
+ (__v2di)__index,
+ (__v4sf)__mask,
+ __scale);
}
extern __inline __m128
__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_i64gather_ps (float const *base, __m256i index, const int scale)
+_mm256_i64gather_ps (float const *__base, __m256i __index, const int __scale)
{
- __v4sf src = _mm_setzero_ps ();
- __v4sf mask = _mm_cmpeq_ps (src, src);
+ __v4sf __src = _mm_setzero_ps ();
+ __v4sf __mask = _mm_cmpeq_ps (__src, __src);
- return (__m128) __builtin_ia32_gatherdiv4sf256 (src,
- base,
- (__v4di)index,
- mask,
- scale);
+ return (__m128) __builtin_ia32_gatherdiv4sf256 (__src,
+ __base,
+ (__v4di)__index,
+ __mask,
+ __scale);
}
extern __inline __m128
__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_mask_i64gather_ps (__m128 src, float const *base,
- __m256i index, __m128 mask, const int scale)
+_mm256_mask_i64gather_ps (__m128 __src, float const *__base,
+ __m256i __index, __m128 __mask, const int __scale)
{
- return (__m128) __builtin_ia32_gatherdiv4sf256 ((__v4sf)src,
- base,
- (__v4di)index,
- (__v4sf)mask,
- scale);
+ return (__m128) __builtin_ia32_gatherdiv4sf256 ((__v4sf)__src,
+ __base,
+ (__v4di)__index,
+ (__v4sf)__mask,
+ __scale);
}
extern __inline __m128i
__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm_i32gather_epi64 (long long int const *base,
- __m128i index, const int scale)
+_mm_i32gather_epi64 (long long int const *__base,
+ __m128i __index, const int __scale)
{
- __v2di src = __extension__ (__v2di){ 0, 0 };
- __v2di mask = __extension__ (__v2di){ ~0, ~0 };
+ __v2di __src = __extension__ (__v2di){ 0, 0 };
+ __v2di __mask = __extension__ (__v2di){ ~0, ~0 };
- return (__m128i) __builtin_ia32_gathersiv2di (src,
- base,
- (__v4si)index,
- mask,
- scale);
+ return (__m128i) __builtin_ia32_gathersiv2di (__src,
+ __base,
+ (__v4si)__index,
+ __mask,
+ __scale);
}
extern __inline __m128i
__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm_mask_i32gather_epi64 (__m128i src, long long int const *base,
- __m128i index, __m128i mask, const int scale)
+_mm_mask_i32gather_epi64 (__m128i __src, long long int const *__base,
+ __m128i __index, __m128i __mask, const int __scale)
{
- return (__m128i) __builtin_ia32_gathersiv2di ((__v2di)src,
- base,
- (__v4si)index,
- (__v2di)mask,
- scale);
+ return (__m128i) __builtin_ia32_gathersiv2di ((__v2di)__src,
+ __base,
+ (__v4si)__index,
+ (__v2di)__mask,
+ __scale);
}
extern __inline __m256i
__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_i32gather_epi64 (long long int const *base,
- __m128i index, const int scale)
+_mm256_i32gather_epi64 (long long int const *__base,
+ __m128i __index, const int __scale)
{
- __v4di src = __extension__ (__v4di){ 0, 0, 0, 0 };
- __v4di mask = __extension__ (__v4di){ ~0, ~0, ~0, ~0 };
+ __v4di __src = __extension__ (__v4di){ 0, 0, 0, 0 };
+ __v4di __mask = __extension__ (__v4di){ ~0, ~0, ~0, ~0 };
- return (__m256i) __builtin_ia32_gathersiv4di (src,
- base,
- (__v4si)index,
- mask,
- scale);
+ return (__m256i) __builtin_ia32_gathersiv4di (__src,
+ __base,
+ (__v4si)__index,
+ __mask,
+ __scale);
}
extern __inline __m256i
__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_mask_i32gather_epi64 (__m256i src, long long int const *base,
- __m128i index, __m256i mask, const int scale)
+_mm256_mask_i32gather_epi64 (__m256i __src, long long int const *__base,
+ __m128i __index, __m256i __mask,
+ const int __scale)
{
- return (__m256i) __builtin_ia32_gathersiv4di ((__v4di)src,
- base,
- (__v4si)index,
- (__v4di)mask,
- scale);
+ return (__m256i) __builtin_ia32_gathersiv4di ((__v4di)__src,
+ __base,
+ (__v4si)__index,
+ (__v4di)__mask,
+ __scale);
}
extern __inline __m128i
__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm_i64gather_epi64 (long long int const *base,
- __m128i index, const int scale)
+_mm_i64gather_epi64 (long long int const *__base,
+ __m128i __index, const int __scale)
{
- __v2di src = __extension__ (__v2di){ 0, 0 };
- __v2di mask = __extension__ (__v2di){ ~0, ~0 };
+ __v2di __src = __extension__ (__v2di){ 0, 0 };
+ __v2di __mask = __extension__ (__v2di){ ~0, ~0 };
- return (__m128i) __builtin_ia32_gatherdiv2di (src,
- base,
- (__v2di)index,
- mask,
- scale);
+ return (__m128i) __builtin_ia32_gatherdiv2di (__src,
+ __base,
+ (__v2di)__index,
+ __mask,
+ __scale);
}
extern __inline __m128i
__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm_mask_i64gather_epi64 (__m128i src, long long int const *base, __m128i index,
- __m128i mask, const int scale)
+_mm_mask_i64gather_epi64 (__m128i __src, long long int const *__base,
+ __m128i __index, __m128i __mask, const int __scale)
{
- return (__m128i) __builtin_ia32_gatherdiv2di ((__v2di)src,
- base,
- (__v2di)index,
- (__v2di)mask,
- scale);
+ return (__m128i) __builtin_ia32_gatherdiv2di ((__v2di)__src,
+ __base,
+ (__v2di)__index,
+ (__v2di)__mask,
+ __scale);
}
extern __inline __m256i
__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_i64gather_epi64 (long long int const *base,
- __m256i index, const int scale)
+_mm256_i64gather_epi64 (long long int const *__base,
+ __m256i __index, const int __scale)
{
- __v4di src = __extension__ (__v4di){ 0, 0, 0, 0 };
- __v4di mask = __extension__ (__v4di){ ~0, ~0, ~0, ~0 };
+ __v4di __src = __extension__ (__v4di){ 0, 0, 0, 0 };
+ __v4di __mask = __extension__ (__v4di){ ~0, ~0, ~0, ~0 };
- return (__m256i) __builtin_ia32_gatherdiv4di (src,
- base,
- (__v4di)index,
- mask,
- scale);
+ return (__m256i) __builtin_ia32_gatherdiv4di (__src,
+ __base,
+ (__v4di)__index,
+ __mask,
+ __scale);
}
extern __inline __m256i
__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_mask_i64gather_epi64 (__m256i src, long long int const *base,
- __m256i index, __m256i mask, const int scale)
+_mm256_mask_i64gather_epi64 (__m256i __src, long long int const *__base,
+ __m256i __index, __m256i __mask,
+ const int __scale)
{
- return (__m256i) __builtin_ia32_gatherdiv4di ((__v4di)src,
- base,
- (__v4di)index,
- (__v4di)mask,
- scale);
+ return (__m256i) __builtin_ia32_gatherdiv4di ((__v4di)__src,
+ __base,
+ (__v4di)__index,
+ (__v4di)__mask,
+ __scale);
}
extern __inline __m128i
__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm_i32gather_epi32 (int const *base, __m128i index, const int scale)
+_mm_i32gather_epi32 (int const *__base, __m128i __index, const int __scale)
{
- __v4si src = __extension__ (__v4si){ 0, 0, 0, 0 };
- __v4si mask = __extension__ (__v4si){ ~0, ~0, ~0, ~0 };
+ __v4si __src = __extension__ (__v4si){ 0, 0, 0, 0 };
+ __v4si __mask = __extension__ (__v4si){ ~0, ~0, ~0, ~0 };
- return (__m128i) __builtin_ia32_gathersiv4si (src,
- base,
- (__v4si)index,
- mask,
- scale);
+ return (__m128i) __builtin_ia32_gathersiv4si (__src,
+ __base,
+ (__v4si)__index,
+ __mask,
+ __scale);
}
extern __inline __m128i
__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm_mask_i32gather_epi32 (__m128i src, int const *base, __m128i index,
- __m128i mask, const int scale)
+_mm_mask_i32gather_epi32 (__m128i __src, int const *__base, __m128i __index,
+ __m128i __mask, const int __scale)
{
- return (__m128i) __builtin_ia32_gathersiv4si ((__v4si)src,
- base,
- (__v4si)index,
- (__v4si)mask,
- scale);
+ return (__m128i) __builtin_ia32_gathersiv4si ((__v4si)__src,
+ __base,
+ (__v4si)__index,
+ (__v4si)__mask,
+ __scale);
}
extern __inline __m256i
__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_i32gather_epi32 (int const *base, __m256i index, const int scale)
+_mm256_i32gather_epi32 (int const *__base, __m256i __index, const int __scale)
{
- __v8si src = __extension__ (__v8si){ 0, 0, 0, 0, 0, 0, 0, 0 };
- __v8si mask = __extension__ (__v8si){ ~0, ~0, ~0, ~0, ~0, ~0, ~0, ~0 };
+ __v8si __src = __extension__ (__v8si){ 0, 0, 0, 0, 0, 0, 0, 0 };
+ __v8si __mask = __extension__ (__v8si){ ~0, ~0, ~0, ~0, ~0, ~0, ~0, ~0 };
- return (__m256i) __builtin_ia32_gathersiv8si (src,
- base,
- (__v8si)index,
- mask,
- scale);
+ return (__m256i) __builtin_ia32_gathersiv8si (__src,
+ __base,
+ (__v8si)__index,
+ __mask,
+ __scale);
}
extern __inline __m256i
__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_mask_i32gather_epi32 (__m256i src, int const *base,
- __m256i index, __m256i mask, const int scale)
+_mm256_mask_i32gather_epi32 (__m256i __src, int const *__base,
+ __m256i __index, __m256i __mask,
+ const int __scale)
{
- return (__m256i) __builtin_ia32_gathersiv8si ((__v8si)src,
- base,
- (__v8si)index,
- (__v8si)mask,
- scale);
+ return (__m256i) __builtin_ia32_gathersiv8si ((__v8si)__src,
+ __base,
+ (__v8si)__index,
+ (__v8si)__mask,
+ __scale);
}
extern __inline __m128i
__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm_i64gather_epi32 (int const *base, __m128i index, const int scale)
+_mm_i64gather_epi32 (int const *__base, __m128i __index, const int __scale)
{
- __v4si src = __extension__ (__v4si){ 0, 0, 0, 0 };
- __v4si mask = __extension__ (__v4si){ ~0, ~0, ~0, ~0 };
+ __v4si __src = __extension__ (__v4si){ 0, 0, 0, 0 };
+ __v4si __mask = __extension__ (__v4si){ ~0, ~0, ~0, ~0 };
- return (__m128i) __builtin_ia32_gatherdiv4si (src,
- base,
- (__v2di)index,
- mask,
- scale);
+ return (__m128i) __builtin_ia32_gatherdiv4si (__src,
+ __base,
+ (__v2di)__index,
+ __mask,
+ __scale);
}
extern __inline __m128i
__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm_mask_i64gather_epi32 (__m128i src, int const *base, __m128i index,
- __m128i mask, const int scale)
+_mm_mask_i64gather_epi32 (__m128i __src, int const *__base, __m128i __index,
+ __m128i __mask, const int __scale)
{
- return (__m128i) __builtin_ia32_gatherdiv4si ((__v4si)src,
- base,
- (__v2di)index,
- (__v4si)mask,
- scale);
+ return (__m128i) __builtin_ia32_gatherdiv4si ((__v4si)__src,
+ __base,
+ (__v2di)__index,
+ (__v4si)__mask,
+ __scale);
}
extern __inline __m128i
__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_i64gather_epi32 (int const *base, __m256i index, const int scale)
+_mm256_i64gather_epi32 (int const *__base, __m256i __index, const int __scale)
{
- __v4si src = __extension__ (__v4si){ 0, 0, 0, 0 };
- __v4si mask = __extension__ (__v4si){ ~0, ~0, ~0, ~0 };
+ __v4si __src = __extension__ (__v4si){ 0, 0, 0, 0 };
+ __v4si __mask = __extension__ (__v4si){ ~0, ~0, ~0, ~0 };
- return (__m128i) __builtin_ia32_gatherdiv4si256 (src,
- base,
- (__v4di)index,
- mask,
- scale);
+ return (__m128i) __builtin_ia32_gatherdiv4si256 (__src,
+ __base,
+ (__v4di)__index,
+ __mask,
+ __scale);
}
extern __inline __m128i
__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_mask_i64gather_epi32 (__m128i src, int const *base,
- __m256i index, __m128i mask, const int scale)
+_mm256_mask_i64gather_epi32 (__m128i __src, int const *__base,
+ __m256i __index, __m128i __mask,
+ const int __scale)
{
- return (__m128i) __builtin_ia32_gatherdiv4si256 ((__v4si)src,
- base,
- (__v4di)index,
- (__v4si)mask,
- scale);
+ return (__m128i) __builtin_ia32_gatherdiv4si256 ((__v4si)__src,
+ __base,
+ (__v4di)__index,
+ (__v4si)__mask,
+ __scale);
}
#else /* __OPTIMIZE__ */
#define _mm_i32gather_pd(BASE, INDEX, SCALE) \
diff --git a/gcc/config/i386/avx512bwintrin.h b/gcc/config/i386/avx512bwintrin.h
index 7a7ed68c997..56c59a9c6dd 100644
--- a/gcc/config/i386/avx512bwintrin.h
+++ b/gcc/config/i386/avx512bwintrin.h
@@ -2420,6 +2420,72 @@ _mm512_cmple_epi16_mask (__m512i __X, __m512i __Y)
(__mmask32) -1);
}
+extern __inline __m512i
+__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+_mm512_packs_epi32 (__m512i __A, __m512i __B)
+{
+ return (__m512i) __builtin_ia32_packssdw512_mask ((__v16si) __A,
+ (__v16si) __B,
+ (__v32hi)
+ _mm512_setzero_hi (),
+ (__mmask32) -1);
+}
+
+extern __inline __m512i
+__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+_mm512_maskz_packs_epi32 (__mmask32 __M, __m512i __A, __m512i __B)
+{
+ return (__m512i) __builtin_ia32_packssdw512_mask ((__v16si) __A,
+ (__v16si) __B,
+ (__v32hi)
+ _mm512_setzero_hi (),
+ __M);
+}
+
+extern __inline __m512i
+__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+_mm512_mask_packs_epi32 (__m512i __W, __mmask32 __M, __m512i __A,
+ __m512i __B)
+{
+ return (__m512i) __builtin_ia32_packssdw512_mask ((__v16si) __A,
+ (__v16si) __B,
+ (__v32hi) __W,
+ __M);
+}
+
+extern __inline __m512i
+__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+_mm512_packus_epi32 (__m512i __A, __m512i __B)
+{
+ return (__m512i) __builtin_ia32_packusdw512_mask ((__v16si) __A,
+ (__v16si) __B,
+ (__v32hi)
+ _mm512_setzero_hi (),
+ (__mmask32) -1);
+}
+
+extern __inline __m512i
+__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+_mm512_maskz_packus_epi32 (__mmask32 __M, __m512i __A, __m512i __B)
+{
+ return (__m512i) __builtin_ia32_packusdw512_mask ((__v16si) __A,
+ (__v16si) __B,
+ (__v32hi)
+ _mm512_setzero_hi (),
+ __M);
+}
+
+extern __inline __m512i
+__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+_mm512_mask_packus_epi32 (__m512i __W, __mmask32 __M, __m512i __A,
+ __m512i __B)
+{
+ return (__m512i) __builtin_ia32_packusdw512_mask ((__v16si) __A,
+ (__v16si) __B,
+ (__v32hi) __W,
+ __M);
+}
+
#ifdef __OPTIMIZE__
extern __inline __m512i
__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
@@ -2745,72 +2811,6 @@ _mm512_cmp_epu8_mask (__m512i __X, __m512i __Y, const int __P)
extern __inline __m512i
__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm512_packs_epi32 (__m512i __A, __m512i __B)
-{
- return (__m512i) __builtin_ia32_packssdw512_mask ((__v16si) __A,
- (__v16si) __B,
- (__v32hi)
- _mm512_setzero_hi (),
- (__mmask32) -1);
-}
-
-extern __inline __m512i
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm512_maskz_packs_epi32 (__mmask32 __M, __m512i __A, __m512i __B)
-{
- return (__m512i) __builtin_ia32_packssdw512_mask ((__v16si) __A,
- (__v16si) __B,
- (__v32hi)
- _mm512_setzero_hi(),
- __M);
-}
-
-extern __inline __m512i
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm512_mask_packs_epi32 (__m512i __W, __mmask32 __M, __m512i __A,
- __m512i __B)
-{
- return (__m512i) __builtin_ia32_packssdw512_mask ((__v16si) __A,
- (__v16si) __B,
- (__v32hi) __W,
- __M);
-}
-
-extern __inline __m512i
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm512_packus_epi32 (__m512i __A, __m512i __B)
-{
- return (__m512i) __builtin_ia32_packusdw512_mask ((__v16si) __A,
- (__v16si) __B,
- (__v32hi)
- _mm512_setzero_hi (),
- (__mmask32) -1);
-}
-
-extern __inline __m512i
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm512_maskz_packus_epi32 (__mmask32 __M, __m512i __A, __m512i __B)
-{
- return (__m512i) __builtin_ia32_packusdw512_mask ((__v16si) __A,
- (__v16si) __B,
- (__v32hi)
- _mm512_setzero_hi(),
- __M);
-}
-
-extern __inline __m512i
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm512_mask_packus_epi32 (__m512i __W, __mmask32 __M, __m512i __A,
- __m512i __B)
-{
- return (__m512i) __builtin_ia32_packusdw512_mask ((__v16si) __A,
- (__v16si) __B,
- (__v32hi) __W,
- __M);
-}
-
-extern __inline __m512i
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
_mm512_bslli_epi128 (__m512i __A, const int __N)
{
return (__m512i) __builtin_ia32_pslldq512 (__A, __N * 8);
diff --git a/gcc/config/i386/avx512fintrin.h b/gcc/config/i386/avx512fintrin.h
index c7a91c1db24..4bd7dd3d62e 100644
--- a/gcc/config/i386/avx512fintrin.h
+++ b/gcc/config/i386/avx512fintrin.h
@@ -1438,66 +1438,68 @@ _mm_sub_round_ss (__m128 __A, __m128 __B, const int __R)
#ifdef __OPTIMIZE__
extern __inline __m512i
__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm512_ternarylogic_epi64 (__m512i __A, __m512i __B, __m512i __C, const int imm)
+_mm512_ternarylogic_epi64 (__m512i __A, __m512i __B, __m512i __C,
+ const int __imm)
{
return (__m512i) __builtin_ia32_pternlogq512_mask ((__v8di) __A,
(__v8di) __B,
- (__v8di) __C, imm,
+ (__v8di) __C, __imm,
(__mmask8) -1);
}
extern __inline __m512i
__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
_mm512_mask_ternarylogic_epi64 (__m512i __A, __mmask8 __U, __m512i __B,
- __m512i __C, const int imm)
+ __m512i __C, const int __imm)
{
return (__m512i) __builtin_ia32_pternlogq512_mask ((__v8di) __A,
(__v8di) __B,
- (__v8di) __C, imm,
+ (__v8di) __C, __imm,
(__mmask8) __U);
}
extern __inline __m512i
__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
_mm512_maskz_ternarylogic_epi64 (__mmask8 __U, __m512i __A, __m512i __B,
- __m512i __C, const int imm)
+ __m512i __C, const int __imm)
{
return (__m512i) __builtin_ia32_pternlogq512_maskz ((__v8di) __A,
(__v8di) __B,
(__v8di) __C,
- imm, (__mmask8) __U);
+ __imm, (__mmask8) __U);
}
extern __inline __m512i
__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm512_ternarylogic_epi32 (__m512i __A, __m512i __B, __m512i __C, const int imm)
+_mm512_ternarylogic_epi32 (__m512i __A, __m512i __B, __m512i __C,
+ const int __imm)
{
return (__m512i) __builtin_ia32_pternlogd512_mask ((__v16si) __A,
(__v16si) __B,
(__v16si) __C,
- imm, (__mmask16) -1);
+ __imm, (__mmask16) -1);
}
extern __inline __m512i
__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
_mm512_mask_ternarylogic_epi32 (__m512i __A, __mmask16 __U, __m512i __B,
- __m512i __C, const int imm)
+ __m512i __C, const int __imm)
{
return (__m512i) __builtin_ia32_pternlogd512_mask ((__v16si) __A,
(__v16si) __B,
(__v16si) __C,
- imm, (__mmask16) __U);
+ __imm, (__mmask16) __U);
}
extern __inline __m512i
__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
_mm512_maskz_ternarylogic_epi32 (__mmask16 __U, __m512i __A, __m512i __B,
- __m512i __C, const int imm)
+ __m512i __C, const int __imm)
{
return (__m512i) __builtin_ia32_pternlogd512_maskz ((__v16si) __A,
(__v16si) __B,
(__v16si) __C,
- imm, (__mmask16) __U);
+ __imm, (__mmask16) __U);
}
#else
#define _mm512_ternarylogic_epi64(A, B, C, I) \
@@ -9211,21 +9213,21 @@ extern __inline __m512
__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
_mm512_i32gather_ps (__m512i __index, void const *__addr, int __scale)
{
- __m512 v1_old = _mm512_undefined_ps ();
- __mmask16 mask = 0xFFFF;
+ __m512 __v1_old = _mm512_undefined_ps ();
+ __mmask16 __mask = 0xFFFF;
- return (__m512) __builtin_ia32_gathersiv16sf ((__v16sf) v1_old,
+ return (__m512) __builtin_ia32_gathersiv16sf ((__v16sf) __v1_old,
__addr,
(__v16si) __index,
- mask, __scale);
+ __mask, __scale);
}
extern __inline __m512
__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm512_mask_i32gather_ps (__m512 v1_old, __mmask16 __mask,
+_mm512_mask_i32gather_ps (__m512 __v1_old, __mmask16 __mask,
__m512i __index, void const *__addr, int __scale)
{
- return (__m512) __builtin_ia32_gathersiv16sf ((__v16sf) v1_old,
+ return (__m512) __builtin_ia32_gathersiv16sf ((__v16sf) __v1_old,
__addr,
(__v16si) __index,
__mask, __scale);
@@ -9235,12 +9237,12 @@ extern __inline __m512d
__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
_mm512_i32gather_pd (__m256i __index, void const *__addr, int __scale)
{
- __m512d v1_old = _mm512_undefined_pd ();
- __mmask8 mask = 0xFF;
+ __m512d __v1_old = _mm512_undefined_pd ();
+ __mmask8 __mask = 0xFF;
- return (__m512d) __builtin_ia32_gathersiv8df ((__v8df) v1_old,
+ return (__m512d) __builtin_ia32_gathersiv8df ((__v8df) __v1_old,
__addr,
- (__v8si) __index, mask,
+ (__v8si) __index, __mask,
__scale);
}
@@ -9259,12 +9261,12 @@ extern __inline __m256
__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
_mm512_i64gather_ps (__m512i __index, void const *__addr, int __scale)
{
- __m256 v1_old = _mm256_undefined_ps ();
- __mmask8 mask = 0xFF;
+ __m256 __v1_old = _mm256_undefined_ps ();
+ __mmask8 __mask = 0xFF;
- return (__m256) __builtin_ia32_gatherdiv16sf ((__v8sf) v1_old,
+ return (__m256) __builtin_ia32_gatherdiv16sf ((__v8sf) __v1_old,
__addr,
- (__v8di) __index, mask,
+ (__v8di) __index, __mask,
__scale);
}
@@ -9283,12 +9285,12 @@ extern __inline __m512d
__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
_mm512_i64gather_pd (__m512i __index, void const *__addr, int __scale)
{
- __m512d v1_old = _mm512_undefined_pd ();
- __mmask8 mask = 0xFF;
+ __m512d __v1_old = _mm512_undefined_pd ();
+ __mmask8 __mask = 0xFF;
- return (__m512d) __builtin_ia32_gatherdiv8df ((__v8df) v1_old,
+ return (__m512d) __builtin_ia32_gatherdiv8df ((__v8df) __v1_old,
__addr,
- (__v8di) __index, mask,
+ (__v8di) __index, __mask,
__scale);
}
@@ -9307,13 +9309,13 @@ extern __inline __m512i
__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
_mm512_i32gather_epi32 (__m512i __index, void const *__addr, int __scale)
{
- __m512i v1_old = _mm512_undefined_epi32 ();
- __mmask16 mask = 0xFFFF;
+ __m512i __v1_old = _mm512_undefined_epi32 ();
+ __mmask16 __mask = 0xFFFF;
- return (__m512i) __builtin_ia32_gathersiv16si ((__v16si) v1_old,
+ return (__m512i) __builtin_ia32_gathersiv16si ((__v16si) __v1_old,
__addr,
(__v16si) __index,
- mask, __scale);
+ __mask, __scale);
}
extern __inline __m512i
@@ -9331,12 +9333,12 @@ extern __inline __m512i
__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
_mm512_i32gather_epi64 (__m256i __index, void const *__addr, int __scale)
{
- __m512i v1_old = _mm512_undefined_epi32 ();
- __mmask8 mask = 0xFF;
+ __m512i __v1_old = _mm512_undefined_epi32 ();
+ __mmask8 __mask = 0xFF;
- return (__m512i) __builtin_ia32_gathersiv8di ((__v8di) v1_old,
+ return (__m512i) __builtin_ia32_gathersiv8di ((__v8di) __v1_old,
__addr,
- (__v8si) __index, mask,
+ (__v8si) __index, __mask,
__scale);
}
@@ -9356,13 +9358,13 @@ extern __inline __m256i
__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
_mm512_i64gather_epi32 (__m512i __index, void const *__addr, int __scale)
{
- __m256i v1_old = _mm256_undefined_si256 ();
- __mmask8 mask = 0xFF;
+ __m256i __v1_old = _mm256_undefined_si256 ();
+ __mmask8 __mask = 0xFF;
- return (__m256i) __builtin_ia32_gatherdiv16si ((__v8si) v1_old,
+ return (__m256i) __builtin_ia32_gatherdiv16si ((__v8si) __v1_old,
__addr,
(__v8di) __index,
- mask, __scale);
+ __mask, __scale);
}
extern __inline __m256i
@@ -9380,12 +9382,12 @@ extern __inline __m512i
__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
_mm512_i64gather_epi64 (__m512i __index, void const *__addr, int __scale)
{
- __m512i v1_old = _mm512_undefined_epi32 ();
- __mmask8 mask = 0xFF;
+ __m512i __v1_old = _mm512_undefined_epi32 ();
+ __mmask8 __mask = 0xFF;
- return (__m512i) __builtin_ia32_gatherdiv8di ((__v8di) v1_old,
+ return (__m512i) __builtin_ia32_gatherdiv8di ((__v8di) __v1_old,
__addr,
- (__v8di) __index, mask,
+ (__v8di) __index, __mask,
__scale);
}
diff --git a/gcc/config/i386/avx512pfintrin.h b/gcc/config/i386/avx512pfintrin.h
index b6781e7deed..97dee8183eb 100644
--- a/gcc/config/i386/avx512pfintrin.h
+++ b/gcc/config/i386/avx512pfintrin.h
@@ -48,102 +48,110 @@ typedef unsigned short __mmask16;
#ifdef __OPTIMIZE__
extern __inline void
__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm512_mask_prefetch_i32gather_pd (__m256i index, __mmask8 mask,
- void const *addr, int scale, int hint)
+_mm512_mask_prefetch_i32gather_pd (__m256i __index, __mmask8 __mask,
+ void const *__addr, int __scale, int __hint)
{
- __builtin_ia32_gatherpfdpd (mask, (__v8si) index, addr, scale, hint);
+ __builtin_ia32_gatherpfdpd (__mask, (__v8si) __index,
+ __addr, __scale, __hint);
}
extern __inline void
__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm512_mask_prefetch_i32gather_ps (__m512i index, __mmask16 mask,
- void const *addr, int scale, int hint)
+_mm512_mask_prefetch_i32gather_ps (__m512i __index, __mmask16 __mask,
+ void const *__addr, int __scale, int __hint)
{
- __builtin_ia32_gatherpfdps (mask, (__v16si) index, addr, scale, hint);
+ __builtin_ia32_gatherpfdps (__mask, (__v16si) __index, __addr,
+ __scale, __hint);
}
extern __inline void
__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm512_mask_prefetch_i64gather_pd (__m512i index, __mmask8 mask,
- void const *addr, int scale, int hint)
+_mm512_mask_prefetch_i64gather_pd (__m512i __index, __mmask8 __mask,
+ void const *__addr, int __scale, int __hint)
{
- __builtin_ia32_gatherpfqpd (mask, (__v8di) index, addr, scale, hint);
+ __builtin_ia32_gatherpfqpd (__mask, (__v8di) __index,
+ __addr, __scale, __hint);
}
extern __inline void
__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm512_mask_prefetch_i64gather_ps (__m512i index, __mmask8 mask,
- void const *addr, int scale, int hint)
+_mm512_mask_prefetch_i64gather_ps (__m512i __index, __mmask8 __mask,
+ void const *__addr, int __scale, int __hint)
{
- __builtin_ia32_gatherpfqps (mask, (__v8di) index, addr, scale, hint);
+ __builtin_ia32_gatherpfqps (__mask, (__v8di) __index, __addr,
+ __scale, __hint);
}
extern __inline void
__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm512_prefetch_i32scatter_pd (void *addr, __m256i index, int scale,
- int hint)
+_mm512_prefetch_i32scatter_pd (void *__addr, __m256i __index, int __scale,
+ int __hint)
{
- __builtin_ia32_scatterpfdpd ((__mmask8) 0xFF, (__v8si) index, addr, scale,
- hint);
+ __builtin_ia32_scatterpfdpd ((__mmask8) 0xFF, (__v8si) __index,
+ __addr, __scale, __hint);
}
extern __inline void
__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm512_prefetch_i32scatter_ps (void *addr, __m512i index, int scale,
- int hint)
+_mm512_prefetch_i32scatter_ps (void *__addr, __m512i __index, int __scale,
+ int __hint)
{
- __builtin_ia32_scatterpfdps ((__mmask16) 0xFFFF, (__v16si) index, addr, scale,
- hint);
+ __builtin_ia32_scatterpfdps ((__mmask16) 0xFFFF, (__v16si) __index,
+ __addr, __scale, __hint);
}
extern __inline void
__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm512_mask_prefetch_i32scatter_pd (void *addr, __mmask8 mask,
- __m256i index, int scale, int hint)
+_mm512_mask_prefetch_i32scatter_pd (void *__addr, __mmask8 __mask,
+ __m256i __index, int __scale, int __hint)
{
- __builtin_ia32_scatterpfdpd (mask, (__v8si) index, addr, scale, hint);
+ __builtin_ia32_scatterpfdpd (__mask, (__v8si) __index,
+ __addr, __scale, __hint);
}
extern __inline void
__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm512_mask_prefetch_i32scatter_ps (void *addr, __mmask16 mask,
- __m512i index, int scale, int hint)
+_mm512_mask_prefetch_i32scatter_ps (void *__addr, __mmask16 __mask,
+ __m512i __index, int __scale, int __hint)
{
- __builtin_ia32_scatterpfdps (mask, (__v16si) index, addr, scale, hint);
+ __builtin_ia32_scatterpfdps (__mask, (__v16si) __index, __addr,
+ __scale, __hint);
}
extern __inline void
__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm512_prefetch_i64scatter_pd (void *addr, __m512i index, int scale,
- int hint)
+_mm512_prefetch_i64scatter_pd (void *__addr, __m512i __index, int __scale,
+ int __hint)
{
- __builtin_ia32_scatterpfqpd ((__mmask8) 0xFF, (__v8di) index, addr, scale,
- hint);
+ __builtin_ia32_scatterpfqpd ((__mmask8) 0xFF, (__v8di) __index,
+ __addr, __scale, __hint);
}
extern __inline void
__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm512_prefetch_i64scatter_ps (void *addr, __m512i index, int scale,
- int hint)
+_mm512_prefetch_i64scatter_ps (void *__addr, __m512i __index, int __scale,
+ int __hint)
{
- __builtin_ia32_scatterpfqps ((__mmask8) 0xFF, (__v8di) index, addr, scale,
- hint);
+ __builtin_ia32_scatterpfqps ((__mmask8) 0xFF, (__v8di) __index,
+ __addr, __scale, __hint);
}
extern __inline void
__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm512_mask_prefetch_i64scatter_pd (void *addr, __mmask16 mask,
- __m512i index, int scale, int hint)
+_mm512_mask_prefetch_i64scatter_pd (void *__addr, __mmask16 __mask,
+ __m512i __index, int __scale, int __hint)
{
- __builtin_ia32_scatterpfqpd (mask, (__v8di) index, addr, scale, hint);
+ __builtin_ia32_scatterpfqpd (__mask, (__v8di) __index,
+ __addr, __scale, __hint);
}
extern __inline void
__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm512_mask_prefetch_i64scatter_ps (void *addr, __mmask16 mask,
- __m512i index, int scale, int hint)
+_mm512_mask_prefetch_i64scatter_ps (void *__addr, __mmask16 __mask,
+ __m512i __index, int __scale, int __hint)
{
- __builtin_ia32_scatterpfqps (mask, (__v8di) index, addr, scale, hint);
+ __builtin_ia32_scatterpfqps (__mask, (__v8di) __index, __addr,
+ __scale, __hint);
}
#else
diff --git a/gcc/config/i386/avx512vlintrin.h b/gcc/config/i386/avx512vlintrin.h
index 4ae0c5442fc..576cd202c05 100644
--- a/gcc/config/i386/avx512vlintrin.h
+++ b/gcc/config/i386/avx512vlintrin.h
@@ -9159,6 +9159,582 @@ _mm256_mask_permutexvar_epi32 (__m256i __W, __mmask8 __M, __m256i __X,
__M);
}
+extern __inline __mmask8
+ __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+_mm256_mask_cmpneq_epu32_mask (__mmask8 __M, __m256i __X, __m256i __Y)
+{
+ return (__mmask8) __builtin_ia32_ucmpd256_mask ((__v8si) __X,
+ (__v8si) __Y, 4,
+ (__mmask8) __M);
+}
+
+extern __inline __mmask8
+ __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+_mm256_cmpneq_epu32_mask (__m256i __X, __m256i __Y)
+{
+ return (__mmask8) __builtin_ia32_ucmpd256_mask ((__v8si) __X,
+ (__v8si) __Y, 4,
+ (__mmask8) -1);
+}
+
+extern __inline __mmask8
+ __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+_mm256_mask_cmplt_epu32_mask (__mmask8 __M, __m256i __X, __m256i __Y)
+{
+ return (__mmask8) __builtin_ia32_ucmpd256_mask ((__v8si) __X,
+ (__v8si) __Y, 1,
+ (__mmask8) __M);
+}
+
+extern __inline __mmask8
+ __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+_mm256_cmplt_epu32_mask (__m256i __X, __m256i __Y)
+{
+ return (__mmask8) __builtin_ia32_ucmpd256_mask ((__v8si) __X,
+ (__v8si) __Y, 1,
+ (__mmask8) -1);
+}
+
+extern __inline __mmask8
+ __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+_mm256_mask_cmpge_epu32_mask (__mmask8 __M, __m256i __X, __m256i __Y)
+{
+ return (__mmask8) __builtin_ia32_ucmpd256_mask ((__v8si) __X,
+ (__v8si) __Y, 5,
+ (__mmask8) __M);
+}
+
+extern __inline __mmask8
+ __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+_mm256_cmpge_epu32_mask (__m256i __X, __m256i __Y)
+{
+ return (__mmask8) __builtin_ia32_ucmpd256_mask ((__v8si) __X,
+ (__v8si) __Y, 5,
+ (__mmask8) -1);
+}
+
+extern __inline __mmask8
+ __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+_mm256_mask_cmple_epu32_mask (__mmask8 __M, __m256i __X, __m256i __Y)
+{
+ return (__mmask8) __builtin_ia32_ucmpd256_mask ((__v8si) __X,
+ (__v8si) __Y, 2,
+ (__mmask8) __M);
+}
+
+extern __inline __mmask8
+ __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+_mm256_cmple_epu32_mask (__m256i __X, __m256i __Y)
+{
+ return (__mmask8) __builtin_ia32_ucmpd256_mask ((__v8si) __X,
+ (__v8si) __Y, 2,
+ (__mmask8) -1);
+}
+
+extern __inline __mmask8
+ __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+_mm256_mask_cmpneq_epu64_mask (__mmask8 __M, __m256i __X, __m256i __Y)
+{
+ return (__mmask8) __builtin_ia32_ucmpq256_mask ((__v4di) __X,
+ (__v4di) __Y, 4,
+ (__mmask8) __M);
+}
+
+extern __inline __mmask8
+ __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+_mm256_cmpneq_epu64_mask (__m256i __X, __m256i __Y)
+{
+ return (__mmask8) __builtin_ia32_ucmpq256_mask ((__v4di) __X,
+ (__v4di) __Y, 4,
+ (__mmask8) -1);
+}
+
+extern __inline __mmask8
+ __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+_mm256_mask_cmplt_epu64_mask (__mmask8 __M, __m256i __X, __m256i __Y)
+{
+ return (__mmask8) __builtin_ia32_ucmpq256_mask ((__v4di) __X,
+ (__v4di) __Y, 1,
+ (__mmask8) __M);
+}
+
+extern __inline __mmask8
+ __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+_mm256_cmplt_epu64_mask (__m256i __X, __m256i __Y)
+{
+ return (__mmask8) __builtin_ia32_ucmpq256_mask ((__v4di) __X,
+ (__v4di) __Y, 1,
+ (__mmask8) -1);
+}
+
+extern __inline __mmask8
+ __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+_mm256_mask_cmpge_epu64_mask (__mmask8 __M, __m256i __X, __m256i __Y)
+{
+ return (__mmask8) __builtin_ia32_ucmpq256_mask ((__v4di) __X,
+ (__v4di) __Y, 5,
+ (__mmask8) __M);
+}
+
+extern __inline __mmask8
+ __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+_mm256_cmpge_epu64_mask (__m256i __X, __m256i __Y)
+{
+ return (__mmask8) __builtin_ia32_ucmpq256_mask ((__v4di) __X,
+ (__v4di) __Y, 5,
+ (__mmask8) -1);
+}
+
+extern __inline __mmask8
+ __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+_mm256_mask_cmple_epu64_mask (__mmask8 __M, __m256i __X, __m256i __Y)
+{
+ return (__mmask8) __builtin_ia32_ucmpq256_mask ((__v4di) __X,
+ (__v4di) __Y, 2,
+ (__mmask8) __M);
+}
+
+extern __inline __mmask8
+ __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+_mm256_cmple_epu64_mask (__m256i __X, __m256i __Y)
+{
+ return (__mmask8) __builtin_ia32_ucmpq256_mask ((__v4di) __X,
+ (__v4di) __Y, 2,
+ (__mmask8) -1);
+}
+
+extern __inline __mmask8
+ __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+_mm256_mask_cmpneq_epi32_mask (__mmask8 __M, __m256i __X, __m256i __Y)
+{
+ return (__mmask8) __builtin_ia32_cmpd256_mask ((__v8si) __X,
+ (__v8si) __Y, 4,
+ (__mmask8) __M);
+}
+
+extern __inline __mmask8
+ __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+_mm256_cmpneq_epi32_mask (__m256i __X, __m256i __Y)
+{
+ return (__mmask8) __builtin_ia32_cmpd256_mask ((__v8si) __X,
+ (__v8si) __Y, 4,
+ (__mmask8) -1);
+}
+
+extern __inline __mmask8
+ __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+_mm256_mask_cmplt_epi32_mask (__mmask8 __M, __m256i __X, __m256i __Y)
+{
+ return (__mmask8) __builtin_ia32_cmpd256_mask ((__v8si) __X,
+ (__v8si) __Y, 1,
+ (__mmask8) __M);
+}
+
+extern __inline __mmask8
+ __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+_mm256_cmplt_epi32_mask (__m256i __X, __m256i __Y)
+{
+ return (__mmask8) __builtin_ia32_cmpd256_mask ((__v8si) __X,
+ (__v8si) __Y, 1,
+ (__mmask8) -1);
+}
+
+extern __inline __mmask8
+ __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+_mm256_mask_cmpge_epi32_mask (__mmask8 __M, __m256i __X, __m256i __Y)
+{
+ return (__mmask8) __builtin_ia32_cmpd256_mask ((__v8si) __X,
+ (__v8si) __Y, 5,
+ (__mmask8) __M);
+}
+
+extern __inline __mmask8
+ __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+_mm256_cmpge_epi32_mask (__m256i __X, __m256i __Y)
+{
+ return (__mmask8) __builtin_ia32_cmpd256_mask ((__v8si) __X,
+ (__v8si) __Y, 5,
+ (__mmask8) -1);
+}
+
+extern __inline __mmask8
+ __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+_mm256_mask_cmple_epi32_mask (__mmask8 __M, __m256i __X, __m256i __Y)
+{
+ return (__mmask8) __builtin_ia32_cmpd256_mask ((__v8si) __X,
+ (__v8si) __Y, 2,
+ (__mmask8) __M);
+}
+
+extern __inline __mmask8
+ __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+_mm256_cmple_epi32_mask (__m256i __X, __m256i __Y)
+{
+ return (__mmask8) __builtin_ia32_cmpd256_mask ((__v8si) __X,
+ (__v8si) __Y, 2,
+ (__mmask8) -1);
+}
+
+extern __inline __mmask8
+ __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+_mm256_mask_cmpneq_epi64_mask (__mmask8 __M, __m256i __X, __m256i __Y)
+{
+ return (__mmask8) __builtin_ia32_cmpq256_mask ((__v4di) __X,
+ (__v4di) __Y, 4,
+ (__mmask8) __M);
+}
+
+extern __inline __mmask8
+ __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+_mm256_cmpneq_epi64_mask (__m256i __X, __m256i __Y)
+{
+ return (__mmask8) __builtin_ia32_cmpq256_mask ((__v4di) __X,
+ (__v4di) __Y, 4,
+ (__mmask8) -1);
+}
+
+extern __inline __mmask8
+ __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+_mm256_mask_cmplt_epi64_mask (__mmask8 __M, __m256i __X, __m256i __Y)
+{
+ return (__mmask8) __builtin_ia32_cmpq256_mask ((__v4di) __X,
+ (__v4di) __Y, 1,
+ (__mmask8) __M);
+}
+
+extern __inline __mmask8
+ __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+_mm256_cmplt_epi64_mask (__m256i __X, __m256i __Y)
+{
+ return (__mmask8) __builtin_ia32_cmpq256_mask ((__v4di) __X,
+ (__v4di) __Y, 1,
+ (__mmask8) -1);
+}
+
+extern __inline __mmask8
+ __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+_mm256_mask_cmpge_epi64_mask (__mmask8 __M, __m256i __X, __m256i __Y)
+{
+ return (__mmask8) __builtin_ia32_cmpq256_mask ((__v4di) __X,
+ (__v4di) __Y, 5,
+ (__mmask8) __M);
+}
+
+extern __inline __mmask8
+ __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+_mm256_cmpge_epi64_mask (__m256i __X, __m256i __Y)
+{
+ return (__mmask8) __builtin_ia32_cmpq256_mask ((__v4di) __X,
+ (__v4di) __Y, 5,
+ (__mmask8) -1);
+}
+
+extern __inline __mmask8
+ __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+_mm256_mask_cmple_epi64_mask (__mmask8 __M, __m256i __X, __m256i __Y)
+{
+ return (__mmask8) __builtin_ia32_cmpq256_mask ((__v4di) __X,
+ (__v4di) __Y, 2,
+ (__mmask8) __M);
+}
+
+extern __inline __mmask8
+ __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+_mm256_cmple_epi64_mask (__m256i __X, __m256i __Y)
+{
+ return (__mmask8) __builtin_ia32_cmpq256_mask ((__v4di) __X,
+ (__v4di) __Y, 2,
+ (__mmask8) -1);
+}
+
+extern __inline __mmask8
+ __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+_mm_mask_cmpneq_epu32_mask (__mmask8 __M, __m128i __X, __m128i __Y)
+{
+ return (__mmask8) __builtin_ia32_ucmpd128_mask ((__v4si) __X,
+ (__v4si) __Y, 4,
+ (__mmask8) __M);
+}
+
+extern __inline __mmask8
+ __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+_mm_cmpneq_epu32_mask (__m128i __X, __m128i __Y)
+{
+ return (__mmask8) __builtin_ia32_ucmpd128_mask ((__v4si) __X,
+ (__v4si) __Y, 4,
+ (__mmask8) -1);
+}
+
+extern __inline __mmask8
+ __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+_mm_mask_cmplt_epu32_mask (__mmask8 __M, __m128i __X, __m128i __Y)
+{
+ return (__mmask8) __builtin_ia32_ucmpd128_mask ((__v4si) __X,
+ (__v4si) __Y, 1,
+ (__mmask8) __M);
+}
+
+extern __inline __mmask8
+ __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+_mm_cmplt_epu32_mask (__m128i __X, __m128i __Y)
+{
+ return (__mmask8) __builtin_ia32_ucmpd128_mask ((__v4si) __X,
+ (__v4si) __Y, 1,
+ (__mmask8) -1);
+}
+
+extern __inline __mmask8
+ __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+_mm_mask_cmpge_epu32_mask (__mmask8 __M, __m128i __X, __m128i __Y)
+{
+ return (__mmask8) __builtin_ia32_ucmpd128_mask ((__v4si) __X,
+ (__v4si) __Y, 5,
+ (__mmask8) __M);
+}
+
+extern __inline __mmask8
+ __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+_mm_cmpge_epu32_mask (__m128i __X, __m128i __Y)
+{
+ return (__mmask8) __builtin_ia32_ucmpd128_mask ((__v4si) __X,
+ (__v4si) __Y, 5,
+ (__mmask8) -1);
+}
+
+extern __inline __mmask8
+ __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+_mm_mask_cmple_epu32_mask (__mmask8 __M, __m128i __X, __m128i __Y)
+{
+ return (__mmask8) __builtin_ia32_ucmpd128_mask ((__v4si) __X,
+ (__v4si) __Y, 2,
+ (__mmask8) __M);
+}
+
+extern __inline __mmask8
+ __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+_mm_cmple_epu32_mask (__m128i __X, __m128i __Y)
+{
+ return (__mmask8) __builtin_ia32_ucmpd128_mask ((__v4si) __X,
+ (__v4si) __Y, 2,
+ (__mmask8) -1);
+}
+
+extern __inline __mmask8
+ __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+_mm_mask_cmpneq_epu64_mask (__mmask8 __M, __m128i __X, __m128i __Y)
+{
+ return (__mmask8) __builtin_ia32_ucmpq128_mask ((__v2di) __X,
+ (__v2di) __Y, 4,
+ (__mmask8) __M);
+}
+
+extern __inline __mmask8
+ __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+_mm_cmpneq_epu64_mask (__m128i __X, __m128i __Y)
+{
+ return (__mmask8) __builtin_ia32_ucmpq128_mask ((__v2di) __X,
+ (__v2di) __Y, 4,
+ (__mmask8) -1);
+}
+
+extern __inline __mmask8
+ __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+_mm_mask_cmplt_epu64_mask (__mmask8 __M, __m128i __X, __m128i __Y)
+{
+ return (__mmask8) __builtin_ia32_ucmpq128_mask ((__v2di) __X,
+ (__v2di) __Y, 1,
+ (__mmask8) __M);
+}
+
+extern __inline __mmask8
+ __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+_mm_cmplt_epu64_mask (__m128i __X, __m128i __Y)
+{
+ return (__mmask8) __builtin_ia32_ucmpq128_mask ((__v2di) __X,
+ (__v2di) __Y, 1,
+ (__mmask8) -1);
+}
+
+extern __inline __mmask8
+ __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+_mm_mask_cmpge_epu64_mask (__mmask8 __M, __m128i __X, __m128i __Y)
+{
+ return (__mmask8) __builtin_ia32_ucmpq128_mask ((__v2di) __X,
+ (__v2di) __Y, 5,
+ (__mmask8) __M);
+}
+
+extern __inline __mmask8
+ __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+_mm_cmpge_epu64_mask (__m128i __X, __m128i __Y)
+{
+ return (__mmask8) __builtin_ia32_ucmpq128_mask ((__v2di) __X,
+ (__v2di) __Y, 5,
+ (__mmask8) -1);
+}
+
+extern __inline __mmask8
+ __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+_mm_mask_cmple_epu64_mask (__mmask8 __M, __m128i __X, __m128i __Y)
+{
+ return (__mmask8) __builtin_ia32_ucmpq128_mask ((__v2di) __X,
+ (__v2di) __Y, 2,
+ (__mmask8) __M);
+}
+
+extern __inline __mmask8
+ __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+_mm_cmple_epu64_mask (__m128i __X, __m128i __Y)
+{
+ return (__mmask8) __builtin_ia32_ucmpq128_mask ((__v2di) __X,
+ (__v2di) __Y, 2,
+ (__mmask8) -1);
+}
+
+extern __inline __mmask8
+ __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+_mm_mask_cmpneq_epi32_mask (__mmask8 __M, __m128i __X, __m128i __Y)
+{
+ return (__mmask8) __builtin_ia32_cmpd128_mask ((__v4si) __X,
+ (__v4si) __Y, 4,
+ (__mmask8) __M);
+}
+
+extern __inline __mmask8
+ __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+_mm_cmpneq_epi32_mask (__m128i __X, __m128i __Y)
+{
+ return (__mmask8) __builtin_ia32_cmpd128_mask ((__v4si) __X,
+ (__v4si) __Y, 4,
+ (__mmask8) -1);
+}
+
+extern __inline __mmask8
+ __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+_mm_mask_cmplt_epi32_mask (__mmask8 __M, __m128i __X, __m128i __Y)
+{
+ return (__mmask8) __builtin_ia32_cmpd128_mask ((__v4si) __X,
+ (__v4si) __Y, 1,
+ (__mmask8) __M);
+}
+
+extern __inline __mmask8
+ __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+_mm_cmplt_epi32_mask (__m128i __X, __m128i __Y)
+{
+ return (__mmask8) __builtin_ia32_cmpd128_mask ((__v4si) __X,
+ (__v4si) __Y, 1,
+ (__mmask8) -1);
+}
+
+extern __inline __mmask8
+ __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+_mm_mask_cmpge_epi32_mask (__mmask8 __M, __m128i __X, __m128i __Y)
+{
+ return (__mmask8) __builtin_ia32_cmpd128_mask ((__v4si) __X,
+ (__v4si) __Y, 5,
+ (__mmask8) __M);
+}
+
+extern __inline __mmask8
+ __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+_mm_cmpge_epi32_mask (__m128i __X, __m128i __Y)
+{
+ return (__mmask8) __builtin_ia32_cmpd128_mask ((__v4si) __X,
+ (__v4si) __Y, 5,
+ (__mmask8) -1);
+}
+
+extern __inline __mmask8
+ __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+_mm_mask_cmple_epi32_mask (__mmask8 __M, __m128i __X, __m128i __Y)
+{
+ return (__mmask8) __builtin_ia32_cmpd128_mask ((__v4si) __X,
+ (__v4si) __Y, 2,
+ (__mmask8) __M);
+}
+
+extern __inline __mmask8
+ __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+_mm_cmple_epi32_mask (__m128i __X, __m128i __Y)
+{
+ return (__mmask8) __builtin_ia32_cmpd128_mask ((__v4si) __X,
+ (__v4si) __Y, 2,
+ (__mmask8) -1);
+}
+
+extern __inline __mmask8
+ __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+_mm_mask_cmpneq_epi64_mask (__mmask8 __M, __m128i __X, __m128i __Y)
+{
+ return (__mmask8) __builtin_ia32_cmpq128_mask ((__v2di) __X,
+ (__v2di) __Y, 4,
+ (__mmask8) __M);
+}
+
+extern __inline __mmask8
+ __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+_mm_cmpneq_epi64_mask (__m128i __X, __m128i __Y)
+{
+ return (__mmask8) __builtin_ia32_cmpq128_mask ((__v2di) __X,
+ (__v2di) __Y, 4,
+ (__mmask8) -1);
+}
+
+extern __inline __mmask8
+ __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+_mm_mask_cmplt_epi64_mask (__mmask8 __M, __m128i __X, __m128i __Y)
+{
+ return (__mmask8) __builtin_ia32_cmpq128_mask ((__v2di) __X,
+ (__v2di) __Y, 1,
+ (__mmask8) __M);
+}
+
+extern __inline __mmask8
+ __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+_mm_cmplt_epi64_mask (__m128i __X, __m128i __Y)
+{
+ return (__mmask8) __builtin_ia32_cmpq128_mask ((__v2di) __X,
+ (__v2di) __Y, 1,
+ (__mmask8) -1);
+}
+
+extern __inline __mmask8
+ __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+_mm_mask_cmpge_epi64_mask (__mmask8 __M, __m128i __X, __m128i __Y)
+{
+ return (__mmask8) __builtin_ia32_cmpq128_mask ((__v2di) __X,
+ (__v2di) __Y, 5,
+ (__mmask8) __M);
+}
+
+extern __inline __mmask8
+ __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+_mm_cmpge_epi64_mask (__m128i __X, __m128i __Y)
+{
+ return (__mmask8) __builtin_ia32_cmpq128_mask ((__v2di) __X,
+ (__v2di) __Y, 5,
+ (__mmask8) -1);
+}
+
+extern __inline __mmask8
+ __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+_mm_mask_cmple_epi64_mask (__mmask8 __M, __m128i __X, __m128i __Y)
+{
+ return (__mmask8) __builtin_ia32_cmpq128_mask ((__v2di) __X,
+ (__v2di) __Y, 2,
+ (__mmask8) __M);
+}
+
+extern __inline __mmask8
+ __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+_mm_cmple_epi64_mask (__m128i __X, __m128i __Y)
+{
+ return (__mmask8) __builtin_ia32_cmpq128_mask ((__v2di) __X,
+ (__v2di) __Y, 2,
+ (__mmask8) -1);
+}
+
#ifdef __OPTIMIZE__
extern __inline __m256i
__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
@@ -9796,11 +10372,11 @@ _mm_maskz_srli_epi64 (__mmask8 __U, __m128i __A, const int __imm)
extern __inline __m256i
__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
_mm256_ternarylogic_epi64 (__m256i __A, __m256i __B, __m256i __C,
- const int imm)
+ const int __imm)
{
return (__m256i) __builtin_ia32_pternlogq256_mask ((__v4di) __A,
(__v4di) __B,
- (__v4di) __C, imm,
+ (__v4di) __C, __imm,
(__mmask8) -1);
}
@@ -9808,11 +10384,11 @@ extern __inline __m256i
__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
_mm256_mask_ternarylogic_epi64 (__m256i __A, __mmask8 __U,
__m256i __B, __m256i __C,
- const int imm)
+ const int __imm)
{
return (__m256i) __builtin_ia32_pternlogq256_mask ((__v4di) __A,
(__v4di) __B,
- (__v4di) __C, imm,
+ (__v4di) __C, __imm,
(__mmask8) __U);
}
@@ -9820,23 +10396,23 @@ extern __inline __m256i
__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
_mm256_maskz_ternarylogic_epi64 (__mmask8 __U, __m256i __A,
__m256i __B, __m256i __C,
- const int imm)
+ const int __imm)
{
return (__m256i) __builtin_ia32_pternlogq256_maskz ((__v4di) __A,
(__v4di) __B,
(__v4di) __C,
- imm,
+ __imm,
(__mmask8) __U);
}
extern __inline __m256i
__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
_mm256_ternarylogic_epi32 (__m256i __A, __m256i __B, __m256i __C,
- const int imm)
+ const int __imm)
{
return (__m256i) __builtin_ia32_pternlogd256_mask ((__v8si) __A,
(__v8si) __B,
- (__v8si) __C, imm,
+ (__v8si) __C, __imm,
(__mmask8) -1);
}
@@ -9844,11 +10420,11 @@ extern __inline __m256i
__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
_mm256_mask_ternarylogic_epi32 (__m256i __A, __mmask8 __U,
__m256i __B, __m256i __C,
- const int imm)
+ const int __imm)
{
return (__m256i) __builtin_ia32_pternlogd256_mask ((__v8si) __A,
(__v8si) __B,
- (__v8si) __C, imm,
+ (__v8si) __C, __imm,
(__mmask8) __U);
}
@@ -9856,80 +10432,80 @@ extern __inline __m256i
__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
_mm256_maskz_ternarylogic_epi32 (__mmask8 __U, __m256i __A,
__m256i __B, __m256i __C,
- const int imm)
+ const int __imm)
{
return (__m256i) __builtin_ia32_pternlogd256_maskz ((__v8si) __A,
(__v8si) __B,
(__v8si) __C,
- imm,
+ __imm,
(__mmask8) __U);
}
extern __inline __m128i
__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
_mm_ternarylogic_epi64 (__m128i __A, __m128i __B, __m128i __C,
- const int imm)
+ const int __imm)
{
return (__m128i) __builtin_ia32_pternlogq128_mask ((__v2di) __A,
(__v2di) __B,
- (__v2di) __C, imm,
+ (__v2di) __C, __imm,
(__mmask8) -1);
}
extern __inline __m128i
__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
_mm_mask_ternarylogic_epi64 (__m128i __A, __mmask8 __U,
- __m128i __B, __m128i __C, const int imm)
+ __m128i __B, __m128i __C, const int __imm)
{
return (__m128i) __builtin_ia32_pternlogq128_mask ((__v2di) __A,
(__v2di) __B,
- (__v2di) __C, imm,
+ (__v2di) __C, __imm,
(__mmask8) __U);
}
extern __inline __m128i
__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
_mm_maskz_ternarylogic_epi64 (__mmask8 __U, __m128i __A,
- __m128i __B, __m128i __C, const int imm)
+ __m128i __B, __m128i __C, const int __imm)
{
return (__m128i) __builtin_ia32_pternlogq128_maskz ((__v2di) __A,
(__v2di) __B,
(__v2di) __C,
- imm,
+ __imm,
(__mmask8) __U);
}
extern __inline __m128i
__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
_mm_ternarylogic_epi32 (__m128i __A, __m128i __B, __m128i __C,
- const int imm)
+ const int __imm)
{
return (__m128i) __builtin_ia32_pternlogd128_mask ((__v4si) __A,
(__v4si) __B,
- (__v4si) __C, imm,
+ (__v4si) __C, __imm,
(__mmask8) -1);
}
extern __inline __m128i
__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
_mm_mask_ternarylogic_epi32 (__m128i __A, __mmask8 __U,
- __m128i __B, __m128i __C, const int imm)
+ __m128i __B, __m128i __C, const int __imm)
{
return (__m128i) __builtin_ia32_pternlogd128_mask ((__v4si) __A,
(__v4si) __B,
- (__v4si) __C, imm,
+ (__v4si) __C, __imm,
(__mmask8) __U);
}
extern __inline __m128i
__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
_mm_maskz_ternarylogic_epi32 (__mmask8 __U, __m128i __A,
- __m128i __B, __m128i __C, const int imm)
+ __m128i __B, __m128i __C, const int __imm)
{
return (__m128i) __builtin_ia32_pternlogd128_maskz ((__v4si) __A,
(__v4si) __B,
(__v4si) __C,
- imm,
+ __imm,
(__mmask8) __U);
}
@@ -11771,582 +12347,6 @@ _mm256_permutex_pd (__m256d __X, const int __M)
(__mmask8) -1);
}
-extern __inline __mmask8
- __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_mask_cmpneq_epu32_mask (__mmask8 __M, __m256i __X, __m256i __Y)
-{
- return (__mmask8) __builtin_ia32_ucmpd256_mask ((__v8si) __X,
- (__v8si) __Y, 4,
- (__mmask8) __M);
-}
-
-extern __inline __mmask8
- __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_cmpneq_epu32_mask (__m256i __X, __m256i __Y)
-{
- return (__mmask8) __builtin_ia32_ucmpd256_mask ((__v8si) __X,
- (__v8si) __Y, 4,
- (__mmask8) -1);
-}
-
-extern __inline __mmask8
- __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_mask_cmplt_epu32_mask (__mmask8 __M, __m256i __X, __m256i __Y)
-{
- return (__mmask8) __builtin_ia32_ucmpd256_mask ((__v8si) __X,
- (__v8si) __Y, 1,
- (__mmask8) __M);
-}
-
-extern __inline __mmask8
- __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_cmplt_epu32_mask (__m256i __X, __m256i __Y)
-{
- return (__mmask8) __builtin_ia32_ucmpd256_mask ((__v8si) __X,
- (__v8si) __Y, 1,
- (__mmask8) -1);
-}
-
-extern __inline __mmask8
- __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_mask_cmpge_epu32_mask (__mmask8 __M, __m256i __X, __m256i __Y)
-{
- return (__mmask8) __builtin_ia32_ucmpd256_mask ((__v8si) __X,
- (__v8si) __Y, 5,
- (__mmask8) __M);
-}
-
-extern __inline __mmask8
- __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_cmpge_epu32_mask (__m256i __X, __m256i __Y)
-{
- return (__mmask8) __builtin_ia32_ucmpd256_mask ((__v8si) __X,
- (__v8si) __Y, 5,
- (__mmask8) -1);
-}
-
-extern __inline __mmask8
- __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_mask_cmple_epu32_mask (__mmask8 __M, __m256i __X, __m256i __Y)
-{
- return (__mmask8) __builtin_ia32_ucmpd256_mask ((__v8si) __X,
- (__v8si) __Y, 2,
- (__mmask8) __M);
-}
-
-extern __inline __mmask8
- __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_cmple_epu32_mask (__m256i __X, __m256i __Y)
-{
- return (__mmask8) __builtin_ia32_ucmpd256_mask ((__v8si) __X,
- (__v8si) __Y, 2,
- (__mmask8) -1);
-}
-
-extern __inline __mmask8
- __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_mask_cmpneq_epu64_mask (__mmask8 __M, __m256i __X, __m256i __Y)
-{
- return (__mmask8) __builtin_ia32_ucmpq256_mask ((__v4di) __X,
- (__v4di) __Y, 4,
- (__mmask8) __M);
-}
-
-extern __inline __mmask8
- __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_cmpneq_epu64_mask (__m256i __X, __m256i __Y)
-{
- return (__mmask8) __builtin_ia32_ucmpq256_mask ((__v4di) __X,
- (__v4di) __Y, 4,
- (__mmask8) -1);
-}
-
-extern __inline __mmask8
- __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_mask_cmplt_epu64_mask (__mmask8 __M, __m256i __X, __m256i __Y)
-{
- return (__mmask8) __builtin_ia32_ucmpq256_mask ((__v4di) __X,
- (__v4di) __Y, 1,
- (__mmask8) __M);
-}
-
-extern __inline __mmask8
- __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_cmplt_epu64_mask (__m256i __X, __m256i __Y)
-{
- return (__mmask8) __builtin_ia32_ucmpq256_mask ((__v4di) __X,
- (__v4di) __Y, 1,
- (__mmask8) -1);
-}
-
-extern __inline __mmask8
- __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_mask_cmpge_epu64_mask (__mmask8 __M, __m256i __X, __m256i __Y)
-{
- return (__mmask8) __builtin_ia32_ucmpq256_mask ((__v4di) __X,
- (__v4di) __Y, 5,
- (__mmask8) __M);
-}
-
-extern __inline __mmask8
- __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_cmpge_epu64_mask (__m256i __X, __m256i __Y)
-{
- return (__mmask8) __builtin_ia32_ucmpq256_mask ((__v4di) __X,
- (__v4di) __Y, 5,
- (__mmask8) -1);
-}
-
-extern __inline __mmask8
- __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_mask_cmple_epu64_mask (__mmask8 __M, __m256i __X, __m256i __Y)
-{
- return (__mmask8) __builtin_ia32_ucmpq256_mask ((__v4di) __X,
- (__v4di) __Y, 2,
- (__mmask8) __M);
-}
-
-extern __inline __mmask8
- __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_cmple_epu64_mask (__m256i __X, __m256i __Y)
-{
- return (__mmask8) __builtin_ia32_ucmpq256_mask ((__v4di) __X,
- (__v4di) __Y, 2,
- (__mmask8) -1);
-}
-
-extern __inline __mmask8
- __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_mask_cmpneq_epi32_mask (__mmask8 __M, __m256i __X, __m256i __Y)
-{
- return (__mmask8) __builtin_ia32_cmpd256_mask ((__v8si) __X,
- (__v8si) __Y, 4,
- (__mmask8) __M);
-}
-
-extern __inline __mmask8
- __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_cmpneq_epi32_mask (__m256i __X, __m256i __Y)
-{
- return (__mmask8) __builtin_ia32_cmpd256_mask ((__v8si) __X,
- (__v8si) __Y, 4,
- (__mmask8) -1);
-}
-
-extern __inline __mmask8
- __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_mask_cmplt_epi32_mask (__mmask8 __M, __m256i __X, __m256i __Y)
-{
- return (__mmask8) __builtin_ia32_cmpd256_mask ((__v8si) __X,
- (__v8si) __Y, 1,
- (__mmask8) __M);
-}
-
-extern __inline __mmask8
- __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_cmplt_epi32_mask (__m256i __X, __m256i __Y)
-{
- return (__mmask8) __builtin_ia32_cmpd256_mask ((__v8si) __X,
- (__v8si) __Y, 1,
- (__mmask8) -1);
-}
-
-extern __inline __mmask8
- __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_mask_cmpge_epi32_mask (__mmask8 __M, __m256i __X, __m256i __Y)
-{
- return (__mmask8) __builtin_ia32_cmpd256_mask ((__v8si) __X,
- (__v8si) __Y, 5,
- (__mmask8) __M);
-}
-
-extern __inline __mmask8
- __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_cmpge_epi32_mask (__m256i __X, __m256i __Y)
-{
- return (__mmask8) __builtin_ia32_cmpd256_mask ((__v8si) __X,
- (__v8si) __Y, 5,
- (__mmask8) -1);
-}
-
-extern __inline __mmask8
- __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_mask_cmple_epi32_mask (__mmask8 __M, __m256i __X, __m256i __Y)
-{
- return (__mmask8) __builtin_ia32_cmpd256_mask ((__v8si) __X,
- (__v8si) __Y, 2,
- (__mmask8) __M);
-}
-
-extern __inline __mmask8
- __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_cmple_epi32_mask (__m256i __X, __m256i __Y)
-{
- return (__mmask8) __builtin_ia32_cmpd256_mask ((__v8si) __X,
- (__v8si) __Y, 2,
- (__mmask8) -1);
-}
-
-extern __inline __mmask8
- __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_mask_cmpneq_epi64_mask (__mmask8 __M, __m256i __X, __m256i __Y)
-{
- return (__mmask8) __builtin_ia32_cmpq256_mask ((__v4di) __X,
- (__v4di) __Y, 4,
- (__mmask8) __M);
-}
-
-extern __inline __mmask8
- __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_cmpneq_epi64_mask (__m256i __X, __m256i __Y)
-{
- return (__mmask8) __builtin_ia32_cmpq256_mask ((__v4di) __X,
- (__v4di) __Y, 4,
- (__mmask8) -1);
-}
-
-extern __inline __mmask8
- __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_mask_cmplt_epi64_mask (__mmask8 __M, __m256i __X, __m256i __Y)
-{
- return (__mmask8) __builtin_ia32_cmpq256_mask ((__v4di) __X,
- (__v4di) __Y, 1,
- (__mmask8) __M);
-}
-
-extern __inline __mmask8
- __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_cmplt_epi64_mask (__m256i __X, __m256i __Y)
-{
- return (__mmask8) __builtin_ia32_cmpq256_mask ((__v4di) __X,
- (__v4di) __Y, 1,
- (__mmask8) -1);
-}
-
-extern __inline __mmask8
- __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_mask_cmpge_epi64_mask (__mmask8 __M, __m256i __X, __m256i __Y)
-{
- return (__mmask8) __builtin_ia32_cmpq256_mask ((__v4di) __X,
- (__v4di) __Y, 5,
- (__mmask8) __M);
-}
-
-extern __inline __mmask8
- __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_cmpge_epi64_mask (__m256i __X, __m256i __Y)
-{
- return (__mmask8) __builtin_ia32_cmpq256_mask ((__v4di) __X,
- (__v4di) __Y, 5,
- (__mmask8) -1);
-}
-
-extern __inline __mmask8
- __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_mask_cmple_epi64_mask (__mmask8 __M, __m256i __X, __m256i __Y)
-{
- return (__mmask8) __builtin_ia32_cmpq256_mask ((__v4di) __X,
- (__v4di) __Y, 2,
- (__mmask8) __M);
-}
-
-extern __inline __mmask8
- __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_cmple_epi64_mask (__m256i __X, __m256i __Y)
-{
- return (__mmask8) __builtin_ia32_cmpq256_mask ((__v4di) __X,
- (__v4di) __Y, 2,
- (__mmask8) -1);
-}
-
-extern __inline __mmask8
- __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm_mask_cmpneq_epu32_mask (__mmask8 __M, __m128i __X, __m128i __Y)
-{
- return (__mmask8) __builtin_ia32_ucmpd128_mask ((__v4si) __X,
- (__v4si) __Y, 4,
- (__mmask8) __M);
-}
-
-extern __inline __mmask8
- __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm_cmpneq_epu32_mask (__m128i __X, __m128i __Y)
-{
- return (__mmask8) __builtin_ia32_ucmpd128_mask ((__v4si) __X,
- (__v4si) __Y, 4,
- (__mmask8) -1);
-}
-
-extern __inline __mmask8
- __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm_mask_cmplt_epu32_mask (__mmask8 __M, __m128i __X, __m128i __Y)
-{
- return (__mmask8) __builtin_ia32_ucmpd128_mask ((__v4si) __X,
- (__v4si) __Y, 1,
- (__mmask8) __M);
-}
-
-extern __inline __mmask8
- __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm_cmplt_epu32_mask (__m128i __X, __m128i __Y)
-{
- return (__mmask8) __builtin_ia32_ucmpd128_mask ((__v4si) __X,
- (__v4si) __Y, 1,
- (__mmask8) -1);
-}
-
-extern __inline __mmask8
- __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm_mask_cmpge_epu32_mask (__mmask8 __M, __m128i __X, __m128i __Y)
-{
- return (__mmask8) __builtin_ia32_ucmpd128_mask ((__v4si) __X,
- (__v4si) __Y, 5,
- (__mmask8) __M);
-}
-
-extern __inline __mmask8
- __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm_cmpge_epu32_mask (__m128i __X, __m128i __Y)
-{
- return (__mmask8) __builtin_ia32_ucmpd128_mask ((__v4si) __X,
- (__v4si) __Y, 5,
- (__mmask8) -1);
-}
-
-extern __inline __mmask8
- __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm_mask_cmple_epu32_mask (__mmask8 __M, __m128i __X, __m128i __Y)
-{
- return (__mmask8) __builtin_ia32_ucmpd128_mask ((__v4si) __X,
- (__v4si) __Y, 2,
- (__mmask8) __M);
-}
-
-extern __inline __mmask8
- __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm_cmple_epu32_mask (__m128i __X, __m128i __Y)
-{
- return (__mmask8) __builtin_ia32_ucmpd128_mask ((__v4si) __X,
- (__v4si) __Y, 2,
- (__mmask8) -1);
-}
-
-extern __inline __mmask8
- __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm_mask_cmpneq_epu64_mask (__mmask8 __M, __m128i __X, __m128i __Y)
-{
- return (__mmask8) __builtin_ia32_ucmpq128_mask ((__v2di) __X,
- (__v2di) __Y, 4,
- (__mmask8) __M);
-}
-
-extern __inline __mmask8
- __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm_cmpneq_epu64_mask (__m128i __X, __m128i __Y)
-{
- return (__mmask8) __builtin_ia32_ucmpq128_mask ((__v2di) __X,
- (__v2di) __Y, 4,
- (__mmask8) -1);
-}
-
-extern __inline __mmask8
- __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm_mask_cmplt_epu64_mask (__mmask8 __M, __m128i __X, __m128i __Y)
-{
- return (__mmask8) __builtin_ia32_ucmpq128_mask ((__v2di) __X,
- (__v2di) __Y, 1,
- (__mmask8) __M);
-}
-
-extern __inline __mmask8
- __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm_cmplt_epu64_mask (__m128i __X, __m128i __Y)
-{
- return (__mmask8) __builtin_ia32_ucmpq128_mask ((__v2di) __X,
- (__v2di) __Y, 1,
- (__mmask8) -1);
-}
-
-extern __inline __mmask8
- __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm_mask_cmpge_epu64_mask (__mmask8 __M, __m128i __X, __m128i __Y)
-{
- return (__mmask8) __builtin_ia32_ucmpq128_mask ((__v2di) __X,
- (__v2di) __Y, 5,
- (__mmask8) __M);
-}
-
-extern __inline __mmask8
- __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm_cmpge_epu64_mask (__m128i __X, __m128i __Y)
-{
- return (__mmask8) __builtin_ia32_ucmpq128_mask ((__v2di) __X,
- (__v2di) __Y, 5,
- (__mmask8) -1);
-}
-
-extern __inline __mmask8
- __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm_mask_cmple_epu64_mask (__mmask8 __M, __m128i __X, __m128i __Y)
-{
- return (__mmask8) __builtin_ia32_ucmpq128_mask ((__v2di) __X,
- (__v2di) __Y, 2,
- (__mmask8) __M);
-}
-
-extern __inline __mmask8
- __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm_cmple_epu64_mask (__m128i __X, __m128i __Y)
-{
- return (__mmask8) __builtin_ia32_ucmpq128_mask ((__v2di) __X,
- (__v2di) __Y, 2,
- (__mmask8) -1);
-}
-
-extern __inline __mmask8
- __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm_mask_cmpneq_epi32_mask (__mmask8 __M, __m128i __X, __m128i __Y)
-{
- return (__mmask8) __builtin_ia32_cmpd128_mask ((__v4si) __X,
- (__v4si) __Y, 4,
- (__mmask8) __M);
-}
-
-extern __inline __mmask8
- __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm_cmpneq_epi32_mask (__m128i __X, __m128i __Y)
-{
- return (__mmask8) __builtin_ia32_cmpd128_mask ((__v4si) __X,
- (__v4si) __Y, 4,
- (__mmask8) -1);
-}
-
-extern __inline __mmask8
- __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm_mask_cmplt_epi32_mask (__mmask8 __M, __m128i __X, __m128i __Y)
-{
- return (__mmask8) __builtin_ia32_cmpd128_mask ((__v4si) __X,
- (__v4si) __Y, 1,
- (__mmask8) __M);
-}
-
-extern __inline __mmask8
- __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm_cmplt_epi32_mask (__m128i __X, __m128i __Y)
-{
- return (__mmask8) __builtin_ia32_cmpd128_mask ((__v4si) __X,
- (__v4si) __Y, 1,
- (__mmask8) -1);
-}
-
-extern __inline __mmask8
- __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm_mask_cmpge_epi32_mask (__mmask8 __M, __m128i __X, __m128i __Y)
-{
- return (__mmask8) __builtin_ia32_cmpd128_mask ((__v4si) __X,
- (__v4si) __Y, 5,
- (__mmask8) __M);
-}
-
-extern __inline __mmask8
- __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm_cmpge_epi32_mask (__m128i __X, __m128i __Y)
-{
- return (__mmask8) __builtin_ia32_cmpd128_mask ((__v4si) __X,
- (__v4si) __Y, 5,
- (__mmask8) -1);
-}
-
-extern __inline __mmask8
- __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm_mask_cmple_epi32_mask (__mmask8 __M, __m128i __X, __m128i __Y)
-{
- return (__mmask8) __builtin_ia32_cmpd128_mask ((__v4si) __X,
- (__v4si) __Y, 2,
- (__mmask8) __M);
-}
-
-extern __inline __mmask8
- __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm_cmple_epi32_mask (__m128i __X, __m128i __Y)
-{
- return (__mmask8) __builtin_ia32_cmpd128_mask ((__v4si) __X,
- (__v4si) __Y, 2,
- (__mmask8) -1);
-}
-
-extern __inline __mmask8
- __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm_mask_cmpneq_epi64_mask (__mmask8 __M, __m128i __X, __m128i __Y)
-{
- return (__mmask8) __builtin_ia32_cmpq128_mask ((__v2di) __X,
- (__v2di) __Y, 4,
- (__mmask8) __M);
-}
-
-extern __inline __mmask8
- __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm_cmpneq_epi64_mask (__m128i __X, __m128i __Y)
-{
- return (__mmask8) __builtin_ia32_cmpq128_mask ((__v2di) __X,
- (__v2di) __Y, 4,
- (__mmask8) -1);
-}
-
-extern __inline __mmask8
- __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm_mask_cmplt_epi64_mask (__mmask8 __M, __m128i __X, __m128i __Y)
-{
- return (__mmask8) __builtin_ia32_cmpq128_mask ((__v2di) __X,
- (__v2di) __Y, 1,
- (__mmask8) __M);
-}
-
-extern __inline __mmask8
- __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm_cmplt_epi64_mask (__m128i __X, __m128i __Y)
-{
- return (__mmask8) __builtin_ia32_cmpq128_mask ((__v2di) __X,
- (__v2di) __Y, 1,
- (__mmask8) -1);
-}
-
-extern __inline __mmask8
- __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm_mask_cmpge_epi64_mask (__mmask8 __M, __m128i __X, __m128i __Y)
-{
- return (__mmask8) __builtin_ia32_cmpq128_mask ((__v2di) __X,
- (__v2di) __Y, 5,
- (__mmask8) __M);
-}
-
-extern __inline __mmask8
- __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm_cmpge_epi64_mask (__m128i __X, __m128i __Y)
-{
- return (__mmask8) __builtin_ia32_cmpq128_mask ((__v2di) __X,
- (__v2di) __Y, 5,
- (__mmask8) -1);
-}
-
-extern __inline __mmask8
- __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm_mask_cmple_epi64_mask (__mmask8 __M, __m128i __X, __m128i __Y)
-{
- return (__mmask8) __builtin_ia32_cmpq128_mask ((__v2di) __X,
- (__v2di) __Y, 2,
- (__mmask8) __M);
-}
-
-extern __inline __mmask8
- __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm_cmple_epi64_mask (__m128i __X, __m128i __Y)
-{
- return (__mmask8) __builtin_ia32_cmpq128_mask ((__v2di) __X,
- (__v2di) __Y, 2,
- (__mmask8) -1);
-}
-
#else
#define _mm256_permutex_pd(X, M) \
((__m256d) __builtin_ia32_permdf256_mask ((__v4df)(__m256d)(X), (int)(M), \
diff --git a/gcc/config/i386/cpuid.h b/gcc/config/i386/cpuid.h
index c7778d989f5..1b6ab6d0a56 100644
--- a/gcc/config/i386/cpuid.h
+++ b/gcc/config/i386/cpuid.h
@@ -167,7 +167,7 @@
/* Return highest supported input value for cpuid instruction. ext can
- be either 0x0 or 0x8000000 to return highest supported value for
+ be either 0x0 or 0x80000000 to return highest supported value for
basic or extended cpuid information. Function returns 0 if cpuid
is not supported or whatever cpuid returns in eax register. If sig
pointer is non-null, then first four bytes of the signature
diff --git a/gcc/config/i386/gmm_malloc.h b/gcc/config/i386/gmm_malloc.h
index 52b853ceb2c..241e5e7b5b1 100644
--- a/gcc/config/i386/gmm_malloc.h
+++ b/gcc/config/i386/gmm_malloc.h
@@ -27,48 +27,48 @@
#include <stdlib.h>
#include <errno.h>
-static __inline__ void*
-_mm_malloc (size_t size, size_t align)
+static __inline__ void *
+_mm_malloc (size_t __size, size_t __align)
{
- void * malloc_ptr;
- void * aligned_ptr;
+ void * __malloc_ptr;
+ void * __aligned_ptr;
/* Error if align is not a power of two. */
- if (align & (align - 1))
+ if (__align & (__align - 1))
{
errno = EINVAL;
- return ((void*) 0);
+ return ((void *) 0);
}
- if (size == 0)
+ if (__size == 0)
return ((void *) 0);
/* Assume malloc'd pointer is aligned at least to sizeof (void*).
If necessary, add another sizeof (void*) to store the value
returned by malloc. Effectively this enforces a minimum alignment
of sizeof double. */
- if (align < 2 * sizeof (void *))
- align = 2 * sizeof (void *);
+ if (__align < 2 * sizeof (void *))
+ __align = 2 * sizeof (void *);
- malloc_ptr = malloc (size + align);
- if (!malloc_ptr)
+ __malloc_ptr = malloc (__size + __align);
+ if (!__malloc_ptr)
return ((void *) 0);
/* Align We have at least sizeof (void *) space below malloc'd ptr. */
- aligned_ptr = (void *) (((size_t) malloc_ptr + align)
- & ~((size_t) (align) - 1));
+ __aligned_ptr = (void *) (((size_t) __malloc_ptr + __align)
+ & ~((size_t) (__align) - 1));
/* Store the original pointer just before p. */
- ((void **) aligned_ptr) [-1] = malloc_ptr;
+ ((void **) __aligned_ptr)[-1] = __malloc_ptr;
- return aligned_ptr;
+ return __aligned_ptr;
}
static __inline__ void
-_mm_free (void * aligned_ptr)
+_mm_free (void *__aligned_ptr)
{
- if (aligned_ptr)
- free (((void **) aligned_ptr) [-1]);
+ if (__aligned_ptr)
+ free (((void **) __aligned_ptr)[-1]);
}
#endif /* _MM_MALLOC_H_INCLUDED */
diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c
index e852e099eab..60d3c93ea6b 100644
--- a/gcc/config/i386/i386.c
+++ b/gcc/config/i386/i386.c
@@ -4015,6 +4015,12 @@ ix86_option_override_internal (bool main_args_p,
opts->x_ix86_isa_flags
|= OPTION_MASK_ISA_LZCNT & ~opts->x_ix86_isa_flags_explicit;
+ /* Disable BMI, BMI2 and TBM instructions for -m16. */
+ if (TARGET_16BIT_P(opts->x_ix86_isa_flags))
+ opts->x_ix86_isa_flags
+ &= ~((OPTION_MASK_ISA_BMI | OPTION_MASK_ISA_BMI2 | OPTION_MASK_ISA_TBM)
+ & ~opts->x_ix86_isa_flags_explicit);
+
/* Validate -mpreferred-stack-boundary= value or default it to
PREFERRED_STACK_BOUNDARY_DEFAULT. */
ix86_preferred_stack_boundary = PREFERRED_STACK_BOUNDARY_DEFAULT;
@@ -4351,12 +4357,6 @@ ix86_option_override_internal (bool main_args_p,
gcc_assert ((opts->x_target_flags & MASK_LONG_DOUBLE_64) == 0
|| (opts->x_target_flags & MASK_LONG_DOUBLE_128) == 0);
- /* Save the initial options in case the user does function specific
- options. */
- if (main_args_p)
- target_option_default_node = target_option_current_node
- = build_target_option_node (opts);
-
/* Handle stack protector */
if (!opts_set->x_ix86_stack_protector_guard)
opts->x_ix86_stack_protector_guard
@@ -4376,6 +4376,12 @@ ix86_option_override_internal (bool main_args_p,
ix86_parse_stringop_strategy_string (str, true);
free (str);
}
+
+ /* Save the initial options in case the user does function specific
+ options. */
+ if (main_args_p)
+ target_option_default_node = target_option_current_node
+ = build_target_option_node (opts);
}
/* Implement the TARGET_OPTION_OVERRIDE hook. */
@@ -12698,6 +12704,8 @@ ix86_expand_split_stack_prologue (void)
GEN_INT (UNITS_PER_WORD), constm1_rtx,
NULL_RTX, false);
add_function_usage_to (call_insn, call_fusage);
+ /* Indicate that this function can't jump to non-local gotos. */
+ make_reg_eh_region_note_nothrow_nononlocal (as_a <rtx_insn *> (call_insn));
/* In order to make call/return prediction work right, we now need
to execute a return instruction. See
@@ -15570,8 +15578,8 @@ ix86_print_operand (FILE *file, rtx x, int code)
break;
default:
- output_operand_lossage
- ("invalid operand size for operand code 'O'");
+ output_operand_lossage ("invalid operand size for operand "
+ "code 'O'");
return;
}
@@ -15605,15 +15613,14 @@ ix86_print_operand (FILE *file, rtx x, int code)
return;
default:
- output_operand_lossage
- ("invalid operand size for operand code 'z'");
+ output_operand_lossage ("invalid operand size for operand "
+ "code 'z'");
return;
}
}
if (GET_MODE_CLASS (GET_MODE (x)) == MODE_FLOAT)
- warning
- (0, "non-integer operand used with operand code 'z'");
+ warning (0, "non-integer operand used with operand code 'z'");
/* FALLTHRU */
case 'Z':
@@ -15675,13 +15682,12 @@ ix86_print_operand (FILE *file, rtx x, int code)
}
else
{
- output_operand_lossage
- ("invalid operand type used with operand code 'Z'");
+ output_operand_lossage ("invalid operand type used with "
+ "operand code 'Z'");
return;
}
- output_operand_lossage
- ("invalid operand size for operand code 'Z'");
+ output_operand_lossage ("invalid operand size for operand code 'Z'");
return;
case 'd':
@@ -15873,7 +15879,12 @@ ix86_print_operand (FILE *file, rtx x, int code)
break;
case 'K':
- gcc_assert (CONST_INT_P (x));
+ if (!CONST_INT_P (x))
+ {
+ output_operand_lossage ("operand is not an integer, invalid "
+ "operand code 'K'");
+ return;
+ }
if (INTVAL (x) & IX86_HLE_ACQUIRE)
#ifdef HAVE_AS_IX86_HLE
@@ -15896,8 +15907,12 @@ ix86_print_operand (FILE *file, rtx x, int code)
return;
case 'r':
- gcc_assert (CONST_INT_P (x));
- gcc_assert (INTVAL (x) == ROUND_SAE);
+ if (!CONST_INT_P (x) || INTVAL (x) != ROUND_SAE)
+ {
+ output_operand_lossage ("operand is not a specific integer, "
+ "invalid operand code 'r'");
+ return;
+ }
if (ASSEMBLER_DIALECT == ASM_INTEL)
fputs (", ", file);
@@ -15910,7 +15925,12 @@ ix86_print_operand (FILE *file, rtx x, int code)
return;
case 'R':
- gcc_assert (CONST_INT_P (x));
+ if (!CONST_INT_P (x))
+ {
+ output_operand_lossage ("operand is not an integer, invalid "
+ "operand code 'R'");
+ return;
+ }
if (ASSEMBLER_DIALECT == ASM_INTEL)
fputs (", ", file);
@@ -15930,7 +15950,8 @@ ix86_print_operand (FILE *file, rtx x, int code)
fputs ("{rz-sae}", file);
break;
default:
- gcc_unreachable ();
+ output_operand_lossage ("operand is not a specific integer, "
+ "invalid operand code 'R'");
}
if (ASSEMBLER_DIALECT == ASM_ATT)
@@ -16025,7 +16046,7 @@ ix86_print_operand (FILE *file, rtx x, int code)
return;
default:
- output_operand_lossage ("invalid operand code '%c'", code);
+ output_operand_lossage ("invalid operand code '%c'", code);
}
}
@@ -18406,13 +18427,13 @@ ix86_split_idivmod (machine_mode mode, rtx operands[],
if (signed_p)
{
- div = gen_rtx_DIV (SImode, operands[2], operands[3]);
- mod = gen_rtx_MOD (SImode, operands[2], operands[3]);
+ div = gen_rtx_DIV (mode, operands[2], operands[3]);
+ mod = gen_rtx_MOD (mode, operands[2], operands[3]);
}
else
{
- div = gen_rtx_UDIV (SImode, operands[2], operands[3]);
- mod = gen_rtx_UMOD (SImode, operands[2], operands[3]);
+ div = gen_rtx_UDIV (mode, operands[2], operands[3]);
+ mod = gen_rtx_UMOD (mode, operands[2], operands[3]);
}
/* Extract remainder from AH. */
@@ -21490,6 +21511,7 @@ ix86_expand_sse_cmp (rtx dest, enum rtx_code code, rtx cmp_op0, rtx cmp_op1,
cmp_op1 = force_reg (cmp_ops_mode, cmp_op1);
if (optimize
+ || (maskcmp && cmp_mode != mode)
|| reg_overlap_mentioned_p (dest, op_true)
|| reg_overlap_mentioned_p (dest, op_false))
dest = gen_reg_rtx (maskcmp ? cmp_mode : mode);
@@ -30984,9 +31006,9 @@ static const struct builtin_description bdesc_pcmpistr[] =
/* Special builtins with variable number of arguments. */
static const struct builtin_description bdesc_special_args[] =
{
- { ~OPTION_MASK_ISA_64BIT, CODE_FOR_nothing, "__builtin_ia32_rdtsc", IX86_BUILTIN_RDTSC, UNKNOWN, (int) UINT64_FTYPE_VOID },
- { ~OPTION_MASK_ISA_64BIT, CODE_FOR_nothing, "__builtin_ia32_rdtscp", IX86_BUILTIN_RDTSCP, UNKNOWN, (int) UINT64_FTYPE_PUNSIGNED },
- { ~OPTION_MASK_ISA_64BIT, CODE_FOR_pause, "__builtin_ia32_pause", IX86_BUILTIN_PAUSE, UNKNOWN, (int) VOID_FTYPE_VOID },
+ { 0, CODE_FOR_nothing, "__builtin_ia32_rdtsc", IX86_BUILTIN_RDTSC, UNKNOWN, (int) UINT64_FTYPE_VOID },
+ { 0, CODE_FOR_nothing, "__builtin_ia32_rdtscp", IX86_BUILTIN_RDTSCP, UNKNOWN, (int) UINT64_FTYPE_PUNSIGNED },
+ { 0, CODE_FOR_pause, "__builtin_ia32_pause", IX86_BUILTIN_PAUSE, UNKNOWN, (int) VOID_FTYPE_VOID },
/* 80387 (for use internally for atomic compound assignment). */
{ 0, CODE_FOR_fnstenv, "__builtin_ia32_fnstenv", IX86_BUILTIN_FNSTENV, UNKNOWN, (int) VOID_FTYPE_PVOID },
@@ -31277,13 +31299,13 @@ static const struct builtin_description bdesc_special_args[] =
/* Builtins with variable number of arguments. */
static const struct builtin_description bdesc_args[] =
{
- { ~OPTION_MASK_ISA_64BIT, CODE_FOR_bsr, "__builtin_ia32_bsrsi", IX86_BUILTIN_BSRSI, UNKNOWN, (int) INT_FTYPE_INT },
+ { 0, CODE_FOR_bsr, "__builtin_ia32_bsrsi", IX86_BUILTIN_BSRSI, UNKNOWN, (int) INT_FTYPE_INT },
{ OPTION_MASK_ISA_64BIT, CODE_FOR_bsr_rex64, "__builtin_ia32_bsrdi", IX86_BUILTIN_BSRDI, UNKNOWN, (int) INT64_FTYPE_INT64 },
- { ~OPTION_MASK_ISA_64BIT, CODE_FOR_nothing, "__builtin_ia32_rdpmc", IX86_BUILTIN_RDPMC, UNKNOWN, (int) UINT64_FTYPE_INT },
- { ~OPTION_MASK_ISA_64BIT, CODE_FOR_rotlqi3, "__builtin_ia32_rolqi", IX86_BUILTIN_ROLQI, UNKNOWN, (int) UINT8_FTYPE_UINT8_INT },
- { ~OPTION_MASK_ISA_64BIT, CODE_FOR_rotlhi3, "__builtin_ia32_rolhi", IX86_BUILTIN_ROLHI, UNKNOWN, (int) UINT16_FTYPE_UINT16_INT },
- { ~OPTION_MASK_ISA_64BIT, CODE_FOR_rotrqi3, "__builtin_ia32_rorqi", IX86_BUILTIN_RORQI, UNKNOWN, (int) UINT8_FTYPE_UINT8_INT },
- { ~OPTION_MASK_ISA_64BIT, CODE_FOR_rotrhi3, "__builtin_ia32_rorhi", IX86_BUILTIN_RORHI, UNKNOWN, (int) UINT16_FTYPE_UINT16_INT },
+ { 0, CODE_FOR_nothing, "__builtin_ia32_rdpmc", IX86_BUILTIN_RDPMC, UNKNOWN, (int) UINT64_FTYPE_INT },
+ { 0, CODE_FOR_rotlqi3, "__builtin_ia32_rolqi", IX86_BUILTIN_ROLQI, UNKNOWN, (int) UINT8_FTYPE_UINT8_INT },
+ { 0, CODE_FOR_rotlhi3, "__builtin_ia32_rolhi", IX86_BUILTIN_ROLHI, UNKNOWN, (int) UINT16_FTYPE_UINT16_INT },
+ { 0, CODE_FOR_rotrqi3, "__builtin_ia32_rorqi", IX86_BUILTIN_RORQI, UNKNOWN, (int) UINT8_FTYPE_UINT8_INT },
+ { 0, CODE_FOR_rotrhi3, "__builtin_ia32_rorhi", IX86_BUILTIN_RORHI, UNKNOWN, (int) UINT16_FTYPE_UINT16_INT },
/* MMX */
{ OPTION_MASK_ISA_MMX, CODE_FOR_mmx_addv8qi3, "__builtin_ia32_paddb", IX86_BUILTIN_PADDB, UNKNOWN, (int) V8QI_FTYPE_V8QI_V8QI },
@@ -34356,11 +34378,11 @@ ix86_init_mmx_sse_builtins (void)
IX86_BUILTIN_SBB64);
/* Read/write FLAGS. */
- def_builtin (~OPTION_MASK_ISA_64BIT, "__builtin_ia32_readeflags_u32",
+ def_builtin (0, "__builtin_ia32_readeflags_u32",
UNSIGNED_FTYPE_VOID, IX86_BUILTIN_READ_FLAGS);
def_builtin (OPTION_MASK_ISA_64BIT, "__builtin_ia32_readeflags_u64",
UINT64_FTYPE_VOID, IX86_BUILTIN_READ_FLAGS);
- def_builtin (~OPTION_MASK_ISA_64BIT, "__builtin_ia32_writeeflags_u32",
+ def_builtin (0, "__builtin_ia32_writeeflags_u32",
VOID_FTYPE_UNSIGNED, IX86_BUILTIN_WRITE_FLAGS);
def_builtin (OPTION_MASK_ISA_64BIT, "__builtin_ia32_writeeflags_u64",
VOID_FTYPE_UINT64, IX86_BUILTIN_WRITE_FLAGS);
@@ -35000,6 +35022,9 @@ sorted_attr_string (tree arglist)
{
const char *str = TREE_STRING_POINTER (TREE_VALUE (arg));
size_t len = strlen (str);
+ /* Skip empty string. */
+ if (len == 0)
+ continue;
str_len_sum += len + 1;
if (arg != arglist)
argnum++;
@@ -35014,11 +35039,21 @@ sorted_attr_string (tree arglist)
{
const char *str = TREE_STRING_POINTER (TREE_VALUE (arg));
size_t len = strlen (str);
+ /* Skip empty string. */
+ if (len == 0)
+ continue;
memcpy (attr_str + str_len_sum, str, len);
attr_str[str_len_sum + len] = TREE_CHAIN (arg) ? ',' : '\0';
str_len_sum += len + 1;
}
+ /* Strip ',' character at the end. */
+ if (str_len_sum > 0 && attr_str[str_len_sum - 1] == ',')
+ {
+ attr_str[str_len_sum - 1] = '\0';
+ str_len_sum--;
+ }
+
/* Replace "=,-" with "_". */
for (i = 0; i < strlen (attr_str); i++)
if (attr_str[i] == '=' || attr_str[i]== '-')
@@ -36205,6 +36240,8 @@ ix86_expand_multi_arg_builtin (enum insn_code icode, tree exp, rtx target,
|| GET_MODE (target) != tmode
|| !insn_data[icode].operand[0].predicate (target, tmode))
target = gen_reg_rtx (tmode);
+ else if (memory_operand (target, tmode))
+ num_memory++;
gcc_assert (nargs <= 4);
@@ -37530,6 +37567,8 @@ ix86_expand_args_builtin (const struct builtin_description *d,
|| GET_MODE (target) != tmode
|| !insn_p->operand[0].predicate (target, tmode))
target = gen_reg_rtx (tmode);
+ else if (memory_operand (target, tmode))
+ num_memory++;
real_target = target;
}
else
@@ -37549,10 +37588,17 @@ ix86_expand_args_builtin (const struct builtin_description *d,
{
/* SIMD shift insns take either an 8-bit immediate or
register as count. But builtin functions take int as
- count. If count doesn't match, we put it in register. */
+ count. If count doesn't match, we put it in register.
+ The instructions are using 64-bit count, if op is just
+ 32-bit, zero-extend it, as negative shift counts
+ are undefined behavior and zero-extension is more
+ efficient. */
if (!match)
{
- op = simplify_gen_subreg (SImode, op, GET_MODE (op), 0);
+ if (SCALAR_INT_MODE_P (GET_MODE (op)))
+ op = convert_modes (mode, GET_MODE (op), op, 1);
+ else
+ op = simplify_gen_subreg (mode, op, GET_MODE (op), 0);
if (!insn_p->operand[i + 1].predicate (op, mode))
op = copy_to_reg (op);
}
@@ -38722,9 +38768,18 @@ ix86_expand_builtin (tree exp, rtx target, rtx subtarget,
Originally the builtin was not created if it wasn't applicable to the
current ISA based on the command line switches. With function specific
options, we need to check in the context of the function making the call
- whether it is supported. */
- if (ix86_builtins_isa[fcode].isa
- && !(ix86_builtins_isa[fcode].isa & ix86_isa_flags))
+ whether it is supported. Treat AVX512VL specially. For other flags,
+ if isa includes more than one ISA bit, treat those are requiring any
+ of them. For AVX512VL, require both AVX512VL and the non-AVX512VL
+ ISAs. Similarly for 64BIT, but we shouldn't be building such builtins
+ at all, -m64 is a whole TU option. */
+ if (((ix86_builtins_isa[fcode].isa
+ & ~(OPTION_MASK_ISA_AVX512VL | OPTION_MASK_ISA_64BIT))
+ && !(ix86_builtins_isa[fcode].isa
+ & ~(OPTION_MASK_ISA_AVX512VL | OPTION_MASK_ISA_64BIT)
+ & ix86_isa_flags))
+ || ((ix86_builtins_isa[fcode].isa & OPTION_MASK_ISA_AVX512VL)
+ && !(ix86_isa_flags & OPTION_MASK_ISA_AVX512VL)))
{
char *opts = ix86_target_string (ix86_builtins_isa[fcode].isa, 0, NULL,
NULL, (enum fpmath_unit) 0, false);
diff --git a/gcc/config/i386/i386.md b/gcc/config/i386/i386.md
index 90fa70e0dde..dc3e0715a1c 100644
--- a/gcc/config/i386/i386.md
+++ b/gcc/config/i386/i386.md
@@ -5159,7 +5159,7 @@
(define_expand "floatunsdisf2"
[(use (match_operand:SF 0 "register_operand"))
(use (match_operand:DI 1 "nonimmediate_operand"))]
- "TARGET_64BIT && TARGET_SSE_MATH"
+ "TARGET_64BIT && TARGET_SSE && TARGET_SSE_MATH"
"x86_emit_floatuns (operands); DONE;")
(define_expand "floatunsdidf2"
@@ -7107,21 +7107,15 @@
(match_operand:XF 2 "register_operand")))]
"TARGET_80387")
-(define_expand "divdf3"
- [(set (match_operand:DF 0 "register_operand")
- (div:DF (match_operand:DF 1 "register_operand")
- (match_operand:DF 2 "nonimmediate_operand")))]
- "(TARGET_80387 && X87_ENABLE_ARITH (DFmode))
- || (TARGET_SSE2 && TARGET_SSE_MATH)")
-
-(define_expand "divsf3"
- [(set (match_operand:SF 0 "register_operand")
- (div:SF (match_operand:SF 1 "register_operand")
- (match_operand:SF 2 "nonimmediate_operand")))]
- "(TARGET_80387 && X87_ENABLE_ARITH (SFmode))
- || TARGET_SSE_MATH"
+(define_expand "div<mode>3"
+ [(set (match_operand:MODEF 0 "register_operand")
+ (div:MODEF (match_operand:MODEF 1 "register_operand")
+ (match_operand:MODEF 2 "nonimmediate_operand")))]
+ "(TARGET_80387 && X87_ENABLE_ARITH (<MODE>mode))
+ || (SSE_FLOAT_MODE_P (<MODE>mode) && TARGET_SSE_MATH)"
{
- if (TARGET_SSE_MATH
+ if (<MODE>mode == SFmode
+ && TARGET_SSE && TARGET_SSE_MATH
&& TARGET_RECIP_DIV
&& optimize_insn_for_speed_p ()
&& flag_finite_math_only && !flag_trapping_math
@@ -10461,10 +10455,15 @@
split_double_mode (<DWI>mode, &operands[0], 1, &operands[4], &operands[5]);
})
+(define_mode_attr rorx_immediate_operand
+ [(SI "const_0_to_31_operand")
+ (DI "const_0_to_63_operand")])
+
(define_insn "*bmi2_rorx<mode>3_1"
[(set (match_operand:SWI48 0 "register_operand" "=r")
- (rotatert:SWI48 (match_operand:SWI48 1 "nonimmediate_operand" "rm")
- (match_operand:QI 2 "immediate_operand" "<S>")))]
+ (rotatert:SWI48
+ (match_operand:SWI48 1 "nonimmediate_operand" "rm")
+ (match_operand:QI 2 "<rorx_immediate_operand>" "<S>")))]
"TARGET_BMI2"
"rorx\t{%2, %1, %0|%0, %1, %2}"
[(set_attr "type" "rotatex")
@@ -10507,7 +10506,7 @@
(define_split
[(set (match_operand:SWI48 0 "register_operand")
(rotate:SWI48 (match_operand:SWI48 1 "nonimmediate_operand")
- (match_operand:QI 2 "immediate_operand")))
+ (match_operand:QI 2 "const_int_operand")))
(clobber (reg:CC FLAGS_REG))]
"TARGET_BMI2 && reload_completed"
[(set (match_dup 0)
@@ -10521,7 +10520,7 @@
(define_split
[(set (match_operand:SWI48 0 "register_operand")
(rotatert:SWI48 (match_operand:SWI48 1 "nonimmediate_operand")
- (match_operand:QI 2 "immediate_operand")))
+ (match_operand:QI 2 "const_int_operand")))
(clobber (reg:CC FLAGS_REG))]
"TARGET_BMI2 && reload_completed"
[(set (match_dup 0)
@@ -10531,7 +10530,7 @@
[(set (match_operand:DI 0 "register_operand" "=r")
(zero_extend:DI
(rotatert:SI (match_operand:SI 1 "nonimmediate_operand" "rm")
- (match_operand:QI 2 "immediate_operand" "I"))))]
+ (match_operand:QI 2 "const_0_to_31_operand" "I"))))]
"TARGET_64BIT && TARGET_BMI2"
"rorx\t{%2, %1, %k0|%k0, %1, %2}"
[(set_attr "type" "rotatex")
@@ -10575,7 +10574,7 @@
[(set (match_operand:DI 0 "register_operand")
(zero_extend:DI
(rotate:SI (match_operand:SI 1 "nonimmediate_operand")
- (match_operand:QI 2 "immediate_operand"))))
+ (match_operand:QI 2 "const_int_operand"))))
(clobber (reg:CC FLAGS_REG))]
"TARGET_64BIT && TARGET_BMI2 && reload_completed"
[(set (match_dup 0)
@@ -10590,7 +10589,7 @@
[(set (match_operand:DI 0 "register_operand")
(zero_extend:DI
(rotatert:SI (match_operand:SI 1 "nonimmediate_operand")
- (match_operand:QI 2 "immediate_operand"))))
+ (match_operand:QI 2 "const_int_operand"))))
(clobber (reg:CC FLAGS_REG))]
"TARGET_64BIT && TARGET_BMI2 && reload_completed"
[(set (match_dup 0)
@@ -11636,7 +11635,8 @@
(zero_extend (match_dup 1)))]
"(peep2_reg_dead_p (3, operands[1])
|| operands_match_p (operands[1], operands[3]))
- && ! reg_overlap_mentioned_p (operands[3], operands[0])"
+ && ! reg_overlap_mentioned_p (operands[3], operands[0])
+ && peep2_regno_dead_p (0, FLAGS_REG)"
[(set (match_dup 4) (match_dup 0))
(set (strict_low_part (match_dup 5))
(match_dup 2))]
@@ -11657,7 +11657,8 @@
"(peep2_reg_dead_p (3, operands[1])
|| operands_match_p (operands[1], operands[3]))
&& ! reg_overlap_mentioned_p (operands[3], operands[0])
- && ! reg_set_p (operands[3], operands[4])"
+ && ! reg_set_p (operands[3], operands[4])
+ && peep2_regno_dead_p (0, FLAGS_REG)"
[(parallel [(set (match_dup 5) (match_dup 0))
(match_dup 4)])
(set (strict_low_part (match_dup 6))
@@ -11679,7 +11680,8 @@
(and:SI (match_dup 3) (const_int 255)))
(clobber (reg:CC FLAGS_REG))])]
"REGNO (operands[1]) == REGNO (operands[3])
- && ! reg_overlap_mentioned_p (operands[3], operands[0])"
+ && ! reg_overlap_mentioned_p (operands[3], operands[0])
+ && peep2_regno_dead_p (0, FLAGS_REG)"
[(set (match_dup 4) (match_dup 0))
(set (strict_low_part (match_dup 5))
(match_dup 2))]
@@ -11701,7 +11703,8 @@
"(peep2_reg_dead_p (3, operands[1])
|| operands_match_p (operands[1], operands[3]))
&& ! reg_overlap_mentioned_p (operands[3], operands[0])
- && ! reg_set_p (operands[3], operands[4])"
+ && ! reg_set_p (operands[3], operands[4])
+ && peep2_regno_dead_p (0, FLAGS_REG)"
[(parallel [(set (match_dup 5) (match_dup 0))
(match_dup 4)])
(set (strict_low_part (match_dup 6))
@@ -13757,7 +13760,7 @@
[(set (match_operand:SF 0 "register_operand" "=x")
(unspec:SF [(match_operand:SF 1 "nonimmediate_operand" "xm")]
UNSPEC_RCP))]
- "TARGET_SSE_MATH"
+ "TARGET_SSE && TARGET_SSE_MATH"
"%vrcpss\t{%1, %d0|%d0, %1}"
[(set_attr "type" "sse")
(set_attr "atom_sse_attr" "rcp")
@@ -14066,7 +14069,7 @@
[(set (match_operand:SF 0 "register_operand" "=x")
(unspec:SF [(match_operand:SF 1 "nonimmediate_operand" "xm")]
UNSPEC_RSQRT))]
- "TARGET_SSE_MATH"
+ "TARGET_SSE && TARGET_SSE_MATH"
"%vrsqrtss\t{%1, %d0|%d0, %1}"
[(set_attr "type" "sse")
(set_attr "atom_sse_attr" "rcp")
@@ -14078,7 +14081,7 @@
[(set (match_operand:SF 0 "register_operand")
(unspec:SF [(match_operand:SF 1 "nonimmediate_operand")]
UNSPEC_RSQRT))]
- "TARGET_SSE_MATH"
+ "TARGET_SSE && TARGET_SSE_MATH"
{
ix86_emit_swsqrtsf (operands[0], operands[1], SFmode, 1);
DONE;
@@ -14107,7 +14110,7 @@
|| (SSE_FLOAT_MODE_P (<MODE>mode) && TARGET_SSE_MATH)"
{
if (<MODE>mode == SFmode
- && TARGET_SSE_MATH
+ && TARGET_SSE && TARGET_SSE_MATH
&& TARGET_RECIP_SQRT
&& !optimize_function_for_size_p (cfun)
&& flag_finite_math_only && !flag_trapping_math
diff --git a/gcc/config/i386/ia32intrin.h b/gcc/config/i386/ia32intrin.h
index 1f728c840e1..aaa54bac32f 100644
--- a/gcc/config/i386/ia32intrin.h
+++ b/gcc/config/i386/ia32intrin.h
@@ -249,9 +249,9 @@ __readeflags (void)
/* Write flags register */
extern __inline void
__attribute__((__gnu_inline__, __always_inline__, __artificial__))
-__writeeflags (unsigned long long X)
+__writeeflags (unsigned long long __X)
{
- __builtin_ia32_writeeflags_u64 (X);
+ __builtin_ia32_writeeflags_u64 (__X);
}
#define _bswap64(a) __bswapq(a)
@@ -269,9 +269,9 @@ __readeflags (void)
/* Write flags register */
extern __inline void
__attribute__((__gnu_inline__, __always_inline__, __artificial__))
-__writeeflags (unsigned int X)
+__writeeflags (unsigned int __X)
{
- __builtin_ia32_writeeflags_u32 (X);
+ __builtin_ia32_writeeflags_u32 (__X);
}
#endif
diff --git a/gcc/config/i386/lwpintrin.h b/gcc/config/i386/lwpintrin.h
index 714b565b4b4..99511041748 100644
--- a/gcc/config/i386/lwpintrin.h
+++ b/gcc/config/i386/lwpintrin.h
@@ -35,9 +35,9 @@
#endif /* __LWP__ */
extern __inline void __attribute__((__gnu_inline__, __always_inline__, __artificial__))
-__llwpcb (void *pcbAddress)
+__llwpcb (void *__pcbAddress)
{
- __builtin_ia32_llwpcb (pcbAddress);
+ __builtin_ia32_llwpcb (__pcbAddress);
}
extern __inline void * __attribute__((__gnu_inline__, __always_inline__, __artificial__))
@@ -48,16 +48,17 @@ __slwpcb (void)
#ifdef __OPTIMIZE__
extern __inline void __attribute__((__gnu_inline__, __always_inline__, __artificial__))
-__lwpval32 (unsigned int data2, unsigned int data1, unsigned int flags)
+__lwpval32 (unsigned int __data2, unsigned int __data1, unsigned int __flags)
{
- __builtin_ia32_lwpval32 (data2, data1, flags);
+ __builtin_ia32_lwpval32 (__data2, __data1, __flags);
}
#ifdef __x86_64__
extern __inline void __attribute__((__gnu_inline__, __always_inline__, __artificial__))
-__lwpval64 (unsigned long long data2, unsigned int data1, unsigned int flags)
+__lwpval64 (unsigned long long __data2, unsigned int __data1,
+ unsigned int __flags)
{
- __builtin_ia32_lwpval64 (data2, data1, flags);
+ __builtin_ia32_lwpval64 (__data2, __data1, __flags);
}
#endif
#else
@@ -74,16 +75,17 @@ __lwpval64 (unsigned long long data2, unsigned int data1, unsigned int flags)
#ifdef __OPTIMIZE__
extern __inline unsigned char __attribute__((__gnu_inline__, __always_inline__, __artificial__))
-__lwpins32 (unsigned int data2, unsigned int data1, unsigned int flags)
+__lwpins32 (unsigned int __data2, unsigned int __data1, unsigned int __flags)
{
- return __builtin_ia32_lwpins32 (data2, data1, flags);
+ return __builtin_ia32_lwpins32 (__data2, __data1, __flags);
}
#ifdef __x86_64__
extern __inline unsigned char __attribute__((__gnu_inline__, __always_inline__, __artificial__))
-__lwpins64 (unsigned long long data2, unsigned int data1, unsigned int flags)
+__lwpins64 (unsigned long long __data2, unsigned int __data1,
+ unsigned int __flags)
{
- return __builtin_ia32_lwpins64 (data2, data1, flags);
+ return __builtin_ia32_lwpins64 (__data2, __data1, __flags);
}
#endif
#else
diff --git a/gcc/config/i386/mmx.md b/gcc/config/i386/mmx.md
index 7b7eb2f1fa3..ca5067c3b0e 100644
--- a/gcc/config/i386/mmx.md
+++ b/gcc/config/i386/mmx.md
@@ -78,9 +78,9 @@
(define_insn "*mov<mode>_internal"
[(set (match_operand:MMXMODE 0 "nonimmediate_operand"
- "=r ,o ,r,r ,m ,?!y,!y,?!y,m ,r ,?!Ym,v,v,v,m,*x,*x,*x,m ,r ,Yi,!Ym,*Yi")
+ "=r ,o ,r,r ,m ,?!y,!y,?!y,m ,r ,?!Ym,v,v,v,m,r ,Yi,!Ym,*Yi")
(match_operand:MMXMODE 1 "vector_move_operand"
- "rCo,rC,C,rm,rC,C ,!y,m ,?!y,?!Yn,r ,C,v,m,v,C ,*x,m ,*x,Yj,r ,*Yj,!Yn"))]
+ "rCo,rC,C,rm,rC,C ,!y,m ,?!y,?!Yn,r ,C,v,m,v,Yj,r ,*Yj,!Yn"))]
"TARGET_MMX
&& !(MEM_P (operands[0]) && MEM_P (operands[1]))"
{
@@ -146,7 +146,7 @@
[(set (attr "isa")
(cond [(eq_attr "alternative" "0,1")
(const_string "nox64")
- (eq_attr "alternative" "2,3,4,9,10,11,12,13,14,19,20")
+ (eq_attr "alternative" "2,3,4,9,10,15,16")
(const_string "x64")
]
(const_string "*")))
@@ -159,14 +159,14 @@
(const_string "mmx")
(eq_attr "alternative" "6,7,8,9,10")
(const_string "mmxmov")
- (eq_attr "alternative" "11,15")
+ (eq_attr "alternative" "11")
(const_string "sselog1")
- (eq_attr "alternative" "21,22")
+ (eq_attr "alternative" "17,18")
(const_string "ssecvt")
]
(const_string "ssemov")))
(set (attr "prefix_rex")
- (if_then_else (eq_attr "alternative" "9,10,19,20")
+ (if_then_else (eq_attr "alternative" "9,10,15,16")
(const_string "1")
(const_string "*")))
(set (attr "prefix")
@@ -181,7 +181,7 @@
(set (attr "mode")
(cond [(eq_attr "alternative" "2")
(const_string "SI")
- (eq_attr "alternative" "11,12,15,16")
+ (eq_attr "alternative" "11,12")
(cond [(ior (match_operand 0 "ext_sse_reg_operand")
(match_operand 1 "ext_sse_reg_operand"))
(const_string "XI")
@@ -197,7 +197,7 @@
]
(const_string "TI"))
- (and (eq_attr "alternative" "13,14,17,18")
+ (and (eq_attr "alternative" "13,14")
(ior (match_test "<MODE>mode == V2SFmode")
(not (match_test "TARGET_SSE2"))))
(const_string "V2SF")
@@ -918,7 +918,7 @@
[(set (match_operand:MMXMODE24 0 "register_operand" "=y")
(ashiftrt:MMXMODE24
(match_operand:MMXMODE24 1 "register_operand" "0")
- (match_operand:SI 2 "nonmemory_operand" "yN")))]
+ (match_operand:DI 2 "nonmemory_operand" "yN")))]
"TARGET_MMX"
"psra<mmxvecsize>\t{%2, %0|%0, %2}"
[(set_attr "type" "mmxshft")
@@ -932,7 +932,7 @@
[(set (match_operand:MMXMODE248 0 "register_operand" "=y")
(any_lshift:MMXMODE248
(match_operand:MMXMODE248 1 "register_operand" "0")
- (match_operand:SI 2 "nonmemory_operand" "yN")))]
+ (match_operand:DI 2 "nonmemory_operand" "yN")))]
"TARGET_MMX"
"p<vshift><mmxvecsize>\t{%2, %0|%0, %2}"
[(set_attr "type" "mmxshft")
diff --git a/gcc/config/i386/pmm_malloc.h b/gcc/config/i386/pmm_malloc.h
index 901001b524a..ecdafb8f635 100644
--- a/gcc/config/i386/pmm_malloc.h
+++ b/gcc/config/i386/pmm_malloc.h
@@ -35,23 +35,23 @@ extern "C" int posix_memalign (void **, size_t, size_t) throw ();
#endif
static __inline void *
-_mm_malloc (size_t size, size_t alignment)
+_mm_malloc (size_t __size, size_t __alignment)
{
- void *ptr;
- if (alignment == 1)
- return malloc (size);
- if (alignment == 2 || (sizeof (void *) == 8 && alignment == 4))
- alignment = sizeof (void *);
- if (posix_memalign (&ptr, alignment, size) == 0)
- return ptr;
+ void *__ptr;
+ if (__alignment == 1)
+ return malloc (__size);
+ if (__alignment == 2 || (sizeof (void *) == 8 && __alignment == 4))
+ __alignment = sizeof (void *);
+ if (posix_memalign (&__ptr, __alignment, __size) == 0)
+ return __ptr;
else
return NULL;
}
static __inline void
-_mm_free (void * ptr)
+_mm_free (void *__ptr)
{
- free (ptr);
+ free (__ptr);
}
#endif /* _MM_MALLOC_H_INCLUDED */
diff --git a/gcc/config/i386/rdseedintrin.h b/gcc/config/i386/rdseedintrin.h
index b65fbc91cae..b624acb5dc1 100644
--- a/gcc/config/i386/rdseedintrin.h
+++ b/gcc/config/i386/rdseedintrin.h
@@ -37,24 +37,24 @@
extern __inline int
__attribute__((__gnu_inline__, __always_inline__, __artificial__))
-_rdseed16_step (unsigned short *p)
+_rdseed16_step (unsigned short *__p)
{
- return __builtin_ia32_rdseed_hi_step (p);
+ return __builtin_ia32_rdseed_hi_step (__p);
}
extern __inline int
__attribute__((__gnu_inline__, __always_inline__, __artificial__))
-_rdseed32_step (unsigned int *p)
+_rdseed32_step (unsigned int *__p)
{
- return __builtin_ia32_rdseed_si_step (p);
+ return __builtin_ia32_rdseed_si_step (__p);
}
#ifdef __x86_64__
extern __inline int
__attribute__((__gnu_inline__, __always_inline__, __artificial__))
-_rdseed64_step (unsigned long long *p)
+_rdseed64_step (unsigned long long *__p)
{
- return __builtin_ia32_rdseed_di_step (p);
+ return __builtin_ia32_rdseed_di_step (__p);
}
#endif
diff --git a/gcc/config/i386/rtmintrin.h b/gcc/config/i386/rtmintrin.h
index 6396c9dbc48..1a628f4be27 100644
--- a/gcc/config/i386/rtmintrin.h
+++ b/gcc/config/i386/rtmintrin.h
@@ -68,9 +68,9 @@ _xend (void)
#ifdef __OPTIMIZE__
extern __inline void
__attribute__((__gnu_inline__, __always_inline__, __artificial__))
-_xabort (const unsigned int imm)
+_xabort (const unsigned int __imm)
{
- __builtin_ia32_xabort (imm);
+ __builtin_ia32_xabort (__imm);
}
#else
#define _xabort(N) __builtin_ia32_xabort (N)
diff --git a/gcc/config/i386/sse.md b/gcc/config/i386/sse.md
index 58722e5123c..66c2a49289d 100644
--- a/gcc/config/i386/sse.md
+++ b/gcc/config/i386/sse.md
@@ -9936,7 +9936,7 @@
[(set (match_operand:VI24_AVX2 0 "register_operand" "=x,x")
(ashiftrt:VI24_AVX2
(match_operand:VI24_AVX2 1 "register_operand" "0,x")
- (match_operand:SI 2 "nonmemory_operand" "xN,xN")))]
+ (match_operand:DI 2 "nonmemory_operand" "xN,xN")))]
"TARGET_SSE2"
"@
psra<ssemodesuffix>\t{%2, %0|%0, %2}
@@ -9955,7 +9955,7 @@
[(set (match_operand:VI24_AVX512BW_1 0 "register_operand" "=v,v")
(ashiftrt:VI24_AVX512BW_1
(match_operand:VI24_AVX512BW_1 1 "nonimmediate_operand" "v,vm")
- (match_operand:SI 2 "nonmemory_operand" "v,N")))]
+ (match_operand:DI 2 "nonmemory_operand" "v,N")))]
"TARGET_AVX512VL"
"vpsra<ssemodesuffix>\t{%2, %1, %0<mask_operand3>|%0<mask_operand3>, %1, %2}"
[(set_attr "type" "sseishft")
@@ -9983,7 +9983,7 @@
[(set (match_operand:VI248_AVX512BW_AVX512VL 0 "register_operand" "=v,v")
(ashiftrt:VI248_AVX512BW_AVX512VL
(match_operand:VI248_AVX512BW_AVX512VL 1 "nonimmediate_operand" "v,vm")
- (match_operand:SI 2 "nonmemory_operand" "v,N")))]
+ (match_operand:DI 2 "nonmemory_operand" "v,N")))]
"TARGET_AVX512F"
"vpsra<ssemodesuffix>\t{%2, %1, %0<mask_operand3>|%0<mask_operand3>, %1, %2}"
[(set_attr "type" "sseishft")
@@ -9997,7 +9997,7 @@
[(set (match_operand:VI2_AVX2_AVX512BW 0 "register_operand" "=x,v")
(any_lshift:VI2_AVX2_AVX512BW
(match_operand:VI2_AVX2_AVX512BW 1 "register_operand" "0,v")
- (match_operand:SI 2 "nonmemory_operand" "xN,vN")))]
+ (match_operand:DI 2 "nonmemory_operand" "xN,vN")))]
"TARGET_SSE2 && <mask_mode512bit_condition> && <mask_avx512bw_condition>"
"@
p<vshift><ssemodesuffix>\t{%2, %0|%0, %2}
@@ -10016,7 +10016,7 @@
[(set (match_operand:VI48_AVX2 0 "register_operand" "=x,v")
(any_lshift:VI48_AVX2
(match_operand:VI48_AVX2 1 "register_operand" "0,v")
- (match_operand:SI 2 "nonmemory_operand" "xN,vN")))]
+ (match_operand:DI 2 "nonmemory_operand" "xN,vN")))]
"TARGET_SSE2 && <mask_mode512bit_condition>"
"@
p<vshift><ssemodesuffix>\t{%2, %0|%0, %2}
@@ -10035,7 +10035,7 @@
[(set (match_operand:VI48_512 0 "register_operand" "=v,v")
(any_lshift:VI48_512
(match_operand:VI48_512 1 "nonimmediate_operand" "v,m")
- (match_operand:SI 2 "nonmemory_operand" "vN,N")))]
+ (match_operand:DI 2 "nonmemory_operand" "vN,N")))]
"TARGET_AVX512F && <mask_mode512bit_condition>"
"vp<vshift><ssemodesuffix>\t{%2, %1, %0<mask_operand3>|%0<mask_operand3>, %1, %2}"
[(set_attr "isa" "avx512f")
@@ -10178,7 +10178,7 @@
"TARGET_AVX512F"
"ix86_fixup_binary_operands_no_copy (<CODE>, <MODE>mode, operands);")
-(define_insn "*avx512bw_<code><mode>3<mask_name>"
+(define_insn "*avx512f_<code><mode>3<mask_name>"
[(set (match_operand:VI48_AVX512VL 0 "register_operand" "=v")
(maxmin:VI48_AVX512VL
(match_operand:VI48_AVX512VL 1 "nonimmediate_operand" "%v")
@@ -10202,10 +10202,10 @@
(set_attr "mode" "<sseinsnmode>")])
(define_expand "<code><mode>3"
- [(set (match_operand:VI8_AVX2_AVX512BW 0 "register_operand")
- (maxmin:VI8_AVX2_AVX512BW
- (match_operand:VI8_AVX2_AVX512BW 1 "register_operand")
- (match_operand:VI8_AVX2_AVX512BW 2 "register_operand")))]
+ [(set (match_operand:VI8_AVX2_AVX512F 0 "register_operand")
+ (maxmin:VI8_AVX2_AVX512F
+ (match_operand:VI8_AVX2_AVX512F 1 "register_operand")
+ (match_operand:VI8_AVX2_AVX512F 2 "register_operand")))]
"TARGET_SSE4_2"
{
if (TARGET_AVX512F
@@ -13059,10 +13059,10 @@
;; movd instead of movq is required to handle broken assemblers.
(define_insn "vec_concatv2di"
[(set (match_operand:V2DI 0 "register_operand"
- "=Yr,*x,x ,Yi,x ,!x,x,x,x,x,x")
+ "=Yr,*x,x ,Yi,x ,x ,x,x,x,x,x")
(vec_concat:V2DI
(match_operand:DI 1 "nonimmediate_operand"
- " 0, 0,x ,r ,xm,*y,0,x,0,0,x")
+ " 0, 0,x ,r ,xm,?!*Yn,0,x,0,0,x")
(match_operand:DI 2 "vector_move_operand"
"*rm,rm,rm,C ,C ,C ,x,x,x,m,m")))]
"TARGET_SSE"
diff --git a/gcc/config/rs6000/altivec.md b/gcc/config/rs6000/altivec.md
index 9bd335957de..6cb2dffedef 100644
--- a/gcc/config/rs6000/altivec.md
+++ b/gcc/config/rs6000/altivec.md
@@ -1628,51 +1628,61 @@
"vsum4s<VI_char>s %0,%1,%2"
[(set_attr "type" "veccomplex")])
-;; FIXME: For the following two patterns, the scratch should only be
-;; allocated for !VECTOR_ELT_ORDER_BIG, and the instructions should
-;; be emitted separately.
-(define_insn "altivec_vsum2sws"
- [(set (match_operand:V4SI 0 "register_operand" "=v")
- (unspec:V4SI [(match_operand:V4SI 1 "register_operand" "v")
- (match_operand:V4SI 2 "register_operand" "v")]
- UNSPEC_VSUM2SWS))
- (set (reg:SI 110) (unspec:SI [(const_int 0)] UNSPEC_SET_VSCR))
- (clobber (match_scratch:V4SI 3 "=v"))]
+(define_expand "altivec_vsum2sws"
+ [(use (match_operand:V4SI 0 "register_operand"))
+ (use (match_operand:V4SI 1 "register_operand"))
+ (use (match_operand:V4SI 2 "register_operand"))]
"TARGET_ALTIVEC"
{
if (VECTOR_ELT_ORDER_BIG)
- return "vsum2sws %0,%1,%2";
+ emit_insn (gen_altivec_vsum2sws_direct (operands[0], operands[1],
+ operands[2]));
else
- return "vsldoi %3,%2,%2,12\n\tvsum2sws %3,%1,%3\n\tvsldoi %0,%3,%3,4";
-}
- [(set_attr "type" "veccomplex")
- (set (attr "length")
- (if_then_else
- (match_test "VECTOR_ELT_ORDER_BIG")
- (const_string "4")
- (const_string "12")))])
-
-(define_insn "altivec_vsumsws"
+ {
+ rtx tmp1 = gen_reg_rtx (V4SImode);
+ rtx tmp2 = gen_reg_rtx (V4SImode);
+ emit_insn (gen_altivec_vsldoi_v4si (tmp1, operands[2],
+ operands[2], GEN_INT (12)));
+ emit_insn (gen_altivec_vsum2sws_direct (tmp2, operands[1], tmp1));
+ emit_insn (gen_altivec_vsldoi_v4si (operands[0], tmp2, tmp2,
+ GEN_INT (4)));
+ }
+ DONE;
+})
+
+; FIXME: This can probably be expressed without an UNSPEC.
+(define_insn "altivec_vsum2sws_direct"
[(set (match_operand:V4SI 0 "register_operand" "=v")
(unspec:V4SI [(match_operand:V4SI 1 "register_operand" "v")
- (match_operand:V4SI 2 "register_operand" "v")]
- UNSPEC_VSUMSWS))
- (set (reg:SI 110) (unspec:SI [(const_int 0)] UNSPEC_SET_VSCR))
- (clobber (match_scratch:V4SI 3 "=v"))]
+ (match_operand:V4SI 2 "register_operand" "v")]
+ UNSPEC_VSUM2SWS))
+ (set (reg:SI VSCR_REGNO) (unspec:SI [(const_int 0)] UNSPEC_SET_VSCR))]
+ "TARGET_ALTIVEC"
+ "vsum2sws %0,%1,%2"
+ [(set_attr "type" "veccomplex")])
+
+(define_expand "altivec_vsumsws"
+ [(use (match_operand:V4SI 0 "register_operand"))
+ (use (match_operand:V4SI 1 "register_operand"))
+ (use (match_operand:V4SI 2 "register_operand"))]
"TARGET_ALTIVEC"
{
if (VECTOR_ELT_ORDER_BIG)
- return "vsumsws %0,%1,%2";
+ emit_insn (gen_altivec_vsumsws_direct (operands[0], operands[1],
+ operands[2]));
else
- return "vspltw %3,%2,0\n\tvsumsws %3,%1,%3\n\tvsldoi %0,%3,%3,12";
-}
- [(set_attr "type" "veccomplex")
- (set (attr "length")
- (if_then_else
- (match_test "(VECTOR_ELT_ORDER_BIG)")
- (const_string "4")
- (const_string "12")))])
+ {
+ rtx tmp1 = gen_reg_rtx (V4SImode);
+ rtx tmp2 = gen_reg_rtx (V4SImode);
+ emit_insn (gen_altivec_vspltw_direct (tmp1, operands[2], const0_rtx));
+ emit_insn (gen_altivec_vsumsws_direct (tmp2, operands[1], tmp1));
+ emit_insn (gen_altivec_vsldoi_v4si (operands[0], tmp2, tmp2,
+ GEN_INT (12)));
+ }
+ DONE;
+})
+; FIXME: This can probably be expressed without an UNSPEC.
(define_insn "altivec_vsumsws_direct"
[(set (match_operand:V4SI 0 "register_operand" "=v")
(unspec:V4SI [(match_operand:V4SI 1 "register_operand" "v")
diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c
index a3fec739104..f4b9bfb824c 100644
--- a/gcc/config/rs6000/rs6000.c
+++ b/gcc/config/rs6000/rs6000.c
@@ -11525,6 +11525,7 @@ rs6000_gimplify_va_arg (tree valist, tree type, gimple_seq *pre_p,
size = int_size_in_bytes (type);
rsize = (size + 3) / 4;
+ int pad = 4 * rsize - size;
align = 1;
if (TARGET_HARD_FLOAT && TARGET_FPRS
@@ -11612,6 +11613,10 @@ rs6000_gimplify_va_arg (tree valist, tree type, gimple_seq *pre_p,
&& TYPE_MODE (type) == SDmode)
t = fold_build_pointer_plus_hwi (t, size);
+ /* Args are right-aligned. */
+ if (BYTES_BIG_ENDIAN)
+ t = fold_build_pointer_plus_hwi (t, pad);
+
gimplify_assign (addr, t, pre_p);
gimple_seq_add_stmt (pre_p, gimple_build_goto (lab_over));
@@ -11637,6 +11642,11 @@ rs6000_gimplify_va_arg (tree valist, tree type, gimple_seq *pre_p,
t = build2 (BIT_AND_EXPR, TREE_TYPE (t), t,
build_int_cst (TREE_TYPE (t), -align));
}
+
+ /* Args are right-aligned. */
+ if (BYTES_BIG_ENDIAN)
+ t = fold_build_pointer_plus_hwi (t, pad);
+
gimplify_expr (&t, pre_p, NULL, is_gimple_val, fb_rvalue);
gimplify_assign (unshare_expr (addr), t, pre_p);
@@ -22304,24 +22314,23 @@ debug_stack_info (rs6000_stack_t *info)
rtx
rs6000_return_addr (int count, rtx frame)
{
- /* Currently we don't optimize very well between prolog and body
- code and for PIC code the code can be actually quite bad, so
- don't try to be too clever here. */
+ /* We can't use get_hard_reg_initial_val for LR when count == 0 if LR
+ is trashed by the prologue, as it is for PIC on ABI_V4 and Darwin. */
if (count != 0
|| ((DEFAULT_ABI == ABI_V4 || DEFAULT_ABI == ABI_DARWIN) && flag_pic))
{
cfun->machine->ra_needs_full_frame = 1;
- return
- gen_rtx_MEM
- (Pmode,
- memory_address
- (Pmode,
- plus_constant (Pmode,
- copy_to_reg
- (gen_rtx_MEM (Pmode,
- memory_address (Pmode, frame))),
- RETURN_ADDRESS_OFFSET)));
+ if (count == 0)
+ /* FRAME is set to frame_pointer_rtx by the generic code, but that
+ is good for loading 0(r1) only when !FRAME_GROWS_DOWNWARD. */
+ frame = stack_pointer_rtx;
+ rtx prev_frame_addr = memory_address (Pmode, frame);
+ rtx prev_frame = copy_to_reg (gen_rtx_MEM (Pmode, prev_frame_addr));
+ rtx lr_save_off = plus_constant (Pmode,
+ prev_frame, RETURN_ADDRESS_OFFSET);
+ rtx lr_save_addr = memory_address (Pmode, lr_save_off);
+ return gen_rtx_MEM (Pmode, lr_save_addr);
}
cfun->machine->ra_need_lr = 1;
@@ -29195,8 +29204,8 @@ rs6000_elf_output_toc_section_asm_op (const void *data ATTRIBUTE_UNUSED)
{
if (!toc_initialized)
{
- toc_initialized = 1;
fprintf (asm_out_file, "%s\n", TOC_SECTION_ASM_OP);
+ ASM_OUTPUT_ALIGN (asm_out_file, TARGET_64BIT ? 3 : 2);
(*targetm.asm_out.internal_label) (asm_out_file, "LCTOC", 0);
fprintf (asm_out_file, "\t.tc ");
ASM_OUTPUT_INTERNAL_LABEL_PREFIX (asm_out_file, "LCTOC1[TC],");
@@ -29204,20 +29213,30 @@ rs6000_elf_output_toc_section_asm_op (const void *data ATTRIBUTE_UNUSED)
fprintf (asm_out_file, "\n");
fprintf (asm_out_file, "%s\n", MINIMAL_TOC_SECTION_ASM_OP);
+ ASM_OUTPUT_ALIGN (asm_out_file, TARGET_64BIT ? 3 : 2);
ASM_OUTPUT_INTERNAL_LABEL_PREFIX (asm_out_file, "LCTOC1");
fprintf (asm_out_file, " = .+32768\n");
+ toc_initialized = 1;
}
else
fprintf (asm_out_file, "%s\n", MINIMAL_TOC_SECTION_ASM_OP);
}
else if ((DEFAULT_ABI == ABI_AIX || DEFAULT_ABI == ABI_ELFv2)
&& !TARGET_RELOCATABLE)
- fprintf (asm_out_file, "%s\n", TOC_SECTION_ASM_OP);
+ {
+ fprintf (asm_out_file, "%s\n", TOC_SECTION_ASM_OP);
+ if (!toc_initialized)
+ {
+ ASM_OUTPUT_ALIGN (asm_out_file, TARGET_64BIT ? 3 : 2);
+ toc_initialized = 1;
+ }
+ }
else
{
fprintf (asm_out_file, "%s\n", MINIMAL_TOC_SECTION_ASM_OP);
if (!toc_initialized)
{
+ ASM_OUTPUT_ALIGN (asm_out_file, TARGET_64BIT ? 3 : 2);
ASM_OUTPUT_INTERNAL_LABEL_PREFIX (asm_out_file, "LCTOC1");
fprintf (asm_out_file, " = .+32768\n");
toc_initialized = 1;
@@ -32859,23 +32878,30 @@ rs6000_pragma_target_parse (tree args, tree pop_target)
/* Remember the last target of rs6000_set_current_function. */
static GTY(()) tree rs6000_previous_fndecl;
+/* Restore target's globals from NEW_TREE and invalidate the
+ rs6000_previous_fndecl cache. */
+
+static void
+rs6000_activate_target_options (tree new_tree)
+{
+ cl_target_option_restore (&global_options, TREE_TARGET_OPTION (new_tree));
+ if (TREE_TARGET_GLOBALS (new_tree))
+ restore_target_globals (TREE_TARGET_GLOBALS (new_tree));
+ else if (new_tree == target_option_default_node)
+ restore_target_globals (&default_target_globals);
+ else
+ TREE_TARGET_GLOBALS (new_tree) = save_target_globals_default_opts ();
+ rs6000_previous_fndecl = NULL_TREE;
+}
+
/* Establish appropriate back-end context for processing the function
FNDECL. The argument might be NULL to indicate processing at top
level, outside of any function scope. */
static void
rs6000_set_current_function (tree fndecl)
{
- tree old_tree = (rs6000_previous_fndecl
- ? DECL_FUNCTION_SPECIFIC_TARGET (rs6000_previous_fndecl)
- : NULL_TREE);
-
- tree new_tree = (fndecl
- ? DECL_FUNCTION_SPECIFIC_TARGET (fndecl)
- : NULL_TREE);
-
if (TARGET_DEBUG_TARGET)
{
- bool print_final = false;
fprintf (stderr, "\n==================== rs6000_set_current_function");
if (fndecl)
@@ -32888,58 +32914,60 @@ rs6000_set_current_function (tree fndecl)
fprintf (stderr, ", prev_fndecl (%p)", (void *)rs6000_previous_fndecl);
fprintf (stderr, "\n");
+ }
+
+ /* Only change the context if the function changes. This hook is called
+ several times in the course of compiling a function, and we don't want to
+ slow things down too much or call target_reinit when it isn't safe. */
+ if (fndecl == rs6000_previous_fndecl)
+ return;
+
+ tree old_tree;
+ if (rs6000_previous_fndecl == NULL_TREE)
+ old_tree = target_option_current_node;
+ else if (DECL_FUNCTION_SPECIFIC_TARGET (rs6000_previous_fndecl))
+ old_tree = DECL_FUNCTION_SPECIFIC_TARGET (rs6000_previous_fndecl);
+ else
+ old_tree = target_option_default_node;
+
+ tree new_tree;
+ if (fndecl == NULL_TREE)
+ {
+ if (old_tree != target_option_current_node)
+ new_tree = target_option_current_node;
+ else
+ new_tree = NULL_TREE;
+ }
+ else
+ {
+ new_tree = DECL_FUNCTION_SPECIFIC_TARGET (fndecl);
+ if (new_tree == NULL_TREE)
+ new_tree = target_option_default_node;
+ }
+
+ if (TARGET_DEBUG_TARGET)
+ {
if (new_tree)
{
fprintf (stderr, "\nnew fndecl target specific options:\n");
debug_tree (new_tree);
- print_final = true;
}
if (old_tree)
{
fprintf (stderr, "\nold fndecl target specific options:\n");
debug_tree (old_tree);
- print_final = true;
}
- if (print_final)
+ if (old_tree != NULL_TREE || new_tree != NULL_TREE)
fprintf (stderr, "--------------------\n");
}
- /* Only change the context if the function changes. This hook is called
- several times in the course of compiling a function, and we don't want to
- slow things down too much or call target_reinit when it isn't safe. */
- if (fndecl && fndecl != rs6000_previous_fndecl)
- {
- rs6000_previous_fndecl = fndecl;
- if (old_tree == new_tree)
- ;
+ if (new_tree && old_tree != new_tree)
+ rs6000_activate_target_options (new_tree);
- else if (new_tree && new_tree != target_option_default_node)
- {
- cl_target_option_restore (&global_options,
- TREE_TARGET_OPTION (new_tree));
- if (TREE_TARGET_GLOBALS (new_tree))
- restore_target_globals (TREE_TARGET_GLOBALS (new_tree));
- else
- TREE_TARGET_GLOBALS (new_tree)
- = save_target_globals_default_opts ();
- }
-
- else if (old_tree && old_tree != target_option_default_node)
- {
- new_tree = target_option_current_node;
- cl_target_option_restore (&global_options,
- TREE_TARGET_OPTION (new_tree));
- if (TREE_TARGET_GLOBALS (new_tree))
- restore_target_globals (TREE_TARGET_GLOBALS (new_tree));
- else if (new_tree == target_option_default_node)
- restore_target_globals (&default_target_globals);
- else
- TREE_TARGET_GLOBALS (new_tree)
- = save_target_globals_default_opts ();
- }
- }
+ if (fndecl)
+ rs6000_previous_fndecl = fndecl;
}
diff --git a/gcc/config/rs6000/rs6000.md b/gcc/config/rs6000/rs6000.md
index 7a8f6b5775f..6ab47268be5 100644
--- a/gcc/config/rs6000/rs6000.md
+++ b/gcc/config/rs6000/rs6000.md
@@ -6098,17 +6098,10 @@
[(set_attr "length" "12")
(set_attr "type" "fp")])
-(define_expand "fixuns_trunc<mode>di2"
- [(set (match_operand:DI 0 "register_operand" "")
- (unsigned_fix:DI (match_operand:SFDF 1 "register_operand" "")))]
- "TARGET_HARD_FLOAT && (TARGET_FCTIDUZ || VECTOR_UNIT_VSX_P (<MODE>mode))"
- "")
-
-(define_insn "*fixuns_trunc<mode>di2_fctiduz"
+(define_insn "fixuns_trunc<mode>di2"
[(set (match_operand:DI 0 "gpc_reg_operand" "=d,wi")
(unsigned_fix:DI (match_operand:SFDF 1 "gpc_reg_operand" "<Ff>,<Fa>")))]
- "TARGET_HARD_FLOAT && TARGET_DOUBLE_FLOAT && TARGET_FPRS
- && TARGET_FCTIDUZ"
+ "TARGET_HARD_FLOAT && TARGET_DOUBLE_FLOAT && TARGET_FPRS && TARGET_FCTIDUZ"
"@
fctiduz %0,%1
xscvdpuxds %x0,%x1"
diff --git a/gcc/config/rs6000/vector.md b/gcc/config/rs6000/vector.md
index dd950fa1375..be1a23e456a 100644
--- a/gcc/config/rs6000/vector.md
+++ b/gcc/config/rs6000/vector.md
@@ -480,13 +480,12 @@
(gt:VEC_F (match_dup 2)
(match_dup 1)))
(set (match_dup 0)
- (not:VEC_F (ior:VEC_F (match_dup 3)
- (match_dup 4))))]
- "
+ (and:VEC_F (not:VEC_F (match_dup 3))
+ (not:VEC_F (match_dup 4))))]
{
operands[3] = gen_reg_rtx (<MODE>mode);
operands[4] = gen_reg_rtx (<MODE>mode);
-}")
+})
(define_insn_and_split "*vector_ltgt<mode>"
[(set (match_operand:VEC_F 0 "vfloat_operand" "")
diff --git a/gcc/config/sh/sh.c b/gcc/config/sh/sh.c
index 3bb81fc1cd8..9db77530c1f 100644
--- a/gcc/config/sh/sh.c
+++ b/gcc/config/sh/sh.c
@@ -20,9 +20,9 @@ along with GCC; see the file COPYING3. If not see
<http://www.gnu.org/licenses/>. */
#include <sstream>
-#include <vector>
#include "config.h"
+#define INCLUDE_VECTOR
#include "system.h"
#include "coretypes.h"
#include "tm.h"
diff --git a/gcc/config/sh/sh_treg_combine.cc b/gcc/config/sh/sh_treg_combine.cc
index e4f3581099c..ea20c3f407e 100644
--- a/gcc/config/sh/sh_treg_combine.cc
+++ b/gcc/config/sh/sh_treg_combine.cc
@@ -19,6 +19,9 @@ along with GCC; see the file COPYING3. If not see
<http://www.gnu.org/licenses/>. */
#include "config.h"
+#define INCLUDE_ALGORITHM
+#define INCLUDE_LIST
+#define INCLUDE_VECTOR
#include "system.h"
#include "coretypes.h"
#include "machmode.h"
@@ -65,10 +68,6 @@ along with GCC; see the file COPYING3. If not see
#include "stmt.h"
#include "expr.h"
-#include <algorithm>
-#include <list>
-#include <vector>
-
/*
This pass tries to optimize for example this:
mov.l @(4,r4),r1
diff --git a/gcc/config/sparc/sparc.c b/gcc/config/sparc/sparc.c
index 18bacf27df7..45364d28136 100644
--- a/gcc/config/sparc/sparc.c
+++ b/gcc/config/sparc/sparc.c
@@ -5756,6 +5756,9 @@ sparc_expand_epilogue (bool for_eh)
{
HOST_WIDE_INT size = sparc_frame_size;
+ if (cfun->calls_alloca)
+ emit_insn (gen_frame_blockage ());
+
if (sparc_n_global_fp_regs > 0)
emit_save_or_restore_global_fp_regs (sparc_frame_base_reg,
sparc_frame_base_offset
diff --git a/gcc/config/sparc/sparc.md b/gcc/config/sparc/sparc.md
index 81e99847220..2beed35d892 100644
--- a/gcc/config/sparc/sparc.md
+++ b/gcc/config/sparc/sparc.md
@@ -328,7 +328,8 @@
(const_int 2)
(const_int 1))
(eq_attr "type" "sibcall")
- (if_then_else (eq_attr "leaf_function" "true")
+ (if_then_else (ior (eq_attr "leaf_function" "true")
+ (eq_attr "flat" "true"))
(if_then_else (eq_attr "empty_delay_slot" "true")
(const_int 3)
(const_int 2))
@@ -6367,7 +6368,10 @@
(define_expand "return"
[(return)]
"sparc_can_use_return_insn_p ()"
- "")
+{
+ if (cfun->calls_alloca)
+ emit_insn (gen_frame_blockage ());
+})
(define_insn "*return_internal"
[(return)]
diff --git a/gcc/config/xtensa/xtensa.c b/gcc/config/xtensa/xtensa.c
index eb039bac56a..adbe13b963e 100644
--- a/gcc/config/xtensa/xtensa.c
+++ b/gcc/config/xtensa/xtensa.c
@@ -634,6 +634,7 @@ xtensa_mem_offset (unsigned v, machine_mode mode)
case HImode:
return xtensa_uimm8x2 (v);
+ case DImode:
case DFmode:
return (xtensa_uimm8x4 (v) && xtensa_uimm8x4 (v + 4));
@@ -1808,7 +1809,8 @@ xtensa_emit_call (int callop, rtx *operands)
rtx tgt = operands[callop];
if (GET_CODE (tgt) == CONST_INT)
- sprintf (result, "call%d\t0x%lx", WINDOW_SIZE, INTVAL (tgt));
+ sprintf (result, "call%d\t" HOST_WIDE_INT_PRINT_HEX,
+ WINDOW_SIZE, INTVAL (tgt));
else if (register_operand (tgt, VOIDmode))
sprintf (result, "callx%d\t%%%d", WINDOW_SIZE, callop);
else
@@ -1891,23 +1893,23 @@ xtensa_tls_module_base (void)
static rtx_insn *
xtensa_call_tls_desc (rtx sym, rtx *retp)
{
- rtx fn, arg, a10;
+ rtx fn, arg, a_io;
rtx_insn *call_insn, *insns;
start_sequence ();
fn = gen_reg_rtx (Pmode);
arg = gen_reg_rtx (Pmode);
- a10 = gen_rtx_REG (Pmode, 10);
+ a_io = gen_rtx_REG (Pmode, WINDOW_SIZE + 2);
emit_insn (gen_tls_func (fn, sym));
emit_insn (gen_tls_arg (arg, sym));
- emit_move_insn (a10, arg);
- call_insn = emit_call_insn (gen_tls_call (a10, fn, sym, const1_rtx));
- use_reg (&CALL_INSN_FUNCTION_USAGE (call_insn), a10);
+ emit_move_insn (a_io, arg);
+ call_insn = emit_call_insn (gen_tls_call (a_io, fn, sym, const1_rtx));
+ use_reg (&CALL_INSN_FUNCTION_USAGE (call_insn), a_io);
insns = get_insns ();
end_sequence ();
- *retp = a10;
+ *retp = a_io;
return insns;
}
@@ -2379,14 +2381,14 @@ print_operand (FILE *file, rtx x, int letter)
case 'L':
if (GET_CODE (x) == CONST_INT)
- fprintf (file, "%ld", (32 - INTVAL (x)) & 0x1f);
+ fprintf (file, HOST_WIDE_INT_PRINT_DEC, (32 - INTVAL (x)) & 0x1f);
else
output_operand_lossage ("invalid %%L value");
break;
case 'R':
if (GET_CODE (x) == CONST_INT)
- fprintf (file, "%ld", INTVAL (x) & 0x1f);
+ fprintf (file, HOST_WIDE_INT_PRINT_DEC, INTVAL (x) & 0x1f);
else
output_operand_lossage ("invalid %%R value");
break;
@@ -2400,7 +2402,7 @@ print_operand (FILE *file, rtx x, int letter)
case 'd':
if (GET_CODE (x) == CONST_INT)
- fprintf (file, "%ld", INTVAL (x));
+ fprintf (file, HOST_WIDE_INT_PRINT_DEC, INTVAL (x));
else
output_operand_lossage ("invalid %%d value");
break;
@@ -2455,7 +2457,7 @@ print_operand (FILE *file, rtx x, int letter)
else if (GET_CODE (x) == MEM)
output_address (XEXP (x, 0));
else if (GET_CODE (x) == CONST_INT)
- fprintf (file, "%ld", INTVAL (x));
+ fprintf (file, HOST_WIDE_INT_PRINT_DEC, INTVAL (x));
else
output_addr_const (file, x);
}
@@ -4165,7 +4167,10 @@ hwloop_optimize (hwloop_info loop)
entry_after = BB_END (entry_bb);
while (DEBUG_INSN_P (entry_after)
|| (NOTE_P (entry_after)
- && NOTE_KIND (entry_after) != NOTE_INSN_BASIC_BLOCK))
+ && NOTE_KIND (entry_after) != NOTE_INSN_BASIC_BLOCK
+ /* Make sure we don't split a call and its corresponding
+ CALL_ARG_LOCATION note. */
+ && NOTE_KIND (entry_after) != NOTE_INSN_CALL_ARG_LOCATION))
entry_after = PREV_INSN (entry_after);
emit_insn_after (seq, entry_after);
diff --git a/gcc/config/xtensa/xtensa.h b/gcc/config/xtensa/xtensa.h
index 011411c09bf..4970acdaa7a 100644
--- a/gcc/config/xtensa/xtensa.h
+++ b/gcc/config/xtensa/xtensa.h
@@ -812,7 +812,9 @@ typedef struct xtensa_args
for debugging. */
#define INCOMING_RETURN_ADDR_RTX gen_rtx_REG (Pmode, 0)
#define DWARF_FRAME_RETURN_COLUMN DWARF_FRAME_REGNUM (0)
-#define DWARF_FRAME_REGISTERS 16
+#define DWARF_ALT_FRAME_RETURN_COLUMN 16
+#define DWARF_FRAME_REGISTERS (DWARF_ALT_FRAME_RETURN_COLUMN \
+ + (TARGET_WINDOWED_ABI ? 0 : 1))
#define EH_RETURN_DATA_REGNO(N) ((N) < 2 ? (N) + 2 : INVALID_REGNUM)
#define ASM_PREFERRED_EH_DATA_FORMAT(CODE, GLOBAL) \
(flag_pic \
diff --git a/gcc/config/xtensa/xtensa.md b/gcc/config/xtensa/xtensa.md
index 6d84384c950..e3c517d0e8f 100644
--- a/gcc/config/xtensa/xtensa.md
+++ b/gcc/config/xtensa/xtensa.md
@@ -1867,7 +1867,12 @@
UNSPEC_TLS_CALL))
(match_operand 3 "" "i")))]
"TARGET_THREADPTR && HAVE_AS_TLS"
- "callx8.tls %1, %2@TLSCALL"
+{
+ if (TARGET_WINDOWED_ABI)
+ return "callx8.tls %1, %2@TLSCALL";
+ else
+ return "callx0.tls %1, %2@TLSCALL";
+}
[(set_attr "type" "call")
(set_attr "mode" "none")
(set_attr "length" "3")])
diff --git a/gcc/coverage.c b/gcc/coverage.c
index 661e4411324..200c8633e54 100644
--- a/gcc/coverage.c
+++ b/gcc/coverage.c
@@ -767,6 +767,18 @@ coverage_end_function (unsigned lineno_checksum, unsigned cfg_checksum)
}
}
+/* Remove coverage file if opened. */
+
+void
+coverage_remove_note_file (void)
+{
+ if (bbg_file_name)
+ {
+ gcov_close ();
+ unlink (bbg_file_name);
+ }
+}
+
/* Build a coverage variable of TYPE for function FN_DECL. If COUNTER
>= 0 it is a counter array, otherwise it is the function structure. */
diff --git a/gcc/coverage.h b/gcc/coverage.h
index bac242fd5a4..0ce4a46a3ba 100644
--- a/gcc/coverage.h
+++ b/gcc/coverage.h
@@ -24,6 +24,7 @@ along with GCC; see the file COPYING3. If not see
extern void coverage_init (const char *);
extern void coverage_finish (void);
+extern void coverage_remove_note_file (void);
/* Start outputting coverage information for the current
function. */
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index 8a89f21051b..7b13865233b 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,185 @@
+2017-10-10 Release Manager
+
+ * GCC 5.5.0 released.
+
+2017-09-18 Jason Merrill <jason@redhat.com>
+
+ PR c++/80294 - ICE with constexpr and inheritance.
+ * constexpr.c (reduced_constant_expression_p):
+ A null constructor element is non-constant.
+ (cxx_eval_indirect_ref): Don't VERIFY_CONSTANT before
+ returning an empty base.
+
+ PR c++/79607 - ICE with T{} initializer
+ * decl.c (type_dependent_init_p): Check the type of a CONSTRUCTOR.
+
+ PR c++/72457
+ * init.c (expand_aggr_init_1): Only handle value-init of bases.
+ * constexpr.c (build_data_member_initialization): Handle multiple
+ initializers for the same field.
+
+ PR c++/55922
+ PR c++/63151
+ * init.c (expand_aggr_init_1): Handle list-initialization from {}.
+
+2017-09-16 Jakub Jelinek <jakub@redhat.com>
+
+ Backported from mainline
+ 2017-06-21 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/81154
+ * semantics.c (handle_omp_array_sections_1, finish_omp_clauses):
+ Complain about t not being a variable if t is OVERLOAD even
+ when processing_template_decl.
+
+ 2017-06-13 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/80984
+ * cp-gimplify.c (cp_genericize): Only look for VAR_DECLs in
+ BLOCK_VARS (outer) chain.
+ (cxx_omp_const_qual_no_mutable): Likewise.
+
+2017-06-08 Jakub Jelinek <jakub@redhat.com>
+
+ PR c/81006
+ * semantics.c (handle_omp_array_sections_1): Convert TYPE_MAX_VALUE
+ to sizetype before size_binop.
+
+2017-05-30 Jakub Jelinek <jakub@redhat.com>
+
+ Backported from mainline
+ 2017-04-11 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/80363
+ * error.c (dump_expr): Handle VEC_COND_EXPR like COND_EXPR.
+
+ 2017-04-10 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/80176
+ * tree.c (lvalue_kind): For COMPONENT_REF with BASELINK second
+ operand, if it is a static member function, recurse on the
+ BASELINK.
+
+ 2017-03-22 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/80141
+ * semantics.c (finish_omp_clause) <case OMP_CLAUSE_SIMDLEN,
+ case OMP_CLAUSE_ALIGNED>: Call maybe_constant_value only when not
+ processing_template_decl.
+
+ 2017-03-10 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/79896
+ * decl.c (finish_enum_value_list): If value is error_mark_node,
+ don't copy it and change its type.
+ * init.c (constant_value_1): Return error_mark_node if DECL_INITIAL
+ of CONST_DECL is error_mark_node.
+
+ 2017-02-22 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/79664
+ * parser.c (cp_parser_omp_teams, cp_parser_omp_target): Use
+ SET_EXPR_LOCATION on OMP_TARGET/OMP_TEAMS tree.
+ * constexpr.c (potential_constant_expression_1): Handle
+ OMP_*, OACC_* and CILK_* trees.
+
+ 2017-02-16 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/79512
+ * parser.c (cp_parser_omp_target): For -fopenmp-simd
+ ignore #pragma omp target even when not followed by identifier.
+
+ 2017-01-11 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/78341
+ * parser.c (cp_parser_std_attribute_spec): Remove over-eager
+ assertion. Formatting fix.
+
+ 2017-01-04 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/78949
+ * typeck.c (cp_build_unary_op): Call mark_rvalue_use on arg if it has
+ vector type.
+
+ 2016-12-02 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/78649
+ * pt.c (tsubst_init): Don't call build_value_init if decl's type
+ is error_mark_node.
+
+ 2016-11-23 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/77739
+ * cp-gimplify.c (cp_gimplify_tree) <case VEC_INIT_EXPR>: Pass
+ false as handle_invisiref_parm_p to cp_genericize_tree.
+ (struct cp_genericize_data): Add handle_invisiref_parm_p field.
+ (cp_genericize_r): Don't wrap is_invisiref_parm into references
+ if !wtd->handle_invisiref_parm_p.
+ (cp_genericize_tree): Add handle_invisiref_parm_p argument,
+ set wtd.handle_invisiref_parm_p to it.
+ (cp_genericize): Pass true as handle_invisiref_parm_p to
+ cp_genericize_tree. Formatting fix.
+
+ 2016-11-18 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/77285
+ * mangle.c (mangle_tls_init_fn, mangle_tls_wrapper_fn): Call
+ check_abi_tags.
+
+ 2016-10-31 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/78089
+ * parser.c (cp_parser_postfix_expression): Replace return statement in
+ the first switch with setting postfix_expression to the return
+ expression and break;.
+
+ 2016-09-28 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/77467
+ * constexpr.c (enum constexpr_switch_state): New.
+ (struct constexpr_ctx): Add css_state field.
+ (label_matches): Add CTX and STMT arguments, remove I and
+ DEFAULT_LABEL. For CASE_LABEL_EXPR assert ctx->css_state != NULL,
+ handle default labels according to css_state.
+ (cxx_eval_statement_list): Remove statement skipping, label_matches
+ and default_label handling code.
+ (cxx_eval_loop_expr): Exit after first iteration even if
+ switches (jump_target).
+ (cxx_eval_switch_expr): Set up css_state field in ctx, if default
+ label has been seen in the body, but no cases matched, evaluate
+ the body second time.
+ (cxx_eval_constant_expression): Handle stmt skipping and label_matches
+ here. Handle PREDICT_EXPR. For MODIFY_EXPR or INIT_EXPR, assert
+ statement is not skipped. For COND_EXPR during skipping, don't
+ evaluate condition, just the then block and if still skipping at the
+ end also the else block.
+ (cxx_eval_outermost_constant_expr): Adjust constexpr_ctx initializer.
+ (is_sub_constant_expr): Likewise.
+
+ 2016-09-27 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/77722
+ * cp-gimplify.c (cp_ubsan_maybe_instrument_return): Instrument also
+ functions that have just a STATEMENT_LIST instead of BIND_EXPR, or
+ BIND_EXPR with some statement rather than STATEMENT_LIST as body.
+
+ 2016-09-20 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/77637
+ * parser.c (cp_parser_std_attribute_list): Reject ... without
+ preceding attribute.
+
+ 2016-09-16 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/77375
+ * class.c (check_bases): Set CLASSTYPE_HAS_MUTABLE if any
+ TYPE_HAS_MUTABLE_P for any bases.
+
+ 2016-08-11 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/72868
+ * constexpr.c (label_matches): Handle case range expressions.
+
2017-01-12 Nathan Sidwell <nathan@acm.org>
PR c++/77812
diff --git a/gcc/cp/class.c b/gcc/cp/class.c
index 9dc15da2825..50fbe244590 100644
--- a/gcc/cp/class.c
+++ b/gcc/cp/class.c
@@ -1763,6 +1763,8 @@ check_bases (tree t,
SET_CLASSTYPE_REF_FIELDS_NEED_INIT
(t, CLASSTYPE_REF_FIELDS_NEED_INIT (t)
| CLASSTYPE_REF_FIELDS_NEED_INIT (basetype));
+ if (TYPE_HAS_MUTABLE_P (basetype))
+ CLASSTYPE_HAS_MUTABLE (t) = 1;
/* A standard-layout class is a class that:
...
diff --git a/gcc/cp/constexpr.c b/gcc/cp/constexpr.c
index e558e69066a..4f23f754c04 100644
--- a/gcc/cp/constexpr.c
+++ b/gcc/cp/constexpr.c
@@ -401,7 +401,12 @@ build_data_member_initialization (tree t, vec<constructor_elt, va_gc> **vec)
gcc_assert (TREE_TYPE (member) == vtbl_ptr_type_node);
}
- CONSTRUCTOR_APPEND_ELT (*vec, member, init);
+ /* Value-initialization can produce multiple initializers for the
+ same field; use the last one. */
+ if (!vec_safe_is_empty (*vec) && (*vec)->last().index == member)
+ (*vec)->last().value = init;
+ else
+ CONSTRUCTOR_APPEND_ELT (*vec, member, init);
return true;
}
@@ -888,6 +893,18 @@ struct constexpr_call_hasher : ggc_hasher<constexpr_call *>
static bool equal (constexpr_call *, constexpr_call *);
};
+enum constexpr_switch_state {
+ /* Used when processing a switch for the first time by cxx_eval_switch_expr
+ and default: label for that switch has not been seen yet. */
+ css_default_not_seen,
+ /* Used when processing a switch for the first time by cxx_eval_switch_expr
+ and default: label for that switch has been seen already. */
+ css_default_seen,
+ /* Used when processing a switch for the second time by
+ cxx_eval_switch_expr, where default: label should match. */
+ css_default_processing
+};
+
/* The constexpr expansion context. CALL is the current function
expansion, CTOR is the current aggregate initializer, OBJECT is the
object being initialized by CTOR, either a VAR_DECL or a _REF. VALUES
@@ -907,6 +924,8 @@ struct constexpr_ctx {
tree ctor;
/* The object we're building the CONSTRUCTOR for. */
tree object;
+ /* If inside SWITCH_EXPR. */
+ constexpr_switch_state *css_state;
/* Whether we should error on a non-constant expression or fail quietly. */
bool quiet;
/* Whether we are strictly conforming to constant expression rules or
@@ -1485,8 +1504,13 @@ reduced_constant_expression_p (tree t)
/* And we need to handle PTRMEM_CST wrapped in a CONSTRUCTOR. */
tree elt; unsigned HOST_WIDE_INT idx;
FOR_EACH_CONSTRUCTOR_VALUE (CONSTRUCTOR_ELTS (t), idx, elt)
- if (!reduced_constant_expression_p (elt))
- return false;
+ {
+ if (!elt)
+ /* We're in the middle of initializing this element. */
+ return false;
+ if (!reduced_constant_expression_p (elt))
+ return false;
+ }
return true;
default:
@@ -2674,12 +2698,10 @@ cxx_eval_indirect_ref (const constexpr_ctx *ctx, tree t,
}
}
- /* If we're pulling out the value of an empty base, make sure
- that the whole object is constant and then return an empty
+ /* If we're pulling out the value of an empty base, just return an empty
CONSTRUCTOR. */
if (empty_base && !lval)
{
- VERIFY_CONSTANT (r);
r = build_constructor (TREE_TYPE (t), NULL);
TREE_CONSTANT (r) = true;
}
@@ -3071,14 +3093,12 @@ switches (tree *jump_target)
}
/* Subroutine of cxx_eval_statement_list. Determine whether the statement
- at I matches *jump_target. If we're looking for a case label and we see
- the default label, copy I into DEFAULT_LABEL. */
+ STMT matches *jump_target. If we're looking for a case label and we see
+ the default label, note it in ctx->css_state. */
static bool
-label_matches (tree *jump_target, tree_stmt_iterator i,
- tree_stmt_iterator& default_label)
+label_matches (const constexpr_ctx *ctx, tree *jump_target, tree stmt)
{
- tree stmt = tsi_stmt (i);
switch (TREE_CODE (*jump_target))
{
case LABEL_DECL:
@@ -3090,8 +3110,24 @@ label_matches (tree *jump_target, tree_stmt_iterator i,
case INTEGER_CST:
if (TREE_CODE (stmt) == CASE_LABEL_EXPR)
{
+ gcc_assert (ctx->css_state != NULL);
if (!CASE_LOW (stmt))
- default_label = i;
+ {
+ /* default: should appear just once in a SWITCH_EXPR
+ body (excluding nested SWITCH_EXPR). */
+ gcc_assert (*ctx->css_state != css_default_seen);
+ /* When evaluating SWITCH_EXPR body for the second time,
+ return true for the default: label. */
+ if (*ctx->css_state == css_default_processing)
+ return true;
+ *ctx->css_state = css_default_seen;
+ }
+ else if (CASE_HIGH (stmt))
+ {
+ if (tree_int_cst_le (CASE_LOW (stmt), *jump_target)
+ && tree_int_cst_le (*jump_target, CASE_HIGH (stmt)))
+ return true;
+ }
else if (tree_int_cst_equal (*jump_target, CASE_LOW (stmt)))
return true;
}
@@ -3112,7 +3148,6 @@ cxx_eval_statement_list (const constexpr_ctx *ctx, tree t,
tree *jump_target)
{
tree_stmt_iterator i;
- tree_stmt_iterator default_label = tree_stmt_iterator();
tree local_target;
/* In a statement-expression we want to return the last value. */
tree r = NULL_TREE;
@@ -3123,18 +3158,7 @@ cxx_eval_statement_list (const constexpr_ctx *ctx, tree t,
}
for (i = tsi_start (t); !tsi_end_p (i); tsi_next (&i))
{
- reenter:
tree stmt = tsi_stmt (i);
- if (*jump_target)
- {
- if (TREE_CODE (stmt) == STATEMENT_LIST)
- /* The label we want might be inside. */;
- else if (label_matches (jump_target, i, default_label))
- /* Found it. */
- *jump_target = NULL_TREE;
- else
- continue;
- }
r = cxx_eval_constant_expression (ctx, stmt, false,
non_constant_p, overflow_p,
jump_target);
@@ -3143,12 +3167,6 @@ cxx_eval_statement_list (const constexpr_ctx *ctx, tree t,
if (returns (jump_target) || breaks (jump_target))
break;
}
- if (switches (jump_target) && !tsi_end_p (default_label))
- {
- i = default_label;
- *jump_target = NULL_TREE;
- goto reenter;
- }
return r;
}
@@ -3183,7 +3201,10 @@ cxx_eval_loop_expr (const constexpr_ctx *ctx, tree t,
/* Forget saved values of SAVE_EXPRs. */
save_exprs.traverse<constexpr_ctx &, save_exprs_remover>(new_ctx);
}
- while (!returns (jump_target) && !breaks (jump_target) && !*non_constant_p);
+ while (!returns (jump_target)
+ && !breaks (jump_target)
+ && !switches (jump_target)
+ && !*non_constant_p);
if (breaks (jump_target))
*jump_target = NULL_TREE;
@@ -3206,8 +3227,20 @@ cxx_eval_switch_expr (const constexpr_ctx *ctx, tree t,
*jump_target = cond;
tree body = TREE_OPERAND (t, 1);
- cxx_eval_statement_list (ctx, body,
- non_constant_p, overflow_p, jump_target);
+ constexpr_ctx new_ctx = *ctx;
+ constexpr_switch_state css = css_default_not_seen;
+ new_ctx.css_state = &css;
+ cxx_eval_constant_expression (&new_ctx, body, false,
+ non_constant_p, overflow_p, jump_target);
+ if (switches (jump_target) && css == css_default_seen)
+ {
+ /* If the SWITCH_EXPR body has default: label, process it once again,
+ this time instructing label_matches to return true for default:
+ label on switches (jump_target). */
+ css = css_default_processing;
+ cxx_eval_constant_expression (&new_ctx, body, false,
+ non_constant_p, overflow_p, jump_target);
+ }
if (breaks (jump_target) || switches (jump_target))
*jump_target = NULL_TREE;
return NULL_TREE;
@@ -3284,6 +3317,27 @@ cxx_eval_constant_expression (const constexpr_ctx *ctx, tree t,
constexpr_ctx new_ctx;
tree r = t;
+ if (jump_target && *jump_target)
+ {
+ /* If we are jumping, ignore all statements/expressions except those
+ that could have LABEL_EXPR or CASE_LABEL_EXPR in their bodies. */
+ switch (TREE_CODE (t))
+ {
+ case BIND_EXPR:
+ case STATEMENT_LIST:
+ case LOOP_EXPR:
+ case COND_EXPR:
+ break;
+ case LABEL_EXPR:
+ case CASE_LABEL_EXPR:
+ if (label_matches (ctx, jump_target, t))
+ /* Found it. */
+ *jump_target = NULL_TREE;
+ return NULL_TREE;
+ default:
+ return NULL_TREE;
+ }
+ }
if (t == error_mark_node)
{
*non_constant_p = true;
@@ -3338,6 +3392,7 @@ cxx_eval_constant_expression (const constexpr_ctx *ctx, tree t,
case LABEL_DECL:
case LABEL_EXPR:
case CASE_LABEL_EXPR:
+ case PREDICT_EXPR:
return t;
case PARM_DECL:
@@ -3455,6 +3510,7 @@ cxx_eval_constant_expression (const constexpr_ctx *ctx, tree t,
}
/* else fall through */
case MODIFY_EXPR:
+ gcc_assert (jump_target == NULL || *jump_target == NULL_TREE);
r = cxx_eval_store_expression (ctx, t, lval,
non_constant_p, overflow_p);
break;
@@ -3685,6 +3741,22 @@ cxx_eval_constant_expression (const constexpr_ctx *ctx, tree t,
break;
case COND_EXPR:
+ if (jump_target && *jump_target)
+ {
+ /* When jumping to a label, the label might be either in the
+ then or else blocks, so process then block first in skipping
+ mode first, and if we are still in the skipping mode at its end,
+ process the else block too. */
+ r = cxx_eval_constant_expression (ctx, TREE_OPERAND (t, 1),
+ lval, non_constant_p, overflow_p,
+ jump_target);
+ if (*jump_target)
+ r = cxx_eval_constant_expression (ctx, TREE_OPERAND (t, 2),
+ lval, non_constant_p, overflow_p,
+ jump_target);
+ break;
+ }
+ /* FALLTHRU */
case VEC_COND_EXPR:
r = cxx_eval_conditional_expression (ctx, t, lval,
non_constant_p, overflow_p,
@@ -3866,7 +3938,7 @@ cxx_eval_outermost_constant_expr (tree t, bool allow_non_constant,
bool overflow_p = false;
hash_map<tree,tree> map;
- constexpr_ctx ctx = { NULL, &map, NULL, NULL, NULL,
+ constexpr_ctx ctx = { NULL, &map, NULL, NULL, NULL, NULL,
allow_non_constant, strict };
tree type = initialized_type (t);
@@ -3977,7 +4049,7 @@ is_sub_constant_expr (tree t)
bool overflow_p = false;
hash_map <tree, tree> map;
- constexpr_ctx ctx = { NULL, &map, NULL, NULL, NULL, true, true };
+ constexpr_ctx ctx = { NULL, &map, NULL, NULL, NULL, NULL, true, true };
cxx_eval_constant_expression (&ctx, t, false, &non_constant_p,
&overflow_p);
@@ -4491,10 +4563,37 @@ potential_constant_expression_1 (tree t, bool want_rval, bool strict,
case DELETE_EXPR:
case VEC_DELETE_EXPR:
case THROW_EXPR:
+ case OMP_PARALLEL:
+ case OMP_TASK:
+ case OMP_FOR:
+ case OMP_DISTRIBUTE:
+ case OMP_TEAMS:
+ case OMP_TARGET_DATA:
+ case OMP_TARGET:
+ case OMP_SECTIONS:
+ case OMP_ORDERED:
+ case OMP_CRITICAL:
+ case OMP_SINGLE:
+ case OMP_SECTION:
+ case OMP_MASTER:
+ case OMP_TASKGROUP:
+ case OMP_TARGET_UPDATE:
case OMP_ATOMIC:
case OMP_ATOMIC_READ:
case OMP_ATOMIC_CAPTURE_OLD:
case OMP_ATOMIC_CAPTURE_NEW:
+ case OACC_PARALLEL:
+ case OACC_KERNELS:
+ case OACC_DATA:
+ case OACC_HOST_DATA:
+ case OACC_LOOP:
+ case OACC_CACHE:
+ case OACC_DECLARE:
+ case OACC_ENTER_DATA:
+ case OACC_EXIT_DATA:
+ case OACC_UPDATE:
+ case CILK_SIMD:
+ case CILK_FOR:
/* GCC internal stuff. */
case VA_ARG_EXPR:
case OBJ_TYPE_REF:
@@ -4502,7 +4601,8 @@ potential_constant_expression_1 (tree t, bool want_rval, bool strict,
case ASM_EXPR:
fail:
if (flags & tf_error)
- error ("expression %qE is not a constant-expression", t);
+ error_at (EXPR_LOC_OR_LOC (t, input_location),
+ "expression %qE is not a constant-expression", t);
return false;
case TYPEID_EXPR:
diff --git a/gcc/cp/cp-gimplify.c b/gcc/cp/cp-gimplify.c
index 41b34185425..f881408b117 100644
--- a/gcc/cp/cp-gimplify.c
+++ b/gcc/cp/cp-gimplify.c
@@ -59,7 +59,7 @@ along with GCC; see the file COPYING3. If not see
/* Forward declarations. */
static tree cp_genericize_r (tree *, int *, void *);
-static void cp_genericize_tree (tree*);
+static void cp_genericize_tree (tree*, bool);
/* Local declarations. */
@@ -592,7 +592,7 @@ cp_gimplify_expr (tree *expr_p, gimple_seq *pre_p, gimple_seq *post_p)
init, VEC_INIT_EXPR_VALUE_INIT (*expr_p),
from_array,
tf_warning_or_error);
- cp_genericize_tree (expr_p);
+ cp_genericize_tree (expr_p, false);
ret = GS_OK;
input_location = loc;
}
@@ -906,6 +906,7 @@ struct cp_genericize_data
vec<tree> bind_expr_stack;
struct cp_genericize_omp_taskreg *omp_ctx;
bool no_sanitize_p;
+ bool handle_invisiref_parm_p;
};
/* Perform any pre-gimplification lowering of C++ front end trees to
@@ -926,7 +927,8 @@ cp_genericize_r (tree *stmt_p, int *walk_subtrees, void *data)
&& omp_var_to_track (stmt))
omp_cxx_notice_variable (wtd->omp_ctx, stmt);
- if (is_invisiref_parm (stmt)
+ if (wtd->handle_invisiref_parm_p
+ && is_invisiref_parm (stmt)
/* Don't dereference parms in a thunk, pass the references through. */
&& !(DECL_THUNK_P (current_function_decl)
&& TREE_CODE (stmt) == PARM_DECL))
@@ -1279,7 +1281,7 @@ cp_genericize_r (tree *stmt_p, int *walk_subtrees, void *data)
/* Lower C++ front end trees to GENERIC in T_P. */
static void
-cp_genericize_tree (tree* t_p)
+cp_genericize_tree (tree* t_p, bool handle_invisiref_parm_p)
{
struct cp_genericize_data wtd;
@@ -1287,6 +1289,7 @@ cp_genericize_tree (tree* t_p)
wtd.bind_expr_stack.create (0);
wtd.omp_ctx = NULL;
wtd.no_sanitize_p = false;
+ wtd.handle_invisiref_parm_p = handle_invisiref_parm_p;
cp_walk_tree (t_p, cp_genericize_r, &wtd, NULL);
delete wtd.p_set;
wtd.bind_expr_stack.release ();
@@ -1337,14 +1340,11 @@ cp_ubsan_maybe_instrument_return (tree fndecl)
}
if (t == NULL_TREE)
return;
- t = DECL_SAVED_TREE (fndecl);
- if (TREE_CODE (t) == BIND_EXPR
- && TREE_CODE (BIND_EXPR_BODY (t)) == STATEMENT_LIST)
- {
- tree_stmt_iterator i = tsi_last (BIND_EXPR_BODY (t));
- t = ubsan_instrument_return (DECL_SOURCE_LOCATION (fndecl));
- tsi_link_after (&i, t, TSI_NEW_STMT);
- }
+ tree *p = &DECL_SAVED_TREE (fndecl);
+ if (TREE_CODE (*p) == BIND_EXPR)
+ p = &BIND_EXPR_BODY (*p);
+ t = ubsan_instrument_return (DECL_SOURCE_LOCATION (fndecl));
+ append_to_statement_list (t, p);
}
void
@@ -1384,7 +1384,8 @@ cp_genericize (tree fndecl)
if (outer)
for (var = BLOCK_VARS (outer); var; var = DECL_CHAIN (var))
- if (DECL_NAME (t) == DECL_NAME (var)
+ if (VAR_P (var)
+ && DECL_NAME (t) == DECL_NAME (var)
&& DECL_HAS_VALUE_EXPR_P (var)
&& DECL_VALUE_EXPR (var) == t)
{
@@ -1402,12 +1403,12 @@ cp_genericize (tree fndecl)
/* Expand all the array notations here. */
if (flag_cilkplus
&& contains_array_notation_expr (DECL_SAVED_TREE (fndecl)))
- DECL_SAVED_TREE (fndecl) =
- expand_array_notation_exprs (DECL_SAVED_TREE (fndecl));
+ DECL_SAVED_TREE (fndecl)
+ = expand_array_notation_exprs (DECL_SAVED_TREE (fndecl));
/* We do want to see every occurrence of the parms, so we can't just use
walk_tree's hash functionality. */
- cp_genericize_tree (&DECL_SAVED_TREE (fndecl));
+ cp_genericize_tree (&DECL_SAVED_TREE (fndecl), true);
if (flag_sanitize & SANITIZE_RETURN
&& do_ubsan_in_current_function ())
@@ -1622,7 +1623,8 @@ cxx_omp_const_qual_no_mutable (tree decl)
if (outer)
for (var = BLOCK_VARS (outer); var; var = DECL_CHAIN (var))
- if (DECL_NAME (decl) == DECL_NAME (var)
+ if (VAR_P (var)
+ && DECL_NAME (decl) == DECL_NAME (var)
&& (TYPE_MAIN_VARIANT (type)
== TYPE_MAIN_VARIANT (TREE_TYPE (var))))
{
diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c
index ce0443ca4c0..3472d29afad 100644
--- a/gcc/cp/decl.c
+++ b/gcc/cp/decl.c
@@ -6349,6 +6349,9 @@ type_dependent_init_p (tree init)
else if (TREE_CODE (init) == CONSTRUCTOR)
/* A brace-enclosed initializer, e.g.: int i = { 3 }; ? */
{
+ if (dependent_type_p (TREE_TYPE (init)))
+ return true;
+
vec<constructor_elt, va_gc> *elts;
size_t nelts;
size_t i;
@@ -13077,9 +13080,12 @@ finish_enum_value_list (tree enumtype)
input_location = saved_location;
/* Do not clobber shared ints. */
- value = copy_node (value);
+ if (value != error_mark_node)
+ {
+ value = copy_node (value);
- TREE_TYPE (value) = enumtype;
+ TREE_TYPE (value) = enumtype;
+ }
DECL_INITIAL (decl) = value;
}
diff --git a/gcc/cp/error.c b/gcc/cp/error.c
index 4bcd281965e..f502127f34f 100644
--- a/gcc/cp/error.c
+++ b/gcc/cp/error.c
@@ -44,8 +44,6 @@ along with GCC; see the file COPYING3. If not see
#include "ubsan.h"
#include "internal-fn.h"
-#include <new> // For placement-new.
-
#define pp_separate_with_comma(PP) pp_cxx_separate_with (PP, ',')
#define pp_separate_with_semicolon(PP) pp_cxx_separate_with (PP, ';')
@@ -2005,6 +2003,7 @@ dump_expr (cxx_pretty_printer *pp, tree t, int flags)
break;
case COND_EXPR:
+ case VEC_COND_EXPR:
pp_cxx_left_paren (pp);
dump_expr (pp, TREE_OPERAND (t, 0), flags | TFF_EXPR_IN_PARENS);
pp_string (pp, " ? ");
diff --git a/gcc/cp/init.c b/gcc/cp/init.c
index 3d79ba8e934..841afbd8f51 100644
--- a/gcc/cp/init.c
+++ b/gcc/cp/init.c
@@ -1810,6 +1810,19 @@ expand_aggr_init_1 (tree binfo, tree true_exp, tree exp, tree init, int flags,
return;
}
+ /* List-initialization from {} becomes value-initialization for non-aggregate
+ classes with default constructors. Handle this here when we're
+ initializing a base, so protected access works. */
+ if (exp != true_exp && init && TREE_CODE (init) == TREE_LIST)
+ {
+ tree elt = TREE_VALUE (init);
+ if (DIRECT_LIST_INIT_P (elt)
+ && CONSTRUCTOR_ELTS (elt) == 0
+ && CLASSTYPE_NON_AGGREGATE (type)
+ && TYPE_HAS_DEFAULT_CONSTRUCTOR (type))
+ init = void_type_node;
+ }
+
/* If an explicit -- but empty -- initializer list was present,
that's value-initialization. */
if (init == void_type_node)
@@ -2050,7 +2063,8 @@ constant_value_1 (tree decl, bool strict_p, bool return_aggregate_cst_ok_p)
init = DECL_INITIAL (decl);
if (init == error_mark_node)
{
- if (DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P (decl))
+ if (TREE_CODE (decl) == CONST_DECL
+ || DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P (decl))
/* Treat the error as a constant to avoid cascading errors on
excessively recursive template instantiation (c++/9335). */
return init;
diff --git a/gcc/cp/mangle.c b/gcc/cp/mangle.c
index 4e0ed225d76..5ad7bb7a96b 100644
--- a/gcc/cp/mangle.c
+++ b/gcc/cp/mangle.c
@@ -3881,6 +3881,7 @@ mangle_guard_variable (const tree variable)
tree
mangle_tls_init_fn (const tree variable)
{
+ check_abi_tags (variable);
start_mangling (variable);
write_string ("_ZTH");
write_guarded_var_name (variable);
@@ -3895,6 +3896,7 @@ mangle_tls_init_fn (const tree variable)
tree
mangle_tls_wrapper_fn (const tree variable)
{
+ check_abi_tags (variable);
start_mangling (variable);
write_string (TLS_WRAPPER_PREFIX);
write_guarded_var_name (variable);
diff --git a/gcc/cp/parser.c b/gcc/cp/parser.c
index 03b93ab2d75..76868276a02 100644
--- a/gcc/cp/parser.c
+++ b/gcc/cp/parser.c
@@ -5894,7 +5894,10 @@ cp_parser_postfix_expression (cp_parser *parser, bool address_p, bool cast_p,
can be used in constant-expressions. */
if (!cast_valid_in_integral_constant_expression_p (type)
&& cp_parser_non_integral_constant_expression (parser, NIC_CAST))
- return error_mark_node;
+ {
+ postfix_expression = error_mark_node;
+ break;
+ }
switch (keyword)
{
@@ -5966,7 +5969,7 @@ cp_parser_postfix_expression (cp_parser *parser, bool address_p, bool cast_p,
parser->type_definition_forbidden_message = saved_message;
/* `typeid' may not appear in an integral constant expression. */
if (cp_parser_non_integral_constant_expression (parser, NIC_TYPEID))
- return error_mark_node;
+ postfix_expression = error_mark_node;
}
break;
@@ -6045,23 +6048,28 @@ cp_parser_postfix_expression (cp_parser *parser, bool address_p, bool cast_p,
/*cast_p=*/false, /*allow_expansion_p=*/true,
/*non_constant_p=*/NULL);
if (vec == NULL)
- return error_mark_node;
+ {
+ postfix_expression = error_mark_node;
+ break;
+ }
FOR_EACH_VEC_ELT (*vec, i, p)
mark_exp_read (p);
if (vec->length () == 2)
- return build_x_vec_perm_expr (loc, (*vec)[0], NULL_TREE, (*vec)[1],
- tf_warning_or_error);
+ postfix_expression
+ = build_x_vec_perm_expr (loc, (*vec)[0], NULL_TREE, (*vec)[1],
+ tf_warning_or_error);
else if (vec->length () == 3)
- return build_x_vec_perm_expr (loc, (*vec)[0], (*vec)[1], (*vec)[2],
- tf_warning_or_error);
+ postfix_expression
+ = build_x_vec_perm_expr (loc, (*vec)[0], (*vec)[1], (*vec)[2],
+ tf_warning_or_error);
else
- {
- error_at (loc, "wrong number of arguments to "
- "%<__builtin_shuffle%>");
- return error_mark_node;
- }
+ {
+ error_at (loc, "wrong number of arguments to "
+ "%<__builtin_shuffle%>");
+ postfix_expression = error_mark_node;
+ }
break;
}
@@ -22528,8 +22536,12 @@ cp_parser_std_attribute_list (cp_parser *parser)
if (token->type == CPP_ELLIPSIS)
{
cp_lexer_consume_token (parser->lexer);
- TREE_VALUE (attribute)
- = make_pack_expansion (TREE_VALUE (attribute));
+ if (attribute == NULL_TREE)
+ error_at (token->location,
+ "expected attribute before %<...%>");
+ else
+ TREE_VALUE (attribute)
+ = make_pack_expansion (TREE_VALUE (attribute));
token = cp_lexer_peek_token (parser->lexer);
}
if (token->type != CPP_COMMA)
@@ -22598,11 +22610,7 @@ cp_parser_std_attribute_spec (cp_parser *parser)
if (!cp_parser_parse_definitely (parser))
{
- gcc_assert (alignas_expr == error_mark_node
- || alignas_expr == NULL_TREE);
-
- alignas_expr =
- cp_parser_assignment_expression (parser);
+ alignas_expr = cp_parser_assignment_expression (parser);
if (alignas_expr == error_mark_node)
cp_parser_skip_to_end_of_statement (parser);
if (alignas_expr == NULL_TREE
@@ -31392,6 +31400,7 @@ cp_parser_omp_teams (cp_parser *parser, cp_token *pragma_tok,
OMP_TEAMS_CLAUSES (ret) = clauses;
OMP_TEAMS_BODY (ret) = body;
OMP_TEAMS_COMBINED (ret) = 1;
+ SET_EXPR_LOCATION (ret, loc);
return add_stmt (ret);
}
}
@@ -31413,6 +31422,7 @@ cp_parser_omp_teams (cp_parser *parser, cp_token *pragma_tok,
TREE_TYPE (stmt) = void_type_node;
OMP_TEAMS_CLAUSES (stmt) = clauses;
OMP_TEAMS_BODY (stmt) = cp_parser_omp_structured_block (parser);
+ SET_EXPR_LOCATION (stmt, loc);
return add_stmt (stmt);
}
@@ -31537,6 +31547,7 @@ cp_parser_omp_target (cp_parser *parser, cp_token *pragma_tok,
TREE_TYPE (stmt) = void_type_node;
OMP_TARGET_CLAUSES (stmt) = cclauses[C_OMP_CLAUSE_SPLIT_TARGET];
OMP_TARGET_BODY (stmt) = body;
+ SET_EXPR_LOCATION (stmt, pragma_tok->location);
add_stmt (stmt);
return true;
}
@@ -31558,6 +31569,11 @@ cp_parser_omp_target (cp_parser *parser, cp_token *pragma_tok,
}
}
+ if (!flag_openmp) /* flag_openmp_simd */
+ {
+ cp_parser_skip_to_pragma_eol (parser, pragma_tok);
+ return false;
+ }
tree stmt = make_node (OMP_TARGET);
TREE_TYPE (stmt) = void_type_node;
diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c
index 578fa20184b..a19cc0c46a9 100644
--- a/gcc/cp/pt.c
+++ b/gcc/cp/pt.c
@@ -12988,7 +12988,7 @@ tsubst_init (tree init, tree decl, tree args,
init = tsubst_expr (init, args, complain, in_decl, false);
- if (!init)
+ if (!init && TREE_TYPE (decl) != error_mark_node)
{
/* If we had an initializer but it
instantiated to nothing,
diff --git a/gcc/cp/semantics.c b/gcc/cp/semantics.c
index 6705d1f97c9..eb79696a5a8 100644
--- a/gcc/cp/semantics.c
+++ b/gcc/cp/semantics.c
@@ -4297,7 +4297,7 @@ handle_omp_array_sections_1 (tree c, tree t, vec<tree> &types,
return error_mark_node;
if (TREE_CODE (t) != VAR_DECL && TREE_CODE (t) != PARM_DECL)
{
- if (processing_template_decl)
+ if (processing_template_decl && TREE_CODE (t) != OVERLOAD)
return NULL_TREE;
if (DECL_P (t))
error_at (OMP_CLAUSE_LOCATION (c),
@@ -4410,9 +4410,9 @@ handle_omp_array_sections_1 (tree c, tree t, vec<tree> &types,
&& TREE_CODE (TYPE_MAX_VALUE (TYPE_DOMAIN (type)))
== INTEGER_CST)
{
- tree size = size_binop (PLUS_EXPR,
- TYPE_MAX_VALUE (TYPE_DOMAIN (type)),
- size_one_node);
+ tree size
+ = fold_convert (sizetype, TYPE_MAX_VALUE (TYPE_DOMAIN (type)));
+ size = size_binop (PLUS_EXPR, size, size_one_node);
if (TREE_CODE (low_bound) == INTEGER_CST)
{
if (tree_int_cst_lt (size, low_bound))
@@ -5392,7 +5392,7 @@ finish_omp_clauses (tree clauses)
t = OMP_CLAUSE_DECL (c);
if (!VAR_P (t) && TREE_CODE (t) != PARM_DECL)
{
- if (processing_template_decl)
+ if (processing_template_decl && TREE_CODE (t) != OVERLOAD)
break;
if (DECL_P (t))
error ("%qD is not a variable in clause %qs", t,
@@ -5417,7 +5417,7 @@ finish_omp_clauses (tree clauses)
t = OMP_CLAUSE_DECL (c);
if (!VAR_P (t) && TREE_CODE (t) != PARM_DECL)
{
- if (processing_template_decl)
+ if (processing_template_decl && TREE_CODE (t) != OVERLOAD)
break;
if (DECL_P (t))
error ("%qD is not a variable in clause %<firstprivate%>", t);
@@ -5439,7 +5439,7 @@ finish_omp_clauses (tree clauses)
t = OMP_CLAUSE_DECL (c);
if (!VAR_P (t) && TREE_CODE (t) != PARM_DECL)
{
- if (processing_template_decl)
+ if (processing_template_decl && TREE_CODE (t) != OVERLOAD)
break;
if (DECL_P (t))
error ("%qD is not a variable in clause %<lastprivate%>", t);
@@ -5546,9 +5546,9 @@ finish_omp_clauses (tree clauses)
else
{
t = mark_rvalue_use (t);
- t = maybe_constant_value (t);
if (!processing_template_decl)
{
+ t = maybe_constant_value (t);
if (TREE_CODE (t) != INTEGER_CST
|| tree_int_cst_sgn (t) != 1)
{
@@ -5683,7 +5683,7 @@ finish_omp_clauses (tree clauses)
t = OMP_CLAUSE_DECL (c);
if (TREE_CODE (t) != VAR_DECL && TREE_CODE (t) != PARM_DECL)
{
- if (processing_template_decl)
+ if (processing_template_decl && TREE_CODE (t) != OVERLOAD)
break;
if (DECL_P (t))
error ("%qD is not a variable in %<aligned%> clause", t);
@@ -5726,9 +5726,9 @@ finish_omp_clauses (tree clauses)
else
{
t = mark_rvalue_use (t);
- t = maybe_constant_value (t);
if (!processing_template_decl)
{
+ t = maybe_constant_value (t);
if (TREE_CODE (t) != INTEGER_CST
|| tree_int_cst_sgn (t) != 1)
{
@@ -5753,7 +5753,7 @@ finish_omp_clauses (tree clauses)
remove = true;
else if (TREE_CODE (t) != VAR_DECL && TREE_CODE (t) != PARM_DECL)
{
- if (processing_template_decl)
+ if (processing_template_decl && TREE_CODE (t) != OVERLOAD)
break;
if (DECL_P (t))
error ("%qD is not a variable in %<depend%> clause", t);
@@ -5795,7 +5795,7 @@ finish_omp_clauses (tree clauses)
remove = true;
else if (TREE_CODE (t) != VAR_DECL && TREE_CODE (t) != PARM_DECL)
{
- if (processing_template_decl)
+ if (processing_template_decl && TREE_CODE (t) != OVERLOAD)
break;
if (OMP_CLAUSE_CODE (c) == OMP_CLAUSE_MAP
&& OMP_CLAUSE_MAP_KIND (c) == GOMP_MAP_POINTER)
diff --git a/gcc/cp/tree.c b/gcc/cp/tree.c
index 4a7008b5a23..6b145c40759 100644
--- a/gcc/cp/tree.c
+++ b/gcc/cp/tree.c
@@ -129,6 +129,17 @@ lvalue_kind (const_tree ref)
return op1_lvalue_kind;
case COMPONENT_REF:
+ if (BASELINK_P (TREE_OPERAND (ref, 1)))
+ {
+ tree fn = BASELINK_FUNCTIONS (TREE_OPERAND (ref, 1));
+
+ /* For static member function recurse on the BASELINK, we can get
+ here e.g. from reference_binding. If BASELINK_FUNCTIONS is
+ OVERLOAD, the overload is resolved first if possible through
+ resolve_address_of_overloaded_function. */
+ if (TREE_CODE (fn) == FUNCTION_DECL && DECL_STATIC_FUNCTION_P (fn))
+ return lvalue_kind (TREE_OPERAND (ref, 1));
+ }
op1_lvalue_kind = lvalue_kind (TREE_OPERAND (ref, 0));
/* Look at the member designator. */
if (!op1_lvalue_kind)
diff --git a/gcc/cp/typeck.c b/gcc/cp/typeck.c
index 669f5414138..e3ba6077c09 100644
--- a/gcc/cp/typeck.c
+++ b/gcc/cp/typeck.c
@@ -5700,6 +5700,8 @@ cp_build_unary_op (enum tree_code code, tree xarg, int noconvert,
errstring = _("wrong type argument to bit-complement");
else if (!noconvert && CP_INTEGRAL_TYPE_P (TREE_TYPE (arg)))
arg = cp_perform_integral_promotions (arg, complain);
+ else if (!noconvert && VECTOR_TYPE_P (TREE_TYPE (arg)))
+ arg = mark_rvalue_use (arg);
break;
case ABS_EXPR:
diff --git a/gcc/cselib.c b/gcc/cselib.c
index d6ccbfb4690..0c353226f5c 100644
--- a/gcc/cselib.c
+++ b/gcc/cselib.c
@@ -71,7 +71,7 @@ static void unchain_one_value (cselib_val *);
static void unchain_one_elt_list (struct elt_list **);
static void unchain_one_elt_loc_list (struct elt_loc_list **);
static void remove_useless_values (void);
-static int rtx_equal_for_cselib_1 (rtx, rtx, machine_mode);
+static int rtx_equal_for_cselib_1 (rtx, rtx, machine_mode, int);
static unsigned int cselib_hash_rtx (rtx, int, machine_mode);
static cselib_val *new_cselib_val (unsigned int, machine_mode, rtx);
static void add_mem_for_addr (cselib_val *, cselib_val *, rtx);
@@ -147,7 +147,7 @@ cselib_hasher::equal (const value_type *v, const compare_type *x_arg)
/* We don't guarantee that distinct rtx's have different hash values,
so we need to do a comparison. */
for (l = v->locs; l; l = l->next)
- if (rtx_equal_for_cselib_1 (l->loc, x, memmode))
+ if (rtx_equal_for_cselib_1 (l->loc, x, memmode, 0))
{
promote_debug_loc (l);
return true;
@@ -812,7 +812,7 @@ cselib_reg_set_mode (const_rtx x)
int
rtx_equal_for_cselib_p (rtx x, rtx y)
{
- return rtx_equal_for_cselib_1 (x, y, VOIDmode);
+ return rtx_equal_for_cselib_1 (x, y, VOIDmode, 0);
}
/* If x is a PLUS or an autoinc operation, expand the operation,
@@ -862,7 +862,7 @@ autoinc_split (rtx x, rtx *off, machine_mode memmode)
addresses, MEMMODE should be VOIDmode. */
static int
-rtx_equal_for_cselib_1 (rtx x, rtx y, machine_mode memmode)
+rtx_equal_for_cselib_1 (rtx x, rtx y, machine_mode memmode, int depth)
{
enum rtx_code code;
const char *fmt;
@@ -895,6 +895,9 @@ rtx_equal_for_cselib_1 (rtx x, rtx y, machine_mode memmode)
if (GET_CODE (y) == VALUE)
return e == canonical_cselib_val (CSELIB_VAL_PTR (y));
+ if (depth == 128)
+ return 0;
+
for (l = e->locs; l; l = l->next)
{
rtx t = l->loc;
@@ -904,7 +907,7 @@ rtx_equal_for_cselib_1 (rtx x, rtx y, machine_mode memmode)
list. */
if (REG_P (t) || MEM_P (t) || GET_CODE (t) == VALUE)
continue;
- else if (rtx_equal_for_cselib_1 (t, y, memmode))
+ else if (rtx_equal_for_cselib_1 (t, y, memmode, depth + 1))
return 1;
}
@@ -915,13 +918,16 @@ rtx_equal_for_cselib_1 (rtx x, rtx y, machine_mode memmode)
cselib_val *e = canonical_cselib_val (CSELIB_VAL_PTR (y));
struct elt_loc_list *l;
+ if (depth == 128)
+ return 0;
+
for (l = e->locs; l; l = l->next)
{
rtx t = l->loc;
if (REG_P (t) || MEM_P (t) || GET_CODE (t) == VALUE)
continue;
- else if (rtx_equal_for_cselib_1 (x, t, memmode))
+ else if (rtx_equal_for_cselib_1 (x, t, memmode, depth + 1))
return 1;
}
@@ -942,12 +948,12 @@ rtx_equal_for_cselib_1 (rtx x, rtx y, machine_mode memmode)
if (!xoff != !yoff)
return 0;
- if (xoff && !rtx_equal_for_cselib_1 (xoff, yoff, memmode))
+ if (xoff && !rtx_equal_for_cselib_1 (xoff, yoff, memmode, depth))
return 0;
/* Don't recurse if nothing changed. */
if (x != xorig || y != yorig)
- return rtx_equal_for_cselib_1 (x, y, memmode);
+ return rtx_equal_for_cselib_1 (x, y, memmode, depth);
return 0;
}
@@ -978,7 +984,8 @@ rtx_equal_for_cselib_1 (rtx x, rtx y, machine_mode memmode)
case MEM:
/* We have to compare any autoinc operations in the addresses
using this MEM's mode. */
- return rtx_equal_for_cselib_1 (XEXP (x, 0), XEXP (y, 0), GET_MODE (x));
+ return rtx_equal_for_cselib_1 (XEXP (x, 0), XEXP (y, 0), GET_MODE (x),
+ depth);
default:
break;
@@ -1013,17 +1020,20 @@ rtx_equal_for_cselib_1 (rtx x, rtx y, machine_mode memmode)
/* And the corresponding elements must match. */
for (j = 0; j < XVECLEN (x, i); j++)
if (! rtx_equal_for_cselib_1 (XVECEXP (x, i, j),
- XVECEXP (y, i, j), memmode))
+ XVECEXP (y, i, j), memmode, depth))
return 0;
break;
case 'e':
if (i == 1
&& targetm.commutative_p (x, UNKNOWN)
- && rtx_equal_for_cselib_1 (XEXP (x, 1), XEXP (y, 0), memmode)
- && rtx_equal_for_cselib_1 (XEXP (x, 0), XEXP (y, 1), memmode))
+ && rtx_equal_for_cselib_1 (XEXP (x, 1), XEXP (y, 0), memmode,
+ depth)
+ && rtx_equal_for_cselib_1 (XEXP (x, 0), XEXP (y, 1), memmode,
+ depth))
return 1;
- if (! rtx_equal_for_cselib_1 (XEXP (x, i), XEXP (y, i), memmode))
+ if (! rtx_equal_for_cselib_1 (XEXP (x, i), XEXP (y, i), memmode,
+ depth))
return 0;
break;
diff --git a/gcc/diagnostic.c b/gcc/diagnostic.c
index c43162269ec..1c3815c9f3d 100644
--- a/gcc/diagnostic.c
+++ b/gcc/diagnostic.c
@@ -41,8 +41,6 @@ along with GCC; see the file COPYING3. If not see
# include <sys/ioctl.h>
#endif
-#include <new> // For placement new.
-
#define pedantic_warning_kind(DC) \
((DC)->pedantic_errors ? DK_ERROR : DK_WARNING)
#define permissive_error_kind(DC) ((DC)->permissive ? DK_WARNING : DK_ERROR)
diff --git a/gcc/doc/extend.texi b/gcc/doc/extend.texi
index 61b2d163321..7186221de02 100644
--- a/gcc/doc/extend.texi
+++ b/gcc/doc/extend.texi
@@ -17905,7 +17905,7 @@ unsigned long long _pext_u64 (unsigned long long, unsigned long long)
The following built-in functions are available when @option{-mlzcnt} is used.
All of them generate the machine instruction that is part of the name.
@smallexample
-unsigned short __builtin_ia32_lzcnt_16(unsigned short);
+unsigned short __builtin_ia32_lzcnt_u16(unsigned short);
unsigned int __builtin_ia32_lzcnt_u32(unsigned int);
unsigned long long __builtin_ia32_lzcnt_u64 (unsigned long long);
@end smallexample
diff --git a/gcc/doc/gcov-dump.texi b/gcc/doc/gcov-dump.texi
index d7931fd3a19..26653d28def 100644
--- a/gcc/doc/gcov-dump.texi
+++ b/gcc/doc/gcov-dump.texi
@@ -72,11 +72,6 @@ gcov-dump [@option{-v}|@option{--version}]
Display help about using @command{gcov-dump} (on the standard output), and
exit without doing any further processing.
-@item -v
-@itemx --version
-Display the @command{gcov-dump} version number (on the standard output),
-and exit without doing any further processing.
-
@item -l
@itemx --long
Dump content of records.
@@ -85,6 +80,11 @@ Dump content of records.
@itemx --positions
Dump positions of records.
+@item -v
+@itemx --version
+Display the @command{gcov-dump} version number (on the standard output),
+and exit without doing any further processing.
+
@item -w
@itemx --working-sets
Dump working set computed from summary.
diff --git a/gcc/doc/gcov-tool.texi b/gcc/doc/gcov-tool.texi
index 6f3f6b4a76d..65a647bd818 100644
--- a/gcc/doc/gcov-tool.texi
+++ b/gcc/doc/gcov-tool.texi
@@ -113,23 +113,23 @@ gcov-tool @r{[}@var{global-options}@r{]} SUB_COMMAND @r{[}@var{sub_command-optio
gcov-tool [@option{-v}|@option{--version}] [@option{-h}|@option{--help}]
gcov-tool merge [merge-options] @var{directory1} @var{directory2}
+ [@option{-o}|@option{--output} @var{directory}]
[@option{-v}|@option{--verbose}]
- [@option{-o}|@option{ --output} @var{directory}]
[@option{-w}|@option{--weight} @var{w1,w2}]
gcov-tool rewrite [rewrite-options] @var{directory}
- [@option{-v}|@option{--verbose}]
+ [@option{-n}|@option{--normalize} @var{long_long_value}]
[@option{-o}|@option{--output} @var{directory}]
[@option{-s}|@option{--scale} @var{float_or_simple-frac_value}]
- [@option{-n}|@option{--normalize} @var{long_long_value}]
+ [@option{-v}|@option{--verbose}]
gcov-tool overlap [overlap-options] @var{directory1} @var{directory2}
- [@option{-v}|@option{--verbose}]
- [@option{-h}|@option{--hotonly}]
[@option{-f}|@option{--function}]
[@option{-F}|@option{--fullname}]
+ [@option{-h}|@option{--hotonly}]
[@option{-o}|@option{--object}]
[@option{-t}|@option{--hot_threshold}] @var{float}
+ [@option{-v}|@option{--verbose}]
@c man end
@c man begin SEEALSO
@@ -152,17 +152,17 @@ and exit without doing any further processing.
@item merge
Merge two profile directories.
-
@table @gcctabopt
-@item -v
-@itemx --verbose
-Set the verbose mode.
@item -o @var{directory}
@itemx --output @var{directory}
Set the output profile directory. Default output directory name is
@var{merged_profile}.
+@item -v
+@itemx --verbose
+Set the verbose mode.
+
@item -w @var{w1},@var{w2}
@itemx --weight @var{w1},@var{w2}
Set the merge weights of the @var{directory1} and @var{directory2},
@@ -171,11 +171,12 @@ respectively. The default weights are 1 for both.
@item rewrite
Read the specified profile directory and rewrite to a new directory.
-
@table @gcctabopt
-@item -v
-@itemx --verbose
-Set the verbose mode.
+
+@item -n @var{long_long_value}
+@itemx --normalize <long_long_value>
+Normalize the profile. The specified value is the max counter value
+in the new profile.
@item -o @var{directory}
@itemx --output @var{directory}
@@ -186,10 +187,9 @@ Set the output profile directory. Default output name is @var{rewrite_profile}.
Scale the profile counters. The specified value can be in floating point value,
or simple fraction value form, such 1, 2, 2/3, and 5/3.
-@item -n @var{long_long_value}
-@itemx --normalize <long_long_value>
-Normalize the profile. The specified value is the max counter value
-in the new profile.
+@item -v
+@itemx --verbose
+Set the verbose mode.
@end table
@item overlap
@@ -201,14 +201,6 @@ matched counters and p1_sum_all and p2_sum_all are the sum of counter
values in profile 1 and profile 2, respectively.
@table @gcctabopt
-@item -v
-@itemx --verbose
-Set the verbose mode.
-
-@item -h
-@itemx --hotonly
-Only print info for hot objects/functions.
-
@item -f
@itemx --function
Print function level overlap score.
@@ -217,6 +209,10 @@ Print function level overlap score.
@itemx --fullname
Print full gcda filename.
+@item -h
+@itemx --hotonly
+Only print info for hot objects/functions.
+
@item -o
@itemx --object
Print object level overlap score.
@@ -224,6 +220,10 @@ Print object level overlap score.
@item -t @var{float}
@itemx --hot_threshold <float>
Set the threshold for hot counter value.
+
+@item -v
+@itemx --verbose
+Set the verbose mode.
@end table
@end table
diff --git a/gcc/doc/gcov.texi b/gcc/doc/gcov.texi
index dba36e0b972..12586b7e8d0 100644
--- a/gcc/doc/gcov.texi
+++ b/gcc/doc/gcov.texi
@@ -142,15 +142,6 @@ gpl(7), gfdl(7), fsf-funding(7), gcc(1) and the Info entry for @file{gcc}.
@c man begin OPTIONS
@table @gcctabopt
-@item -h
-@itemx --help
-Display help about using @command{gcov} (on the standard output), and
-exit without doing any further processing.
-
-@item -v
-@itemx --version
-Display the @command{gcov} version number (on the standard output),
-and exit without doing any further processing.
@item -a
@itemx --all-blocks
@@ -171,68 +162,18 @@ be shown, unless the @option{-u} option is given.
Write branch frequencies as the number of branches taken, rather than
the percentage of branches taken.
-@item -n
-@itemx --no-output
-Do not create the @command{gcov} output file.
-
-@item -l
-@itemx --long-file-names
-Create long file names for included source files. For example, if the
-header file @file{x.h} contains code, and was included in the file
-@file{a.c}, then running @command{gcov} on the file @file{a.c} will
-produce an output file called @file{a.c##x.h.gcov} instead of
-@file{x.h.gcov}. This can be useful if @file{x.h} is included in
-multiple source files and you want to see the individual
-contributions. If you use the @samp{-p} option, both the including
-and included file names will be complete path names.
-
-@item -p
-@itemx --preserve-paths
-Preserve complete path information in the names of generated
-@file{.gcov} files. Without this option, just the filename component is
-used. With this option, all directories are used, with @samp{/} characters
-translated to @samp{#} characters, @file{.} directory components
-removed and unremoveable @file{..}
-components renamed to @samp{^}. This is useful if sourcefiles are in several
-different directories.
-
-@item -r
-@itemx --relative-only
-Only output information about source files with a relative pathname
-(after source prefix elision). Absolute paths are usually system
-header files and coverage of any inline functions therein is normally
-uninteresting.
+@item -d
+@itemx --display-progress
+Display the progress on the standard output.
@item -f
@itemx --function-summaries
Output summaries for each function in addition to the file level summary.
-@item -o @var{directory|file}
-@itemx --object-directory @var{directory}
-@itemx --object-file @var{file}
-Specify either the directory containing the gcov data files, or the
-object path name. The @file{.gcno}, and
-@file{.gcda} data files are searched for using this option. If a directory
-is specified, the data files are in that directory and named after the
-input file name, without its extension. If a file is specified here,
-the data files are named after that file, without its extension.
-
-@item -s @var{directory}
-@itemx --source-prefix @var{directory}
-A prefix for source file names to remove when generating the output
-coverage files. This option is useful when building in a separate
-directory, and the pathname to the source directory is not wanted when
-determining the output file names. Note that this prefix detection is
-applied before determining whether the source file is absolute.
-
-@item -u
-@itemx --unconditional-branches
-When branch probabilities are given, include those of unconditional branches.
-Unconditional branches are normally not interesting.
-
-@item -d
-@itemx --display-progress
-Display the progress on the standard output.
+@item -h
+@itemx --help
+Display help about using @command{gcov} (on the standard output), and
+exit without doing any further processing.
@item -i
@itemx --intermediate-format
@@ -273,11 +214,85 @@ lcount:26,1
branch:28,nottaken
@end smallexample
+@item -l
+@itemx --long-file-names
+Create long file names for included source files. For example, if the
+header file @file{x.h} contains code, and was included in the file
+@file{a.c}, then running @command{gcov} on the file @file{a.c} will
+produce an output file called @file{a.c##x.h.gcov} instead of
+@file{x.h.gcov}. This can be useful if @file{x.h} is included in
+multiple source files and you want to see the individual
+contributions. If you use the @samp{-p} option, both the including
+and included file names will be complete path names.
+
@item -m
@itemx --demangled-names
Display demangled function names in output. The default is to show
mangled function names.
+@item -n
+@itemx --no-output
+Do not create the @command{gcov} output file.
+
+@item -o @var{directory|file}
+@itemx --object-directory @var{directory}
+@itemx --object-file @var{file}
+Specify either the directory containing the gcov data files, or the
+object path name. The @file{.gcno}, and
+@file{.gcda} data files are searched for using this option. If a directory
+is specified, the data files are in that directory and named after the
+input file name, without its extension. If a file is specified here,
+the data files are named after that file, without its extension.
+
+@item -p
+@itemx --preserve-paths
+Preserve complete path information in the names of generated
+@file{.gcov} files. Without this option, just the filename component is
+used. With this option, all directories are used, with @samp{/} characters
+translated to @samp{#} characters, @file{.} directory components
+removed and unremoveable @file{..}
+components renamed to @samp{^}. This is useful if sourcefiles are in several
+different directories.
+
+@item -r
+@itemx --relative-only
+Only output information about source files with a relative pathname
+(after source prefix elision). Absolute paths are usually system
+header files and coverage of any inline functions therein is normally
+uninteresting.
+
+@item -s @var{directory}
+@itemx --source-prefix @var{directory}
+A prefix for source file names to remove when generating the output
+coverage files. This option is useful when building in a separate
+directory, and the pathname to the source directory is not wanted when
+determining the output file names. Note that this prefix detection is
+applied before determining whether the source file is absolute.
+
+@item -u
+@itemx --unconditional-branches
+When branch probabilities are given, include those of unconditional branches.
+Unconditional branches are normally not interesting.
+
+@item -v
+@itemx --version
+Display the @command{gcov} version number (on the standard output),
+and exit without doing any further processing.
+
+@item -w
+@itemx --verbose
+Print verbose informations related to basic blocks and arcs.
+
+@item -x
+@itemx --hash-filenames
+By default, gcov uses the full pathname of the source files to to create
+an output filename. This can lead to long filenames that can overflow
+filesystem limits. This option creates names of the form
+@file{@var{source-file}##@var{md5}.gcov},
+where the @var{source-file} component is the final filename part and
+the @var{md5} component is calculated from the full mangled name that
+would have been used otherwise.
+
@end table
@command{gcov} should be run with the current directory the same as that
@@ -308,7 +323,9 @@ command line option. The @var{execution_count} is @samp{-} for lines
containing no code. Unexecuted lines are marked @samp{#####} or
@samp{====}, depending on whether they are reachable by
non-exceptional paths or only exceptional paths such as C++ exception
-handlers, respectively.
+handlers, respectively. Given @samp{-a} option, unexecuted blocks are
+marked @samp{$$$$$} or @samp{%%%%%}, depending on whether a basic block
+is reachable via non-exceptional or exceptional paths.
Some lines of information at the start have @var{line_number} of zero.
These preamble lines are of the form
@@ -653,5 +670,5 @@ it. This can be overcome by, for example, setting the environment as
setting will name the data file @file{/target/run/build/foo.gcda}.
You must move the data files to the expected directory tree in order to
-use them for profile directed optimizations (@option{--use-profile}), or to
+use them for profile directed optimizations (@option{-fprofile-use}), or to
use the @command{gcov} tool.
diff --git a/gcc/doc/install.texi b/gcc/doc/install.texi
index 4a2667a826e..1559cbc67c8 100644
--- a/gcc/doc/install.texi
+++ b/gcc/doc/install.texi
@@ -1060,6 +1060,11 @@ and for cross builds configured with @option{--with-sysroot}, and without
More documentation about multiarch can be found at
@uref{http://wiki.debian.org/Multiarch}.
+@item --enable-sjlj-exceptions
+Force use of the @code{setjmp}/@code{longjmp}-based scheme for exceptions.
+@samp{configure} ordinarily picks the correct value based on the platform.
+Only use this option if you are sure you need a different setting.
+
@item --enable-vtable-verify
Specify whether to enable or disable the vtable verification feature.
Enabling this feature causes libstdc++ to be built with its virtual calls
@@ -2232,11 +2237,6 @@ file to compile into a @file{.class} file.
@item --with-libiconv-prefix=DIR
Search for libiconv in @file{DIR/include} and @file{DIR/lib}.
-@item --enable-sjlj-exceptions
-Force use of the @code{setjmp}/@code{longjmp}-based scheme for exceptions.
-@samp{configure} ordinarily picks the correct value based on the platform.
-Only use this option if you are sure you need a different setting.
-
@item --with-system-zlib
Use installed @samp{zlib} rather than that included with GCC@.
diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
index 6ed72f4b15d..a9c092c5f0d 100644
--- a/gcc/doc/invoke.texi
+++ b/gcc/doc/invoke.texi
@@ -575,7 +575,8 @@ Objective-C and Objective-C++ Dialects}.
@emph{AVR Options}
@gccoptlist{-mmcu=@var{mcu} -maccumulate-args -mbranch-cost=@var{cost} @gol
-mcall-prologues -mint8 -mn_flash=@var{size} -mno-interrupts @gol
--mrelax -mrmw -mstrict-X -mtiny-stack -nodevicelib -Waddr-space-convert}
+-mrelax -mrmw -mstrict-X -mtiny-stack -nodevicelib -Waddr-space-convert @gol
+-Wmisspelled-isr}
@emph{Blackfin Options}
@gccoptlist{-mcpu=@var{cpu}@r{[}-@var{sirevision}@r{]} @gol
@@ -13719,12 +13720,17 @@ Only change the lower 8@tie{}bits of the stack pointer.
@item -nodevicelib
@opindex nodevicelib
-Don't link against AVR-LibC's device specific library @code{libdev.a}.
+Don't link against AVR-LibC's device specific library @code{lib<mcu>.a}.
@item -Waddr-space-convert
@opindex Waddr-space-convert
Warn about conversions between address spaces in the case where the
resulting address space is not contained in the incoming address space.
+
+@item -Wmisspelled-isr
+@opindex Wmisspelled-isr
+Warn if the ISR is misspelled, i.e. without @code{__vector} prefix.
+Enabled by default.
@end table
@subsubsection @code{EIND} and Devices with More Than 128 Ki Bytes of Flash
diff --git a/gcc/doc/lto.texi b/gcc/doc/lto.texi
index 4c285dd1d98..7cb75a71643 100644
--- a/gcc/doc/lto.texi
+++ b/gcc/doc/lto.texi
@@ -43,7 +43,7 @@ existing build systems, as one can, for instance, produce archives of
the files. Additionally, one might be able to ship one set of fat
objects which could be used both for development and the production of
optimized builds. A, perhaps surprising, side effect of this feature
-is that any mistake in the toolchain that leads to LTO information not
+is that any mistake in the toolchain leads to LTO information not
being used (e.g.@: an older @code{libtool} calling @code{ld} directly).
This is both an advantage, as the system is more robust, and a
disadvantage, as the user is not informed that the optimization has
diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c
index 6808cc15919..4727859c4d8 100644
--- a/gcc/dwarf2out.c
+++ b/gcc/dwarf2out.c
@@ -10817,7 +10817,8 @@ modified_type_die (tree type, int cv_quals, dw_die_ref context_die)
copy was created to help us keep track of typedef names) and
that copy might have a different TYPE_UID from the original
..._TYPE node. */
- if (TREE_CODE (type) != VECTOR_TYPE)
+ if (TREE_CODE (type) != VECTOR_TYPE
+ && TREE_CODE (type) != ARRAY_TYPE)
return lookup_type_die (type_main_variant (type));
else
/* Vectors have the debugging information in the type,
diff --git a/gcc/expmed.c b/gcc/expmed.c
index eda2cd3b366..3ab9ec2353c 100644
--- a/gcc/expmed.c
+++ b/gcc/expmed.c
@@ -3904,11 +3904,10 @@ expand_divmod (int rem_flag, enum tree_code code, machine_mode mode,
op1_is_constant = CONST_INT_P (op1);
if (op1_is_constant)
{
- unsigned HOST_WIDE_INT ext_op1 = UINTVAL (op1);
- if (unsignedp)
- ext_op1 &= GET_MODE_MASK (mode);
- op1_is_pow2 = ((EXACT_POWER_OF_2_OR_ZERO_P (ext_op1)
- || (! unsignedp && EXACT_POWER_OF_2_OR_ZERO_P (-ext_op1))));
+ wide_int ext_op1 = rtx_mode_t (op1, mode);
+ op1_is_pow2 = (wi::popcount (ext_op1) == 1
+ || (! unsignedp
+ && wi::popcount (wi::neg (ext_op1)) == 1));
}
/*
@@ -3989,11 +3988,10 @@ expand_divmod (int rem_flag, enum tree_code code, machine_mode mode,
not straightforward to generalize this. Maybe we should make an array
of possible modes in init_expmed? Save this for GCC 2.7. */
- optab1 = ((op1_is_pow2 && op1 != const0_rtx)
+ optab1 = (op1_is_pow2
? (unsignedp ? lshr_optab : ashr_optab)
: (unsignedp ? udiv_optab : sdiv_optab));
- optab2 = ((op1_is_pow2 && op1 != const0_rtx)
- ? optab1
+ optab2 = (op1_is_pow2 ? optab1
: (unsignedp ? udivmod_optab : sdivmod_optab));
for (compute_mode = mode; compute_mode != VOIDmode;
@@ -4049,10 +4047,15 @@ expand_divmod (int rem_flag, enum tree_code code, machine_mode mode,
/* convert_modes may have placed op1 into a register, so we
must recompute the following. */
op1_is_constant = CONST_INT_P (op1);
- op1_is_pow2 = (op1_is_constant
- && ((EXACT_POWER_OF_2_OR_ZERO_P (INTVAL (op1))
- || (! unsignedp
- && EXACT_POWER_OF_2_OR_ZERO_P (-UINTVAL (op1))))));
+ if (op1_is_constant)
+ {
+ wide_int ext_op1 = rtx_mode_t (op1, compute_mode);
+ op1_is_pow2 = (wi::popcount (ext_op1) == 1
+ || (! unsignedp
+ && wi::popcount (wi::neg (ext_op1)) == 1));
+ }
+ else
+ op1_is_pow2 = 0;
}
/* If one of the operands is a volatile MEM, copy it into a register. */
@@ -4092,10 +4095,10 @@ expand_divmod (int rem_flag, enum tree_code code, machine_mode mode,
unsigned HOST_WIDE_INT mh, ml;
int pre_shift, post_shift;
int dummy;
- unsigned HOST_WIDE_INT d = (INTVAL (op1)
- & GET_MODE_MASK (compute_mode));
+ wide_int wd = rtx_mode_t (op1, compute_mode);
+ unsigned HOST_WIDE_INT d = wd.to_uhwi ();
- if (EXACT_POWER_OF_2_OR_ZERO_P (d))
+ if (wi::popcount (wd) == 1)
{
pre_shift = floor_log2 (d);
if (rem_flag)
@@ -4235,7 +4238,7 @@ expand_divmod (int rem_flag, enum tree_code code, machine_mode mode,
else if (d == -1)
quotient = expand_unop (compute_mode, neg_optab, op0,
tquotient, 0);
- else if (HOST_BITS_PER_WIDE_INT >= size
+ else if (size <= HOST_BITS_PER_WIDE_INT
&& abs_d == (unsigned HOST_WIDE_INT) 1 << (size - 1))
{
/* This case is not handled correctly below. */
@@ -4245,6 +4248,7 @@ expand_divmod (int rem_flag, enum tree_code code, machine_mode mode,
goto fail1;
}
else if (EXACT_POWER_OF_2_OR_ZERO_P (d)
+ && (size <= HOST_BITS_PER_WIDE_INT || d >= 0)
&& (rem_flag
? smod_pow2_cheap (speed, compute_mode)
: sdiv_pow2_cheap (speed, compute_mode))
@@ -4258,7 +4262,9 @@ expand_divmod (int rem_flag, enum tree_code code, machine_mode mode,
compute_mode)
!= CODE_FOR_nothing)))
;
- else if (EXACT_POWER_OF_2_OR_ZERO_P (abs_d))
+ else if (EXACT_POWER_OF_2_OR_ZERO_P (abs_d)
+ && (size <= HOST_BITS_PER_WIDE_INT
+ || abs_d != (unsigned HOST_WIDE_INT) d))
{
if (rem_flag)
{
@@ -4393,7 +4399,7 @@ expand_divmod (int rem_flag, enum tree_code code, machine_mode mode,
case FLOOR_DIV_EXPR:
case FLOOR_MOD_EXPR:
/* We will come here only for signed operations. */
- if (op1_is_constant && HOST_BITS_PER_WIDE_INT >= size)
+ if (op1_is_constant && size <= HOST_BITS_PER_WIDE_INT)
{
unsigned HOST_WIDE_INT mh, ml;
int pre_shift, lgup, post_shift;
@@ -4462,9 +4468,8 @@ expand_divmod (int rem_flag, enum tree_code code, machine_mode mode,
op0, constm1_rtx), NULL_RTX);
t2 = expand_binop (compute_mode, ior_optab, op0, t1, NULL_RTX,
0, OPTAB_WIDEN);
- nsign = expand_shift
- (RSHIFT_EXPR, compute_mode, t2,
- size - 1, NULL_RTX, 0);
+ nsign = expand_shift (RSHIFT_EXPR, compute_mode, t2,
+ size - 1, NULL_RTX, 0);
t3 = force_operand (gen_rtx_MINUS (compute_mode, t1, nsign),
NULL_RTX);
t4 = expand_divmod (0, TRUNC_DIV_EXPR, compute_mode, t3, op1,
@@ -4573,7 +4578,10 @@ expand_divmod (int rem_flag, enum tree_code code, machine_mode mode,
case CEIL_MOD_EXPR:
if (unsignedp)
{
- if (op1_is_constant && EXACT_POWER_OF_2_OR_ZERO_P (INTVAL (op1)))
+ if (op1_is_constant
+ && EXACT_POWER_OF_2_OR_ZERO_P (INTVAL (op1))
+ && (size <= HOST_BITS_PER_WIDE_INT
+ || INTVAL (op1) >= 0))
{
rtx t1, t2, t3;
unsigned HOST_WIDE_INT d = INTVAL (op1);
@@ -4786,7 +4794,7 @@ expand_divmod (int rem_flag, enum tree_code code, machine_mode mode,
break;
case EXACT_DIV_EXPR:
- if (op1_is_constant && HOST_BITS_PER_WIDE_INT >= size)
+ if (op1_is_constant && size <= HOST_BITS_PER_WIDE_INT)
{
HOST_WIDE_INT d = INTVAL (op1);
unsigned HOST_WIDE_INT ml;
diff --git a/gcc/expr.c b/gcc/expr.c
index 25725138785..6bc39bfc418 100644
--- a/gcc/expr.c
+++ b/gcc/expr.c
@@ -8844,6 +8844,18 @@ expand_expr_real_2 (sepops ops, rtx target, machine_mode tmode,
if (temp != 0)
return temp;
+ /* For vector MIN <x, y>, expand it a VEC_COND_EXPR <x <= y, x, y>
+ and similarly for MAX <x, y>. */
+ if (VECTOR_TYPE_P (type))
+ {
+ tree t0 = make_tree (type, op0);
+ tree t1 = make_tree (type, op1);
+ tree comparison = build2 (code == MIN_EXPR ? LE_EXPR : GE_EXPR,
+ type, t0, t1);
+ return expand_vec_cond_expr (type, comparison, t0, t1,
+ original_target);
+ }
+
/* At this point, a MEM target is no longer useful; we will get better
code without it. */
@@ -10300,8 +10312,36 @@ expand_expr_real_1 (tree exp, rtx target, machine_mode tmode,
if (GET_CODE (op0) == CONCAT && !must_force_mem)
{
if (bitpos == 0
- && bitsize == GET_MODE_BITSIZE (GET_MODE (op0)))
- return op0;
+ && bitsize == GET_MODE_BITSIZE (GET_MODE (op0))
+ && COMPLEX_MODE_P (mode1)
+ && COMPLEX_MODE_P (GET_MODE (op0))
+ && (GET_MODE_PRECISION (GET_MODE_INNER (mode1))
+ == GET_MODE_PRECISION (GET_MODE_INNER (GET_MODE (op0)))))
+ {
+ if (mode1 != GET_MODE (op0))
+ {
+ rtx parts[2];
+ for (int i = 0; i < 2; i++)
+ {
+ rtx op = read_complex_part (op0, i != 0);
+ if (GET_CODE (op) == SUBREG)
+ op = force_reg (GET_MODE (op), op);
+ rtx temp = gen_lowpart_common (GET_MODE_INNER (mode1),
+ op);
+ if (temp)
+ op = temp;
+ else
+ {
+ if (!REG_P (op) && !MEM_P (op))
+ op = force_reg (GET_MODE (op), op);
+ op = gen_lowpart (GET_MODE_INNER (mode1), op);
+ }
+ parts[i] = op;
+ }
+ op0 = gen_rtx_CONCAT (mode1, parts[0], parts[1]);
+ }
+ return op0;
+ }
if (bitpos == 0
&& bitsize == GET_MODE_BITSIZE (GET_MODE (XEXP (op0, 0)))
&& bitsize)
diff --git a/gcc/fold-const.c b/gcc/fold-const.c
index 7a14633ba3d..562a0b56de0 100644
--- a/gcc/fold-const.c
+++ b/gcc/fold-const.c
@@ -8162,8 +8162,13 @@ fold_unary_loc (location_t loc, enum tree_code code, tree type, tree op0)
case VIEW_CONVERT_EXPR:
if (TREE_CODE (op0) == MEM_REF)
- return fold_build2_loc (loc, MEM_REF, type,
- TREE_OPERAND (op0, 0), TREE_OPERAND (op0, 1));
+ {
+ if (TYPE_ALIGN (TREE_TYPE (op0)) != TYPE_ALIGN (type))
+ type = build_aligned_type (type, TYPE_ALIGN (TREE_TYPE (op0)));
+ tem = fold_build2_loc (loc, MEM_REF, type,
+ TREE_OPERAND (op0, 0), TREE_OPERAND (op0, 1));
+ return tem;
+ }
return NULL_TREE;
@@ -10584,13 +10589,12 @@ fold_binary_loc (location_t loc,
}
/* (-A) - B -> (-B) - A where B is easily negated and we can swap. */
if (TREE_CODE (arg0) == NEGATE_EXPR
- && negate_expr_p (arg1)
+ && negate_expr_p (op1)
&& reorder_operands_p (arg0, arg1))
return fold_build2_loc (loc, MINUS_EXPR, type,
- fold_convert_loc (loc, type,
- negate_expr (arg1)),
- fold_convert_loc (loc, type,
- TREE_OPERAND (arg0, 0)));
+ negate_expr (op1),
+ fold_convert_loc (loc, type,
+ TREE_OPERAND (arg0, 0)));
/* X - (X / Y) * Y is X % Y. */
if ((INTEGRAL_TYPE_P (type) || VECTOR_INTEGER_TYPE_P (type))
@@ -10689,17 +10693,16 @@ fold_binary_loc (location_t loc,
}
/* A - B -> A + (-B) if B is easily negatable. */
- if (negate_expr_p (arg1)
- && !TYPE_OVERFLOW_SANITIZED (type)
+ if (negate_expr_p (op1)
+ && ! TYPE_OVERFLOW_SANITIZED (type)
&& ((FLOAT_TYPE_P (type)
/* Avoid this transformation if B is a positive REAL_CST. */
- && (TREE_CODE (arg1) != REAL_CST
- || REAL_VALUE_NEGATIVE (TREE_REAL_CST (arg1))))
+ && (TREE_CODE (op1) != REAL_CST
+ || REAL_VALUE_NEGATIVE (TREE_REAL_CST (op1))))
|| INTEGRAL_TYPE_P (type)))
return fold_build2_loc (loc, PLUS_EXPR, type,
- fold_convert_loc (loc, type, arg0),
- fold_convert_loc (loc, type,
- negate_expr (arg1)));
+ fold_convert_loc (loc, type, arg0),
+ negate_expr (op1));
/* Try folding difference of addresses. */
{
@@ -10767,15 +10770,14 @@ fold_binary_loc (location_t loc,
if (! FLOAT_TYPE_P (type))
{
/* Transform x * -C into -x * C if x is easily negatable. */
- if (TREE_CODE (arg1) == INTEGER_CST
- && tree_int_cst_sgn (arg1) == -1
- && negate_expr_p (arg0)
- && (tem = negate_expr (arg1)) != arg1
- && !TREE_OVERFLOW (tem))
+ if (TREE_CODE (op1) == INTEGER_CST
+ && tree_int_cst_sgn (op1) == -1
+ && negate_expr_p (op0)
+ && (tem = negate_expr (op1)) != op1
+ && ! TREE_OVERFLOW (tem))
return fold_build2_loc (loc, MULT_EXPR, type,
- fold_convert_loc (loc, type,
- negate_expr (arg0)),
- tem);
+ fold_convert_loc (loc, type,
+ negate_expr (op0)), tem);
/* (a * (1 << b)) is (a << b) */
if (TREE_CODE (arg1) == LSHIFT_EXPR
@@ -11950,8 +11952,8 @@ fold_binary_loc (location_t loc,
/* Convert -A / -B to A / B when the type is signed and overflow is
undefined. */
if ((!INTEGRAL_TYPE_P (type) || TYPE_OVERFLOW_UNDEFINED (type))
- && TREE_CODE (arg0) == NEGATE_EXPR
- && negate_expr_p (arg1))
+ && TREE_CODE (op0) == NEGATE_EXPR
+ && negate_expr_p (op1))
{
if (INTEGRAL_TYPE_P (type))
fold_overflow_warning (("assuming signed overflow does not occur "
@@ -11959,14 +11961,13 @@ fold_binary_loc (location_t loc,
"division"),
WARN_STRICT_OVERFLOW_MISC);
return fold_build2_loc (loc, code, type,
- fold_convert_loc (loc, type,
- TREE_OPERAND (arg0, 0)),
- fold_convert_loc (loc, type,
- negate_expr (arg1)));
+ fold_convert_loc (loc, type,
+ TREE_OPERAND (arg0, 0)),
+ negate_expr (op1));
}
if ((!INTEGRAL_TYPE_P (type) || TYPE_OVERFLOW_UNDEFINED (type))
- && TREE_CODE (arg1) == NEGATE_EXPR
- && negate_expr_p (arg0))
+ && TREE_CODE (op1) == NEGATE_EXPR
+ && negate_expr_p (op0))
{
if (INTEGRAL_TYPE_P (type))
fold_overflow_warning (("assuming signed overflow does not occur "
@@ -11974,10 +11975,9 @@ fold_binary_loc (location_t loc,
"division"),
WARN_STRICT_OVERFLOW_MISC);
return fold_build2_loc (loc, code, type,
- fold_convert_loc (loc, type,
- negate_expr (arg0)),
- fold_convert_loc (loc, type,
- TREE_OPERAND (arg1, 0)));
+ negate_expr (op0),
+ fold_convert_loc (loc, type,
+ TREE_OPERAND (arg1, 0)));
}
/* If arg0 is a multiple of arg1, then rewrite to the fastest div
diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog
index b3f4403ba9c..5ad7e89e297 100644
--- a/gcc/fortran/ChangeLog
+++ b/gcc/fortran/ChangeLog
@@ -1,3 +1,55 @@
+2017-10-10 Release Manager
+
+ * GCC 5.5.0 released.
+
+2017-09-02 Janus Weil <janus@gcc.gnu.org>
+
+ Backport from trunk
+ PR fortran/81770
+ * expr.c (gfc_check_pointer_assign): Improve the check whether pointer
+ may outlive pointer target.
+
+2017-06-09 Janus Weil <janus@gcc.gnu.org>
+
+ Backport from trunk
+ PR fortran/70601
+ * trans-expr.c (gfc_conv_procedure_call): Fix detection of allocatable
+ function results.
+
+2017-05-30 Jakub Jelinek <jakub@redhat.com>
+
+ Backported from mainline
+ 2016-12-21 Jakub Jelinek <jakub@redhat.com>
+
+ PR fortran/78866
+ * openmp.c (resolve_omp_clauses): Diagnose assumed size arrays in
+ OpenMP map, to and from clauses.
+ * trans-openmp.c: Include diagnostic-core.h, temporarily redefining
+ GCC_DIAG_STYLE to __gcc_tdiag__.
+ (gfc_omp_finish_clause): Diagnose implicitly mapped assumed size
+ arrays.
+
+ 2016-09-27 Jakub Jelinek <jakub@redhat.com>
+
+ PR fortran/77666
+ * trans-openmp.c (gfc_omp_private_outer_ref): Return true even for
+ references to allocatable arrays.
+
+ 2016-09-08 Jakub Jelinek <jakub@redhat.com>
+
+ PR fortran/77500
+ * trans-openmp.c (gfc_trans_omp_atomic): For atomic write or
+ swap, don't try to look through GFC_ISYM_CONVERSION. In other cases,
+ check that value.function.isym is non-NULL before dereferencing it.
+
+2017-05-10 Richard Biener <rguenther@suse.de>
+
+ Backport from mainline
+ 2017-03-06 Richard Biener <rguenther@suse.de>
+
+ PR fortran/79894
+ * trans.c (gfc_add_modify_loc): Weaken assert.
+
2017-05-01 Janus Weil <janus@gcc.gnu.org>
Backport from trunk
diff --git a/gcc/fortran/error.c b/gcc/fortran/error.c
index 18e127f8748..2f76de50c9e 100644
--- a/gcc/fortran/error.c
+++ b/gcc/fortran/error.c
@@ -34,8 +34,6 @@ along with GCC; see the file COPYING3. If not see
#include "diagnostic-color.h"
#include "tree-diagnostic.h" /* tree_diagnostics_defaults */
-#include <new> /* For placement-new */
-
static int suppress_errors = 0;
static bool warnings_not_errors = false;
diff --git a/gcc/fortran/expr.c b/gcc/fortran/expr.c
index fa928fe52c7..3744f43482f 100644
--- a/gcc/fortran/expr.c
+++ b/gcc/fortran/expr.c
@@ -3782,7 +3782,8 @@ gfc_check_pointer_assign (gfc_expr *lvalue, gfc_expr *rvalue)
if (warn_target_lifetime
&& rvalue->expr_type == EXPR_VARIABLE
&& !rvalue->symtree->n.sym->attr.save
- && !attr.pointer && !rvalue->symtree->n.sym->attr.host_assoc
+ && !rvalue->symtree->n.sym->attr.pointer && !attr.pointer
+ && !rvalue->symtree->n.sym->attr.host_assoc
&& !rvalue->symtree->n.sym->attr.in_common
&& !rvalue->symtree->n.sym->attr.use_assoc
&& !rvalue->symtree->n.sym->attr.dummy)
diff --git a/gcc/fortran/openmp.c b/gcc/fortran/openmp.c
index 21de6072cc2..42c465cc68e 100644
--- a/gcc/fortran/openmp.c
+++ b/gcc/fortran/openmp.c
@@ -3166,6 +3166,11 @@ resolve_omp_clauses (gfc_code *code, locus *where,
else
resolve_oacc_data_clauses (n->sym, *where, name);
}
+ else if (list != OMP_LIST_DEPEND
+ && n->sym->as
+ && n->sym->as->type == AS_ASSUMED_SIZE)
+ gfc_error ("Assumed size array %qs in %s clause at %L",
+ n->sym->name, name, where);
}
if (list != OMP_LIST_DEPEND)
diff --git a/gcc/fortran/trans-common.c b/gcc/fortran/trans-common.c
index f393419db5e..1ee744190d1 100644
--- a/gcc/fortran/trans-common.c
+++ b/gcc/fortran/trans-common.c
@@ -92,8 +92,8 @@ along with GCC; see the file COPYING3. If not see
is examined for still-unused equivalence conditions. We create a
block for each merged equivalence list. */
-#include <map>
#include "config.h"
+#define INCLUDE_MAP
#include "system.h"
#include "coretypes.h"
#include "tm.h"
diff --git a/gcc/fortran/trans-expr.c b/gcc/fortran/trans-expr.c
index 682fb0ec443..3e3955126b3 100644
--- a/gcc/fortran/trans-expr.c
+++ b/gcc/fortran/trans-expr.c
@@ -5855,7 +5855,7 @@ gfc_conv_procedure_call (gfc_se * se, gfc_symbol * sym,
after use. This necessitates the creation of a temporary to
hold the result to prevent duplicate calls. */
if (!byref && sym->ts.type != BT_CHARACTER
- && sym->attr.allocatable && !sym->attr.dimension)
+ && sym->attr.allocatable && !sym->attr.dimension && !comp)
{
tmp = gfc_create_var (TREE_TYPE (se->expr), NULL);
gfc_add_modify (&se->pre, tmp, se->expr);
diff --git a/gcc/fortran/trans-openmp.c b/gcc/fortran/trans-openmp.c
index 970cd406352..761712fde04 100644
--- a/gcc/fortran/trans-openmp.c
+++ b/gcc/fortran/trans-openmp.c
@@ -47,6 +47,11 @@ along with GCC; see the file COPYING3. If not see
#include "arith.h"
#include "omp-low.h"
#include "gomp-constants.h"
+#undef GCC_DIAG_STYLE
+#define GCC_DIAG_STYLE __gcc_tdiag__
+#include "diagnostic-core.h"
+#undef GCC_DIAG_STYLE
+#define GCC_DIAG_STYLE __gcc_gfc__
int ompws_flags;
@@ -217,6 +222,9 @@ gfc_omp_private_outer_ref (tree decl)
{
tree type = TREE_TYPE (decl);
+ if (gfc_omp_privatize_by_reference (decl))
+ type = TREE_TYPE (type);
+
if (GFC_DESCRIPTOR_TYPE_P (type)
&& GFC_TYPE_ARRAY_AKIND (type) == GFC_ARRAY_ALLOCATABLE)
return true;
@@ -224,9 +232,6 @@ gfc_omp_private_outer_ref (tree decl)
if (GFC_DECL_GET_SCALAR_ALLOCATABLE (decl))
return true;
- if (gfc_omp_privatize_by_reference (decl))
- type = TREE_TYPE (type);
-
if (gfc_has_alloc_comps (type, decl))
return true;
@@ -1038,6 +1043,21 @@ gfc_omp_finish_clause (tree c, gimple_seq *pre_p)
return;
tree decl = OMP_CLAUSE_DECL (c);
+
+ /* Assumed-size arrays can't be mapped implicitly, they have to be
+ mapped explicitly using array sections. */
+ if (TREE_CODE (decl) == PARM_DECL
+ && GFC_ARRAY_TYPE_P (TREE_TYPE (decl))
+ && GFC_TYPE_ARRAY_AKIND (TREE_TYPE (decl)) == GFC_ARRAY_UNKNOWN
+ && GFC_TYPE_ARRAY_UBOUND (TREE_TYPE (decl),
+ GFC_TYPE_ARRAY_RANK (TREE_TYPE (decl)) - 1)
+ == NULL)
+ {
+ error_at (OMP_CLAUSE_LOCATION (c),
+ "implicit mapping of assumed size array %qD", decl);
+ return;
+ }
+
tree c2 = NULL_TREE, c3 = NULL_TREE, c4 = NULL_TREE;
if (POINTER_TYPE_P (TREE_TYPE (decl)))
{
@@ -2792,7 +2812,11 @@ gfc_trans_omp_atomic (gfc_code *code)
gfc_start_block (&block);
expr2 = code->expr2;
- if (expr2->expr_type == EXPR_FUNCTION
+ if (((atomic_code->ext.omp_atomic & GFC_OMP_ATOMIC_MASK)
+ != GFC_OMP_ATOMIC_WRITE)
+ && (atomic_code->ext.omp_atomic & GFC_OMP_ATOMIC_SWAP) == 0
+ && expr2->expr_type == EXPR_FUNCTION
+ && expr2->value.function.isym
&& expr2->value.function.isym->id == GFC_ISYM_CONVERSION)
expr2 = expr2->value.function.actual->expr;
@@ -2831,6 +2855,7 @@ gfc_trans_omp_atomic (gfc_code *code)
var = code->expr1->symtree->n.sym;
expr2 = code->expr2;
if (expr2->expr_type == EXPR_FUNCTION
+ && expr2->value.function.isym
&& expr2->value.function.isym->id == GFC_ISYM_CONVERSION)
expr2 = expr2->value.function.actual->expr;
}
@@ -2888,6 +2913,7 @@ gfc_trans_omp_atomic (gfc_code *code)
}
e = expr2->value.op.op1;
if (e->expr_type == EXPR_FUNCTION
+ && e->value.function.isym
&& e->value.function.isym->id == GFC_ISYM_CONVERSION)
e = e->value.function.actual->expr;
if (e->expr_type == EXPR_VARIABLE
@@ -2901,6 +2927,7 @@ gfc_trans_omp_atomic (gfc_code *code)
{
e = expr2->value.op.op2;
if (e->expr_type == EXPR_FUNCTION
+ && e->value.function.isym
&& e->value.function.isym->id == GFC_ISYM_CONVERSION)
e = e->value.function.actual->expr;
gcc_assert (e->expr_type == EXPR_VARIABLE
@@ -3015,6 +3042,7 @@ gfc_trans_omp_atomic (gfc_code *code)
code = code->next;
expr2 = code->expr2;
if (expr2->expr_type == EXPR_FUNCTION
+ && expr2->value.function.isym
&& expr2->value.function.isym->id == GFC_ISYM_CONVERSION)
expr2 = expr2->value.function.actual->expr;
diff --git a/gcc/fortran/trans.c b/gcc/fortran/trans.c
index d52e0623e65..8bbbeec64f4 100644
--- a/gcc/fortran/trans.c
+++ b/gcc/fortran/trans.c
@@ -163,11 +163,11 @@ gfc_add_modify_loc (location_t loc, stmtblock_t * pblock, tree lhs, tree rhs)
tree t1, t2;
t1 = TREE_TYPE (rhs);
t2 = TREE_TYPE (lhs);
- /* Make sure that the types of the rhs and the lhs are the same
+ /* Make sure that the types of the rhs and the lhs are compatible
for scalar assignments. We should probably have something
similar for aggregates, but right now removing that check just
breaks everything. */
- gcc_assert (t1 == t2
+ gcc_assert (TYPE_MAIN_VARIANT (t1) == TYPE_MAIN_VARIANT (t2)
|| AGGREGATE_TYPE_P (TREE_TYPE (lhs)));
#endif
diff --git a/gcc/function.c b/gcc/function.c
index d22386b878d..a88f7e793a7 100644
--- a/gcc/function.c
+++ b/gcc/function.c
@@ -5962,13 +5962,19 @@ thread_prologue_and_epilogue_insns (void)
try_shrink_wrapping (&entry_edge, orig_entry_edge, &bb_flags, prologue_seq);
#endif
+ rtx_insn *split_prologue_insn = split_prologue_seq;
if (split_prologue_seq != NULL_RTX)
{
+ while (split_prologue_insn && !NONDEBUG_INSN_P (split_prologue_insn))
+ split_prologue_insn = NEXT_INSN (split_prologue_insn);
insert_insn_on_edge (split_prologue_seq, orig_entry_edge);
inserted = true;
}
+ rtx_insn *prologue_insn = prologue_seq;
if (prologue_seq != NULL_RTX)
{
+ while (prologue_insn && !NONDEBUG_INSN_P (prologue_insn))
+ prologue_insn = NEXT_INSN (prologue_insn);
insert_insn_on_edge (prologue_seq, entry_edge);
inserted = true;
}
@@ -6116,8 +6122,19 @@ epilogue_done:
commit_edge_insertions ();
/* Look for basic blocks within the prologue insns. */
+ if (split_prologue_insn
+ && BLOCK_FOR_INSN (split_prologue_insn) == NULL)
+ split_prologue_insn = NULL;
+ if (prologue_insn
+ && BLOCK_FOR_INSN (prologue_insn) == NULL)
+ prologue_insn = NULL;
blocks = sbitmap_alloc (last_basic_block_for_fn (cfun));
bitmap_clear (blocks);
+ if (split_prologue_insn)
+ bitmap_set_bit (blocks,
+ BLOCK_FOR_INSN (split_prologue_insn)->index);
+ if (prologue_insn)
+ bitmap_set_bit (blocks, BLOCK_FOR_INSN (prologue_insn)->index);
bitmap_set_bit (blocks, entry_edge->dest->index);
bitmap_set_bit (blocks, orig_entry_edge->dest->index);
find_many_sub_basic_blocks (blocks);
diff --git a/gcc/gcc.c b/gcc/gcc.c
index f21987f4d40..30051020e7f 100644
--- a/gcc/gcc.c
+++ b/gcc/gcc.c
@@ -4203,6 +4203,9 @@ process_command (unsigned int decoded_options_count,
output_file);
}
+ if (output_file != NULL && output_file[0] == '\0')
+ fatal_error (input_location, "output filename may not be empty");
+
/* If -save-temps=obj and -o name, create the prefix to use for %b.
Otherwise just make -save-temps=obj the same as -save-temps=cwd. */
if (save_temps_flag == SAVE_TEMPS_OBJ && save_temps_prefix != NULL)
diff --git a/gcc/gcov-dump.c b/gcc/gcov-dump.c
index 809ca63e5e4..d6ecd57b8a2 100644
--- a/gcc/gcov-dump.c
+++ b/gcc/gcov-dump.c
@@ -132,9 +132,9 @@ print_usage (void)
printf ("Usage: gcov-dump [OPTION] ... gcovfiles\n");
printf ("Print coverage file contents\n");
printf (" -h, --help Print this help\n");
- printf (" -v, --version Print version number\n");
printf (" -l, --long Dump record contents too\n");
printf (" -p, --positions Dump record positions\n");
+ printf (" -v, --version Print version number\n");
printf (" -w, --working-sets Dump working set computed from summary\n");
printf ("\nFor bug reporting instructions, please see:\n%s.\n",
bug_report_url);
diff --git a/gcc/gcov-io.c b/gcc/gcov-io.c
index cbd0a9f1471..9044aec6fe6 100644
--- a/gcc/gcov-io.c
+++ b/gcc/gcov-io.c
@@ -372,8 +372,12 @@ gcov_write_string (const char *string)
buffer = gcov_write_words (1 + alloc);
buffer[0] = alloc;
- buffer[alloc] = 0;
- memcpy (&buffer[1], string, length);
+
+ if (alloc > 0)
+ {
+ buffer[alloc] = 0; /* place nul terminators. */
+ memcpy (&buffer[1], string, length);
+ }
}
#endif
diff --git a/gcc/gcov-tool.c b/gcc/gcov-tool.c
index fd27d7c11ad..9865357b8c8 100644
--- a/gcc/gcov-tool.c
+++ b/gcc/gcov-tool.c
@@ -46,6 +46,7 @@ extern int gcov_profile_normalize (struct gcov_info*, gcov_type);
extern int gcov_profile_scale (struct gcov_info*, float, int, int);
extern struct gcov_info* gcov_read_profile_dir (const char*, int);
extern void gcov_do_dump (struct gcov_info *, int);
+extern const char *gcov_get_filename (struct gcov_info *list);
extern void gcov_set_verbose (void);
/* Set to verbose output mode. */
@@ -114,6 +115,14 @@ gcov_output_files (const char *out, struct gcov_info *profile)
if (ret)
fatal_error (input_location, "Cannot change directory to %s", out);
+ /* Verify that output file does not exist (either was removed by
+ unlink_profile_data or removed by user). */
+ const char *filename = gcov_get_filename (profile);
+
+ if (access (filename, F_OK) != -1)
+ fatal_error (input_location, "output file %s already exists in folder %s",
+ filename, out);
+
gcov_do_dump (profile, 0);
ret = chdir (pwd);
@@ -164,8 +173,8 @@ print_merge_usage_message (int error_p)
FILE *file = error_p ? stderr : stdout;
fnotice (file, " merge [options] <dir1> <dir2> Merge coverage file contents\n");
- fnotice (file, " -v, --verbose Verbose mode\n");
fnotice (file, " -o, --output <dir> Output directory\n");
+ fnotice (file, " -v, --verbose Verbose mode\n");
fnotice (file, " -w, --weight <w1,w2> Set weights (float point values)\n");
}
@@ -261,10 +270,11 @@ print_rewrite_usage_message (int error_p)
FILE *file = error_p ? stderr : stdout;
fnotice (file, " rewrite [options] <dir> Rewrite coverage file contents\n");
- fnotice (file, " -v, --verbose Verbose mode\n");
+ fnotice (file, " -n, --normalize <int64_t> Normalize the profile\n");
fnotice (file, " -o, --output <dir> Output directory\n");
fnotice (file, " -s, --scale <float or simple-frac> Scale the profile counters\n");
fnotice (file, " -n, --normalize <long long> Normalize the profile\n");
+ fnotice (file, " -v, --verbose Verbose mode\n");
}
static const struct option rewrite_options[] =
@@ -417,12 +427,12 @@ print_overlap_usage_message (int error_p)
FILE *file = error_p ? stderr : stdout;
fnotice (file, " overlap [options] <dir1> <dir2> Compute the overlap of two profiles\n");
- fnotice (file, " -v, --verbose Verbose mode\n");
- fnotice (file, " -h, --hotonly Only print info for hot objects/functions\n");
fnotice (file, " -f, --function Print function level info\n");
fnotice (file, " -F, --fullname Print full filename\n");
+ fnotice (file, " -h, --hotonly Only print info for hot objects/functions\n");
fnotice (file, " -o, --object Print object level info\n");
fnotice (file, " -t <float>, --hot_threshold <float> Set the threshold for hotness\n");
+ fnotice (file, " -v, --verbose Verbose mode\n");
}
diff --git a/gcc/gcov.c b/gcc/gcov.c
index ea2dbf4315c..869892fbe68 100644
--- a/gcc/gcov.c
+++ b/gcc/gcov.c
@@ -469,15 +469,15 @@ print_usage (int error_p)
FILE *file = error_p ? stderr : stdout;
int status = error_p ? FATAL_EXIT_CODE : SUCCESS_EXIT_CODE;
- fnotice (file, "Usage: gcov [OPTION]... SOURCE|OBJ...\n\n");
+ fnotice (file, "Usage: gcov [OPTION...] SOURCE|OBJ...\n\n");
fnotice (file, "Print code coverage information.\n\n");
- fnotice (file, " -h, --help Print this help, then exit\n");
fnotice (file, " -a, --all-blocks Show information for every basic block\n");
fnotice (file, " -b, --branch-probabilities Include branch probabilities in output\n");
fnotice (file, " -c, --branch-counts Output counts of branches taken\n\
rather than percentages\n");
fnotice (file, " -d, --display-progress Display progress information\n");
fnotice (file, " -f, --function-summaries Output summaries for each function\n");
+ fnotice (file, " -h, --help Print this help, then exit\n");
fnotice (file, " -i, --intermediate-format Output .gcov file in intermediate text format\n");
fnotice (file, " -l, --long-file-names Use long output file names for included\n\
source files\n");
@@ -602,31 +602,6 @@ process_args (int argc, char **argv)
return optind;
}
-/* Get the name of the gcov file. The return value must be free'd.
-
- It appends the '.gcov' extension to the *basename* of the file.
- The resulting file name will be in PWD.
-
- e.g.,
- input: foo.da, output: foo.da.gcov
- input: a/b/foo.cc, output: foo.cc.gcov */
-
-static char *
-get_gcov_intermediate_filename (const char *file_name)
-{
- const char *gcov = ".gcov";
- char *result;
- const char *cptr;
-
- /* Find the 'basename'. */
- cptr = lbasename (file_name);
-
- result = XNEWVEC (char, strlen (cptr) + strlen (gcov) + 1);
- sprintf (result, "%s%s", cptr, gcov);
-
- return result;
-}
-
/* Output the result in intermediate format used by 'lcov'.
The intermediate format contains a single file named 'foo.cc.gcov',
@@ -792,7 +767,11 @@ output_gcov_file (const char *file_name, source_t *src)
if (gcov_file)
{
fnotice (stdout, "Creating '%s'\n", gcov_file_name);
- output_lines (gcov_file, src);
+
+ if (flag_intermediate_format)
+ output_intermediate_file (gcov_file, src);
+ else
+ output_lines (gcov_file, src);
if (ferror (gcov_file))
fnotice (stderr, "Error writing output file '%s'\n", gcov_file_name);
fclose (gcov_file);
@@ -814,8 +793,6 @@ generate_results (const char *file_name)
unsigned ix;
source_t *src;
function_t *fn;
- FILE *gcov_intermediate_file = NULL;
- char *gcov_intermediate_filename = NULL;
for (ix = n_sources, src = sources; ix--; src++)
if (src->num_lines)
@@ -845,20 +822,6 @@ generate_results (const char *file_name)
file_name = canonicalize_name (file_name);
}
- if (flag_gcov_file && flag_intermediate_format)
- {
- /* Open the intermediate file. */
- gcov_intermediate_filename =
- get_gcov_intermediate_filename (file_name);
- gcov_intermediate_file = fopen (gcov_intermediate_filename, "w");
- if (!gcov_intermediate_file)
- {
- fnotice (stderr, "Cannot open intermediate output file %s\n",
- gcov_intermediate_filename);
- return;
- }
- }
-
for (ix = n_sources, src = sources; ix--; src++)
{
if (flag_relative_only)
@@ -881,23 +844,11 @@ generate_results (const char *file_name)
total_executed += src->coverage.lines_executed;
if (flag_gcov_file)
{
- if (flag_intermediate_format)
- /* Output the intermediate format without requiring source
- files. This outputs a section to a *single* file. */
- output_intermediate_file (gcov_intermediate_file, src);
- else
- output_gcov_file (file_name, src);
+ output_gcov_file (file_name, src);
fnotice (stdout, "\n");
}
}
- if (flag_gcov_file && flag_intermediate_format)
- {
- /* Now we've finished writing the intermediate file. */
- fclose (gcov_intermediate_file);
- XDELETEVEC (gcov_intermediate_filename);
- }
-
if (!file_name)
executed_summary (total_lines, total_executed);
}
@@ -1817,6 +1768,13 @@ format_gcov (gcov_type top, gcov_type bottom, int dp)
{
static char buffer[20];
+ /* Handle invalid values that would result in a misleading value. */
+ if (bottom != 0 && top > bottom && dp >= 0)
+ {
+ sprintf (buffer, "NAN %%");
+ return buffer;
+ }
+
if (dp >= 0)
{
float ratio = bottom ? (float)top / bottom : 0;
diff --git a/gcc/genmatch.c b/gcc/genmatch.c
index 5874bfe802e..acaa06f44b7 100644
--- a/gcc/genmatch.c
+++ b/gcc/genmatch.c
@@ -22,7 +22,6 @@ along with GCC; see the file COPYING3. If not see
<http://www.gnu.org/licenses/>. */
#include "bconfig.h"
-#include <new>
#include "system.h"
#include "coretypes.h"
#include "ggc.h"
diff --git a/gcc/gimple-fold.c b/gcc/gimple-fold.c
index 7950cb627fd..dd56cfdeff9 100644
--- a/gcc/gimple-fold.c
+++ b/gcc/gimple-fold.c
@@ -5483,9 +5483,12 @@ fold_ctor_reference (tree type, tree ctor, unsigned HOST_WIDE_INT offset,
&& !compare_tree_int (TYPE_SIZE (TREE_TYPE (ctor)), size))
{
ret = canonicalize_constructor_val (unshare_expr (ctor), from_decl);
- ret = fold_unary (VIEW_CONVERT_EXPR, type, ret);
if (ret)
- STRIP_USELESS_TYPE_CONVERSION (ret);
+ {
+ ret = fold_unary (VIEW_CONVERT_EXPR, type, ret);
+ if (ret)
+ STRIP_USELESS_TYPE_CONVERSION (ret);
+ }
return ret;
}
/* For constants and byte-aligned/sized reads try to go through
diff --git a/gcc/gimple-ssa-strength-reduction.c b/gcc/gimple-ssa-strength-reduction.c
index 4c4610e28d0..739a0dd0c8c 100644
--- a/gcc/gimple-ssa-strength-reduction.c
+++ b/gcc/gimple-ssa-strength-reduction.c
@@ -508,7 +508,8 @@ find_phi_def (tree base)
c = base_cand_from_table (base);
- if (!c || c->kind != CAND_PHI)
+ if (!c || c->kind != CAND_PHI
+ || SSA_NAME_OCCURS_IN_ABNORMAL_PHI (gimple_phi_result (c->cand_stmt)))
return 0;
return c->cand_num;
@@ -546,6 +547,11 @@ find_basis_for_base_expr (slsr_cand_t c, tree base_expr)
gimple_bb (one_basis->cand_stmt)))
continue;
+ tree lhs = gimple_assign_lhs (one_basis->cand_stmt);
+ if (lhs && TREE_CODE (lhs) == SSA_NAME
+ && SSA_NAME_OCCURS_IN_ABNORMAL_PHI (lhs))
+ continue;
+
if (!basis || basis->cand_num < one_basis->cand_num)
basis = one_basis;
}
@@ -2041,91 +2047,92 @@ replace_mult_candidate (slsr_cand_t c, tree basis_name, widest_int bump)
tree target_type = TREE_TYPE (gimple_assign_lhs (c->cand_stmt));
enum tree_code cand_code = gimple_assign_rhs_code (c->cand_stmt);
- /* It is highly unlikely, but possible, that the resulting
- bump doesn't fit in a HWI. Abandon the replacement
- in this case. This does not affect siblings or dependents
- of C. Restriction to signed HWI is conservative for unsigned
- types but allows for safe negation without twisted logic. */
- if (wi::fits_shwi_p (bump)
- && bump.to_shwi () != HOST_WIDE_INT_MIN
- /* It is not useful to replace casts, copies, or adds of
- an SSA name and a constant. */
- && cand_code != MODIFY_EXPR
- && !CONVERT_EXPR_CODE_P (cand_code)
- && cand_code != PLUS_EXPR
- && cand_code != POINTER_PLUS_EXPR
- && cand_code != MINUS_EXPR)
- {
- enum tree_code code = PLUS_EXPR;
- tree bump_tree;
- gimple stmt_to_print = NULL;
+ /* It is not useful to replace casts, copies, negates, or adds of
+ an SSA name and a constant. */
+ if (cand_code == MODIFY_EXPR
+ || CONVERT_EXPR_CODE_P (cand_code)
+ || cand_code == PLUS_EXPR
+ || cand_code == POINTER_PLUS_EXPR
+ || cand_code == MINUS_EXPR
+ || cand_code == NEGATE_EXPR)
+ return;
- /* If the basis name and the candidate's LHS have incompatible
- types, introduce a cast. */
- if (!useless_type_conversion_p (target_type, TREE_TYPE (basis_name)))
- basis_name = introduce_cast_before_cand (c, target_type, basis_name);
- if (wi::neg_p (bump))
- {
- code = MINUS_EXPR;
- bump = -bump;
- }
+ enum tree_code code = PLUS_EXPR;
+ tree bump_tree;
+ gimple stmt_to_print = NULL;
- bump_tree = wide_int_to_tree (target_type, bump);
+ /* If the basis name and the candidate's LHS have incompatible
+ types, introduce a cast. */
+ if (!useless_type_conversion_p (target_type, TREE_TYPE (basis_name)))
+ basis_name = introduce_cast_before_cand (c, target_type, basis_name);
+ if (wi::neg_p (bump))
+ {
+ code = MINUS_EXPR;
+ bump = -bump;
+ }
- if (dump_file && (dump_flags & TDF_DETAILS))
- {
- fputs ("Replacing: ", dump_file);
- print_gimple_stmt (dump_file, c->cand_stmt, 0, 0);
- }
+ /* It is possible that the resulting bump doesn't fit in target_type.
+ Abandon the replacement in this case. This does not affect
+ siblings or dependents of C. */
+ if (bump != wi::ext (bump, TYPE_PRECISION (target_type),
+ TYPE_SIGN (target_type)))
+ return;
+
+ bump_tree = wide_int_to_tree (target_type, bump);
- if (bump == 0)
+ if (dump_file && (dump_flags & TDF_DETAILS))
+ {
+ fputs ("Replacing: ", dump_file);
+ print_gimple_stmt (dump_file, c->cand_stmt, 0, 0);
+ }
+
+ if (bump == 0)
+ {
+ tree lhs = gimple_assign_lhs (c->cand_stmt);
+ gassign *copy_stmt = gimple_build_assign (lhs, basis_name);
+ gimple_stmt_iterator gsi = gsi_for_stmt (c->cand_stmt);
+ gimple_set_location (copy_stmt, gimple_location (c->cand_stmt));
+ gsi_replace (&gsi, copy_stmt, false);
+ c->cand_stmt = copy_stmt;
+ if (dump_file && (dump_flags & TDF_DETAILS))
+ stmt_to_print = copy_stmt;
+ }
+ else
+ {
+ tree rhs1, rhs2;
+ if (cand_code != NEGATE_EXPR) {
+ rhs1 = gimple_assign_rhs1 (c->cand_stmt);
+ rhs2 = gimple_assign_rhs2 (c->cand_stmt);
+ }
+ if (cand_code != NEGATE_EXPR
+ && ((operand_equal_p (rhs1, basis_name, 0)
+ && operand_equal_p (rhs2, bump_tree, 0))
+ || (operand_equal_p (rhs1, bump_tree, 0)
+ && operand_equal_p (rhs2, basis_name, 0))))
{
- tree lhs = gimple_assign_lhs (c->cand_stmt);
- gassign *copy_stmt = gimple_build_assign (lhs, basis_name);
- gimple_stmt_iterator gsi = gsi_for_stmt (c->cand_stmt);
- gimple_set_location (copy_stmt, gimple_location (c->cand_stmt));
- gsi_replace (&gsi, copy_stmt, false);
- c->cand_stmt = copy_stmt;
if (dump_file && (dump_flags & TDF_DETAILS))
- stmt_to_print = copy_stmt;
+ {
+ fputs ("(duplicate, not actually replacing)", dump_file);
+ stmt_to_print = c->cand_stmt;
+ }
}
else
{
- tree rhs1, rhs2;
- if (cand_code != NEGATE_EXPR) {
- rhs1 = gimple_assign_rhs1 (c->cand_stmt);
- rhs2 = gimple_assign_rhs2 (c->cand_stmt);
- }
- if (cand_code != NEGATE_EXPR
- && ((operand_equal_p (rhs1, basis_name, 0)
- && operand_equal_p (rhs2, bump_tree, 0))
- || (operand_equal_p (rhs1, bump_tree, 0)
- && operand_equal_p (rhs2, basis_name, 0))))
- {
- if (dump_file && (dump_flags & TDF_DETAILS))
- {
- fputs ("(duplicate, not actually replacing)", dump_file);
- stmt_to_print = c->cand_stmt;
- }
- }
- else
- {
- gimple_stmt_iterator gsi = gsi_for_stmt (c->cand_stmt);
- gimple_assign_set_rhs_with_ops (&gsi, code,
- basis_name, bump_tree);
- update_stmt (gsi_stmt (gsi));
- c->cand_stmt = gsi_stmt (gsi);
- if (dump_file && (dump_flags & TDF_DETAILS))
- stmt_to_print = gsi_stmt (gsi);
- }
+ gimple_stmt_iterator gsi = gsi_for_stmt (c->cand_stmt);
+ gimple_assign_set_rhs_with_ops (&gsi, code,
+ basis_name, bump_tree);
+ update_stmt (gsi_stmt (gsi));
+ c->cand_stmt = gsi_stmt (gsi);
+ if (dump_file && (dump_flags & TDF_DETAILS))
+ stmt_to_print = gsi_stmt (gsi);
}
+ }
- if (dump_file && (dump_flags & TDF_DETAILS))
- {
- fputs ("With: ", dump_file);
- print_gimple_stmt (dump_file, stmt_to_print, 0, 0);
- fputs ("\n", dump_file);
- }
+ if (dump_file && (dump_flags & TDF_DETAILS))
+ {
+ fputs ("With: ", dump_file);
+ print_gimple_stmt (dump_file, stmt_to_print, 0, 0);
+ fputs ("\n", dump_file);
}
}
@@ -2177,8 +2184,6 @@ create_add_on_incoming_edge (slsr_cand_t c, tree basis_name,
widest_int increment, edge e, location_t loc,
bool known_stride)
{
- basic_block insert_bb;
- gimple_stmt_iterator gsi;
tree lhs, basis_type;
gassign *new_stmt;
@@ -2233,19 +2238,13 @@ create_add_on_incoming_edge (slsr_cand_t c, tree basis_name,
gcc_unreachable ();
}
- insert_bb = single_succ_p (e->src) ? e->src : split_edge (e);
- gsi = gsi_last_bb (insert_bb);
-
- if (!gsi_end_p (gsi) && is_ctrl_stmt (gsi_stmt (gsi)))
- gsi_insert_before (&gsi, new_stmt, GSI_NEW_STMT);
- else
- gsi_insert_after (&gsi, new_stmt, GSI_NEW_STMT);
-
gimple_set_location (new_stmt, loc);
+ gsi_insert_on_edge (e, new_stmt);
if (dump_file && (dump_flags & TDF_DETAILS))
{
- fprintf (dump_file, "Inserting in block %d: ", insert_bb->index);
+ fprintf (dump_file, "Inserting on edge %d->%d: ", e->src->index,
+ e->dest->index);
print_gimple_stmt (dump_file, new_stmt, 0, 0);
}
@@ -3172,6 +3171,23 @@ insert_initializers (slsr_cand_t c)
that block, the earliest one will be returned in WHERE. */
bb = nearest_common_dominator_for_cands (c, incr, &where);
+ /* If the NCD is not dominated by the block containing the
+ definition of the stride, we can't legally insert a
+ single initializer. Mark the increment as unprofitable
+ so we don't make any replacements. FIXME: Multiple
+ initializers could be placed with more analysis. */
+ gimple stride_def = SSA_NAME_DEF_STMT (c->stride);
+ basic_block stride_bb = gimple_bb (stride_def);
+
+ if (stride_bb && !dominated_by_p (CDI_DOMINATORS, bb, stride_bb))
+ {
+ if (dump_file && (dump_flags & TDF_DETAILS))
+ fprintf (dump_file,
+ "Initializer #%d cannot be legally placed\n", i);
+ incr_vec[i].cost = COST_INFINITE;
+ continue;
+ }
+
/* Create a new SSA name to hold the initializer's value. */
stride_type = TREE_TYPE (c->stride);
new_name = make_temp_ssa_name (stride_type, NULL, "slsr");
@@ -3613,6 +3629,10 @@ analyze_candidates_and_replace (void)
free (incr_vec);
}
}
+
+ /* For conditional candidates, we may have uncommitted insertions
+ on edges to clean up. */
+ gsi_commit_edge_inserts ();
}
namespace {
diff --git a/gcc/gimplify.c b/gcc/gimplify.c
index dc30465bb0b..e89e8bbad51 100644
--- a/gcc/gimplify.c
+++ b/gcc/gimplify.c
@@ -4293,6 +4293,14 @@ gimplify_modify_expr_rhs (tree *expr_p, tree *from_p, tree *to_p,
if (ret != GS_ERROR)
ret = GS_OK;
+ /* If we are going to write RESULT more than once, clear
+ TREE_READONLY flag, otherwise we might incorrectly promote
+ the variable to static const and initialize it at compile
+ time in one of the branches. */
+ if (VAR_P (result)
+ && TREE_TYPE (TREE_OPERAND (cond, 1)) != void_type_node
+ && TREE_TYPE (TREE_OPERAND (cond, 2)) != void_type_node)
+ TREE_READONLY (result) = 0;
if (TREE_TYPE (TREE_OPERAND (cond, 1)) != void_type_node)
TREE_OPERAND (cond, 1)
= build2 (code, void_type_node, result,
diff --git a/gcc/go/ChangeLog b/gcc/go/ChangeLog
index d6837d09485..2291f2ac5b3 100644
--- a/gcc/go/ChangeLog
+++ b/gcc/go/ChangeLog
@@ -1,3 +1,7 @@
+2017-10-10 Release Manager
+
+ * GCC 5.5.0 released.
+
2016-06-03 Release Manager
* GCC 5.4.0 released.
diff --git a/gcc/graphite-isl-ast-to-gimple.c b/gcc/graphite-isl-ast-to-gimple.c
index a83a85dbabc..3216460b625 100644
--- a/gcc/graphite-isl-ast-to-gimple.c
+++ b/gcc/graphite-isl-ast-to-gimple.c
@@ -38,6 +38,7 @@ extern "C" {
#endif
#endif
+#define INCLUDE_MAP
#include "system.h"
#include "coretypes.h"
#include "hash-set.h"
@@ -75,7 +76,6 @@ extern "C" {
#include "tree-scalar-evolution.h"
#include "gimple-ssa.h"
#include "tree-into-ssa.h"
-#include <map>
#ifdef HAVE_isl
#include "graphite-poly.h"
diff --git a/gcc/internal-fn.c b/gcc/internal-fn.c
index e4028250c2a..2da980512fc 100644
--- a/gcc/internal-fn.c
+++ b/gcc/internal-fn.c
@@ -1786,7 +1786,10 @@ expand_arith_overflow (enum tree_code code, gimple stmt)
{
case MINUS_EXPR:
if (integer_zerop (arg0) && !unsr_p)
- expand_neg_overflow (loc, lhs, arg1, false);
+ {
+ expand_neg_overflow (loc, lhs, arg1, false);
+ return;
+ }
/* FALLTHRU */
case PLUS_EXPR:
expand_addsub_overflow (loc, code, lhs, arg0, arg1,
diff --git a/gcc/ipa-cp.c b/gcc/ipa-cp.c
index 81a6ef8e066..adbd2ca4d34 100644
--- a/gcc/ipa-cp.c
+++ b/gcc/ipa-cp.c
@@ -514,6 +514,12 @@ determine_versionability (struct cgraph_node *node)
decloned constructors, inlining is always better anyway. */
else if (node->comdat_local_p ())
reason = "comdat-local function";
+ else if (node->calls_comdat_local)
+ {
+ /* TODO: call is versionable if we make sure that all
+ callers are inside of a comdat group. */
+ reason = "calls comdat-local function";
+ }
if (reason && dump_file && !node->alias && !node->thunk.thunk_p)
fprintf (dump_file, "Function %s/%i is not versionable, reason: %s.\n",
diff --git a/gcc/ipa-devirt.c b/gcc/ipa-devirt.c
index c165bceb16b..316f33624bc 100644
--- a/gcc/ipa-devirt.c
+++ b/gcc/ipa-devirt.c
@@ -1459,7 +1459,7 @@ odr_types_equivalent_p (tree t1, tree t2, bool warn, bool *warned,
if (DECL_ARTIFICIAL (f1))
break;
warn_odr (t1, t2, f1, f2, warn, warned,
- G_("fields has different layout "
+ G_("fields have different layout "
"in another translation unit"));
return false;
}
@@ -3211,7 +3211,13 @@ dump_possible_polymorphic_call_targets (FILE *f,
fprintf (f, " Speculative targets:");
dump_targets (f, targets);
}
- gcc_assert (targets.length () <= len);
+ /* Ugly: during callgraph construction the target cache may get populated
+ before all targets are found. While this is harmless (because all local
+ types are discovered and only in those case we devirtualize fully and we
+ don't do speculative devirtualization before IPA stage) it triggers
+ assert here when dumping at that stage also populates the case with
+ speculative targets. Quietly ignore this. */
+ gcc_assert (symtab->state < IPA_SSA || targets.length () <= len);
fprintf (f, "\n");
}
diff --git a/gcc/ipa-icf-gimple.c b/gcc/ipa-icf-gimple.c
index 9efdea465c2..7dec3d41dec 100644
--- a/gcc/ipa-icf-gimple.c
+++ b/gcc/ipa-icf-gimple.c
@@ -20,6 +20,7 @@ along with GCC; see the file COPYING3. If not see
<http://www.gnu.org/licenses/>. */
#include "config.h"
+#define INCLUDE_LIST
#include "system.h"
#include "coretypes.h"
#include "hash-set.h"
@@ -74,7 +75,6 @@ along with GCC; see the file COPYING3. If not see
#include "cgraph.h"
#include "data-streamer.h"
#include "ipa-utils.h"
-#include <list>
#include "tree-ssanames.h"
#include "tree-eh.h"
#include "builtins.h"
@@ -395,10 +395,14 @@ func_checker::compare_cst_or_decl (tree t1, tree t2)
}
case LABEL_DECL:
{
+ if (t1 == t2)
+ return true;
+
int *bb1 = m_label_bb_map.get (t1);
int *bb2 = m_label_bb_map.get (t2);
- return return_with_debug (*bb1 == *bb2);
+ /* Labels can point to another function (non-local GOTOs). */
+ return return_with_debug (bb1 != NULL && bb2 != NULL && *bb1 == *bb2);
}
case PARM_DECL:
case RESULT_DECL:
@@ -573,11 +577,8 @@ func_checker::compare_operand (tree t1, tree t2)
}
}
-/* Compares two tree list operands T1 and T2 and returns true if these
- two trees are semantically equivalent. */
-
bool
-func_checker::compare_tree_list_operand (tree t1, tree t2)
+func_checker::compare_asm_inputs_outputs (tree t1, tree t2)
{
gcc_assert (TREE_CODE (t1) == TREE_LIST);
gcc_assert (TREE_CODE (t2) == TREE_LIST);
@@ -590,6 +591,16 @@ func_checker::compare_tree_list_operand (tree t1, tree t2)
if (!compare_operand (TREE_VALUE (t1), TREE_VALUE (t2)))
return return_false ();
+ tree p1 = TREE_PURPOSE (t1);
+ tree p2 = TREE_PURPOSE (t2);
+
+ gcc_assert (TREE_CODE (p1) == TREE_LIST);
+ gcc_assert (TREE_CODE (p2) == TREE_LIST);
+
+ if (strcmp (TREE_STRING_POINTER (TREE_VALUE (p1)),
+ TREE_STRING_POINTER (TREE_VALUE (p2))) != 0)
+ return return_false ();
+
t2 = TREE_CHAIN (t2);
}
@@ -1035,7 +1046,7 @@ func_checker::compare_gimple_asm (const gasm *g1, const gasm *g2)
tree input1 = gimple_asm_input_op (g1, i);
tree input2 = gimple_asm_input_op (g2, i);
- if (!compare_tree_list_operand (input1, input2))
+ if (!compare_asm_inputs_outputs (input1, input2))
return return_false_with_msg ("ASM input is different");
}
@@ -1044,7 +1055,7 @@ func_checker::compare_gimple_asm (const gasm *g1, const gasm *g2)
tree output1 = gimple_asm_output_op (g1, i);
tree output2 = gimple_asm_output_op (g2, i);
- if (!compare_tree_list_operand (output1, output2))
+ if (!compare_asm_inputs_outputs (output1, output2))
return return_false_with_msg ("ASM output is different");
}
diff --git a/gcc/ipa-icf-gimple.h b/gcc/ipa-icf-gimple.h
index 6a9cbed5ff4..4d2ec9169b7 100644
--- a/gcc/ipa-icf-gimple.h
+++ b/gcc/ipa-icf-gimple.h
@@ -215,9 +215,9 @@ public:
is returned. */
bool compare_operand (tree t1, tree t2);
- /* Compares two tree list operands T1 and T2 and returns true if these
- two trees are semantically equivalent. */
- bool compare_tree_list_operand (tree t1, tree t2);
+ /* Compares GIMPLE ASM inputs (or outputs) where we iterate tree chain
+ and compare both TREE_PURPOSEs and TREE_VALUEs. */
+ bool compare_asm_inputs_outputs (tree t1, tree t2);
/* Verifies that trees T1 and T2, representing function declarations
are equivalent from perspective of ICF. */
diff --git a/gcc/ipa-icf.c b/gcc/ipa-icf.c
index 216e4ed6da7..7f86cca6e7f 100644
--- a/gcc/ipa-icf.c
+++ b/gcc/ipa-icf.c
@@ -52,8 +52,8 @@ along with GCC; see the file COPYING3. If not see
*/
#include "config.h"
+#define INCLUDE_LIST
#include "system.h"
-#include <list>
#include "coretypes.h"
#include "hash-set.h"
#include "machmode.h"
diff --git a/gcc/ipa-pure-const.c b/gcc/ipa-pure-const.c
index f86d6fbbc40..a8af21ecae3 100644
--- a/gcc/ipa-pure-const.c
+++ b/gcc/ipa-pure-const.c
@@ -1190,7 +1190,8 @@ static bool
cdtor_p (cgraph_node *n, void *)
{
if (DECL_STATIC_CONSTRUCTOR (n->decl) || DECL_STATIC_DESTRUCTOR (n->decl))
- return !TREE_READONLY (n->decl) && !DECL_PURE_P (n->decl);
+ return ((!TREE_READONLY (n->decl) && !DECL_PURE_P (n->decl))
+ || DECL_LOOPING_CONST_OR_PURE_P (n->decl));
return false;
}
diff --git a/gcc/ipa-split.c b/gcc/ipa-split.c
index b9678e11db0..c276b148859 100644
--- a/gcc/ipa-split.c
+++ b/gcc/ipa-split.c
@@ -1390,6 +1390,15 @@ split_function (basic_block return_bb, struct split_point *split_point,
node->split_part = true;
+ if (cur_node->same_comdat_group)
+ {
+ /* TODO: call is versionable if we make sure that all
+ callers are inside of a comdat group. */
+ cur_node->calls_comdat_local = 1;
+ node->add_to_same_comdat_group (cur_node);
+ }
+
+
/* Let's take a time profile for splitted function. */
node->tp_first_run = cur_node->tp_first_run + 1;
diff --git a/gcc/ipa-visibility.c b/gcc/ipa-visibility.c
index 7614cfbee4b..35e7423c431 100644
--- a/gcc/ipa-visibility.c
+++ b/gcc/ipa-visibility.c
@@ -112,7 +112,8 @@ non_local_p (struct cgraph_node *node, void *data ATTRIBUTE_UNUSED)
&& !DECL_EXTERNAL (node->decl)
&& !node->externally_visible
&& !node->used_from_other_partition
- && !node->in_other_partition);
+ && !node->in_other_partition
+ && node->get_availability () >= AVAIL_AVAILABLE);
}
/* Return true when function can be marked local. */
diff --git a/gcc/ira-costs.c b/gcc/ira-costs.c
index 41edb33195b..b716ad21de1 100644
--- a/gcc/ira-costs.c
+++ b/gcc/ira-costs.c
@@ -103,7 +103,7 @@ static struct costs *costs;
static struct costs *total_allocno_costs;
/* It is the current size of struct costs. */
-static int struct_costs_size;
+static size_t struct_costs_size;
/* Return pointer to structure containing costs of allocno or pseudo
with given NUM in array ARR. */
diff --git a/gcc/ira-int.h b/gcc/ira-int.h
index c1c545cc11f..cca54593d9c 100644
--- a/gcc/ira-int.h
+++ b/gcc/ira-int.h
@@ -784,7 +784,7 @@ struct target_ira_int {
/* Initialized once. It is a maximal possible size of the allocated
struct costs. */
- int x_max_struct_costs_size;
+ size_t x_max_struct_costs_size;
/* Allocated and initialized once, and used to initialize cost values
for each insn. */
diff --git a/gcc/java/ChangeLog b/gcc/java/ChangeLog
index ac7002909ca..4edc2921db5 100644
--- a/gcc/java/ChangeLog
+++ b/gcc/java/ChangeLog
@@ -1,3 +1,7 @@
+2017-10-10 Release Manager
+
+ * GCC 5.5.0 released.
+
2016-06-03 Release Manager
* GCC 5.4.0 released.
diff --git a/gcc/jit/ChangeLog b/gcc/jit/ChangeLog
index 254c99a6019..8879b119082 100644
--- a/gcc/jit/ChangeLog
+++ b/gcc/jit/ChangeLog
@@ -1,3 +1,7 @@
+2017-10-10 Release Manager
+
+ * GCC 5.5.0 released.
+
2016-06-03 Release Manager
* GCC 5.4.0 released.
diff --git a/gcc/loop-doloop.c b/gcc/loop-doloop.c
index 0b6447adede..221939a840b 100644
--- a/gcc/loop-doloop.c
+++ b/gcc/loop-doloop.c
@@ -179,10 +179,13 @@ doloop_condition_get (rtx doloop_pat)
}
else
inc = PATTERN (prev_insn);
- /* We expect the condition to be of the form (reg != 0) */
- cond = XEXP (SET_SRC (cmp), 0);
- if (GET_CODE (cond) != NE || XEXP (cond, 1) != const0_rtx)
- return 0;
+ if (GET_CODE (cmp) == SET && GET_CODE (SET_SRC (cmp)) == IF_THEN_ELSE)
+ {
+ /* We expect the condition to be of the form (reg != 0) */
+ cond = XEXP (SET_SRC (cmp), 0);
+ if (GET_CODE (cond) != NE || XEXP (cond, 1) != const0_rtx)
+ return 0;
+ }
}
else
{
diff --git a/gcc/lra-constraints.c b/gcc/lra-constraints.c
index b996d67cbd7..d3dd5f09fa3 100644
--- a/gcc/lra-constraints.c
+++ b/gcc/lra-constraints.c
@@ -3309,6 +3309,13 @@ simple_move_p (void)
lra_assert (curr_insn_set != NULL_RTX);
dest = SET_DEST (curr_insn_set);
src = SET_SRC (curr_insn_set);
+
+ /* If the instruction has multiple sets we need to process it even if it
+ is single_set. This can happen if one or more of the SETs are dead.
+ See PR73650. */
+ if (multiple_sets (curr_insn))
+ return false;
+
return ((dclass = get_op_class (dest)) != NO_REGS
&& (sclass = get_op_class (src)) != NO_REGS
/* The backend guarantees that register moves of cost 2
diff --git a/gcc/lto/ChangeLog b/gcc/lto/ChangeLog
index 045d632c016..d77a3af6a41 100644
--- a/gcc/lto/ChangeLog
+++ b/gcc/lto/ChangeLog
@@ -1,3 +1,16 @@
+2017-10-10 Release Manager
+
+ * GCC 5.5.0 released.
+
+2017-05-30 Jakub Jelinek <jakub@redhat.com>
+
+ Backported from mainline
+ 2017-01-11 Jakub Jelinek <jakub@redhat.com>
+
+ PR middle-end/50199
+ * lto-lang.c (lto_post_options): Force flag_merge_constants = 1
+ if it was 0.
+
2016-06-03 Release Manager
* GCC 5.4.0 released.
diff --git a/gcc/lto/lto-lang.c b/gcc/lto/lto-lang.c
index 073bf17cd10..7651143cb85 100644
--- a/gcc/lto/lto-lang.c
+++ b/gcc/lto/lto-lang.c
@@ -827,6 +827,12 @@ lto_post_options (const char **pfilename ATTRIBUTE_UNUSED)
support. */
flag_excess_precision_cmdline = EXCESS_PRECISION_FAST;
+ /* When partitioning, we can tear appart STRING_CSTs uses from the same
+ TU into multiple partitions. Without constant merging the constants
+ might not be equal at runtime. See PR50199. */
+ if (!flag_merge_constants)
+ flag_merge_constants = 1;
+
/* Initialize the compiler back end. */
return false;
}
diff --git a/gcc/objc/ChangeLog b/gcc/objc/ChangeLog
index cedc2e261d1..99d8042c6ad 100644
--- a/gcc/objc/ChangeLog
+++ b/gcc/objc/ChangeLog
@@ -1,3 +1,7 @@
+2017-10-10 Release Manager
+
+ * GCC 5.5.0 released.
+
2016-06-03 Release Manager
* GCC 5.4.0 released.
diff --git a/gcc/objcp/ChangeLog b/gcc/objcp/ChangeLog
index 4b2797d664c..69f3892075e 100644
--- a/gcc/objcp/ChangeLog
+++ b/gcc/objcp/ChangeLog
@@ -1,3 +1,7 @@
+2017-10-10 Release Manager
+
+ * GCC 5.5.0 released.
+
2016-06-03 Release Manager
* GCC 5.4.0 released.
diff --git a/gcc/omp-low.c b/gcc/omp-low.c
index 55afc60ed85..220e9eb73f9 100644
--- a/gcc/omp-low.c
+++ b/gcc/omp-low.c
@@ -1166,7 +1166,8 @@ build_receiver_ref (tree var, bool by_ref, omp_context *ctx)
this is some variable. */
static tree
-build_outer_var_ref (tree var, omp_context *ctx)
+build_outer_var_ref (tree var, omp_context *ctx,
+ enum omp_clause_code code = OMP_CLAUSE_ERROR)
{
tree x;
@@ -1175,7 +1176,7 @@ build_outer_var_ref (tree var, omp_context *ctx)
else if (is_variable_sized (var))
{
x = TREE_OPERAND (DECL_VALUE_EXPR (var), 0);
- x = build_outer_var_ref (x, ctx);
+ x = build_outer_var_ref (x, ctx, code);
x = build_simple_mem_ref (x);
}
else if (is_taskreg_ctx (ctx))
@@ -1183,11 +1184,17 @@ build_outer_var_ref (tree var, omp_context *ctx)
bool by_ref = use_pointer_for_field (var, NULL);
x = build_receiver_ref (var, by_ref, ctx);
}
- else if (gimple_code (ctx->stmt) == GIMPLE_OMP_FOR
- && gimple_omp_for_kind (ctx->stmt) & GF_OMP_FOR_SIMD)
- {
- /* #pragma omp simd isn't a worksharing construct, and can reference even
- private vars in its linear etc. clauses. */
+ else if ((gimple_code (ctx->stmt) == GIMPLE_OMP_FOR
+ && gimple_omp_for_kind (ctx->stmt) & GF_OMP_FOR_SIMD)
+ || (code == OMP_CLAUSE_PRIVATE
+ && (gimple_code (ctx->stmt) == GIMPLE_OMP_FOR
+ || gimple_code (ctx->stmt) == GIMPLE_OMP_SECTIONS
+ || gimple_code (ctx->stmt) == GIMPLE_OMP_SINGLE)))
+ {
+ /* #pragma omp simd isn't a worksharing construct, and can reference
+ even private vars in its linear etc. clauses.
+ Similarly for OMP_CLAUSE_PRIVATE with outer ref, that can refer
+ to private vars in all worksharing constructs. */
x = NULL_TREE;
if (ctx->outer && is_taskreg_ctx (ctx))
x = lookup_decl (var, ctx->outer);
@@ -1363,6 +1370,8 @@ omp_copy_decl (tree var, copy_body_data *cb)
if (TREE_CODE (var) == LABEL_DECL)
{
+ if (FORCED_LABEL (var) || DECL_NONLOCAL (var))
+ return var;
new_var = create_artificial_label (DECL_SOURCE_LOCATION (var));
DECL_CONTEXT (new_var) = current_function_decl;
insert_decl_map (&ctx->cb, var, new_var);
@@ -2371,9 +2380,11 @@ scan_omp_task (gimple_stmt_iterator *gsi, omp_context *outer_ctx)
tree name, t;
gomp_task *stmt = as_a <gomp_task *> (gsi_stmt (*gsi));
- /* Ignore task directives with empty bodies. */
+ /* Ignore task directives with empty bodies, unless they have depend
+ clause. */
if (optimize > 0
- && empty_body_p (gimple_omp_body (stmt)))
+ && empty_body_p (gimple_omp_body (stmt))
+ && !find_omp_clause (gimple_omp_task_clauses (stmt), OMP_CLAUSE_DEPEND))
{
gsi_replace (gsi, gimple_build_nop (), false);
return;
@@ -3546,7 +3557,9 @@ lower_rec_simd_input_clauses (tree new_var, omp_context *ctx, int &max_vf,
{
tree c = find_omp_clause (gimple_omp_for_clauses (ctx->stmt),
OMP_CLAUSE_SAFELEN);
- if (c && TREE_CODE (OMP_CLAUSE_SAFELEN_EXPR (c)) != INTEGER_CST)
+ if (c
+ && (TREE_CODE (OMP_CLAUSE_SAFELEN_EXPR (c)) != INTEGER_CST
+ || tree_int_cst_sgn (OMP_CLAUSE_SAFELEN_EXPR (c)) != 1))
max_vf = 1;
else if (c && compare_tree_int (OMP_CLAUSE_SAFELEN_EXPR (c),
max_vf) == -1)
@@ -3884,7 +3897,7 @@ lower_rec_input_clauses (tree clauses, gimple_seq *ilist, gimple_seq *dlist,
if (is_task_ctx (ctx))
x = build_receiver_ref (var, false, ctx);
else
- x = build_outer_var_ref (var, ctx);
+ x = build_outer_var_ref (var, ctx, OMP_CLAUSE_PRIVATE);
}
else
x = NULL;
@@ -12048,7 +12061,7 @@ diagnose_sb_0 (gimple_stmt_iterator *gsi_p,
}
if (kind == NULL)
{
- gcc_checking_assert (flag_openmp);
+ gcc_checking_assert (flag_openmp || flag_openmp_simd);
kind = "OpenMP";
}
@@ -12454,7 +12467,7 @@ public:
/* opt_pass methods: */
virtual bool gate (function *)
{
- return flag_cilkplus || flag_openacc || flag_openmp;
+ return flag_cilkplus || flag_openacc || flag_openmp || flag_openmp_simd;
}
virtual unsigned int execute (function *)
{
@@ -12944,7 +12957,9 @@ simd_clone_adjust_argument_types (struct cgraph_node *node)
if (node->definition)
node->simdclone->args[i].simd_array
- = create_tmp_simd_array (IDENTIFIER_POINTER (DECL_NAME (parm)),
+ = create_tmp_simd_array (DECL_NAME (parm)
+ ? IDENTIFIER_POINTER (DECL_NAME (parm))
+ : NULL,
parm_type, node->simdclone->simdlen);
}
adjustments.safe_push (adj);
diff --git a/gcc/params.def b/gcc/params.def
index 36772da428e..e9ae92dd333 100644
--- a/gcc/params.def
+++ b/gcc/params.def
@@ -121,7 +121,7 @@ DEFPARAM (PARAM_COMDAT_SHARING_PROBABILITY,
DEFPARAM (PARAM_PARTIAL_INLINING_ENTRY_PROBABILITY,
"partial-inlining-entry-probability",
"Maximum probability of the entry BB of split region (in percent relative to entry BB of the function) to make partial inlining happen",
- 70, 0, 0)
+ 70, 0, 100)
/* Limit the number of expansions created by the variable expansion
optimization to avoid register pressure. */
diff --git a/gcc/po/ChangeLog b/gcc/po/ChangeLog
index 9f524d67eed..0cbf87a0706 100644
--- a/gcc/po/ChangeLog
+++ b/gcc/po/ChangeLog
@@ -1,3 +1,7 @@
+2017-10-10 Release Manager
+
+ * GCC 5.5.0 released.
+
2016-12-30 Jakub Jelinek <jakub@redhat.com>
PR translation/78745
diff --git a/gcc/pretty-print.c b/gcc/pretty-print.c
index 78d334eae88..6881d1aeabe 100644
--- a/gcc/pretty-print.c
+++ b/gcc/pretty-print.c
@@ -25,8 +25,6 @@ along with GCC; see the file COPYING3. If not see
#include "pretty-print.h"
#include "diagnostic-color.h"
-#include <new> // For placement-new.
-
#if HAVE_ICONV
#include <iconv.h>
#endif
diff --git a/gcc/real.c b/gcc/real.c
index 43f124e05f7..93866fdbcd2 100644
--- a/gcc/real.c
+++ b/gcc/real.c
@@ -950,12 +950,12 @@ do_compare (const REAL_VALUE_TYPE *a, const REAL_VALUE_TYPE *b,
gcc_unreachable ();
}
- if (a->sign != b->sign)
- return -a->sign - -b->sign;
-
if (a->decimal || b->decimal)
return decimal_do_compare (a, b, nan_result);
+ if (a->sign != b->sign)
+ return -a->sign - -b->sign;
+
if (REAL_EXP (a) > REAL_EXP (b))
ret = 1;
else if (REAL_EXP (a) < REAL_EXP (b))
diff --git a/gcc/sel-sched.c b/gcc/sel-sched.c
index dab06ec10da..94704cb3585 100644
--- a/gcc/sel-sched.c
+++ b/gcc/sel-sched.c
@@ -2559,6 +2559,7 @@ moveup_expr_cached (expr_t expr, insn_t insn, bool inside_insn_group)
}
if (DEBUG_INSN_P (EXPR_INSN_RTX (expr))
+ && BLOCK_FOR_INSN (EXPR_INSN_RTX (expr))
&& (sel_bb_head (BLOCK_FOR_INSN (EXPR_INSN_RTX (expr)))
== EXPR_INSN_RTX (expr)))
/* Don't use cached information for debug insns that are heads of
diff --git a/gcc/simplify-rtx.c b/gcc/simplify-rtx.c
index 648a71a11b4..446592cca02 100644
--- a/gcc/simplify-rtx.c
+++ b/gcc/simplify-rtx.c
@@ -283,15 +283,14 @@ avoid_constant_pool_reference (rtx x)
/* If we're accessing the constant in a different mode than it was
originally stored, attempt to fix that up via subreg simplifications.
If that fails we have no choice but to return the original memory. */
- if ((offset != 0 || cmode != GET_MODE (x))
- && offset >= 0 && offset < GET_MODE_SIZE (cmode))
+ if (offset == 0 && cmode == GET_MODE (x))
+ return c;
+ else if (offset >= 0 && offset < GET_MODE_SIZE (cmode))
{
rtx tem = simplify_subreg (GET_MODE (x), c, cmode, offset);
if (tem && CONSTANT_P (tem))
return tem;
}
- else
- return c;
}
return x;
@@ -901,8 +900,10 @@ simplify_unary_operation_1 (enum rtx_code code, machine_mode mode, rtx op)
&& XEXP (op, 1) == constm1_rtx)
return simplify_gen_unary (NEG, mode, XEXP (op, 0), mode);
- /* Similarly, (not (neg X)) is (plus X -1). */
- if (GET_CODE (op) == NEG)
+ /* Similarly, (not (neg X)) is (plus X -1). Only do this for
+ modes that have CONSTM1_RTX, i.e. MODE_INT, MODE_PARTIAL_INT
+ and MODE_VECTOR_INT. */
+ if (GET_CODE (op) == NEG && CONSTM1_RTX (mode))
return simplify_gen_binary (PLUS, mode, XEXP (op, 0),
CONSTM1_RTX (mode));
@@ -5160,34 +5161,14 @@ simplify_const_relational_operation (enum rtx_code code,
{
case LT:
/* Optimize abs(x) < 0.0. */
- if (!HONOR_SNANS (mode)
- && (!INTEGRAL_MODE_P (mode)
- || (!flag_wrapv && !flag_trapv && flag_strict_overflow)))
- {
- if (INTEGRAL_MODE_P (mode)
- && (issue_strict_overflow_warning
- (WARN_STRICT_OVERFLOW_CONDITIONAL)))
- warning (OPT_Wstrict_overflow,
- ("assuming signed overflow does not occur when "
- "assuming abs (x) < 0 is false"));
- return const0_rtx;
- }
+ if (!INTEGRAL_MODE_P (mode) && !HONOR_SNANS (mode))
+ return const0_rtx;
break;
case GE:
/* Optimize abs(x) >= 0.0. */
- if (!HONOR_NANS (mode)
- && (!INTEGRAL_MODE_P (mode)
- || (!flag_wrapv && !flag_trapv && flag_strict_overflow)))
- {
- if (INTEGRAL_MODE_P (mode)
- && (issue_strict_overflow_warning
- (WARN_STRICT_OVERFLOW_CONDITIONAL)))
- warning (OPT_Wstrict_overflow,
- ("assuming signed overflow does not occur when "
- "assuming abs (x) >= 0 is true"));
- return const_true_rtx;
- }
+ if (!INTEGRAL_MODE_P (mode) && !HONOR_NANS (mode))
+ return const_true_rtx;
break;
case UNGE:
diff --git a/gcc/system.h b/gcc/system.h
index 94d8138c020..3b753ad3951 100644
--- a/gcc/system.h
+++ b/gcc/system.h
@@ -215,6 +215,18 @@ extern int errno;
#endif
#ifdef __cplusplus
+# ifdef INCLUDE_LIST
+# include <list>
+# endif
+# ifdef INCLUDE_MAP
+# include <map>
+# endif
+# ifdef INCLUDE_SET
+# include <set>
+# endif
+# ifdef INCLUDE_VECTOR
+# include <vector>
+# endif
# include <algorithm>
# include <cstring>
# include <utility>
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 554990f0ddb..c51d962c041 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,780 @@
+2017-10-10 Release Manager
+
+ * GCC 5.5.0 released.
+
+2017-10-02 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
+
+ Backport from mainline
+ 2017-09-29 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
+
+ PR tree-optimization/82337
+ * gcc.c-torture/compile/pr82337.c: New file.
+
+2017-09-19 Martin Liska <mliska@suse.cz>
+
+ Revert backport:
+ 2017-08-10 Martin Liska <mliska@suse.cz>
+
+ PR c++/81355
+ * g++.dg/other/pr81355.C: New test.
+
+2017-09-18 Richard Biener <rguenther@suse.de>
+
+ Backport from mainline
+ 2017-04-10 Richard Biener <rguenther@suse.de>
+
+ PR middle-end/80362
+ * gcc.dg/torture/pr80362.c: New testcase.
+
+ 2015-11-25 Richard Biener <rguenther@suse.de>
+
+ PR middle-end/68528
+ * gcc.dg/torture/pr68528.c: New testcase.
+
+ 2017-03-27 Richard Biener <rguenther@suse.de>
+
+ PR middle-end/80171
+ * g++.dg/torture/pr80171.C: New testcase.
+
+ 2016-06-13 Richard Biener <rguenther@suse.de>
+
+ PR middle-end/64516
+ * gcc.dg/align-3.c: New testcase.
+
+2017-09-18 Martin Liska <mliska@suse.cz>
+
+ * gcc.dg/asan/pr81224.c: Remove.
+
+2017-09-16 Jakub Jelinek <jakub@redhat.com>
+
+ Backported from mainline
+ 2017-09-12 Jakub Jelinek <jakub@redhat.com>
+
+ PR target/82112
+ * gcc.target/powerpc/pr82112.c: New test.
+ * g++.dg/ext/altivec-18.C: New test.
+
+ PR target/82112
+ * c-c++-common/pr82112.c: New test.
+ * gcc.dg/pr82112.c: New test.
+
+ 2017-08-08 Richard Biener <rguenther@suse.de>
+
+ PR middle-end/81766
+ * gcc.target/i386/pr81766.c: New testcase.
+
+ 2017-08-03 Jakub Jelinek <jakub@redhat.com>
+
+ PR target/81621
+ * gcc.dg/pr81621.c: New test.
+
+ PR middle-end/81052
+ * c-c++-common/pr81052.c: New test.
+
+ 2017-08-02 Jakub Jelinek <jakub@redhat.com>
+
+ PR middle-end/79499
+ * gcc.dg/pr79499.c: New test.
+
+ 2017-06-21 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/81154
+ * g++.dg/gomp/pr81154.C: New test.
+
+ 2017-06-13 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/80984
+ * g++.dg/opt/nrv18.C: New test.
+
+2017-09-15 Martin Liska <mliska@suse.cz>
+
+ Backport from mainline
+ 2017-08-11 Martin Liska <mliska@suse.cz>
+
+ PR tree-opt/79987
+ * gcc.target/i386/mpx/pr79987.c: New test.
+
+2017-09-15 Martin Liska <mliska@suse.cz>
+
+ Backport from mainline
+ 2017-06-28 Martin Liska <mliska@suse.cz>
+
+ PR sanitizer/81224
+ * gcc.dg/asan/pr81224.c: New test.
+
+2017-09-15 Martin Liska <mliska@suse.cz>
+
+ Backport from mainline
+ 2017-08-30 Martin Liska <mliska@suse.cz>
+
+ PR inline-asm/82001
+ * gcc.dg/ipa/pr82001.c: New test.
+
+2017-09-15 Martin Liska <mliska@suse.cz>
+
+ Backport from mainline
+ 2017-08-10 Martin Liska <mliska@suse.cz>
+
+ PR c++/81355
+ * g++.dg/other/pr81355.C: New test.
+
+2017-09-15 Martin Liska <mliska@suse.cz>
+
+ Backport from mainline
+ 2017-08-08 Martin Liska <mliska@suse.cz>
+
+ PR tree-opt/81696
+ * gcc.dg/ipa/pr81696.c: New test.
+
+2017-09-15 Martin Liska <mliska@suse.cz>
+
+ Backport from mainline
+ 2017-07-19 Martin Liska <mliska@suse.cz>
+
+ PR sanitizer/63361
+ * c-c++-common/ubsan/float-cast-overflow-1.c: Add either
+ -ffloat-store or -mieee for targets that need it.
+
+2017-09-15 Martin Liska <mliska@suse.cz>
+
+ Backport from mainline
+ 2017-06-28 Martin Liska <mliska@suse.cz>
+
+ PR ipa/81128
+ * gcc.target/i386/pr81128.c: New test.
+
+2017-09-12 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
+
+ Backport from mainline
+ 2017-09-05 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
+
+ PR target/81833
+ * gcc.target/powerpc/pr81833-1.c: New file.
+ * gcc.target/powerpc/pr81833-2.c: New file.
+
+2017-09-11 Jonathan Wakely <jwakely@redhat.com>
+
+ PR c++/81852
+ * g++.dg/cpp1y/feat-cxx11.C: Check __cpp_threadsafe_static_init.
+ * g++.dg/cpp1y/feat-cxx14.C: Likewise.
+ * g++.dg/cpp1y/feat-cxx98.C: Likewise.
+ * g++.dg/cpp1y/feat-neg.C: Likewise.
+
+2017-09-06 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
+
+ Backport from mainline:
+ 2017-08-30 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
+
+ PR tree-optimization/81987
+ * g++.dg/torture/pr81987.C: New file.
+
+2017-09-05 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
+
+ Backport from mainline
+ 2017-08-29 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
+ Jakub Jelinek <jakub@redhat.com>
+ Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/81503
+ * gcc.c-torture/execute/pr81503.c: New file.
+
+2017-09-02 Janus Weil <janus@gcc.gnu.org>
+
+ Backport from trunk
+ PR fortran/81770
+ * gfortran.dg/warn_target_lifetime_3.f90: Fix a typo.
+ * gfortran.dg/warn_target_lifetime_4.f90: New testcase.
+
+2017-08-22 Peter Bergner <bergner@vnet.ibm.com>
+
+ Backport from mainline
+ 2017-08-17 Peter Bergner <bergner@vnet.ibm.com>
+
+ PR target/80210
+ * gcc.target/powerpc/pr80210.c: New test.
+
+2017-08-22 Georg-Johann Lay <avr@gjlay.de>
+
+ Backport from trunk r247719.
+ 2017-05-06 Richard Sandiford <richard.sandiford@linaro.org>
+
+ PR rtl-optimization/75964
+ * gcc.dg/torture/pr75964.c: New test.
+
+2017-08-22 Georg-Johann Lay <avr@gjlay.de>
+
+ Backport from 2017-07-05 trunk r249995, r249996.
+
+ PR target/81305
+ * gcc.target/avr/isr-test.h: New file.
+ * gcc.target/avr/torture/isr-01-simple.c: New test.
+ * gcc.target/avr/torture/isr-02-call.c: New test.
+ * gcc.target/avr/torture/isr-03-fixed.c: New test.
+
+2017-08-16 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
+
+ Backport from mainline
+ 2017-08-08 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
+
+ PR tree-optimization/81354
+ * g++.dg/torture/pr81354.C: New file.
+
+2017-07-31 Jakub Jelinek <jakub@redhat.com>
+
+ PR sanitizer/81604
+ * c-c++-common/ubsan/pr81604.c: New test.
+
+2017-07-27 Jakub Jelinek <jakub@redhat.com>
+
+ PR tree-optimization/81555
+ PR tree-optimization/81556
+ * gcc.c-torture/execute/pr81555.c: New test.
+ * gcc.c-torture/execute/pr81556.c: New test.
+
+2016-07-25 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
+
+ Backport from mainline
+ 2016-07-14 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
+
+ PR tree-optimization/81162
+ * gcc.dg/ubsan/pr81162.c: New file.
+
+2017-07-24 Uros Bizjak <ubizjak@gmail.com>
+
+ PR target/80569
+ * gcc.target/i386/pr80569.c: New test.
+
+2017-07-18 Uros Bizjak <ubizjak@gmail.com>
+
+ PR target/81471
+ * gcc.target/i386/pr81471.c: New test.
+
+2017-07-14 Uros Bizjak <ubizjak@gmail.com>
+
+ Backport from mainline
+ 2017-07-10 Uros Bizjak <ubizjak@gmail.com>
+
+ PR target/81375
+ * gcc.target/i386/pr81375.c: New test.
+
+ Backport from mainline
+ 2017-07-04 Uros Bizjak <ubizjak@gmail.com>
+
+ PR target/81300
+ * gcc.target/i386/pr81300.c: New test.
+
+2017-07-03 Thomas Preud'homme <thomas.preudhomme@arm.com>
+
+ * gcc.target/arm/fpscr.c: Require arm_vfp_ok instead of arm_fp_ok and
+ add -mfpu=vfp -mfloat-abi=softfp instead of fp_ok options.
+
+2017-07-03 Tom de Vries <tom@codesourcery.com>
+
+ backport from mainline:
+ PR tree-optimization/81192
+ 2017-07-03 Tom de Vries <tom@codesourcery.com>
+
+ * gcc.dg/pr81192.c: New test.
+
+2017-06-27 Segher Boessenkool <segher@kernel.crashing.org>
+
+ Revert:
+ Backport from trunk:
+
+ 2017-06-09 Segher Boessenkool <segher@kernel.crashing.org>
+ PR target/80966
+ * gcc.target/powerpc/stack-limit.c: New testcase.
+
+2017-06-27 Segher Boessenkool <segher@kernel.crashing.org>
+
+ Backports from trunk:
+
+ 2017-05-17 Segher Boessenkool <segher@kernel.crashing.org>
+ PR middle-end/80692
+ * gcc.c-torture/execute/pr80692.c: New testcase.
+
+ 2017-06-09 Segher Boessenkool <segher@kernel.crashing.org>
+ PR target/80966
+ * gcc.target/powerpc/stack-limit.c: New testcase.
+
+2017-06-23 Thomas Preud'homme <thomas.preudhomme@arm.com>
+
+ Backport from mainline
+ 2017-05-04 Prakhar Bahuguna <prakhar.bahuguna@arm.com>
+
+ * gcc.target/arm/fpscr.c: New file.
+
+2017-06-22 Martin Liska <mliska@suse.cz>
+
+ Backport from mainline
+ 2017-05-26 Martin Liska <mliska@suse.cz>
+
+ PR ipa/80663
+ * g++.dg/ipa/pr80212.C: Remove the test as it does not longer
+ split at the problematic spot.
+ * gcc.dg/ipa/pr48195.c: Change 101 to 100 as 101 is no longer
+ a valid value of the param.
+
+2017-06-09 Janus Weil <janus@gcc.gnu.org>
+
+ Backport from trunk
+ PR fortran/70601
+ * gfortran.dg/proc_ptr_comp_50.f90: New test.
+
+2017-06-08 Jakub Jelinek <jakub@redhat.com>
+
+ PR c/81006
+ * c-c++-common/gomp/pr81006.c: New test.
+
+2017-06-06 David S. Miller <davem@davemloft.net>
+
+ * gcc.target/sparc/sparc-ret-3.c: New test.
+
+2017-05-30 Jakub Jelinek <jakub@redhat.com>
+
+ Backported from mainline
+ 2017-04-11 Jakub Jelinek <jakub@redhat.com>
+
+ PR rtl-optimization/80385
+ * g++.dg/opt/pr80385.C: New test.
+
+ PR c++/80363
+ * g++.dg/ext/pr80363.C: New test.
+
+ 2017-04-10 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/80176
+ * g++.dg/init/ref23.C: New test.
+
+ 2017-04-04 Jakub Jelinek <jakub@redhat.com>
+
+ PR target/80286
+ * gcc.target/i386/avx-pr80286.c: New test.
+ * gcc.dg/pr80286.c: New test.
+
+ 2017-03-31 Jakub Jelinek <jakub@redhat.com>
+
+ PR debug/80025
+ * gcc.dg/torture/pr80025.c: New test.
+
+ 2017-03-27 Jakub Jelinek <jakub@redhat.com>
+
+ PR sanitizer/80168
+ * gcc.dg/asan/pr80168.c: New test.
+
+ 2017-03-24 Jakub Jelinek <jakub@redhat.com>
+
+ PR rtl-optimization/80112
+ * gcc.dg/pr80112.c: New test.
+
+ 2017-03-22 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/80141
+ * g++.dg/gomp/pr80141.C: New test.
+
+ PR c++/80129
+ * g++.dg/torture/pr80129.C: New test.
+
+ 2017-03-21 Jakub Jelinek <jakub@redhat.com>
+
+ PR c/80097
+ * gcc.dg/ubsan/pr80097.c: New test.
+
+ 2017-03-10 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/79896
+ * g++.dg/ext/int128-5.C: New test.
+
+ 2017-03-09 Jakub Jelinek <jakub@redhat.com>
+
+ PR sanitizer/79944
+ * c-c++-common/asan/pr79944.c: New test.
+
+ PR target/79932
+ * gcc.target/i386/pr79932-2.c: New test.
+
+ PR target/79932
+ * gcc.target/i386/pr79932-1.c: New test.
+
+ 2017-03-07 Jakub Jelinek <jakub@redhat.com>
+
+ PR rtl-optimization/79901
+ * gcc.target/i386/pr79901.c: New test.
+
+ 2017-03-03 Jakub Jelinek <jakub@redhat.com>
+
+ PR target/79807
+ * gcc.target/i386/pr79807.c: New test.
+
+ 2017-02-28 Jakub Jelinek <jakub@redhat.com>
+
+ PR target/79729
+ * gcc.target/i386/pr79729.c: New test.
+
+ 2017-02-25 Jakub Jelinek <jakub@redhat.com>
+
+ PR middle-end/79396
+ * g++.dg/opt/pr79396.C: New test.
+
+ 2017-02-22 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/79664
+ * g++.dg/gomp/pr79664.C: New test.
+
+ 2017-02-21 Jakub Jelinek <jakub@redhat.com>
+
+ PR target/79570
+ * gcc.dg/pr79570.c: New test.
+
+ PR c++/79641
+ * c-c++-common/pr79641.c: New test.
+
+ PR target/79494
+ * gcc.dg/pr79494.c: New test.
+
+ 2017-02-20 Jakub Jelinek <jakub@redhat.com>
+
+ PR target/79568
+ * gcc.target/i386/pr79568-1.c: New test.
+ * gcc.target/i386/pr79568-2.c: New test.
+ * gcc.target/i386/pr79568-3.c: New test.
+
+ 2017-02-18 Jakub Jelinek <jakub@redhat.com>
+
+ PR target/79559
+ * gcc.target/i386/pr79559.c: New test.
+
+ 2017-02-16 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/79512
+ * c-c++-common/gomp/pr79512.c: New test.
+
+ 2017-02-10 Jakub Jelinek <jakub@redhat.com>
+
+ PR tree-optimization/79411
+ * gcc.c-torture/compile/pr79411.c: New test.
+
+ 2017-02-02 Jakub Jelinek <jakub@redhat.com>
+
+ PR target/79197
+ * gcc.target/powerpc/pr79197.c: New test.
+ * gcc.c-torture/compile/pr79197.c: New test.
+
+ 2017-01-11 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/78341
+ * g++.dg/cpp0x/pr78341.C: New test.
+
+ PR middle-end/50199
+ * gcc.dg/lto/pr50199_0.c: New test.
+
+ 2017-01-04 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/78949
+ * c-c++-common/Wunused-var-16.c: New test.
+
+ 2016-12-21 Jakub Jelinek <jakub@redhat.com>
+
+ PR fortran/78866
+ * gfortran.dg/gomp/map-1.f90: Add expected error.
+ * gfortran.dg/gomp/pr78866-1.f90: New test.
+ * gfortran.dg/gomp/pr78866-2.f90: New test.
+
+ PR c/77767
+ * gcc.c-torture/execute/pr77767.c: New test.
+
+ 2016-12-13 Jakub Jelinek <jakub@redhat.com>
+
+ PR ipa/77905
+ * g++.dg/ipa/pr77905.C: New test.
+
+ 2016-12-14 Jakub Jelinek <jakub@redhat.com>
+
+ PR target/78796
+ * gcc.dg/tls/pr78796.c: New test.
+
+ 2016-12-02 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/78649
+ * g++.dg/cpp0x/pr78649.C: New test.
+
+ 2016-11-28 Jakub Jelinek <jakub@redhat.com>
+
+ PR fortran/78298
+ * gfortran.dg/gomp/pr78298.f90: New test.
+
+ 2016-11-23 Jakub Jelinek <jakub@redhat.com>
+
+ PR middle-end/69183
+ * gfortran.dg/gomp/pr69183.f90: New test.
+
+ PR c++/77739
+ * g++.dg/cpp1y/pr77739.C: New test.
+
+ 2016-11-22 Jakub Jelinek <jakub@redhat.com>
+
+ PR middle-end/78416
+ * gcc.dg/torture/pr78416.c: New test.
+
+ 2016-11-21 Jakub Jelinek <jakub@redhat.com>
+
+ PR middle-end/67335
+ * g++.dg/vect/simd-clone-7.cc: New test.
+
+ 2016-11-18 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/77285
+ * g++.dg/tls/pr77285-1.C: New test.
+ * g++.dg/tls/pr77285-2.C: New test.
+
+ 2016-11-16 Jakub Jelinek <jakub@redhat.com>
+
+ PR rtl-optimization/78378
+ * gcc.c-torture/execute/pr78378.c: New test.
+
+ 2016-11-07 Jakub Jelinek <jakub@redhat.com>
+
+ PR target/78227
+ * gcc.target/i386/pr78227-1.c: New test.
+ * gcc.target/i386/pr78227-2.c: New test.
+
+ 2016-10-31 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/78089
+ * c-c++-common/builtin-shuffle-1.c: New test.
+
+ 2016-10-29 Jakub Jelinek <jakub@redhat.com>
+
+ PR rtl-optimization/77919
+ * g++.dg/torture/pr77919-2.C: New test.
+
+ 2016-10-28 Jakub Jelinek <jakub@redhat.com>
+
+ PR rtl-optimization/77919
+ * g++.dg/torture/pr77919.C: New test.
+
+ 2016-10-05 Jakub Jelinek <jakub@redhat.com>
+
+ PR sanitizer/66343
+ * gcc.dg/pch/pr66343-1.c: New test.
+ * gcc.dg/pch/pr66343-1.hs: New file.
+ * gcc.dg/pch/pr66343-2.c: New test.
+ * gcc.dg/pch/pr66343-2.hs: New file.
+
+ 2016-09-28 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/77467
+ * g++.dg/cpp1y/constexpr-77467.C: New test.
+
+ 2016-09-27 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/77722
+ * g++.dg/ubsan/return-4.C: New test.
+ * g++.dg/ubsan/return-5.C: New test.
+ * g++.dg/ubsan/return-6.C: New test.
+
+ PR fortran/77666
+ * gfortran.dg/gomp/pr77666.f90: New test.
+
+ 2016-09-22 Jakub Jelinek <jakub@redhat.com>
+
+ PR fortran/77665
+ * gfortran.dg/gomp/pr77665.f90: New test.
+
+ 2016-09-20 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/77637
+ * g++.dg/cpp0x/gen-attrs-62.C: New test.
+
+ PR middle-end/77624
+ * c-c++-common/pr77624-1.c: New test.
+ * c-c++-common/pr77624-2.c: New test.
+
+ 2016-09-19 Jakub Jelinek <jakub@redhat.com>
+ Jan Hubicka <jh@suse.cz>
+
+ PR target/77587
+ * gcc.dg/pr77587.c: New test.
+ * gcc.dg/pr77587a.c: New file.
+
+ 2016-09-16 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/77375
+ * g++.dg/cpp0x/mutable1.C: New test.
+
+ 2016-09-16 Jakub Jelinek <jakub@redhat.com>
+ Eric Botcazou <ebotcazou@adacore.com>
+
+ PR middle-end/77594
+ * gcc.target/i386/pr77594.c: New test.
+
+ 2016-09-14 Jakub Jelinek <jakub@redhat.com>
+
+ PR sanitizer/68260
+ * c-c++-common/tsan/pr68260.c: New test.
+
+ 2016-09-08 Jakub Jelinek <jakub@redhat.com>
+
+ PR fortran/77500
+ * gfortran.dg/gomp/pr77500.f90: New test.
+
+ PR fortran/77516
+ * gfortran.dg/gomp/pr77516.f90: New test.
+
+ 2016-09-05 Jakub Jelinek <jakub@redhat.com>
+
+ PR sanitizer/77396
+ * g++.dg/asan/pr77396-2.C: New test.
+
+ 2016-09-02 Jakub Jelinek <jakub@redhat.com>
+
+ PR sanitizer/77396
+ * g++.dg/asan/pr77396.C: New test.
+
+ 2016-08-30 Jakub Jelinek <jakub@redhat.com>
+
+ PR debug/77363
+ * g++.dg/debug/dwarf2/pr77363.C: New test.
+
+ PR middle-end/77377
+ * gcc.target/i386/pr77377.c: New test.
+
+ 2016-08-16 Jakub Jelinek <jakub@redhat.com>
+
+ PR target/71910
+ * g++.dg/gomp/pr71910.C: New test.
+
+ 2016-08-15 Jakub Jelinek <jakub@redhat.com>
+
+ PR tree-optimization/72824
+ * gcc.c-torture/execute/ieee/pr72824-2.c: New test.
+
+ 2016-08-12 Jakub Jelinek <jakub@redhat.com>
+
+ PR c/67410
+ * gcc.dg/pr67410.c: New test.
+
+ 2016-08-11 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/72868
+ * g++.dg/cpp1y/constexpr-switch4.C: New test.
+
+ PR c/72816
+ * gcc.dg/pr72816.c: Remove dg-error.
+
+ 2016-08-09 Jakub Jelinek <jakub@redhat.com>
+
+ PR tree-optimization/72824
+ * gcc.c-torture/execute/ieee/pr72824.c: New test.
+
+ 2016-08-07 Jakub Jelinek <jakub@redhat.com>
+
+ PR c/72816
+ * gcc.dg/pr72816.c: New test.
+
+2017-05-29 Martin Liska <mliska@suse.cz>
+
+ Backport from mainline
+ 2017-04-24 Martin Liska <mliska@suse.cz>
+
+ PR middle-end/79931
+ * g++.dg/ipa/pr79931.C: New test.
+
+2017-05-29 Martin Liska <mliska@suse.cz>
+
+ Backport from mainline
+ 2017-04-11 Martin Liska <mliska@suse.cz>
+
+ PR ipa/80212
+ * g++.dg/ipa/pr80212.C: New test.
+
+2017-05-29 Martin Liska <mliska@suse.cz>
+
+ Backport from mainline
+ 2017-04-11 Martin Liska <mliska@suse.cz>
+
+ PR sanitizer/70878
+ * gcc.dg/ubsan/pr70878.c: New test.
+
+2017-05-29 Martin Liska <mliska@suse.cz>
+
+ Backport from mainline
+ 2017-04-06 Martin Liska <mliska@suse.cz>
+
+ PR sanitizer/80166
+ * gcc.dg/asan/pr80166.c: New test.
+
+2017-05-29 Martin Liska <mliska@suse.cz>
+
+ Backport from mainline
+ 2017-03-28 Martin Liska <mliska@suse.cz>
+
+ PR ipa/80205
+ * g++.dg/ipa/pr80205.C: New test.
+
+2017-05-29 Martin Liska <mliska@suse.cz>
+
+ Backport from mainline
+ 2017-03-28 Martin Liska <mliska@suse.cz>
+
+ PR ipa/80104
+ * gcc.dg/ipa/pr80104.c: New test.
+
+2017-05-19 Uros Bizjak <ubizjak@gmail.com>
+
+ Backport from mainline
+ 2017-05-18 Uros Bizjak <ubizjak@gmail.com>
+
+ PR target/80799
+ * g++.dg/other/i386-11.C: New test.
+
+2017-05-15 Richard Biener <rguenther@suse.de>
+
+ Revert backport of
+ PR middle-end/80222
+ * g++.dg/pr80222.C: New testcase.
+
+2017-05-10 Richard Biener <rguenther@suse.de>
+
+ Backport from mainline
+ 2017-03-02 Richard Biener <rguenther@suse.de>
+
+ PR c/79756
+ * gcc.dg/vector-1.c: New testcase.
+
+ 2017-02-28 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/79732
+ * gcc.dg/torture/pr79732.c: New testcase.
+
+ 2017-02-22 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/79666
+ * gcc.dg/torture/pr79666.c: New testcase.
+
+2017-05-10 Richard Biener <rguenther@suse.de>
+
+ Backport from mainline
+ 2017-03-21 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/80122
+ * gcc.dg/torture/pr80122.c: New testcase.
+
+ 2017-03-28 Richard Biener <rguenther@suse.de>
+
+ PR middle-end/80222
+ * g++.dg/pr80222.C: New testcase.
+
+ 2017-04-06 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/80334
+ * g++.dg/torture/pr80334.C: New testcase.
+
+ 2017-04-27 Richard Biener <rguenther@suse.de>
+
+ PR middle-end/80539
+ * gcc.dg/torture/pr80539.c: New testcase.
+
2016-05-08 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
Backport from mainline
@@ -49,8 +826,8 @@
Backport from mainline
2017-03-30 Martin Jambor <mjambor@suse.cz>
- PR ipa/77333
- * g++.dg/ipa/pr77333.C: New test.
+ PR ipa/77333
+ * g++.dg/ipa/pr77333.C: New test.
2017-04-11 Bin Cheng <bin.cheng@arm.com>
@@ -99,6 +876,7 @@
(diex, diexq): Update argument type.
* gcc.target/powerpc/pr80246.c: New test.
+>>>>>>> .r248557
2017-03-22 Martin Liska <mliska@suse.cz>
Backport from mainline
@@ -485,8 +1263,8 @@
Backport from mainline
2016-11-07 Bernd Schmidt <bschmidt@redhat.com>
- PR rtl-optimization/77309
- * gcc.dg/torture/pr77309.c: New test.
+ PR rtl-optimization/77309
+ * gcc.dg/torture/pr77309.c: New test.
2016-12-08 Nathan Sidwell <nathan@acm.org>
@@ -551,7 +1329,7 @@
* gfortran.dg/extends_type_of_3.f90: Fix and extend the test case.
2016-11-20 Harald Anlauf <anlauf@gmx.de>
-
+
PR fortran/69741
* gfortran.dg/forall_18.f90: New testcase.
diff --git a/gcc/testsuite/c-c++-common/Wunused-var-16.c b/gcc/testsuite/c-c++-common/Wunused-var-16.c
new file mode 100644
index 00000000000..98e66a72380
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/Wunused-var-16.c
@@ -0,0 +1,15 @@
+/* PR c++/78949 */
+/* { dg-do compile } */
+/* { dg-options "-Wunused" } */
+
+typedef unsigned char V __attribute__((vector_size(16)));
+V v;
+
+void
+foo ()
+{
+ V y = {};
+ V x = {}; // { dg-bogus "set but not used" }
+ y &= ~x;
+ v = y;
+}
diff --git a/gcc/testsuite/c-c++-common/asan/pr79944.c b/gcc/testsuite/c-c++-common/asan/pr79944.c
new file mode 100644
index 00000000000..62c56981b20
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/asan/pr79944.c
@@ -0,0 +1,18 @@
+/* PR sanitizer/79944 */
+/* { dg-do run } */
+
+struct S { int i; char p[1024]; };
+
+int
+main ()
+{
+ struct S *p = (struct S *) __builtin_malloc (__builtin_offsetof (struct S, p) + 64);
+ p->i = 5;
+ asm volatile ("" : "+r" (p) : : "memory");
+ __atomic_fetch_add ((int *) p, 5, __ATOMIC_RELAXED);
+ asm volatile ("" : "+r" (p) : : "memory");
+ if (p->i != 10)
+ __builtin_abort ();
+ __builtin_free (p);
+ return 0;
+}
diff --git a/gcc/testsuite/c-c++-common/builtin-shuffle-1.c b/gcc/testsuite/c-c++-common/builtin-shuffle-1.c
new file mode 100644
index 00000000000..30fd69082dd
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/builtin-shuffle-1.c
@@ -0,0 +1,22 @@
+/* PR c++/78089 */
+/* { dg-do run } */
+
+typedef int V __attribute__((vector_size (16)));
+V a, b, c;
+
+int
+foo ()
+{
+ return __builtin_shuffle (a, b, c)[3];
+}
+
+int
+main ()
+{
+ a = (V) { 1, 2, 3, 4 };
+ b = (V) { 5, 6, 7, 8 };
+ c = (V) { 7, 2, 5, 6 };
+ if (foo () != 7)
+ __builtin_abort ();
+ return 0;
+}
diff --git a/gcc/testsuite/c-c++-common/gomp/pr79512.c b/gcc/testsuite/c-c++-common/gomp/pr79512.c
new file mode 100644
index 00000000000..19ddfaffc36
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/gomp/pr79512.c
@@ -0,0 +1,14 @@
+/* PR c++/79512 */
+/* { dg-options "-fopenmp-simd" } */
+
+void
+foo (void)
+{
+ #pragma omp target
+ #pragma omp teams
+ {
+ int i;
+ for (i = 0; i < 10; i++)
+ ;
+ }
+}
diff --git a/gcc/testsuite/c-c++-common/gomp/pr81006.c b/gcc/testsuite/c-c++-common/gomp/pr81006.c
new file mode 100644
index 00000000000..d0feaaf2603
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/gomp/pr81006.c
@@ -0,0 +1,10 @@
+/* PR c/81006 */
+/* { dg-do compile } */
+
+int a[] = {};
+
+void foo()
+{
+ #pragma omp task depend(out: a[:]) /* { dg-error "zero length array section in .depend. clause" "" { xfail *-*-* } } */
+ {}
+}
diff --git a/gcc/testsuite/c-c++-common/pr77624-1.c b/gcc/testsuite/c-c++-common/pr77624-1.c
new file mode 100644
index 00000000000..f3c095649aa
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/pr77624-1.c
@@ -0,0 +1,14 @@
+/* PR middle-end/77624 */
+/* { dg-do compile } */
+
+int
+foo (int a)
+{
+ return __atomic_is_lock_free (2, a); /* { dg-warning "pointer from integer" "" { target c } } */
+} /* { dg-error "invalid conversion" "" { target c++ } 7 } */
+
+int
+bar (int a)
+{
+ return __atomic_always_lock_free (2, a); /* { dg-warning "pointer from integer" "" { target c } } */
+} /* { dg-error "invalid conversion" "" { target c++ } 13 } */
diff --git a/gcc/testsuite/c-c++-common/pr77624-2.c b/gcc/testsuite/c-c++-common/pr77624-2.c
new file mode 100644
index 00000000000..64d20e0eb6a
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/pr77624-2.c
@@ -0,0 +1,26 @@
+/* PR middle-end/77624 */
+/* { dg-do compile } */
+
+void
+foo (int *a)
+{
+ double b = 0;
+ __atomic_is_lock_free (2, a, 2); /* { dg-error "too many arguments" } */
+ __atomic_is_lock_free (2); /* { dg-error "too few arguments" } */
+ __atomic_is_lock_free (2, b); /* { dg-error "incompatible type" "" { target c } } */
+ /* { dg-message "expected" "" { target c } 10 } */
+ /* { dg-error "convert" "" { target c++ } 10 } */
+ __atomic_is_lock_free (2, 0);
+}
+
+void
+bar (int *a)
+{
+ double b = 0;
+ __atomic_always_lock_free (2, a, 2); /* { dg-error "too many arguments" } */
+ __atomic_always_lock_free (2); /* { dg-error "too few arguments" } */
+ __atomic_always_lock_free (2, b); /* { dg-error "incompatible type" "" { target c } } */
+ /* { dg-message "expected" "" { target c } 22 } */
+ /* { dg-error "convert" "" { target c++ } 22 } */
+ __atomic_always_lock_free (2, 0);
+}
diff --git a/gcc/testsuite/c-c++-common/pr79641.c b/gcc/testsuite/c-c++-common/pr79641.c
new file mode 100644
index 00000000000..5d2c9b4d38b
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/pr79641.c
@@ -0,0 +1,4 @@
+/* PR c++/79641 */
+/* { dg-do compile } */
+
+const int __attribute__((__mode__ (__QI__))) i = 0;
diff --git a/gcc/testsuite/c-c++-common/pr81052.c b/gcc/testsuite/c-c++-common/pr81052.c
new file mode 100644
index 00000000000..6bc2879951e
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/pr81052.c
@@ -0,0 +1,28 @@
+/* PR middle-end/81052 */
+/* { dg-do compile } */
+/* { dg-options "-fopenmp-simd -O2" } */
+
+int
+foo (int x, int y)
+{
+ int i;
+#pragma omp simd
+ for (i = x; i < y; ++i)
+ return 0; /* { dg-error "invalid branch to/from OpenMP structured block" } */
+ return 1;
+}
+
+#ifdef __cplusplus
+template <typename T>
+T
+bar (T x, T y)
+{
+ T i;
+#pragma omp simd
+ for (i = x; i < y; ++i)
+ return 0; /* { dg-error "invalid branch to/from OpenMP structured block" "" { target c++ } } */
+ return 1;
+}
+
+int x = bar (1, 7);
+#endif
diff --git a/gcc/testsuite/c-c++-common/pr82112.c b/gcc/testsuite/c-c++-common/pr82112.c
new file mode 100644
index 00000000000..724d74cb33d
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/pr82112.c
@@ -0,0 +1,13 @@
+/* PR target/82112 */
+/* { dg-do compile } */
+
+int c[10], d[10], e[10], f[10], g[10], h[10], i[10], j[10], k[10], l[10];
+
+void
+foo (void)
+{
+ __atomic_load (c, d, __ATOMIC_ACQUIRE);
+ __atomic_store (e, f, __ATOMIC_SEQ_CST);
+ __atomic_exchange (g, h, i, __ATOMIC_RELAXED);
+ __atomic_compare_exchange (j, k, l, 1, __ATOMIC_RELAXED, __ATOMIC_RELAXED);
+}
diff --git a/gcc/testsuite/c-c++-common/tsan/pr68260.c b/gcc/testsuite/c-c++-common/tsan/pr68260.c
new file mode 100644
index 00000000000..86ffd2b2823
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/tsan/pr68260.c
@@ -0,0 +1,28 @@
+/* PR sanitizer/68260 */
+
+#include <pthread.h>
+#include <stdbool.h>
+
+bool lock;
+int counter;
+
+void *
+tf (void *arg)
+{
+ (void) arg;
+ while (__atomic_test_and_set (&lock, __ATOMIC_ACQUIRE))
+ ;
+ ++counter;
+ __atomic_clear (&lock, __ATOMIC_RELEASE);
+ return (void *) 0;
+}
+
+int
+main ()
+{
+ pthread_t thr;
+ pthread_create (&thr, 0, tf, 0);
+ tf ((void *) 0);
+ pthread_join (thr, 0);
+ return 0;
+}
diff --git a/gcc/testsuite/c-c++-common/ubsan/float-cast-overflow-1.c b/gcc/testsuite/c-c++-common/ubsan/float-cast-overflow-1.c
index cd6941c9d30..aae88aa3180 100644
--- a/gcc/testsuite/c-c++-common/ubsan/float-cast-overflow-1.c
+++ b/gcc/testsuite/c-c++-common/ubsan/float-cast-overflow-1.c
@@ -1,6 +1,7 @@
/* { dg-do run { target { lp64 || ilp32 } } } */
/* { dg-options "-fsanitize=float-cast-overflow" } */
-/* { dg-additional-options "-msse2 -mfpmath=sse" { target { sse2_runtime && ia32 } } } */
+/* { dg-additional-options "-ffloat-store" { target { ia32 } } } */
+/* { dg-additional-options "-mieee" { target { { alpha*-*-* } || { sh*-*-* } } } } */
#include <limits.h>
#include "float-cast.h"
diff --git a/gcc/testsuite/c-c++-common/ubsan/pr81604.c b/gcc/testsuite/c-c++-common/ubsan/pr81604.c
new file mode 100644
index 00000000000..a06de76b023
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/ubsan/pr81604.c
@@ -0,0 +1,31 @@
+/* PR sanitizer/81604 */
+/* { dg-do run } */
+/* { dg-options "-fsanitize=bounds,signed-integer-overflow" } */
+
+long a[10];
+
+__attribute__((noinline, noclone)) long *
+foo (int i)
+{
+ return &a[i];
+}
+
+__attribute__((noinline, noclone)) long
+bar (long x, long y)
+{
+ return x * y;
+}
+
+int
+main ()
+{
+ volatile int i = -1;
+ volatile long l = __LONG_MAX__;
+ long *volatile p;
+ p = foo (i);
+ l = bar (l, l);
+ return 0;
+}
+
+/* { dg-output "index -1 out of bounds for type 'long int \\\[10\\\]'\[^\n\r]*(\n|\r\n|\r)" } */
+/* { dg-output "\[^\n\r]*signed integer overflow: \[0-9]+ \\* \[0-9]+ cannot be represented in type 'long int'" } */
diff --git a/gcc/testsuite/g++.dg/asan/pr77396-2.C b/gcc/testsuite/g++.dg/asan/pr77396-2.C
new file mode 100644
index 00000000000..0570a14940e
--- /dev/null
+++ b/gcc/testsuite/g++.dg/asan/pr77396-2.C
@@ -0,0 +1,12 @@
+// PR sanitizer/77396
+// { dg-do run }
+// { dg-set-target-env-var ASAN_OPTIONS "check_initialization_order=true" }
+
+struct S { S () { asm volatile ("" : : : "memory"); } };
+static S c;
+
+int
+main ()
+{
+ return 0;
+}
diff --git a/gcc/testsuite/g++.dg/asan/pr77396.C b/gcc/testsuite/g++.dg/asan/pr77396.C
new file mode 100644
index 00000000000..3b3195ec1ec
--- /dev/null
+++ b/gcc/testsuite/g++.dg/asan/pr77396.C
@@ -0,0 +1,12 @@
+// PR sanitizer/77396
+// { dg-do run }
+// { dg-set-target-env-var ASAN_OPTIONS "check_initialization_order=true" }
+
+static int a = 0;
+static int b = a;
+
+int
+main ()
+{
+ return 0;
+}
diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-list1.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-list1.C
new file mode 100644
index 00000000000..f831a112cc9
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-list1.C
@@ -0,0 +1,15 @@
+// PR c++/72457
+// { dg-do compile { target c++11 } }
+
+struct A {
+ int i;
+ constexpr A(): i(0) {}
+};
+
+struct B: A { };
+
+struct C
+{
+ B b;
+ constexpr C() : b{} {}
+};
diff --git a/gcc/testsuite/g++.dg/cpp0x/gen-attrs-62.C b/gcc/testsuite/g++.dg/cpp0x/gen-attrs-62.C
new file mode 100644
index 00000000000..5bd8778707b
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/gen-attrs-62.C
@@ -0,0 +1,5 @@
+// PR c++/77637
+// { dg-do compile { target c++11 } }
+
+int [[...]] a; // { dg-error "expected attribute before '...'" }
+int [[,,...]] b; // { dg-error "expected attribute before '...'" }
diff --git a/gcc/testsuite/g++.dg/cpp0x/initlist-base2.C b/gcc/testsuite/g++.dg/cpp0x/initlist-base2.C
new file mode 100644
index 00000000000..68ccad908c8
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/initlist-base2.C
@@ -0,0 +1,21 @@
+// PR c++/55922
+// { dg-do run { target c++11 } }
+
+bool called = false;
+
+struct Base {
+ Base() { if (called) throw 1; called = true; }
+};
+
+struct B1 : virtual Base {
+ B1() { }
+};
+
+struct C : B1, virtual Base {
+ C() : B1{}
+ { }
+};
+
+int main() {
+ C c;
+}
diff --git a/gcc/testsuite/g++.dg/cpp0x/initlist-base3.C b/gcc/testsuite/g++.dg/cpp0x/initlist-base3.C
new file mode 100644
index 00000000000..145b975c117
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/initlist-base3.C
@@ -0,0 +1,17 @@
+// PR c++/71774
+// { dg-do compile { target c++11 } }
+
+class Meow
+{
+ protected:
+ Meow() =default;
+ virtual void f() {}
+};
+
+class Purr : public Meow
+{
+ public:
+ Purr()
+ : Meow{}
+ {}
+};
diff --git a/gcc/testsuite/g++.dg/cpp0x/mutable1.C b/gcc/testsuite/g++.dg/cpp0x/mutable1.C
new file mode 100644
index 00000000000..4dd37185d72
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/mutable1.C
@@ -0,0 +1,12 @@
+// PR c++/77375
+// { dg-do run { target c++11 } }
+
+struct Base { mutable int i; };
+struct Derived : Base {};
+const Derived foo{};
+
+int
+main ()
+{
+ foo.i = 42;
+}
diff --git a/gcc/testsuite/g++.dg/cpp0x/pr78341.C b/gcc/testsuite/g++.dg/cpp0x/pr78341.C
new file mode 100644
index 00000000000..af906384098
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/pr78341.C
@@ -0,0 +1,4 @@
+// PR c++/78341
+// { dg-do compile { target c++11 } }
+
+alignas (alignas double // { dg-error "" }
diff --git a/gcc/testsuite/g++.dg/cpp0x/pr78649.C b/gcc/testsuite/g++.dg/cpp0x/pr78649.C
new file mode 100644
index 00000000000..43bcb64f135
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/pr78649.C
@@ -0,0 +1,16 @@
+// PR c++/78649
+// { dg-do compile { target c++11 } }
+
+template <class> void foo ();
+template <class T, class... U>
+void
+test ()
+{
+ T t (foo<U>...); // { dg-error "declared void" }
+}
+
+int
+main ()
+{
+ test<void> ();
+}
diff --git a/gcc/testsuite/g++.dg/cpp1y/constexpr-77467.C b/gcc/testsuite/g++.dg/cpp1y/constexpr-77467.C
new file mode 100644
index 00000000000..fd94e78a03b
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp1y/constexpr-77467.C
@@ -0,0 +1,128 @@
+// PR c++/77467
+// { dg-do compile { target c++14 } }
+
+constexpr int
+foo (const int x, const unsigned n) noexcept
+{
+ switch (n)
+ {
+ case 0:
+ return 1;
+ case 1:
+ return x;
+ default:
+ const auto m = (n >> 1);
+ const auto y = foo (x, m);
+ return ((m << 1) == n) ? y * y : x * y * y;
+ }
+}
+
+static_assert (foo (3, 2) == 9, "");
+static_assert (foo (2, 3) == 8, "");
+
+constexpr int
+bar (int x)
+{
+ int a = x;
+ switch (x)
+ a = x + 1;
+ return a;
+}
+
+static_assert (bar (0) == 0, "");
+static_assert (bar (1) == 1, "");
+
+constexpr int
+baz (const int x, int y) noexcept
+{
+ switch (x)
+ {
+ case 0:
+ return 1;
+ case 1:
+ return x;
+ case 2:
+ if ((y += 2) == 0)
+ {
+ case 3:
+ y += 4;
+ break;
+ }
+ else
+ {
+ case 4:
+ y += 8;
+ break;
+ }
+ break;
+ case 5:
+ for (y = 0; y < 3; y++)
+ {
+ case 7:
+ if (y == -4)
+ y += 3;
+ if (y == -3)
+ continue;
+ if (y == -2)
+ {
+ y += 18;
+ break;
+ }
+ if (y == 2)
+ {
+ case 6:
+ y += 12;
+ default:
+ y++;
+ break;
+ }
+ }
+ break;
+ case -1:
+ case -2:
+ switch (y)
+ {
+ case 19:
+ y += 2;
+ break;
+ case 20:
+ y += 3;
+ if (x == 2)
+ case 21:;
+ y += 2;
+ if (x == 3)
+ default:;
+ y += 4;
+ break;
+ }
+ return x + y + 1;
+ }
+ return x + y;
+}
+
+static_assert (baz (0, 7) == 1, "");
+static_assert (baz (1, 7) == 1, "");
+static_assert (baz (2, -2) == 6, "");
+static_assert (baz (2, 0) == 12, "");
+static_assert (baz (3, 1) == 8, "");
+static_assert (baz (4, 2) == 14, "");
+static_assert (baz (5, -20) == 20, "");
+static_assert (baz (6, 5) == 24, "");
+static_assert (baz (7, -5) == 22, "");
+static_assert (baz (7, -4) == 22, "");
+static_assert (baz (7, -3) == 23, "");
+static_assert (baz (7, -2) == 23, "");
+static_assert (baz (7, -1) == 22, "");
+static_assert (baz (7, 0) == 22, "");
+static_assert (baz (7, 2) == 22, "");
+static_assert (baz (7, 6) == 14, "");
+static_assert (baz (8, 9) == 18, "");
+static_assert (baz (8, -2) == 7, "");
+static_assert (baz (-1, 19) == 21, "");
+static_assert (baz (-1, 20) == 29, "");
+static_assert (baz (-1, 21) == 27, "");
+static_assert (baz (-1, 5) == 9, "");
+static_assert (baz (-2, 19) == 20, "");
+static_assert (baz (-2, 20) == 28, "");
+static_assert (baz (-2, 21) == 26, "");
+static_assert (baz (-2, 5) == 8, "");
diff --git a/gcc/testsuite/g++.dg/cpp1y/constexpr-empty3.C b/gcc/testsuite/g++.dg/cpp1y/constexpr-empty3.C
new file mode 100644
index 00000000000..37e4a53a7a9
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp1y/constexpr-empty3.C
@@ -0,0 +1,14 @@
+// PR c++/80294
+// { dg-do compile { target c++14 } }
+// { dg-final { scan-assembler-not "static_init" } }
+
+struct A {
+ constexpr int f() { A a = *this; return 42; }
+};
+struct B: A
+{
+ int i;
+ constexpr B(): i(f()) {}
+};
+
+B b;
diff --git a/gcc/testsuite/g++.dg/cpp1y/constexpr-switch4.C b/gcc/testsuite/g++.dg/cpp1y/constexpr-switch4.C
new file mode 100644
index 00000000000..383bde934be
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp1y/constexpr-switch4.C
@@ -0,0 +1,27 @@
+// PR c++/72868
+// { dg-do compile }
+// { dg-options "-std=gnu++14" }
+
+constexpr int
+foo (int i)
+{
+ switch (i)
+ {
+ case 11 ... 12:
+ return 4;
+ case 0 ... 9:
+ return 3;
+ default:
+ return 7;
+ }
+}
+
+#define SA(X) static_assert((X),#X)
+SA (foo (-1) == 7);
+SA (foo (0) == 3);
+SA (foo (3) == 3);
+SA (foo (9) == 3);
+SA (foo (10) == 7);
+SA (foo (11) == 4);
+SA (foo (12) == 4);
+SA (foo (13) == 7);
diff --git a/gcc/testsuite/g++.dg/cpp1y/feat-cxx11.C b/gcc/testsuite/g++.dg/cpp1y/feat-cxx11.C
index 53e7ded39dd..492df56a8b1 100644
--- a/gcc/testsuite/g++.dg/cpp1y/feat-cxx11.C
+++ b/gcc/testsuite/g++.dg/cpp1y/feat-cxx11.C
@@ -125,6 +125,12 @@
# error "__cpp_alias_templates != 200704"
#endif
+#ifndef __cpp_threadsafe_static_init
+# error "__cpp_threadsafe_static_init"
+#elif __cpp_threadsafe_static_init != 200806
+# error "__cpp_threadsafe_static_init != 200806"
+#endif
+
// C++14 features allowed in C++11 in non-ANSI modes:
#ifndef __cpp_binary_literals
diff --git a/gcc/testsuite/g++.dg/cpp1y/feat-cxx14.C b/gcc/testsuite/g++.dg/cpp1y/feat-cxx14.C
index 29b07948fff..346433122ea 100644
--- a/gcc/testsuite/g++.dg/cpp1y/feat-cxx14.C
+++ b/gcc/testsuite/g++.dg/cpp1y/feat-cxx14.C
@@ -119,6 +119,12 @@
# error "__cpp_alias_templates != 200704"
#endif
+#ifndef __cpp_threadsafe_static_init
+# error "__cpp_threadsafe_static_init"
+#elif __cpp_threadsafe_static_init != 200806
+# error "__cpp_threadsafe_static_init != 200806"
+#endif
+
// C++14 features:
#ifndef __cpp_binary_literals
diff --git a/gcc/testsuite/g++.dg/cpp1y/feat-cxx98.C b/gcc/testsuite/g++.dg/cpp1y/feat-cxx98.C
index d15e7aadcee..4db499cc2f4 100644
--- a/gcc/testsuite/g++.dg/cpp1y/feat-cxx98.C
+++ b/gcc/testsuite/g++.dg/cpp1y/feat-cxx98.C
@@ -15,6 +15,14 @@
# error "__cpp_exceptions != 199711"
#endif
+// C++11 features allowed in C++98:
+
+#ifndef __cpp_threadsafe_static_init
+# error "__cpp_threadsafe_static_init"
+#elif __cpp_threadsafe_static_init != 200806
+# error "__cpp_threadsafe_static_init != 200806"
+#endif
+
// C++14 features allowed in C++98 in non-ANSI modes:
#ifndef __cpp_binary_literals
diff --git a/gcc/testsuite/g++.dg/cpp1y/feat-neg.C b/gcc/testsuite/g++.dg/cpp1y/feat-neg.C
index 9f4a0412403..5e95418dfe4 100644
--- a/gcc/testsuite/g++.dg/cpp1y/feat-neg.C
+++ b/gcc/testsuite/g++.dg/cpp1y/feat-neg.C
@@ -1,5 +1,5 @@
// { dg-do compile }
-// { dg-options "-fno-rtti -fno-exceptions" }
+// { dg-options "-fno-rtti -fno-exceptions -fno-threadsafe-statics" }
// C++98 features with explicit opt-out:
@@ -10,3 +10,9 @@
#ifndef __cpp_exceptions
# error "__cpp_exceptions" // { dg-error "error" }
#endif
+
+// C++11 features with explicit opt-out:
+
+#ifndef __cpp_threadsafe_static_init
+# error "__cpp_threadsafe_static_init" // { dg-error "error" }
+#endif
diff --git a/gcc/testsuite/g++.dg/cpp1y/pr77739.C b/gcc/testsuite/g++.dg/cpp1y/pr77739.C
new file mode 100644
index 00000000000..96183305a7d
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp1y/pr77739.C
@@ -0,0 +1,15 @@
+// PR c++/77739
+// { dg-do compile { target c++14 } }
+
+struct A {
+ A();
+ A(const A &);
+};
+struct B {
+ B();
+ template <typename... Args> auto g(Args &&... p1) {
+ return [=] { f(p1...); };
+ }
+ void f(A, const char *);
+};
+B::B() { g(A(), ""); }
diff --git a/gcc/testsuite/g++.dg/debug/dwarf2/pr77363.C b/gcc/testsuite/g++.dg/debug/dwarf2/pr77363.C
new file mode 100644
index 00000000000..47b71433815
--- /dev/null
+++ b/gcc/testsuite/g++.dg/debug/dwarf2/pr77363.C
@@ -0,0 +1,20 @@
+// PR debug/77363
+// { dg-options "-gdwarf-2 -dA -fno-merge-debug-strings" }
+// { dg-final { scan-assembler "DIE \\(\[^\n\r\]*\\) DW_TAG_typedef\[^\n\r\]*\[\n\r]*\[^\n\r\]*type2\[^\n\r\]* DW_AT_name\[^\n\r\]*\[\n\r]*\[^\n\r\]* DW_AT_decl_file\[^\n\r\]*\[\n\r]*\[^\n\r\]* DW_AT_decl_line\[^\n\r\]*\[\n\r]*\[^\n\r\]* DW_AT_type" } }
+// { dg-final { scan-assembler "DIE \\(\[^\n\r\]*\\) DW_TAG_typedef\[^\n\r\]*\[\n\r]*\[^\n\r\]*type3\[^\n\r\]* DW_AT_name\[^\n\r\]*\[\n\r]*\[^\n\r\]* DW_AT_decl_file\[^\n\r\]*\[\n\r]*\[^\n\r\]* DW_AT_decl_line\[^\n\r\]*\[\n\r]*\[^\n\r\]* DW_AT_type" } }
+// { dg-final { scan-assembler "DIE \\(\[^\n\r\]*\\) DW_TAG_typedef\[^\n\r\]*\[\n\r]*\[^\n\r\]*type4\[^\n\r\]* DW_AT_name\[^\n\r\]*\[\n\r]*\[^\n\r\]* DW_AT_decl_file\[^\n\r\]*\[\n\r]*\[^\n\r\]* DW_AT_decl_line\[^\n\r\]*\[\n\r]*\[^\n\r\]* DW_AT_type" } }
+// { dg-final { scan-assembler "DIE \\(\[^\n\r\]*\\) DW_TAG_typedef\[^\n\r\]*\[\n\r]*\[^\n\r\]*type5\[^\n\r\]* DW_AT_name\[^\n\r\]*\[\n\r]*\[^\n\r\]* DW_AT_decl_file\[^\n\r\]*\[\n\r]*\[^\n\r\]* DW_AT_decl_line\[^\n\r\]*\[\n\r]*\[^\n\r\]* DW_AT_type" } }
+
+typedef unsigned short type1;
+typedef unsigned char type2;
+typedef type2 type3[16];
+typedef unsigned char type4[16];
+typedef struct
+{
+ struct
+ {
+ type3 a;
+ type4 b;
+ } c;
+} type5;
+type5 var;
diff --git a/gcc/testsuite/g++.dg/ext/altivec-18.C b/gcc/testsuite/g++.dg/ext/altivec-18.C
new file mode 100644
index 00000000000..5b83028e737
--- /dev/null
+++ b/gcc/testsuite/g++.dg/ext/altivec-18.C
@@ -0,0 +1,14 @@
+// PR target/82112
+// { dg-do compile { target powerpc*-*-* } }
+// { dg-require-effective-target powerpc_altivec_ok }
+// { dg-options "-maltivec" }
+
+#include <altivec.h>
+
+__attribute__((aligned (16))) extern const unsigned char c[16];
+
+void
+foo (void)
+{
+ vec_ld (0, c);
+}
diff --git a/gcc/testsuite/g++.dg/ext/int128-5.C b/gcc/testsuite/g++.dg/ext/int128-5.C
new file mode 100644
index 00000000000..c2d9297c2cf
--- /dev/null
+++ b/gcc/testsuite/g++.dg/ext/int128-5.C
@@ -0,0 +1,10 @@
+// PR c++/79896
+// { dg-do compile { target { ilp32 && { ! int128 } } } }
+// { dg-options "" }
+
+enum E
+{
+ e1 = 0xffffffffffffffffULL,
+ e2, // { dg-error "overflow in enumeration values" }
+ e3
+} e = e3;
diff --git a/gcc/testsuite/g++.dg/ext/pr80363.C b/gcc/testsuite/g++.dg/ext/pr80363.C
new file mode 100644
index 00000000000..2ff7bca80b6
--- /dev/null
+++ b/gcc/testsuite/g++.dg/ext/pr80363.C
@@ -0,0 +1,12 @@
+// PR c++/80363
+// { dg-do compile }
+
+typedef int V __attribute__((vector_size (16)));
+
+int
+foo (V *a, V *b)
+{
+ if (*a < *b) // { dg-error "could not convert\[^#]*from" }
+ return 1;
+ return 0;
+}
diff --git a/gcc/testsuite/g++.dg/gomp/pr71910.C b/gcc/testsuite/g++.dg/gomp/pr71910.C
new file mode 100644
index 00000000000..0063be8a9b0
--- /dev/null
+++ b/gcc/testsuite/g++.dg/gomp/pr71910.C
@@ -0,0 +1,13 @@
+// PR target/71910
+// { dg-do compile }
+// { dg-additional-options "-O2" }
+
+#include <vector>
+
+int
+main ()
+{
+ std::vector<double> vec(10);
+#pragma omp parallel
+ __builtin_exit (0);
+}
diff --git a/gcc/testsuite/g++.dg/gomp/pr79664.C b/gcc/testsuite/g++.dg/gomp/pr79664.C
new file mode 100644
index 00000000000..f796d388eb2
--- /dev/null
+++ b/gcc/testsuite/g++.dg/gomp/pr79664.C
@@ -0,0 +1,142 @@
+// PR c++/79664
+// { dg-do compile }
+// { dg-options "-std=c++14 -fopenmp" }
+
+constexpr int
+f1 ()
+{
+ int i = 0;
+#pragma omp parallel for // { dg-error "is not a constant-expression" }
+ for (i = 0; i < 10; ++i)
+ ;
+ return 0;
+}
+
+constexpr int
+f2 ()
+{
+ int i = 0;
+#pragma omp parallel // { dg-error "is not a constant-expression" }
+ i = 5;
+ return 0;
+}
+
+constexpr int
+f3 ()
+{
+ int i = 0;
+#pragma omp task // { dg-error "is not a constant-expression" }
+ i = 5;
+ return 0;
+}
+
+constexpr int
+f4 ()
+{
+ int i = 0;
+#pragma omp for // { dg-error "is not a constant-expression" }
+ for (i = 0; i < 10; ++i)
+ ;
+ return 0;
+}
+
+constexpr int
+f6 ()
+{
+ int i = 0;
+#pragma omp target teams // { dg-error "is not a constant-expression" }
+ i = 5;
+ return 0;
+}
+
+constexpr int
+f7 ()
+{
+ int i = 0;
+#pragma omp target data map(tofrom:i) // { dg-error "is not a constant-expression" }
+ i = 5;
+ return 0;
+}
+
+constexpr int
+f8 ()
+{
+ int i = 0;
+#pragma omp target // { dg-error "is not a constant-expression" }
+ i = 5;
+ return 0;
+}
+
+constexpr int
+f9 ()
+{
+ int i = 0;
+#pragma omp sections // { dg-error "is not a constant-expression" }
+ {
+#pragma omp section
+ i = 5;
+ }
+ return 0;
+}
+
+constexpr int
+f10 ()
+{
+ int i = 0;
+#pragma omp ordered // { dg-error "is not a constant-expression" }
+ i = 1;
+ return 0;
+}
+
+constexpr int
+f11 ()
+{
+ int i = 0;
+#pragma omp critical // { dg-error "is not a constant-expression" }
+ i = 1;
+ return 0;
+}
+
+constexpr int
+f12 ()
+{
+ int i = 0;
+#pragma omp single // { dg-error "is not a constant-expression" }
+ i = 1;
+ return 0;
+}
+
+constexpr int
+f13 ()
+{
+ int i = 0;
+#pragma omp master // { dg-error "is not a constant-expression" }
+ i = 1;
+ return 0;
+}
+
+constexpr int
+f14 ()
+{
+ int i = 0;
+#pragma omp taskgroup // { dg-error "is not a constant-expression" }
+ i = 1;
+ return 0;
+}
+
+constexpr int
+f15 ()
+{
+ int i = 0;
+#pragma omp target update to(i) // { dg-error "is not a constant-expression" }
+ i = 1;
+ return 0;
+}
+
+constexpr int
+f16 ()
+{
+ int i = 0;
+#pragma omp target update to(i) // { dg-error "is not a constant-expression" }
+ return 0;
+}
diff --git a/gcc/testsuite/g++.dg/gomp/pr80141.C b/gcc/testsuite/g++.dg/gomp/pr80141.C
new file mode 100644
index 00000000000..53e497ab349
--- /dev/null
+++ b/gcc/testsuite/g++.dg/gomp/pr80141.C
@@ -0,0 +1,8 @@
+// PR c++/80141
+// { dg-do compile }
+
+#pragma omp declare simd aligned (p : 2 && 2)
+template<int> void foo (int *p);
+
+#pragma omp declare simd simdlen (2 && 2)
+template<int> void bar (int *p);
diff --git a/gcc/testsuite/g++.dg/gomp/pr81154.C b/gcc/testsuite/g++.dg/gomp/pr81154.C
new file mode 100644
index 00000000000..f6617dc71d1
--- /dev/null
+++ b/gcc/testsuite/g++.dg/gomp/pr81154.C
@@ -0,0 +1,51 @@
+// PR c++/81154
+// { dg-do compile }
+
+template <typename T>
+struct C
+{
+ int foo (T n) const
+ {
+#pragma omp parallel shared (foo) // { dg-error "is not a variable in clause" }
+ ;
+#pragma omp parallel private (foo) // { dg-error "is not a variable in clause" }
+ ;
+#pragma omp parallel firstprivate (foo) // { dg-error "is not a variable in clause" }
+ ;
+#pragma omp parallel for lastprivate (foo) // { dg-error "is not a variable in clause" }
+ for (T i = 0; i < n; i++)
+ ;
+#pragma omp parallel reduction (+:foo) // { dg-error "is not a variable in clause" }
+ ;
+ return 0;
+ }
+ int foo (int x, int y) { return x; }
+};
+
+struct D
+{
+ typedef int T;
+ int foo (T n) const
+ {
+#pragma omp parallel shared (foo) // { dg-error "is not a variable in clause" }
+ ;
+#pragma omp parallel private (foo) // { dg-error "is not a variable in clause" }
+ ;
+#pragma omp parallel firstprivate (foo) // { dg-error "is not a variable in clause" }
+ ;
+#pragma omp parallel for lastprivate (foo) // { dg-error "is not a variable in clause" }
+ for (T i = 0; i < n; i++)
+ ;
+#pragma omp parallel reduction (+:foo) // { dg-error "is not a variable in clause" }
+ ;
+ return 0;
+ }
+ int foo (int x, int y) { return x; }
+};
+
+int
+main ()
+{
+ C<int> ().foo (1);
+ D ().foo (1);
+}
diff --git a/gcc/testsuite/g++.dg/init/ref23.C b/gcc/testsuite/g++.dg/init/ref23.C
new file mode 100644
index 00000000000..12b8851f2b9
--- /dev/null
+++ b/gcc/testsuite/g++.dg/init/ref23.C
@@ -0,0 +1,15 @@
+// PR c++/80176
+// { dg-do compile }
+
+struct X { static void foo(); static void baz(int); static int baz(double); } x;
+struct Y { void o(unsigned char); static void o(int); void o(double); } y;
+void X::foo() {}
+static void bar() {}
+void (&r1)() = x.foo;
+void (&r2)() = X::foo;
+void (&r3)() = bar;
+void (&r4)(int) = x.baz;
+int (&r5)(double) = x.baz;
+void (&r6)(int) = X::baz;
+int (&r7)(double) = X::baz;
+void (&r8)(int) = y.o;
diff --git a/gcc/testsuite/g++.dg/ipa/pr77905.C b/gcc/testsuite/g++.dg/ipa/pr77905.C
new file mode 100644
index 00000000000..0f73d50addc
--- /dev/null
+++ b/gcc/testsuite/g++.dg/ipa/pr77905.C
@@ -0,0 +1,21 @@
+// PR ipa/77905
+// { dg-do compile }
+// { dg-options "-O2" }
+
+struct A {
+ A(int);
+};
+struct B : A {
+ B();
+} A;
+struct C : virtual A {
+ C(int);
+};
+A::A(int x) {
+ if (x)
+ A(0);
+}
+
+B::B() : A(1) {}
+
+C::C(int) : A(1) {}
diff --git a/gcc/testsuite/g++.dg/ipa/pr79931.C b/gcc/testsuite/g++.dg/ipa/pr79931.C
new file mode 100644
index 00000000000..78f6e03c458
--- /dev/null
+++ b/gcc/testsuite/g++.dg/ipa/pr79931.C
@@ -0,0 +1,24 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -fdump-ipa-all" } */
+
+class DocumentImpl;
+struct NodeImpl
+{
+ virtual DocumentImpl * getOwnerDocument();
+ virtual NodeImpl * getParentNode();
+ virtual NodeImpl * removeChild(NodeImpl *oldChild);
+};
+struct AttrImpl : NodeImpl
+{
+ NodeImpl *insertBefore(NodeImpl *newChild, NodeImpl *refChild);
+};
+struct DocumentImpl : NodeImpl
+{
+ virtual NodeImpl *removeChild(NodeImpl *oldChild);
+ virtual int* getRanges();
+};
+NodeImpl *AttrImpl::insertBefore(NodeImpl *newChild, NodeImpl *refChild) {
+ NodeImpl *oldparent = newChild->getParentNode();
+ oldparent->removeChild(newChild);
+ this->getOwnerDocument()->getRanges();
+}
diff --git a/gcc/testsuite/g++.dg/ipa/pr80205.C b/gcc/testsuite/g++.dg/ipa/pr80205.C
new file mode 100644
index 00000000000..460bdcb02ca
--- /dev/null
+++ b/gcc/testsuite/g++.dg/ipa/pr80205.C
@@ -0,0 +1,34 @@
+// PR ipa/80205
+// { dg-options "-fnon-call-exceptions --param early-inlining-insns=100 -O2" }
+
+class a
+{
+public:
+ virtual ~a ();
+};
+class b
+{
+public:
+ template <typename c> b (c);
+ ~b () { delete d; }
+ void
+ operator= (b e)
+ {
+ b (e).f (*this);
+ }
+ void
+ f (b &e)
+ {
+ a g;
+ d = e.d;
+ e.d = &g;
+ }
+ a *d;
+};
+void
+h ()
+{
+ b i = int();
+ void j ();
+ i = j;
+}
diff --git a/gcc/testsuite/g++.dg/opt/nrv18.C b/gcc/testsuite/g++.dg/opt/nrv18.C
new file mode 100644
index 00000000000..92e9bdf3dbc
--- /dev/null
+++ b/gcc/testsuite/g++.dg/opt/nrv18.C
@@ -0,0 +1,12 @@
+// PR c++/80984
+// { dg-do compile }
+
+struct A { ~A (); };
+
+A
+foo ()
+{
+ A a;
+a:
+ return a;
+}
diff --git a/gcc/testsuite/g++.dg/opt/pr79396.C b/gcc/testsuite/g++.dg/opt/pr79396.C
new file mode 100644
index 00000000000..328c271358a
--- /dev/null
+++ b/gcc/testsuite/g++.dg/opt/pr79396.C
@@ -0,0 +1,13 @@
+// PR middle-end/79396
+// { dg-do compile }
+// { dg-options "-fnon-call-exceptions -O2" }
+// { dg-additional-options "-mfma" { target i?86-*-* x86_64-*-* } }
+
+struct A { A (); ~A (); };
+
+float
+foo (float x)
+{
+ A a;
+ return __builtin_pow (x, 2) + 2;
+}
diff --git a/gcc/testsuite/g++.dg/opt/pr80385.C b/gcc/testsuite/g++.dg/opt/pr80385.C
new file mode 100644
index 00000000000..f18abc941f3
--- /dev/null
+++ b/gcc/testsuite/g++.dg/opt/pr80385.C
@@ -0,0 +1,14 @@
+// PR rtl-optimization/80385
+// { dg-do compile { target { i?86-*-* x86_64-*-* } } }
+// { dg-options "-Ofast -msse2" }
+
+#include <x86intrin.h>
+
+__m128 a, e;
+struct A { __m128 b; A (); A (__m128 x) : b(x) {} };
+A operator+ (A, A);
+A operator- (A) { __m128 c = -a; return c; }
+A foo (A x) { __m128 d = x.b; return _mm_andnot_ps (d, e); }
+struct B { A n[1]; };
+void bar (B x) { A f = foo (x.n[0]); A g = f + A (); }
+void baz () { B h; B i; A j; i.n[0] = -j; h = i; B k = h; bar (k); }
diff --git a/gcc/testsuite/g++.dg/other/i386-11.C b/gcc/testsuite/g++.dg/other/i386-11.C
new file mode 100644
index 00000000000..8e06617fca5
--- /dev/null
+++ b/gcc/testsuite/g++.dg/other/i386-11.C
@@ -0,0 +1,57 @@
+// PR target/80799
+// { dg-do compile { target i?86-*-* x86_64-*-* } }
+// { dg-require-effective-target c++11 }
+// { dg-options "-O2 -msse2" }
+
+#include <xmmintrin.h>
+#include <emmintrin.h>
+
+class alignas(16) GSVector4i
+{
+public:
+ __m128i m;
+
+ explicit GSVector4i(__m128i m)
+ {
+ this->m = m;
+ }
+
+ static void storel(void* p, const GSVector4i& v)
+ {
+ _mm_storel_epi64((__m128i*)p, v.m);
+ }
+
+ static GSVector4i loadl(const void* p)
+ {
+ return GSVector4i(_mm_loadl_epi64((__m128i*)p));
+ }
+
+ bool eq(const GSVector4i& v) const
+ {
+ return _mm_movemask_epi8(_mm_cmpeq_epi32(m, v.m)) == 0xffff;
+ }
+};
+
+
+union GIFRegTRXPOS
+{
+ unsigned long long u64;
+ void operator = (const GSVector4i& v) {GSVector4i::storel(this, v);}
+ bool operator != (const union GIFRegTRXPOS& r) const {return !((GSVector4i)r).eq(*this);}
+ operator GSVector4i() const {return GSVector4i::loadl(this);}
+};
+
+extern void dummy_call();
+extern GIFRegTRXPOS TRXPOS;
+
+void GIFRegHandlerTRXPOS(const GIFRegTRXPOS& p)
+{
+ if(p != TRXPOS)
+ {
+ dummy_call();
+ }
+
+ TRXPOS = (GSVector4i)p;
+}
+
+// { dg-final { scan-assembler-not "%mm" } }
diff --git a/gcc/testsuite/g++.dg/template/init11.C b/gcc/testsuite/g++.dg/template/init11.C
new file mode 100644
index 00000000000..ef337c0be60
--- /dev/null
+++ b/gcc/testsuite/g++.dg/template/init11.C
@@ -0,0 +1,9 @@
+// PR c++/79607
+// { dg-do compile { target c++11 } }
+
+template<typename T> struct A
+{
+ static const int i = int{T{}};
+};
+
+A<int> a;
diff --git a/gcc/testsuite/g++.dg/tls/pr77285-1.C b/gcc/testsuite/g++.dg/tls/pr77285-1.C
new file mode 100644
index 00000000000..d8f69b2010c
--- /dev/null
+++ b/gcc/testsuite/g++.dg/tls/pr77285-1.C
@@ -0,0 +1,7 @@
+// { dg-do link { target c++11 } }
+// { dg-require-effective-target tls }
+// { dg-additional-sources pr77285-2.C }
+
+struct __attribute__((abi_tag("tag"))) X { ~X () {} int i = 0; };
+thread_local X var1;
+X var2;
diff --git a/gcc/testsuite/g++.dg/tls/pr77285-2.C b/gcc/testsuite/g++.dg/tls/pr77285-2.C
new file mode 100644
index 00000000000..bac273a4d68
--- /dev/null
+++ b/gcc/testsuite/g++.dg/tls/pr77285-2.C
@@ -0,0 +1,17 @@
+// PR c++/77285
+// { dg-do compile { target c++11 } }
+// { dg-require-effective-target tls }
+// { dg-final { scan-assembler "_Z4var1B3tag" } }
+// { dg-final { scan-assembler "_Z4var2B3tag" } }
+// { dg-final { scan-assembler "_ZTH4var1B3tag" } }
+// { dg-final { scan-assembler "_ZTW4var1B3tag" } }
+
+struct __attribute__((abi_tag("tag"))) X { ~X () {} int i = 0; };
+extern thread_local X var1;
+extern X var2;
+
+int
+main ()
+{
+ return var1.i + var2.i;
+}
diff --git a/gcc/testsuite/g++.dg/torture/pr77919-2.C b/gcc/testsuite/g++.dg/torture/pr77919-2.C
new file mode 100644
index 00000000000..d61e704cb44
--- /dev/null
+++ b/gcc/testsuite/g++.dg/torture/pr77919-2.C
@@ -0,0 +1,10 @@
+// PR rtl-optimization/77919
+// { dg-do compile }
+
+typedef _Complex long long B;
+struct A { A (double) {} _Complex double i; };
+typedef struct { B b; } C;
+struct D { D (const B &x) : b (x) {} B b; };
+static inline B foo (const double *x) { C *a; a = (C *) x; return a->b; }
+static inline D baz (const A &x) { return foo ((double *) &x); }
+D b = baz (0);
diff --git a/gcc/testsuite/g++.dg/torture/pr77919.C b/gcc/testsuite/g++.dg/torture/pr77919.C
new file mode 100644
index 00000000000..cab6e909d36
--- /dev/null
+++ b/gcc/testsuite/g++.dg/torture/pr77919.C
@@ -0,0 +1,11 @@
+// PR rtl-optimization/77919
+// { dg-do compile }
+// { dg-additional-options "-Wno-psabi" }
+
+struct A { A (double) {} _Complex double i; };
+typedef int __attribute__ ((vector_size (16))) B;
+typedef struct { B b; } C;
+struct D { D (const B &x) : b (x) {} B b; };
+static inline B foo (const double *x) { C *a; a = (C *) x; return a->b; }
+static inline D baz (const A &x) { return foo ((double *) &x); }
+D b = baz (0);
diff --git a/gcc/testsuite/g++.dg/torture/pr80129.C b/gcc/testsuite/g++.dg/torture/pr80129.C
new file mode 100644
index 00000000000..134293cd085
--- /dev/null
+++ b/gcc/testsuite/g++.dg/torture/pr80129.C
@@ -0,0 +1,14 @@
+// PR c++/80129
+// { dg-do run }
+// { dg-options "-std=c++11" }
+
+struct A { bool a; int b; };
+
+int
+main ()
+{
+ bool c = false;
+ const A x = c ? A {true, 1} : A {false, 0};
+ if (x.a)
+ __builtin_abort ();
+}
diff --git a/gcc/testsuite/g++.dg/torture/pr80171.C b/gcc/testsuite/g++.dg/torture/pr80171.C
new file mode 100644
index 00000000000..91cfb3bd8f6
--- /dev/null
+++ b/gcc/testsuite/g++.dg/torture/pr80171.C
@@ -0,0 +1,184 @@
+// { dg-do compile }
+// { dg-additional-options "-std=c++11" }
+
+template <typename> struct remove_reference;
+template <typename _Tp> struct remove_reference<_Tp &> { typedef _Tp type; };
+template <typename _Tp> typename remove_reference<_Tp>::type move(_Tp &&p1) {
+ return static_cast<typename remove_reference<_Tp>::type &&>(p1);
+}
+void *operator new(__SIZE_TYPE__, void *p2) { return p2; }
+struct Trans_NS__v1_GenericTlv {
+ virtual int getMinimumValueLength();
+ virtual unsigned long getValueLength() const;
+};
+struct IPv4NeighborAddressSubTlv;
+struct Trans_NS__v1_GenericTlvBase : Trans_NS__v1_GenericTlv {
+ virtual bool operator==(const IPv4NeighborAddressSubTlv &) const;
+};
+struct Trans_NS__v1_GenericUnsupportedTlv;
+template <typename> struct backup_holder {
+ Trans_NS__v1_GenericUnsupportedTlv *backup_;
+ Trans_NS__v1_GenericUnsupportedTlv &get() { return *backup_; }
+};
+template <typename> struct make_reference_content {
+ typedef IPv4NeighborAddressSubTlv type;
+};
+template <typename> struct unwrap_recursive {
+ typedef IPv4NeighborAddressSubTlv type;
+};
+template <typename> struct begin_impl;
+template <typename Sequence> struct begin {
+ typedef typename Sequence::tag tag_;
+ typedef typename begin_impl<tag_>::template apply<Sequence>::type type;
+};
+struct long_ {
+ static const int value = 0;
+};
+template <typename> struct O1_size_impl;
+template <typename Sequence>
+struct O1_size
+ : O1_size_impl<typename Sequence::tag>::template apply<Sequence> {};
+template <typename F, typename T2>
+struct apply_wrap2 : F::template apply<int, T2> {};
+template <int, typename, typename> struct iter_fold_impl;
+template <typename First, typename ForwardOp>
+struct iter_fold_impl<0, First, ForwardOp> {
+ typedef typename apply_wrap2<ForwardOp, First>::type state;
+};
+template <typename Sequence, typename ForwardOp> struct iter_fold {
+ typedef
+ typename iter_fold_impl<O1_size<Sequence>::value,
+ typename begin<Sequence>::type, ForwardOp>::state
+ type;
+};
+template <typename> struct deref;
+template <typename T1> struct pair { typedef T1 first; };
+struct make_initializer_node {
+ template <typename, typename Iterator> struct apply {
+ struct initializer_node {
+ typedef typename deref<Iterator>::type recursive_enabled_T;
+ static int
+ initialize(void *p1,
+ typename unwrap_recursive<recursive_enabled_T>::type) {
+ new (p1) typename make_reference_content<recursive_enabled_T>::type;
+ }
+ };
+ typedef pair<initializer_node> type;
+ };
+};
+struct l_item {
+ typedef int tag;
+ typedef l_item type;
+ typedef long_ size;
+ typedef int item;
+};
+template <> struct O1_size_impl<int> {
+ template <typename List> struct apply : List::size {};
+};
+template <typename> struct l_iter;
+template <typename Node> struct deref<l_iter<Node>> {
+ typedef typename Node::item type;
+};
+template <> struct begin_impl<int> {
+ template <typename List> struct apply {
+ typedef l_iter<typename List::type> type;
+ };
+};
+template <typename, typename, typename, typename, typename, typename, typename>
+struct list : l_item {};
+template <typename... T> struct make_variant_list { typedef list<T...> type; };
+template <typename T> T cast_storage(void *p1) { return *static_cast<T *>(p1); }
+struct visitation_impl_step {
+ typedef Trans_NS__v1_GenericUnsupportedTlv type;
+};
+template <typename Visitor, typename VoidPtrCV, typename T>
+void visitation_impl_invoke_impl(Visitor p1, VoidPtrCV p2, T *) {
+ backup_holder<Trans_NS__v1_GenericUnsupportedTlv> __trans_tmp_8 =
+ cast_storage<backup_holder<T>>(p2);
+ p1.internal_visit(__trans_tmp_8, 0);
+}
+template <typename Visitor, typename VoidPtrCV, typename T,
+ typename NoBackupFlag>
+void visitation_impl_invoke(Visitor p1, VoidPtrCV p2, T p3, NoBackupFlag) {
+ visitation_impl_invoke_impl(p1, p2, p3);
+}
+template <typename Which, typename step0, typename Visitor, typename VoidPtrCV,
+ typename NoBackupFlag>
+void visitation_impl(Visitor p1, VoidPtrCV p2, NoBackupFlag, Which, step0 *) {
+ visitation_impl_invoke(p1, p2, static_cast<typename step0::type *>(0), 0);
+}
+struct move_into {
+ move_into(void *);
+ template <typename T> void internal_visit(backup_holder<T> p1, int) {
+ T __trans_tmp_2 = p1.get();
+ new (0) T(__trans_tmp_2);
+ }
+};
+template <typename, typename... TN> struct variant {
+ struct initializer : iter_fold<typename make_variant_list<int, TN...>::type,
+ make_initializer_node>::type::first {};
+ template <typename T> void convert_construct(T p1, int) {
+ void *__trans_tmp_9 = this;
+ initializer::initialize(__trans_tmp_9, p1);
+ }
+ template <typename T> variant(T p1) { convert_construct(p1, 0); }
+ variant(variant &&p1) {
+ move_into visitor(0);
+ p1.internal_apply_visitor(visitor);
+ }
+ template <typename Visitor> void internal_apply_visitor(Visitor p1) {
+ void *__trans_tmp_10 = this;
+ visitation_impl(p1, __trans_tmp_10, 0, 0,
+ static_cast<visitation_impl_step *>(0));
+ }
+};
+template <class...> struct generic_element_tlvs;
+template <typename TlvConfig, class UnsupportedTlvClass, class TlvF,
+ class... TlvR>
+struct generic_element_tlvs<TlvConfig, UnsupportedTlvClass, TlvF, TlvR...> {
+ typedef variant<UnsupportedTlvClass, TlvF, TlvR...> variant_type;
+};
+template <typename, typename> struct Trans_NS__v1_GenericTlvContainer {
+ template <class TlvClass> void addTlv(const TlvClass &);
+};
+template <typename TlvConfig, typename ElementTlvs>
+template <class TlvClass>
+void Trans_NS__v1_GenericTlvContainer<TlvConfig, ElementTlvs>::addTlv(
+ const TlvClass &p1) {
+ typename ElementTlvs::variant_type wrap(p1);
+ move(wrap);
+}
+template <typename ElementTlvs>
+struct Trans_NS__v1_GenericContainerEntryBase
+ : Trans_NS__v1_GenericTlvContainer<int, ElementTlvs> {};
+template <class>
+struct Trans_NS__v1_GenericFixedLengthTlvBase : Trans_NS__v1_GenericTlvBase {
+ unsigned long getValueLength() const;
+};
+struct Trans_NS__v1_GenericUnsupportedTlv : Trans_NS__v1_GenericTlv {
+ long getHeaderLengthconst;
+};
+using isis_tlv_config = int;
+template <class... TlvClasses>
+using isis_element_tlvs =
+ generic_element_tlvs<isis_tlv_config, Trans_NS__v1_GenericUnsupportedTlv,
+ TlvClasses...>;
+template <int, class, typename ElementTlvs>
+using ContainerEntryBase = Trans_NS__v1_GenericContainerEntryBase<ElementTlvs>;
+template <int, class ImplClass, int>
+using FixedLengthTlvBase = Trans_NS__v1_GenericFixedLengthTlvBase<ImplClass>;
+struct IPv4NeighborAddressSubTlv
+ : FixedLengthTlvBase<0, IPv4NeighborAddressSubTlv, 0> {
+ bool operator==(const IPv4NeighborAddressSubTlv &) const;
+};
+void test() {
+ ContainerEntryBase<
+ 0, int,
+ isis_element_tlvs<
+ FixedLengthTlvBase<0, int, 0>, FixedLengthTlvBase<0, int, 0>,
+ IPv4NeighborAddressSubTlv, FixedLengthTlvBase<0, int, 0>,
+ FixedLengthTlvBase<0, int, 0>, FixedLengthTlvBase<0, int, 0>>>
+ isEntry;
+ IPv4NeighborAddressSubTlv nbAddressSubTlv;
+ isEntry.addTlv(nbAddressSubTlv);
+}
diff --git a/gcc/testsuite/g++.dg/torture/pr80334.C b/gcc/testsuite/g++.dg/torture/pr80334.C
new file mode 100644
index 00000000000..ba990e733fa
--- /dev/null
+++ b/gcc/testsuite/g++.dg/torture/pr80334.C
@@ -0,0 +1,19 @@
+// { dg-do run }
+// { dg-additional-options "-std=c++11" }
+
+struct A { alignas(16) char c; };
+struct B { A unpacked; char d; } __attribute__((packed));
+
+char x;
+
+int
+main()
+{
+ alignas(__BIGGEST_ALIGNMENT__) B b[3];
+ for (int i = 0; i < 3; i++) b[i].unpacked.c = 'a' + i;
+ for (int i = 0; i < 3; i++)
+ {
+ auto a = new A(b[i].unpacked);
+ x = a->c;
+ }
+}
diff --git a/gcc/testsuite/g++.dg/torture/pr81354.C b/gcc/testsuite/g++.dg/torture/pr81354.C
new file mode 100644
index 00000000000..b3ba8f09371
--- /dev/null
+++ b/gcc/testsuite/g++.dg/torture/pr81354.C
@@ -0,0 +1,24 @@
+// PR81354 reported this test as crashing in a limited range of revisions.
+// { dg-do compile }
+
+struct T { double a; double b; };
+
+void foo(T Ad[], int As[2])
+{
+ int j;
+ int i;
+ int Bs[2] = {0,0};
+ T Bd[16];
+
+ for (j = 0; j < 4; j++) {
+ for (i = 0; i + 1 <= j + 1; i++) {
+ Ad[i + As[0] * j] = Bd[i + Bs[0] * j];
+ }
+
+ i = j + 1; // <- comment out this line and it does not crash
+ for (; i + 1 < 5; i++) {
+ Ad[i + As[0] * j].a = 0.0;
+ Ad[i + As[0] * j].b = 0.0;
+ }
+ }
+}
diff --git a/gcc/testsuite/g++.dg/torture/pr81987.C b/gcc/testsuite/g++.dg/torture/pr81987.C
new file mode 100644
index 00000000000..4579332ad71
--- /dev/null
+++ b/gcc/testsuite/g++.dg/torture/pr81987.C
@@ -0,0 +1,61 @@
+extern short var_1;
+extern const short var_3;
+extern unsigned long int var_9;
+extern short var_13;
+extern const unsigned long int var_15;
+extern const unsigned long int var_37;
+extern unsigned long int var_40;
+extern long long int var_47;
+extern short var_48;
+extern const short var_54;
+extern long long int var_79;
+extern long long int var_81;
+extern long long int var_94;
+extern long long int var_95;
+extern long long int var_701;
+extern unsigned long int var_786;
+extern short var_788;
+extern long long int var_844;
+
+struct struct_1 {
+ short member_1_2 : 15;
+ static long long int member_1_3;
+};
+
+extern struct_1 struct_obj_6;
+extern struct_1 struct_obj_8;
+
+void foo() {
+ int a = var_3 <= 602154393864UL;
+ if (var_81 ? 0 : var_3 && var_9)
+ ;
+ else {
+ var_94 = 0;
+ if (var_3 && var_48 || var_13) {
+ if (var_48)
+ var_95 = 0;
+ short b((2364461588881776511UL + var_3) * (2 ? var_13 : 0) || var_1);
+ struct_obj_8.member_1_2 = b;
+ if (var_15) {
+ if (var_81)
+ if (var_47)
+ ;
+ else if (var_40)
+ var_701 = 0;
+ } else {
+ if (var_40)
+ var_79 = 0;
+ if (var_54) {
+ if (var_37)
+ var_786 = 0;
+ else
+ var_788 = 0;
+ struct_obj_6.member_1_3 =
+ (2364461588881776511UL + var_3) * (2 ? var_13 : 0);
+ }
+ }
+ if ((2364461588881776511UL + var_3) * (2 ? var_13 : 0))
+ var_844 = 0;
+ }
+ }
+}
diff --git a/gcc/testsuite/g++.dg/ubsan/return-4.C b/gcc/testsuite/g++.dg/ubsan/return-4.C
new file mode 100644
index 00000000000..d30eef8e31f
--- /dev/null
+++ b/gcc/testsuite/g++.dg/ubsan/return-4.C
@@ -0,0 +1,18 @@
+// PR c++/77722
+// { dg-do run }
+// { dg-options "-fsanitize=return -w" }
+// { dg-shouldfail "ubsan" }
+
+int
+foo ()
+{
+}
+
+int
+main ()
+{
+ foo ();
+ return 0;
+}
+
+// { dg-output "execution reached the end of a value-returning function without returning a value" }
diff --git a/gcc/testsuite/g++.dg/ubsan/return-5.C b/gcc/testsuite/g++.dg/ubsan/return-5.C
new file mode 100644
index 00000000000..2956c33a094
--- /dev/null
+++ b/gcc/testsuite/g++.dg/ubsan/return-5.C
@@ -0,0 +1,19 @@
+// PR c++/77722
+// { dg-do run }
+// { dg-options "-fsanitize=return -w" }
+// { dg-shouldfail "ubsan" }
+
+int
+foo ()
+{
+ int a = 5;
+}
+
+int
+main ()
+{
+ foo ();
+ return 0;
+}
+
+// { dg-output "execution reached the end of a value-returning function without returning a value" }
diff --git a/gcc/testsuite/g++.dg/ubsan/return-6.C b/gcc/testsuite/g++.dg/ubsan/return-6.C
new file mode 100644
index 00000000000..0c1e7921c81
--- /dev/null
+++ b/gcc/testsuite/g++.dg/ubsan/return-6.C
@@ -0,0 +1,20 @@
+// PR c++/77722
+// { dg-do run }
+// { dg-options "-fsanitize=return -w" }
+// { dg-shouldfail "ubsan" }
+
+int
+foo ()
+{
+ int a = 5;
+ int b = 5;
+}
+
+int
+main ()
+{
+ foo ();
+ return 0;
+}
+
+// { dg-output "execution reached the end of a value-returning function without returning a value" }
diff --git a/gcc/testsuite/g++.dg/vect/simd-clone-7.cc b/gcc/testsuite/g++.dg/vect/simd-clone-7.cc
new file mode 100644
index 00000000000..fd5751b30bb
--- /dev/null
+++ b/gcc/testsuite/g++.dg/vect/simd-clone-7.cc
@@ -0,0 +1,10 @@
+// PR middle-end/67335
+// { dg-do compile }
+// { dg-additional-options "-fopenmp-simd" }
+
+#pragma omp declare simd notinbranch uniform(y)
+float
+bar (float x, float *y, int)
+{
+ return y[0] + y[1] * x;
+}
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr79197.c b/gcc/testsuite/gcc.c-torture/compile/pr79197.c
new file mode 100644
index 00000000000..f3ac71abdb3
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/compile/pr79197.c
@@ -0,0 +1,10 @@
+/* PR target/79197 */
+
+unsigned long b;
+
+unsigned long
+foo (float *a, float *x)
+{
+ __builtin_memcpy (a, x, sizeof (float));
+ return *a;
+}
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr79411.c b/gcc/testsuite/gcc.c-torture/compile/pr79411.c
new file mode 100644
index 00000000000..7bd545bc4c5
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/compile/pr79411.c
@@ -0,0 +1,22 @@
+/* PR tree-optimization/79411 */
+
+typedef struct __jmp_buf_tag { char buf[1024]; } jmp_buf[1];
+extern int setjmp (jmp_buf);
+extern int bar (unsigned int *);
+extern jmp_buf *baz (void);
+struct C { int c1; unsigned int c2, c3, c4; };
+
+void
+foo (struct C *x, const int *y, unsigned int *z, unsigned int e, unsigned int g)
+{
+ unsigned int d = 0;
+ unsigned long f;
+ setjmp (*baz ());
+ f = 1 + d;
+ if ((x->c1 || x->c2) && g && (!e || d >= 8))
+ d = 16;
+ else
+ d = 8;
+ if ((!x->c3 && !x->c4 || *y == 0) && !e && bar (z))
+ *z = 1 + f;
+}
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr82337.c b/gcc/testsuite/gcc.c-torture/compile/pr82337.c
new file mode 100644
index 00000000000..f8afa746adb
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/compile/pr82337.c
@@ -0,0 +1,25 @@
+/* PR82337: SLSR needs to prevent abnormal SSA names from
+ serving as a basis. */
+char *a, *b, *c;
+
+struct d {
+ short e;
+ char f[];
+};
+
+extern void j (void);
+
+void
+g() {
+ struct d *h;
+ char *i;
+ int d;
+ do {
+ i = h->f + d;
+ 20 ? j() : 0;
+ i = c;
+ if (__builtin_setjmp (h))
+ b = h->f + d;
+ d = (int)(*i);
+ } while (a);
+}
diff --git a/gcc/testsuite/gcc.c-torture/execute/ieee/pr72824-2.c b/gcc/testsuite/gcc.c-torture/execute/ieee/pr72824-2.c
new file mode 100644
index 00000000000..0622d01d21b
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/execute/ieee/pr72824-2.c
@@ -0,0 +1,21 @@
+/* PR tree-optimization/72824 */
+
+typedef float V __attribute__((vector_size (4 * sizeof (float))));
+
+static inline void
+foo (V *x, V value)
+{
+ int i;
+ for (i = 0; i < 32; ++i)
+ x[i] = value;
+}
+
+int
+main ()
+{
+ V x[32];
+ foo (x, (V) { 0.f, -0.f, 0.f, -0.f });
+ if (__builtin_copysignf (1.0, x[3][1]) != -1.0f)
+ __builtin_abort ();
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.c-torture/execute/ieee/pr72824.c b/gcc/testsuite/gcc.c-torture/execute/ieee/pr72824.c
new file mode 100644
index 00000000000..1c213733ca1
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/execute/ieee/pr72824.c
@@ -0,0 +1,19 @@
+/* PR tree-optimization/72824 */
+
+static inline void
+foo (float *x, float value)
+{
+ int i;
+ for (i = 0; i < 32; ++i)
+ x[i] = value;
+}
+
+int
+main ()
+{
+ float x[32];
+ foo (x, -0.f);
+ if (__builtin_copysignf (1.0, x[3]) != -1.0f)
+ __builtin_abort ();
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.c-torture/execute/pr77767.c b/gcc/testsuite/gcc.c-torture/execute/pr77767.c
new file mode 100644
index 00000000000..21725a56bfe
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/execute/pr77767.c
@@ -0,0 +1,16 @@
+/* PR c/77767 */
+
+void
+foo (int a, int b[a++], int c, int d[c++])
+{
+ if (a != 2 || c != 2)
+ __builtin_abort ();
+}
+
+int
+main ()
+{
+ int e[10];
+ foo (1, e, 1, e);
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.c-torture/execute/pr78378.c b/gcc/testsuite/gcc.c-torture/execute/pr78378.c
new file mode 100644
index 00000000000..05c1f9c771c
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/execute/pr78378.c
@@ -0,0 +1,18 @@
+/* PR rtl-optimization/78378 */
+
+unsigned long long __attribute__ ((noinline, noclone))
+foo (unsigned long long x)
+{
+ x <<= 41;
+ x /= 232;
+ return 1 + (unsigned short) x;
+}
+
+int
+main ()
+{
+ unsigned long long x = foo (1);
+ if (x != 0x2c24)
+ __builtin_abort();
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.c-torture/execute/pr80692.c b/gcc/testsuite/gcc.c-torture/execute/pr80692.c
new file mode 100644
index 00000000000..e653c71c913
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/execute/pr80692.c
@@ -0,0 +1,13 @@
+/* { dg-require-effective-target dfp } */
+
+int main () {
+ _Decimal64 d64 = -0.DD;
+
+ if (d64 != 0.DD)
+ __builtin_abort ();
+
+ if (d64 != -0.DD)
+ __builtin_abort ();
+
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.c-torture/execute/pr81503.c b/gcc/testsuite/gcc.c-torture/execute/pr81503.c
new file mode 100644
index 00000000000..5fc6cb0e83c
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/execute/pr81503.c
@@ -0,0 +1,15 @@
+unsigned short a = 41461;
+unsigned short b = 3419;
+int c = 0;
+
+void foo() {
+ if (a + b * ~(0 != 5))
+ c = -~(b * ~(0 != 5)) + 2147483647;
+}
+
+int main() {
+ foo();
+ if (c != 2147476810)
+ return -1;
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.c-torture/execute/pr81555.c b/gcc/testsuite/gcc.c-torture/execute/pr81555.c
new file mode 100644
index 00000000000..d546368a39b
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/execute/pr81555.c
@@ -0,0 +1,24 @@
+/* PR tree-optimization/81555 */
+
+unsigned int a = 1, d = 0xfaeU, e = 0xe376U;
+_Bool b = 0, f = 1;
+unsigned char g = 1;
+
+void
+foo (void)
+{
+ _Bool c = a != b;
+ if (c)
+ f = 0;
+ if (e & c & (unsigned char)d & c)
+ g = 0;
+}
+
+int
+main ()
+{
+ foo ();
+ if (f || g != 1)
+ __builtin_abort ();
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.c-torture/execute/pr81556.c b/gcc/testsuite/gcc.c-torture/execute/pr81556.c
new file mode 100644
index 00000000000..cfbc75f861a
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/execute/pr81556.c
@@ -0,0 +1,23 @@
+/* PR tree-optimization/81556 */
+
+unsigned long long int b = 0xb82ff73c5c020599ULL;
+unsigned long long int c = 0xd4e8188733a29d8eULL;
+unsigned long long int d = 2, f = 1, g = 0, h = 0;
+unsigned long long int e = 0xf27771784749f32bULL;
+
+__attribute__((noinline, noclone)) void
+foo (void)
+{
+ _Bool a = d > 1;
+ g = f % ((d > 1) << 9);
+ h = a & (e & (a & b & c));
+}
+
+int
+main ()
+{
+ foo ();
+ if (g != 1 || h != 0)
+ __builtin_abort ();
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/align-3.c b/gcc/testsuite/gcc.dg/align-3.c
new file mode 100644
index 00000000000..5c97d5ac3cc
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/align-3.c
@@ -0,0 +1,11 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -fdump-rtl-expand" } */
+
+typedef struct { char a[2]; } __attribute__((__packed__)) TU2;
+unsigned short get16_unaligned(const void *p) {
+ unsigned short v;
+ *(TU2 *)(void *)(&v) = *(const TU2 *)p;
+ return v;
+}
+
+/* { dg-final { scan-rtl-dump "MEM\[^\n\r\]*A8\\\]" "expand" } } */
diff --git a/gcc/testsuite/gcc.dg/asan/pr80166.c b/gcc/testsuite/gcc.dg/asan/pr80166.c
new file mode 100644
index 00000000000..629dd23a31c
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/asan/pr80166.c
@@ -0,0 +1,24 @@
+/* PR sanitizer/80166 */
+/* { dg-do run } */
+
+#include <sys/types.h>
+#include <unistd.h>
+
+int
+main (int argc, char **argv)
+{
+ gid_t groups;
+ int r = getgroups (0, &groups);
+ if (r < 0)
+ __builtin_abort ();
+
+ r = getgroups (-1, &groups);
+ if (r != -1)
+ __builtin_abort ();
+
+ r = getgroups (-1, NULL);
+ if (r != -1)
+ __builtin_abort ();
+
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/asan/pr80168.c b/gcc/testsuite/gcc.dg/asan/pr80168.c
new file mode 100644
index 00000000000..de2334551bb
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/asan/pr80168.c
@@ -0,0 +1,12 @@
+/* PR sanitizer/80168 */
+/* { dg-do compile } */
+
+int a;
+
+int
+foo (void)
+{
+ struct S { int c[a]; int q : 8; int e : 4; } f;
+ f.e = 4;
+ return f.e;
+}
diff --git a/gcc/testsuite/gcc.dg/ipa/pr48195.c b/gcc/testsuite/gcc.dg/ipa/pr48195.c
index 2e38452d598..25e80bab8f8 100644
--- a/gcc/testsuite/gcc.dg/ipa/pr48195.c
+++ b/gcc/testsuite/gcc.dg/ipa/pr48195.c
@@ -1,5 +1,5 @@
/* { dg-do link } */
-/* { dg-options "-O2 -flto --param partial-inlining-entry-probability=101" } */
+/* { dg-options "-O2 -flto --param partial-inlining-entry-probability=100" } */
/* { dg-require-effective-target lto } */
extern void abort(void);
diff --git a/gcc/testsuite/gcc.dg/ipa/pr80104.c b/gcc/testsuite/gcc.dg/ipa/pr80104.c
new file mode 100644
index 00000000000..7e75c9907e7
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/ipa/pr80104.c
@@ -0,0 +1,15 @@
+/* PR ipa/80104 */
+/* { dg-do compile } */
+/* { dg-options "-fipa-icf" } */
+
+float
+a (_Complex float b)
+{
+ return *&b;
+}
+
+float
+c (_Complex float b)
+{
+ return (&b)[0];
+}
diff --git a/gcc/testsuite/gcc.dg/ipa/pr81696.c b/gcc/testsuite/gcc.dg/ipa/pr81696.c
new file mode 100644
index 00000000000..2d3d63ff0bb
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/ipa/pr81696.c
@@ -0,0 +1,26 @@
+/* { dg-options "-O2 -fdump-ipa-icf-details" } */
+
+int
+main (int argc, char **argv)
+{
+ __label__ lab4, lab5, lab6;
+
+ void foo (void) { goto lab4; }
+ void foo2 (void) { goto lab4; }
+ void bar (void) { goto lab5; }
+ void baz (void) { goto lab6; }
+
+ if (argc)
+ foo ();
+ else
+ foo2 ();
+
+ lab4:;
+ bar ();
+ lab5:;
+ baz ();
+ lab6:;
+ return 0;
+}
+
+/* { dg-final { scan-ipa-dump "Equal symbols: 1" "icf" } } */
diff --git a/gcc/testsuite/gcc.dg/ipa/pr82001.c b/gcc/testsuite/gcc.dg/ipa/pr82001.c
new file mode 100644
index 00000000000..05e32b10ef5
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/ipa/pr82001.c
@@ -0,0 +1,21 @@
+/* { dg-do compile { target i?86-*-* x86_64-*-* } } */
+/* { dg-options "-O2 -fdump-ipa-icf-details" } */
+
+int
+mullo (int a, int b)
+{
+ asm("mul %%edx # %%1 was %1"
+ : "+"
+ "a"(a),
+ "+d"(b));
+ return a;
+}
+
+int
+mulhi (int a, int b)
+{
+ asm("mul %%edx # %%1 was %1" : "+d"(a), "+a"(b));
+ return a;
+}
+
+/* { dg-final { scan-ipa-dump "Equal symbols: 0" "icf" } } */
diff --git a/gcc/testsuite/gcc.dg/lto/pr50199_0.c b/gcc/testsuite/gcc.dg/lto/pr50199_0.c
new file mode 100644
index 00000000000..61d0012be92
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/lto/pr50199_0.c
@@ -0,0 +1,17 @@
+/* PR middle-end/50199 */
+/* { dg-lto-options {{-O2 -flto -fno-merge-constants --param=lto-min-partition=1}} } */
+
+__attribute__ ((noinline)) const char *
+foo (const char *x)
+{
+ return x;
+}
+
+int
+main ()
+{
+ const char *a = "ab";
+ if (a != foo (a))
+ __builtin_abort ();
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/pch/pr66343-1.c b/gcc/testsuite/gcc.dg/pch/pr66343-1.c
new file mode 100644
index 00000000000..851f6d9493f
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pch/pr66343-1.c
@@ -0,0 +1,15 @@
+/* PR sanitizer/66343 */
+/* { dg-do assemble } */
+/* { dg-options "-fsanitize=undefined" } */
+
+#include "pr66343-1.h"
+
+void
+bar (int a, int b)
+{
+ a / b;
+}
+
+/* Hack to turn off PCH assembly comparison, as it is incompatible
+ with dg-do assemble. The target condition will be always false. */
+/* { dg-error "" "" { target { lp64 && { ! lp64 } } } } */
diff --git a/gcc/testsuite/gcc.dg/pch/pr66343-1.hs b/gcc/testsuite/gcc.dg/pch/pr66343-1.hs
new file mode 100644
index 00000000000..643a821d5ce
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pch/pr66343-1.hs
@@ -0,0 +1,8 @@
+/* PR sanitizer/66343 */
+/* { dg-options "-fsanitize=undefined" } */
+
+void
+foo (int a, int b)
+{
+ a / b;
+}
diff --git a/gcc/testsuite/gcc.dg/pch/pr66343-2.c b/gcc/testsuite/gcc.dg/pch/pr66343-2.c
new file mode 100644
index 00000000000..a86e61d1fe6
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pch/pr66343-2.c
@@ -0,0 +1,10 @@
+/* PR sanitizer/66343 */
+/* { dg-options "-fsanitize=undefined" } */
+
+#include "pr66343-2.h"
+
+void
+bar (int a, int b)
+{
+ a / b;
+}
diff --git a/gcc/testsuite/gcc.dg/pch/pr66343-2.hs b/gcc/testsuite/gcc.dg/pch/pr66343-2.hs
new file mode 100644
index 00000000000..643a821d5ce
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pch/pr66343-2.hs
@@ -0,0 +1,8 @@
+/* PR sanitizer/66343 */
+/* { dg-options "-fsanitize=undefined" } */
+
+void
+foo (int a, int b)
+{
+ a / b;
+}
diff --git a/gcc/testsuite/gcc.dg/pr67410.c b/gcc/testsuite/gcc.dg/pr67410.c
new file mode 100644
index 00000000000..ff3c4f16867
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr67410.c
@@ -0,0 +1,15 @@
+/* PR c/67410 */
+/* { dg-do run } */
+/* { dg-options "-std=gnu11" } */
+
+struct {
+ __CHAR16_TYPE__ s[2];
+} a[] = { u"ff", [0].s[0] = u'x', [1] = u"\u1234\u4567", [1].s[0] = u'\u89ab' };
+
+int
+main ()
+{
+ if (a[0].s[0] != u'x' || a[0].s[1] != u'f' || a[1].s[0] != u'\u89ab' || a[1].s[1] != u'\u4567')
+ __builtin_abort ();
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/pr72816.c b/gcc/testsuite/gcc.dg/pr72816.c
new file mode 100644
index 00000000000..b1498c7a703
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr72816.c
@@ -0,0 +1,9 @@
+/* PR c/72816 */
+/* { dg-do compile } */
+/* { dg-options "-std=gnu11" } */
+
+typedef const int A[];
+struct S {
+ int a;
+ A b;
+};
diff --git a/gcc/testsuite/gcc.dg/pr77587.c b/gcc/testsuite/gcc.dg/pr77587.c
new file mode 100644
index 00000000000..1e42f142f7a
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr77587.c
@@ -0,0 +1,14 @@
+/* PR target/77587 */
+/* { dg-do run } */
+/* { dg-require-weak-override "" } */
+/* { dg-additional-sources "pr77587a.c" } */
+
+void
+bar (long x, long y, long z)
+{
+ struct __attribute__((aligned (16))) S { long a, b, c, d; } s;
+ char *p = (char *) &s;
+ __asm ("" : "+r" (p));
+ if (((__UINTPTR_TYPE__) p) & 15)
+ __builtin_abort ();
+}
diff --git a/gcc/testsuite/gcc.dg/pr77587a.c b/gcc/testsuite/gcc.dg/pr77587a.c
new file mode 100644
index 00000000000..ed98e12b87e
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr77587a.c
@@ -0,0 +1,23 @@
+/* PR target/77587 */
+/* { dg-do compile } */
+/* { dg-require-weak-override "" } */
+
+void
+foo (long x, long y, long z)
+{
+}
+
+void bar (long x, long y, long z) __attribute__ ((weak, alias ("foo")));
+
+void
+baz (long x, long y, long z)
+{
+ bar (0, 0, 0);
+}
+
+int
+main ()
+{
+ baz (0, 0, 0);
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/pr79494.c b/gcc/testsuite/gcc.dg/pr79494.c
new file mode 100644
index 00000000000..e8543f8c43f
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr79494.c
@@ -0,0 +1,22 @@
+/* PR target/79494 */
+/* { dg-do compile } */
+/* { dg-require-effective-target split_stack } */
+/* { dg-options "-O2 -fsplit-stack -g" } */
+
+void
+foo (int a)
+{
+ __label__ lab;
+ __attribute__((noinline, noclone)) void bar (int b)
+ {
+ switch (b)
+ {
+ case 1:
+ goto lab;
+ case 2:
+ goto lab;
+ }
+ }
+ bar (a);
+lab:;
+}
diff --git a/gcc/testsuite/gcc.dg/pr79499.c b/gcc/testsuite/gcc.dg/pr79499.c
new file mode 100644
index 00000000000..509549ff2fd
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr79499.c
@@ -0,0 +1,13 @@
+/* PR middle-end/79499 */
+/* { dg-do compile { target split_stack } } */
+/* { dg-options "-O2 -fsplit-stack -fno-omit-frame-pointer" } */
+
+struct S { struct S *a, *b; };
+
+void
+foo (struct S *x)
+{
+ do
+ x->b = x->a;
+ while (x = x->a);
+}
diff --git a/gcc/testsuite/gcc.dg/pr79570.c b/gcc/testsuite/gcc.dg/pr79570.c
new file mode 100644
index 00000000000..c0537fada5f
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr79570.c
@@ -0,0 +1,12 @@
+/* PR target/79570 */
+/* { dg-do compile { target powerpc*-*-* ia64-*-* i?86-*-* x86_64-*-* } } */
+/* { dg-options "-O2 -fselective-scheduling2 -fvar-tracking-assignments" } */
+/* { dg-warning "changes selective scheduling" "" { target *-*-* } 0 } */
+
+void
+fn1 (char *b, char *d, int *c, int i)
+{
+ for (; i; i++, d++)
+ if (b[i])
+ *d = c[i];
+}
diff --git a/gcc/testsuite/gcc.dg/pr80112.c b/gcc/testsuite/gcc.dg/pr80112.c
new file mode 100644
index 00000000000..7c78aaedd98
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr80112.c
@@ -0,0 +1,21 @@
+/* PR rtl-optimization/80112 */
+/* { dg-do compile } */
+/* { dg-options "-Os -fmodulo-sched" } */
+
+void **a;
+
+void
+foo (int c)
+{
+ void *d[] = {&&e, &&f};
+ a = d;
+ switch (c)
+ {
+ f:
+ c = 9;
+ /* FALLTHRU */
+ case 9:
+ goto *a++;
+ e:;
+ }
+}
diff --git a/gcc/testsuite/gcc.dg/pr80286.c b/gcc/testsuite/gcc.dg/pr80286.c
new file mode 100644
index 00000000000..82f35b50099
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr80286.c
@@ -0,0 +1,23 @@
+/* PR target/80286 */
+/* { dg-do run } */
+/* { dg-options "-O2 -Wno-psabi" } */
+
+typedef int V __attribute__((vector_size (4 * sizeof (int))));
+
+__attribute__((noinline, noclone)) V
+foo (V x, V y)
+{
+ return x << y[0];
+}
+
+int
+main ()
+{
+ V x = { 1, 2, 3, 4 };
+ V y = { 5, 6, 7, 8 };
+ V z = foo (x, y);
+ V e = { 1 << 5, 2 << 5, 3 << 5, 4 << 5 };
+ if (__builtin_memcmp (&z, &e, sizeof (V)))
+ __builtin_abort ();
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/pr81192.c b/gcc/testsuite/gcc.dg/pr81192.c
new file mode 100644
index 00000000000..57eb4781d4d
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr81192.c
@@ -0,0 +1,22 @@
+/* { dg-options "-Os -fdump-tree-pre-details" } */
+
+unsigned a;
+int b, c;
+
+static int
+fn1 (int p1, int p2)
+{
+ return p1 > 2147483647 - p2 ? p1 : p1 + p2;
+}
+
+void
+fn2 (void)
+{
+ int j;
+ a = 30;
+ for (; a;)
+ for (; c; b = fn1 (j, 1))
+ ;
+}
+
+/* { dg-final { scan-tree-dump-times "(?n)find_duplicates: <bb .*> duplicate of <bb .*>" 1 "pre" } } */
diff --git a/gcc/testsuite/gcc.dg/pr81621.c b/gcc/testsuite/gcc.dg/pr81621.c
new file mode 100644
index 00000000000..fb41eab8961
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr81621.c
@@ -0,0 +1,5 @@
+/* PR target/81621 */
+/* { dg-do compile { target freorder } } */
+/* { dg-options "-Og -fno-split-wide-types -freorder-blocks-and-partition" } */
+
+#include "graphite/scop-10.c"
diff --git a/gcc/testsuite/gcc.dg/pr82112.c b/gcc/testsuite/gcc.dg/pr82112.c
new file mode 100644
index 00000000000..4ca69195acc
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr82112.c
@@ -0,0 +1,21 @@
+/* PR target/82112 */
+/* { dg-do compile } */
+/* { dg-options "-std=gnu90" } */
+
+struct S { int a[10]; } bar (void);
+int b, c;
+
+void
+foo (void)
+{
+ __atomic_load (bar ().a, &b, __ATOMIC_ACQUIRE); /* { dg-error "argument 1 of .__atomic_load. must be a non-void pointer type" } */
+ __atomic_load (&b, bar ().a, __ATOMIC_ACQUIRE); /* { dg-error "argument 2 of .__atomic_load. must be a pointer type" } */
+ __atomic_store (bar ().a, &b, __ATOMIC_SEQ_CST); /* { dg-error "argument 1 of .__atomic_store. must be a non-void pointer type" } */
+ __atomic_store (&b, bar ().a, __ATOMIC_SEQ_CST); /* { dg-error "argument 2 of .__atomic_store. must be a pointer type" } */
+ __atomic_exchange (bar ().a, &b, &c, __ATOMIC_RELAXED); /* { dg-error "argument 1 of .__atomic_exchange. must be a non-void pointer type" } */
+ __atomic_exchange (&b, bar ().a, &c, __ATOMIC_RELAXED); /* { dg-error "argument 2 of .__atomic_exchange. must be a pointer type" } */
+ __atomic_exchange (&b, &c, bar ().a, __ATOMIC_RELAXED); /* { dg-error "argument 3 of .__atomic_exchange. must be a pointer type" } */
+ __atomic_compare_exchange (bar ().a, &b, &c, 1, __ATOMIC_RELAXED, __ATOMIC_RELAXED); /* { dg-error "argument 1 of .__atomic_compare_exchange. must be a non-void pointer type" } */
+ __atomic_compare_exchange (&b, bar ().a, &c, 1, __ATOMIC_RELAXED, __ATOMIC_RELAXED); /* { dg-error "argument 2 of .__atomic_compare_exchange. must be a pointer type" } */
+ __atomic_compare_exchange (&b, &c, bar ().a, 1, __ATOMIC_RELAXED, __ATOMIC_RELAXED); /* { dg-error "argument 3 of .__atomic_compare_exchange. must be a pointer type" } */
+}
diff --git a/gcc/testsuite/gcc.dg/tls/pr78796.c b/gcc/testsuite/gcc.dg/tls/pr78796.c
new file mode 100644
index 00000000000..12263da9bb4
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tls/pr78796.c
@@ -0,0 +1,32 @@
+/* PR target/78796 */
+/* { dg-do run } */
+/* { dg-options "-O2" } */
+/* { dg-additional-options "-mcmodel=large" { target aarch64-*-* } } */
+/* { dg-require-effective-target tls } */
+
+struct S { int a, b, c, d, e; };
+struct S t;
+__thread struct S s;
+
+__attribute__((used, noinline, noclone)) void
+foo (int *x, int *y)
+{
+ asm volatile ("" : : "g" (x), "g" (y) : "memory");
+ if (*x != 1 || *y != 2)
+ __builtin_abort ();
+}
+
+__attribute__((used, noinline, noclone)) void
+bar (void)
+{
+ foo (&t.c, &s.c);
+}
+
+int
+main ()
+{
+ t.c = 1;
+ s.c = 2;
+ bar ();
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/torture/pr68528.c b/gcc/testsuite/gcc.dg/torture/pr68528.c
new file mode 100644
index 00000000000..d69d600f43b
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/pr68528.c
@@ -0,0 +1,17 @@
+/* { dg-do run } */
+
+#define INT_MIN ( -__INT_MAX__ - 1 )
+
+extern void abort (void);
+
+int main (void)
+{
+ int x0 = INT_MIN;
+ long x1 = 0L;
+ int x2 = 0;
+ int t = ( 0 || ( INT_MIN - (int) ( x0 - x1 ) ) );
+
+ if ( t != 0 ) { x2 = t; abort(); }
+
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/torture/pr75964.c b/gcc/testsuite/gcc.dg/torture/pr75964.c
new file mode 100644
index 00000000000..3b895ba7085
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/pr75964.c
@@ -0,0 +1,28 @@
+/* { dg-do run } */
+
+typedef __UINT8_TYPE__ uint8_t;
+
+uint8_t __attribute__ ((noinline, noclone))
+abs8 (uint8_t x)
+{
+ if (x & 0x80)
+ x = -x;
+
+ if (x & 0x80)
+ x = 0x7f;
+
+ return x;
+}
+
+int
+main (void)
+{
+ if (abs8 (0) != 0
+ || abs8 (1) != 1
+ || abs8 (127) != 127
+ || abs8 (128) != 127
+ || abs8 (129) != 127
+ || abs8 (255) != 1)
+ __builtin_abort ();
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/torture/pr78416.c b/gcc/testsuite/gcc.dg/torture/pr78416.c
new file mode 100644
index 00000000000..5028156f4fa
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/pr78416.c
@@ -0,0 +1,17 @@
+/* PR middle-end/78416 */
+/* { dg-do run { target int128 } } */
+
+int
+main ()
+{
+ unsigned __int128 x;
+ x = 0xFFFFFFFFFFFFFFFFULL;
+ x /= ~0x7FFFFFFFFFFFFFFFLL;
+ if (x != 0)
+ __builtin_abort ();
+ x = ~0x7FFFFFFFFFFFFFFELL;
+ x /= ~0x7FFFFFFFFFFFFFFFLL;
+ if (x != 1)
+ __builtin_abort ();
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/torture/pr79666.c b/gcc/testsuite/gcc.dg/torture/pr79666.c
new file mode 100644
index 00000000000..3d83229521c
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/pr79666.c
@@ -0,0 +1,30 @@
+/* { dg-do run } */
+
+struct
+{
+ unsigned a:6;
+} b;
+
+int c, e, g = 7;
+signed char d, f = 6, h = -10;
+
+void fn1 ()
+{
+ for (; c < 9; c++)
+ {
+ if (f)
+ g = ~(~0 / (g ^ e));
+ b.a = ~0;
+ d = ~((h ^ b.a) & 132 & (~(f && g) | (d && 1)));
+ e = ~0;
+ if (d < 127 || f < 1)
+ continue;
+ g = 0;
+ }
+}
+
+int main ()
+{
+ fn1 ();
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/torture/pr79732.c b/gcc/testsuite/gcc.dg/torture/pr79732.c
new file mode 100644
index 00000000000..7231ba4f139
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/pr79732.c
@@ -0,0 +1,5 @@
+/* { dg-do link } */
+
+int bar () __attribute__ ((alias ("foo")));
+void foo () { }
+int main () { return bar(); }
diff --git a/gcc/testsuite/gcc.dg/torture/pr80025.c b/gcc/testsuite/gcc.dg/torture/pr80025.c
new file mode 100644
index 00000000000..e53eaad6199
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/pr80025.c
@@ -0,0 +1,24 @@
+/* PR debug/80025 */
+/* { dg-do compile } */
+/* { dg-options "-g -ftracer -w" } */
+
+int a;
+long int b, c;
+
+long int
+foo (void)
+{
+}
+
+void
+bar (int x, short int y, unsigned short int z)
+{
+}
+
+int
+baz (void)
+{
+ a -= b;
+ b = !foo ();
+ bar (b ^= (c ^ 1) ? (c ^ 1) : foo (), (__INTPTR_TYPE__) &bar, a);
+}
diff --git a/gcc/testsuite/gcc.dg/torture/pr80122.c b/gcc/testsuite/gcc.dg/torture/pr80122.c
new file mode 100644
index 00000000000..a76d756c32e
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/pr80122.c
@@ -0,0 +1,52 @@
+/* { dg-do run } */
+
+#define __GNU_ALWAYS_INLINE inline __attribute__(( __always_inline__))
+
+#define DEVT_ALL 0
+
+#define CMD_ABI_DEVICES 100
+
+static __GNU_ALWAYS_INLINE int
+send_msg_to_gm_w_dev_t(int msg_type, unsigned int dev_msg_type,
+ int devt, ...)
+{
+ char s[256];
+ int nArgs = __builtin_va_arg_pack_len();
+ if (nArgs != 2)
+ __builtin_abort ();
+ __builtin_sprintf (s, "%d", __builtin_va_arg_pack ());
+ if (__builtin_strcmp (s, "99") != 0)
+ __builtin_abort ();
+ /* do something with nArgs and ... */
+ return 0;
+}
+
+static __GNU_ALWAYS_INLINE int
+send_msg_to_gm(int msg_type, unsigned int dev_msg_type,
+ ...)
+{
+ int nArgs = __builtin_va_arg_pack_len();
+ if (nArgs != 2)
+ __builtin_abort ();
+ return send_msg_to_gm_w_dev_t(msg_type, dev_msg_type,
+ DEVT_ALL, __builtin_va_arg_pack());
+}
+
+static __GNU_ALWAYS_INLINE int
+send_enable(unsigned int dev_msg_type, ...)
+{
+ int nArgs = __builtin_va_arg_pack_len();
+ if (nArgs != 2)
+ __builtin_abort ();
+ return send_msg_to_gm(CMD_ABI_DEVICES, dev_msg_type, __builtin_va_arg_pack());
+}
+
+int
+main(void)
+{
+ int mode = 99;
+
+ send_enable(1, mode, sizeof(mode));
+
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/torture/pr80362.c b/gcc/testsuite/gcc.dg/torture/pr80362.c
new file mode 100644
index 00000000000..6d22eb040ad
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/pr80362.c
@@ -0,0 +1,10 @@
+/* { dg-do run } */
+/* { dg-additional-options "-fstrict-overflow" } */
+
+int main()
+{
+ signed char var_0, var_1 = -128;
+ var_0 = (signed char)(-var_1) / 3;
+ if (var_0 > 0)
+ __builtin_abort();
+}
diff --git a/gcc/testsuite/gcc.dg/torture/pr80539.c b/gcc/testsuite/gcc.dg/torture/pr80539.c
new file mode 100644
index 00000000000..a66767814d3
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/pr80539.c
@@ -0,0 +1,22 @@
+/* { dg-do compile } */
+
+signed char a, b;
+void fn1()
+{
+ signed char c, e;
+ short d;
+ if (0) {
+ for (; d;) {
+l1:
+ for (c = 7; a; c++)
+ ;
+ e = 6;
+ for (; b; e++)
+ ;
+ }
+ c -= e;
+ }
+ if (d == 7)
+ goto l1;
+ a = c;
+}
diff --git a/gcc/testsuite/gcc.dg/ubsan/pr70878.c b/gcc/testsuite/gcc.dg/ubsan/pr70878.c
new file mode 100644
index 00000000000..acd7fb05e4c
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/ubsan/pr70878.c
@@ -0,0 +1,9 @@
+/* PR sanitizer/80878 */
+/* { dg-do compile { target { { i?86-*-* x86_64-*-* } && lp64 } } } */
+/* { dg-options "-fsanitize=object-size" } */
+
+void * sbrk ()
+{
+ volatile register unsigned int sp_r1 __asm__ ("ebx");
+ return __builtin_strcat ((char*)sp_r1, 0); /* { dg-warning "cast to pointer from integer of different size" } */
+}
diff --git a/gcc/testsuite/gcc.dg/ubsan/pr80097.c b/gcc/testsuite/gcc.dg/ubsan/pr80097.c
new file mode 100644
index 00000000000..4d48eea69c3
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/ubsan/pr80097.c
@@ -0,0 +1,10 @@
+/* PR c/80097 */
+/* { dg-do compile } */
+/* { dg-options "-std=c89 -fsanitize=float-divide-by-zero" } */
+
+int
+foo (double a)
+{
+ int b = (1 / a >= 1);
+ return b;
+}
diff --git a/gcc/testsuite/gcc.dg/ubsan/pr81162.c b/gcc/testsuite/gcc.dg/ubsan/pr81162.c
new file mode 100644
index 00000000000..9ce98afa367
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/ubsan/pr81162.c
@@ -0,0 +1,17 @@
+/* PR tree-optimization/81162 */
+/* { dg-do run } */
+/* { dg-options "-fsanitize=undefined -O2" } */
+
+short s;
+int i1 = 1;
+int i2 = 1;
+unsigned char uc = 147;
+
+int main() {
+ s = (-uc + 2147483647) << 0;
+ if (9031239389974324562ULL >= (-((i1 && i2) + uc) ^ -21096) ) {
+ return 0;
+ } else {
+ return -1;
+ }
+}
diff --git a/gcc/testsuite/gcc.dg/vector-1.c b/gcc/testsuite/gcc.dg/vector-1.c
new file mode 100644
index 00000000000..a5eaa2a8c2d
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vector-1.c
@@ -0,0 +1,8 @@
+/* { dg-do compile } */
+/* { dg-options "-std=gnu90" } */
+
+typedef int V __attribute__ ((vector_size(4)));
+void fn1 ()
+{
+ (V){(1,0)}[0] = 0;
+}
diff --git a/gcc/testsuite/gcc.target/arm/fpscr.c b/gcc/testsuite/gcc.target/arm/fpscr.c
new file mode 100644
index 00000000000..cafba4e8d67
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/fpscr.c
@@ -0,0 +1,16 @@
+/* Test the fpscr builtins. */
+
+/* { dg-do compile } */
+/* { dg-require-effective-target arm_vfp_ok } */
+/* { dg-skip-if "need fp instructions" { *-*-* } { "-mfloat-abi=soft" } { "" } } */
+/* { dg-options "-mfpu=vfp -mfloat-abi=softfp" } */
+
+void
+test_fpscr ()
+{
+ volatile unsigned int status = __builtin_arm_get_fpscr ();
+ __builtin_arm_set_fpscr (status);
+}
+
+/* { dg-final { scan-assembler "mrc\tp10, 7, r\[0-9\]+, cr1, cr0, 0" } } */
+/* { dg-final { scan-assembler "mcr\tp10, 7, r\[0-9\]+, cr1, cr0, 0" } } */
diff --git a/gcc/testsuite/gcc.target/avr/isr-test.h b/gcc/testsuite/gcc.target/avr/isr-test.h
new file mode 100644
index 00000000000..3117e5325f4
--- /dev/null
+++ b/gcc/testsuite/gcc.target/avr/isr-test.h
@@ -0,0 +1,282 @@
+#ifndef ISR_TEST_H
+#define ISR_TEST_H
+
+#include <string.h>
+
+#define ISR(N,...) \
+__attribute__ ((used, externally_visible , ## __VA_ARGS__)) \
+ void __vector_##N (void); \
+ void __vector_##N (void)
+
+#define SFR(ADDR) (*(unsigned char volatile*) (__AVR_SFR_OFFSET__ + (ADDR)))
+#define CORE_SFRS SFR (0x38)
+#define SREG SFR (0x3F)
+#define SPL SFR (0x3D)
+#define EIND SFR (0x3C)
+#define RAMPZ SFR (0x3B)
+#define RAMPY SFR (0x3A)
+#define RAMPX SFR (0x39)
+#define RAMPD SFR (0x38)
+
+#ifdef __AVR_HAVE_JMP_CALL__
+#define VEC_SIZE 4
+#else
+#define VEC_SIZE 2
+#endif
+
+#ifdef __AVR_TINY__
+#define FIRST_REG 16
+#else
+#define FIRST_REG 0
+#endif
+
+#define CR "\n\t"
+
+typedef struct
+{
+ unsigned char sfrs[8];
+ unsigned char gprs[32 - FIRST_REG];
+} regs_t;
+
+regs_t reginfo1, reginfo2;
+
+__attribute__((noinline))
+static void clear_reginfo (void)
+{
+ memset (reginfo1.sfrs, 0, sizeof (reginfo1.sfrs));
+ memset (reginfo2.sfrs, 0, sizeof (reginfo2.sfrs));
+}
+
+__attribute__((noinline))
+static void compare_reginfo (unsigned long gpr_ignore)
+{
+ signed char regno;
+ const unsigned char *preg1 = &reginfo1.gprs[0];
+ const unsigned char *preg2 = &reginfo2.gprs[0];
+
+ if (memcmp (&reginfo1, &reginfo2, 8))
+ __builtin_abort();
+
+ gpr_ignore >>= FIRST_REG;
+
+ for (regno = FIRST_REG; regno < 32;
+ regno++, preg1++, preg2++, gpr_ignore >>= 1)
+ {
+ if (gpr_ignore & 1)
+ continue;
+
+ if (*preg1 != *preg2)
+ {
+ static signed char volatile failed_regno;
+ failed_regno = regno;
+ __builtin_abort();
+ }
+ }
+}
+
+/* STore GPR */
+#define ST(regno,M) \
+ CR "sts %[" #M "]+8-%[first]+" #regno ", r" #regno
+
+/* STore SFR */
+#define ST_SFR(sfr, n_sfr, M) \
+ CR "in __tmp_reg__,%i[s_" #sfr "]" \
+ CR "sts %[" #M "]+" #n_sfr ", __tmp_reg__"
+
+/* Named asm OPerand for SFR */
+#define OP_SFR(sfr) \
+ , [s_ ## sfr] "n" (&(sfr))
+
+/* Write funny value to SFR */
+#define XX_SFR(sfr) \
+ CR "dec r31 $ out %i[s_" #sfr "], r31"
+
+/* Write 0 to SFR */
+#define OO_SFR(sfr) \
+ CR "out %i[s_" #sfr "], __zero_reg__"
+
+/* Macros for SREG */
+#define ST_SREG(M) ST_SFR (SREG,0,M)
+#define OP_SREG OP_SFR (SREG)
+#define XX_SREG XX_SFR (SREG)
+
+/* Macros for EIND */
+#if defined __AVR_HAVE_EIJMP_EICALL__
+#define ST_EIND(M) ST_SFR (EIND,1,M)
+#define OP_EIND OP_SFR (EIND)
+#else
+#define ST_EIND(M) /* empty */
+#define OP_EIND /* empty */
+#endif
+
+/* Macros for RAMPX */
+#if defined (__AVR_HAVE_RAMPX__)
+#define ST_RAMPX(M) ST_SFR (RAMPX,2,M)
+#define OP_RAMPX OP_SFR (RAMPX)
+#define XX_RAMPX XX_SFR (RAMPX)
+#define OO_RAMPX OO_SFR (RAMPX)
+#else
+#define ST_RAMPX(M) /* empty */
+#define OP_RAMPX /* empty */
+#define XX_RAMPX /* empty */
+#define OO_RAMPX /* empty */
+#endif
+
+/* Macros for RAMPY */
+#if defined (__AVR_HAVE_RAMPY__)
+#define ST_RAMPY(M) ST_SFR (RAMPY,3,M)
+#define OP_RAMPY OP_SFR (RAMPY)
+#define XX_RAMPY XX_SFR (RAMPY)
+#define OO_RAMPY OO_SFR (RAMPY)
+#else
+#define ST_RAMPY(M) /* empty */
+#define OP_RAMPY /* empty */
+#define XX_RAMPY /* empty */
+#define OO_RAMPY /* empty */
+#endif
+
+/* Macros for RAMPZ */
+#if defined (__AVR_HAVE_RAMPZ__)
+#define ST_RAMPZ(M) ST_SFR (RAMPZ,4,M)
+#define OP_RAMPZ OP_SFR (RAMPZ)
+#define XX_RAMPZ XX_SFR (RAMPZ)
+#define OO_RAMPZ OO_SFR (RAMPZ)
+#else
+#define ST_RAMPZ(M) /* empty */
+#define OP_RAMPZ /* empty */
+#define XX_RAMPZ /* empty */
+#define OO_RAMPZ /* empty */
+#endif
+
+/* Macros for RAMPD */
+#if defined (__AVR_HAVE_RAMPD__)
+#define ST_RAMPD(M) ST_SFR (RAMPD,5,M)
+#define OP_RAMPD OP_SFR (RAMPD)
+#else
+#define ST_RAMPD(M) /* empty */
+#define OP_RAMPD /* empty */
+#endif
+
+/* Macros for all GPRs */
+#if defined __AVR_TINY__
+#define ST_REGS_LO(M) /* empty */
+#else
+#define ST_REGS_LO(M) \
+ ST(0,M) ST(1,M) ST(2,M) ST(3,M) \
+ ST(4,M) ST(5,M) ST(6,M) ST(7,M) \
+ ST(8,M) ST(9,M) ST(10,M) ST(11,M) \
+ ST(12,M) ST(13,M) ST(14,M) ST(15,M)
+#endif /* AVR_TINY */
+
+#define ST_REGS_HI(M) \
+ ST(16,M) ST(17,M) ST(18,M) ST(19,M) \
+ ST(20,M) ST(21,M) ST(22,M) ST(23,M) \
+ ST(24,M) ST(25,M) ST(26,M) ST(27,M) \
+ ST(28,M) ST(29,M) ST(30,M) ST(31,M)
+
+__attribute__((unused,naked,noinline,noclone))
+static void host_store1 (void)
+{
+ __asm __volatile__
+ ("nop"
+ CR ".global do_stores_before"
+ CR ".type do_stores_before,@function"
+ CR "do_stores_before:"
+ /* Funny values to some SFRs */
+ CR "ldi r31, 1 + 'Z'"
+ XX_RAMPZ
+ XX_RAMPY
+ XX_RAMPX
+ CR "dec __zero_reg__"
+ CR "clr r31"
+ XX_SREG
+ /* Must set I-flag due to RETI of ISR */
+ CR "sei"
+ /* Store core regs before ISR */
+ ST_RAMPX (mem1)
+ ST_RAMPY (mem1)
+ ST_RAMPZ (mem1)
+ ST_RAMPD (mem1)
+ ST_EIND (mem1)
+ ST_SREG (mem1)
+ CR "ldi r31, 0xaa"
+ CR "mov __tmp_reg__, r31"
+ CR "ldi r31, 31"
+ ST_REGS_LO (mem1)
+ ST_REGS_HI (mem1)
+ CR "ret"
+ : /* No outputs */
+ : [mem1] "i" (&reginfo1), [first] "n" (FIRST_REG)
+ OP_RAMPX
+ OP_RAMPY
+ OP_RAMPZ
+ OP_RAMPD
+ OP_EIND
+ OP_SREG
+ : "memory", "r31");
+}
+
+__attribute__((unused,naked,noinline,noclone))
+static void host_store2 (void)
+{
+ __asm __volatile__
+ ("nop"
+ CR ".global do_stores_after"
+ CR ".type do_stores_after,@function"
+ CR "do_stores_after:"
+ /* Store core regs after ISR */
+ ST_REGS_LO (mem2)
+ ST_REGS_HI (mem2)
+ ST_RAMPX (mem2)
+ ST_RAMPY (mem2)
+ ST_RAMPZ (mem2)
+ ST_RAMPD (mem2)
+ ST_EIND (mem2)
+ ST_SREG (mem2)
+ /* Undo funny values */
+ CR "clr __zero_reg__"
+ OO_RAMPX
+ OO_RAMPY
+ OO_RAMPZ
+ CR "ret"
+ : /* No outputs */
+ : [mem2] "i" (&reginfo2), [first] "n" (FIRST_REG)
+ OP_RAMPX
+ OP_RAMPY
+ OP_RAMPZ
+ OP_RAMPD
+ OP_EIND
+ OP_SREG
+ : "memory");
+}
+
+#define MK_CALL_ISR(vecno) \
+ __asm __volatile__ \
+ (/* Funny values to some SFRs */ \
+ /* Must set I-flag due to RETI of ISR */ \
+ /* Store core regs before ISR */ \
+ CR "%~call do_stores_before" \
+ /* Execute ISR */ \
+ CR "%~call __vectors + %[vect]" \
+ /* Store core regs after ISR */ \
+ /* Undo funny values */ \
+ CR "%~call do_stores_after" \
+ : /* No outputs */ \
+ : [vect] "i" (VEC_SIZE * (vecno)) \
+ , "i" (host_store1) \
+ , "i" (host_store2) \
+ : "memory", "r31")
+
+
+#define MK_RUN_ISR(N, IGMSK) \
+ \
+__attribute__((noinline,noclone)) \
+void run_isr_ ## N (void) \
+{ \
+ clear_reginfo(); \
+ MK_CALL_ISR (N); \
+ compare_reginfo (IGMSK); \
+}
+
+#endif /* ISR_TEST_H */
+
diff --git a/gcc/testsuite/gcc.target/avr/torture/isr-01-simple.c b/gcc/testsuite/gcc.target/avr/torture/isr-01-simple.c
new file mode 100644
index 00000000000..271d0cf47e9
--- /dev/null
+++ b/gcc/testsuite/gcc.target/avr/torture/isr-01-simple.c
@@ -0,0 +1,98 @@
+/* { dg-do run } */
+/* { dg-options "-std=c99" } */
+
+#include "../isr-test.h"
+
+int volatile v;
+
+/**********************************************************************/
+
+ISR (1, signal)
+{
+}
+
+MK_RUN_ISR (1, 0)
+
+void test1 (void)
+{
+ run_isr_1();
+}
+
+/**********************************************************************/
+
+ISR (2, signal)
+{
+ v++;
+}
+
+MK_RUN_ISR (2, 0)
+
+void test2 (void)
+{
+ v = 0;
+ run_isr_2();
+ if (v != 1)
+ __builtin_abort();
+}
+
+
+/**********************************************************************/
+
+ISR (3, signal)
+{
+ __asm __volatile__ ("$ lds r27, v"
+ "$ swap r27"
+ "$ sts v, r27"
+ ::: "memory", "r27");
+}
+
+MK_RUN_ISR (3, 0)
+
+void test3 (void)
+{
+ run_isr_3();
+ if (v != 0x10)
+ __builtin_abort();
+}
+
+/**********************************************************************/
+
+ISR (4, signal)
+{
+ __asm __volatile__ ("sts v,__zero_reg__" ::: "memory");
+}
+
+MK_RUN_ISR (4, 0)
+
+void test4 (void)
+{
+ run_isr_4();
+ if (v != 0)
+ __builtin_abort();
+}
+
+/**********************************************************************/
+
+ISR (5, signal)
+{
+ __asm __volatile__ ("clt");
+}
+
+MK_RUN_ISR (5, 0)
+
+void test5 (void)
+{
+ run_isr_5();
+}
+
+/**********************************************************************/
+
+int main (void)
+{
+ test1();
+ test2();
+ test3();
+ test4();
+ test5();
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.target/avr/torture/isr-02-call.c b/gcc/testsuite/gcc.target/avr/torture/isr-02-call.c
new file mode 100644
index 00000000000..be4f22ebb35
--- /dev/null
+++ b/gcc/testsuite/gcc.target/avr/torture/isr-02-call.c
@@ -0,0 +1,60 @@
+/* { dg-do run } */
+/* { dg-options "-std=c99" } */
+
+#include "../isr-test.h"
+
+int volatile v;
+
+__attribute__((noinline,noclone))
+void inc_v (void)
+{
+ v++;
+}
+
+/**********************************************************************/
+
+ISR (1, signal)
+{
+ inc_v();
+}
+
+MK_RUN_ISR (1, 0)
+
+void test1 (void)
+{
+ run_isr_1();
+ if (v != 1)
+ __builtin_abort();
+}
+
+/**********************************************************************/
+
+ISR (2, signal)
+{
+ if (v == 1)
+ inc_v();
+ else
+ v += 2;
+}
+
+MK_RUN_ISR (2, 0)
+
+void test2 (void)
+{
+ run_isr_2();
+ if (v != 2)
+ __builtin_abort();
+ run_isr_2();
+ if (v != 4)
+ __builtin_abort();
+}
+
+
+/**********************************************************************/
+
+int main (void)
+{
+ test1();
+ test2();
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.target/avr/torture/isr-03-fixed.c b/gcc/testsuite/gcc.target/avr/torture/isr-03-fixed.c
new file mode 100644
index 00000000000..5606225aebc
--- /dev/null
+++ b/gcc/testsuite/gcc.target/avr/torture/isr-03-fixed.c
@@ -0,0 +1,146 @@
+/* { dg-do run } */
+/* { dg-options "-std=gnu99 -fno-lto -fno-toplevel-reorder" } */
+
+// No LTO for now due to PR lto/68384.
+
+#ifdef __AVR_TINY__
+unsigned char reg2;
+#else
+register unsigned char reg2 __asm("r2");
+#endif
+
+#include "../isr-test.h"
+
+#define SET_REG(reg,val) \
+ do { \
+ reg = (val); \
+ __asm __volatile__("" : "+r" (reg)); \
+ } while (0) \
+
+#define GET_REG(reg) \
+ ({ \
+ __asm __volatile__("" : "+r" (reg)); \
+ reg; \
+ })
+
+/**********************************************************************/
+
+ISR (1, signal)
+{
+ reg2++;
+}
+
+MK_RUN_ISR (1, 1ul << 2)
+
+void test1 (void)
+{
+ SET_REG (reg2, 0);
+ run_isr_1();
+ if (GET_REG (reg2) != 1)
+ __builtin_abort();
+}
+
+/**********************************************************************/
+
+__attribute__((noinline,noclone))
+void inc_r2 (void)
+{
+ reg2++;
+}
+
+ISR (2, signal)
+{
+ inc_r2 ();
+}
+
+MK_RUN_ISR (2, 1ul << 2)
+
+void test2 (void)
+{
+ run_isr_2();
+ if (GET_REG (reg2) != 2)
+ __builtin_abort();
+}
+
+
+/**********************************************************************/
+
+ISR (3, signal)
+{
+#ifndef __AVR_TINY__
+ register char r4 __asm ("r4");
+ __asm __volatile ("inc %0" : "+r" (r4));
+ __asm __volatile ("inc r5" ::: "r5");
+#endif
+}
+
+MK_RUN_ISR (3, 0)
+
+void test3 (void)
+{
+ run_isr_3();
+}
+
+
+/**********************************************************************/
+
+#define CLOBB(reg) \
+ do { \
+ __asm __volatile__ ("inc " #reg ::: #reg); \
+ } while (0)
+
+ISR (4, signal)
+{
+ char volatile v;
+ v = 1;
+
+#ifndef __AVR_TINY__
+ CLOBB (r3);
+ CLOBB (r4);
+ CLOBB (r5);
+ CLOBB (r6);
+ CLOBB (r7);
+ CLOBB (r8);
+ CLOBB (r9);
+ CLOBB (r10);
+ CLOBB (r11);
+ CLOBB (r12);
+ CLOBB (r13);
+ CLOBB (r14);
+ CLOBB (r15);
+ CLOBB (r16);
+ CLOBB (r17);
+#endif
+
+ CLOBB (r18);
+ CLOBB (r19);
+ CLOBB (r20);
+ CLOBB (r21);
+ CLOBB (r22);
+ CLOBB (r23);
+ CLOBB (r24);
+ CLOBB (r25);
+ CLOBB (r26);
+ CLOBB (r27);
+ CLOBB (r30);
+ CLOBB (r31);
+}
+
+MK_RUN_ISR (4, 0)
+
+void test4 (void)
+{
+ run_isr_4();
+}
+
+
+/**********************************************************************/
+
+int main (void)
+{
+ test1();
+ test2();
+ test3();
+ test4();
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx-pr80286.c b/gcc/testsuite/gcc.target/i386/avx-pr80286.c
new file mode 100644
index 00000000000..2e1881d218f
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx-pr80286.c
@@ -0,0 +1,26 @@
+/* PR target/80286 */
+/* { dg-do run { target avx } } */
+/* { dg-options "-O2 -mavx" } */
+
+#include "avx-check.h"
+#include <immintrin.h>
+
+__m256i m;
+
+__attribute__((noinline, noclone)) __m128i
+foo (__m128i x)
+{
+ int s = _mm_cvtsi128_si32 (_mm256_castsi256_si128 (m));
+ return _mm_srli_epi16 (x, s);
+}
+
+static void
+avx_test (void)
+{
+ __m128i a = (__m128i) (__v8hi) { 1 << 7, 2 << 8, 3 << 9, 4 << 10, 5 << 11, 6 << 12, 7 << 13, 8 << 12 };
+ m = (__m256i) (__v8si) { 7, 8, 9, 10, 11, 12, 13, 14 };
+ __m128i c = foo (a);
+ __m128i b = (__m128i) (__v8hi) { 1, 2 << 1, 3 << 2, 4 << 3, 5 << 4, 6 << 5, 7 << 6, 8 << 5 };
+ if (__builtin_memcmp (&c, &b, sizeof (__m128i)))
+ __builtin_abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/mpx/pr79987.c b/gcc/testsuite/gcc.target/i386/mpx/pr79987.c
new file mode 100644
index 00000000000..b3ebda95694
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/mpx/pr79987.c
@@ -0,0 +1,5 @@
+/* { dg-do compile } */
+/* { dg-options "-fcheck-pointer-bounds -mmpx" } */
+
+extern void foo;
+void *bar = &foo; /* { dg-warning "taking address of expression of type .void." } */
diff --git a/gcc/testsuite/gcc.target/i386/pr77377.c b/gcc/testsuite/gcc.target/i386/pr77377.c
new file mode 100644
index 00000000000..4f7eaa4981b
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr77377.c
@@ -0,0 +1,6 @@
+/* PR middle-end/77377 */
+/* { dg-do compile } */
+/* { dg-options "-O3 -msse" } */
+/* { dg-additional-options "-fpic" { target fpic } } */
+
+#include "../../c-c++-common/pr59037.c"
diff --git a/gcc/testsuite/gcc.target/i386/pr77594.c b/gcc/testsuite/gcc.target/i386/pr77594.c
new file mode 100644
index 00000000000..96c51fd71fa
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr77594.c
@@ -0,0 +1,11 @@
+/* PR middle-end/77594 */
+/* { dg-do compile } */
+/* { dg-options "-O0" } */
+
+int
+foo (int a, int *b)
+{
+ return __builtin_sub_overflow (0, a, b);
+}
+
+/* { dg-final { scan-assembler-times "\tjn?o\t" 1 } } */
diff --git a/gcc/testsuite/gcc.target/i386/pr78227-1.c b/gcc/testsuite/gcc.target/i386/pr78227-1.c
new file mode 100644
index 00000000000..9dc97dd738f
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr78227-1.c
@@ -0,0 +1,30 @@
+/* PR target/78227 */
+/* { dg-do compile } */
+/* { dg-options "-mavx512f -O0 -Wno-psabi" } */
+
+typedef int V __attribute__((vector_size (64)));
+typedef long long int W __attribute__((vector_size (64)));
+
+V
+foo1 (V v)
+{
+ return v > 0;
+}
+
+V
+bar1 (V v)
+{
+ return v != 0;
+}
+
+W
+foo2 (W w)
+{
+ return w > 0;
+}
+
+W
+bar2 (W w)
+{
+ return w != 0;
+}
diff --git a/gcc/testsuite/gcc.target/i386/pr78227-2.c b/gcc/testsuite/gcc.target/i386/pr78227-2.c
new file mode 100644
index 00000000000..c557c8f12b4
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr78227-2.c
@@ -0,0 +1,30 @@
+/* PR target/78227 */
+/* { dg-do compile } */
+/* { dg-options "-mavx512bw -O0 -Wno-psabi" } */
+
+typedef signed char V __attribute__((vector_size (64)));
+typedef short int W __attribute__((vector_size (64)));
+
+V
+foo1 (V v)
+{
+ return v > 0;
+}
+
+V
+bar1 (V v)
+{
+ return v != 0;
+}
+
+W
+foo2 (W w)
+{
+ return w > 0;
+}
+
+W
+bar2 (W w)
+{
+ return w != 0;
+}
diff --git a/gcc/testsuite/gcc.target/i386/pr79559.c b/gcc/testsuite/gcc.target/i386/pr79559.c
new file mode 100644
index 00000000000..2eeb652a82e
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr79559.c
@@ -0,0 +1,11 @@
+/* PR target/79559 */
+/* { dg-do compile } */
+
+void
+foo (int x)
+{
+ __asm__ volatile ("# %K0" : : "r" (x)); /* { dg-error "invalid operand code" } */
+ __asm__ volatile ("# %r0" : : "r" (x)); /* { dg-error "invalid operand code" } */
+ __asm__ volatile ("# %r0" : : "n" (129)); /* { dg-error "invalid operand code" } */
+ __asm__ volatile ("# %R0" : : "r" (x)); /* { dg-error "invalid operand code" } */
+}
diff --git a/gcc/testsuite/gcc.target/i386/pr79568-1.c b/gcc/testsuite/gcc.target/i386/pr79568-1.c
new file mode 100644
index 00000000000..3bda3b57f4b
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr79568-1.c
@@ -0,0 +1,18 @@
+/* PR target/79568 */
+/* { dg-do compile } */
+/* { dg-options "-mno-avx512vl -mavx512bw -O2" } */
+
+#pragma GCC push_options
+#pragma GCC target ("avx512vl,avx512bw")
+void
+foo (char __attribute__ ((__vector_size__(32))) *x, char __attribute__ ((__vector_size__(32))) *y, int z)
+{
+ __builtin_ia32_storedquqi256_mask (x, *y, z);
+}
+#pragma GCC pop_options
+
+void
+bar (char __attribute__ ((__vector_size__(32))) *x, char __attribute__ ((__vector_size__(32))) *y, int z)
+{
+ __builtin_ia32_storedquqi256_mask (x, *y, z); /* { dg-error "needs isa option" } */
+}
diff --git a/gcc/testsuite/gcc.target/i386/pr79568-2.c b/gcc/testsuite/gcc.target/i386/pr79568-2.c
new file mode 100644
index 00000000000..a0ee8e92139
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr79568-2.c
@@ -0,0 +1,18 @@
+/* PR target/79568 */
+/* { dg-do compile { target lp64 } } */
+/* { dg-options "-mno-lwp" } */
+
+#pragma GCC push_options
+#pragma GCC target ("lwp")
+void
+foo (unsigned long x, unsigned int y)
+{
+ __builtin_ia32_lwpval64 (x, y, 1);
+}
+#pragma GCC pop_options
+
+void
+bar (unsigned long x, unsigned int y)
+{
+ __builtin_ia32_lwpval64 (x, y, 1); /* { dg-error "needs isa option" } */
+}
diff --git a/gcc/testsuite/gcc.target/i386/pr79568-3.c b/gcc/testsuite/gcc.target/i386/pr79568-3.c
new file mode 100644
index 00000000000..c2101624385
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr79568-3.c
@@ -0,0 +1,19 @@
+/* PR target/79568 */
+/* { dg-do compile } */
+/* { dg-options "-mno-sahf -mno-mmx -mno-sse" } */
+/* { dg-additional-options "-march=i386" { target ia32 } } */
+
+#pragma GCC push_options
+#pragma GCC target ("sse")
+void
+foo (void)
+{
+ __builtin_ia32_pause ();
+}
+#pragma GCC pop_options
+
+void
+bar (void)
+{
+ __builtin_ia32_pause ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/pr79729.c b/gcc/testsuite/gcc.target/i386/pr79729.c
new file mode 100644
index 00000000000..4e6f500b304
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr79729.c
@@ -0,0 +1,8 @@
+/* PR target/79729 */
+/* { dg-do compile } */
+
+void
+foo (int x)
+{
+ __asm__ volatile ("# %R0" : : "n" (129)); /* { dg-error "invalid operand code" } */
+}
diff --git a/gcc/testsuite/gcc.target/i386/pr79807.c b/gcc/testsuite/gcc.target/i386/pr79807.c
new file mode 100644
index 00000000000..e491a4da8ef
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr79807.c
@@ -0,0 +1,12 @@
+/* PR target/79807 */
+/* { dg-do compile } */
+/* { dg-options "-O0 -mavx -ffloat-store" } */
+
+typedef double __v2df __attribute__ ((__vector_size__ (16)));
+typedef double __v4df __attribute__ ((__vector_size__ (32)));
+
+__v2df
+foo (__v4df x)
+{
+ return __builtin_ia32_pd_pd256 (x);
+}
diff --git a/gcc/testsuite/gcc.target/i386/pr79901.c b/gcc/testsuite/gcc.target/i386/pr79901.c
new file mode 100644
index 00000000000..6fdcf767362
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr79901.c
@@ -0,0 +1,22 @@
+/* PR rtl-optimization/79901 */
+/* { dg-do compile } */
+/* { dg-options "-O3 -mavx512f -fno-ssa-phiopt" } */
+
+unsigned int
+foo (const unsigned long long x)
+{
+ if (x < 0)
+ return 0;
+ else if ( x > ~0U)
+ return ~0U;
+ else
+ return (unsigned int) x;
+}
+
+void
+bar (unsigned x, unsigned int *y, unsigned int z)
+{
+ unsigned i;
+ for (i = 0; i < x; i++)
+ y[i] = foo (y[i] * (unsigned long long) z);
+}
diff --git a/gcc/testsuite/gcc.target/i386/pr79932-1.c b/gcc/testsuite/gcc.target/i386/pr79932-1.c
new file mode 100644
index 00000000000..fee42b90c1b
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr79932-1.c
@@ -0,0 +1,19 @@
+/* PR target/79932 */
+/* { dg-do compile } */
+/* { dg-options "-O0 -mavx512bw" } */
+
+#include <x86intrin.h>
+
+__m512i a, b, c, d, e, f, g, h, i;
+__mmask32 m;
+
+void
+foo (void)
+{
+ d = _mm512_packs_epi32 (a, b);
+ e = _mm512_maskz_packs_epi32 (m, a, b);
+ f = _mm512_mask_packs_epi32 (c, m, a, b);
+ g = _mm512_packus_epi32 (a, b);
+ h = _mm512_maskz_packus_epi32 (m, a, b);
+ i = _mm512_mask_packus_epi32 (c, m, a, b);
+}
diff --git a/gcc/testsuite/gcc.target/i386/pr79932-2.c b/gcc/testsuite/gcc.target/i386/pr79932-2.c
new file mode 100644
index 00000000000..dc8178bdd12
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr79932-2.c
@@ -0,0 +1,78 @@
+/* PR target/79932 */
+/* { dg-do compile } */
+/* { dg-options "-O0 -mavx512vl" } */
+
+#include <x86intrin.h>
+
+__m256i a, b;
+__m128i c, d;
+__mmask32 e, f[64];
+
+void
+foo (void)
+{
+ f[0] = _mm256_cmpge_epi32_mask (a, b);
+ f[1] = _mm256_cmpge_epi64_mask (a, b);
+ f[2] = _mm256_cmpge_epu32_mask (a, b);
+ f[3] = _mm256_cmpge_epu64_mask (a, b);
+ f[4] = _mm256_cmple_epi32_mask (a, b);
+ f[5] = _mm256_cmple_epi64_mask (a, b);
+ f[6] = _mm256_cmple_epu32_mask (a, b);
+ f[7] = _mm256_cmple_epu64_mask (a, b);
+ f[8] = _mm256_cmplt_epi32_mask (a, b);
+ f[9] = _mm256_cmplt_epi64_mask (a, b);
+ f[10] = _mm256_cmplt_epu32_mask (a, b);
+ f[11] = _mm256_cmplt_epu64_mask (a, b);
+ f[12] = _mm256_cmpneq_epi32_mask (a, b);
+ f[13] = _mm256_cmpneq_epi64_mask (a, b);
+ f[14] = _mm256_cmpneq_epu32_mask (a, b);
+ f[15] = _mm256_cmpneq_epu64_mask (a, b);
+ f[16] = _mm256_mask_cmpge_epi32_mask (e, a, b);
+ f[17] = _mm256_mask_cmpge_epi64_mask (e, a, b);
+ f[18] = _mm256_mask_cmpge_epu32_mask (e, a, b);
+ f[19] = _mm256_mask_cmpge_epu64_mask (e, a, b);
+ f[20] = _mm256_mask_cmple_epi32_mask (e, a, b);
+ f[21] = _mm256_mask_cmple_epi64_mask (e, a, b);
+ f[22] = _mm256_mask_cmple_epu32_mask (e, a, b);
+ f[23] = _mm256_mask_cmple_epu64_mask (e, a, b);
+ f[24] = _mm256_mask_cmplt_epi32_mask (e, a, b);
+ f[25] = _mm256_mask_cmplt_epi64_mask (e, a, b);
+ f[26] = _mm256_mask_cmplt_epu32_mask (e, a, b);
+ f[27] = _mm256_mask_cmplt_epu64_mask (e, a, b);
+ f[28] = _mm256_mask_cmpneq_epi32_mask (e, a, b);
+ f[29] = _mm256_mask_cmpneq_epi64_mask (e, a, b);
+ f[30] = _mm256_mask_cmpneq_epu32_mask (e, a, b);
+ f[31] = _mm256_mask_cmpneq_epu64_mask (e, a, b);
+ f[32] = _mm_cmpge_epi32_mask (c, d);
+ f[33] = _mm_cmpge_epi64_mask (c, d);
+ f[34] = _mm_cmpge_epu32_mask (c, d);
+ f[35] = _mm_cmpge_epu64_mask (c, d);
+ f[36] = _mm_cmple_epi32_mask (c, d);
+ f[37] = _mm_cmple_epi64_mask (c, d);
+ f[38] = _mm_cmple_epu32_mask (c, d);
+ f[39] = _mm_cmple_epu64_mask (c, d);
+ f[40] = _mm_cmplt_epi32_mask (c, d);
+ f[41] = _mm_cmplt_epi64_mask (c, d);
+ f[42] = _mm_cmplt_epu32_mask (c, d);
+ f[43] = _mm_cmplt_epu64_mask (c, d);
+ f[44] = _mm_cmpneq_epi32_mask (c, d);
+ f[45] = _mm_cmpneq_epi64_mask (c, d);
+ f[46] = _mm_cmpneq_epu32_mask (c, d);
+ f[47] = _mm_cmpneq_epu64_mask (c, d);
+ f[48] = _mm_mask_cmpge_epi32_mask (e, c, d);
+ f[49] = _mm_mask_cmpge_epi64_mask (e, c, d);
+ f[50] = _mm_mask_cmpge_epu32_mask (e, c, d);
+ f[51] = _mm_mask_cmpge_epu64_mask (e, c, d);
+ f[52] = _mm_mask_cmple_epi32_mask (e, c, d);
+ f[53] = _mm_mask_cmple_epi64_mask (e, c, d);
+ f[54] = _mm_mask_cmple_epu32_mask (e, c, d);
+ f[55] = _mm_mask_cmple_epu64_mask (e, c, d);
+ f[56] = _mm_mask_cmplt_epi32_mask (e, c, d);
+ f[57] = _mm_mask_cmplt_epi64_mask (e, c, d);
+ f[58] = _mm_mask_cmplt_epu32_mask (e, c, d);
+ f[59] = _mm_mask_cmplt_epu64_mask (e, c, d);
+ f[60] = _mm_mask_cmpneq_epi32_mask (e, c, d);
+ f[61] = _mm_mask_cmpneq_epi64_mask (e, c, d);
+ f[62] = _mm_mask_cmpneq_epu32_mask (e, c, d);
+ f[63] = _mm_mask_cmpneq_epu64_mask (e, c, d);
+}
diff --git a/gcc/testsuite/gcc.target/i386/pr80569.c b/gcc/testsuite/gcc.target/i386/pr80569.c
new file mode 100644
index 00000000000..8e11c40bb08
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr80569.c
@@ -0,0 +1,9 @@
+/* PR target/80569 */
+/* { dg-do assemble } */
+/* { dg-options "-O2 -m16 -march=haswell" } */
+
+void load_kernel(void *setup_addr)
+{
+ unsigned int seg = (unsigned int)setup_addr >> 4;
+ asm("movl %0, %%es" : : "r"(seg));
+}
diff --git a/gcc/testsuite/gcc.target/i386/pr81128.c b/gcc/testsuite/gcc.target/i386/pr81128.c
new file mode 100644
index 00000000000..90a567ad690
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr81128.c
@@ -0,0 +1,65 @@
+/* PR ipa/81128 */
+/* { dg-do run } */
+/* { dg-options "-O3" } */
+/* { dg-require-ifunc "" } */
+
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <time.h>
+
+int resolver_fn = 0;
+int resolved_fn = 0;
+
+static inline void
+do_it_right_at_runtime_A ()
+{
+ resolved_fn++;
+}
+
+static inline void
+do_it_right_at_runtime_B ()
+{
+ resolved_fn++;
+}
+
+static inline void do_it_right_at_runtime (void);
+
+void do_it_right_at_runtime (void)
+ __attribute__ ((ifunc ("resolve_do_it_right_at_runtime")));
+
+static void (*resolve_do_it_right_at_runtime (void)) (void)
+{
+ srand (time (NULL));
+ int r = rand ();
+ resolver_fn++;
+
+ /* Use intermediate variable to get a warning for non-matching
+ * prototype. */
+ typeof(do_it_right_at_runtime) *func;
+ if (r & 1)
+ func = do_it_right_at_runtime_A;
+ else
+ func = do_it_right_at_runtime_B;
+
+ return (void *) func;
+}
+
+int
+main (void)
+{
+ const unsigned int ITERS = 10;
+
+ for (int i = ITERS; i > 0; i--)
+ {
+ do_it_right_at_runtime ();
+ }
+
+ if (resolver_fn != 1)
+ __builtin_abort ();
+
+ if (resolved_fn != 10)
+ __builtin_abort ();
+
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.target/i386/pr81300.c b/gcc/testsuite/gcc.target/i386/pr81300.c
new file mode 100644
index 00000000000..11eb55fed8d
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr81300.c
@@ -0,0 +1,30 @@
+/* PR target/81300 */
+/* { dg-do run { target { ! ia32 } } } */
+/* { dg-options "-O2" } */
+
+int
+__attribute__((noinline, noclone))
+foo (void)
+{
+ unsigned long long _discard = 0, zero = 0, maxull = 0;
+ unsigned char zero1 = __builtin_ia32_addcarryx_u64 (0, 0, 0, &_discard);
+ unsigned char zero2 = __builtin_ia32_addcarryx_u64 (zero1, 0, 0, &zero);
+ __builtin_ia32_sbb_u64 (0x0, 2, -1, &_discard);
+ unsigned char one = __builtin_ia32_sbb_u64 (0, zero, 1, &maxull);
+ unsigned long long x = __builtin_ia32_sbb_u64 (one, zero2, 0, &_discard);
+
+ unsigned long long z1 = 0;
+ __asm__ ("mov{q}\t{%1, %0|%0, %1}" : "+r" (z1) : "r" (x));
+ unsigned long long z2 = 3;
+ __asm__ ("mov{q}\t{%1, %0|%0, %1}" : "+r" (z2) : "r" (x));
+
+ return 1 - (z1 | z2);
+}
+
+int main ()
+{
+ if (foo ())
+ __builtin_abort ();
+
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.target/i386/pr81375.c b/gcc/testsuite/gcc.target/i386/pr81375.c
new file mode 100644
index 00000000000..3930e9ec8f0
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr81375.c
@@ -0,0 +1,10 @@
+/* PR target/81375 */
+/* { dg-do compile { target ia32 } } */
+/* { dg-options "-mno-80387 -mno-sse -mfpmath=sse" } */
+
+/* { dg-warning "SSE instruction set disabled, using 387 arithmetics" "" { target *-*-* } 0 } */
+
+float foo (float a, float b)
+{
+ return a / b;
+}
diff --git a/gcc/testsuite/gcc.target/i386/pr81471.c b/gcc/testsuite/gcc.target/i386/pr81471.c
new file mode 100644
index 00000000000..68b4497c9f2
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr81471.c
@@ -0,0 +1,13 @@
+/* PR target/81471 */
+/* { dg-do compile { target { ! ia32 } } } */
+/* { dg-options "-O2 -mbmi2" } */
+
+static inline unsigned int rotl (unsigned int x, int k)
+{
+ return (x << k) | (x >> (32 - k));
+}
+
+unsigned long long test (unsigned int z)
+{
+ return rotl (z, 55);
+}
diff --git a/gcc/testsuite/gcc.target/i386/pr81766.c b/gcc/testsuite/gcc.target/i386/pr81766.c
new file mode 100644
index 00000000000..4bcae7f610d
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr81766.c
@@ -0,0 +1,5 @@
+/* { dg-do compile } */
+/* { dg-require-effective-target lp64 } */
+/* { dg-options "-O2 -fPIE -mcmodel=large" } */
+
+int main() { return 0; }
diff --git a/gcc/testsuite/gcc.target/powerpc/pr79197.c b/gcc/testsuite/gcc.target/powerpc/pr79197.c
new file mode 100644
index 00000000000..659d76c15c1
--- /dev/null
+++ b/gcc/testsuite/gcc.target/powerpc/pr79197.c
@@ -0,0 +1,11 @@
+/* PR target/79197 */
+/* { dg-do compile } */
+/* { dg-options "-O0 -mno-popcntd" } */
+
+unsigned a;
+
+void
+foo (void)
+{
+ a = *(double *) (__UINTPTR_TYPE__) 0x400000;
+}
diff --git a/gcc/testsuite/gcc.target/powerpc/pr80210.c b/gcc/testsuite/gcc.target/powerpc/pr80210.c
new file mode 100644
index 00000000000..9e2f2d9da49
--- /dev/null
+++ b/gcc/testsuite/gcc.target/powerpc/pr80210.c
@@ -0,0 +1,10 @@
+/* Test for ICE arising from GCC target pragma. */
+/* { dg-do compile } */
+/* { dg-options "-O2" } */
+
+double
+foo (double a)
+{
+ return __builtin_sqrt (a);
+}
+#pragma GCC target "no-powerpc-gpopt"
diff --git a/gcc/testsuite/gcc.target/powerpc/pr81833-1.c b/gcc/testsuite/gcc.target/powerpc/pr81833-1.c
new file mode 100644
index 00000000000..ca5ce006d20
--- /dev/null
+++ b/gcc/testsuite/gcc.target/powerpc/pr81833-1.c
@@ -0,0 +1,59 @@
+/* PR81833: This used to fail due to improper implementation of vec_msum. */
+/* Test case relies on -mcpu=power7 or later. Currently we don't have
+ machinery to express that, so we have two separate tests for -mcpu=power7
+ and -mcpu=power8 to catch 32-bit BE on P7 and 64-bit BE/LE on P8. */
+
+/* { dg-do run } */
+/* { dg-require-effective-target p8vector_hw } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power8" } } */
+/* { dg-options "-mcpu=power8 -O2" } */
+
+#include <altivec.h>
+
+#define vec_u8 vector unsigned char
+#define vec_s8 vector signed char
+#define vec_u16 vector unsigned short
+#define vec_s16 vector signed short
+#define vec_u32 vector unsigned int
+#define vec_s32 vector signed int
+#define vec_f vector float
+
+#define LOAD_ZERO const vec_u8 zerov = vec_splat_u8 (0)
+
+#define zero_u8v (vec_u8) zerov
+#define zero_s8v (vec_s8) zerov
+#define zero_u16v (vec_u16) zerov
+#define zero_s16v (vec_s16) zerov
+#define zero_u32v (vec_u32) zerov
+#define zero_s32v (vec_s32) zerov
+
+signed int __attribute__((noinline))
+scalarproduct_int16_vsx (const signed short *v1, const signed short *v2,
+ int order)
+{
+ int i;
+ LOAD_ZERO;
+ register vec_s16 vec1;
+ register vec_s32 res = vec_splat_s32 (0), t;
+ signed int ires;
+
+ for (i = 0; i < order; i += 8) {
+ vec1 = vec_vsx_ld (0, v1);
+ t = vec_msum (vec1, vec_vsx_ld (0, v2), zero_s32v);
+ res = vec_sums (t, res);
+ v1 += 8;
+ v2 += 8;
+ }
+ res = vec_splat (res, 3);
+ vec_ste (res, 0, &ires);
+
+ return ires;
+}
+
+int main(void)
+{
+ const signed short test_vec[] = { 1, 1, 1, 1, 1, 1, 1, 1 };
+ if (scalarproduct_int16_vsx (test_vec, test_vec, 8) != 8)
+ __builtin_abort ();
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.target/powerpc/pr81833-2.c b/gcc/testsuite/gcc.target/powerpc/pr81833-2.c
new file mode 100644
index 00000000000..e9286833469
--- /dev/null
+++ b/gcc/testsuite/gcc.target/powerpc/pr81833-2.c
@@ -0,0 +1,59 @@
+/* PR81833: This used to fail due to improper implementation of vec_msum. */
+/* Test case relies on -mcpu=power7 or later. Currently we don't have
+ machinery to express that, so we have two separate tests for -mcpu=power7
+ and -mcpu=power8 to catch 32-bit BE on P7 and 64-bit BE/LE on P8. */
+
+/* { dg-do run } */
+/* { dg-require-effective-target vsx_hw } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power7" } } */
+/* { dg-options "-mcpu=power7 -O2" } */
+
+#include <altivec.h>
+
+#define vec_u8 vector unsigned char
+#define vec_s8 vector signed char
+#define vec_u16 vector unsigned short
+#define vec_s16 vector signed short
+#define vec_u32 vector unsigned int
+#define vec_s32 vector signed int
+#define vec_f vector float
+
+#define LOAD_ZERO const vec_u8 zerov = vec_splat_u8 (0)
+
+#define zero_u8v (vec_u8) zerov
+#define zero_s8v (vec_s8) zerov
+#define zero_u16v (vec_u16) zerov
+#define zero_s16v (vec_s16) zerov
+#define zero_u32v (vec_u32) zerov
+#define zero_s32v (vec_s32) zerov
+
+signed int __attribute__((noinline))
+scalarproduct_int16_vsx (const signed short *v1, const signed short *v2,
+ int order)
+{
+ int i;
+ LOAD_ZERO;
+ register vec_s16 vec1;
+ register vec_s32 res = vec_splat_s32 (0), t;
+ signed int ires;
+
+ for (i = 0; i < order; i += 8) {
+ vec1 = vec_vsx_ld (0, v1);
+ t = vec_msum (vec1, vec_vsx_ld (0, v2), zero_s32v);
+ res = vec_sums (t, res);
+ v1 += 8;
+ v2 += 8;
+ }
+ res = vec_splat (res, 3);
+ vec_ste (res, 0, &ires);
+
+ return ires;
+}
+
+int main(void)
+{
+ const signed short test_vec[] = { 1, 1, 1, 1, 1, 1, 1, 1 };
+ if (scalarproduct_int16_vsx (test_vec, test_vec, 8) != 8)
+ __builtin_abort ();
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.target/powerpc/pr82112.c b/gcc/testsuite/gcc.target/powerpc/pr82112.c
new file mode 100644
index 00000000000..fbb0f9d3d06
--- /dev/null
+++ b/gcc/testsuite/gcc.target/powerpc/pr82112.c
@@ -0,0 +1,16 @@
+/* PR target/82112 */
+/* { dg-do compile } */
+/* { dg-require-effective-target powerpc_altivec_ok } */
+/* { dg-options "-maltivec -std=gnu90" } */
+
+#include <altivec.h>
+
+struct __attribute__((aligned (16))) S { unsigned char c[64]; } bar (void);
+vector unsigned char v;
+
+void
+foo (void)
+{
+ vec_ld (0, bar ().c); /* { dg-error "invalid parameter combination for AltiVec intrinsic" } */
+ vec_st (v, 0, bar ().c); /* { dg-error "invalid parameter combination for AltiVec intrinsic" } */
+}
diff --git a/gcc/testsuite/gcc.target/sparc/sparc-ret-3.c b/gcc/testsuite/gcc.target/sparc/sparc-ret-3.c
new file mode 100644
index 00000000000..7a151f80b42
--- /dev/null
+++ b/gcc/testsuite/gcc.target/sparc/sparc-ret-3.c
@@ -0,0 +1,53 @@
+/* PR target/80968 */
+/* { dg-do compile } */
+/* { dg-skip-if "no register windows" { *-*-* } { "-mflat" } { "" } } */
+/* { dg-require-effective-target ilp32 } */
+/* { dg-options "-mcpu=ultrasparc -O" } */
+
+/* Make sure references to the stack frame do not slip into the delay slot
+ of a return instruction. */
+
+struct crypto_shash {
+ unsigned int descsize;
+};
+struct crypto_shash *tfm;
+
+struct shash_desc {
+ struct crypto_shash *tfm;
+ unsigned int flags;
+
+ void *__ctx[] __attribute__((aligned(8)));
+};
+
+static inline unsigned int crypto_shash_descsize(struct crypto_shash *tfm)
+{
+ return tfm->descsize;
+}
+
+static inline void *shash_desc_ctx(struct shash_desc *desc)
+{
+ return desc->__ctx;
+}
+
+#define SHASH_DESC_ON_STACK(shash, ctx) \
+ char __##shash##_desc[sizeof(struct shash_desc) + \
+ crypto_shash_descsize(ctx)] __attribute__((aligned(8))); \
+ struct shash_desc *shash = (struct shash_desc *)__##shash##_desc
+
+extern int crypto_shash_update(struct shash_desc *, const void *, unsigned int);
+
+unsigned int bug(unsigned int crc, const void *address, unsigned int length)
+{
+ SHASH_DESC_ON_STACK(shash, tfm);
+ unsigned int *ctx = (unsigned int *)shash_desc_ctx(shash);
+ int err;
+
+ shash->tfm = tfm;
+ shash->flags = 0;
+ *ctx = crc;
+
+ err = crypto_shash_update(shash, address, length);
+
+ return *ctx;
+}
+/* { dg-final { scan-assembler "ld\[ \t\]*\\\[%i5\\+8\\\], %i0\n\[^\n\]*return\[ \t\]*%i7\\+8" } } */
diff --git a/gcc/testsuite/gfortran.dg/gomp/map-1.f90 b/gcc/testsuite/gfortran.dg/gomp/map-1.f90
index e4b8b862afd..e78b56c8f39 100644
--- a/gcc/testsuite/gfortran.dg/gomp/map-1.f90
+++ b/gcc/testsuite/gfortran.dg/gomp/map-1.f90
@@ -70,7 +70,7 @@ subroutine test(aas)
! { dg-error "Rightmost upper bound of assumed size array section not specified" "" { target *-*-* } 68 }
! { dg-error "'aas' in MAP clause at \\\(1\\\) is not a proper array section" "" { target *-*-* } 68 }
- !$omp target map(aas) ! { dg-error "The upper bound in the last dimension must appear" "" { xfail *-*-* } }
+ !$omp target map(aas) ! { dg-error "Assumed size array" }
!$omp end target
!$omp target map(aas(5:7))
diff --git a/gcc/testsuite/gfortran.dg/gomp/pr69183.f90 b/gcc/testsuite/gfortran.dg/gomp/pr69183.f90
new file mode 100644
index 00000000000..5dc985a8eb4
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/gomp/pr69183.f90
@@ -0,0 +1,11 @@
+! PR middle-end/69183
+! { dg-do compile }
+
+program pr69183
+ integer, allocatable :: z
+ integer :: i
+ !$omp do private(z)
+ do i = 1, 2
+ z = i
+ end do
+end
diff --git a/gcc/testsuite/gfortran.dg/gomp/pr77500.f90 b/gcc/testsuite/gfortran.dg/gomp/pr77500.f90
new file mode 100644
index 00000000000..1572d5ceb24
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/gomp/pr77500.f90
@@ -0,0 +1,9 @@
+! PR fortran/77500
+! { dg-do compile }
+
+program pr77500
+ real :: x
+!$omp atomic write
+ x = f()
+!$omp end atomic
+end
diff --git a/gcc/testsuite/gfortran.dg/gomp/pr77516.f90 b/gcc/testsuite/gfortran.dg/gomp/pr77516.f90
new file mode 100644
index 00000000000..7852abf8bcf
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/gomp/pr77516.f90
@@ -0,0 +1,12 @@
+! PR fortran/77516
+! { dg-do compile }
+
+program pr77516
+ integer :: i, x
+ x = 0
+!$omp simd safelen(0) reduction(+:x)
+ do i = 1, 8
+ x = x + 1
+ end do
+ print *, x
+end
diff --git a/gcc/testsuite/gfortran.dg/gomp/pr77665.f90 b/gcc/testsuite/gfortran.dg/gomp/pr77665.f90
new file mode 100644
index 00000000000..50183cbce6d
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/gomp/pr77665.f90
@@ -0,0 +1,18 @@
+! PR fortran/77665
+! { dg-do compile }
+! { dg-additional-options "-O2" }
+
+program pr77665
+ type t
+ integer :: a = 0
+ end type
+ type(t) :: x
+ integer :: i
+ !$omp declare reduction (+:t: omp_out%a = omp_out%a + omp_in%a)
+ !$omp simd reduction(+:x)
+ do i = 1, 8
+ if (abs(i) < 5) call abort
+ x%a = x%a + 1
+ end do
+ print *, x%a
+end
diff --git a/gcc/testsuite/gfortran.dg/gomp/pr77666.f90 b/gcc/testsuite/gfortran.dg/gomp/pr77666.f90
new file mode 100644
index 00000000000..18e039efa52
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/gomp/pr77666.f90
@@ -0,0 +1,26 @@
+! PR fortran/77666
+! { dg-do compile }
+
+subroutine foo(x)
+ interface
+ subroutine baz(x, y)
+ integer, allocatable :: x(:), y
+ end subroutine
+ end interface
+ integer, allocatable :: x(:), y
+!$omp parallel private(x, y)
+ call baz (x, y)
+!$omp end parallel
+end
+subroutine bar
+ interface
+ subroutine baz(x, y)
+ integer, allocatable :: x(:), y
+ end subroutine
+ end interface
+ integer, allocatable :: x(:), y
+ call baz (x, y)
+!$omp parallel private(x, y)
+ call baz (x, y)
+!$omp end parallel
+end
diff --git a/gcc/testsuite/gfortran.dg/gomp/pr78298.f90 b/gcc/testsuite/gfortran.dg/gomp/pr78298.f90
new file mode 100644
index 00000000000..85955c20153
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/gomp/pr78298.f90
@@ -0,0 +1,28 @@
+! PR fortran/78298
+! { dg-do compile }
+! { dg-additional-options "-O2" }
+
+program pr78298
+ integer :: i, j, n
+ n = 2
+ !$omp parallel
+ !$omp do
+ do i = 1, n
+ !$omp parallel
+ !$omp do
+ do j = 1, n
+ call sub(i)
+ end do
+ !$omp end parallel
+ end do
+ !$omp end parallel
+ !call unused()
+contains
+ subroutine sub(x)
+ integer :: x
+ end
+ subroutine unused()
+ i = 0
+ j = 0
+ end
+end
diff --git a/gcc/testsuite/gfortran.dg/gomp/pr78866-1.f90 b/gcc/testsuite/gfortran.dg/gomp/pr78866-1.f90
new file mode 100644
index 00000000000..e557d6d8bb7
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/gomp/pr78866-1.f90
@@ -0,0 +1,19 @@
+! PR fortran/78866
+! { dg-do compile }
+
+subroutine pr78866(x)
+ integer :: x(*)
+!$omp target map(x) ! { dg-error "Assumed size array" }
+ x(1) = 1
+!$omp end target
+!$omp target data map(tofrom: x) ! { dg-error "Assumed size array" }
+!$omp target update to(x) ! { dg-error "Assumed size array" }
+!$omp target update from(x) ! { dg-error "Assumed size array" }
+!$omp end target data
+!$omp target map(x(:23)) ! { dg-bogus "Assumed size array" }
+ x(1) = 1
+!$omp end target
+!$omp target map(x(:)) ! { dg-error "upper bound of assumed size array section" }
+ x(1) = 1 ! { dg-error "not a proper array section" "" { target *-*-* } 16 }
+!$omp end target
+end
diff --git a/gcc/testsuite/gfortran.dg/gomp/pr78866-2.f90 b/gcc/testsuite/gfortran.dg/gomp/pr78866-2.f90
new file mode 100644
index 00000000000..033479e5801
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/gomp/pr78866-2.f90
@@ -0,0 +1,9 @@
+! PR fortran/78866
+! { dg-do compile }
+
+subroutine pr78866(x)
+ integer :: x(*)
+!$omp target ! { dg-error "implicit mapping of assumed size array" }
+ x(1) = 1
+!$omp end target
+end
diff --git a/gcc/testsuite/gfortran.dg/proc_ptr_comp_50.f90 b/gcc/testsuite/gfortran.dg/proc_ptr_comp_50.f90
new file mode 100644
index 00000000000..d62d8326dd7
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/proc_ptr_comp_50.f90
@@ -0,0 +1,26 @@
+! { dg-do compile }
+!
+! PR 70601: [5/6/7 Regression] [OOP] ICE on procedure pointer component call
+!
+! Contributed by zmi <zmi007@gmail.com>
+
+program test
+ implicit none
+
+ type :: concrete_type
+ procedure (run_concrete_type), pointer :: run
+ end type
+
+ type(concrete_type), allocatable :: concrete
+
+ allocate(concrete)
+ concrete % run => run_concrete_type
+ call concrete % run()
+
+contains
+
+ subroutine run_concrete_type(this)
+ class(concrete_type) :: this
+ end subroutine
+
+end
diff --git a/gcc/testsuite/gfortran.dg/warn_target_lifetime_3.f90 b/gcc/testsuite/gfortran.dg/warn_target_lifetime_3.f90
index 9113a885fa6..83188a5c116 100644
--- a/gcc/testsuite/gfortran.dg/warn_target_lifetime_3.f90
+++ b/gcc/testsuite/gfortran.dg/warn_target_lifetime_3.f90
@@ -3,7 +3,7 @@
!
! PR fortran/55476
!
-! Contribued by Janus Weil
+! Contributed by Janus Weil
!
subroutine test
integer, pointer :: p
diff --git a/gcc/testsuite/gfortran.dg/warn_target_lifetime_4.f90 b/gcc/testsuite/gfortran.dg/warn_target_lifetime_4.f90
new file mode 100644
index 00000000000..d2972a92283
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/warn_target_lifetime_4.f90
@@ -0,0 +1,28 @@
+! { dg-do compile }
+! { dg-options "-Wtarget-lifetime" }
+!
+! PR fortran/81770: [5/6/7 Regression] Bogus warning: Pointer in pointer assignment might outlive the pointer target
+!
+! Contributed by Janus Weil <janus@gcc.gnu.org>
+
+module m
+
+ type t
+ integer, allocatable :: l
+ end type
+
+contains
+
+ subroutine sub(c_in, list)
+ type(t), target, intent(in) :: c_in
+ integer, pointer, intent(out) :: list
+
+ type(t), pointer :: container
+
+ container => c_in
+
+ list => container%l
+
+ end subroutine
+
+end
diff --git a/gcc/toplev.c b/gcc/toplev.c
index c565ea4797e..237e24ef34e 100644
--- a/gcc/toplev.c
+++ b/gcc/toplev.c
@@ -135,8 +135,6 @@ along with GCC; see the file COPYING3. If not see
#define HAVE_prologue 0
#endif
-#include <new>
-
static void general_init (const char *, bool);
static void do_compile ();
static void process_options (void);
@@ -1999,6 +1997,9 @@ finalize (bool no_backend)
if (stack_usage_file)
fclose (stack_usage_file);
+ if (seen_error ())
+ coverage_remove_note_file ();
+
if (!no_backend)
{
statistics_fini ();
diff --git a/gcc/tree-cfg.c b/gcc/tree-cfg.c
index a1e48acef6c..2b04827886e 100644
--- a/gcc/tree-cfg.c
+++ b/gcc/tree-cfg.c
@@ -6465,7 +6465,15 @@ move_stmt_op (tree *tp, int *walk_subtrees, void *data)
*tp = t = out->to;
}
- DECL_CONTEXT (t) = p->to_context;
+ /* For FORCED_LABELs we can end up with references from other
+ functions if some SESE regions are outlined. It is UB to
+ jump in between them, but they could be used just for printing
+ addresses etc. In that case, DECL_CONTEXT on the label should
+ be the function containing the glabel stmt with that LABEL_DECL,
+ rather than whatever function a reference to the label was seen
+ last time. */
+ if (!FORCED_LABEL (t) && !DECL_NONLOCAL (t))
+ DECL_CONTEXT (t) = p->to_context;
}
else if (p->remap_decls_p)
{
@@ -6584,6 +6592,21 @@ move_stmt_r (gimple_stmt_iterator *gsi_p, bool *handled_ops_p,
case GIMPLE_OMP_RETURN:
case GIMPLE_OMP_CONTINUE:
break;
+
+ case GIMPLE_LABEL:
+ {
+ /* For FORCED_LABEL, move_stmt_op doesn't adjust DECL_CONTEXT,
+ so that such labels can be referenced from other regions.
+ Make sure to update it when seeing a GIMPLE_LABEL though,
+ that is the owner of the label. */
+ walk_gimple_op (stmt, move_stmt_op, wi);
+ *handled_ops_p = true;
+ tree label = gimple_label_label (as_a <glabel *> (stmt));
+ if (FORCED_LABEL (label) || DECL_NONLOCAL (label))
+ DECL_CONTEXT (label) = p->to_context;
+ }
+ break;
+
default:
if (is_gimple_omp (stmt))
{
@@ -8617,16 +8640,14 @@ execute_fixup_cfg (void)
gcov_type count_scale;
edge e;
edge_iterator ei;
+ cgraph_node *node = cgraph_node::get (current_function_decl);
count_scale
- = GCOV_COMPUTE_SCALE (cgraph_node::get (current_function_decl)->count,
- ENTRY_BLOCK_PTR_FOR_FN (cfun)->count);
+ = GCOV_COMPUTE_SCALE (node->count, ENTRY_BLOCK_PTR_FOR_FN (cfun)->count);
- ENTRY_BLOCK_PTR_FOR_FN (cfun)->count =
- cgraph_node::get (current_function_decl)->count;
- EXIT_BLOCK_PTR_FOR_FN (cfun)->count =
- apply_scale (EXIT_BLOCK_PTR_FOR_FN (cfun)->count,
- count_scale);
+ ENTRY_BLOCK_PTR_FOR_FN (cfun)->count = node->count;
+ EXIT_BLOCK_PTR_FOR_FN (cfun)->count
+ = apply_scale (EXIT_BLOCK_PTR_FOR_FN (cfun)->count, count_scale);
FOR_EACH_EDGE (e, ei, ENTRY_BLOCK_PTR_FOR_FN (cfun)->succs)
e->count = apply_scale (e->count, count_scale);
@@ -8719,10 +8740,19 @@ execute_fixup_cfg (void)
{
if (stmt && is_gimple_call (stmt))
gimple_call_set_ctrl_altering (stmt, false);
- stmt = gimple_build_call
- (builtin_decl_implicit (BUILT_IN_UNREACHABLE), 0);
+ tree fndecl = builtin_decl_implicit (BUILT_IN_UNREACHABLE);
+ stmt = gimple_build_call (fndecl, 0);
gimple_stmt_iterator gsi = gsi_last_bb (bb);
gsi_insert_after (&gsi, stmt, GSI_NEW_STMT);
+ if (!cfun->after_inlining)
+ {
+ gcall *call_stmt = dyn_cast <gcall *> (stmt);
+ int freq
+ = compute_call_stmt_bb_frequency (current_function_decl,
+ bb);
+ node->create_edge (cgraph_node::get_create (fndecl),
+ call_stmt, bb->count, freq);
+ }
}
}
}
diff --git a/gcc/tree-chkp.c b/gcc/tree-chkp.c
index 824827768f4..4d2aa5aeb57 100644
--- a/gcc/tree-chkp.c
+++ b/gcc/tree-chkp.c
@@ -3101,6 +3101,9 @@ chkp_get_bounds_for_decl_addr (tree decl)
&& !flag_chkp_incomplete_type)
return chkp_get_zero_bounds ();
+ if (VOID_TYPE_P (TREE_TYPE (decl)))
+ return chkp_get_zero_bounds ();
+
if (flag_chkp_use_static_bounds
&& TREE_CODE (decl) == VAR_DECL
&& (TREE_STATIC (decl)
diff --git a/gcc/tree-chrec.c b/gcc/tree-chrec.c
index b4a8d821c56..bbc05fbf997 100644
--- a/gcc/tree-chrec.c
+++ b/gcc/tree-chrec.c
@@ -167,7 +167,12 @@ chrec_fold_plus_poly_poly (enum tree_code code,
/* This function should never be called for chrecs of loops that
do not belong to the same loop nest. */
- gcc_assert (loop0 == loop1);
+ if (loop0 != loop1)
+ {
+ /* It still can happen if we are not in loop-closed SSA form. */
+ gcc_assert (! loops_state_satisfies_p (LOOP_CLOSED_SSA));
+ return chrec_dont_know;
+ }
if (code == PLUS_EXPR || code == POINTER_PLUS_EXPR)
{
@@ -229,7 +234,12 @@ chrec_fold_multiply_poly_poly (tree type,
chrec_fold_multiply (type, CHREC_LEFT (poly0), poly1),
CHREC_RIGHT (poly0));
- gcc_assert (loop0 == loop1);
+ if (loop0 != loop1)
+ {
+ /* It still can happen if we are not in loop-closed SSA form. */
+ gcc_assert (! loops_state_satisfies_p (LOOP_CLOSED_SSA));
+ return chrec_dont_know;
+ }
/* poly0 and poly1 are two polynomials in the same variable,
{a, +, b}_x * {c, +, d}_x -> {a*c, +, a*d + b*c + b*d, +, 2*b*d}_x. */
diff --git a/gcc/tree-eh.c b/gcc/tree-eh.c
index a111e9d93ae..52597c4540f 100644
--- a/gcc/tree-eh.c
+++ b/gcc/tree-eh.c
@@ -2543,7 +2543,8 @@ operation_could_trap_p (enum tree_code op, bool fp_operation, bool honor_trapv,
if (TREE_CODE_CLASS (op) != tcc_comparison
&& TREE_CODE_CLASS (op) != tcc_unary
- && TREE_CODE_CLASS (op) != tcc_binary)
+ && TREE_CODE_CLASS (op) != tcc_binary
+ && op != FMA_EXPR)
return false;
return operation_could_trap_helper_p (op, fp_operation, honor_trapv,
@@ -2768,7 +2769,8 @@ stmt_could_throw_1_p (gimple stmt)
if (TREE_CODE_CLASS (code) == tcc_comparison
|| TREE_CODE_CLASS (code) == tcc_unary
- || TREE_CODE_CLASS (code) == tcc_binary)
+ || TREE_CODE_CLASS (code) == tcc_binary
+ || code == FMA_EXPR)
{
if (is_gimple_assign (stmt)
&& TREE_CODE_CLASS (code) == tcc_comparison)
diff --git a/gcc/tree-inline.c b/gcc/tree-inline.c
index 83fb5d3eb39..ce961d665ab 100644
--- a/gcc/tree-inline.c
+++ b/gcc/tree-inline.c
@@ -1644,6 +1644,17 @@ remap_gimple_stmt (gimple stmt, copy_body_data *id)
gimple_call_set_tail (call_stmt, false);
if (gimple_call_from_thunk_p (call_stmt))
gimple_call_set_from_thunk (call_stmt, false);
+ if (gimple_call_internal_p (call_stmt))
+ switch (gimple_call_internal_fn (call_stmt))
+ {
+ case IFN_GOMP_SIMD_LANE:
+ case IFN_GOMP_SIMD_VF:
+ case IFN_GOMP_SIMD_LAST_LANE:
+ DECL_STRUCT_FUNCTION (id->dst_fn)->has_simduid_loops = true;
+ break;
+ default:
+ break;
+ }
}
/* Remap the region numbers for __builtin_eh_{pointer,filter},
@@ -1852,7 +1863,8 @@ copy_bb (copy_body_data *id, basic_block bb, int frequency_scale,
call_stmt = dyn_cast <gcall *> (stmt);
if (call_stmt
&& gimple_call_va_arg_pack_p (call_stmt)
- && id->call_stmt)
+ && id->call_stmt
+ && ! gimple_call_va_arg_pack_p (id->call_stmt))
{
/* __builtin_va_arg_pack () should be replaced by
all arguments corresponding to ... in the caller. */
@@ -1932,7 +1944,8 @@ copy_bb (copy_body_data *id, basic_block bb, int frequency_scale,
&& id->call_stmt
&& (decl = gimple_call_fndecl (stmt))
&& DECL_BUILT_IN_CLASS (decl) == BUILT_IN_NORMAL
- && DECL_FUNCTION_CODE (decl) == BUILT_IN_VA_ARG_PACK_LEN)
+ && DECL_FUNCTION_CODE (decl) == BUILT_IN_VA_ARG_PACK_LEN
+ && ! gimple_call_va_arg_pack_p (id->call_stmt))
{
/* __builtin_va_arg_pack_len () should be replaced by
the number of anonymous arguments. */
@@ -2345,53 +2358,59 @@ copy_phis_for_bb (basic_block bb, copy_body_data *id)
{
walk_tree (&new_res, copy_tree_body_r, id, NULL);
new_phi = create_phi_node (new_res, new_bb);
- FOR_EACH_EDGE (new_edge, ei, new_bb->preds)
+ if (EDGE_COUNT (new_bb->preds) == 0)
{
- edge old_edge = find_edge ((basic_block) new_edge->src->aux, bb);
- tree arg;
- tree new_arg;
- edge_iterator ei2;
- location_t locus;
-
- /* When doing partial cloning, we allow PHIs on the entry block
- as long as all the arguments are the same. Find any input
- edge to see argument to copy. */
- if (!old_edge)
- FOR_EACH_EDGE (old_edge, ei2, bb->preds)
- if (!old_edge->src->aux)
- break;
+ /* Technically we'd want a SSA_DEFAULT_DEF here... */
+ SSA_NAME_DEF_STMT (new_res) = gimple_build_nop ();
+ }
+ else
+ FOR_EACH_EDGE (new_edge, ei, new_bb->preds)
+ {
+ edge old_edge = find_edge ((basic_block) new_edge->src->aux, bb);
+ tree arg;
+ tree new_arg;
+ edge_iterator ei2;
+ location_t locus;
+
+ /* When doing partial cloning, we allow PHIs on the entry block
+ as long as all the arguments are the same. Find any input
+ edge to see argument to copy. */
+ if (!old_edge)
+ FOR_EACH_EDGE (old_edge, ei2, bb->preds)
+ if (!old_edge->src->aux)
+ break;
- arg = PHI_ARG_DEF_FROM_EDGE (phi, old_edge);
- new_arg = arg;
- walk_tree (&new_arg, copy_tree_body_r, id, NULL);
- gcc_assert (new_arg);
- /* With return slot optimization we can end up with
- non-gimple (foo *)&this->m, fix that here. */
- if (TREE_CODE (new_arg) != SSA_NAME
- && TREE_CODE (new_arg) != FUNCTION_DECL
- && !is_gimple_val (new_arg))
- {
- gimple_seq stmts = NULL;
- new_arg = force_gimple_operand (new_arg, &stmts, true, NULL);
- gsi_insert_seq_on_edge (new_edge, stmts);
- inserted = true;
- }
- locus = gimple_phi_arg_location_from_edge (phi, old_edge);
- if (LOCATION_BLOCK (locus))
- {
- 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);
- }
- else
- locus = LOCATION_LOCUS (locus);
+ arg = PHI_ARG_DEF_FROM_EDGE (phi, old_edge);
+ new_arg = arg;
+ walk_tree (&new_arg, copy_tree_body_r, id, NULL);
+ gcc_assert (new_arg);
+ /* With return slot optimization we can end up with
+ non-gimple (foo *)&this->m, fix that here. */
+ if (TREE_CODE (new_arg) != SSA_NAME
+ && TREE_CODE (new_arg) != FUNCTION_DECL
+ && !is_gimple_val (new_arg))
+ {
+ gimple_seq stmts = NULL;
+ new_arg = force_gimple_operand (new_arg, &stmts, true, NULL);
+ gsi_insert_seq_on_edge (new_edge, stmts);
+ inserted = true;
+ }
+ locus = gimple_phi_arg_location_from_edge (phi, old_edge);
+ if (LOCATION_BLOCK (locus))
+ {
+ 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);
+ }
+ else
+ locus = LOCATION_LOCUS (locus);
- add_phi_arg (new_phi, new_arg, new_edge, locus);
- }
+ add_phi_arg (new_phi, new_arg, new_edge, locus);
+ }
}
}
@@ -4580,7 +4599,7 @@ expand_call_inline (basic_block bb, gimple stmt, copy_body_data *id)
id->src_fn = fn;
id->src_node = cg_edge->callee;
id->src_cfun = DECL_STRUCT_FUNCTION (fn);
- id->call_stmt = stmt;
+ id->call_stmt = call_stmt;
gcc_assert (!id->src_cfun->after_inlining);
@@ -4755,7 +4774,7 @@ expand_call_inline (basic_block bb, gimple stmt, copy_body_data *id)
{
tree name = gimple_call_lhs (stmt);
tree var = SSA_NAME_VAR (name);
- tree def = ssa_default_def (cfun, var);
+ tree def = var ? ssa_default_def (cfun, var) : NULL;
if (def)
{
@@ -4766,6 +4785,11 @@ expand_call_inline (basic_block bb, gimple stmt, copy_body_data *id)
}
else
{
+ if (!var)
+ {
+ var = create_tmp_reg_fn (cfun, TREE_TYPE (name), NULL);
+ SET_SSA_NAME_VAR_OR_IDENTIFIER (name, var);
+ }
/* Otherwise make this variable undefined. */
gsi_remove (&stmt_gsi, true);
set_ssa_default_def (cfun, var, name);
diff --git a/gcc/tree-inline.h b/gcc/tree-inline.h
index f8b2ebfe2dd..b3f616cdeb7 100644
--- a/gcc/tree-inline.h
+++ b/gcc/tree-inline.h
@@ -101,7 +101,7 @@ struct copy_body_data
/* GIMPLE_CALL if va arg parameter packs should be expanded or NULL
is not. */
- gimple call_stmt;
+ gcall *call_stmt;
/* Exception landing pad the inlined call lies in. */
int eh_lp_nr;
diff --git a/gcc/tree-loop-distribution.c b/gcc/tree-loop-distribution.c
index 904f4e8db60..5c15f1924f8 100644
--- a/gcc/tree-loop-distribution.c
+++ b/gcc/tree-loop-distribution.c
@@ -90,6 +90,7 @@ along with GCC; see the file COPYING3. If not see
#include "tree-pass.h"
#include "gimple-pretty-print.h"
#include "tree-vectorizer.h"
+#include "real.h"
/* A Reduced Dependence Graph (RDG) vertex representing a statement. */
@@ -775,12 +776,40 @@ const_with_all_bytes_same (tree val)
int i, len;
if (integer_zerop (val)
- || real_zerop (val)
|| (TREE_CODE (val) == CONSTRUCTOR
&& !TREE_CLOBBER_P (val)
&& CONSTRUCTOR_NELTS (val) == 0))
return 0;
+ if (real_zerop (val))
+ {
+ /* Only return 0 for +0.0, not for -0.0, which doesn't have
+ an all bytes same memory representation. Don't transform
+ -0.0 stores into +0.0 even for !HONOR_SIGNED_ZEROS. */
+ switch (TREE_CODE (val))
+ {
+ case REAL_CST:
+ if (!real_isneg (TREE_REAL_CST_PTR (val)))
+ return 0;
+ break;
+ case COMPLEX_CST:
+ if (!const_with_all_bytes_same (TREE_REALPART (val))
+ && !const_with_all_bytes_same (TREE_IMAGPART (val)))
+ return 0;
+ break;
+ case VECTOR_CST:
+ unsigned int j;
+ for (j = 0; j < VECTOR_CST_NELTS (val); ++j)
+ if (const_with_all_bytes_same (VECTOR_CST_ELT (val, j)))
+ break;
+ if (j == VECTOR_CST_NELTS (val))
+ return 0;
+ break;
+ default:
+ break;
+ }
+ }
+
if (CHAR_BIT != 8 || BITS_PER_UNIT != 8)
return -1;
diff --git a/gcc/tree-nested.c b/gcc/tree-nested.c
index 4be86682d04..e5af3597a54 100644
--- a/gcc/tree-nested.c
+++ b/gcc/tree-nested.c
@@ -1915,6 +1915,8 @@ convert_local_reference_stmt (gimple_stmt_iterator *gsi, bool *handled_ops_p,
struct nesting_info *info = (struct nesting_info *) wi->info;
tree save_local_var_chain;
bitmap save_suppress;
+ char save_static_chain_added;
+ bool frame_decl_added;
gimple stmt = gsi_stmt (*gsi);
switch (gimple_code (stmt))
@@ -1922,29 +1924,44 @@ convert_local_reference_stmt (gimple_stmt_iterator *gsi, bool *handled_ops_p,
case GIMPLE_OMP_PARALLEL:
case GIMPLE_OMP_TASK:
save_suppress = info->suppress_expansion;
+ frame_decl_added = false;
if (convert_local_omp_clauses (gimple_omp_taskreg_clauses_ptr (stmt),
wi))
{
- tree c;
+ tree c = build_omp_clause (gimple_location (stmt),
+ OMP_CLAUSE_SHARED);
(void) get_frame_type (info);
- c = build_omp_clause (gimple_location (stmt),
- OMP_CLAUSE_SHARED);
OMP_CLAUSE_DECL (c) = info->frame_decl;
OMP_CLAUSE_CHAIN (c) = gimple_omp_taskreg_clauses (stmt);
gimple_omp_taskreg_set_clauses (stmt, c);
+ info->static_chain_added |= 4;
+ frame_decl_added = true;
}
save_local_var_chain = info->new_local_var_chain;
+ save_static_chain_added = info->static_chain_added;
info->new_local_var_chain = NULL;
+ info->static_chain_added = 0;
walk_body (convert_local_reference_stmt, convert_local_reference_op, info,
gimple_omp_body_ptr (stmt));
+ if ((info->static_chain_added & 4) != 0 && !frame_decl_added)
+ {
+ tree c = build_omp_clause (gimple_location (stmt),
+ OMP_CLAUSE_SHARED);
+ (void) get_frame_type (info);
+ OMP_CLAUSE_DECL (c) = info->frame_decl;
+ OMP_CLAUSE_CHAIN (c) = gimple_omp_taskreg_clauses (stmt);
+ info->static_chain_added |= 4;
+ gimple_omp_taskreg_set_clauses (stmt, c);
+ }
if (info->new_local_var_chain)
declare_vars (info->new_local_var_chain,
gimple_seq_first_stmt (gimple_omp_body (stmt)), false);
info->new_local_var_chain = save_local_var_chain;
info->suppress_expansion = save_suppress;
+ info->static_chain_added |= save_static_chain_added;
break;
case GIMPLE_OMP_FOR:
@@ -1985,29 +2002,46 @@ convert_local_reference_stmt (gimple_stmt_iterator *gsi, bool *handled_ops_p,
break;
}
save_suppress = info->suppress_expansion;
+ frame_decl_added = false;
if (convert_local_omp_clauses (gimple_omp_target_clauses_ptr (stmt), wi))
{
- tree c;
+ tree c = build_omp_clause (gimple_location (stmt), OMP_CLAUSE_MAP);
(void) get_frame_type (info);
- c = build_omp_clause (gimple_location (stmt), OMP_CLAUSE_MAP);
OMP_CLAUSE_DECL (c) = info->frame_decl;
OMP_CLAUSE_SET_MAP_KIND (c, GOMP_MAP_TOFROM);
OMP_CLAUSE_SIZE (c) = DECL_SIZE_UNIT (info->frame_decl);
OMP_CLAUSE_CHAIN (c) = gimple_omp_target_clauses (stmt);
gimple_omp_target_set_clauses (as_a <gomp_target *> (stmt), c);
+ info->static_chain_added |= 4;
+ frame_decl_added = true;
}
save_local_var_chain = info->new_local_var_chain;
+ save_static_chain_added = info->static_chain_added;
info->new_local_var_chain = NULL;
+ info->static_chain_added = 0;
walk_body (convert_local_reference_stmt, convert_local_reference_op, info,
gimple_omp_body_ptr (stmt));
+ if ((info->static_chain_added & 4) != 0 && !frame_decl_added)
+ {
+ tree c = build_omp_clause (gimple_location (stmt), OMP_CLAUSE_MAP);
+ (void) get_frame_type (info);
+ OMP_CLAUSE_DECL (c) = info->frame_decl;
+ OMP_CLAUSE_SET_MAP_KIND (c, GOMP_MAP_TOFROM);
+ OMP_CLAUSE_SIZE (c) = DECL_SIZE_UNIT (info->frame_decl);
+ OMP_CLAUSE_CHAIN (c) = gimple_omp_target_clauses (stmt);
+ gimple_omp_target_set_clauses (as_a <gomp_target *> (stmt), c);
+ info->static_chain_added |= 4;
+ }
+
if (info->new_local_var_chain)
declare_vars (info->new_local_var_chain,
gimple_seq_first_stmt (gimple_omp_body (stmt)), false);
info->new_local_var_chain = save_local_var_chain;
info->suppress_expansion = save_suppress;
+ info->static_chain_added |= save_static_chain_added;
break;
case GIMPLE_OMP_TEAMS:
diff --git a/gcc/tree-ssa-loop-ivopts.c b/gcc/tree-ssa-loop-ivopts.c
index 29cca40bc0a..674b0e1ec9f 100644
--- a/gcc/tree-ssa-loop-ivopts.c
+++ b/gcc/tree-ssa-loop-ivopts.c
@@ -6933,7 +6933,11 @@ rewrite_use_address_1 (struct ivopts_data *data,
base_hint = var_at_stmt (data->current_loop, cand, use->stmt);
iv = var_at_stmt (data->current_loop, cand, use->stmt);
- ref = create_mem_ref (&bsi, TREE_TYPE (*use->op_p), &aff,
+ tree type = TREE_TYPE (*use->op_p);
+ unsigned int align = get_object_alignment (*use->op_p);
+ if (align != TYPE_ALIGN (type))
+ type = build_aligned_type (type, align);
+ ref = create_mem_ref (&bsi, type, &aff,
reference_alias_ptr_type (*use->op_p),
iv, base_hint, data->speed);
copy_ref_info (ref, *use->op_p);
diff --git a/gcc/tree-ssa-reassoc.c b/gcc/tree-ssa-reassoc.c
index 0710bae7de0..bdedf9d2cf3 100644
--- a/gcc/tree-ssa-reassoc.c
+++ b/gcc/tree-ssa-reassoc.c
@@ -663,7 +663,18 @@ is_reassociable_op (gimple stmt, enum tree_code code, struct loop *loop)
if (is_gimple_assign (stmt)
&& gimple_assign_rhs_code (stmt) == code
&& has_single_use (gimple_assign_lhs (stmt)))
- return true;
+ {
+ tree rhs1 = gimple_assign_rhs1 (stmt);
+ tree rhs2 = gimple_assign_rhs1 (stmt);
+ if (TREE_CODE (rhs1) == SSA_NAME
+ && SSA_NAME_OCCURS_IN_ABNORMAL_PHI (rhs1))
+ return false;
+ if (rhs2
+ && TREE_CODE (rhs2) == SSA_NAME
+ && SSA_NAME_OCCURS_IN_ABNORMAL_PHI (rhs2))
+ return false;
+ return true;
+ }
return false;
}
@@ -3566,11 +3577,15 @@ find_insert_point (gimple stmt, tree rhs1, tree rhs2)
/* Recursively rewrite our linearized statements so that the operators
match those in OPS[OPINDEX], putting the computation in rank
- order. Return new lhs. */
+ order. Return new lhs.
+ CHANGED is true if we shouldn't reuse the lhs SSA_NAME both in
+ the current stmt and during recursive invocations.
+ NEXT_CHANGED is true if we shouldn't reuse the lhs SSA_NAME in
+ recursive invocations. */
static tree
rewrite_expr_tree (gimple stmt, unsigned int opindex,
- vec<operand_entry_t> ops, bool changed)
+ vec<operand_entry_t> ops, bool changed, bool next_changed)
{
tree rhs1 = gimple_assign_rhs1 (stmt);
tree rhs2 = gimple_assign_rhs2 (stmt);
@@ -3649,7 +3664,8 @@ rewrite_expr_tree (gimple stmt, unsigned int opindex,
be the non-leaf side. */
tree new_rhs1
= rewrite_expr_tree (SSA_NAME_DEF_STMT (rhs1), opindex + 1, ops,
- changed || oe->op != rhs2);
+ changed || oe->op != rhs2 || next_changed,
+ false);
if (oe->op != rhs2 || new_rhs1 != rhs1)
{
@@ -4342,6 +4358,8 @@ static bool
can_reassociate_p (tree op)
{
tree type = TREE_TYPE (op);
+ if (TREE_CODE (op) == SSA_NAME && SSA_NAME_OCCURS_IN_ABNORMAL_PHI (op))
+ return false;
if ((INTEGRAL_TYPE_P (type) && TYPE_OVERFLOW_WRAPS (type))
|| NON_SAT_FIXED_POINT_TYPE_P (type)
|| (flag_associative_math && FLOAT_TYPE_P (type)))
@@ -4882,6 +4900,7 @@ reassociate_bb (basic_block bb)
gimple_set_visited (stmt, true);
linearize_expr_tree (&ops, stmt, true, true);
ops.qsort (sort_by_operand_rank);
+ int orig_len = ops.length ();
optimize_ops_list (rhs_code, &ops);
if (undistribute_ops_list (rhs_code, &ops,
loop_containing_stmt (stmt)))
@@ -4937,7 +4956,8 @@ reassociate_bb (basic_block bb)
swap_ops_for_binary_stmt (ops, len - 3, stmt);
new_lhs = rewrite_expr_tree (stmt, 0, ops,
- powi_result != NULL);
+ powi_result != NULL,
+ len != orig_len);
}
/* If we combined some repeated factors into a
diff --git a/gcc/tree-ssa-structalias.c b/gcc/tree-ssa-structalias.c
index d1eaae2f5c4..10231933b2a 100644
--- a/gcc/tree-ssa-structalias.c
+++ b/gcc/tree-ssa-structalias.c
@@ -2864,7 +2864,6 @@ alias_get_name (tree decl)
{
const char *res = NULL;
char *temp;
- int num_printed = 0;
if (!dump_file)
return "NULL";
@@ -2873,14 +2872,11 @@ alias_get_name (tree decl)
{
res = get_name (decl);
if (res)
- num_printed = asprintf (&temp, "%s_%u", res, SSA_NAME_VERSION (decl));
+ temp = xasprintf ("%s_%u", res, SSA_NAME_VERSION (decl));
else
- num_printed = asprintf (&temp, "_%u", SSA_NAME_VERSION (decl));
- if (num_printed > 0)
- {
- res = ggc_strdup (temp);
- free (temp);
- }
+ temp = xasprintf ("_%u", SSA_NAME_VERSION (decl));
+ res = ggc_strdup (temp);
+ free (temp);
}
else if (DECL_P (decl))
{
@@ -2891,12 +2887,9 @@ alias_get_name (tree decl)
res = get_name (decl);
if (!res)
{
- num_printed = asprintf (&temp, "D.%u", DECL_UID (decl));
- if (num_printed > 0)
- {
- res = ggc_strdup (temp);
- free (temp);
- }
+ temp = xasprintf ("D.%u", DECL_UID (decl));
+ res = ggc_strdup (temp);
+ free (temp);
}
}
}
diff --git a/gcc/tree-ssa-tail-merge.c b/gcc/tree-ssa-tail-merge.c
index adcd9d42e90..a8e337c5e4f 100644
--- a/gcc/tree-ssa-tail-merge.c
+++ b/gcc/tree-ssa-tail-merge.c
@@ -844,6 +844,9 @@ static void
same_succ_flush_bb (basic_block bb)
{
same_succ same = BB_SAME_SUCC (bb);
+ if (! same)
+ return;
+
BB_SAME_SUCC (bb) = NULL;
if (bitmap_single_bit_set_p (same->bbs))
same_succ_htab->remove_elt_with_hash (same, same->hashval);
diff --git a/gcc/tree-vect-data-refs.c b/gcc/tree-vect-data-refs.c
index 76a9fd71add..9cd0f0141d0 100644
--- a/gcc/tree-vect-data-refs.c
+++ b/gcc/tree-vect-data-refs.c
@@ -2393,6 +2393,8 @@ compare_tree (tree t1, tree t2)
if (t2 == NULL)
return 1;
+ STRIP_NOPS (t1);
+ STRIP_NOPS (t2);
if (TREE_CODE (t1) != TREE_CODE (t2))
return TREE_CODE (t1) < TREE_CODE (t2) ? -1 : 1;
diff --git a/gcc/tree-vrp.c b/gcc/tree-vrp.c
index 2582a9ebf60..769defd304c 100644
--- a/gcc/tree-vrp.c
+++ b/gcc/tree-vrp.c
@@ -2797,8 +2797,17 @@ extract_range_from_binary_expr_1 (value_range_t *vr,
min = build_symbolic_expr (expr_type, sym_min_op0,
neg_min_op0, min);
else if (sym_min_op1)
- min = build_symbolic_expr (expr_type, sym_min_op1,
- neg_min_op1 ^ minus_p, min);
+ {
+ /* We may not negate if that might introduce
+ undefined overflow. */
+ if (! minus_p
+ || neg_min_op1
+ || TYPE_OVERFLOW_WRAPS (expr_type))
+ min = build_symbolic_expr (expr_type, sym_min_op1,
+ neg_min_op1 ^ minus_p, min);
+ else
+ min = NULL_TREE;
+ }
/* Likewise for the upper bound. */
if (sym_max_op0 == sym_max_op1)
@@ -2807,8 +2816,17 @@ extract_range_from_binary_expr_1 (value_range_t *vr,
max = build_symbolic_expr (expr_type, sym_max_op0,
neg_max_op0, max);
else if (sym_max_op1)
- max = build_symbolic_expr (expr_type, sym_max_op1,
- neg_max_op1 ^ minus_p, max);
+ {
+ /* We may not negate if that might introduce
+ undefined overflow. */
+ if (! minus_p
+ || neg_max_op1
+ || TYPE_OVERFLOW_WRAPS (expr_type))
+ max = build_symbolic_expr (expr_type, sym_max_op1,
+ neg_max_op1 ^ minus_p, max);
+ else
+ max = NULL_TREE;
+ }
}
else
{
diff --git a/gcc/tsan.c b/gcc/tsan.c
index 2752182bb52..bd391686935 100644
--- a/gcc/tsan.c
+++ b/gcc/tsan.c
@@ -84,6 +84,7 @@ along with GCC; see the file COPYING3. If not see
#include "tsan.h"
#include "asan.h"
#include "builtins.h"
+#include "target.h"
/* Number of instrumented memory accesses in the current function. */
@@ -284,7 +285,8 @@ instrument_expr (gimple_stmt_iterator gsi, tree expr, bool is_write)
enum tsan_atomic_action
{
check_last, add_seq_cst, add_acquire, weak_cas, strong_cas,
- bool_cas, val_cas, lock_release, fetch_op, fetch_op_seq_cst
+ bool_cas, val_cas, lock_release, fetch_op, fetch_op_seq_cst,
+ bool_clear, bool_test_and_set
};
/* Table how to map sync/atomic builtins to their corresponding
@@ -318,6 +320,10 @@ static const struct tsan_map_atomic
TRANSFORM (fcode, tsan_fcode, fetch_op, code)
#define FETCH_OPS(fcode, tsan_fcode, code) \
TRANSFORM (fcode, tsan_fcode, fetch_op_seq_cst, code)
+#define BOOL_CLEAR(fcode, tsan_fcode) \
+ TRANSFORM (fcode, tsan_fcode, bool_clear, ERROR_MARK)
+#define BOOL_TEST_AND_SET(fcode, tsan_fcode) \
+ TRANSFORM (fcode, tsan_fcode, bool_test_and_set, ERROR_MARK)
CHECK_LAST (ATOMIC_LOAD_1, TSAN_ATOMIC8_LOAD),
CHECK_LAST (ATOMIC_LOAD_2, TSAN_ATOMIC16_LOAD),
@@ -507,7 +513,11 @@ static const struct tsan_map_atomic
LOCK_RELEASE (SYNC_LOCK_RELEASE_2, TSAN_ATOMIC16_STORE),
LOCK_RELEASE (SYNC_LOCK_RELEASE_4, TSAN_ATOMIC32_STORE),
LOCK_RELEASE (SYNC_LOCK_RELEASE_8, TSAN_ATOMIC64_STORE),
- LOCK_RELEASE (SYNC_LOCK_RELEASE_16, TSAN_ATOMIC128_STORE)
+ LOCK_RELEASE (SYNC_LOCK_RELEASE_16, TSAN_ATOMIC128_STORE),
+
+ BOOL_CLEAR (ATOMIC_CLEAR, TSAN_ATOMIC8_STORE),
+
+ BOOL_TEST_AND_SET (ATOMIC_TEST_AND_SET, TSAN_ATOMIC8_EXCHANGE)
};
/* Instrument an atomic builtin. */
@@ -659,6 +669,57 @@ instrument_builtin_call (gimple_stmt_iterator *gsi)
build_int_cst (NULL_TREE,
MEMMODEL_RELEASE));
return;
+ case bool_clear:
+ case bool_test_and_set:
+ if (BOOL_TYPE_SIZE != 8)
+ {
+ decl = NULL_TREE;
+ for (j = 1; j < 5; j++)
+ if (BOOL_TYPE_SIZE == (8 << j))
+ {
+ enum built_in_function tsan_fcode
+ = (enum built_in_function)
+ (tsan_atomic_table[i].tsan_fcode + j);
+ decl = builtin_decl_implicit (tsan_fcode);
+ break;
+ }
+ if (decl == NULL_TREE)
+ return;
+ }
+ last_arg = gimple_call_arg (stmt, num - 1);
+ if (!tree_fits_uhwi_p (last_arg)
+ || memmodel_base (tree_to_uhwi (last_arg)) >= MEMMODEL_LAST)
+ return;
+ t = TYPE_ARG_TYPES (TREE_TYPE (decl));
+ t = TREE_VALUE (TREE_CHAIN (t));
+ if (tsan_atomic_table[i].action == bool_clear)
+ {
+ update_gimple_call (gsi, decl, 3, gimple_call_arg (stmt, 0),
+ build_int_cst (t, 0), last_arg);
+ return;
+ }
+ t = build_int_cst (t, targetm.atomic_test_and_set_trueval);
+ update_gimple_call (gsi, decl, 3, gimple_call_arg (stmt, 0),
+ t, last_arg);
+ stmt = gsi_stmt (*gsi);
+ lhs = gimple_call_lhs (stmt);
+ if (lhs == NULL_TREE)
+ return;
+ if (targetm.atomic_test_and_set_trueval != 1
+ || !useless_type_conversion_p (TREE_TYPE (lhs),
+ TREE_TYPE (t)))
+ {
+ tree new_lhs = make_ssa_name (TREE_TYPE (t));
+ gimple_call_set_lhs (stmt, new_lhs);
+ if (targetm.atomic_test_and_set_trueval != 1)
+ g = gimple_build_assign (lhs, NE_EXPR, new_lhs,
+ build_int_cst (TREE_TYPE (t), 0));
+ else
+ g = gimple_build_assign (lhs, NOP_EXPR, new_lhs);
+ gsi_insert_after (gsi, g, GSI_NEW_STMT);
+ update_stmt (stmt);
+ }
+ return;
default:
continue;
}
diff --git a/gcc/ubsan.c b/gcc/ubsan.c
index c56864d54eb..351faa46a55 100644
--- a/gcc/ubsan.c
+++ b/gcc/ubsan.c
@@ -365,6 +365,10 @@ get_ubsan_type_info_for_type (tree type)
return 0;
}
+/* Counters for internal labels. ubsan_ids[0] for Lubsan_type,
+ ubsan_ids[1] for Lubsan_data labels. */
+static GTY(()) unsigned int ubsan_ids[2];
+
/* Helper routine that returns ADDR_EXPR of a VAR_DECL of a type
descriptor. It first looks into the hash table; if not found,
create the VAR_DECL, put it into the hash table and return the
@@ -427,6 +431,7 @@ ubsan_type_descriptor (tree type, enum ubsan_print_style pstyle)
/* We weren't able to determine the type name. */
tname = "<unknown>";
+ tree eltype = type;
if (pstyle == UBSAN_PRINT_POINTER)
{
pp_printf (&pretty_name, "'%s%s%s%s%s%s%s",
@@ -475,12 +480,12 @@ ubsan_type_descriptor (tree type, enum ubsan_print_style pstyle)
pp_quote (&pretty_name);
/* Save the tree with stripped types. */
- type = t;
+ eltype = t;
}
else
pp_printf (&pretty_name, "'%s'", tname);
- switch (TREE_CODE (type))
+ switch (TREE_CODE (eltype))
{
case BOOLEAN_TYPE:
case ENUMERAL_TYPE:
@@ -490,9 +495,9 @@ ubsan_type_descriptor (tree type, enum ubsan_print_style pstyle)
case REAL_TYPE:
/* FIXME: libubsan right now only supports float, double and
long double type formats. */
- if (TYPE_MODE (type) == TYPE_MODE (float_type_node)
- || TYPE_MODE (type) == TYPE_MODE (double_type_node)
- || TYPE_MODE (type) == TYPE_MODE (long_double_type_node))
+ if (TYPE_MODE (eltype) == TYPE_MODE (float_type_node)
+ || TYPE_MODE (eltype) == TYPE_MODE (double_type_node)
+ || TYPE_MODE (eltype) == TYPE_MODE (long_double_type_node))
tkind = 0x0001;
else
tkind = 0xffff;
@@ -501,7 +506,7 @@ ubsan_type_descriptor (tree type, enum ubsan_print_style pstyle)
tkind = 0xffff;
break;
}
- tinfo = get_ubsan_type_info_for_type (type);
+ tinfo = get_ubsan_type_info_for_type (eltype);
/* Create a new VAR_DECL of type descriptor. */
const char *tmp = pp_formatted_text (&pretty_name);
@@ -512,10 +517,9 @@ ubsan_type_descriptor (tree type, enum ubsan_print_style pstyle)
TREE_STATIC (str) = 1;
char tmp_name[32];
- static unsigned int type_var_id_num;
- ASM_GENERATE_INTERNAL_LABEL (tmp_name, "Lubsan_type", type_var_id_num++);
+ ASM_GENERATE_INTERNAL_LABEL (tmp_name, "Lubsan_type", ubsan_ids[0]++);
decl = build_decl (UNKNOWN_LOCATION, VAR_DECL, get_identifier (tmp_name),
- dtype);
+ dtype);
TREE_STATIC (decl) = 1;
TREE_PUBLIC (decl) = 0;
DECL_ARTIFICIAL (decl) = 1;
@@ -615,8 +619,7 @@ ubsan_create_data (const char *name, int loccnt, const location_t *ploc, ...)
/* Now, fill in the type. */
char tmp_name[32];
- static unsigned int ubsan_var_id_num;
- ASM_GENERATE_INTERNAL_LABEL (tmp_name, "Lubsan_data", ubsan_var_id_num++);
+ ASM_GENERATE_INTERNAL_LABEL (tmp_name, "Lubsan_data", ubsan_ids[1]++);
tree var = build_decl (UNKNOWN_LOCATION, VAR_DECL, get_identifier (tmp_name),
ret);
TREE_STATIC (var) = 1;
@@ -1772,7 +1775,7 @@ instrument_object_size (gimple_stmt_iterator *gsi, bool is_lhs)
{
tree repr = DECL_BIT_FIELD_REPRESENTATIVE (TREE_OPERAND (t, 1));
t = build3 (COMPONENT_REF, TREE_TYPE (repr), TREE_OPERAND (t, 0),
- repr, NULL_TREE);
+ repr, TREE_OPERAND (t, 2));
}
break;
case ARRAY_REF:
@@ -1806,7 +1809,11 @@ instrument_object_size (gimple_stmt_iterator *gsi, bool is_lhs)
bool decl_p = DECL_P (inner);
tree base;
if (decl_p)
- base = inner;
+ {
+ if (DECL_REGISTER (inner))
+ return;
+ base = inner;
+ }
else if (TREE_CODE (inner) == MEM_REF)
base = TREE_OPERAND (inner, 0);
else
diff --git a/gnattools/ChangeLog b/gnattools/ChangeLog
index 2204183d74c..0114b648191 100644
--- a/gnattools/ChangeLog
+++ b/gnattools/ChangeLog
@@ -1,3 +1,7 @@
+2017-10-10 Release Manager
+
+ * GCC 5.5.0 released.
+
2016-06-03 Release Manager
* GCC 5.4.0 released.
diff --git a/gotools/ChangeLog b/gotools/ChangeLog
index 8dd431e0d91..5b370d5f836 100644
--- a/gotools/ChangeLog
+++ b/gotools/ChangeLog
@@ -1,3 +1,7 @@
+2017-10-10 Release Manager
+
+ * GCC 5.5.0 released.
+
2016-06-03 Release Manager
* GCC 5.4.0 released.
diff --git a/include/ChangeLog b/include/ChangeLog
index a13d15cf57e..f4a71e1cada 100644
--- a/include/ChangeLog
+++ b/include/ChangeLog
@@ -1,3 +1,7 @@
+2017-10-10 Release Manager
+
+ * GCC 5.5.0 released.
+
2016-06-03 Release Manager
* GCC 5.4.0 released.
diff --git a/intl/ChangeLog b/intl/ChangeLog
index dfdb461254e..e7d48231ae9 100644
--- a/intl/ChangeLog
+++ b/intl/ChangeLog
@@ -1,3 +1,7 @@
+2017-10-10 Release Manager
+
+ * GCC 5.5.0 released.
+
2016-06-03 Release Manager
* GCC 5.4.0 released.
diff --git a/libada/ChangeLog b/libada/ChangeLog
index 471b10b6d65..c395bb59ef1 100644
--- a/libada/ChangeLog
+++ b/libada/ChangeLog
@@ -1,3 +1,7 @@
+2017-10-10 Release Manager
+
+ * GCC 5.5.0 released.
+
2016-06-03 Release Manager
* GCC 5.4.0 released.
diff --git a/libatomic/ChangeLog b/libatomic/ChangeLog
index 916db3cf95c..8af1cd4e923 100644
--- a/libatomic/ChangeLog
+++ b/libatomic/ChangeLog
@@ -1,3 +1,7 @@
+2017-10-10 Release Manager
+
+ * GCC 5.5.0 released.
+
2017-02-07 Szabolcs Nagy <szabolcs.nagy@arm.com>
Backport from mainline:
diff --git a/libbacktrace/ChangeLog b/libbacktrace/ChangeLog
index 2ba1798a755..4f11bc35cd9 100644
--- a/libbacktrace/ChangeLog
+++ b/libbacktrace/ChangeLog
@@ -1,3 +1,7 @@
+2017-10-10 Release Manager
+
+ * GCC 5.5.0 released.
+
2016-06-03 Release Manager
* GCC 5.4.0 released.
diff --git a/libcc1/ChangeLog b/libcc1/ChangeLog
index e25342d430c..8a6b8b96d03 100644
--- a/libcc1/ChangeLog
+++ b/libcc1/ChangeLog
@@ -1,3 +1,7 @@
+2017-10-10 Release Manager
+
+ * GCC 5.5.0 released.
+
2016-06-03 Release Manager
* GCC 5.4.0 released.
diff --git a/libcilkrts/ChangeLog b/libcilkrts/ChangeLog
index ed05e253961..c091f57e1a3 100644
--- a/libcilkrts/ChangeLog
+++ b/libcilkrts/ChangeLog
@@ -1,3 +1,7 @@
+2017-10-10 Release Manager
+
+ * GCC 5.5.0 released.
+
2016-06-03 Release Manager
* GCC 5.4.0 released.
diff --git a/libcpp/ChangeLog b/libcpp/ChangeLog
index 589317304b2..6d8f9dc36ad 100644
--- a/libcpp/ChangeLog
+++ b/libcpp/ChangeLog
@@ -1,3 +1,7 @@
+2017-10-10 Release Manager
+
+ * GCC 5.5.0 released.
+
2016-06-03 Release Manager
* GCC 5.4.0 released.
diff --git a/libcpp/po/ChangeLog b/libcpp/po/ChangeLog
index 7acb445464b..190dff1680b 100644
--- a/libcpp/po/ChangeLog
+++ b/libcpp/po/ChangeLog
@@ -1,3 +1,7 @@
+2017-10-10 Release Manager
+
+ * GCC 5.5.0 released.
+
2016-06-03 Release Manager
* GCC 5.4.0 released.
diff --git a/libdecnumber/ChangeLog b/libdecnumber/ChangeLog
index a14cf4e1f8f..99ec51b6489 100644
--- a/libdecnumber/ChangeLog
+++ b/libdecnumber/ChangeLog
@@ -1,3 +1,7 @@
+2017-10-10 Release Manager
+
+ * GCC 5.5.0 released.
+
2016-06-03 Release Manager
* GCC 5.4.0 released.
diff --git a/libffi/ChangeLog b/libffi/ChangeLog
index 52fc419c7c0..cc07a685264 100644
--- a/libffi/ChangeLog
+++ b/libffi/ChangeLog
@@ -1,3 +1,7 @@
+2017-10-10 Release Manager
+
+ * GCC 5.5.0 released.
+
2016-06-03 Release Manager
* GCC 5.4.0 released.
diff --git a/libgcc/ChangeLog b/libgcc/ChangeLog
index 4c7b8c2654d..9828340bcba 100644
--- a/libgcc/ChangeLog
+++ b/libgcc/ChangeLog
@@ -1,3 +1,98 @@
+2017-10-10 Release Manager
+
+ * GCC 5.5.0 released.
+
+2017-07-04 Joseph Myers <joseph@codesourcery.com>
+
+ * config/aarch64/linux-unwind.h (aarch64_fallback_frame_state),
+ config/alpha/linux-unwind.h (alpha_fallback_frame_state),
+ config/bfin/linux-unwind.h (bfin_fallback_frame_state),
+ config/i386/linux-unwind.h (x86_64_fallback_frame_state,
+ x86_fallback_frame_state), config/m68k/linux-unwind.h (struct
+ uw_ucontext), config/nios2/linux-unwind.h (struct nios2_ucontext),
+ config/pa/linux-unwind.h (pa32_fallback_frame_state),
+ config/sh/linux-unwind.h (sh_fallback_frame_state),
+ config/tilepro/linux-unwind.h (tile_fallback_frame_state),
+ config/xtensa/linux-unwind.h (xtensa_fallback_frame_state): Use
+ ucontext_t instead of struct ucontext.
+
+2017-05-30 Max Filippov <jcmvbkbc@gmail.com>
+
+ Backport from mainline
+ 2016-10-18 Max Filippov <jcmvbkbc@gmail.com>
+
+ * config/xtensa/t-elf (LIB2ADDEH_XTENSA_UNWIND_DW2_FDE): New
+ definition.
+ * config/xtensa/t-linux (LIB2ADDEH_XTENSA_UNWIND_DW2_FDE): New
+ definition.
+ * config/xtensa/t-windowed (LIB2ADDEH): Use
+ LIB2ADDEH_XTENSA_UNWIND_DW2_FDE defined by either xtensa/t-elf
+ or xtensa/t-linux.
+
+2017-05-30 Max Filippov <jcmvbkbc@gmail.com>
+
+ Backport from mainline
+ 2016-02-17 Max Filippov <jcmvbkbc@gmail.com>
+
+ * config/xtensa/ieee754-df.S (__muldf3_aux, __divdf3_aux): Add
+ .literal_position before the function.
+ * config/xtensa/ieee754-sf.S (__mulsf3_aux, __divsf3_aux):
+ Likewise.
+
+2017-05-30 Max Filippov <jcmvbkbc@gmail.com>
+
+ Backport from mainline
+ 2015-09-15 Max Filippov <jcmvbkbc@gmail.com>
+
+ * config/xtensa/linux-unwind.h (xtensa_fallback_frame_state):
+ Add support for call0 ABI.
+
+2017-05-30 Max Filippov <jcmvbkbc@gmail.com>
+
+ Backport from mainline
+ 2015-08-18 Max Filippov <jcmvbkbc@gmail.com>
+
+ * config/xtensa/unwind-dw2-xtensa.c (_Unwind_GetCFA): Return
+ context->sp instead of context->cfa.
+
+2017-05-30 Max Filippov <jcmvbkbc@gmail.com>
+
+ Backport from mainline
+ 2015-08-18 Max Filippov <jcmvbkbc@gmail.com>
+
+ * config/xtensa/t-windowed (LIB2ADDEH): Replace unwind-dw2-fde
+ with unwind-dw2-fde-dip.
+
+2017-05-29 Martin Liska <mliska@suse.cz>
+
+ Backport from mainline
+ 2017-04-18 Martin Liska <mliska@suse.cz>
+
+ PR gcov-profile/78783
+ * libgcov-driver.c (gcov_get_filename): New function.
+
+2017-05-19 Andreas Tobler <andreast@gcc.gnu.org>
+
+ Backport from mainline
+ 2017-05-17 Andreas Tobler <andreast@gcc.gnu.org>
+
+ * config/arm/unwind-arm.h: Make _Unwind_GetIP, _Unwind_GetIPInfo and
+ _Unwind_SetIP available as functions for arm*-*-freebsd*.
+ * config/arm/unwind-arm.c: Implement the above.
+
+2017-05-15 Adhemerval Zanella <adhemerval.zanella@linaro.org>
+
+ * config/sparc/lb1spc.S [__ELF__ && __linux__]: Emit .note.GNU-stack
+ section for a non-executable stack.
+
+2017-05-09 Andreas Tobler <andreast@gcc.gnu.org>
+
+ Backport from mainline
+ 2017-05-09 Andreas Tobler <andreast@gcc.gnu.org>
+
+ * config.host: Use the generic FreeBSD t-slibgcc-elf-ver for
+ arm*-*-freebsd* instead of the t-slibgcc-libgcc.
+
2017-04-07 Alan Modra <amodra@gmail.com>
PR target/45053
diff --git a/libgcc/config.host b/libgcc/config.host
index 2747a97bb66..93dd0727b9e 100644
--- a/libgcc/config.host
+++ b/libgcc/config.host
@@ -378,7 +378,7 @@ arm-wrs-vxworks)
;;
arm*-*-freebsd*) # ARM FreeBSD EABI
tmake_file="${tmake_file} arm/t-arm t-fixedpoint-gnu-prefix arm/t-elf"
- tmake_file="${tmake_file} arm/t-bpabi arm/t-freebsd t-slibgcc-libgcc"
+ tmake_file="${tmake_file} arm/t-bpabi arm/t-freebsd"
tm_file="${tm_file} arm/bpabi-lib.h"
unwind_header=config/arm/unwind-arm.h
tmake_file="${tmake_file} t-softfp-sfdf t-softfp-excl arm/t-softfp t-softfp"
diff --git a/libgcc/config/aarch64/linux-unwind.h b/libgcc/config/aarch64/linux-unwind.h
index 86d17b1c798..909f68f7311 100644
--- a/libgcc/config/aarch64/linux-unwind.h
+++ b/libgcc/config/aarch64/linux-unwind.h
@@ -52,7 +52,7 @@ aarch64_fallback_frame_state (struct _Unwind_Context *context,
struct rt_sigframe
{
siginfo_t info;
- struct ucontext uc;
+ ucontext_t uc;
};
struct rt_sigframe *rt_;
diff --git a/libgcc/config/alpha/linux-unwind.h b/libgcc/config/alpha/linux-unwind.h
index d65474fec12..9a226b195b5 100644
--- a/libgcc/config/alpha/linux-unwind.h
+++ b/libgcc/config/alpha/linux-unwind.h
@@ -51,7 +51,7 @@ alpha_fallback_frame_state (struct _Unwind_Context *context,
{
struct rt_sigframe {
siginfo_t info;
- struct ucontext uc;
+ ucontext_t uc;
} *rt_ = context->cfa;
sc = &rt_->uc.uc_mcontext;
}
diff --git a/libgcc/config/arm/unwind-arm.c b/libgcc/config/arm/unwind-arm.c
index 91b878acd29..d0cf9214fa6 100644
--- a/libgcc/config/arm/unwind-arm.c
+++ b/libgcc/config/arm/unwind-arm.c
@@ -509,3 +509,25 @@ __aeabi_unwind_cpp_pr2 (_Unwind_State state,
{
return __gnu_unwind_pr_common (state, ucbp, context, 2);
}
+
+#ifdef __FreeBSD__
+/* FreeBSD expects these to be functions */
+inline _Unwind_Ptr
+_Unwind_GetIP (struct _Unwind_Context *context)
+{
+ return _Unwind_GetGR (context, 15) & ~(_Unwind_Word)1;
+}
+
+inline _Unwind_Ptr
+_Unwind_GetIPInfo (struct _Unwind_Context *context, int *ip_before_insn)
+{
+ *ip_before_insn = 0;
+ return _Unwind_GetIP (context);
+}
+
+inline void
+_Unwind_SetIP (struct _Unwind_Context *context, _Unwind_Ptr val)
+{
+ _Unwind_SetGR (context, 15, val | (_Unwind_GetGR (context, 15) & 1));
+}
+#endif
diff --git a/libgcc/config/arm/unwind-arm.h b/libgcc/config/arm/unwind-arm.h
index f1f789c70e5..ccf839d7927 100644
--- a/libgcc/config/arm/unwind-arm.h
+++ b/libgcc/config/arm/unwind-arm.h
@@ -72,12 +72,19 @@ extern "C" {
{
return _URC_FAILURE;
}
+#ifndef __FreeBSD__
/* Return the address of the instruction, not the actual IP value. */
#define _Unwind_GetIP(context) \
(_Unwind_GetGR (context, 15) & ~(_Unwind_Word)1)
#define _Unwind_SetIP(context, val) \
_Unwind_SetGR (context, 15, val | (_Unwind_GetGR (context, 15) & 1))
+#else
+ #undef _Unwind_GetIPInfo
+ _Unwind_Ptr _Unwind_GetIP (struct _Unwind_Context *);
+ _Unwind_Ptr _Unwind_GetIPInfo (struct _Unwind_Context *, int *);
+ void _Unwind_SetIP (struct _Unwind_Context *, _Unwind_Ptr);
+#endif
#ifdef __cplusplus
} /* extern "C" */
diff --git a/libgcc/config/bfin/linux-unwind.h b/libgcc/config/bfin/linux-unwind.h
index 0c270e435c7..7fa95d2dc96 100644
--- a/libgcc/config/bfin/linux-unwind.h
+++ b/libgcc/config/bfin/linux-unwind.h
@@ -52,7 +52,7 @@ bfin_fallback_frame_state (struct _Unwind_Context *context,
void *puc;
char retcode[8];
siginfo_t info;
- struct ucontext uc;
+ ucontext_t uc;
} *rt_ = context->cfa;
/* The void * cast is necessary to avoid an aliasing warning.
diff --git a/libgcc/config/i386/linux-unwind.h b/libgcc/config/i386/linux-unwind.h
index e54bf73b1fd..d35fc4566ce 100644
--- a/libgcc/config/i386/linux-unwind.h
+++ b/libgcc/config/i386/linux-unwind.h
@@ -58,7 +58,7 @@ x86_64_fallback_frame_state (struct _Unwind_Context *context,
if (*(unsigned char *)(pc+0) == 0x48
&& *(unsigned long long *)(pc+1) == RT_SIGRETURN_SYSCALL)
{
- struct ucontext *uc_ = context->cfa;
+ ucontext_t *uc_ = context->cfa;
/* The void * cast is necessary to avoid an aliasing warning.
The aliasing warning is correct, but should not be a problem
because it does not alias anything. */
@@ -138,7 +138,7 @@ x86_fallback_frame_state (struct _Unwind_Context *context,
siginfo_t *pinfo;
void *puc;
siginfo_t info;
- struct ucontext uc;
+ ucontext_t uc;
} *rt_ = context->cfa;
/* The void * cast is necessary to avoid an aliasing warning.
The aliasing warning is correct, but should not be a problem
diff --git a/libgcc/config/libbid/ChangeLog b/libgcc/config/libbid/ChangeLog
index d31f051a6d3..4c31bfc46f6 100644
--- a/libgcc/config/libbid/ChangeLog
+++ b/libgcc/config/libbid/ChangeLog
@@ -1,3 +1,7 @@
+2017-10-10 Release Manager
+
+ * GCC 5.5.0 released.
+
2016-06-03 Release Manager
* GCC 5.4.0 released.
diff --git a/libgcc/config/m68k/linux-unwind.h b/libgcc/config/m68k/linux-unwind.h
index fb79a4d63cd..b2f5ea4cd7c 100644
--- a/libgcc/config/m68k/linux-unwind.h
+++ b/libgcc/config/m68k/linux-unwind.h
@@ -33,7 +33,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
/* <sys/ucontext.h> is unfortunately broken right now. */
struct uw_ucontext {
unsigned long uc_flags;
- struct ucontext *uc_link;
+ ucontext_t *uc_link;
stack_t uc_stack;
mcontext_t uc_mcontext;
unsigned long uc_filler[80];
diff --git a/libgcc/config/nios2/linux-unwind.h b/libgcc/config/nios2/linux-unwind.h
index dff1c20076e..1d88afecb12 100644
--- a/libgcc/config/nios2/linux-unwind.h
+++ b/libgcc/config/nios2/linux-unwind.h
@@ -38,7 +38,7 @@ struct nios2_mcontext {
struct nios2_ucontext {
unsigned long uc_flags;
- struct ucontext *uc_link;
+ ucontext_t *uc_link;
stack_t uc_stack;
struct nios2_mcontext uc_mcontext;
sigset_t uc_sigmask; /* mask last for extensibility */
diff --git a/libgcc/config/pa/linux-unwind.h b/libgcc/config/pa/linux-unwind.h
index 01494685ea4..91575356803 100644
--- a/libgcc/config/pa/linux-unwind.h
+++ b/libgcc/config/pa/linux-unwind.h
@@ -80,7 +80,7 @@ pa32_fallback_frame_state (struct _Unwind_Context *context,
struct sigcontext *sc;
struct rt_sigframe {
siginfo_t info;
- struct ucontext uc;
+ ucontext_t uc;
} *frame;
/* rt_sigreturn trampoline:
diff --git a/libgcc/config/sh/linux-unwind.h b/libgcc/config/sh/linux-unwind.h
index e63091f287c..67033f06b4b 100644
--- a/libgcc/config/sh/linux-unwind.h
+++ b/libgcc/config/sh/linux-unwind.h
@@ -180,7 +180,7 @@ sh_fallback_frame_state (struct _Unwind_Context *context,
{
struct rt_sigframe {
siginfo_t info;
- struct ucontext uc;
+ ucontext_t uc;
} *rt_ = context->cfa;
/* The void * cast is necessary to avoid an aliasing warning.
The aliasing warning is correct, but should not be a problem
diff --git a/libgcc/config/sparc/lb1spc.S b/libgcc/config/sparc/lb1spc.S
index b60bd5740e7..e6938646404 100644
--- a/libgcc/config/sparc/lb1spc.S
+++ b/libgcc/config/sparc/lb1spc.S
@@ -5,6 +5,12 @@
slightly edited to match the desired calling convention, and also to
optimize them for our purposes. */
+/* An executable stack is *not* required for these functions. */
+#if defined(__ELF__) && defined(__linux__)
+.section .note.GNU-stack,"",%progbits
+.previous
+#endif
+
#ifdef L_mulsi3
.text
.align 4
diff --git a/libgcc/config/tilepro/linux-unwind.h b/libgcc/config/tilepro/linux-unwind.h
index fd83ba7c275..e3c9ef0840d 100644
--- a/libgcc/config/tilepro/linux-unwind.h
+++ b/libgcc/config/tilepro/linux-unwind.h
@@ -61,7 +61,7 @@ tile_fallback_frame_state (struct _Unwind_Context *context,
struct rt_sigframe {
unsigned char save_area[C_ABI_SAVE_AREA_SIZE];
siginfo_t info;
- struct ucontext uc;
+ ucontext_t uc;
} *rt_;
/* Return if this is not a signal handler. */
diff --git a/libgcc/config/xtensa/ieee754-df.S b/libgcc/config/xtensa/ieee754-df.S
index a7ae2099dc1..26f2abd6788 100644
--- a/libgcc/config/xtensa/ieee754-df.S
+++ b/libgcc/config/xtensa/ieee754-df.S
@@ -606,6 +606,7 @@ __subdf3:
#define XCHAL_NO_MUL 1
#endif
+ .literal_position
__muldf3_aux:
/* Handle unusual cases (zeros, subnormals, NaNs and Infinities).
@@ -1216,6 +1217,7 @@ __muldf3:
#ifdef L_divdf3
+ .literal_position
/* Division */
__divdf3_aux:
diff --git a/libgcc/config/xtensa/ieee754-sf.S b/libgcc/config/xtensa/ieee754-sf.S
index 7e397dc9857..a5e6e3c4843 100644
--- a/libgcc/config/xtensa/ieee754-sf.S
+++ b/libgcc/config/xtensa/ieee754-sf.S
@@ -487,6 +487,7 @@ __subsf3:
#define XCHAL_NO_MUL 1
#endif
+ .literal_position
__mulsf3_aux:
/* Handle unusual cases (zeros, subnormals, NaNs and Infinities).
@@ -884,6 +885,7 @@ __mulsf3:
#ifdef L_divsf3
+ .literal_position
/* Division */
__divsf3_aux:
diff --git a/libgcc/config/xtensa/linux-unwind.h b/libgcc/config/xtensa/linux-unwind.h
index 9daf738ff57..98b7ea60e81 100644
--- a/libgcc/config/xtensa/linux-unwind.h
+++ b/libgcc/config/xtensa/linux-unwind.h
@@ -52,7 +52,6 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
#define ENTRY_BYTE 0x36
#endif
-#ifdef __XTENSA_WINDOWED_ABI__
#define MD_FALLBACK_FRAME_STATE_FOR xtensa_fallback_frame_state
static _Unwind_Reason_Code
@@ -61,10 +60,14 @@ xtensa_fallback_frame_state (struct _Unwind_Context *context,
{
unsigned char *pc = context->ra;
struct sigcontext *sc;
+#if defined(__XTENSA_CALL0_ABI__)
+ _Unwind_Ptr new_cfa;
+ int i;
+#endif
struct rt_sigframe {
siginfo_t info;
- struct ucontext uc;
+ ucontext_t uc;
} *rt_;
/* movi a2, __NR_rt_sigreturn; syscall */
@@ -76,6 +79,7 @@ xtensa_fallback_frame_state (struct _Unwind_Context *context,
|| pc[5] != SYSC_BYTE2)
return _URC_END_OF_STACK;
+#if defined(__XTENSA_WINDOWED_ABI__)
rt_ = context->sp;
sc = &rt_->uc.uc_mcontext;
fs->signal_regs = (_Unwind_Word *) sc->sc_a;
@@ -90,11 +94,33 @@ xtensa_fallback_frame_state (struct _Unwind_Context *context,
}
else
fs->signal_ra = sc->sc_pc;
+#elif defined(__XTENSA_CALL0_ABI__)
+ rt_ = context->cfa;
+ sc = &rt_->uc.uc_mcontext;
+
+ new_cfa = (_Unwind_Ptr) sc;
+ fs->regs.cfa_how = CFA_REG_OFFSET;
+ fs->regs.cfa_reg = __LIBGCC_STACK_POINTER_REGNUM__;
+ fs->regs.cfa_offset = new_cfa - (_Unwind_Ptr) context->cfa;
+
+ for (i = 0; i < 16; i++)
+ {
+ fs->regs.reg[i].how = REG_SAVED_OFFSET;
+ fs->regs.reg[i].loc.offset = (_Unwind_Ptr) &(sc->sc_a[i]) - new_cfa;
+ }
+
+ fs->regs.reg[__LIBGCC_DWARF_ALT_FRAME_RETURN_COLUMN__].how =
+ REG_SAVED_VAL_OFFSET;
+ fs->regs.reg[__LIBGCC_DWARF_ALT_FRAME_RETURN_COLUMN__].loc.offset =
+ (_Unwind_Ptr) (sc->sc_pc) - new_cfa;
+ fs->retaddr_column = __LIBGCC_DWARF_ALT_FRAME_RETURN_COLUMN__;
+#else
+#error Unsupported Xtensa ABI
+#endif
fs->signal_frame = 1;
return _URC_NO_REASON;
}
-#endif /* __XTENSA_WINDOWED_ABI__ */
#endif /* ifdef inhibit_libc */
diff --git a/libgcc/config/xtensa/t-elf b/libgcc/config/xtensa/t-elf
index 59d51210b95..967cf9bfa6c 100644
--- a/libgcc/config/xtensa/t-elf
+++ b/libgcc/config/xtensa/t-elf
@@ -3,3 +3,5 @@ CRTSTUFF_T_CFLAGS += -mlongcalls
CRTSTUFF_T_CFLAGS_S += -mlongcalls
HOST_LIBGCC2_CFLAGS += -mlongcalls
+
+LIB2ADDEH_XTENSA_UNWIND_DW2_FDE = $(srcdir)/unwind-dw2-fde.c
diff --git a/libgcc/config/xtensa/t-linux b/libgcc/config/xtensa/t-linux
index 6f4ae893486..412eccae18b 100644
--- a/libgcc/config/xtensa/t-linux
+++ b/libgcc/config/xtensa/t-linux
@@ -1 +1,3 @@
SHLIB_MAPFILES += $(srcdir)/config/xtensa/libgcc-glibc.ver
+
+LIB2ADDEH_XTENSA_UNWIND_DW2_FDE = $(srcdir)/unwind-dw2-fde-dip.c
diff --git a/libgcc/config/xtensa/t-windowed b/libgcc/config/xtensa/t-windowed
index 7d9e9db0487..f140136277e 100644
--- a/libgcc/config/xtensa/t-windowed
+++ b/libgcc/config/xtensa/t-windowed
@@ -1,2 +1,2 @@
LIB2ADDEH = $(srcdir)/config/xtensa/unwind-dw2-xtensa.c \
- $(srcdir)/unwind-dw2-fde.c $(srcdir)/unwind-sjlj.c $(srcdir)/unwind-c.c
+ $(LIB2ADDEH_XTENSA_UNWIND_DW2_FDE) $(srcdir)/unwind-sjlj.c $(srcdir)/unwind-c.c
diff --git a/libgcc/config/xtensa/unwind-dw2-xtensa.c b/libgcc/config/xtensa/unwind-dw2-xtensa.c
index 82b0e6314b0..8e579c7617d 100644
--- a/libgcc/config/xtensa/unwind-dw2-xtensa.c
+++ b/libgcc/config/xtensa/unwind-dw2-xtensa.c
@@ -130,7 +130,7 @@ _Unwind_GetGR (struct _Unwind_Context *context, int index)
_Unwind_Word
_Unwind_GetCFA (struct _Unwind_Context *context)
{
- return (_Unwind_Ptr) context->cfa;
+ return (_Unwind_Ptr) context->sp;
}
/* Overwrite the saved value for register INDEX in CONTEXT with VAL. */
diff --git a/libgcc/libgcov-driver.c b/libgcc/libgcov-driver.c
index 221ac0c00d0..4886c5d100f 100644
--- a/libgcc/libgcov-driver.c
+++ b/libgcc/libgcov-driver.c
@@ -848,6 +848,15 @@ gcov_do_dump (struct gcov_info *list, int run_counted)
free (gf.filename);
}
+#if IN_GCOV_TOOL
+const char *
+__attribute__ ((unused))
+gcov_get_filename (struct gcov_info *list)
+{
+ return list->filename;
+}
+#endif
+
#if !IN_GCOV_TOOL
void
__gcov_dump_one (struct gcov_root *root)
diff --git a/libgfortran/ChangeLog b/libgfortran/ChangeLog
index a0471221cc8..bedf1cc55ee 100644
--- a/libgfortran/ChangeLog
+++ b/libgfortran/ChangeLog
@@ -1,3 +1,15 @@
+2017-10-10 Release Manager
+
+ * GCC 5.5.0 released.
+
+2017-05-19 Janne Blomqvist <jb@gcc.gnu.org>
+
+ Backport from trunk
+ * libgfortran.h: HAVE_SECURE_GETENV: Don't check
+ HAVE___SECURE_GETENV.
+ * environ/runtime.c (secure_getenv): Use __secure_getenv via a
+ weak reference.
+
2017-01-31 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/79305
diff --git a/libgfortran/libgfortran.h b/libgfortran/libgfortran.h
index 39e5e4ae642..d3e99e5c000 100644
--- a/libgfortran/libgfortran.h
+++ b/libgfortran/libgfortran.h
@@ -809,9 +809,7 @@ internal_proto(get_unformatted_convert);
/* Secure getenv() which returns NULL if running as SUID/SGID. */
#ifndef HAVE_SECURE_GETENV
-#ifdef HAVE___SECURE_GETENV
-#define secure_getenv __secure_getenv
-#elif defined(HAVE_GETUID) && defined(HAVE_GETEUID) \
+#if defined(HAVE_GETUID) && defined(HAVE_GETEUID) \
&& defined(HAVE_GETGID) && defined(HAVE_GETEGID)
#define FALLBACK_SECURE_GETENV
extern char *secure_getenv (const char *);
diff --git a/libgfortran/runtime/environ.c b/libgfortran/runtime/environ.c
index 4f6408f8ef0..6e8b2036471 100644
--- a/libgfortran/runtime/environ.c
+++ b/libgfortran/runtime/environ.c
@@ -61,9 +61,20 @@ static void init_unformatted (variable *);
#ifdef FALLBACK_SECURE_GETENV
+
+#if SUPPORTS_WEAKREF && defined(HAVE___SECURE_GETENV)
+static char* weak_secure_getenv (const char*)
+ __attribute__((__weakref__("__secure_getenv")));
+#endif
+
char *
secure_getenv (const char *name)
{
+#if SUPPORTS_WEAKREF && defined(HAVE___SECURE_GETENV)
+ if (weak_secure_getenv)
+ return weak_secure_getenv (name);
+#endif
+
if ((getuid () == geteuid ()) && (getgid () == getegid ()))
return getenv (name);
else
diff --git a/libgo/go/syscall/syscall_linux_s390.go b/libgo/go/syscall/syscall_linux_s390.go
index a744f6b7841..4903783b61a 100644
--- a/libgo/go/syscall/syscall_linux_s390.go
+++ b/libgo/go/syscall/syscall_linux_s390.go
@@ -12,10 +12,29 @@ func (r *PtraceRegs) PC() uint64 { return uint64(r.Psw.Addr) }
func (r *PtraceRegs) SetPC(pc uint64) { r.Psw.Addr = uint32(pc) }
-func PtraceGetRegs(pid int, regsout *PtraceRegs) (err error) {
- return ptrace(PTRACE_GETREGS, pid, 0, uintptr(unsafe.Pointer(regsout)))
+const syscall_PTRACE_PEEKUSR_AREA = 0x5000
+const syscall_PTRACE_POKEUSR_AREA = 0x5001
+
+type syscall_ptrace_area struct {
+ len uint32
+ kernel_addr uint32
+ process_addr uint32
+}
+
+func PtraceGetRegs(pid int, regs *PtraceRegs) (err error) {
+ parea := syscall_ptrace_area{
+ 12,
+ 0,
+ uint32(uintptr(unsafe.Pointer(regs))),
+ }
+ return ptrace(syscall_PTRACE_PEEKUSR_AREA, pid, uintptr(unsafe.Pointer(&parea)), 0)
}
func PtraceSetRegs(pid int, regs *PtraceRegs) (err error) {
- return ptrace(PTRACE_SETREGS, pid, 0, uintptr(unsafe.Pointer(regs)))
+ parea := syscall_ptrace_area{
+ 12,
+ 0,
+ uint32(uintptr(unsafe.Pointer(regs))),
+ }
+ return ptrace(syscall_PTRACE_POKEUSR_AREA, pid, uintptr(unsafe.Pointer(&parea)), 0)
}
diff --git a/libgo/go/syscall/syscall_linux_s390x.go b/libgo/go/syscall/syscall_linux_s390x.go
index 44d567983c8..daa094c6f17 100644
--- a/libgo/go/syscall/syscall_linux_s390x.go
+++ b/libgo/go/syscall/syscall_linux_s390x.go
@@ -12,10 +12,29 @@ func (r *PtraceRegs) PC() uint64 { return r.Psw.Addr }
func (r *PtraceRegs) SetPC(pc uint64) { r.Psw.Addr = pc }
-func PtraceGetRegs(pid int, regsout *PtraceRegs) (err error) {
- return ptrace(PTRACE_GETREGS, pid, 0, uintptr(unsafe.Pointer(regsout)))
+const syscall_PTRACE_PEEKUSR_AREA = 0x5000
+const syscall_PTRACE_POKEUSR_AREA = 0x5001
+
+type syscall_ptrace_area struct {
+ len uint32
+ kernel_addr uint64
+ process_addr uint64
+}
+
+func PtraceGetRegs(pid int, regs *PtraceRegs) (err error) {
+ parea := syscall_ptrace_area{
+ 24,
+ 0,
+ uint64(uintptr(unsafe.Pointer(regs))),
+ }
+ return ptrace(syscall_PTRACE_PEEKUSR_AREA, pid, uintptr(unsafe.Pointer(&parea)), 0)
}
func PtraceSetRegs(pid int, regs *PtraceRegs) (err error) {
- return ptrace(PTRACE_SETREGS, pid, 0, uintptr(unsafe.Pointer(regs)))
+ parea := syscall_ptrace_area{
+ 24,
+ 0,
+ uint64(uintptr(unsafe.Pointer(regs))),
+ }
+ return ptrace(syscall_PTRACE_POKEUSR_AREA, pid, uintptr(unsafe.Pointer(&parea)), 0)
}
diff --git a/libgomp/ChangeLog b/libgomp/ChangeLog
index a511c0cb9ae..8a7628c2336 100644
--- a/libgomp/ChangeLog
+++ b/libgomp/ChangeLog
@@ -1,3 +1,39 @@
+2017-10-10 Release Manager
+
+ * GCC 5.5.0 released.
+
+2017-09-16 Jakub Jelinek <jakub@redhat.com>
+
+ Backported from mainline
+ 2017-08-09 Jakub Jelinek <jakub@redhat.com>
+
+ PR c/81687
+ * testsuite/libgomp.c/pr81687-1.c: New test.
+ * testsuite/libgomp.c/pr81687-2.c: New test.
+
+ 2017-07-27 Jakub Jelinek <jakub@redhat.com>
+
+ PR c/45784
+ * testsuite/libgomp.c/pr45784.c: New test.
+ * testsuite/libgomp.c++/pr45784.C: New test.
+
+2017-05-30 Jakub Jelinek <jakub@redhat.com>
+
+ Backported from mainline
+ 2017-04-11 Jakub Jelinek <jakub@redhat.com>
+
+ PR libgomp/80394
+ * testsuite/libgomp.c/pr80394.c: New test.
+
+ 2017-03-30 Jakub Jelinek <jakub@redhat.com>
+
+ * env.c (initialize_env): Initialize stacksize to 0.
+
+ 2016-11-01 Jakub Jelinek <jakub@redhat.com>
+
+ * hashtab.h: Use standard GPLv3 with runtime exception
+ boilerplate.
+
2016-07-07 Jakub Jelinek <jakub@redhat.com>
Backported from mainline
diff --git a/libgomp/env.c b/libgomp/env.c
index 6b5e963c4ea..11d63e8759d 100644
--- a/libgomp/env.c
+++ b/libgomp/env.c
@@ -1178,7 +1178,7 @@ handle_omp_display_env (unsigned long stacksize, int wait_policy)
static void __attribute__((constructor))
initialize_env (void)
{
- unsigned long thread_limit_var, stacksize;
+ unsigned long thread_limit_var, stacksize = 0;
int wait_policy;
/* Do a compile time check that mkomp_h.pl did good job. */
diff --git a/libgomp/hashtab.h b/libgomp/hashtab.h
index 0cc224ddb3b..4af90cd5e0d 100644
--- a/libgomp/hashtab.h
+++ b/libgomp/hashtab.h
@@ -2,19 +2,27 @@
Copyright (C) 1999-2015 Free Software Foundation, Inc.
Contributed by Vladimir Makarov <vmakarov@cygnus.com>.
-This program 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 2 of the License, or
-(at your option) any later version.
-
-This program 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 program; if not, write to the Free Software
-Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
+ This file is part of the GNU Offloading and Multi Processing Library
+ (libgomp).
+
+ Libgomp 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.
+
+ Libgomp 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/>. */
/* The hash table code copied from include/hashtab.[hc] and adjusted,
so that the hash table entries are in the flexible array at the end
diff --git a/libgomp/testsuite/libgomp.c++/pr45784.C b/libgomp/testsuite/libgomp.c++/pr45784.C
new file mode 100644
index 00000000000..306246c754a
--- /dev/null
+++ b/libgomp/testsuite/libgomp.c++/pr45784.C
@@ -0,0 +1,5 @@
+// PR c/45784
+// { dg-do run }
+
+#include "../libgomp.c/pr45784.c"
+
diff --git a/libgomp/testsuite/libgomp.c/pr45784.c b/libgomp/testsuite/libgomp.c/pr45784.c
new file mode 100644
index 00000000000..78612108bf6
--- /dev/null
+++ b/libgomp/testsuite/libgomp.c/pr45784.c
@@ -0,0 +1,41 @@
+/* PR c/45784 */
+/* { dg-do run } */
+
+void
+foo (int n)
+{
+ char *p, vla[2 * n];
+ int i;
+ #pragma omp parallel for
+ for (p = vla; p < vla + (sizeof (vla) / sizeof (vla[0])); p++)
+ *p = ' ';
+ #pragma omp parallel for
+ for (i = 0; i < 2 * n; i++)
+ if (vla[i] != ' ')
+ __builtin_abort ();
+}
+
+void
+bar (int n)
+{
+ char *p, vla1[n], vla2[n * 2], vla3[n * 3], vla4[n * 4];
+ int i;
+ __builtin_memset (vla4, ' ', n * 4);
+ #pragma omp parallel for
+ for (p = vla4 + sizeof (vla1); p < vla4 + sizeof (vla3) - sizeof (vla2) + sizeof (vla1); p += sizeof (vla4) / sizeof (vla4))
+ p[0] = '!';
+ #pragma omp parallel for
+ for (i = 0; i < n * 4; i++)
+ if (vla4[i] != ((i >= n && i < 2 * n) ? '!' : ' '))
+ __builtin_abort ();
+}
+
+int
+main ()
+{
+ volatile int n;
+ n = 128;
+ foo (n);
+ bar (n);
+ return 0;
+}
diff --git a/libgomp/testsuite/libgomp.c/pr80394.c b/libgomp/testsuite/libgomp.c/pr80394.c
new file mode 100644
index 00000000000..6c5a7401851
--- /dev/null
+++ b/libgomp/testsuite/libgomp.c/pr80394.c
@@ -0,0 +1,22 @@
+/* PR libgomp/80394 */
+
+int
+main ()
+{
+ int x = 0;
+ #pragma omp parallel shared(x)
+ #pragma omp single
+ {
+ #pragma omp task depend(inout: x)
+ {
+ for (int i = 0; i < 100000; i++)
+ asm volatile ("" : : : "memory");
+ x += 5;
+ }
+ #pragma omp task if (0) depend(inout: x)
+ ;
+ if (x != 5)
+ __builtin_abort ();
+ }
+ return 0;
+}
diff --git a/libgomp/testsuite/libgomp.c/pr81687-1.c b/libgomp/testsuite/libgomp.c/pr81687-1.c
new file mode 100644
index 00000000000..768ec4484d4
--- /dev/null
+++ b/libgomp/testsuite/libgomp.c/pr81687-1.c
@@ -0,0 +1,23 @@
+/* PR c/81687 */
+/* { dg-do link } */
+/* { dg-additional-options "-O2" } */
+
+extern int printf (const char *, ...);
+
+int
+main ()
+{
+ #pragma omp parallel
+ {
+ lab1:
+ printf ("lab1=%p\n", (void *)(&&lab1));
+ }
+ lab2:
+ #pragma omp parallel
+ {
+ lab3:
+ printf ("lab2=%p\n", (void *)(&&lab2));
+ }
+ printf ("lab3=%p\n", (void *)(&&lab3));
+ return 0;
+}
diff --git a/libgomp/testsuite/libgomp.c/pr81687-2.c b/libgomp/testsuite/libgomp.c/pr81687-2.c
new file mode 100644
index 00000000000..e819f762032
--- /dev/null
+++ b/libgomp/testsuite/libgomp.c/pr81687-2.c
@@ -0,0 +1,27 @@
+/* PR c/81687 */
+/* { dg-do link } */
+/* { dg-additional-options "-O2" } */
+
+int
+main ()
+{
+ __label__ lab4, lab5, lab6;
+ volatile int l = 0;
+ int m = l;
+ void foo (int x) { if (x == 1) goto lab4; }
+ void bar (int x) { if (x == 2) goto lab5; }
+ void baz (int x) { if (x == 3) goto lab6; }
+ #pragma omp parallel
+ {
+ foo (m + 1);
+ lab4:;
+ }
+ #pragma omp task
+ {
+ bar (m + 2);
+ lab5:;
+ }
+ baz (m + 3);
+ lab6:;
+ return 0;
+}
diff --git a/libiberty/ChangeLog b/libiberty/ChangeLog
index 9859ad34458..61fa06cc2ba 100644
--- a/libiberty/ChangeLog
+++ b/libiberty/ChangeLog
@@ -1,3 +1,16 @@
+2017-10-10 Release Manager
+
+ * GCC 5.5.0 released.
+
+2017-05-30 Jakub Jelinek <jakub@redhat.com>
+
+ Backported from mainline
+ 2016-12-13 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/78761
+ * cp-demangle.c (cplus_demangle_type): Demangle Dc as decltype(auto).
+ * testsuite/demangle-expected: Add test for decltype(auto).
+
2016-06-03 Release Manager
* GCC 5.4.0 released.
diff --git a/libiberty/cp-demangle.c b/libiberty/cp-demangle.c
index aef2e9b3292..75e09b44ace 100644
--- a/libiberty/cp-demangle.c
+++ b/libiberty/cp-demangle.c
@@ -2519,7 +2519,11 @@ cplus_demangle_type (struct d_info *di)
/* auto */
ret = d_make_name (di, "auto", 4);
break;
-
+ case 'c':
+ /* decltype(auto) */
+ ret = d_make_name (di, "decltype(auto)", 14);
+ break;
+
case 'f':
/* 32-bit decimal floating point */
ret = d_make_builtin_type (di, &cplus_demangle_builtin_types[26]);
diff --git a/libiberty/testsuite/demangle-expected b/libiberty/testsuite/demangle-expected
index 1d8b771579d..17cab61a205 100644
--- a/libiberty/testsuite/demangle-expected
+++ b/libiberty/testsuite/demangle-expected
@@ -4085,6 +4085,9 @@ decltype (new auto({parm#1})) f<int>(int)
_Z1fIiERDaRKT_S1_
auto& f<int>(int const&, int)
--format=gnu-v3
+_Z1gIiEDcRKT_S0_
+decltype(auto) g<int>(int const&, int)
+--format=gnu-v3
_Z1gILi1EEvR1AIXT_EER1BIXscbT_EE
void g<1>(A<1>&, B<static_cast<bool>(1)>&)
--format=gnu-v3
diff --git a/libitm/ChangeLog b/libitm/ChangeLog
index 213d243e11a..fe13882413c 100644
--- a/libitm/ChangeLog
+++ b/libitm/ChangeLog
@@ -1,3 +1,7 @@
+2017-10-10 Release Manager
+
+ * GCC 5.5.0 released.
+
2016-06-03 Release Manager
* GCC 5.4.0 released.
diff --git a/libjava/ChangeLog b/libjava/ChangeLog
index 5d360b5e4d3..4c503603972 100644
--- a/libjava/ChangeLog
+++ b/libjava/ChangeLog
@@ -1,3 +1,14 @@
+2017-10-10 Release Manager
+
+ * GCC 5.5.0 released.
+
+2017-09-07 Matthias Klose <doko@ubuntu.com>
+
+ * include/x86_64-signal.h (HANDLE_DIVIDE_OVERFLOW): Replace
+ 'struct ucontext' with ucontext_t.
+ * include/i386-signal.h (HANDLE_DIVIDE_OVERFLOW): Likewise.
+ * include/s390-signal.h (HANDLE_DIVIDE_OVERFLOW): Likewise.
+
2016-06-03 Release Manager
* GCC 5.4.0 released.
diff --git a/libjava/classpath/ChangeLog b/libjava/classpath/ChangeLog
index c5ef1ff5177..d41ccd23c1b 100644
--- a/libjava/classpath/ChangeLog
+++ b/libjava/classpath/ChangeLog
@@ -1,3 +1,7 @@
+2017-10-10 Release Manager
+
+ * GCC 5.5.0 released.
+
2016-06-03 Release Manager
* GCC 5.4.0 released.
diff --git a/libjava/include/i386-signal.h b/libjava/include/i386-signal.h
index c2409b0e301..ef77e7e99ae 100644
--- a/libjava/include/i386-signal.h
+++ b/libjava/include/i386-signal.h
@@ -29,7 +29,7 @@ static void _Jv_##_name (int, siginfo_t *, \
#define HANDLE_DIVIDE_OVERFLOW \
do \
{ \
- struct ucontext *_uc = (struct ucontext *)_p; \
+ ucontext_t *_uc = (ucontext_t *)_p; \
gregset_t &_gregs = _uc->uc_mcontext.gregs; \
unsigned char *_eip = (unsigned char *)_gregs[REG_EIP]; \
\
diff --git a/libjava/include/s390-signal.h b/libjava/include/s390-signal.h
index 4ca4c108864..9261b52be6e 100644
--- a/libjava/include/s390-signal.h
+++ b/libjava/include/s390-signal.h
@@ -51,7 +51,7 @@ do \
struct \
{ \
unsigned long int uc_flags; \
- struct ucontext *uc_link; \
+ ucontext_t *uc_link; \
stack_t uc_stack; \
mcontext_t uc_mcontext; \
unsigned long sigmask[2]; \
diff --git a/libjava/include/x86_64-signal.h b/libjava/include/x86_64-signal.h
index 12383b5485a..e36c5a32a64 100644
--- a/libjava/include/x86_64-signal.h
+++ b/libjava/include/x86_64-signal.h
@@ -28,7 +28,7 @@ static void _Jv_##_name (int, siginfo_t *, \
#define HANDLE_DIVIDE_OVERFLOW \
do \
{ \
- struct ucontext *_uc = (struct ucontext *)_p; \
+ ucontext_t *_uc = (ucontext_t *)_p; \
gregset_t &_gregs = _uc->uc_mcontext.gregs; \
unsigned char *_rip = (unsigned char *)_gregs[REG_RIP]; \
\
diff --git a/libjava/libltdl/ChangeLog b/libjava/libltdl/ChangeLog
index b3a273fc9af..0b8319e0eb7 100644
--- a/libjava/libltdl/ChangeLog
+++ b/libjava/libltdl/ChangeLog
@@ -1,3 +1,7 @@
+2017-10-10 Release Manager
+
+ * GCC 5.5.0 released.
+
2016-06-03 Release Manager
* GCC 5.4.0 released.
diff --git a/libmpx/ChangeLog b/libmpx/ChangeLog
index a0f7de29242..46d8ede8b9d 100644
--- a/libmpx/ChangeLog
+++ b/libmpx/ChangeLog
@@ -1,3 +1,7 @@
+2017-10-10 Release Manager
+
+ * GCC 5.5.0 released.
+
2016-06-03 Release Manager
* GCC 5.4.0 released.
diff --git a/libobjc/ChangeLog b/libobjc/ChangeLog
index 246a63001d0..377c30b0016 100644
--- a/libobjc/ChangeLog
+++ b/libobjc/ChangeLog
@@ -1,3 +1,7 @@
+2017-10-10 Release Manager
+
+ * GCC 5.5.0 released.
+
2016-06-03 Release Manager
* GCC 5.4.0 released.
diff --git a/liboffloadmic/ChangeLog b/liboffloadmic/ChangeLog
index f79ba9d8b56..312ea54875e 100644
--- a/liboffloadmic/ChangeLog
+++ b/liboffloadmic/ChangeLog
@@ -1,3 +1,7 @@
+2017-10-10 Release Manager
+
+ * GCC 5.5.0 released.
+
2016-06-03 Release Manager
* GCC 5.4.0 released.
diff --git a/libquadmath/ChangeLog b/libquadmath/ChangeLog
index 45a160998b7..ba1189d9009 100644
--- a/libquadmath/ChangeLog
+++ b/libquadmath/ChangeLog
@@ -1,3 +1,12 @@
+2017-10-10 Release Manager
+
+ * GCC 5.5.0 released.
+
+2017-09-16 Jakub Jelinek <jakub@redhat.com>
+
+ PR libquadmath/65757
+ * math/roundq.c: Cherry-pick upstream glibc 2015-04-28 change.
+
2016-06-03 Release Manager
* GCC 5.4.0 released.
diff --git a/libquadmath/math/roundq.c b/libquadmath/math/roundq.c
index 7c9d640e933..adcb94a8faf 100644
--- a/libquadmath/math/roundq.c
+++ b/libquadmath/math/roundq.c
@@ -1,5 +1,5 @@
/* Round __float128 to integer away from zero.
- Copyright (C) 1997, 1999 Free Software Foundation, Inc.
+ Copyright (C) 1997-2017 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997 and
Jakub Jelinek <jj@ultra.linux.cz>, 1999.
@@ -32,7 +32,7 @@ roundq (__float128 x)
GET_FLT128_WORDS64 (i0, i1, x);
j0 = ((i0 >> 48) & 0x7fff) - 0x3fff;
- if (j0 < 31)
+ if (j0 < 48)
{
if (j0 < 0)
{
diff --git a/libsanitizer/ChangeLog b/libsanitizer/ChangeLog
index 00af6a47885..964891bf42a 100644
--- a/libsanitizer/ChangeLog
+++ b/libsanitizer/ChangeLog
@@ -1,3 +1,55 @@
+2017-10-10 Release Manager
+
+ * GCC 5.5.0 released.
+
+2017-09-07 Matthias Klose <doko@ubuntu.com>
+
+ * asan/asan_linux.cc: Include <signal.h>
+
+2017-09-07 Matthias Klose <doko@ubuntu.com>
+
+ Backported from mainline
+ 2017-07-14 Jakub Jelinek <jakub@redhat.com>
+
+ PR sanitizer/81066
+ * sanitizer_common/sanitizer_linux.h: Cherry-pick upstream r307969.
+ * sanitizer_common/sanitizer_linux.cc: Likewise.
+ * sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cc: Likewise.
+ * tsan/tsan_platform_linux.cc: Likewise.
+
+2017-06-29 Eric Botcazou <ebotcazou@adacore.com>
+
+ Backport from mainline
+ 2017-01-10 James Clarke <jrtc27@jrtc27.com>
+
+ PR sanitizer/78992
+ * sanitizer_common/sanitizer_platform_limits_posix.h
+ (struct __sanitizer_sigaction): Cherry-pick upstream r291561.
+
+ 2016-11-30 Maxim Ostapenko <m.ostapenko@samsung.com>
+
+ PR sanitizer/78532
+ * sanitizer_common/sanitizer_platform_limits_posix.h
+ (__sanitizer_sigaction): Adjust for sparc targets and various Glibc
+ versions.
+
+2017-05-30 Jakub Jelinek <jakub@redhat.com>
+
+ Backported from mainline
+ 2016-09-05 Jakub Jelinek <jakub@redhat.com>
+
+ PR sanitizer/77396
+ * asan/asan_globals.cc: Cherry-pick upstream r280657.
+
+2017-05-29 Martin Liska <mliska@suse.cz>
+
+ Backport from mainline
+ 2017-04-06 Martin Liska <mliska@suse.cz>
+
+ PR sanitizer/80166
+ * sanitizer_common/sanitizer_common_interceptors.inc (INTERCEPTOR):
+ Cherry-pick upstream r299036.
+
2017-02-17 Andreas Tobler <andreast@gcc.gnu.org>
Backported from mainline
diff --git a/libsanitizer/asan/asan_globals.cc b/libsanitizer/asan/asan_globals.cc
index 4bb88cfa001..be128ea5235 100644
--- a/libsanitizer/asan/asan_globals.cc
+++ b/libsanitizer/asan/asan_globals.cc
@@ -249,10 +249,10 @@ void __asan_unregister_globals(__asan_global *globals, uptr n) {
// initializer can only touch global variables in the same TU.
void __asan_before_dynamic_init(const char *module_name) {
if (!flags()->check_initialization_order ||
- !flags()->poison_heap)
+ !flags()->poison_heap ||
+ !dynamic_init_globals)
return;
bool strict_init_order = flags()->strict_init_order;
- CHECK(dynamic_init_globals);
CHECK(module_name);
CHECK(asan_inited);
BlockingMutexLock lock(&mu_for_globals);
@@ -275,7 +275,8 @@ void __asan_before_dynamic_init(const char *module_name) {
// TU are poisoned. It simply unpoisons all dynamically initialized globals.
void __asan_after_dynamic_init() {
if (!flags()->check_initialization_order ||
- !flags()->poison_heap)
+ !flags()->poison_heap ||
+ !dynamic_init_globals)
return;
CHECK(asan_inited);
BlockingMutexLock lock(&mu_for_globals);
diff --git a/libsanitizer/asan/asan_linux.cc b/libsanitizer/asan/asan_linux.cc
index c504168b614..59087b94009 100644
--- a/libsanitizer/asan/asan_linux.cc
+++ b/libsanitizer/asan/asan_linux.cc
@@ -29,6 +29,7 @@
#include <dlfcn.h>
#include <fcntl.h>
#include <pthread.h>
+#include <signal.h>
#include <stdio.h>
#include <unistd.h>
#include <unwind.h>
diff --git a/libsanitizer/sanitizer_common/sanitizer_common_interceptors.inc b/libsanitizer/sanitizer_common/sanitizer_common_interceptors.inc
index 10f321838e8..5a30498ff05 100644
--- a/libsanitizer/sanitizer_common/sanitizer_common_interceptors.inc
+++ b/libsanitizer/sanitizer_common/sanitizer_common_interceptors.inc
@@ -2733,7 +2733,8 @@ INTERCEPTOR(int, getgroups, int size, u32 *lst) {
// its metadata. See
// https://code.google.com/p/address-sanitizer/issues/detail?id=321.
int res = REAL(getgroups)(size, lst);
- if (res && lst) COMMON_INTERCEPTOR_WRITE_RANGE(ctx, lst, res * sizeof(*lst));
+ if (res >= 0 && lst && size > 0)
+ COMMON_INTERCEPTOR_WRITE_RANGE(ctx, lst, res * sizeof(*lst));
return res;
}
#define INIT_GETGROUPS COMMON_INTERCEPT_FUNCTION(getgroups);
diff --git a/libsanitizer/sanitizer_common/sanitizer_linux.cc b/libsanitizer/sanitizer_common/sanitizer_linux.cc
index 9feb307db9f..821b26d82d5 100644
--- a/libsanitizer/sanitizer_common/sanitizer_linux.cc
+++ b/libsanitizer/sanitizer_common/sanitizer_linux.cc
@@ -514,8 +514,7 @@ uptr internal_prctl(int option, uptr arg2, uptr arg3, uptr arg4, uptr arg5) {
}
#endif
-uptr internal_sigaltstack(const struct sigaltstack *ss,
- struct sigaltstack *oss) {
+uptr internal_sigaltstack(const void *ss, void *oss) {
return internal_syscall(SYSCALL(sigaltstack), (uptr)ss, (uptr)oss);
}
diff --git a/libsanitizer/sanitizer_common/sanitizer_linux.h b/libsanitizer/sanitizer_common/sanitizer_linux.h
index 086834c3a2f..3a6f4cdb8e6 100644
--- a/libsanitizer/sanitizer_common/sanitizer_linux.h
+++ b/libsanitizer/sanitizer_common/sanitizer_linux.h
@@ -18,7 +18,6 @@
#include "sanitizer_platform_limits_posix.h"
struct link_map; // Opaque type returned by dlopen().
-struct sigaltstack;
namespace __sanitizer {
// Dirent structure for getdents(). Note that this structure is different from
@@ -27,8 +26,7 @@ struct linux_dirent;
// Syscall wrappers.
uptr internal_getdents(fd_t fd, struct linux_dirent *dirp, unsigned int count);
-uptr internal_sigaltstack(const struct sigaltstack* ss,
- struct sigaltstack* oss);
+uptr internal_sigaltstack(const void* ss, void* oss);
uptr internal_sigprocmask(int how, __sanitizer_sigset_t *set,
__sanitizer_sigset_t *oldset);
void internal_sigfillset(__sanitizer_sigset_t *set);
diff --git a/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.h b/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.h
index 657cd85264e..60867ff185b 100644
--- a/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.h
+++ b/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.h
@@ -16,6 +16,10 @@
#include "sanitizer_internal_defs.h"
#include "sanitizer_platform.h"
+#ifndef __GLIBC_PREREQ
+#define __GLIBC_PREREQ(x, y) 0
+#endif
+
namespace __sanitizer {
extern unsigned struct_utsname_sz;
extern unsigned struct_stat_sz;
@@ -565,7 +569,17 @@ namespace __sanitizer {
__sanitizer_sigset_t sa_mask;
#ifndef __mips__
#if defined(__sparc__)
+#if __GLIBC_PREREQ (2, 20)
+ // On sparc glibc 2.19 and earlier sa_flags was unsigned long.
+#if defined(__arch64__)
+ // To maintain ABI compatibility on sparc64 when switching to an int,
+ // __glibc_reserved0 was added.
+ int __glibc_reserved0;
+#endif
+ int sa_flags;
+#else
unsigned long sa_flags;
+#endif
#else
int sa_flags;
#endif
diff --git a/libsanitizer/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cc b/libsanitizer/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cc
index 58812023674..c54894ddc29 100644
--- a/libsanitizer/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cc
+++ b/libsanitizer/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cc
@@ -234,7 +234,7 @@ static int TracerThread(void* argument) {
// Alternate stack for signal handling.
InternalScopedBuffer<char> handler_stack_memory(kHandlerStackSize);
- struct sigaltstack handler_stack;
+ stack_t handler_stack;
internal_memset(&handler_stack, 0, sizeof(handler_stack));
handler_stack.ss_sp = handler_stack_memory.data();
handler_stack.ss_size = kHandlerStackSize;
diff --git a/libsanitizer/tsan/tsan_platform_linux.cc b/libsanitizer/tsan/tsan_platform_linux.cc
index 32591316ea2..b8e9078d062 100644
--- a/libsanitizer/tsan/tsan_platform_linux.cc
+++ b/libsanitizer/tsan/tsan_platform_linux.cc
@@ -377,7 +377,7 @@ bool IsGlobalVar(uptr addr) {
int ExtractResolvFDs(void *state, int *fds, int nfd) {
#if SANITIZER_LINUX
int cnt = 0;
- __res_state *statp = (__res_state*)state;
+ struct __res_state *statp = (struct __res_state*)state;
for (int i = 0; i < MAXNS && cnt < nfd; i++) {
if (statp->_u._ext.nsaddrs[i] && statp->_u._ext.nssocks[i] != -1)
fds[cnt++] = statp->_u._ext.nssocks[i];
diff --git a/libssp/ChangeLog b/libssp/ChangeLog
index 69d96c98761..bacec5dc2af 100644
--- a/libssp/ChangeLog
+++ b/libssp/ChangeLog
@@ -1,3 +1,7 @@
+2017-10-10 Release Manager
+
+ * GCC 5.5.0 released.
+
2016-06-03 Release Manager
* GCC 5.4.0 released.
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog
index 537100e59f9..79e977d5da1 100644
--- a/libstdc++-v3/ChangeLog
+++ b/libstdc++-v3/ChangeLog
@@ -1,3 +1,307 @@
+2017-10-10 Release Manager
+
+ * GCC 5.5.0 released.
+
+2017-09-13 Jonathan Wakely <jwakely@redhat.com>
+
+ * testsuite/20_util/reference_wrapper/80504.cc: Do not use invalid
+ effective-target.
+ * testsuite/22_locale/conversions/buffer/2.cc: Likewise.
+ * testsuite/28_regex/basic_regex/ctors/basic/iter.cc: Likewise. Fix
+ use of test_container.
+
+ PR libstdc++/81468
+ * include/std/chrono (time_point(const time_point<_Dur2>&)): Add
+ missing constraint from LWG DR 1177.
+ * testsuite/20_util/duration/cons/dr1177.cc: New.
+ * testsuite/20_util/time_point/cons/81468.cc: New.
+ * testsuite/20_util/duration/literals/range.cc: Update dg-error line.
+
+ * doc/doxygen/mainpage.html: Fix broken URLs.
+
+ PR libstdc++/81835
+ * doc/xml/manual/extensions.xml: Replace unstable URL.
+ * doc/html/manual/ext_demangling.html: Regenerate.
+ * libsupc++/cxxabi.h (__cxa_demangle): Fix broken URL.
+
+2017-09-04 Jonathan Wakely <jwakely@redhat.com>
+
+ Backport from mainline
+ 2017-08-09 Jonathan Wakely <jwakely@redhat.com>
+
+ PR libstdc++/79820
+ PR libstdc++/81751
+ * config/io/basic_file_stdio.cc (sys_open(FILE*, ios_base::openmode)):
+ Call fflush on the stream instead of calling sync() while _M_cfile is
+ null. Restore original value of errno.
+ * testsuite/ext/stdio_filebuf/char/79820.cc: New.
+ * testsuite/ext/stdio_filebuf/char/81751.cc: New.
+
+ Backport from mainline
+ 2017-07-25 Jonathan Wakely <jwakely@redhat.com>
+
+ PR libstdc++/53984
+ * include/bits/basic_ios.h (basic_ios::_M_setstate): Adjust comment.
+ * include/bits/istream.tcc (basic_istream::sentry): Handle exceptions
+ during construction.
+ * include/std/istream: Adjust comments for formatted input functions
+ and unformatted input functions.
+ * testsuite/27_io/basic_fstream/53984.cc: New.
+ * testsuite/27_io/basic_istream/sentry/char/53984.cc: New.
+
+ Backport from mainline
+ 2017-06-08 Jonathan Wakely <jwakely@redhat.com>
+
+ PR libstdc++/81017
+ * include/std/functional (function::function(function&&))
+ (function::operator=(function&&)): Add noexcept.
+ * testsuite/20_util/function/assign/move.cc: Check for noexcept.
+ * testsuite/20_util/function/cons/move.cc: Likewise.
+
+ Backport from mainline
+ 2017-06-05 Jonathan Wakely <jwakely@redhat.com>
+
+ * include/bits/shared_ptr_base.h (__shared_ptr::owner_before)
+ (__weak_ptr::owner_before, _Sp_owner_less::operator()): Add noexcept
+ specifiers as per LWG 2873 and LWG 2942.
+ * testsuite/20_util/owner_less/noexcept.cc: New.
+ * testsuite/20_util/shared_ptr/observers/owner_before.cc: Test
+ noexcept guarantees.
+ * testsuite/20_util/weak_ptr/observers/owner_before.cc: Likewise.
+
+ Backport from mainline
+ 2017-08-31 Jonathan Wakely <jwakely@redhat.com>
+
+ PR c++/82039
+ * include/ext/new_allocator.h (__gnu_cxx::new_allocator::allocate):
+ Adjust null pointer constant to avoid warning.
+
+ Backport from mainline
+ 2017-08-18 Jonathan Wakely <jwakely@redhat.com>
+
+ PR libstdc++/81891
+ * include/bits/hashtable.h (_Hashtable(_InputIterator, _InputIterator,
+ size_type, const _H1&, const _H2&, const _Hash&, const _Equal&,
+ const _ExtractKey&, const allocator_type&)): Let destructor do clean
+ up if an exception is thrown.
+ * testsuite/23_containers/unordered_map/cons/81891.cc: New.
+
+ Backport from mainline
+ 2017-07-31 Marek Polacek <polacek@redhat.com>
+
+ PR libstdc++/81599
+ * include/bits/stl_stack.h: Fix typo.
+
+ Backport from mainline
+ 2017-07-10 Jonathan Wakely <jwakely@redhat.com>
+
+ PR libstdc++/81338
+ * include/bits/basic_string.h [_GLIBCXX_USE_CXX11_ABI] (basic_string):
+ Declare basic_stringbuf to be a friend.
+ * include/bits/sstream.tcc (basic_stringbuf::overflow)
+ [_GLIBCXX_USE_CXX11_ABI]: Use unused capacity before reallocating.
+ * include/std/sstream (basic_stringbuf::__xfer_bufptrs): Update string
+ length to buffer length.
+ * testsuite/27_io/basic_stringstream/assign/81338.cc: New.
+
+2017-09-01 Jonathan Wakely <jwakely@redhat.com>
+
+ Backport from mainline
+ 2016-10-06 Jonathan Wakely <jwakely@redhat.com>
+
+ * doc/xml/manual/status_cxx2011.xml: Update status.
+ * doc/html/manual/status.html: Regenerate.
+ * include/std/scoped_allocator (__outer_allocator_t, __outermost_type):
+ New helpers for recursive OUTERMOST.
+ (__outermost): Use __outermost_type::_S_outermost.
+ (__do_outermost, scoped_allocator_adaptor::__outermost_type): Remove.
+ (scoped_allocator_adaptor::__outermost_alloc_traits): Use new
+ __outermost_type helper.
+ (scoped_allocator_adaptor::_Constructible): New alias template.
+ (scoped_allocator_adaptor::scoped_allocator_adaptor<_Outer2>):
+ Constrain template constructors.
+ * testsuite/20_util/scoped_allocator/3.cc: New test.
+ * testsuite/20_util/scoped_allocator/outermost.cc: New test.
+
+2017-06-16 Jonathan Wakely <jwakely@redhat.com>
+
+ * include/bits/locale_conv.h (wbuffer_convert::sync): Fix condition.
+ * testsuite/22_locale/conversions/buffer/2.cc: New.
+
+ * doc/xml/manual/appendix_contributing.xml: Link to the list of bad
+ names, and link to the test docs and note higher DejaGnu version
+ requirement.
+ * doc/xml/manual/allocator.xml: Fix ViewCVS URLs.
+ * doc/xml/manual/mt_allocator.xml: Likewise.
+ * doc/html/*: Regenerate.
+
+ * include/bits/locale_conv.h (wbuffer_convert::_M_put): Add missing
+ return statement.
+
+2017-06-07 Jonathan Wakely <jwakely@redhat.com>
+
+ PR libstdc++/81002
+ * include/bits/regex_compiler.h (__compile_nfa): Add template argument
+ list to specify traits type.
+ * testsuite/28_regex/basic_regex/ctors/basic/iter.cc: New.
+
+2017-05-18 Jonathan Wakely <jwakely@redhat.com>
+
+ * testsuite/22_locale/codecvt/codecvt_utf16/79980.cc: Replace
+ effective-target with dg-options directive.
+ * testsuite/22_locale/codecvt/codecvt_utf16/80041.cc: Likewise.
+ * testsuite/22_locale/codecvt/codecvt_utf16/members.cc: Likewise.
+ * testsuite/22_locale/codecvt/codecvt_utf16/misaligned.cc: Likewise.
+ * testsuite/22_locale/codecvt/codecvt_utf8/79980.cc: Likewise.
+ * testsuite/22_locale/codecvt/codecvt_utf8/members.cc: Likewise.
+ * testsuite/22_locale/codecvt/codecvt_utf8_utf16/79511.cc: Likewise.
+ * testsuite/22_locale/codecvt/codecvt_utf8_utf16/members.cc: Likewise.
+
+ Backport from mainline
+ 2016-08-02 Jonathan Wakely <jwakely@redhat.com>
+
+ * testsuite/18_support/bad_exception/23591_thread-1.c: Skip test if
+ options are present that aren't valid for C.
+ * testsuite/abi/header_cxxabi.c: Likewise.
+
+ Backport from mainline
+ 2017-04-24 Jonathan Wakely <jwakely@redhat.com>
+
+ PR libstdc++/80504
+ * include/std/functional (ref, cref): Qualify calls.
+ * testsuite/20_util/reference_wrapper/80504.cc: New test.
+
+ Backport from mainline
+ 2017-04-19 Jonathan Wakely <jwakely@redhat.com>
+
+ PR libstdc++/80448
+ * include/experimental/bits/fs_dir.h (directory_iterator)
+ (recursive_directory_iterator): Remove noexcept from defaulted
+ constructors.
+
+ Backport from mainline
+ 2017-04-03 Jonathan Wakely <jwakely@redhat.com>
+
+ * testsuite/20_util/reference_wrapper/invoke.cc: Uncomment tests
+ that no longer fail.
+
+ Backport from mainline
+ 2017-04-03 Jonathan Wakely <jwakely@redhat.com>
+
+ * include/bits/ios_base.h: Correct comment.
+ * testsuite/util/testsuite_hooks.h: Likewise.
+
+ Backport from mainline
+ 2017-03-16 Jonathan Wakely <jwakely@redhat.com>
+
+ PR libstdc++/67440
+ * python/libstdcxx/v6/printers.py (find_type): Avoid gdb.Type.name
+ for GDB 7.6 compatibility, use gdb.Type.unqualified instead.
+
+ Backport from mainline
+ 2017-01-17 Jonathan Wakely <jwakely@redhat.com>
+
+ PR libstdc++/69699
+ * doc/xml/manual/abi.xml (abi.versioning.history): Explain why the
+ _GLIBCXX__ macro is not useful. Remove redundant date information
+ and link to the GCC release timeline.
+ (abi.versioning.active): Move partial sentence into the previous
+ paragraph.
+ * doc/html/*: Regenerate.
+
+ Backport from mainline
+ 2016-12-21 Jonathan Wakely <jwakely@redhat.com>
+
+ PR libstdc++/71444
+ * config/os/mingw32-w64/error_constants.h
+ (address_family_not_supported, address_in_use, address_not_available)
+ (already_connected, connection_aborted, connection_already_in_progress)
+ connection_refused, connection_reset, cross_device_link)
+ (destination_address_required, host_unreachable, message_size)
+ (network_down, network_reset, network_unreachable, no_buffer_space)
+ (no_protocol_option, not_a_socket, not_connected, operation_canceled)
+ (operation_in_progress, operation_not_supported, protocol_error)
+ (protocol_not_supported, too_many_links, too_many_symbolic_link_levels)
+ (value_too_large, wrong_protocol_type): Define.
+ (bad_message, identifier_removed, no_link, no_message_available)
+ (no_message, no_stream_resources, not_a_stream, owner_dead)
+ (state_not_recoverable, stream_timeout, text_file_busy): Define
+ conditionally.
+ * testsuite/19_diagnostics/headers/system_error/errc_std_c++0x.cc:
+ Guard test for no_message with _GLIBCXX_HAVE_ENOMSG.
+
+ Backport from mainline
+ 2016-11-09 Tim Shen <timshen@google.com>
+
+ PR libstdc++/78236
+ * libstdc++-v3/include/bits/regex.h (regex_iterator::regex_iterator()):
+ Define end() as _M_pregex == nullptr.
+ * libstdc++-v3/include/bits/regex.tcc (regex_iterator::operator==(),
+ regex_iterator::operator++()): Fix operator==() and operator++() to
+ look at null-ness of _M_pregex on both sides.
+ * testsuite/28_regex/regression.cc: New testcase.
+
+ Backport from mainline
+ 2016-12-15 Jonathan Wakely <jwakely@redhat.com>
+
+ PR libstdc++/59170
+ * python/libstdcxx/v6/printers.py (StdListIteratorPrinter.to_string)
+ (StdSlistIteratorPrinter.to_string, StdVectorIteratorPrinter.to_string)
+ (StdRbtreeIteratorPrinter.to_string)
+ (StdDequeIteratorPrinter.to_string): Add check for value-initialized
+ iterators.
+ * testsuite/libstdc++-prettyprinters/simple.cc: Test them.
+ * testsuite/libstdc++-prettyprinters/simple11.cc: Likewise.
+
+ Backport from mainline
+ 2016-12-15 Jonathan Wakely <jwakely@redhat.com>
+
+ PR libstdc++/59161
+ * python/libstdcxx/v6/printers.py (StdListIteratorPrinter.to_string)
+ (StdSlistIteratorPrinter.to_string, StdVectorIteratorPrinter.to_string)
+ (StdRbtreeIteratorPrinter.to_string, StdDequeIteratorPrinter.to_string)
+ (StdDebugIteratorPrinter.to_string): Return string instead of
+ gdb.Value.
+ * testsuite/libstdc++-prettyprinters/59161.cc: New test.
+
+ Backport from mainline
+ 2016-10-11 Jonathan Wakely <jwakely@redhat.com>
+
+ * python/libstdcxx/v6/printers.py (build_libstdcxx_dictionary):
+ Register printer for std::__cxx11::list.
+ * python/libstdcxx/v6/xmethods.py (ListMethodsMatcher.match): Match
+ std::__cxx11::list as well as std::list.
+
+2017-05-17 Jonathan Wakely <jwakely@redhat.com>
+
+ Backport from mainline
+ 2017-03-15  Xi Ruoyao  <ryxi@stu.xidian.edu.cn>
+
+ PR libstdc++/62045
+ * include/ext/pb_ds/detail/binary_heap_/binary_heap_.hpp
+ (is_heap): Remove.
+ (push_heap): Remove the wrong checking using is_heap.
+ (make_heap): Remove the assertion using is_heap.
+ * include/ext/pb_ds/detail/binary_heap_/insert_fn_imps.hpp
+ (modify): Ditto.
+ (resize_for_insert_if_needed): Add PB_DS_ASSERT_VALID after
+ calling make_heap.
+
+ Backport from mainline
+ 2017-03-15 Jonathan Wakely <jwakely@redhat.com>
+
+ PR libstdc++/62045
+ * testsuite/ext/pb_ds/regression/priority_queue_binary_heap-62045.cc:
+ New test.
+ * testsuite/ext/pb_ds/regression/priority_queues.cc: Fix copy&paste
+ error in comment.
+
+ Backport from mainline
+ 2015-11-17 Jonathan Wakely <jwakely@redhat.com>
+
+ PR libstdc++/66059
+ * include/std/utility (_Build_index_tuple): Optimise.
+
2017-03-17 Jonathan Wakely <jwakely@redhat.com>
Backport from mainline
diff --git a/libstdc++-v3/config/io/basic_file_stdio.cc b/libstdc++-v3/config/io/basic_file_stdio.cc
index 313a12e2193..f13e05f8633 100644
--- a/libstdc++-v3/config/io/basic_file_stdio.cc
+++ b/libstdc++-v3/config/io/basic_file_stdio.cc
@@ -195,11 +195,13 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
__basic_file* __ret = NULL;
if (!this->is_open() && __file)
{
- int __err;
- errno = 0;
+ int __err, __save_errno = errno;
+ // POSIX guarantees that fflush sets errno on error, but C doesn't.
+ errno = 0;
do
- __err = this->sync();
+ __err = fflush(__file);
while (__err && errno == EINTR);
+ errno = __save_errno;
if (!__err)
{
_M_cfile = __file;
diff --git a/libstdc++-v3/config/os/mingw32-w64/error_constants.h b/libstdc++-v3/config/os/mingw32-w64/error_constants.h
index 0168b5fdb89..d6a6c33127c 100644
--- a/libstdc++-v3/config/os/mingw32-w64/error_constants.h
+++ b/libstdc++-v3/config/os/mingw32-w64/error_constants.h
@@ -41,22 +41,24 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
// replaced by Winsock WSA-prefixed equivalents.
enum class errc
{
-// address_family_not_supported = EAFNOSUPPORT,
-// address_in_use = EADDRINUSE,
-// address_not_available = EADDRNOTAVAIL,
-// already_connected = EISCONN,
+ address_family_not_supported = EAFNOSUPPORT,
+ address_in_use = EADDRINUSE,
+ address_not_available = EADDRNOTAVAIL,
+ already_connected = EISCONN,
argument_list_too_long = E2BIG,
argument_out_of_domain = EDOM,
bad_address = EFAULT,
bad_file_descriptor = EBADF,
-// bad_message = EBADMSG,
+#ifdef _GLIBCXX_HAVE_EBADMSG
+ bad_message = EBADMSG,
+#endif
broken_pipe = EPIPE,
-// connection_aborted = ECONNABORTED,
-// connection_already_in_progress = EALREADY,
-// connection_refused = ECONNREFUSED,
-// connection_reset = ECONNRESET,
-// cross_device_link = EXDEV,
-// destination_address_required = EDESTADDRREQ,
+ connection_aborted = ECONNABORTED,
+ connection_already_in_progress = EALREADY,
+ connection_refused = ECONNREFUSED,
+ connection_reset = ECONNRESET,
+ cross_device_link = EXDEV,
+ destination_address_required = EDESTADDRREQ,
device_or_resource_busy = EBUSY,
directory_not_empty = ENOTEMPTY,
executable_format_error = ENOEXEC,
@@ -64,8 +66,10 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
file_too_large = EFBIG,
filename_too_long = ENAMETOOLONG,
function_not_supported = ENOSYS,
-// host_unreachable = EHOSTUNREACH,
-// identifier_removed = EIDRM,
+ host_unreachable = EHOSTUNREACH,
+#ifdef _GLIBCXX_HAVE_EIDRM
+ identifier_removed = EIDRM,
+#endif
illegal_byte_sequence = EILSEQ,
inappropriate_io_control_operation = ENOTTY,
interrupted = EINTR,
@@ -73,67 +77,84 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
invalid_seek = ESPIPE,
io_error = EIO,
is_a_directory = EISDIR,
-// message_size = EMSGSIZE,
-// network_down = ENETDOWN,
-// network_reset = ENETRESET,
-// network_unreachable = ENETUNREACH,
-// no_buffer_space = ENOBUFS,
+ message_size = EMSGSIZE,
+ network_down = ENETDOWN,
+ network_reset = ENETRESET,
+ network_unreachable = ENETUNREACH,
+ no_buffer_space = ENOBUFS,
#ifdef _GLIBCXX_HAVE_ECHILD
no_child_process = ECHILD,
#endif
-// no_link = ENOLINK,
+#ifdef _GLIBCXX_HAVE_ENOLINK
+ no_link = ENOLINK,
+#endif
no_lock_available = ENOLCK,
-// no_message_available = ENODATA,
-// no_message = ENOMSG,
-// no_protocol_option = ENOPROTOOPT,
+#ifdef _GLIBCXX_HAVE_ENODATA
+ no_message_available = ENODATA,
+#endif
+#ifdef _GLIBCXX_HAVE_ENOMSG
+ no_message = ENOMSG,
+#endif
+ no_protocol_option = ENOPROTOOPT,
#ifdef _GLIBCXX_HAVE_ENOSPC
no_space_on_device = ENOSPC,
#endif
-// no_stream_resources = ENOSR,
+#ifdef _GLIBCXX_HAVE_ENOSR
+ no_stream_resources = ENOSR,
+#endif
no_such_device_or_address = ENXIO,
no_such_device = ENODEV,
no_such_file_or_directory = ENOENT,
no_such_process = ESRCH,
not_a_directory = ENOTDIR,
-// not_a_socket = ENOTSOCK,
-// not_a_stream = ENOSTR,
-// not_connected = ENOTCONN,
+ not_a_socket = ENOTSOCK,
+#ifdef _GLIBCXX_HAVE_ENOSTR
+ not_a_stream = ENOSTR,
+#endif
+ not_connected = ENOTCONN,
not_enough_memory = ENOMEM,
#ifdef _GLIBCXX_HAVE_ENOTSUP
not_supported = ENOTSUP,
#endif
-// operation_canceled = ECANCELED,
-// operation_in_progress = EINPROGRESS,
+ operation_canceled = ECANCELED,
+ operation_in_progress = EINPROGRESS,
#ifdef _GLIBCXX_HAVE_EPERM
operation_not_permitted = EPERM,
#endif
-// operation_not_supported = EOPNOTSUPP,
+ operation_not_supported = EOPNOTSUPP,
#ifdef _GLIBCXX_HAVE_EWOULDBLOCK
operation_would_block = EWOULDBLOCK,
#endif
-// owner_dead = EOWNERDEAD,
+#ifdef _GLIBCXX_HAVE_EOWNERDEAD
+ owner_dead = EOWNERDEAD,
+#endif
permission_denied = EACCES,
-// protocol_error = EPROTO,
-// protocol_not_supported = EPROTONOSUPPORT,
+ protocol_error = EPROTO,
+ protocol_not_supported = EPROTONOSUPPORT,
read_only_file_system = EROFS,
resource_deadlock_would_occur = EDEADLK,
resource_unavailable_try_again = EAGAIN,
result_out_of_range = ERANGE,
-// state_not_recoverable = ENOTRECOVERABLE,
-// stream_timeout = ETIME,
-// text_file_busy = ETXTBSY,
+#ifdef _GLIBCXX_HAVE_ENOTRECOVERABLE
+ state_not_recoverable = ENOTRECOVERABLE,
+#endif
+#ifdef _GLIBCXX_HAVE_ETIME
+ stream_timeout = ETIME,
+#endif
+#ifdef _GLIBCXX_HAVE_ETXTBSY
+ text_file_busy = ETXTBSY,
+#endif
#ifdef _GLIBCXX_HAVE_ETIMEDOUT
timed_out = ETIMEDOUT,
#endif
too_many_files_open_in_system = ENFILE,
too_many_files_open = EMFILE,
- too_many_links = EMLINK
-// too_many_symbolic_link_levels = ELOOP,
+ too_many_links = EMLINK,
+ too_many_symbolic_link_levels = ELOOP,
#ifdef _GLIBCXX_HAVE_EOVERFLOW
- ,
- value_too_large = EOVERFLOW
+ value_too_large = EOVERFLOW,
#endif
-// wrong_protocol_type = EPROTOTYPE
+ wrong_protocol_type = EPROTOTYPE
};
_GLIBCXX_END_NAMESPACE_VERSION
diff --git a/libstdc++-v3/doc/doxygen/mainpage.html b/libstdc++-v3/doc/doxygen/mainpage.html
index aa650bafeda..b54482a74e9 100644
--- a/libstdc++-v3/doc/doxygen/mainpage.html
+++ b/libstdc++-v3/doc/doxygen/mainpage.html
@@ -28,7 +28,7 @@
<p>There are two types of documentation for libstdc++. One is the
distribution documentation, which can be read online
- <a href="http://gcc.gnu.org/onlinedocs/libstdc++/index.html">here</a>
+ <a href="https://gcc.gnu.org/onlinedocs/libstdc++/index.html">here</a>
or offline from the file doc/html/index.html in the library source
directory.
</p>
@@ -78,11 +78,11 @@
pages. See the section "Documentation Style"
in <code>doc/xml/manual/appendix_contributing.xml</code> in the
source tree for how to create (and write) the doxygen markup.
- This style guide can also be viewed on the <a href="http://gcc.gnu.org/onlinedocs/libstdc++/manual/bk01apas04.html">web</a>.
+ This style guide can also be viewed on the <a href="https://gcc.gnu.org/onlinedocs/libstdc++/manual/documentation_hacking.html">web</a>.
<h2>License, Copyright, and Other Lawyerly Verbosity</h2>
<p>The libstdc++ documentation is released under
- <a href="http://gcc.gnu.org/onlinedocs/libstdc++/manual/bk01pt01ch01s02.html">
+ <a href="https://gcc.gnu.org/onlinedocs/libstdc++/manual/appendix_gpl.html">
these terms</a>.
</p>
<p>Part of the generated documentation involved comments and notes from
diff --git a/libstdc++-v3/doc/html/faq.html b/libstdc++-v3/doc/html/faq.html
index cac00d292b8..d6835534903 100644
--- a/libstdc++-v3/doc/html/faq.html
+++ b/libstdc++-v3/doc/html/faq.html
@@ -862,7 +862,7 @@
details than for C, and most CPU designers (for good reasons elaborated
below) have not stepped up to publish C++ ABIs. Such an ABI has been
defined for the Itanium architecture (see
- <a class="link" href="http://www.codesourcery.com/cxx-abi/" target="_top">C++
+ <a class="link" href="http://mentorembedded.github.io/cxx-abi/" target="_top">C++
ABI for Itanium</a>) and that is used by G++ and other compilers
as the de facto standard ABI on many common architectures (including x86).
G++ can also use the ARM architecture's EABI, for embedded
diff --git a/libstdc++-v3/doc/html/manual/abi.html b/libstdc++-v3/doc/html/manual/abi.html
index e7de3a52647..d28314698c4 100644
--- a/libstdc++-v3/doc/html/manual/abi.html
+++ b/libstdc++-v3/doc/html/manual/abi.html
@@ -20,7 +20,7 @@
virtual functions, etc. These details are defined as the compiler
Application Binary Interface, or ABI. The GNU C++ compiler uses an
industry-standard C++ ABI starting with version 3. Details can be
- found in the <a class="link" href="http://mentorembedded.github.com/cxx-abi/abi.html" target="_top">ABI
+ found in the <a class="link" href="http://mentorembedded.github.io/cxx-abi/abi.html" target="_top">ABI
specification</a>.
</p><p>
The GNU C++ compiler, g++, has a compiler command line option to
@@ -153,12 +153,33 @@ compatible.
was released, in compressed ISO date format, as an unsigned long.
</p><p>
This macro is defined in the file "c++config" in the
- "libstdc++-v3/include/bits" directory. (Up to GCC 4.1.0, it was
- changed every night by an automated script. Since GCC 4.1.0, it is
- the same value as gcc/DATESTAMP.)
+ "libstdc++-v3/include/bits" directory. Up to GCC 4.1.0, it was
+ changed every night by an automated script. Since GCC 4.1.0 it is set
+ during configuration to the same value as
+ <code class="filename">gcc/DATESTAMP</code>, so for an official release its value
+ is the same as the date of the release, which is given in the <a class="link" href="https://gcc.gnu.org/develop.html#timeline" target="_top">GCC Release
+ Timeline</a>.
+ </p><p>
+ This macro is not useful for determining whether a particular feature is
+ supported by the version of libstdc++ you are using. The date of a release
+ might be after a feature was added to the development trunk, but the
+ release could be from an older branch. For example, in the 5.4.0 release
+ the macro has the value 20160603 which is greater than the 20160427 value
+ of the macro in the 6.1.0 release, but there are features supported in the
+ 6.1.0 release that are not supported in 5.4.0 release.
+ You also can't test for the exact values listed below to try and
+ identify a release, because a snapshot taken from the gcc-5-branch on
+ 2016-04-27 would have the same value for the macro as the 6.1.0 release
+ despite being a different version.
+ Many GNU/Linux distributions build their GCC packages from snapshots, so
+ the macro can have dates that doesn't correspond to official releases.
</p><p>
It is versioned as follows:
- </p><div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>GCC 3.0.0: 20010615</p></li><li class="listitem"><p>GCC 3.0.1: 20010819</p></li><li class="listitem"><p>GCC 3.0.2: 20011023</p></li><li class="listitem"><p>GCC 3.0.3: 20011220</p></li><li class="listitem"><p>GCC 3.0.4: 20020220</p></li><li class="listitem"><p>GCC 3.1.0: 20020514</p></li><li class="listitem"><p>GCC 3.1.1: 20020725</p></li><li class="listitem"><p>GCC 3.2.0: 20020814</p></li><li class="listitem"><p>GCC 3.2.1: 20021119</p></li><li class="listitem"><p>GCC 3.2.2: 20030205</p></li><li class="listitem"><p>GCC 3.2.3: 20030422</p></li><li class="listitem"><p>GCC 3.3.0: 20030513</p></li><li class="listitem"><p>GCC 3.3.1: 20030804</p></li><li class="listitem"><p>GCC 3.3.2: 20031016</p></li><li class="listitem"><p>GCC 3.3.3: 20040214</p></li><li class="listitem"><p>GCC 3.4.0: 20040419</p></li><li class="listitem"><p>GCC 3.4.1: 20040701</p></li><li class="listitem"><p>GCC 3.4.2: 20040906</p></li><li class="listitem"><p>GCC 3.4.3: 20041105</p></li><li class="listitem"><p>GCC 3.4.4: 20050519</p></li><li class="listitem"><p>GCC 3.4.5: 20051201</p></li><li class="listitem"><p>GCC 3.4.6: 20060306</p></li><li class="listitem"><p>GCC 4.0.0: 20050421</p></li><li class="listitem"><p>GCC 4.0.1: 20050707</p></li><li class="listitem"><p>GCC 4.0.2: 20050921</p></li><li class="listitem"><p>GCC 4.0.3: 20060309</p></li><li class="listitem"><p>GCC 4.1.0: 20060228</p></li><li class="listitem"><p>GCC 4.1.1: 20060524</p></li><li class="listitem"><p>GCC 4.1.2: 20070214</p></li><li class="listitem"><p>GCC 4.2.0: 20070514</p></li><li class="listitem"><p>GCC 4.2.1: 20070719</p></li><li class="listitem"><p>GCC 4.2.2: 20071007</p></li><li class="listitem"><p>GCC 4.2.3: 20080201</p></li><li class="listitem"><p>GCC 4.2.4: 20080519</p></li><li class="listitem"><p>GCC 4.3.0: 20080306</p></li><li class="listitem"><p>GCC 4.3.1: 20080606</p></li><li class="listitem"><p>GCC 4.3.2: 20080827</p></li><li class="listitem"><p>GCC 4.3.3: 20090124</p></li><li class="listitem"><p>GCC 4.3.4: 20090804</p></li><li class="listitem"><p>GCC 4.3.5: 20100522</p></li><li class="listitem"><p>GCC 4.3.6: 20110627</p></li><li class="listitem"><p>GCC 4.4.0: 20090421</p></li><li class="listitem"><p>GCC 4.4.1: 20090722</p></li><li class="listitem"><p>GCC 4.4.2: 20091015</p></li><li class="listitem"><p>GCC 4.4.3: 20100121</p></li><li class="listitem"><p>GCC 4.4.4: 20100429</p></li><li class="listitem"><p>GCC 4.4.5: 20101001</p></li><li class="listitem"><p>GCC 4.4.6: 20110416</p></li><li class="listitem"><p>GCC 4.4.7: 20120313</p></li><li class="listitem"><p>GCC 4.5.0: 20100414</p></li><li class="listitem"><p>GCC 4.5.1: 20100731</p></li><li class="listitem"><p>GCC 4.5.2: 20101216</p></li><li class="listitem"><p>GCC 4.5.3: 20110428</p></li><li class="listitem"><p>GCC 4.5.4: 20120702</p></li><li class="listitem"><p>GCC 4.6.0: 20110325</p></li><li class="listitem"><p>GCC 4.6.1: 20110627</p></li><li class="listitem"><p>GCC 4.6.2: 20111026</p></li><li class="listitem"><p>GCC 4.6.3: 20120301</p></li><li class="listitem"><p>GCC 4.7.0: 20120322</p></li><li class="listitem"><p>GCC 4.7.1: 20120614</p></li><li class="listitem"><p>GCC 4.7.2: 20120920</p></li></ul></div><p></p></li><li class="listitem"><p>
+ </p><div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>GCC 3.0.0: 20010615</p></li><li class="listitem"><p>GCC 3.0.1: 20010819</p></li><li class="listitem"><p>GCC 3.0.2: 20011023</p></li><li class="listitem"><p>GCC 3.0.3: 20011220</p></li><li class="listitem"><p>GCC 3.0.4: 20020220</p></li><li class="listitem"><p>GCC 3.1.0: 20020514</p></li><li class="listitem"><p>GCC 3.1.1: 20020725</p></li><li class="listitem"><p>GCC 3.2.0: 20020814</p></li><li class="listitem"><p>GCC 3.2.1: 20021119</p></li><li class="listitem"><p>GCC 3.2.2: 20030205</p></li><li class="listitem"><p>GCC 3.2.3: 20030422</p></li><li class="listitem"><p>GCC 3.3.0: 20030513</p></li><li class="listitem"><p>GCC 3.3.1: 20030804</p></li><li class="listitem"><p>GCC 3.3.2: 20031016</p></li><li class="listitem"><p>GCC 3.3.3: 20040214</p></li><li class="listitem"><p>GCC 3.4.0: 20040419</p></li><li class="listitem"><p>GCC 3.4.1: 20040701</p></li><li class="listitem"><p>GCC 3.4.2: 20040906</p></li><li class="listitem"><p>GCC 3.4.3: 20041105</p></li><li class="listitem"><p>GCC 3.4.4: 20050519</p></li><li class="listitem"><p>GCC 3.4.5: 20051201</p></li><li class="listitem"><p>GCC 3.4.6: 20060306</p></li><li class="listitem"><p>GCC 4.0.0: 20050421</p></li><li class="listitem"><p>GCC 4.0.1: 20050707</p></li><li class="listitem"><p>GCC 4.0.2: 20050921</p></li><li class="listitem"><p>GCC 4.0.3: 20060309</p></li><li class="listitem"><p>
+ GCC 4.1.0 and later: the GCC release date, as shown in the
+ <a class="link" href="https://gcc.gnu.org/develop.html#timeline" target="_top">GCC
+ Release Timeline</a>
+ </p></li></ul></div><p></p></li><li class="listitem"><p>
Incremental bumping of a library pre-defined macro,
_GLIBCPP_VERSION. This macro is defined as the released version of
the library, as a string literal. This is only implemented in
@@ -226,13 +247,12 @@ compatible.
</p></div><div class="section"><div class="titlepage"><div><div><h4 class="title"><a id="abi.versioning.active"></a>Checking Active</h4></div></div></div><p>
When the GNU C++ library is being built with symbol versioning
on, you should see the following at configure time for
- libstdc++:
+ libstdc++ (showing either 'gnu' or another of the supported styles):
</p><pre class="screen">
<code class="computeroutput">
checking versioning on shared library symbols... gnu
</code>
</pre><p>
- or another of the supported styles.
If you don't see this line in the configure output, or if this line
appears but the last word is 'no', then you are out of luck.
</p><p>
@@ -292,7 +312,7 @@ class that would otherwise have implicit versions. This will change
the way the compiler deals with this class in by-value return
statements or parameters: instead of passing instances of this
class in registers, the compiler will be forced to use memory. See the
-section on <a class="link" href="http://mentorembedded.github.com/cxx-abi/abi.html#calls" target="_top">Function
+section on <a class="link" href="http://mentorembedded.github.io/cxx-abi/abi.html#calls" target="_top">Function
Calling Conventions and APIs</a>
of the C++ ABI documentation for further details.
</p></li></ol></div></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a id="abi.impl"></a>Implementation</h3></div></div></div><div class="orderedlist"><ol class="orderedlist" type="1"><li class="listitem"><p>
@@ -490,7 +510,7 @@ gcc test.c -g -O2 -L. -lone -ltwo /usr/lib/libstdc++.so.5 /usr/lib/libstdc++.so.
ABIcheck
</a>
</em>. </span></p></div><div class="biblioentry"><a id="biblio.cxxabi"></a><p>[biblio.cxxabi] <span class="title"><em>
- <a class="link" href="http://www.codesourcery.com/cxx-abi/" target="_top">
+ <a class="link" href="http://mentorembedded.github.io/cxx-abi/" target="_top">
C++ ABI Summary
</a>
</em>. </span></p></div><div class="biblioentry"><a id="id-1.3.6.3.6.10.4"></a><p><span class="title"><em>
diff --git a/libstdc++-v3/doc/html/manual/ext_demangling.html b/libstdc++-v3/doc/html/manual/ext_demangling.html
index 3091976c4fb..7d6df2d8c41 100644
--- a/libstdc++-v3/doc/html/manual/ext_demangling.html
+++ b/libstdc++-v3/doc/html/manual/ext_demangling.html
@@ -7,7 +7,7 @@
original C++ source identifiers is called
<span class="quote">“<span class="quote">demangling.</span>”</span>
</p><p>
- If you have read the <a class="link" href="http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/a01115.html" target="_top">source
+ If you have read the <a class="link" href="http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/namespaces.html" target="_top">source
documentation for <code class="code">namespace abi</code></a> then you are
aware of the cross-vendor C++ ABI in use by GCC. One of the
exposed functions is used for demangling,
diff --git a/libstdc++-v3/doc/html/manual/memory.html b/libstdc++-v3/doc/html/manual/memory.html
index cf58f632b78..951b8a009a5 100644
--- a/libstdc++-v3/doc/html/manual/memory.html
+++ b/libstdc++-v3/doc/html/manual/memory.html
@@ -119,8 +119,8 @@
Over multiple iterations, various STL container
objects have elements inserted to some maximum amount. A variety
of allocators are tested.
- Test source for <a class="link" href="http://gcc.gnu.org/viewcvs/trunk/libstdc%2B%2B-v3/testsuite/performance/23_containers/insert/sequence.cc?view=markup" target="_top">sequence</a>
- and <a class="link" href="http://gcc.gnu.org/viewcvs/trunk/libstdc%2B%2B-v3/testsuite/performance/23_containers/insert/associative.cc?view=markup" target="_top">associative</a>
+ Test source for <a class="link" href="http://gcc.gnu.org/viewcvs/gcc/trunk/libstdc%2B%2B-v3/testsuite/performance/23_containers/insert/sequence.cc?view=markup" target="_top">sequence</a>
+ and <a class="link" href="http://gcc.gnu.org/viewcvs/gcc/trunk/libstdc%2B%2B-v3/testsuite/performance/23_containers/insert/associative.cc?view=markup" target="_top">associative</a>
containers.
</p></li><li class="listitem"><p>
Insertion and erasure in a multi-threaded environment.
@@ -129,14 +129,14 @@
on a per-thread basis, as well as measuring thread contention
for memory resources.
Test source
- <a class="link" href="http://gcc.gnu.org/viewcvs/trunk/libstdc%2B%2B-v3/testsuite/performance/23_containers/insert_erase/associative.cc?view=markup" target="_top">here</a>.
+ <a class="link" href="http://gcc.gnu.org/viewcvs/gcc/trunk/libstdc%2B%2B-v3/testsuite/performance/23_containers/insert_erase/associative.cc?view=markup" target="_top">here</a>.
</p></li><li class="listitem"><p>
A threaded producer/consumer model.
</p><p>
Test source for
- <a class="link" href="http://gcc.gnu.org/viewcvs/trunk/libstdc++-v3/testsuite/performance/23_containers/producer_consumer/sequence.cc?view=markup" target="_top">sequence</a>
+ <a class="link" href="http://gcc.gnu.org/viewcvs/gcc/trunk/libstdc++-v3/testsuite/performance/23_containers/producer_consumer/sequence.cc?view=markup" target="_top">sequence</a>
and
- <a class="link" href="http://gcc.gnu.org/viewcvs/trunk/libstdc++-v3/testsuite/performance/23_containers/producer_consumer/associative.cc?view=markup" target="_top">associative</a>
+ <a class="link" href="http://gcc.gnu.org/viewcvs/gcc/trunk/libstdc++-v3/testsuite/performance/23_containers/producer_consumer/associative.cc?view=markup" target="_top">associative</a>
containers.
</p></li></ol></div><p>
The current default choice for
diff --git a/libstdc++-v3/doc/html/manual/mt_allocator_impl.html b/libstdc++-v3/doc/html/manual/mt_allocator_impl.html
index 7b3379aa1d4..15ac1e754e0 100644
--- a/libstdc++-v3/doc/html/manual/mt_allocator_impl.html
+++ b/libstdc++-v3/doc/html/manual/mt_allocator_impl.html
@@ -155,6 +155,6 @@ containers, this works, as an instance of the allocator is constructed
as part of a container's constructor. However, this assumption is
implementation-specific, and subject to change. For an example of a
pool that frees memory, see the following
- <a class="link" href="http://gcc.gnu.org/viewcvs/trunk/libstdc++-v3/testsuite/ext/mt_allocator/deallocate_local-6.cc?view=markup" target="_top">
+ <a class="link" href="http://gcc.gnu.org/viewcvs/gcc/trunk/libstdc++-v3/testsuite/ext/mt_allocator/deallocate_local-6.cc?view=markup" target="_top">
example.</a>
</p></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="mt_allocator_design.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="mt_allocator.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="mt_allocator_ex_single.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Design Issues </td><td width="20%" align="center"><a accesskey="h" href="../index.html">Home</a></td><td width="40%" align="right" valign="top"> Single Thread Example</td></tr></table></div></body></html> \ No newline at end of file
diff --git a/libstdc++-v3/doc/html/manual/source_code_style.html b/libstdc++-v3/doc/html/manual/source_code_style.html
index 790276f3f5c..e17530c1763 100644
--- a/libstdc++-v3/doc/html/manual/source_code_style.html
+++ b/libstdc++-v3/doc/html/manual/source_code_style.html
@@ -478,7 +478,7 @@
      Examples: <code class="code">_S_max_elements  _S_default_value</code><br />
<br />
      Don't use names in the same scope that differ only in the prefix,<br />
-      e.g. _S_top and _M_top. See BADNAMES for a list of forbidden names.<br />
+      e.g. _S_top and _M_top. See <a class="link" href="source_code_style.html#coding_style.bad_identifiers" title="Bad Identifiers">BADNAMES</a> for a list of forbidden names.<br />
      (The most tempting of these seem to be and "_T" and "__sz".)<br />
<br />
      Names must never have "__" internally; it would confuse name<br />
diff --git a/libstdc++-v3/doc/html/manual/source_organization.html b/libstdc++-v3/doc/html/manual/source_organization.html
index a5dc9689fdd..46987e093c6 100644
--- a/libstdc++-v3/doc/html/manual/source_organization.html
+++ b/libstdc++-v3/doc/html/manual/source_organization.html
@@ -63,7 +63,9 @@ It has subdirectories:
library. Support for "make check" and "make check-install" is
complete, and runs through all the subdirectories here when this
command is issued from the build directory. Please note that
- "make check" requires DejaGNU 1.4 or later to be installed.
+ "make check" requires DejaGnu 1.4 or later to be installed,
+ or for extra <a class="link" href="test.html#test.run.permutations" title="Permutations">permutations</a>
+ DejaGnu 1.5.3 or later.
</dd></dl></div><p>
Other subdirectories contain variant versions of certain files
that are meant to be copied or linked by the configure script.
diff --git a/libstdc++-v3/doc/html/manual/status.html b/libstdc++-v3/doc/html/manual/status.html
index f82a3c5c206..46eb193f619 100644
--- a/libstdc++-v3/doc/html/manual/status.html
+++ b/libstdc++-v3/doc/html/manual/status.html
@@ -172,7 +172,7 @@ This page describes the C++11 support in the GCC 5 series.
</td></tr><tr><td align="left">20.1</td><td align="left">General</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.2</td><td align="left">Utility components</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.2.1</td><td align="left">Operators</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.2.2</td><td align="left">Swap</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.2.3</td><td align="left"><code class="code">forward</code> and <code class="code">move</code> helpers</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.2.4</td><td align="left">Function template <code class="code">declval</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.3</td><td align="left">Pairs</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.3.1</td><td align="left">In general</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.3.2</td><td align="left">Class template <code class="code">pair</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.3.3</td><td align="left">Specialized algorithms</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.3.4</td><td align="left">Tuple-like access to <code class="code">pair</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.3.5</td><td align="left">Piecewise construction</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.4</td><td align="left">Tuples</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.4.1</td><td align="left">In general</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.4.2</td><td align="left">Class template <code class="code">tuple</code></td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.4.2.1</td><td align="left">Construction</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.4.2.2</td><td align="left">Assignment</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.4.2.3</td><td align="left">Swap</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.4.2.4</td><td align="left">Tuple creation functions</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.4.2.5</td><td align="left">Tuple helper classes</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.4.2.6</td><td align="left">Element access</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.4.2.7</td><td align="left">Relational operators</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.4.2.8</td><td align="left">Tuple traits</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.4.2.9</td><td align="left">Tuple specialized algorithms</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.5</td><td align="left">Class template <code class="code">bitset</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.5.1</td><td align="left"><code class="code">bitset</code> constructors</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.5.2</td><td align="left"><code class="code">bitset</code> members</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.5.3</td><td align="left"><code class="code">bitset</code> hash support</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.5.4</td><td align="left"><code class="code">bitset</code> operators</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.6</td><td align="left">Memory</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.6.1</td><td align="left">In general</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.6.2</td><td align="left">Header <code class="code">&lt;memory&gt;</code> synopsis</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.6.3</td><td align="left">Pointer traits</td><td align="left">Y</td><td align="left"> </td></tr><tr bgcolor="#B0B0B0"><td align="left">20.6.4</td><td align="left">Pointer safety</td><td align="left">Partial</td><td align="left"> </td></tr><tr><td align="left">20.6.5</td><td align="left">Align</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.6.6</td><td align="left">Allocator argument tag</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.6.7</td><td align="left"><code class="code">uses_allocator</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.6.8</td><td align="left">Allocator traits</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.6.9</td><td align="left">The default allocator</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.6.10</td><td align="left">Raw storage iterator</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.6.11</td><td align="left">Temporary buffers</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.6.12</td><td align="left">Specialized algorithms</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.6.12.1</td><td align="left"><code class="code">addressof</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.6.12.2</td><td align="left"><code class="code">uninitialized_copy</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.6.12.3</td><td align="left"><code class="code">uninitialized_fill</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.6.12.4</td><td align="left"><code class="code">uninitialized_fill_n</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.6.13</td><td align="left">C library</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.7</td><td align="left">Smart pointers</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.7.1</td><td align="left">Class template <code class="code">unique_ptr</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.7.2</td><td align="left">Shared-ownership pointers</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.7.2.1</td><td align="left">Class <code class="code">bad_weak_ptr</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.7.2.2</td><td align="left">Class template <code class="code">shared_ptr</code></td><td align="left">Y</td><td align="left">
Uses code from
<a class="link" href="http://www.boost.org/libs/smart_ptr/shared_ptr.htm" target="_top">boost::shared_ptr</a>.
- </td></tr><tr><td align="left">20.7.2.3</td><td align="left">Class template <code class="code">weak_ptr</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.7.2.4</td><td align="left">Class template <code class="code">emable_shared_from_this</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.7.2.5</td><td align="left"><code class="code">shared_ptr</code> atomic access</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.7.2.6</td><td align="left">Smart pointer hash support</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.8</td><td align="left">Function objects</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.8.1</td><td align="left">Definitions</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.8.2</td><td align="left">Requirements</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.8.3</td><td align="left">Class template <code class="code">reference_wrapper</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.8.4</td><td align="left">Arithmetic operation</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.8.5</td><td align="left">Comparisons</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.8.6</td><td align="left">Logical operations</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.8.7</td><td align="left">Bitwise operations</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.8.8</td><td align="left">Negators</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.8.9</td><td align="left">Function template <code class="code">bind</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.8.10</td><td align="left">Function template <code class="code">mem_fn</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.8.11</td><td align="left">Polymorphic function wrappers</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.8.11.1</td><td align="left">Class <code class="code">bad_function_call</code></td><td align="left">Y</td><td align="left"> </td></tr><tr bgcolor="#B0B0B0"><td align="left">20.8.11.2</td><td align="left">Class template <code class="code">function</code></td><td align="left">Partial</td><td align="left">Missing allocator support</td></tr><tr><td align="left">20.8.12</td><td align="left">Class template <code class="code">hash</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.9</td><td align="left">Metaprogramming and type traits</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.9.1</td><td align="left">Requirements</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.9.2</td><td align="left">Header <code class="code">&lt;type_traits&gt;</code> synopsis</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.9.3</td><td align="left">Helper classes</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.9.4</td><td align="left">Unary Type Traits</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.9.4.1</td><td align="left">Primary type categories</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.9.4.2</td><td align="left">Composite type traits</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.9.4.3</td><td align="left">Type properties</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.9.5</td><td align="left">Type property queries</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.9.6</td><td align="left">Relationships between types</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.9.7</td><td align="left">Transformations between types</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.9.7.1</td><td align="left">Const-volatile modifications</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.9.7.2</td><td align="left">Reference modifications</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.9.7.3</td><td align="left">Sign modifications</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.9.7.4</td><td align="left">Array modifications</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.9.7.5</td><td align="left">Pointer modifications</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.9.7.6</td><td align="left">Other transformations</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.10</td><td align="left">Compile-time rational arithmetic</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.10.1</td><td align="left">In general</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.10.2</td><td align="left">Header <code class="code">&lt;ratio&gt;</code> synopsis</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.10.3</td><td align="left">Class template <code class="code">ratio</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.10.4</td><td align="left">Arithmetic on <code class="code">ratio</code>s</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.10.5</td><td align="left">Comparison of <code class="code">ratio</code>s</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.10.6</td><td align="left">SI types for <code class="code">ratio</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.11</td><td align="left">Time utilities</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.11.3</td><td align="left">Clock requirements</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.11.4</td><td align="left">Time-related traits</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.11.4.1</td><td align="left"><code class="code">treat_as_floating_point</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.11.4.2</td><td align="left"><code class="code">duration_values</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.11.4.3</td><td align="left">Specializations of <code class="code">common_type</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.11.5</td><td align="left">Class template <code class="code">duration</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.11.6</td><td align="left">Class template <code class="code">time_point</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.11.7</td><td align="left">Clocks</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.11.7.1</td><td align="left">Class <code class="code">system_clock</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.11.7.2</td><td align="left">Class <code class="code">steady_clock</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.11.7.3</td><td align="left">Class <code class="code">high_resolution_clock</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.11.8</td><td align="left">Date and time functions</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.12</td><td align="left">Scoped allocator adaptor</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.12.1</td><td align="left">Header <code class="code">&lt;scoped_allocator&gt;</code> synopsis</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.12.2</td><td align="left">Scoped allocator adaptor member types</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.12.3</td><td align="left">Scoped allocator adaptor constructors</td><td align="left">Y</td><td align="left"> </td></tr><tr bgcolor="#B0B0B0"><td align="left">20.12.4</td><td align="left">Scoped allocator adaptor members</td><td align="left">Partial</td><td align="left">OUTERMOST is not recursive.</td></tr><tr><td align="left">20.12.5</td><td align="left">Scoped allocator operators</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.13</td><td align="left">Class <code class="code">type_index</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">
+ </td></tr><tr><td align="left">20.7.2.3</td><td align="left">Class template <code class="code">weak_ptr</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.7.2.4</td><td align="left">Class template <code class="code">emable_shared_from_this</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.7.2.5</td><td align="left"><code class="code">shared_ptr</code> atomic access</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.7.2.6</td><td align="left">Smart pointer hash support</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.8</td><td align="left">Function objects</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.8.1</td><td align="left">Definitions</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.8.2</td><td align="left">Requirements</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.8.3</td><td align="left">Class template <code class="code">reference_wrapper</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.8.4</td><td align="left">Arithmetic operation</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.8.5</td><td align="left">Comparisons</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.8.6</td><td align="left">Logical operations</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.8.7</td><td align="left">Bitwise operations</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.8.8</td><td align="left">Negators</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.8.9</td><td align="left">Function template <code class="code">bind</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.8.10</td><td align="left">Function template <code class="code">mem_fn</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.8.11</td><td align="left">Polymorphic function wrappers</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.8.11.1</td><td align="left">Class <code class="code">bad_function_call</code></td><td align="left">Y</td><td align="left"> </td></tr><tr bgcolor="#B0B0B0"><td align="left">20.8.11.2</td><td align="left">Class template <code class="code">function</code></td><td align="left">Partial</td><td align="left">Missing allocator support</td></tr><tr><td align="left">20.8.12</td><td align="left">Class template <code class="code">hash</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.9</td><td align="left">Metaprogramming and type traits</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.9.1</td><td align="left">Requirements</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.9.2</td><td align="left">Header <code class="code">&lt;type_traits&gt;</code> synopsis</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.9.3</td><td align="left">Helper classes</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.9.4</td><td align="left">Unary Type Traits</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.9.4.1</td><td align="left">Primary type categories</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.9.4.2</td><td align="left">Composite type traits</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.9.4.3</td><td align="left">Type properties</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.9.5</td><td align="left">Type property queries</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.9.6</td><td align="left">Relationships between types</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.9.7</td><td align="left">Transformations between types</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.9.7.1</td><td align="left">Const-volatile modifications</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.9.7.2</td><td align="left">Reference modifications</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.9.7.3</td><td align="left">Sign modifications</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.9.7.4</td><td align="left">Array modifications</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.9.7.5</td><td align="left">Pointer modifications</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.9.7.6</td><td align="left">Other transformations</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.10</td><td align="left">Compile-time rational arithmetic</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.10.1</td><td align="left">In general</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.10.2</td><td align="left">Header <code class="code">&lt;ratio&gt;</code> synopsis</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.10.3</td><td align="left">Class template <code class="code">ratio</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.10.4</td><td align="left">Arithmetic on <code class="code">ratio</code>s</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.10.5</td><td align="left">Comparison of <code class="code">ratio</code>s</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.10.6</td><td align="left">SI types for <code class="code">ratio</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.11</td><td align="left">Time utilities</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.11.3</td><td align="left">Clock requirements</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.11.4</td><td align="left">Time-related traits</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.11.4.1</td><td align="left"><code class="code">treat_as_floating_point</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.11.4.2</td><td align="left"><code class="code">duration_values</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.11.4.3</td><td align="left">Specializations of <code class="code">common_type</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.11.5</td><td align="left">Class template <code class="code">duration</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.11.6</td><td align="left">Class template <code class="code">time_point</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.11.7</td><td align="left">Clocks</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.11.7.1</td><td align="left">Class <code class="code">system_clock</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.11.7.2</td><td align="left">Class <code class="code">steady_clock</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.11.7.3</td><td align="left">Class <code class="code">high_resolution_clock</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.11.8</td><td align="left">Date and time functions</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.12</td><td align="left">Scoped allocator adaptor</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.12.1</td><td align="left">Header <code class="code">&lt;scoped_allocator&gt;</code> synopsis</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.12.2</td><td align="left">Scoped allocator adaptor member types</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.12.3</td><td align="left">Scoped allocator adaptor constructors</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.12.4</td><td align="left">Scoped allocator adaptor members</td><td align="left">Y</td><td align="left"></td></tr><tr><td align="left">20.12.5</td><td align="left">Scoped allocator operators</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.13</td><td align="left">Class <code class="code">type_index</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">
<span class="emphasis"><em>21</em></span>
</td><td colspan="3" align="left">
<span class="emphasis"><em>Strings</em></span>
diff --git a/libstdc++-v3/doc/xml/manual/abi.xml b/libstdc++-v3/doc/xml/manual/abi.xml
index 57051c19409..e70481a1aae 100644
--- a/libstdc++-v3/doc/xml/manual/abi.xml
+++ b/libstdc++-v3/doc/xml/manual/abi.xml
@@ -392,10 +392,32 @@ compatible.
<para>
This macro is defined in the file "c++config" in the
- "libstdc++-v3/include/bits" directory. (Up to GCC 4.1.0, it was
- changed every night by an automated script. Since GCC 4.1.0, it is
- the same value as gcc/DATESTAMP.)
+ "libstdc++-v3/include/bits" directory. Up to GCC 4.1.0, it was
+ changed every night by an automated script. Since GCC 4.1.0 it is set
+ during configuration to the same value as
+ <filename>gcc/DATESTAMP</filename>, so for an official release its value
+ is the same as the date of the release, which is given in the <link
+ xmlns:xlink="http://www.w3.org/1999/xlink"
+ xlink:href="https://gcc.gnu.org/develop.html#timeline">GCC Release
+ Timeline</link>.
</para>
+
+ <para>
+ This macro is not useful for determining whether a particular feature is
+ supported by the version of libstdc++ you are using. The date of a release
+ might be after a feature was added to the development trunk, but the
+ release could be from an older branch. For example, in the 5.4.0 release
+ the macro has the value 20160603 which is greater than the 20160427 value
+ of the macro in the 6.1.0 release, but there are features supported in the
+ 6.1.0 release that are not supported in 5.4.0 release.
+ You also can't test for the exact values listed below to try and
+ identify a release, because a snapshot taken from the gcc-5-branch on
+ 2016-04-27 would have the same value for the macro as the 6.1.0 release
+ despite being a different version.
+ Many GNU/Linux distributions build their GCC packages from snapshots, so
+ the macro can have dates that doesn't correspond to official releases.
+ </para>
+
<para>
It is versioned as follows:
</para>
@@ -426,41 +448,12 @@ compatible.
<listitem><para>GCC 4.0.1: 20050707</para></listitem>
<listitem><para>GCC 4.0.2: 20050921</para></listitem>
<listitem><para>GCC 4.0.3: 20060309</para></listitem>
- <listitem><para>GCC 4.1.0: 20060228</para></listitem>
- <listitem><para>GCC 4.1.1: 20060524</para></listitem>
- <listitem><para>GCC 4.1.2: 20070214</para></listitem>
- <listitem><para>GCC 4.2.0: 20070514</para></listitem>
- <listitem><para>GCC 4.2.1: 20070719</para></listitem>
- <listitem><para>GCC 4.2.2: 20071007</para></listitem>
- <listitem><para>GCC 4.2.3: 20080201</para></listitem>
- <listitem><para>GCC 4.2.4: 20080519</para></listitem>
- <listitem><para>GCC 4.3.0: 20080306</para></listitem>
- <listitem><para>GCC 4.3.1: 20080606</para></listitem>
- <listitem><para>GCC 4.3.2: 20080827</para></listitem>
- <listitem><para>GCC 4.3.3: 20090124</para></listitem>
- <listitem><para>GCC 4.3.4: 20090804</para></listitem>
- <listitem><para>GCC 4.3.5: 20100522</para></listitem>
- <listitem><para>GCC 4.3.6: 20110627</para></listitem>
- <listitem><para>GCC 4.4.0: 20090421</para></listitem>
- <listitem><para>GCC 4.4.1: 20090722</para></listitem>
- <listitem><para>GCC 4.4.2: 20091015</para></listitem>
- <listitem><para>GCC 4.4.3: 20100121</para></listitem>
- <listitem><para>GCC 4.4.4: 20100429</para></listitem>
- <listitem><para>GCC 4.4.5: 20101001</para></listitem>
- <listitem><para>GCC 4.4.6: 20110416</para></listitem>
- <listitem><para>GCC 4.4.7: 20120313</para></listitem>
- <listitem><para>GCC 4.5.0: 20100414</para></listitem>
- <listitem><para>GCC 4.5.1: 20100731</para></listitem>
- <listitem><para>GCC 4.5.2: 20101216</para></listitem>
- <listitem><para>GCC 4.5.3: 20110428</para></listitem>
- <listitem><para>GCC 4.5.4: 20120702</para></listitem>
- <listitem><para>GCC 4.6.0: 20110325</para></listitem>
- <listitem><para>GCC 4.6.1: 20110627</para></listitem>
- <listitem><para>GCC 4.6.2: 20111026</para></listitem>
- <listitem><para>GCC 4.6.3: 20120301</para></listitem>
- <listitem><para>GCC 4.7.0: 20120322</para></listitem>
- <listitem><para>GCC 4.7.1: 20120614</para></listitem>
- <listitem><para>GCC 4.7.2: 20120920</para></listitem>
+ <listitem><para>
+ GCC 4.1.0 and later: the GCC release date, as shown in the
+ <link xmlns:xlink="http://www.w3.org/1999/xlink"
+ xlink:href="https://gcc.gnu.org/develop.html#timeline">GCC
+ Release Timeline</link>
+ </para></listitem>
</itemizedlist>
<para/>
</listitem>
@@ -618,7 +611,7 @@ compatible.
<para>
When the GNU C++ library is being built with symbol versioning
on, you should see the following at configure time for
- libstdc++:
+ libstdc++ (showing either 'gnu' or another of the supported styles):
</para>
<screen>
@@ -628,7 +621,6 @@ compatible.
</screen>
<para>
- or another of the supported styles.
If you don't see this line in the configure output, or if this line
appears but the last word is 'no', then you are out of luck.
</para>
diff --git a/libstdc++-v3/doc/xml/manual/allocator.xml b/libstdc++-v3/doc/xml/manual/allocator.xml
index 3aaad338ade..395b4e3b4ba 100644
--- a/libstdc++-v3/doc/xml/manual/allocator.xml
+++ b/libstdc++-v3/doc/xml/manual/allocator.xml
@@ -185,8 +185,8 @@
Over multiple iterations, various STL container
objects have elements inserted to some maximum amount. A variety
of allocators are tested.
- Test source for <link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://gcc.gnu.org/viewcvs/trunk/libstdc%2B%2B-v3/testsuite/performance/23_containers/insert/sequence.cc?view=markup">sequence</link>
- and <link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://gcc.gnu.org/viewcvs/trunk/libstdc%2B%2B-v3/testsuite/performance/23_containers/insert/associative.cc?view=markup">associative</link>
+ Test source for <link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://gcc.gnu.org/viewcvs/gcc/trunk/libstdc%2B%2B-v3/testsuite/performance/23_containers/insert/sequence.cc?view=markup">sequence</link>
+ and <link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://gcc.gnu.org/viewcvs/gcc/trunk/libstdc%2B%2B-v3/testsuite/performance/23_containers/insert/associative.cc?view=markup">associative</link>
containers.
</para>
@@ -201,7 +201,7 @@
on a per-thread basis, as well as measuring thread contention
for memory resources.
Test source
- <link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://gcc.gnu.org/viewcvs/trunk/libstdc%2B%2B-v3/testsuite/performance/23_containers/insert_erase/associative.cc?view=markup">here</link>.
+ <link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://gcc.gnu.org/viewcvs/gcc/trunk/libstdc%2B%2B-v3/testsuite/performance/23_containers/insert_erase/associative.cc?view=markup">here</link>.
</para>
</listitem>
@@ -211,9 +211,9 @@
</para>
<para>
Test source for
- <link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://gcc.gnu.org/viewcvs/trunk/libstdc++-v3/testsuite/performance/23_containers/producer_consumer/sequence.cc?view=markup">sequence</link>
+ <link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://gcc.gnu.org/viewcvs/gcc/trunk/libstdc++-v3/testsuite/performance/23_containers/producer_consumer/sequence.cc?view=markup">sequence</link>
and
- <link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://gcc.gnu.org/viewcvs/trunk/libstdc++-v3/testsuite/performance/23_containers/producer_consumer/associative.cc?view=markup">associative</link>
+ <link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://gcc.gnu.org/viewcvs/gcc/trunk/libstdc++-v3/testsuite/performance/23_containers/producer_consumer/associative.cc?view=markup">associative</link>
containers.
</para>
</listitem>
diff --git a/libstdc++-v3/doc/xml/manual/appendix_contributing.xml b/libstdc++-v3/doc/xml/manual/appendix_contributing.xml
index aca3d99e4c5..195a70c5900 100644
--- a/libstdc++-v3/doc/xml/manual/appendix_contributing.xml
+++ b/libstdc++-v3/doc/xml/manual/appendix_contributing.xml
@@ -343,7 +343,9 @@ It has subdirectories:
library. Support for "make check" and "make check-install" is
complete, and runs through all the subdirectories here when this
command is issued from the build directory. Please note that
- "make check" requires DejaGNU 1.4 or later to be installed.
+ "make check" requires DejaGnu 1.4 or later to be installed,
+ or for extra <link linkend="test.run.permutations">permutations</link>
+ DejaGnu 1.5.3 or later.
</listitem>
</varlistentry>
</variablelist>
@@ -881,7 +883,7 @@ indicate a place that may require attention for multi-thread safety.
Examples: <code>_S_max_elements _S_default_value</code>
Don't use names in the same scope that differ only in the prefix,
- e.g. _S_top and _M_top. See BADNAMES for a list of forbidden names.
+ e.g. _S_top and _M_top. See <link linkend="coding_style.bad_identifiers">BADNAMES</link> for a list of forbidden names.
(The most tempting of these seem to be and "_T" and "__sz".)
Names must never have "__" internally; it would confuse name
diff --git a/libstdc++-v3/doc/xml/manual/extensions.xml b/libstdc++-v3/doc/xml/manual/extensions.xml
index 41b1a801325..a6e4db2b6f7 100644
--- a/libstdc++-v3/doc/xml/manual/extensions.xml
+++ b/libstdc++-v3/doc/xml/manual/extensions.xml
@@ -502,7 +502,7 @@ get_temporary_buffer(5, (int*)0);
<quote>demangling.</quote>
</para>
<para>
- If you have read the <link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/a01115.html">source
+ If you have read the <link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/namespaces.html">source
documentation for <code>namespace abi</code></link> then you are
aware of the cross-vendor C++ ABI in use by GCC. One of the
exposed functions is used for demangling,
diff --git a/libstdc++-v3/doc/xml/manual/mt_allocator.xml b/libstdc++-v3/doc/xml/manual/mt_allocator.xml
index 12fe2ee3b64..e2a7d0900c6 100644
--- a/libstdc++-v3/doc/xml/manual/mt_allocator.xml
+++ b/libstdc++-v3/doc/xml/manual/mt_allocator.xml
@@ -307,7 +307,7 @@ containers, this works, as an instance of the allocator is constructed
as part of a container's constructor. However, this assumption is
implementation-specific, and subject to change. For an example of a
pool that frees memory, see the following
- <link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://gcc.gnu.org/viewcvs/trunk/libstdc++-v3/testsuite/ext/mt_allocator/deallocate_local-6.cc?view=markup">
+ <link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://gcc.gnu.org/viewcvs/gcc/trunk/libstdc++-v3/testsuite/ext/mt_allocator/deallocate_local-6.cc?view=markup">
example.</link>
</para>
diff --git a/libstdc++-v3/doc/xml/manual/status_cxx2011.xml b/libstdc++-v3/doc/xml/manual/status_cxx2011.xml
index 7769f52b2ba..5188ab347c0 100644
--- a/libstdc++-v3/doc/xml/manual/status_cxx2011.xml
+++ b/libstdc++-v3/doc/xml/manual/status_cxx2011.xml
@@ -1007,11 +1007,10 @@ This page describes the C++11 support in the GCC 5 series.
<entry/>
</row>
<row>
- <?dbhtml bgcolor="#B0B0B0" ?>
<entry>20.12.4</entry>
<entry>Scoped allocator adaptor members</entry>
- <entry>Partial</entry>
- <entry>OUTERMOST is not recursive.</entry>
+ <entry>Y</entry>
+ <entry/>
</row>
<row>
<entry>20.12.5</entry>
diff --git a/libstdc++-v3/include/bits/basic_ios.h b/libstdc++-v3/include/bits/basic_ios.h
index 8bea1761fc8..0e4509903d4 100644
--- a/libstdc++-v3/include/bits/basic_ios.h
+++ b/libstdc++-v3/include/bits/basic_ios.h
@@ -157,8 +157,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
setstate(iostate __state)
{ this->clear(this->rdstate() | __state); }
- // Flip the internal state on for the proper state bits, then re
- // throws the propagated exception if bit also set in
+ // Flip the internal state on for the proper state bits, then
+ // rethrows the propagated exception if bit also set in
// exceptions().
void
_M_setstate(iostate __state)
diff --git a/libstdc++-v3/include/bits/basic_string.h b/libstdc++-v3/include/bits/basic_string.h
index de56d86fd83..cccf6765695 100644
--- a/libstdc++-v3/include/bits/basic_string.h
+++ b/libstdc++-v3/include/bits/basic_string.h
@@ -2529,7 +2529,10 @@ _GLIBCXX_BEGIN_NAMESPACE_CXX11
int
compare(size_type __pos, size_type __n1, const _CharT* __s,
size_type __n2) const;
- };
+
+ // Allow basic_stringbuf::__xfer_bufptrs to call _M_length:
+ template<typename, typename, typename> friend class basic_stringbuf;
+ };
_GLIBCXX_END_NAMESPACE_CXX11
#else // !_GLIBCXX_USE_CXX11_ABI
// Reference-counted COW string implentation
diff --git a/libstdc++-v3/include/bits/hashtable.h b/libstdc++-v3/include/bits/hashtable.h
index f5f298ea33c..332db5cdf49 100644
--- a/libstdc++-v3/include/bits/hashtable.h
+++ b/libstdc++-v3/include/bits/hashtable.h
@@ -834,17 +834,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
_M_bucket_count = __bkt_count;
}
- __try
- {
- for (; __f != __l; ++__f)
- this->insert(*__f);
- }
- __catch(...)
- {
- clear();
- _M_deallocate_buckets();
- __throw_exception_again;
- }
+ for (; __f != __l; ++__f)
+ this->insert(*__f);
}
template<typename _Key, typename _Value,
diff --git a/libstdc++-v3/include/bits/ios_base.h b/libstdc++-v3/include/bits/ios_base.h
index 7e91c0bbbb0..e1de534986b 100644
--- a/libstdc++-v3/include/bits/ios_base.h
+++ b/libstdc++-v3/include/bits/ios_base.h
@@ -52,8 +52,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
// The following definitions of bitmask types are enums, not ints,
// as permitted (but not required) in the standard, in order to provide
- // better type safety in iostream calls. A side effect is that
- // expressions involving them are no longer compile-time constants.
+ // better type safety in iostream calls. A side effect is that in C++98
+ // expressions involving them are not compile-time constants.
enum _Ios_Fmtflags
{
_S_boolalpha = 1L << 0,
diff --git a/libstdc++-v3/include/bits/istream.tcc b/libstdc++-v3/include/bits/istream.tcc
index e8cbb261b8a..904d40d0cd6 100644
--- a/libstdc++-v3/include/bits/istream.tcc
+++ b/libstdc++-v3/include/bits/istream.tcc
@@ -48,28 +48,36 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
{
ios_base::iostate __err = ios_base::goodbit;
if (__in.good())
- {
- if (__in.tie())
- __in.tie()->flush();
- if (!__noskip && bool(__in.flags() & ios_base::skipws))
- {
- const __int_type __eof = traits_type::eof();
- __streambuf_type* __sb = __in.rdbuf();
- __int_type __c = __sb->sgetc();
-
- const __ctype_type& __ct = __check_facet(__in._M_ctype);
- while (!traits_type::eq_int_type(__c, __eof)
- && __ct.is(ctype_base::space,
- traits_type::to_char_type(__c)))
- __c = __sb->snextc();
+ __try
+ {
+ if (__in.tie())
+ __in.tie()->flush();
+ if (!__noskip && bool(__in.flags() & ios_base::skipws))
+ {
+ const __int_type __eof = traits_type::eof();
+ __streambuf_type* __sb = __in.rdbuf();
+ __int_type __c = __sb->sgetc();
+
+ const __ctype_type& __ct = __check_facet(__in._M_ctype);
+ while (!traits_type::eq_int_type(__c, __eof)
+ && __ct.is(ctype_base::space,
+ traits_type::to_char_type(__c)))
+ __c = __sb->snextc();
- // _GLIBCXX_RESOLVE_LIB_DEFECTS
- // 195. Should basic_istream::sentry's constructor ever
- // set eofbit?
- if (traits_type::eq_int_type(__c, __eof))
- __err |= ios_base::eofbit;
- }
- }
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // 195. Should basic_istream::sentry's constructor ever
+ // set eofbit?
+ if (traits_type::eq_int_type(__c, __eof))
+ __err |= ios_base::eofbit;
+ }
+ }
+ __catch(__cxxabiv1::__forced_unwind&)
+ {
+ __in._M_setstate(ios_base::badbit);
+ __throw_exception_again;
+ }
+ __catch(...)
+ { __in._M_setstate(ios_base::badbit); }
if (__in.good() && __err == ios_base::goodbit)
_M_ok = true;
diff --git a/libstdc++-v3/include/bits/locale_conv.h b/libstdc++-v3/include/bits/locale_conv.h
index 2b3f2dcbf41..77f1adc03ae 100644
--- a/libstdc++-v3/include/bits/locale_conv.h
+++ b/libstdc++-v3/include/bits/locale_conv.h
@@ -375,7 +375,7 @@ _GLIBCXX_END_NAMESPACE_CXX11
protected:
int
sync()
- { return _M_buf && _M_conv_put() && _M_buf->pubsync() ? 0 : -1; }
+ { return _M_buf && _M_conv_put() && !_M_buf->pubsync() ? 0 : -1; }
typename _Wide_streambuf::int_type
overflow(typename _Wide_streambuf::int_type __out)
@@ -482,6 +482,7 @@ _GLIBCXX_END_NAMESPACE_CXX11
{
if (_M_buf->sputn(__p, __n) < __n)
return false;
+ return true;
}
// convert the put area and write to the byte stream buffer
diff --git a/libstdc++-v3/include/bits/regex.h b/libstdc++-v3/include/bits/regex.h
index 90723e6e255..c3cbfd7860f 100644
--- a/libstdc++-v3/include/bits/regex.h
+++ b/libstdc++-v3/include/bits/regex.h
@@ -2454,7 +2454,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CXX11
* one-past-the-end of a range.
*/
regex_iterator()
- : _M_match()
+ : _M_pregex()
{ }
/**
diff --git a/libstdc++-v3/include/bits/regex.tcc b/libstdc++-v3/include/bits/regex.tcc
index 823ad51c3e8..8aec031a6d3 100644
--- a/libstdc++-v3/include/bits/regex.tcc
+++ b/libstdc++-v3/include/bits/regex.tcc
@@ -509,12 +509,13 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
regex_iterator<_Bi_iter, _Ch_type, _Rx_traits>::
operator==(const regex_iterator& __rhs) const
{
- return (_M_match.empty() && __rhs._M_match.empty())
- || (_M_begin == __rhs._M_begin
- && _M_end == __rhs._M_end
- && _M_pregex == __rhs._M_pregex
- && _M_flags == __rhs._M_flags
- && _M_match[0] == __rhs._M_match[0]);
+ if (_M_pregex == nullptr && __rhs._M_pregex == nullptr)
+ return true;
+ return _M_pregex == __rhs._M_pregex
+ && _M_begin == __rhs._M_begin
+ && _M_end == __rhs._M_end
+ && _M_flags == __rhs._M_flags
+ && _M_match[0] == __rhs._M_match[0];
}
template<typename _Bi_iter,
@@ -538,7 +539,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
{
if (__start == _M_end)
{
- _M_match = value_type();
+ _M_pregex = nullptr;
return *this;
}
else
@@ -571,7 +572,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
_M_match._M_begin = _M_begin;
}
else
- _M_match = value_type();
+ _M_pregex = nullptr;
}
return *this;
}
diff --git a/libstdc++-v3/include/bits/regex_compiler.h b/libstdc++-v3/include/bits/regex_compiler.h
index 0cb0c04b1eb..4d90e623bbf 100644
--- a/libstdc++-v3/include/bits/regex_compiler.h
+++ b/libstdc++-v3/include/bits/regex_compiler.h
@@ -200,9 +200,10 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
const typename _TraitsT::locale_type& __loc,
regex_constants::syntax_option_type __flags)
{
- basic_string<typename _TraitsT::char_type> __str(__first, __last);
- return __compile_nfa(__str.data(), __str.data() + __str.size(), __loc,
- __flags);
+ using char_type = typename _TraitsT::char_type;
+ const basic_string<char_type> __str(__first, __last);
+ return __compile_nfa<const char_type*, _TraitsT>(__str.data(),
+ __str.data() + __str.size(), __loc, __flags);
}
// [28.13.14]
diff --git a/libstdc++-v3/include/bits/shared_ptr_base.h b/libstdc++-v3/include/bits/shared_ptr_base.h
index d71df31a0ad..b0ba18a0d67 100644
--- a/libstdc++-v3/include/bits/shared_ptr_base.h
+++ b/libstdc++-v3/include/bits/shared_ptr_base.h
@@ -1079,12 +1079,12 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
template<typename _Tp1>
bool
- owner_before(__shared_ptr<_Tp1, _Lp> const& __rhs) const
+ owner_before(__shared_ptr<_Tp1, _Lp> const& __rhs) const noexcept
{ return _M_refcount._M_less(__rhs._M_refcount); }
template<typename _Tp1>
bool
- owner_before(__weak_ptr<_Tp1, _Lp> const& __rhs) const
+ owner_before(__weak_ptr<_Tp1, _Lp> const& __rhs) const noexcept
{ return _M_refcount._M_less(__rhs._M_refcount); }
#if __cpp_rtti
@@ -1441,12 +1441,12 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
template<typename _Tp1>
bool
- owner_before(const __shared_ptr<_Tp1, _Lp>& __rhs) const
+ owner_before(const __shared_ptr<_Tp1, _Lp>& __rhs) const noexcept
{ return _M_refcount._M_less(__rhs._M_refcount); }
template<typename _Tp1>
bool
- owner_before(const __weak_ptr<_Tp1, _Lp>& __rhs) const
+ owner_before(const __weak_ptr<_Tp1, _Lp>& __rhs) const noexcept
{ return _M_refcount._M_less(__rhs._M_refcount); }
void
@@ -1488,15 +1488,15 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
struct _Sp_owner_less : public binary_function<_Tp, _Tp, bool>
{
bool
- operator()(const _Tp& __lhs, const _Tp& __rhs) const
+ operator()(const _Tp& __lhs, const _Tp& __rhs) const noexcept
{ return __lhs.owner_before(__rhs); }
bool
- operator()(const _Tp& __lhs, const _Tp1& __rhs) const
+ operator()(const _Tp& __lhs, const _Tp1& __rhs) const noexcept
{ return __lhs.owner_before(__rhs); }
bool
- operator()(const _Tp1& __lhs, const _Tp& __rhs) const
+ operator()(const _Tp1& __lhs, const _Tp& __rhs) const noexcept
{ return __lhs.owner_before(__rhs); }
};
diff --git a/libstdc++-v3/include/bits/sstream.tcc b/libstdc++-v3/include/bits/sstream.tcc
index 67c27f79181..365c61f9448 100644
--- a/libstdc++-v3/include/bits/sstream.tcc
+++ b/libstdc++-v3/include/bits/sstream.tcc
@@ -88,6 +88,25 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
return traits_type::not_eof(__c);
const __size_type __capacity = _M_string.capacity();
+
+#if _GLIBCXX_USE_CXX11_ABI
+ if ((this->epptr() - this->pbase()) < __capacity)
+ {
+ // There is additional capacity in _M_string that can be used.
+ char_type* __base = const_cast<char_type*>(_M_string.data());
+ _M_pbump(__base, __base + __capacity, this->pptr() - this->pbase());
+ if (_M_mode & ios_base::in)
+ {
+ const __size_type __nget = this->gptr() - this->eback();
+ const __size_type __eget = this->egptr() - this->eback();
+ this->setg(__base, __base + __nget, __base + __eget + 1);
+ }
+ *this->pptr() = traits_type::to_char_type(__c);
+ this->pbump(1);
+ return __c;
+ }
+#endif
+
const __size_type __max_size = _M_string.max_size();
const bool __testput = this->pptr() < this->epptr();
if (__builtin_expect(!__testput && __capacity == __max_size, false))
diff --git a/libstdc++-v3/include/bits/stl_stack.h b/libstdc++-v3/include/bits/stl_stack.h
index 3ff307ff6ad..2c220626675 100644
--- a/libstdc++-v3/include/bits/stl_stack.h
+++ b/libstdc++-v3/include/bits/stl_stack.h
@@ -86,7 +86,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
*
* The second template parameter defines the type of the underlying
* sequence/container. It defaults to std::deque, but it can be
- * any type that supports @c back, @c push_back, and @c pop_front,
+ * any type that supports @c back, @c push_back, and @c pop_back,
* such as std::list, std::vector, or an appropriate user-defined
* type.
*
diff --git a/libstdc++-v3/include/experimental/fs_dir.h b/libstdc++-v3/include/experimental/fs_dir.h
index 870b42b836a..798991280dc 100644
--- a/libstdc++-v3/include/experimental/fs_dir.h
+++ b/libstdc++-v3/include/experimental/fs_dir.h
@@ -181,7 +181,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CXX11
typedef const directory_entry& reference;
typedef input_iterator_tag iterator_category;
- directory_iterator() noexcept = default;
+ directory_iterator() = default;
explicit
directory_iterator(const path& __p)
@@ -262,7 +262,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CXX11
typedef const directory_entry& reference;
typedef input_iterator_tag iterator_category;
- recursive_directory_iterator() noexcept = default;
+ recursive_directory_iterator() = default;
explicit
recursive_directory_iterator(const path& __p)
@@ -282,8 +282,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CXX11
recursive_directory_iterator(
const recursive_directory_iterator&) = default;
- recursive_directory_iterator(
- recursive_directory_iterator&&) noexcept = default;
+ recursive_directory_iterator(recursive_directory_iterator&&) = default;
~recursive_directory_iterator();
diff --git a/libstdc++-v3/include/ext/new_allocator.h b/libstdc++-v3/include/ext/new_allocator.h
index 83e3a0b0a8f..fcc5ff4dae3 100644
--- a/libstdc++-v3/include/ext/new_allocator.h
+++ b/libstdc++-v3/include/ext/new_allocator.h
@@ -96,8 +96,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
// NB: __n is permitted to be 0. The C++ standard says nothing
// about what the return value is when __n == 0.
pointer
- allocate(size_type __n, const void* = 0)
- {
+ allocate(size_type __n, const void* = static_cast<const void*>(0))
+ {
if (__n > this->max_size())
std::__throw_bad_alloc();
diff --git a/libstdc++-v3/include/ext/pb_ds/detail/binary_heap_/binary_heap_.hpp b/libstdc++-v3/include/ext/pb_ds/detail/binary_heap_/binary_heap_.hpp
index 813fcdc1412..0003bfaed09 100644
--- a/libstdc++-v3/include/ext/pb_ds/detail/binary_heap_/binary_heap_.hpp
+++ b/libstdc++-v3/include/ext/pb_ds/detail/binary_heap_/binary_heap_.hpp
@@ -266,20 +266,14 @@ namespace __gnu_pbds
const entry_cmp& m_cmp = static_cast<entry_cmp&>(*this);
entry_pointer end = m_a_entries + m_size;
std::make_heap(m_a_entries, end, m_cmp);
- _GLIBCXX_DEBUG_ASSERT(is_heap());
}
void
push_heap()
{
- if (!is_heap())
- make_heap();
- else
- {
- const entry_cmp& m_cmp = static_cast<entry_cmp&>(*this);
- entry_pointer end = m_a_entries + m_size;
- std::push_heap(m_a_entries, end, m_cmp);
- }
+ const entry_cmp& m_cmp = static_cast<entry_cmp&>(*this);
+ entry_pointer end = m_a_entries + m_size;
+ std::push_heap(m_a_entries, end, m_cmp);
}
void
@@ -290,15 +284,6 @@ namespace __gnu_pbds
std::pop_heap(m_a_entries, end, m_cmp);
}
- bool
- is_heap()
- {
- const entry_cmp& m_cmp = static_cast<entry_cmp&>(*this);
- entry_pointer end = m_a_entries + m_size;
- bool p = std::__is_heap(m_a_entries, end, m_cmp);
- return p;
- }
-
#ifdef _GLIBCXX_DEBUG
void
assert_valid(const char*, int) const;
diff --git a/libstdc++-v3/include/ext/pb_ds/detail/binary_heap_/insert_fn_imps.hpp b/libstdc++-v3/include/ext/pb_ds/detail/binary_heap_/insert_fn_imps.hpp
index 97ccbedce8b..b8cb6be9692 100644
--- a/libstdc++-v3/include/ext/pb_ds/detail/binary_heap_/insert_fn_imps.hpp
+++ b/libstdc++-v3/include/ext/pb_ds/detail/binary_heap_/insert_fn_imps.hpp
@@ -103,7 +103,6 @@ modify(point_iterator it, const_reference r_new_val)
swap_value_imp(it.m_p_e, r_new_val, s_no_throw_copies_ind);
fix(it.m_p_e);
PB_DS_ASSERT_VALID((*this))
- _GLIBCXX_DEBUG_ASSERT(is_heap());
}
PB_DS_CLASS_T_DEC
diff --git a/libstdc++-v3/include/std/chrono b/libstdc++-v3/include/std/chrono
index abe0ca119e6..10121b718fb 100644
--- a/libstdc++-v3/include/std/chrono
+++ b/libstdc++-v3/include/std/chrono
@@ -558,7 +558,8 @@ _GLIBCXX_END_NAMESPACE_VERSION
{ }
// conversions
- template<typename _Dur2>
+ template<typename _Dur2,
+ typename = _Require<is_convertible<_Dur2, _Dur>>>
constexpr time_point(const time_point<clock, _Dur2>& __t)
: __d(__t.time_since_epoch())
{ }
diff --git a/libstdc++-v3/include/std/functional b/libstdc++-v3/include/std/functional
index a8d81d27577..2f30d2aa48f 100644
--- a/libstdc++-v3/include/std/functional
+++ b/libstdc++-v3/include/std/functional
@@ -448,17 +448,17 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
template<typename _Tp>
void cref(const _Tp&&) = delete;
- /// Partial specialization.
+ /// std::ref overload to prevent wrapping a reference_wrapper
template<typename _Tp>
inline reference_wrapper<_Tp>
ref(reference_wrapper<_Tp> __t) noexcept
- { return ref(__t.get()); }
+ { return std::ref(__t.get()); }
- /// Partial specialization.
+ /// std::cref overload to prevent wrapping a reference_wrapper
template<typename _Tp>
inline reference_wrapper<const _Tp>
cref(reference_wrapper<_Tp> __t) noexcept
- { return cref(__t.get()); }
+ { return std::cref(__t.get()); }
// @} group functors
@@ -2025,7 +2025,7 @@ _GLIBCXX_MEM_FN_TRAITS(&&, false_type, true_type)
* The newly-created %function contains the target of @a __x
* (if it has one).
*/
- function(function&& __x) : _Function_base()
+ function(function&& __x) noexcept : _Function_base()
{
__x.swap(*this);
}
@@ -2084,7 +2084,7 @@ _GLIBCXX_MEM_FN_TRAITS(&&, false_type, true_type)
* object, then this operation will not throw an %exception.
*/
function&
- operator=(function&& __x)
+ operator=(function&& __x) noexcept
{
function(std::move(__x)).swap(*this);
return *this;
diff --git a/libstdc++-v3/include/std/istream b/libstdc++-v3/include/std/istream
index 74c0d81e0a3..deb50d31ea8 100644
--- a/libstdc++-v3/include/std/istream
+++ b/libstdc++-v3/include/std/istream
@@ -150,9 +150,9 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
* whatever data is appropriate for the type of the argument.
*
* If an exception is thrown during extraction, ios_base::badbit
- * will be turned on in the stream's error state without causing an
- * ios_base::failure to be thrown. The original exception will then
- * be rethrown.
+ * will be turned on in the stream's error state (without causing an
+ * ios_base::failure to be thrown) and the original exception will
+ * be rethrown if badbit is set in the exceptions mask.
*/
//@{
@@ -286,9 +286,9 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
* by gcount().
*
* If an exception is thrown during extraction, ios_base::badbit
- * will be turned on in the stream's error state without causing an
- * ios_base::failure to be thrown. The original exception will then
- * be rethrown.
+ * will be turned on in the stream's error state (without causing an
+ * ios_base::failure to be thrown) and the original exception will
+ * be rethrown if badbit is set in the exceptions mask.
*/
/**
diff --git a/libstdc++-v3/include/std/scoped_allocator b/libstdc++-v3/include/std/scoped_allocator
index d163edd109a..5beb3a9295d 100644
--- a/libstdc++-v3/include/std/scoped_allocator
+++ b/libstdc++-v3/include/std/scoped_allocator
@@ -74,22 +74,36 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
: allocator_traits<_Alloc>::propagate_on_container_swap
{ };
-
template<typename _Alloc>
- inline auto
- __do_outermost(_Alloc& __a, _Alloc*) -> decltype(__a.outer_allocator())
- { return __a.outer_allocator(); }
+ using __outer_allocator_t
+ = decltype(std::declval<_Alloc>().outer_allocator());
+
+ template<typename _Alloc, typename = void>
+ struct __outermost_type
+ {
+ using type = _Alloc;
+ static type& _S_outermost(_Alloc& __a) { return __a; }
+ };
template<typename _Alloc>
- inline _Alloc&
- __do_outermost(_Alloc& __a, ...)
- { return __a; }
+ struct __outermost_type<_Alloc, __void_t<__outer_allocator_t<_Alloc>>>
+ : __outermost_type<
+ typename remove_reference<__outer_allocator_t<_Alloc>>::type
+ >
+ {
+ using __base = __outermost_type<
+ typename remove_reference<__outer_allocator_t<_Alloc>>::type
+ >;
+
+ static typename __base::type&
+ _S_outermost(_Alloc& __a)
+ { return __base::_S_outermost(__a.outer_allocator()); }
+ };
- // TODO: make recursive (see note in 20.12.4/1)
template<typename _Alloc>
- inline auto
- __outermost(_Alloc& __a) -> decltype(__do_outermost(__a, &__a))
- { return __do_outermost(__a, &__a); }
+ inline typename __outermost_type<_Alloc>::type&
+ __outermost(_Alloc& __a)
+ { return __outermost_type<_Alloc>::_S_outermost(__a); }
template<typename _OuterAlloc, typename... _InnerAllocs>
class scoped_allocator_adaptor;
@@ -196,13 +210,9 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
{ return std::tuple_cat(std::tie(outer_allocator()), _M_inner._M_tie()); }
template<typename _Alloc>
- using __outermost_type = typename
- std::decay<decltype(__outermost(std::declval<_Alloc&>()))>::type;
-
- template<typename _Alloc>
using __outermost_alloc_traits
- = allocator_traits<__outermost_type<_Alloc>>;
-
+ = allocator_traits<typename __outermost_type<_Alloc>::type>;
+
template<typename _Tp, typename... _Args>
void
_M_construct(__uses_alloc0, _Tp* __p, _Args&&... __args)
@@ -251,6 +261,12 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
_M_inner(_S_select_on_copy(std::get<_Indices+1>(__refs))...)
{ }
+ // Used to constrain constructors to disallow invalid conversions.
+ template<typename _Alloc>
+ using _Constructible = typename enable_if<
+ is_constructible<_OuterAlloc, _Alloc>::value
+ >::type;
+
public:
typedef _OuterAlloc outer_allocator_type;
typedef typename __inner_type::__type inner_allocator_type;
@@ -283,7 +299,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
scoped_allocator_adaptor() : _OuterAlloc(), _M_inner() { }
- template<typename _Outer2>
+ template<typename _Outer2, typename = _Constructible<_Outer2>>
scoped_allocator_adaptor(_Outer2&& __outer,
const _InnerAllocs&... __inner)
: _OuterAlloc(std::forward<_Outer2>(__outer)),
@@ -300,14 +316,14 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
_M_inner(std::move(__other._M_inner))
{ }
- template<typename _Outer2>
+ template<typename _Outer2, typename = _Constructible<const _Outer2&>>
scoped_allocator_adaptor(
const scoped_allocator_adaptor<_Outer2, _InnerAllocs...>& __other)
: _OuterAlloc(__other.outer_allocator()),
_M_inner(__other._M_inner)
{ }
- template<typename _Outer2>
+ template<typename _Outer2, typename = _Constructible<_Outer2>>
scoped_allocator_adaptor(
scoped_allocator_adaptor<_Outer2, _InnerAllocs...>&& __other)
: _OuterAlloc(std::move(__other.outer_allocator())),
diff --git a/libstdc++-v3/include/std/sstream b/libstdc++-v3/include/std/sstream
index aa4a71aa5ac..fe67d3d4a60 100644
--- a/libstdc++-v3/include/std/sstream
+++ b/libstdc++-v3/include/std/sstream
@@ -302,18 +302,31 @@ _GLIBCXX_BEGIN_NAMESPACE_CXX11
__xfer_bufptrs(const basic_stringbuf& __from, basic_stringbuf* __to)
: _M_to{__to}, _M_goff{-1, -1, -1}, _M_poff{-1, -1, -1}
{
- const _CharT* __str = __from._M_string.data();
+ const _CharT* const __str = __from._M_string.data();
+ const _CharT* __end = nullptr;
if (__from.eback())
{
- _M_goff[0] = __from.eback() - __str;
- _M_goff[1] = __from.gptr() - __str;
- _M_goff[2] = __from.egptr() - __str;
+ _M_goff[0] = __from.eback() - __str;
+ _M_goff[1] = __from.gptr() - __str;
+ _M_goff[2] = __from.egptr() - __str;
+ __end = __from.egptr();
}
if (__from.pbase())
{
_M_poff[0] = __from.pbase() - __str;
_M_poff[1] = __from.pptr() - __from.pbase();
_M_poff[2] = __from.epptr() - __str;
+ if (__from.pptr() > __end)
+ __end = __from.pptr();
+ }
+
+ // Set _M_string length to the greater of the get and put areas.
+ if (__end)
+ {
+ // The const_cast avoids changing this constructor's signature,
+ // because it is exported from the dynamic library.
+ auto& __mut_from = const_cast<basic_stringbuf&>(__from);
+ __mut_from._M_string._M_length(__end - __str);
}
}
diff --git a/libstdc++-v3/include/std/utility b/libstdc++-v3/include/std/utility
index 1aac77c10cb..0ca85dfbb4b 100644
--- a/libstdc++-v3/include/std/utility
+++ b/libstdc++-v3/include/std/utility
@@ -202,17 +202,28 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
// Stores a tuple of indices. Used by tuple and pair, and by bind() to
// extract the elements in a tuple.
- template<size_t... _Indexes>
- struct _Index_tuple
+ template<size_t... _Indexes> struct _Index_tuple { };
+
+ // Concatenates two _Index_tuples.
+ template<typename _Itup1, typename _Itup2> struct _Itup_cat;
+
+ template<size_t... _Ind1, size_t... _Ind2>
+ struct _Itup_cat<_Index_tuple<_Ind1...>, _Index_tuple<_Ind2...>>
{
- typedef _Index_tuple<_Indexes..., sizeof...(_Indexes)> __next;
+ using __type = _Index_tuple<_Ind1..., (_Ind2 + sizeof...(_Ind1))...>;
};
// Builds an _Index_tuple<0, 1, 2, ..., _Num-1>.
template<size_t _Num>
struct _Build_index_tuple
+ : _Itup_cat<typename _Build_index_tuple<_Num / 2>::__type,
+ typename _Build_index_tuple<_Num - _Num / 2>::__type>
+ { };
+
+ template<>
+ struct _Build_index_tuple<1>
{
- typedef typename _Build_index_tuple<_Num - 1>::__type::__next __type;
+ typedef _Index_tuple<0> __type;
};
template<>
diff --git a/libstdc++-v3/libsupc++/cxxabi.h b/libstdc++-v3/libsupc++/cxxabi.h
index 571e42e9ad1..322007c16a5 100644
--- a/libstdc++-v3/libsupc++/cxxabi.h
+++ b/libstdc++-v3/libsupc++/cxxabi.h
@@ -185,7 +185,7 @@ namespace __cxxabiv1
* with GNU extensions. For example, this function is used in
* __gnu_cxx::__verbose_terminate_handler.
*
- * See http://gcc.gnu.org/onlinedocs/libstdc++/manual/bk01pt12ch39.html
+ * See https://gcc.gnu.org/onlinedocs/libstdc++/manual/ext_demangling.html
* for other examples of use.
*
* @note The same demangling functionality is available via
diff --git a/libstdc++-v3/python/libstdcxx/v6/printers.py b/libstdc++-v3/python/libstdcxx/v6/printers.py
index 51bd03a3ac5..babde0bc4a6 100644
--- a/libstdc++-v3/python/libstdcxx/v6/printers.py
+++ b/libstdc++-v3/python/libstdcxx/v6/printers.py
@@ -85,9 +85,8 @@ except ImportError:
def find_type(orig, name):
typ = orig.strip_typedefs()
while True:
- # Use typ.name here instead of str(typ) to discard any const,etc.
- # qualifiers. PR 67440.
- search = typ.name + '::' + name
+ # Strip cv-qualifiers. PR 67440.
+ search = '%s::%s' % (typ.unqualified(), name)
try:
return gdb.lookup_type(search)
except RuntimeError:
@@ -174,9 +173,11 @@ class StdListIteratorPrinter:
self.typename = typename
def to_string(self):
+ if not self.val['_M_node']:
+ return 'non-dereferenceable iterator for std::list'
nodetype = find_type(self.val.type, '_Node')
nodetype = nodetype.strip_typedefs().pointer()
- return self.val['_M_node'].cast(nodetype).dereference()['_M_data']
+ return str(self.val['_M_node'].cast(nodetype).dereference()['_M_data'])
class StdSlistPrinter:
"Print a __gnu_cxx::slist"
@@ -219,9 +220,11 @@ class StdSlistIteratorPrinter:
self.val = val
def to_string(self):
+ if not self.val['_M_node']:
+ return 'non-dereferenceable iterator for __gnu_cxx::slist'
nodetype = find_type(self.val.type, '_Node')
nodetype = nodetype.strip_typedefs().pointer()
- return self.val['_M_node'].cast(nodetype).dereference()['_M_data']
+ return str(self.val['_M_node'].cast(nodetype).dereference()['_M_data'])
class StdVectorPrinter:
"Print a std::vector"
@@ -306,7 +309,9 @@ class StdVectorIteratorPrinter:
self.val = val
def to_string(self):
- return self.val['_M_current'].dereference()
+ if not self.val['_M_current']:
+ return 'non-dereferenceable iterator for std::vector'
+ return str(self.val['_M_current'].dereference())
class StdTuplePrinter:
"Print a std::tuple"
@@ -463,8 +468,10 @@ class StdRbtreeIteratorPrinter:
self.link_type = nodetype.strip_typedefs().pointer()
def to_string (self):
+ if not self.val['_M_node']:
+ return 'non-dereferenceable iterator for associative container'
node = self.val['_M_node'].cast(self.link_type).dereference()
- return get_value_from_Rb_tree_node(node)
+ return str(get_value_from_Rb_tree_node(node))
class StdDebugIteratorPrinter:
"Print a debug enabled version of an iterator"
@@ -476,7 +483,7 @@ class StdDebugIteratorPrinter:
# and return the wrapped iterator value.
def to_string (self):
itype = self.val.type.template_argument(0)
- return self.val.cast(itype)
+ return str(self.val.cast(itype))
class StdMapPrinter:
"Print a std::map or std::multimap"
@@ -669,7 +676,9 @@ class StdDequeIteratorPrinter:
self.val = val
def to_string(self):
- return self.val['_M_cur'].dereference()
+ if not self.val['_M_cur']:
+ return 'non-dereferenceable iterator for std::deque'
+ return str(self.val['_M_cur'].dereference())
class StdStringPrinter:
"Print a std::basic_string of some kind"
@@ -1343,6 +1352,7 @@ def build_libstdcxx_dictionary ():
libstdcxx_printer.add_container('std::', 'bitset', StdBitsetPrinter)
libstdcxx_printer.add_container('std::', 'deque', StdDequePrinter)
libstdcxx_printer.add_container('std::', 'list', StdListPrinter)
+ libstdcxx_printer.add_container('std::__cxx11::', 'list', StdListPrinter)
libstdcxx_printer.add_container('std::', 'map', StdMapPrinter)
libstdcxx_printer.add_container('std::', 'multimap', StdMapPrinter)
libstdcxx_printer.add_container('std::', 'multiset', StdSetPrinter)
diff --git a/libstdc++-v3/python/libstdcxx/v6/xmethods.py b/libstdc++-v3/python/libstdcxx/v6/xmethods.py
index 4505f0f0669..fb0af74a810 100644
--- a/libstdc++-v3/python/libstdcxx/v6/xmethods.py
+++ b/libstdc++-v3/python/libstdcxx/v6/xmethods.py
@@ -381,7 +381,7 @@ class ListMethodsMatcher(gdb.xmethod.XMethodMatcher):
self.methods = [self._method_dict[m] for m in self._method_dict]
def match(self, class_type, method_name):
- if not re.match('^std::list<.*>$', class_type.tag):
+ if not re.match('^std::(__cxx11::)?list<.*>$', class_type.tag):
return None
method = self._method_dict.get(method_name)
if method is None or not method.enabled:
diff --git a/libstdc++-v3/testsuite/18_support/bad_exception/23591_thread-1.c b/libstdc++-v3/testsuite/18_support/bad_exception/23591_thread-1.c
index c460ca91c71..4d65507b3e1 100644
--- a/libstdc++-v3/testsuite/18_support/bad_exception/23591_thread-1.c
+++ b/libstdc++-v3/testsuite/18_support/bad_exception/23591_thread-1.c
@@ -1,4 +1,5 @@
// { dg-require-sharedlib "" }
+// { dg-skip-if "invalid options for C" { *-*-* } { "-std=c++??" "-std=gnu++??" } }
// { dg-options "-g -O2 -pthread -ldl -x c -fvtable-verify=none" { target *-*-linux* *-*-gnu* } }
// Copyright (C) 2005-2015 Free Software Foundation, Inc.
diff --git a/libstdc++-v3/testsuite/19_diagnostics/headers/system_error/errc_std_c++0x.cc b/libstdc++-v3/testsuite/19_diagnostics/headers/system_error/errc_std_c++0x.cc
index ecb7fa394b2..f452ec47a72 100644
--- a/libstdc++-v3/testsuite/19_diagnostics/headers/system_error/errc_std_c++0x.cc
+++ b/libstdc++-v3/testsuite/19_diagnostics/headers/system_error/errc_std_c++0x.cc
@@ -83,7 +83,9 @@ void test01()
TEST_ERRC(no_message_available);
#endif
+#ifdef _GLIBCXX_HAVE_ENOMSG
TEST_ERRC(no_message);
+#endif
TEST_ERRC(no_protocol_option);
TEST_ERRC(no_space_on_device);
diff --git a/libstdc++-v3/testsuite/20_util/duration/cons/dr1177.cc b/libstdc++-v3/testsuite/20_util/duration/cons/dr1177.cc
new file mode 100644
index 00000000000..66ac8e6fc65
--- /dev/null
+++ b/libstdc++-v3/testsuite/20_util/duration/cons/dr1177.cc
@@ -0,0 +1,42 @@
+// Copyright (C) 2017 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/>.
+
+// { dg-options "-std=gnu++11" }
+// { dg-do compile }
+
+#include <chrono>
+#include <type_traits>
+
+using namespace std;
+using namespace std::chrono;
+
+// DR 1177
+static_assert(is_constructible<duration<float>, duration<double>>{},
+ "can convert duration with one floating point rep to another");
+static_assert(is_constructible<duration<float>, duration<int>>{},
+ "can convert duration with integral rep to one with floating point rep");
+static_assert(!is_constructible<duration<int>, duration<float>>{},
+ "cannot convert duration with floating point rep to one with integral rep");
+static_assert(is_constructible<duration<int>, duration<long>>{},
+ "can convert duration with one integral rep to another");
+
+static_assert(!is_constructible<duration<int>, duration<int, ratio<2,3>>>{},
+ "cannot convert duration to one with different period");
+static_assert(is_constructible<duration<float>, duration<int, ratio<2,3>>>{},
+ "unless it has a floating-point representation");
+static_assert(is_constructible<duration<float>, duration<int, ratio<1,3>>>{},
+ "or a period that is an integral multiple of the original");
diff --git a/libstdc++-v3/testsuite/20_util/duration/literals/range.cc b/libstdc++-v3/testsuite/20_util/duration/literals/range.cc
index 9cd3215067a..0f51945255f 100644
--- a/libstdc++-v3/testsuite/20_util/duration/literals/range.cc
+++ b/libstdc++-v3/testsuite/20_util/duration/literals/range.cc
@@ -27,5 +27,5 @@ test01()
// std::numeric_limits<int64_t>::max() == 9223372036854775807;
auto h = 9223372036854775808h;
- // { dg-error "cannot be represented" "" { target *-*-* } 797 }
+ // { dg-error "cannot be represented" "" { target *-*-* } 798 }
}
diff --git a/libstdc++-v3/testsuite/20_util/function/assign/move.cc b/libstdc++-v3/testsuite/20_util/function/assign/move.cc
index 31b74efcb4c..d14350d3373 100644
--- a/libstdc++-v3/testsuite/20_util/function/assign/move.cc
+++ b/libstdc++-v3/testsuite/20_util/function/assign/move.cc
@@ -40,11 +40,12 @@ void test01()
fo2 = (std::move(fo));
VERIFY( static_cast<bool>(fo2) );
VERIFY( fo2() == 2 );
+
+ static_assert(std::is_nothrow_move_assignable<function>::value,
+ "PR libstdc++/81017");
}
int main()
{
test01();
-
- return 0;
}
diff --git a/libstdc++-v3/testsuite/20_util/function/cons/move.cc b/libstdc++-v3/testsuite/20_util/function/cons/move.cc
index a272cf5bc6e..8d7a5d1d55d 100644
--- a/libstdc++-v3/testsuite/20_util/function/cons/move.cc
+++ b/libstdc++-v3/testsuite/20_util/function/cons/move.cc
@@ -38,11 +38,12 @@ void test01()
function fo2(std::move(fo));
VERIFY( static_cast<bool>(fo2) );
VERIFY( fo2() == 2 );
+
+ static_assert(std::is_nothrow_move_constructible<function>::value,
+ "PR libstdc++/81017");
}
int main()
{
test01();
-
- return 0;
}
diff --git a/libstdc++-v3/testsuite/20_util/owner_less/noexcept.cc b/libstdc++-v3/testsuite/20_util/owner_less/noexcept.cc
new file mode 100644
index 00000000000..a1ef34aab50
--- /dev/null
+++ b/libstdc++-v3/testsuite/20_util/owner_less/noexcept.cc
@@ -0,0 +1,32 @@
+// Copyright (C) 2017 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/>.
+
+// { dg-options "-std=gnu++11" }
+// { dg-do compile }
+
+#include <memory>
+
+const std::shared_ptr<int> si;
+const std::weak_ptr<int> wi;
+const std::owner_less<std::shared_ptr<int>> osi;
+static_assert( noexcept(osi(si, si)), "" );
+static_assert( noexcept(osi(si, wi)), "" );
+static_assert( noexcept(osi(wi, si)), "" );
+const std::owner_less<std::weak_ptr<int>> owi;
+static_assert( noexcept(owi(wi, wi)), "" );
+static_assert( noexcept(owi(si, wi)), "" );
+static_assert( noexcept(owi(wi, si)), "" );
diff --git a/libstdc++-v3/testsuite/20_util/reference_wrapper/80504.cc b/libstdc++-v3/testsuite/20_util/reference_wrapper/80504.cc
new file mode 100644
index 00000000000..d46ffcd056b
--- /dev/null
+++ b/libstdc++-v3/testsuite/20_util/reference_wrapper/80504.cc
@@ -0,0 +1,35 @@
+// Copyright (C) 2017 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/>.
+
+// { dg-options "-std=gnu++11" }
+// { dg-do compile }
+
+#include <functional>
+
+namespace X {
+ struct Y { };
+ template<typename T> void ref(T) { }
+ template<typename T> void cref(T) { }
+}
+
+int main()
+{
+ X::Y i;
+ std::reference_wrapper<X::Y> r(i);
+ ref(r);
+ cref(r);
+}
diff --git a/libstdc++-v3/testsuite/20_util/reference_wrapper/invoke.cc b/libstdc++-v3/testsuite/20_util/reference_wrapper/invoke.cc
index 7ecc5292219..bbbaed231c6 100644
--- a/libstdc++-v3/testsuite/20_util/reference_wrapper/invoke.cc
+++ b/libstdc++-v3/testsuite/20_util/reference_wrapper/invoke.cc
@@ -75,8 +75,7 @@ void test01()
int (::X::* p_foo_c)(float) const = &::X::foo_c;
int (::X::* p_foo_v)(float) volatile = &::X::foo_v;
int (::X::* p_foo_cv)(float) const volatile = &::X::foo_cv;
- int (::X::* p_foo_varargs)(float, ...) __attribute__((unused))
- = &::X::foo_varargs;
+ int (::X::* p_foo_varargs)(float, ...) = &::X::foo_varargs;
int ::X::* p_bar = &::X::bar;
const float pi = 3.14;
@@ -98,10 +97,10 @@ void test01()
VERIFY(ref(p_foo_v)(xp, pi) == 3);
VERIFY(ref(p_foo_cv)(x, pi) == 3);
VERIFY(ref(p_foo_cv)(xp, pi) == 3);
- // VERIFY(ref(p_foo_varargs)(x, pi) == 3);
- // VERIFY(ref(p_foo_varargs)(xp, pi, 1, 1) == 3);
- // VERIFY(ref(p_foo_varargs)(x, pi, 1, 1) == 3);
- // VERIFY(ref(p_foo_varargs)(xp, pi) == 3);
+ VERIFY(ref(p_foo_varargs)(x, pi) == 3);
+ VERIFY(ref(p_foo_varargs)(xp, pi, 1, 1) == 3);
+ VERIFY(ref(p_foo_varargs)(x, pi, 1, 1) == 3);
+ VERIFY(ref(p_foo_varargs)(xp, pi) == 3);
// Member data pointers
VERIFY(ref(p_bar)(x) == 17);
diff --git a/libstdc++-v3/testsuite/20_util/scoped_allocator/3.cc b/libstdc++-v3/testsuite/20_util/scoped_allocator/3.cc
new file mode 100644
index 00000000000..c96c9aa099e
--- /dev/null
+++ b/libstdc++-v3/testsuite/20_util/scoped_allocator/3.cc
@@ -0,0 +1,67 @@
+// Copyright (C) 2016 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/>.
+
+// { dg-do compile }
+// { dg-options "-std=gnu++11" }
+
+#include <scoped_allocator>
+#include <testsuite_allocator.h>
+
+template<typename T>
+struct alloc
+{
+ using value_type = T;
+ alloc() = default;
+ template<typename U>
+ alloc(alloc<U>) { }
+ T* allocate(std::size_t);
+ void deallocate(T*, std::size_t);
+};
+
+template<typename T, typename U>
+ bool operator==(alloc<T>, alloc<U>) { return true; }
+
+template<typename T, typename U>
+ bool operator!=(alloc<T>, alloc<U>) { return false; }
+
+using scoped = std::scoped_allocator_adaptor<alloc<int>>;
+using other_alloc = __gnu_test::SimpleAllocator<int>;
+using other_scoped = std::scoped_allocator_adaptor<other_alloc>;
+
+using std::is_constructible;
+
+static_assert( is_constructible<scoped, const scoped&>::value,
+ "is_constructible<scoped, const scoped&>");
+static_assert( is_constructible<scoped, scoped>::value,
+ "is_constructible<scoped, scoped>");
+static_assert( is_constructible<scoped, const alloc<int>&>::value,
+ "is_constructible<scoped, const outer_allocator_type&>");
+static_assert( is_constructible<scoped, alloc<int>>::value,
+ "is_constructible<scoped, outer_allocator_type>");
+static_assert( is_constructible<scoped, const alloc<long>&>::value,
+ "is_constructible<scoped, const outer_allocator_type::rebind<U>::type&>");
+static_assert( is_constructible<scoped, alloc<long>>::value,
+ "is_constructible<scoped, outer_allocator_type::rebind<U>::type>");
+
+static_assert( !is_constructible<scoped, const other_alloc&>::value,
+ "!is_constructible<scoped, const other_alloc&>");
+static_assert( !is_constructible<scoped, other_alloc>::value,
+ "!is_constructible<scoped, other_alloc>");
+static_assert( !is_constructible<scoped, const other_scoped&>::value,
+ "!is_constructible<scoped, const other_scoped&>");
+static_assert( !is_constructible<scoped, other_scoped>::value,
+ "!is_constructible<scoped, other_scoped>");
diff --git a/libstdc++-v3/testsuite/20_util/scoped_allocator/outermost.cc b/libstdc++-v3/testsuite/20_util/scoped_allocator/outermost.cc
new file mode 100644
index 00000000000..5973adcec3a
--- /dev/null
+++ b/libstdc++-v3/testsuite/20_util/scoped_allocator/outermost.cc
@@ -0,0 +1,92 @@
+// Copyright (C) 2016 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/>.
+
+// { dg-do compile }
+// { dg-options "-std=gnu++11" }
+
+#include <scoped_allocator>
+
+template<typename T>
+struct alloc
+{
+ using value_type = T;
+ alloc() = default;
+ template<typename U>
+ alloc(alloc<U>) { }
+ T* allocate(std::size_t);
+ void deallocate(T*, std::size_t);
+};
+
+template<typename T, typename U>
+ bool operator==(alloc<T>, alloc<U>) { return true; }
+
+template<typename T, typename U>
+ bool operator!=(alloc<T>, alloc<U>) { return false; }
+
+struct X
+{
+ using allocator_type = alloc<int>;
+ X(const allocator_type&);
+};
+
+template<typename A>
+struct nested_alloc : A
+{
+ nested_alloc() = default;
+ template<typename U>
+ nested_alloc(nested_alloc<U>) { }
+
+ A& outer_allocator() { return *this; }
+
+ template<typename U, typename... Args>
+ void construct(U*, Args&&...)
+ {
+ static_assert(!std::is_same<U, X>::value,
+ "OUTERMOST should recurse and use alloc<int> to construct X");
+ }
+};
+
+template<typename T, typename U>
+ bool operator==(nested_alloc<T> l, nested_alloc<U> r)
+ { return l.outer_allocator() == r.outer_allocator(); }
+
+template<typename T, typename U>
+ bool operator!=(nested_alloc<T> l, nested_alloc<U> r)
+ { return !(l == r); }
+
+template<typename A>
+ using scoped_alloc = std::scoped_allocator_adaptor<A>;
+
+void
+test01()
+{
+ scoped_alloc<nested_alloc<alloc<int>>> a;
+ alignas(X) char buf[sizeof(X)];
+ X* p = (X*)buf;
+ // Test that OUTERMOST is recursive and doesn't just unwrap one level:
+ a.construct(p);
+}
+
+void
+test02()
+{
+ scoped_alloc<scoped_alloc<nested_alloc<alloc<int>>>> a;
+ alignas(X) char buf[sizeof(X)];
+ X* p = (X*)buf;
+ // Test that OUTERMOST is recursive and doesn't just unwrap one level:
+ a.construct(p);
+}
diff --git a/libstdc++-v3/testsuite/20_util/shared_ptr/observers/owner_before.cc b/libstdc++-v3/testsuite/20_util/shared_ptr/observers/owner_before.cc
index 11b9b899d7f..6bf6a0249c0 100644
--- a/libstdc++-v3/testsuite/20_util/shared_ptr/observers/owner_before.cc
+++ b/libstdc++-v3/testsuite/20_util/shared_ptr/observers/owner_before.cc
@@ -71,6 +71,12 @@ test02()
VERIFY( !a1.owner_before(w1) && !w1.owner_before(a1) );
std::weak_ptr<A> w2(a2);
VERIFY( !b1.owner_before(w2) && !w2.owner_before(b1) );
+
+ static_assert( noexcept(a1.owner_before(a0)), "" );
+ static_assert( noexcept(a1.owner_before(b1)), "" );
+ static_assert( noexcept(b1.owner_before(a1)), "" );
+ static_assert( noexcept(a1.owner_before(w1)), "" );
+ static_assert( noexcept(b1.owner_before(w1)), "" );
}
// Aliasing
diff --git a/libstdc++-v3/testsuite/20_util/time_point/cons/81468.cc b/libstdc++-v3/testsuite/20_util/time_point/cons/81468.cc
new file mode 100644
index 00000000000..4c9d5c25028
--- /dev/null
+++ b/libstdc++-v3/testsuite/20_util/time_point/cons/81468.cc
@@ -0,0 +1,35 @@
+// Copyright (C) 2017 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/>.
+
+// { dg-options "-std=gnu++11" }
+// { dg-do compile }
+
+#include <chrono>
+#include <type_traits>
+
+using namespace std;
+using namespace std::chrono;
+
+template <class Duration>
+ using sys_time = time_point<system_clock, Duration>;
+
+static_assert(is_constructible<sys_time<milliseconds>, sys_time<seconds>>{},
+ "Can construct time_point from one with lower precision duration");
+
+// PR libstdc++/81468 - DR 1177
+static_assert(!is_constructible<sys_time<seconds>, sys_time<milliseconds>>{},
+ "Cannot construct time_point from one with higher precision duration");
diff --git a/libstdc++-v3/testsuite/20_util/weak_ptr/observers/owner_before.cc b/libstdc++-v3/testsuite/20_util/weak_ptr/observers/owner_before.cc
index 4a615ed77b6..37d7a6f5a23 100644
--- a/libstdc++-v3/testsuite/20_util/weak_ptr/observers/owner_before.cc
+++ b/libstdc++-v3/testsuite/20_util/weak_ptr/observers/owner_before.cc
@@ -27,7 +27,7 @@ struct B { };
// 20.6.6.3.5 weak_ptr observers [util.smartptr.weak.obs]
-int
+void
test01()
{
bool test __attribute__((unused)) = true;
@@ -40,11 +40,14 @@ test01()
std::shared_ptr<B> p3;
VERIFY( !p1.owner_before(p3) && !p3.owner_before(p1) );
- return 0;
+ static_assert( noexcept(p1.owner_before(p1)), "" );
+ static_assert( noexcept(p1.owner_before(p2)), "" );
+ static_assert( noexcept(p1.owner_before(p3)), "" );
+ static_assert( noexcept(p2.owner_before(p1)), "" );
}
-int
+void
test02()
{
bool test __attribute__((unused)) = true;
@@ -64,8 +67,6 @@ test02()
std::shared_ptr<B> b1(new B);
VERIFY( w1.owner_before(b1) || b1.owner_before(w1) );
-
- return 0;
}
int
diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/codecvt_utf16/79980.cc b/libstdc++-v3/testsuite/22_locale/codecvt/codecvt_utf16/79980.cc
index d8b9729ed5b..7bef2f717d3 100644
--- a/libstdc++-v3/testsuite/22_locale/codecvt/codecvt_utf16/79980.cc
+++ b/libstdc++-v3/testsuite/22_locale/codecvt/codecvt_utf16/79980.cc
@@ -15,7 +15,7 @@
// with this library; see the file COPYING3. If not see
// <http://www.gnu.org/licenses/>.
-// { dg-do run { target c++11 } }
+// { dg-options "-std=gnu++11" }
#include <locale>
#include <codecvt>
diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/codecvt_utf16/80041.cc b/libstdc++-v3/testsuite/22_locale/codecvt/codecvt_utf16/80041.cc
index a78b194212d..f3e7464b743 100644
--- a/libstdc++-v3/testsuite/22_locale/codecvt/codecvt_utf16/80041.cc
+++ b/libstdc++-v3/testsuite/22_locale/codecvt/codecvt_utf16/80041.cc
@@ -15,7 +15,7 @@
// with this library; see the file COPYING3. If not see
// <http://www.gnu.org/licenses/>.
-// { dg-do run { target c++11 } }
+// { dg-options "-std=gnu++11" }
#include <codecvt>
#include <testsuite_hooks.h>
diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/codecvt_utf16/members.cc b/libstdc++-v3/testsuite/22_locale/codecvt/codecvt_utf16/members.cc
index 993c86082c1..b11da5babaa 100644
--- a/libstdc++-v3/testsuite/22_locale/codecvt/codecvt_utf16/members.cc
+++ b/libstdc++-v3/testsuite/22_locale/codecvt/codecvt_utf16/members.cc
@@ -15,7 +15,7 @@
// with this library; see the file COPYING3. If not see
// <http://www.gnu.org/licenses/>.
-// { dg-do run { target c++11 } }
+// { dg-options "-std=gnu++11" }
#include <codecvt>
#include <testsuite_hooks.h>
diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/codecvt_utf16/misaligned.cc b/libstdc++-v3/testsuite/22_locale/codecvt/codecvt_utf16/misaligned.cc
index 0179c184c20..b243bc3a0fe 100644
--- a/libstdc++-v3/testsuite/22_locale/codecvt/codecvt_utf16/misaligned.cc
+++ b/libstdc++-v3/testsuite/22_locale/codecvt/codecvt_utf16/misaligned.cc
@@ -15,7 +15,7 @@
// with this library; see the file COPYING3. If not see
// <http://www.gnu.org/licenses/>.
-// { dg-do run { target c++11 } }
+// { dg-options "-std=gnu++11" }
#include <locale>
#include <codecvt>
diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/codecvt_utf8/79980.cc b/libstdc++-v3/testsuite/22_locale/codecvt/codecvt_utf8/79980.cc
index 1251acb85be..5dfcf2280bd 100644
--- a/libstdc++-v3/testsuite/22_locale/codecvt/codecvt_utf8/79980.cc
+++ b/libstdc++-v3/testsuite/22_locale/codecvt/codecvt_utf8/79980.cc
@@ -15,7 +15,7 @@
// with this library; see the file COPYING3. If not see
// <http://www.gnu.org/licenses/>.
-// { dg-do run { target c++11 } }
+// { dg-options "-std=gnu++11" }
#include <codecvt>
#include <locale>
diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/codecvt_utf8/members.cc b/libstdc++-v3/testsuite/22_locale/codecvt/codecvt_utf8/members.cc
index baeb049861a..593d0ffee63 100644
--- a/libstdc++-v3/testsuite/22_locale/codecvt/codecvt_utf8/members.cc
+++ b/libstdc++-v3/testsuite/22_locale/codecvt/codecvt_utf8/members.cc
@@ -15,7 +15,7 @@
// with this library; see the file COPYING3. If not see
// <http://www.gnu.org/licenses/>.
-// { dg-do run { target c++11 } }
+// { dg-options "-std=gnu++11" }
#include <codecvt>
#include <testsuite_hooks.h>
diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/codecvt_utf8_utf16/79511.cc b/libstdc++-v3/testsuite/22_locale/codecvt/codecvt_utf8_utf16/79511.cc
index 5555bcba6fe..cb551924064 100644
--- a/libstdc++-v3/testsuite/22_locale/codecvt/codecvt_utf8_utf16/79511.cc
+++ b/libstdc++-v3/testsuite/22_locale/codecvt/codecvt_utf8_utf16/79511.cc
@@ -15,7 +15,7 @@
// with this library; see the file COPYING3. If not see
// <http://www.gnu.org/licenses/>.
-// { dg-do run { target c++11 } }
+// { dg-options "-std=gnu++11" }
#include <locale>
#include <codecvt>
diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/codecvt_utf8_utf16/members.cc b/libstdc++-v3/testsuite/22_locale/codecvt/codecvt_utf8_utf16/members.cc
index 8fcdfff2cc1..6a1bbf87954 100644
--- a/libstdc++-v3/testsuite/22_locale/codecvt/codecvt_utf8_utf16/members.cc
+++ b/libstdc++-v3/testsuite/22_locale/codecvt/codecvt_utf8_utf16/members.cc
@@ -15,7 +15,7 @@
// with this library; see the file COPYING3. If not see
// <http://www.gnu.org/licenses/>.
-// { dg-do run { target c++11 } }
+// { dg-options "-std=gnu++11" }
#include <codecvt>
#include <testsuite_hooks.h>
diff --git a/libstdc++-v3/testsuite/22_locale/conversions/buffer/2.cc b/libstdc++-v3/testsuite/22_locale/conversions/buffer/2.cc
new file mode 100644
index 00000000000..3efb51ff1c2
--- /dev/null
+++ b/libstdc++-v3/testsuite/22_locale/conversions/buffer/2.cc
@@ -0,0 +1,40 @@
+// Copyright (C) 2017 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/>.
+
+// { dg-options "-std=gnu++11" }
+// { dg-do run }
+
+#include <locale>
+#include <sstream>
+#include <testsuite_hooks.h>
+
+void
+test01()
+{
+ struct Cvt : std::codecvt<char, char, std::mbstate_t> { };
+ std::stringstream ss;
+ std::wbuffer_convert<Cvt, char> cvt(ss.rdbuf());
+ auto p = ss.std::ios::rdbuf(&cvt);
+ ss << "hello";
+ VERIFY( ss.flush().good() );
+ ss.std::ios::rdbuf(p);
+}
+
+int main()
+{
+ test01();
+}
diff --git a/libstdc++-v3/testsuite/23_containers/unordered_map/cons/81891.cc b/libstdc++-v3/testsuite/23_containers/unordered_map/cons/81891.cc
new file mode 100644
index 00000000000..5c068aa23be
--- /dev/null
+++ b/libstdc++-v3/testsuite/23_containers/unordered_map/cons/81891.cc
@@ -0,0 +1,68 @@
+// Copyright (C) 2017 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/>.
+
+// { dg-options "-std=gnu++11" }
+
+#include <unordered_map>
+#include <testsuite_hooks.h>
+#include <testsuite_allocator.h>
+
+struct fails_on_copy {
+ fails_on_copy() = default;
+ fails_on_copy(const fails_on_copy&) { throw 0; };
+};
+
+using value_type = std::pair<int, fails_on_copy>;
+
+void
+test01()
+{
+ value_type p;
+ try
+ {
+ std::unordered_map<int, fails_on_copy> umap(&p, &p + 1);
+ }
+ catch(...)
+ { }
+}
+
+void
+test02()
+{
+ using Alloc = __gnu_test::tracker_allocator<value_type>;
+ using std::hash;
+ using std::equal_to;
+
+ value_type p;
+ try
+ {
+ std::unordered_map<int, fails_on_copy, hash<int>, equal_to<int>, Alloc>
+ umap(&p, &p + 1);
+ }
+ catch(...)
+ { }
+
+ using counter = __gnu_test::tracker_allocator_counter;
+ VERIFY(counter::get_allocation_count() == counter::get_deallocation_count());
+}
+
+int
+main()
+{
+ test01();
+ test02();
+}
diff --git a/libstdc++-v3/testsuite/27_io/basic_fstream/53984.cc b/libstdc++-v3/testsuite/27_io/basic_fstream/53984.cc
new file mode 100644
index 00000000000..a319aff1c62
--- /dev/null
+++ b/libstdc++-v3/testsuite/27_io/basic_fstream/53984.cc
@@ -0,0 +1,64 @@
+// Copyright (C) 2017 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/>.
+
+// { dg-require-fileio "" }
+
+// PR libstdc++/53984
+
+#include <fstream>
+#include <testsuite_hooks.h>
+
+void
+test01()
+{
+ std::ifstream in(".");
+ if (in)
+ {
+ char c;
+ if (in.get(c))
+ {
+ // Reading a directory doesn't produce an error on this target
+ // so the formatted input functions below wouldn't fail anyway
+ // (see PR libstdc++/81808).
+ return;
+ }
+ int x;
+ in.clear();
+ // Formatted input function should set badbit, but not throw:
+ in >> x;
+ VERIFY( in.bad() );
+
+ in.clear();
+ in.exceptions(std::ios::badbit);
+ try
+ {
+ // Formatted input function should set badbit, and throw:
+ in >> x;
+ VERIFY( false );
+ }
+ catch (const std::exception&)
+ {
+ VERIFY( in.bad() );
+ }
+ }
+}
+
+int
+main()
+{
+ test01();
+}
diff --git a/libstdc++-v3/testsuite/27_io/basic_istream/sentry/char/53984.cc b/libstdc++-v3/testsuite/27_io/basic_istream/sentry/char/53984.cc
new file mode 100644
index 00000000000..9c08c7236da
--- /dev/null
+++ b/libstdc++-v3/testsuite/27_io/basic_istream/sentry/char/53984.cc
@@ -0,0 +1,41 @@
+// Copyright (C) 2017 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 <streambuf>
+#include <istream>
+#include <testsuite_hooks.h>
+
+struct SB : std::streambuf
+{
+ virtual int_type underflow() { throw 1; }
+};
+
+void
+test01()
+{
+ SB sb;
+ std::istream is(&sb);
+ int i;
+ is >> i;
+ VERIFY( is.bad() );
+}
+
+int
+main()
+{
+ test01();
+}
diff --git a/libstdc++-v3/testsuite/27_io/basic_stringstream/assign/81338.cc b/libstdc++-v3/testsuite/27_io/basic_stringstream/assign/81338.cc
new file mode 100644
index 00000000000..3c6c54b4d0c
--- /dev/null
+++ b/libstdc++-v3/testsuite/27_io/basic_stringstream/assign/81338.cc
@@ -0,0 +1,40 @@
+// Copyright (C) 2017 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/>.
+
+// { dg-options "-std=gnu++11" }
+
+#include <sstream>
+#include <testsuite_hooks.h>
+
+void
+test01()
+{
+ std::stringstream ss;
+ for (int i = 0; i < 100; ++i)
+ {
+ ss << 'a';
+ VERIFY( static_cast<bool>(ss) );
+ VERIFY( ss.str() == "a" );
+ ss = std::stringstream();
+ }
+}
+
+int
+main()
+{
+ test01();
+}
diff --git a/libstdc++-v3/testsuite/28_regex/basic_regex/ctors/basic/iter.cc b/libstdc++-v3/testsuite/28_regex/basic_regex/ctors/basic/iter.cc
new file mode 100644
index 00000000000..4c70e0d6241
--- /dev/null
+++ b/libstdc++-v3/testsuite/28_regex/basic_regex/ctors/basic/iter.cc
@@ -0,0 +1,32 @@
+// Copyright (C) 2017 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/>.
+
+// { dg-options "-std=gnu++11" }
+// { dg-do compile }
+
+#include <regex>
+#include <testsuite_iterators.h>
+
+void
+test01()
+{
+ char s[] = "";
+ __gnu_test::test_container<char, __gnu_test::forward_iterator_wrapper>
+ c(s, s+1);
+ std::regex r1(c.begin(), c.end());
+ std::regex r2(c.begin(), c.end(), std::regex_constants::grep);
+}
diff --git a/libstdc++-v3/testsuite/28_regex/regression.cc b/libstdc++-v3/testsuite/28_regex/regression.cc
index 660d17070e6..0747cfcce78 100644
--- a/libstdc++-v3/testsuite/28_regex/regression.cc
+++ b/libstdc++-v3/testsuite/28_regex/regression.cc
@@ -48,11 +48,33 @@ test02()
VERIFY(std::regex_search("/abcd", rx));
}
+// PR libstdc++/78236
+void
+test06()
+{
+ char const s[] = "afoo";
+ std::basic_regex<char> r("(f+)");
+ {
+ std::cregex_iterator i(s, s+sizeof(s), r);
+ std::cregex_iterator j(s, s+sizeof(s), r);
+ VERIFY(i == j);
+ }
+ // The iterator manipulation code must be repeated in the same scope
+ // to expose the undefined read during the execution of the ==
+ // operator (stack location reuse)
+ {
+ std::cregex_iterator i(s, s+sizeof(s), r);
+ std::cregex_iterator j;
+ VERIFY(!(i == j));
+ }
+}
+
int
main()
{
test01();
test02();
+ test06();
return 0;
}
diff --git a/libstdc++-v3/testsuite/abi/header_cxxabi.c b/libstdc++-v3/testsuite/abi/header_cxxabi.c
index db4171ea1f8..dfef27fdc5c 100644
--- a/libstdc++-v3/testsuite/abi/header_cxxabi.c
+++ b/libstdc++-v3/testsuite/abi/header_cxxabi.c
@@ -1,4 +1,5 @@
// { dg-do compile }
+// { dg-skip-if "invalid options for C" { *-*-* } { "-std=c++??" "-std=gnu++??" } }
// { dg-options "-x c" }
// Copyright (C) 2006-2015 Free Software Foundation, Inc.
//
diff --git a/libstdc++-v3/testsuite/ext/pb_ds/regression/priority_queue_binary_heap-62045.cc b/libstdc++-v3/testsuite/ext/pb_ds/regression/priority_queue_binary_heap-62045.cc
new file mode 100644
index 00000000000..a61d36f67b3
--- /dev/null
+++ b/libstdc++-v3/testsuite/ext/pb_ds/regression/priority_queue_binary_heap-62045.cc
@@ -0,0 +1,51 @@
+// Copyright (C) 2017 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/>.
+
+// { dg-do run }
+
+#include <ext/pb_ds/priority_queue.hpp>
+#include <testsuite_hooks.h>
+
+int count = 0;
+
+struct less
+{
+ bool operator()(int i, int j) const
+ {
+ ++count;
+ return i < j;
+ }
+};
+
+void
+test01()
+{
+ __gnu_pbds::priority_queue<int, less, __gnu_pbds::binary_heap_tag> c;
+ c.push(1);
+ c.push(2);
+ c.push(3);
+ c.push(4);
+ count = 0;
+ c.push(5);
+ VERIFY( count < c.size() );
+}
+
+int
+main()
+{
+ test01();
+}
diff --git a/libstdc++-v3/testsuite/ext/pb_ds/regression/priority_queues.cc b/libstdc++-v3/testsuite/ext/pb_ds/regression/priority_queues.cc
index 366db1dd02b..0cd4e797815 100644
--- a/libstdc++-v3/testsuite/ext/pb_ds/regression/priority_queues.cc
+++ b/libstdc++-v3/testsuite/ext/pb_ds/regression/priority_queues.cc
@@ -108,7 +108,7 @@ priority_queue_link_regression_test_0()
{
/*
- * Perform operations on a binomial-heap queue.
+ * Perform operations on a binary-heap queue.
*/
cout << "Binary heap" << endl;
__gnu_pbds::priority_queue<int, less<int>, binary_heap_tag> c;
diff --git a/libstdc++-v3/testsuite/ext/stdio_filebuf/char/79820.cc b/libstdc++-v3/testsuite/ext/stdio_filebuf/char/79820.cc
new file mode 100644
index 00000000000..ba566f869c6
--- /dev/null
+++ b/libstdc++-v3/testsuite/ext/stdio_filebuf/char/79820.cc
@@ -0,0 +1,39 @@
+// Copyright (C) 2017 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/>.
+
+// { dg-require-fileio "" }
+
+#include <ext/stdio_filebuf.h>
+#include <cstdio>
+#include <cerrno>
+#include <testsuite_hooks.h>
+
+void
+test01()
+{
+ FILE* f = std::fopen("79820.txt", "w");
+ std::fclose(f);
+ errno = 127;
+ __gnu_cxx::stdio_filebuf<char> b(f, std::ios::out, BUFSIZ);
+ VERIFY(errno == 127); // PR libstdc++/79820
+}
+
+int
+main()
+{
+ test01();
+}
diff --git a/libstdc++-v3/testsuite/ext/stdio_filebuf/char/81751.cc b/libstdc++-v3/testsuite/ext/stdio_filebuf/char/81751.cc
new file mode 100644
index 00000000000..22191dcb6a3
--- /dev/null
+++ b/libstdc++-v3/testsuite/ext/stdio_filebuf/char/81751.cc
@@ -0,0 +1,53 @@
+// Copyright (C) 2017 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/>.
+
+// { dg-require-fileio "" }
+
+#include <ext/stdio_filebuf.h>
+#include <cstdio>
+#include <cerrno>
+#include <testsuite_hooks.h>
+
+void
+test01()
+{
+ FILE* out = std::fopen("81751.txt", "w");
+ std::fwrite("Some words.", 1, 10, out);
+
+ FILE* in1 = std::fopen("81751.txt", "r");
+ __gnu_cxx::stdio_filebuf<char> buf1(in1, std::ios::in, BUFSIZ);
+ int c = buf1.sgetc();
+ VERIFY( c == std::char_traits<char>::eof() ); // PR libstdc++/81751
+
+ std::fflush(out);
+ FILE* in2 = std::fopen("81751.txt", "r");
+ __gnu_cxx::stdio_filebuf<char> buf2(in2, std::ios::in, BUFSIZ);
+ c = buf2.sgetc();
+ VERIFY( c == 'S' );
+
+ buf1.close();
+ buf2.close();
+ std::fclose(in1);
+ std::fclose(in2);
+ std::fclose(out);
+}
+
+int
+main()
+{
+ test01();
+}
diff --git a/libstdc++-v3/testsuite/libstdc++-prettyprinters/59161.cc b/libstdc++-v3/testsuite/libstdc++-prettyprinters/59161.cc
new file mode 100644
index 00000000000..a2d7f967635
--- /dev/null
+++ b/libstdc++-v3/testsuite/libstdc++-prettyprinters/59161.cc
@@ -0,0 +1,69 @@
+// { dg-do run }
+// { dg-options "-g -O0" }
+
+// Copyright (C) 2011-2016 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 <deque>
+#include <list>
+#include <ext/slist>
+#include <set>
+#include <vector>
+#include <debug/vector>
+#include <iostream>
+
+struct C {
+ C(int& i) : ref(i) { }
+ int& ref;
+ bool operator<(const C& c) const { return ref < c.ref; }
+};
+
+int main()
+{
+ int i = 1;
+ C c(i);
+
+ std::deque<C> d;
+ d.push_back(c);
+ std::deque<C>::iterator diter = d.begin();
+// { dg-final { regexp-test diter {ref = @0x.*} } }
+
+ std::list<C> l;
+ l.push_back(c);
+ std::list<C>::iterator liter = l.begin();
+ // Need to ensure the list<C>::iterator::_Node typedef is in the debuginfo:
+ int tmp __attribute__((unused)) = (*liter).ref;
+// { dg-final { regexp-test liter {ref = @0x.*} } }
+
+ __gnu_cxx::slist<C> sl;
+ sl.push_front(c);
+ __gnu_cxx::slist<C>::iterator sliter = sl.begin();
+// { dg-final { regexp-test sliter {ref = @0x.*} } }
+
+ std::set<C> s;
+ s.insert(c);
+ std::set<C>::iterator siter = s.begin();
+// { dg-final { regexp-test siter {ref = @0x.*} } }
+
+ std::vector<C> v(1, c);
+ std::vector<C>::iterator viter = v.begin();
+// { dg-final { regexp-test viter {ref = @0x.*} } }
+
+ std::cout << "\n";
+ return 0; // Mark SPOT
+}
+// { dg-final { gdb-test SPOT } }
diff --git a/libstdc++-v3/testsuite/libstdc++-prettyprinters/simple.cc b/libstdc++-v3/testsuite/libstdc++-prettyprinters/simple.cc
index e1956bfa528..5425b664d84 100644
--- a/libstdc++-v3/testsuite/libstdc++-prettyprinters/simple.cc
+++ b/libstdc++-v3/testsuite/libstdc++-prettyprinters/simple.cc
@@ -30,6 +30,7 @@
#include <list>
#include <map>
#include <set>
+#include <vector>
#include <ext/slist>
int
@@ -50,6 +51,9 @@ main()
deq.push_back("two");
// { dg-final { note-test deq {std::deque with 2 elements = {"one", "two"}} } }
+ std::deque<int>::iterator deqiter0;
+// { dg-final { note-test deqiter0 {non-dereferenceable iterator for std::deque} } }
+
std::deque<std::string>::iterator deqiter = deq.begin();
// { dg-final { note-test deqiter {"one"} } }
@@ -58,6 +62,9 @@ main()
lst.push_back("two");
// { dg-final { note-test lst {std::list = {[0] = "one", [1] = "two"}} } }
+ std::list<int>::iterator lstiter0;
+// { dg-final { note-test lstiter0 {non-dereferenceable iterator for std::list} } }
+
std::list<std::string>::iterator lstiter = lst.begin();
tem = *lstiter;
// { dg-final { note-test lstiter {"one"}} }
@@ -73,6 +80,9 @@ main()
std::map<std::string, int>::iterator mpiter = mp.begin();
// { dg-final { note-test mpiter {{first = "zardoz", second = 23}} } }
+ std::map<std::string, int>::iterator mpiter0;
+// { dg-final { note-test mpiter0 {non-dereferenceable iterator for associative container} } }
+
// PR 67440
std::set<int> intset;
intset.insert(2);
@@ -88,6 +98,20 @@ main()
std::set<std::string>::const_iterator spciter = sp.begin();
// { dg-final { note-test spciter {"barrel"} } }
+ std::set<int>::iterator spiter0;
+// { dg-final { note-test spiter0 {non-dereferenceable iterator for associative container} } }
+
+ std::vector<int> v;
+ v.push_back(1);
+ v.push_back(2);
+ v.erase(v.begin());
+// { dg-final { note-test v {std::vector of length 1, capacity 2 = {2}} } }
+ std::vector<int>::iterator viter3 = v.begin();
+// { dg-final { note-test viter3 {2} } }
+
+ std::vector<int>::iterator viter0;
+// { dg-final { note-test viter0 {non-dereferenceable iterator for std::vector} } }
+
__gnu_cxx::slist<int> sll;
sll.push_front(23);
sll.push_front(47);
@@ -96,6 +120,10 @@ main()
__gnu_cxx::slist<int>::iterator slliter = sll.begin();
// { dg-final { note-test slliter {47} } }
+ __gnu_cxx::slist<int>::iterator slliter0;
+// { dg-final { note-test slliter0 {non-dereferenceable iterator for __gnu_cxx::slist} } }
+
+ std::cout << "\n";
return 0; // Mark SPOT
}
diff --git a/libstdc++-v3/testsuite/libstdc++-prettyprinters/simple11.cc b/libstdc++-v3/testsuite/libstdc++-prettyprinters/simple11.cc
index 5f7e9a6a7af..d3df69808a9 100644
--- a/libstdc++-v3/testsuite/libstdc++-prettyprinters/simple11.cc
+++ b/libstdc++-v3/testsuite/libstdc++-prettyprinters/simple11.cc
@@ -30,6 +30,7 @@
#include <list>
#include <map>
#include <set>
+#include <vector>
#include <ext/slist>
int
@@ -53,6 +54,9 @@ main()
std::deque<std::string>::iterator deqiter = deq.begin();
// { dg-final { note-test deqiter {"one"} } }
+ std::deque<int>::iterator deqiter0;
+// { dg-final { note-test deqiter0 {non-dereferenceable iterator for std::deque} } }
+
std::list<std::string> lst;
lst.push_back("one");
lst.push_back("two");
@@ -66,6 +70,9 @@ main()
tem = *lstciter;
// { dg-final { note-test lstciter {"one"}} }
+ std::list<int>::iterator lstiter0;
+// { dg-final { note-test lstiter0 {non-dereferenceable iterator for std::list} } }
+
std::map<std::string, int> mp;
mp["zardoz"] = 23;
// { dg-final { note-test mp {std::map with 1 elements = {["zardoz"] = 23}} } }
@@ -73,6 +80,9 @@ main()
std::map<std::string, int>::iterator mpiter = mp.begin();
// { dg-final { note-test mpiter {{first = "zardoz", second = 23}} } }
+ std::map<std::string, int>::iterator mpiter0;
+// { dg-final { note-test mpiter0 {non-dereferenceable iterator for associative container} } }
+
// PR 67440
const std::set<int> const_intset = {2, 3};
// { dg-final { note-test const_intset {std::set with 2 elements = {[0] = 2, [1] = 3}} } }
@@ -85,6 +95,20 @@ main()
std::set<std::string>::const_iterator spciter = sp.begin();
// { dg-final { note-test spciter {"barrel"} } }
+ std::set<int>::iterator spiter0;
+// { dg-final { note-test spiter0 {non-dereferenceable iterator for associative container} } }
+
+ std::vector<int> v;
+ v.push_back(1);
+ v.push_back(2);
+ v.erase(v.begin());
+// { dg-final { note-test v {std::vector of length 1, capacity 2 = {2}} } }
+ std::vector<int>::iterator viter3 = v.begin();
+// { dg-final { note-test viter3 {2} } }
+
+ std::vector<int>::iterator viter0;
+// { dg-final { note-test viter0 {non-dereferenceable iterator for std::vector} } }
+
__gnu_cxx::slist<int> sll;
sll.push_front(23);
sll.push_front(47);
@@ -93,6 +117,10 @@ main()
__gnu_cxx::slist<int>::iterator slliter = sll.begin();
// { dg-final { note-test slliter {47} } }
+ __gnu_cxx::slist<int>::iterator slliter0;
+// { dg-final { note-test slliter0 {non-dereferenceable iterator for __gnu_cxx::slist} } }
+
+ std::cout << "\n";
return 0; // Mark SPOT
}
diff --git a/libstdc++-v3/testsuite/libstdc++-xmethods/list.cc b/libstdc++-v3/testsuite/libstdc++-xmethods/list.cc
index 050f75b807e..6c02de943f8 100644
--- a/libstdc++-v3/testsuite/libstdc++-xmethods/list.cc
+++ b/libstdc++-v3/testsuite/libstdc++-xmethods/list.cc
@@ -18,9 +18,6 @@
// with this library; see the file COPYING3. If not see
// <http://www.gnu.org/licenses/>.
-// List xmethods only recognize the non cxx11 std::list for now.
-#define _GLIBCXX_USE_CXX11_ABI 0
-
#include <list>
int
diff --git a/libstdc++-v3/testsuite/util/testsuite_hooks.h b/libstdc++-v3/testsuite/util/testsuite_hooks.h
index d0c8b1d6bfd..ee3f2a7ce0e 100644
--- a/libstdc++-v3/testsuite/util/testsuite_hooks.h
+++ b/libstdc++-v3/testsuite/util/testsuite_hooks.h
@@ -226,9 +226,9 @@ namespace __gnu_test
private:
static unsigned int _M_count;
};
-
- // An class of objects that can be used for validating various
- // behaviours and guarantees of containers and algorithms defined in
+
+ // A class of objects that can be used for validating various
+ // behaviors and guarantees of containers and algorithms defined in
// the standard library.
class copy_tracker
{
diff --git a/libvtv/ChangeLog b/libvtv/ChangeLog
index 5571f6753cb..1f0edaa7294 100644
--- a/libvtv/ChangeLog
+++ b/libvtv/ChangeLog
@@ -1,3 +1,7 @@
+2017-10-10 Release Manager
+
+ * GCC 5.5.0 released.
+
2016-06-03 Release Manager
* GCC 5.4.0 released.
diff --git a/lto-plugin/ChangeLog b/lto-plugin/ChangeLog
index 39788af6c8b..2b5d3162da5 100644
--- a/lto-plugin/ChangeLog
+++ b/lto-plugin/ChangeLog
@@ -1,3 +1,16 @@
+2017-10-10 Release Manager
+
+ * GCC 5.5.0 released.
+
+2017-08-22 Georg-Johann Lay <avr@gjlay.de>
+
+ Backport from 2017-07-26 gcc-7-branch r250562.
+
+ PR lto/81487
+ * lto-plugin.c (claim_file_handler): Use xasprintf instead of
+ asprintf.
+ [hi!=0]: Swap hi and lo arguments supplied to xasprintf.
+
2016-06-03 Release Manager
* GCC 5.4.0 released.
diff --git a/lto-plugin/lto-plugin.c b/lto-plugin/lto-plugin.c
index 8d957402ba6..03ebb00aa23 100644
--- a/lto-plugin/lto-plugin.c
+++ b/lto-plugin/lto-plugin.c
@@ -920,17 +920,16 @@ claim_file_handler (const struct ld_plugin_input_file *file, int *claimed)
if (file->offset != 0)
{
- char *objname;
/* We pass the offset of the actual file, not the archive header.
Can't use PRIx64, because that's C99, so we have to print the
- 64-bit hex int as two 32-bit ones. */
- int lo, hi, t;
+ 64-bit hex int as two 32-bit ones. Use xasprintf instead of
+ asprintf because asprintf doesn't work as expected on some older
+ mingw32 hosts. */
+ int lo, hi;
lo = file->offset & 0xffffffff;
hi = ((int64_t)file->offset >> 32) & 0xffffffff;
- t = hi ? asprintf (&objname, "%s@0x%x%08x", file->name, lo, hi)
- : asprintf (&objname, "%s@0x%x", file->name, lo);
- check (t >= 0, LDPL_FATAL, "asprintf failed");
- lto_file.name = objname;
+ lto_file.name = hi ? xasprintf ("%s@0x%x%08x", file->name, hi, lo)
+ : xasprintf ("%s@0x%x", file->name, lo);
}
else
{
diff --git a/maintainer-scripts/ChangeLog b/maintainer-scripts/ChangeLog
index 8fa4318ab03..adde12f341e 100644
--- a/maintainer-scripts/ChangeLog
+++ b/maintainer-scripts/ChangeLog
@@ -1,3 +1,7 @@
+2017-10-10 Release Manager
+
+ * GCC 5.5.0 released.
+
2016-06-03 Release Manager
* GCC 5.4.0 released.
diff --git a/zlib/ChangeLog b/zlib/ChangeLog
index 1085e3ebee9..7c1ce184139 100644
--- a/zlib/ChangeLog
+++ b/zlib/ChangeLog
@@ -1,3 +1,7 @@
+2017-10-10 Release Manager
+
+ * GCC 5.5.0 released.
+
2016-06-03 Release Manager
* GCC 5.4.0 released.