aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite')
-rw-r--r--gcc/testsuite/ChangeLog708
-rw-r--r--gcc/testsuite/c-c++-common/Wmultistatement-macros-13.c104
-rw-r--r--gcc/testsuite/c-c++-common/missing-close-symbol.c33
-rw-r--r--gcc/testsuite/c-c++-common/missing-symbol.c50
-rw-r--r--gcc/testsuite/c-c++-common/patchable_function_entry-decl.c2
-rw-r--r--gcc/testsuite/c-c++-common/patchable_function_entry-default.c2
-rw-r--r--gcc/testsuite/c-c++-common/patchable_function_entry-definition.c2
-rw-r--r--gcc/testsuite/c-c++-common/pr57371-1.c341
-rw-r--r--gcc/testsuite/c-c++-common/pr57371-2.c17
-rw-r--r--gcc/testsuite/c-c++-common/pr57371-3.c13
-rw-r--r--gcc/testsuite/c-c++-common/pr57371-4.c72
-rw-r--r--gcc/testsuite/c-c++-common/pr81052.c28
-rw-r--r--gcc/testsuite/c-c++-common/ubsan/pr81148.c9
-rw-r--r--gcc/testsuite/c-c++-common/ubsan/pr81705.c12
-rw-r--r--gcc/testsuite/g++.dg/asan/asan.exp2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/move-return1.C22
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/nsdmi-defer6.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/nsdmi-template14.C4
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/nsdmi10.C4
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/nullptr39.C15
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/pr65558.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/sfinae59.C19
-rw-r--r--gcc/testsuite/g++.dg/cpp1y/lambda-generic-const4.C20
-rw-r--r--gcc/testsuite/g++.dg/cpp1z/class-deduction43.C10
-rw-r--r--gcc/testsuite/g++.dg/diagnostic/unclosed-extern-c.C3
-rw-r--r--gcc/testsuite/g++.dg/diagnostic/unclosed-function.C3
-rw-r--r--gcc/testsuite/g++.dg/diagnostic/unclosed-namespace.C2
-rw-r--r--gcc/testsuite/g++.dg/diagnostic/unclosed-struct.C3
-rw-r--r--gcc/testsuite/g++.dg/ext/packed8.C4
-rw-r--r--gcc/testsuite/g++.dg/inherit/vdtor1.C7
-rw-r--r--gcc/testsuite/g++.dg/init/array16.C4
-rw-r--r--gcc/testsuite/g++.dg/other/bitfield6.C9
-rw-r--r--gcc/testsuite/g++.dg/other/crash-4.C4
-rw-r--r--gcc/testsuite/g++.dg/other/pr81355.C14
-rw-r--r--gcc/testsuite/g++.dg/parse/pragma2.C4
-rw-r--r--gcc/testsuite/g++.dg/template/crash127.C22
-rw-r--r--gcc/testsuite/g++.dg/torture/pr81354.C24
-rw-r--r--gcc/testsuite/g++.dg/tree-ssa/pr81719.C24
-rw-r--r--gcc/testsuite/g++.dg/warn/Wshadow-compatible-local-2.C21
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/builtins/memops-asm-lib.c4
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/pr81423.c36
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/pr81588.c45
-rw-r--r--gcc/testsuite/gcc.dg/Walloca-14.c2
-rw-r--r--gcc/testsuite/gcc.dg/Wattributes-5.c13
-rw-r--r--gcc/testsuite/gcc.dg/Wsign-compare-1.c83
-rw-r--r--gcc/testsuite/gcc.dg/assign-warn-1.c60
-rw-r--r--gcc/testsuite/gcc.dg/assign-warn-2.c60
-rw-r--r--gcc/testsuite/gcc.dg/attr-noipa.c1
-rw-r--r--gcc/testsuite/gcc.dg/builtin-stringop-chk-1.c1
-rw-r--r--gcc/testsuite/gcc.dg/c90-const-expr-5.c4
-rw-r--r--gcc/testsuite/gcc.dg/c99-const-expr-5.c4
-rw-r--r--gcc/testsuite/gcc.dg/compare1.c6
-rw-r--r--gcc/testsuite/gcc.dg/compare2.c40
-rw-r--r--gcc/testsuite/gcc.dg/compare3.c88
-rw-r--r--gcc/testsuite/gcc.dg/compare7.c2
-rw-r--r--gcc/testsuite/gcc.dg/compare8.c6
-rw-r--r--gcc/testsuite/gcc.dg/compare9.c8
-rw-r--r--gcc/testsuite/gcc.dg/conv-2.c16
-rw-r--r--gcc/testsuite/gcc.dg/diagnostic-types-1.c57
-rw-r--r--gcc/testsuite/gcc.dg/guality/pr25967-1.c70
-rw-r--r--gcc/testsuite/gcc.dg/guality/pr25967-2.c64
-rw-r--r--gcc/testsuite/gcc.dg/init-bad-7.c2
-rw-r--r--gcc/testsuite/gcc.dg/ipa/pr81696.c26
-rw-r--r--gcc/testsuite/gcc.dg/no-strict-overflow-7.c6
-rw-r--r--gcc/testsuite/gcc.dg/noncompile/pr81289.c8
-rw-r--r--gcc/testsuite/gcc.dg/overflow-warn-1.c4
-rw-r--r--gcc/testsuite/gcc.dg/overflow-warn-2.c4
-rw-r--r--gcc/testsuite/gcc.dg/overflow-warn-3.c4
-rw-r--r--gcc/testsuite/gcc.dg/overflow-warn-4.c4
-rw-r--r--gcc/testsuite/gcc.dg/parm-impl-decl-1.c2
-rw-r--r--gcc/testsuite/gcc.dg/parm-impl-decl-3.c2
-rw-r--r--gcc/testsuite/gcc.dg/pie-7.c7
-rw-r--r--gcc/testsuite/gcc.dg/pie-static-1.c9
-rw-r--r--gcc/testsuite/gcc.dg/pie-static-2.c9
-rw-r--r--gcc/testsuite/gcc.dg/pointer-array-atomic.c16
-rw-r--r--gcc/testsuite/gcc.dg/pr11492.c2
-rw-r--r--gcc/testsuite/gcc.dg/pr26865.c2
-rw-r--r--gcc/testsuite/gcc.dg/pr46932.c3
-rw-r--r--gcc/testsuite/gcc.dg/pr56727-2.c1
-rw-r--r--gcc/testsuite/gcc.dg/pr57371-5.c10
-rw-r--r--gcc/testsuite/gcc.dg/pr61162-2.c8
-rw-r--r--gcc/testsuite/gcc.dg/pr61162.c6
-rw-r--r--gcc/testsuite/gcc.dg/pr67730-2.c8
-rw-r--r--gcc/testsuite/gcc.dg/pr69156.c2
-rw-r--r--gcc/testsuite/gcc.dg/pr70174.c2
-rw-r--r--gcc/testsuite/gcc.dg/pr78582.c1
-rw-r--r--gcc/testsuite/gcc.dg/pr79499.c13
-rw-r--r--gcc/testsuite/gcc.dg/pr81588.c26
-rw-r--r--gcc/testsuite/gcc.dg/pr81621.c5
-rw-r--r--gcc/testsuite/gcc.dg/pr81650.c9
-rw-r--r--gcc/testsuite/gcc.dg/pr81695.c11
-rw-r--r--gcc/testsuite/gcc.dg/pr81737.c6
-rw-r--r--gcc/testsuite/gcc.dg/pr81795.c14
-rw-r--r--gcc/testsuite/gcc.dg/string-opt-1.c51
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr25967-1.c63
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr25967-2.c58
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr78218.c11
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr80163.c1
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr81181.c30
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr81297.c16
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/pr81388-1.c6
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/pr81588.c15
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/pr81620-1.c20
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/pr81620-2.c25
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/pr81627.c28
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/pr81744.c13
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/reassoc-23.c7
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/split-path-5.c18
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/ssa-dce-3.c9
-rw-r--r--gcc/testsuite/gcc.dg/unclosed-init.c3
-rw-r--r--gcc/testsuite/gcc.dg/uninit-23.c4
-rw-r--r--gcc/testsuite/gcc.dg/vect/no-section-anchors-vect-69.c4
-rw-r--r--gcc/testsuite/gcc.dg/vect/pr81136.c2
-rw-r--r--gcc/testsuite/gcc.dg/vect/pr81633.c33
-rw-r--r--gcc/testsuite/gcc.dg/vect/section-anchors-vect-69.c3
-rw-r--r--gcc/testsuite/gcc.dg/vect/vect-28.c3
-rw-r--r--gcc/testsuite/gcc.dg/vect/vect-33-big-array.c3
-rw-r--r--gcc/testsuite/gcc.dg/vect/vect-70.c3
-rw-r--r--gcc/testsuite/gcc.dg/vect/vect-87.c3
-rw-r--r--gcc/testsuite/gcc.dg/vect/vect-88.c3
-rw-r--r--gcc/testsuite/gcc.dg/vect/vect-91.c2
-rw-r--r--gcc/testsuite/gcc.dg/vect/vect-93.c4
-rw-r--r--gcc/testsuite/gcc.dg/vect/vect-alias-check-3.c120
-rw-r--r--gcc/testsuite/gcc.dg/vect/vect-alias-check-4.c35
-rw-r--r--gcc/testsuite/gcc.dg/vect/vect-alias-check-5.c19
-rw-r--r--gcc/testsuite/gcc.dg/vect/vect-alias-check-6.c16
-rw-r--r--gcc/testsuite/gcc.dg/vect/vect-alias-check-7.c16
-rw-r--r--gcc/testsuite/gcc.target/aarch64/_Float16_1.c1
-rw-r--r--gcc/testsuite/gcc.target/aarch64/_Float16_2.c1
-rw-r--r--gcc/testsuite/gcc.target/aarch64/_Float16_3.c1
-rw-r--r--gcc/testsuite/gcc.target/aarch64/atomic_cmp_exchange_zero_reg_1.c3
-rw-r--r--gcc/testsuite/gcc.target/aarch64/atomic_cmp_exchange_zero_strong_1.c3
-rw-r--r--gcc/testsuite/gcc.target/aarch64/target_attr_1.c2
-rw-r--r--gcc/testsuite/gcc.target/aarch64/target_attr_10.c2
-rw-r--r--gcc/testsuite/gcc.target/aarch64/target_attr_13.c2
-rw-r--r--gcc/testsuite/gcc.target/aarch64/target_attr_15.c2
-rw-r--r--gcc/testsuite/gcc.target/aarch64/target_attr_2.c2
-rw-r--r--gcc/testsuite/gcc.target/aarch64/target_attr_3.c2
-rw-r--r--gcc/testsuite/gcc.target/aarch64/target_attr_4.c2
-rw-r--r--gcc/testsuite/gcc.target/aarch64/target_attr_7.c2
-rw-r--r--gcc/testsuite/gcc.target/aarch64/target_attr_crypto_ice_1.c2
-rw-r--r--gcc/testsuite/gcc.target/aarch64/target_attr_crypto_ice_2.c2
-rw-r--r--gcc/testsuite/gcc.target/aarch64/vect-xorsign_exec.c58
-rw-r--r--gcc/testsuite/gcc.target/aarch64/xorsign.c86
-rw-r--r--gcc/testsuite/gcc.target/aarch64/xorsign_exec.c26
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512-check.h113
-rw-r--r--gcc/testsuite/gcc.target/i386/avx5124fmaps-check.h47
-rw-r--r--gcc/testsuite/gcc.target/i386/avx5124vnniw-check.h47
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512bw-check.h50
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512cd-check.h46
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512dq-check.h50
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512er-check.h49
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-check.h49
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-helper.h64
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-pr71559.c1
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512ifma-check.h46
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512vbmi-check.h46
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512vl-check.h51
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512vpopcntdq-check.h47
-rw-r--r--gcc/testsuite/gcc.target/i386/funcspec-56.inc2
-rw-r--r--gcc/testsuite/gcc.target/i386/mpx/pr79987.c5
-rw-r--r--gcc/testsuite/gcc.target/i386/naked-1.c2
-rw-r--r--gcc/testsuite/gcc.target/i386/naked-3.c12
-rw-r--r--gcc/testsuite/gcc.target/i386/naked-4.c17
-rw-r--r--gcc/testsuite/gcc.target/i386/pr79793-1.c2
-rw-r--r--gcc/testsuite/gcc.target/i386/pr79793-2.c2
-rw-r--r--gcc/testsuite/gcc.target/i386/pr81213.c19
-rw-r--r--gcc/testsuite/gcc.target/i386/pr81639.c12
-rw-r--r--gcc/testsuite/gcc.target/i386/pr81641.c11
-rw-r--r--gcc/testsuite/gcc.target/i386/pr81644.c15
-rw-r--r--gcc/testsuite/gcc.target/i386/pr81654.c8
-rw-r--r--gcc/testsuite/gcc.target/i386/pr81736-1.c13
-rw-r--r--gcc/testsuite/gcc.target/i386/pr81736-2.c14
-rw-r--r--gcc/testsuite/gcc.target/i386/pr81736-3.c11
-rw-r--r--gcc/testsuite/gcc.target/i386/pr81736-4.c11
-rw-r--r--gcc/testsuite/gcc.target/i386/pr81736-5.c20
-rw-r--r--gcc/testsuite/gcc.target/i386/pr81736-6.c16
-rw-r--r--gcc/testsuite/gcc.target/i386/pr81736-7.c13
-rw-r--r--gcc/testsuite/gcc.target/i386/stack-prot-guard.c6
-rw-r--r--gcc/testsuite/gcc.target/i386/stack-prot-sym.c6
-rw-r--r--gcc/testsuite/gcc.target/nvptx/patchable_function_entry-default.c15
-rw-r--r--gcc/testsuite/gcc.target/nvptx/slp-2.c2
-rw-r--r--gcc/testsuite/gcc.target/nvptx/slp.c2
-rw-r--r--gcc/testsuite/gcc.target/powerpc/bfp/scalar-cmp-exp-eq-2.c2
-rw-r--r--gcc/testsuite/gcc.target/powerpc/bfp/scalar-cmp-exp-gt-2.c2
-rw-r--r--gcc/testsuite/gcc.target/powerpc/bfp/scalar-cmp-exp-lt-2.c2
-rw-r--r--gcc/testsuite/gcc.target/powerpc/bfp/scalar-cmp-exp-unordered-2.c2
-rw-r--r--gcc/testsuite/gcc.target/powerpc/bfp/scalar-extract-exp-1.c2
-rw-r--r--gcc/testsuite/gcc.target/powerpc/bfp/scalar-extract-exp-2.c2
-rw-r--r--gcc/testsuite/gcc.target/powerpc/bfp/scalar-extract-exp-4.c2
-rw-r--r--gcc/testsuite/gcc.target/powerpc/bfp/scalar-extract-exp-5.c2
-rw-r--r--gcc/testsuite/gcc.target/powerpc/bfp/scalar-extract-sig-1.c2
-rw-r--r--gcc/testsuite/gcc.target/powerpc/bfp/scalar-extract-sig-2.c2
-rw-r--r--gcc/testsuite/gcc.target/powerpc/bfp/scalar-extract-sig-4.c2
-rw-r--r--gcc/testsuite/gcc.target/powerpc/bfp/scalar-extract-sig-5.c2
-rw-r--r--gcc/testsuite/gcc.target/powerpc/bfp/scalar-insert-exp-1.c2
-rw-r--r--gcc/testsuite/gcc.target/powerpc/bfp/scalar-insert-exp-10.c2
-rw-r--r--gcc/testsuite/gcc.target/powerpc/bfp/scalar-insert-exp-11.c2
-rw-r--r--gcc/testsuite/gcc.target/powerpc/bfp/scalar-insert-exp-2.c2
-rw-r--r--gcc/testsuite/gcc.target/powerpc/bfp/scalar-insert-exp-4.c2
-rw-r--r--gcc/testsuite/gcc.target/powerpc/bfp/scalar-insert-exp-5.c2
-rw-r--r--gcc/testsuite/gcc.target/powerpc/bfp/scalar-insert-exp-7.c2
-rw-r--r--gcc/testsuite/gcc.target/powerpc/bfp/scalar-insert-exp-8.c2
-rw-r--r--gcc/testsuite/gcc.target/powerpc/bfp/scalar-test-data-class-11.c2
-rw-r--r--gcc/testsuite/gcc.target/powerpc/bfp/scalar-test-data-class-6.c2
-rw-r--r--gcc/testsuite/gcc.target/powerpc/bfp/scalar-test-data-class-7.c2
-rw-r--r--gcc/testsuite/gcc.target/powerpc/bfp/scalar-test-neg-2.c2
-rw-r--r--gcc/testsuite/gcc.target/powerpc/bfp/scalar-test-neg-3.c2
-rw-r--r--gcc/testsuite/gcc.target/powerpc/bfp/scalar-test-neg-5.c2
-rw-r--r--gcc/testsuite/gcc.target/powerpc/bfp/vec-extract-exp-2.c2
-rw-r--r--gcc/testsuite/gcc.target/powerpc/bfp/vec-extract-exp-3.c2
-rw-r--r--gcc/testsuite/gcc.target/powerpc/bfp/vec-extract-sig-2.c2
-rw-r--r--gcc/testsuite/gcc.target/powerpc/bfp/vec-extract-sig-3.c2
-rw-r--r--gcc/testsuite/gcc.target/powerpc/bfp/vec-insert-exp-2.c2
-rw-r--r--gcc/testsuite/gcc.target/powerpc/bfp/vec-insert-exp-3.c2
-rw-r--r--gcc/testsuite/gcc.target/powerpc/bfp/vec-insert-exp-6.c2
-rw-r--r--gcc/testsuite/gcc.target/powerpc/bfp/vec-insert-exp-7.c2
-rw-r--r--gcc/testsuite/gcc.target/powerpc/bfp/vec-test-data-class-2.c2
-rw-r--r--gcc/testsuite/gcc.target/powerpc/bfp/vec-test-data-class-3.c2
-rw-r--r--gcc/testsuite/gcc.target/powerpc/builtins-3-p8.c35
-rw-r--r--gcc/testsuite/gcc.target/powerpc/builtins-3.c32
-rw-r--r--gcc/testsuite/gcc.target/powerpc/builtins-4-runnable.c321
-rw-r--r--gcc/testsuite/gcc.target/powerpc/byte-in-either-range-1.c2
-rw-r--r--gcc/testsuite/gcc.target/powerpc/byte-in-range-1.c2
-rw-r--r--gcc/testsuite/gcc.target/powerpc/byte-in-set-1.c2
-rw-r--r--gcc/testsuite/gcc.target/powerpc/byte-in-set-2.c2
-rw-r--r--gcc/testsuite/gcc.target/powerpc/cmpb-3.c2
-rw-r--r--gcc/testsuite/gcc.target/powerpc/crypto-builtin-2.c14
-rw-r--r--gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-1.c2
-rw-r--r--gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-11.c2
-rw-r--r--gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-16.c2
-rw-r--r--gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-21.c2
-rw-r--r--gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-26.c2
-rw-r--r--gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-31.c2
-rw-r--r--gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-36.c2
-rw-r--r--gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-41.c2
-rw-r--r--gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-46.c2
-rw-r--r--gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-51.c2
-rw-r--r--gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-56.c2
-rw-r--r--gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-6.c2
-rw-r--r--gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-61.c2
-rw-r--r--gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-66.c2
-rw-r--r--gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-71.c2
-rw-r--r--gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-76.c2
-rw-r--r--gcc/testsuite/gcc.target/powerpc/fold-vec-cntlz-char.c22
-rw-r--r--gcc/testsuite/gcc.target/powerpc/fold-vec-cntlz-int.c22
-rw-r--r--gcc/testsuite/gcc.target/powerpc/fold-vec-cntlz-longlong.c22
-rw-r--r--gcc/testsuite/gcc.target/powerpc/fold-vec-cntlz-short.c22
-rw-r--r--gcc/testsuite/gcc.target/powerpc/fold-vec-madd-double.c17
-rw-r--r--gcc/testsuite/gcc.target/powerpc/fold-vec-madd-float.c17
-rw-r--r--gcc/testsuite/gcc.target/powerpc/fold-vec-madd-short.c38
-rw-r--r--gcc/testsuite/gcc.target/powerpc/fold-vec-msum-char.c25
-rw-r--r--gcc/testsuite/gcc.target/powerpc/fold-vec-msum-short.c25
-rw-r--r--gcc/testsuite/gcc.target/powerpc/fold-vec-pack-double.c18
-rw-r--r--gcc/testsuite/gcc.target/powerpc/fold-vec-pack-int.c28
-rw-r--r--gcc/testsuite/gcc.target/powerpc/fold-vec-pack-longlong.c28
-rw-r--r--gcc/testsuite/gcc.target/powerpc/fold-vec-pack-short.c28
-rw-r--r--gcc/testsuite/gcc.target/powerpc/pr81622.c13
-rw-r--r--gcc/testsuite/gcc.target/powerpc/vec-setup-be-double.c12
-rw-r--r--gcc/testsuite/gcc.target/powerpc/vec-setup-be-long.c11
-rw-r--r--gcc/testsuite/gcc.target/powerpc/vec-setup-double.c11
-rw-r--r--gcc/testsuite/gcc.target/powerpc/vec-setup-long.c9
-rw-r--r--gcc/testsuite/gcc.target/powerpc/vec-setup.h366
-rw-r--r--gcc/testsuite/gcc.target/powerpc/vsu/vec-all-nez-7.c2
-rw-r--r--gcc/testsuite/gcc.target/powerpc/vsu/vec-any-eqz-7.c2
-rw-r--r--gcc/testsuite/gcc.target/powerpc/vsu/vec-cmpnez-7.c2
-rw-r--r--gcc/testsuite/gcc.target/powerpc/vsu/vec-cntlz-lsbb-2.c2
-rw-r--r--gcc/testsuite/gcc.target/powerpc/vsu/vec-cnttz-lsbb-2.c2
-rw-r--r--gcc/testsuite/gcc.target/powerpc/vsu/vec-xl-len-12.c2
-rw-r--r--gcc/testsuite/gcc.target/powerpc/vsu/vec-xl-len-13.c2
-rw-r--r--gcc/testsuite/gcc.target/powerpc/vsu/vec-xlx-7.c2
-rw-r--r--gcc/testsuite/gcc.target/powerpc/vsu/vec-xrx-7.c2
-rw-r--r--gcc/testsuite/gcc.target/powerpc/vsu/vec-xst-len-12.c2
-rw-r--r--gcc/testsuite/gcc.target/powerpc/vsu/vec-xst-len-13.c2
-rw-r--r--gcc/testsuite/gcc.target/powerpc/vsx-extract-6.c25
-rw-r--r--gcc/testsuite/gcc.target/powerpc/vsx-extract-7.c25
-rw-r--r--gcc/testsuite/gfortran.dg/bind_c_usage_30.f906
-rw-r--r--gcc/testsuite/gfortran.dg/dec_d_lines_1.f9
-rw-r--r--gcc/testsuite/gfortran.dg/dec_d_lines_2.f8
-rw-r--r--gcc/testsuite/gfortran.dg/dec_structure_18.f9038
-rw-r--r--gcc/testsuite/gfortran.dg/dec_structure_19.f9038
-rw-r--r--gcc/testsuite/gfortran.dg/dec_structure_20.f9018
-rw-r--r--gcc/testsuite/gfortran.dg/dec_structure_21.f9010
-rw-r--r--gcc/testsuite/gfortran.dg/logical_assignment_1.f9010
-rw-r--r--gcc/testsuite/gfortran.dg/o_fast_stacksize.f9017
-rw-r--r--gcc/testsuite/gfortran.dg/pr81723.f56
-rw-r--r--gcc/testsuite/gfortran.dg/use_30.f9017
-rw-r--r--gcc/testsuite/gnat.dg/debug13.adb38
-rw-r--r--gcc/testsuite/gnat.dg/debug13.ads5
-rw-r--r--gcc/testsuite/jit.dg/all-non-failing-tests.h2
-rw-r--r--gcc/testsuite/jit.dg/test-error-gcc_jit_type_get_vector-bad-type.c30
-rw-r--r--gcc/testsuite/jit.dg/test-error-gcc_jit_type_get_vector-non-power-of-two.c29
-rw-r--r--gcc/testsuite/jit.dg/test-vector-types.cc185
-rw-r--r--gcc/testsuite/objc.dg/proto-lossage-4.m6
294 files changed, 5198 insertions, 977 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 7243fdf3372..29afe109e9c 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,711 @@
+2017-08-12 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
+
+ PR testsuite/81793
+ * gcc.dg/pie-static-1.c: Require both static and pie support.
+ * gcc.dg/pie-static-2.c: Likewise.
+
+2017-08-12 Pierre-Marie de Rodat <derodat@adacore.com>
+
+ PR ada/79542
+ * gnat.dg/debug13.ads, gnat.dg/debug13.adb: New testcase.
+
+2017-08-11 Marek Polacek <polacek@redhat.com>
+
+ PR c/81795
+ * gcc.dg/pr81795.c: New test.
+
+2017-08-11 Thomas Koenig <tkoenig@gcc.gnu.org>
+
+ PR fortran/60355
+ * gfortran.dg (bind_c_usage_30): New test.
+
+2017-08-11 Martin Liska <mliska@suse.cz>
+
+ PR tree-opt/79987
+ * gcc.target/i386/mpx/pr79987.c: New test.
+
+2017-08-11 Martin Liska <mliska@suse.cz>
+
+ PR ipa/81213
+ * gcc.target/i386/pr81213.c: New test.
+
+2017-08-10 Uros Bizjak <ubizjak@gmail.com>
+
+ PR target/81708
+ * gcc.target/i386/stack-prot-sym.c: New test.
+
+2017-08-10 Richard Sandiford <richard.sandiford@linaro.org>
+
+ PR testsuite/81738
+ * gcc.dg/vect/vect-alias-check-6.c: Move second function to...
+ * gcc.dg/vect/vect-alias-check-7.c: ...this new file. Require
+ vect_perm and vect_element_align for vectorization.
+
+2017-08-10 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR target/81736
+ * gcc.target/i386/pr81736-1.c: New test.
+ * gcc.target/i386/pr81736-2.c: Likewise.
+ * gcc.target/i386/pr81736-3.c: Likewise.
+ * gcc.target/i386/pr81736-4.c: Likewise.
+ * gcc.target/i386/pr81736-5.c: Likewise.
+ * gcc.target/i386/pr81736-6.c: Likewise.
+ * gcc.target/i386/pr81736-7.c: Likewise.
+
+2017-08-10 Will Schmidt <will_schmidt@vnet.ibm.com>
+
+ * gcc.target/powerpc/fold-vec-msum-short.c: Fix typo.
+ * gcc.target/powerpc/fold-vec/pack-longlong.c: Mark for 64-bit only.
+
+2017-08-10 David Malcolm <dmalcolm@redhat.com>
+
+ * c-c++-common/missing-close-symbol.c: New test case.
+ * c-c++-common/missing-symbol.c: New test case.
+ * gcc.dg/unclosed-init.c: New test case.
+ * g++.dg/diagnostic/unclosed-extern-c.C: New test case.
+ * g++.dg/diagnostic/unclosed-function.C: New test case.
+ * g++.dg/diagnostic/unclosed-namespace.C: New test case.
+ * g++.dg/diagnostic/unclosed-struct.C: New test case.
+ * g++.dg/parse/pragma2.C: Update to reflect movement of the
+ "expected identifier" error.
+
+2017-08-10 Fritz Reese <fritzoreese@gmail.com>
+
+ * gfortran.dg/dec_d_lines_1.f: New test.
+ * gfortran.dg/dec_d_lines_2.f: New test.
+
+2017-08-10 Fritz Reese <fritzoreese@gmail.com>
+
+ * gfortran.dg/dec_structure_18.f90: New test.
+ * gfortran.dg/dec_structure_19.f90: New test.
+ * gfortran.dg/dec_structure_20.f90: New test.
+ * gfortran.dg/dec_structure_21.f90: New test.
+
+2017-08-10 Marek Polacek <polacek@redhat.com>
+
+ PR testsuite/81784
+ * gcc.dg/compare2.c: Update dg-bogus and dg-warning.
+
+ * objc.dg/proto-lossage-4.m: Accept int/long int as intptr_t.
+
+2017-08-10 Martin Liska <mliska@suse.cz>
+
+ PR c++/81355
+ * g++.dg/other/pr81355.C: New test.
+
+2017-08-09 David Malcolm <dmalcolm@redhat.com>
+
+ * jit.dg/all-non-failing-tests.h: Add note about
+ test-vector-types.cc.
+ * jit.dg/test-error-gcc_jit_type_get_vector-bad-type.c: New test
+ case.
+ * jit.dg/test-error-gcc_jit_type_get_vector-non-power-of-two.c:
+ New test case.
+ * jit.dg/test-vector-types.cc: New test case.
+
+2017-08-09 Andrew Pinski <apinski@cavium.com>
+
+ * gcc.target/aarch64/vect-xorsign_exec.c: Add
+ --save-temps to the options passed.
+
+2017-08-09 Michael Collison <michael.collison@arm.com>
+
+ * testsuite/g++.dg/ext/packed8.C: Remove -mstructure-size-
+ boundary option and fix comment.
+ * testsuite/g++.dg/init/array16.C: Remove -mstructure-size-
+ boundary option and fix comment.
+ * testsuite/g++.dg/other/crash-4.C: Remove -mstructure-size-
+ boundary option and fix comment.
+ * testsuite/gcc.dg/builtin-stringop-chk-1.c: Remove
+ -mstructure-size boundary option.
+
+2017-08-09 Segher Boessenkool <segher@kernel.crashing.org>
+
+ PR rtl-optimization/81423
+ * gcc.c-torture/execute/pr81423.c: New testcase.
+
+2017-08-09 Will Schmidt <will_schmidt@vnet.ibm.com>
+
+ * gcc.target/powerpc/fold-vec-pack-double.c: New.
+ * gcc.target/powerpc/fold-vec-pack-int.c: New.
+ * gcc.target/powerpc/fold-vec-pack-longlong.c: New.
+ * gcc.target/powerpc/fold-vec-pack-short.c: New.
+
+2017-08-09 Will Schmidt <will_schmidt@vnet.ibm.com>
+
+ * gcc.target/powerpc/fold-vec-msum-char.c: New.
+ * gcc.target/powerpc/fold-vec-msum-short.c: New.
+
+2017-08-09 Will Schmidt <will_schmidt@vnet.ibm.com>
+
+ * gcc.target/powerpc/fold-vec-madd-double.c: New.
+ * gcc.target/powerpc/fold-vec-madd-float.c: New.
+ * gcc.target/powerpc/fold-vec-madd-short.c: New.
+
+2017-08-09 Will Schmidt <will_schmidt@vnet.ibm.com>
+
+ * gcc.target/powerpc/fold-vec-cntlz-int.c: New.
+ * gcc.target/powerpc/fold-vec-cntlz-char.c: New.
+ * gcc.target/powerpc/fold-vec-cntlz-short.c: New.
+ * gcc.target/powerpc/fold-vec-cntlz-longlong.c: New.
+
+2017-08-09 Slava Barinov <v.barinov@samsung.com>
+
+ * g++.dg/asan/asan.exp: Switch on *.cc tests.
+
+2017-08-09 Marek Polacek <polacek@redhat.com>
+
+ PR c/81233
+ * gcc.dg/diagnostic-types-1.c: New test.
+ * gcc.dg/assign-warn-1.c: Update warning messages.
+ * gcc.dg/assign-warn-2.c: Likewise.
+ * gcc.dg/c90-const-expr-5.c: Likewise.
+ * gcc.dg/c99-const-expr-5.c: Likewise.
+ * gcc.dg/conv-2.c: Likewise.
+ * gcc.dg/init-bad-7.c: Likewise.
+ * gcc.dg/overflow-warn-1.c: Likewise.
+ * gcc.dg/overflow-warn-2.c: Likewise.
+ * gcc.dg/overflow-warn-3.c: Likewise.
+ * gcc.dg/overflow-warn-4.c: Likewise.
+ * gcc.dg/pointer-array-atomic.c: Likewise.
+ * gcc.dg/pr26865.c: Likewise.
+ * gcc.dg/pr61162-2.c: Likewise.
+ * gcc.dg/pr61162.c: Likewise.
+ * gcc.dg/pr67730-2.c: Likewise.
+ * gcc.dg/pr69156.c: Likewise.
+ * gcc.dg/pr70174.c: Likewise.
+ * objc.dg/proto-lossage-4.m: Likewise.
+
+2017-08-09 Marek Polacek <polacek@redhat.com>
+
+ PR c/81417
+ * Wsign-compare-1.c: New test.
+ * gcc.dg/compare1.c: Adjust dg-bogus.
+ * gcc.dg/compare2.c: Likewise.
+ * gcc.dg/compare3.c: Likewise.
+ * gcc.dg/compare7.c: Likewise.
+ * gcc.dg/compare8.c: Likewise.
+ * gcc.dg/compare9.c: Likewise.
+ * gcc.dg/pr11492.c: Likewise.
+
+2017-08-08 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR driver/81523
+ * gcc.dg/pie-7.c: New test.
+ * gcc.dg/pie-static-1.c: Likewise.
+ * gcc.dg/pie-static-2.c: Likewise.
+
+2017-08-08 Uros Bizjak <ubizjak@gmail.com>
+
+ PR target/81708
+ * gcc.target/i386/stack-prot-guard.c: New test.
+
+2017-08-08 Tamar Christina <tamar.christina@arm.com>
+
+ * gcc.target/aarch64/xorsign.c: New.
+ * gcc.target/aarch64/xorsign_exec.c: New.
+ * gcc.target/aarch64/vect-xorsign_exec.c: New.
+
+2017-08-08 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
+
+ PR tree-optimization/81354
+ * g++.dg/torture/pr81354.C: New file.
+
+2017-08-08 Richard Biener <rguenther@suse.de>
+
+ PR middle-end/81719
+ * g++.dg/tree-ssa/pr81719.C: New testcase.
+
+2017-08-08 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/81723
+ * gfortran.dg/pr81723.f: New testcase.
+
+2017-08-08 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
+
+ * gcc.target/powerpc/bfp/scalar-extract-exp-2.c: Adjust diagnostic
+ string.
+ * gcc.target/powerpc/bfp/scalar-extract-exp-5.c: Likewise.
+ * gcc.target/powerpc/bfp/scalar-extract-sig-2.c: Likewise.
+ * gcc.target/powerpc/bfp/scalar-extract-sig-5.c: Likewise.
+ * gcc.target/powerpc/bfp/scalar-insert-exp-11.c: Likewise.
+ * gcc.target/powerpc/bfp/scalar-insert-exp-2.c: Likewise.
+ * gcc.target/powerpc/bfp/scalar-insert-exp-5.c: Likewise.
+ * gcc.target/powerpc/bfp/scalar-insert-exp-8.c: Likewise.
+ * gcc.target/powerpc/byte-in-set-2.c: Likewise.
+ * gcc.target/powerpc/cmpb-3.c: Likewise.
+ * gcc.target/powerpc/vsu/vec-xl-len-13.c: Likewise.
+ * gcc.target/powerpc/vsu/vec-xst-len-13.c: Likewise.
+
+2017-08-08 Martin Liska <mliska@suse.cz>
+
+ PR tree-opt/81696
+ * gcc.dg/ipa/pr81696.c: New test.
+
+2017-08-08 Bin Cheng <bin.cheng@arm.com>
+
+ PR tree-optimization/81744
+ * gcc.dg/tree-ssa/pr81744.c: New.
+
+2017-08-08 Marek Polacek <polacek@redhat.com>
+
+ PR c++/81607
+ * g++.dg/other/bitfield6.C: New test.
+
+2017-08-07 Michael Meissner <meissner@linux.vnet.ibm.com>
+
+ PR target/81593
+ * gcc.target/powerpc/vec-setup.h: New tests to test various
+ combinations of setting up vectors of 2 double word elements.
+ * gcc.target/powerpc/vec-setup-long.c: Likewise.
+ * gcc.target/powerpc/vec-setup-double.c: Likewise.
+ * gcc.target/powerpc/vec-setup-be-long.c: Likewise.
+ * gcc.target/powerpc/vec-setup-be-double.c: Likewise.
+ * gcc.target/powerpc/vsx-extract-6.c: New tests for optimzing
+ vector inserts from vector extracts.
+ * gcc.target/powerpc/vsx-extract-7.c: Likewise.
+
+2017-08-07 Thomas Koenig <tkoenig@gcc.gnu.org>
+
+ PR fortran/68829
+ PR fortran/81701
+ * gfortran.dg/o_fast_stacksize.90: New test.
+
+2017-08-07 Wilco Dijkstra <wdijkstr@arm.com>
+
+ PR middle-end/46932
+ * gcc.dg/pr46932.c: Compile on targets with pre-increment.
+
+2017-08-07 H.J. Lu <hongjiu.lu@intel.com>
+
+ * gcc.target/i386/pr81736-1.c: Removed.
+ * gcc.target/i386/pr81736-2.c: Likewise.
+ * gcc.target/i386/pr81736-3.c: Likewise.
+ * gcc.target/i386/pr81736-4.c: Likewise.
+
+2017-08-07 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR target/81736
+ * gcc.target/i386/pr81736-1.c: New test.
+ * gcc.target/i386/pr81736-2.c: Likewise.
+ * gcc.target/i386/pr81736-3.c: Likewise.
+ * gcc.target/i386/pr81736-4.c: Likewise.
+
+2017-08-07 Marek Polacek <polacek@redhat.com>
+
+ PR middle-end/81737
+ * gcc.dg/pr81737.c: New test.
+
+2017-08-07 Martin Liska <mliska@suse.cz>
+
+ * g++.dg/cpp0x/pr65558.C: Update scanned pattern.
+ * gcc.dg/parm-impl-decl-1.c: Likewise.
+ * gcc.dg/parm-impl-decl-3.c: Likewise.
+ * gcc.dg/Wattributes-5.c: New test.
+
+2017-08-06 Andrew Pinski <apinski@cavium.com>
+
+ * gcc.target/aarch64/target_attr_10.c: Add -mcpu=generic.
+ * gcc.target/aarch64/target_attr_13.c: LIkewise.
+ * gcc.target/aarch64/target_attr_15.c: LIkewise.
+ * gcc.target/aarch64/target_attr_4.c: Likewise.
+ * gcc.target/aarch64/target_attr_1.c: Add -march=armv8-a.
+ * gcc.target/aarch64/target_attr_2.c: Likewise.
+ * gcc.target/aarch64/target_attr_7.c: Likewise.
+ * gcc.target/aarch64/target_attr_crypto_ice_1.c: Likewise.
+ * gcc.target/aarch64/target_attr_crypto_ice_2.c: Likewise.
+ * gcc.target/aarch64/target_attr_3.c: Add -mcpu=generic -march=armv8-a.
+
+2017-08-06 Andrew Pinski <apinski@cavium.com>
+
+ * gcc.target/aarch64/atomic_cmp_exchange_zero_reg_1.c: Pass
+ -march=armv8-a+nolse, skip if -mcpu= is passed.
+ * gcc.target/aarch64/atomic_cmp_exchange_zero_strong_1.c: Likewise.
+
+2017-08-06 Andrew Pinski <apinski@cavium.com>
+
+ * gcc.target/aarch64/_Float16_1.c: Skip if supplied a -mcpu= option.
+ * gcc.target/aarch64/_Float16_2.c: Likewise.
+ * gcc.target/aarch64/_Float16_3.c: Likewise.
+
+2017-08-06 Tom de Vries <tom@codesourcery.com>
+
+ * gcc.dg/pr78582.c: Require effective target nonlocal_goto.
+
+2017-08-06 Tom de Vries <tom@codesourcery.com>
+
+ * gcc.c-torture/execute/builtins/memops-asm-lib.c (my_memmove): Fix return
+ type. Add missing return.
+
+2017-08-06 Tom de Vries <tom@codesourcery.com>
+
+ PR testsuite/81731
+ * gcc.dg/torture/pr78218.c (struct v): New type, factored type out of
+ variable 'a' definition.
+ (b): Remove unused variable.
+ (gp): New variable.
+ (check): Add parameter corresponding to call in main, and handle.
+
+2017-08-04 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/79790
+ * g++.dg/cpp1z/class-deduction43.C: New.
+
+2017-08-04 Yury Gribov <tetra2005@gmail.com>
+
+ PR tree-optimization/57371
+ * c-c++-common/pr57371-1.c: New test.
+ * c-c++-common/pr57371-2.c: New test.
+ * c-c++-common/pr57371-3.c: New test.
+ * c-c++-common/pr57371-4.c: New test.
+ * gcc.dg/pr57371-5.c: New test.
+
+2017-08-04 Carl Love <cel@us.ibm.com>
+
+ * gcc.target/powerpc/builtins-3.c: Remove ISA 3.0 word variant
+ builtin test cases for vec_mule, and vec_mulo.
+ * gcc.target/powerpc/builtins-3-p8.c: Add ISA 3.0 word variant
+ builtin test cases for vec_mule, and vec_mulo.
+
+2017-08-04 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR target/81590
+ * gcc.target/i386/avx512-check.h: New file.
+ * gcc.target/i386/avx5124fmaps-check.h: Removed.
+ * gcc.target/i386/avx5124vnniw-check.h: Likewise.
+ * gcc.target/i386/avx512cd-check.h: Likewise.
+ * gcc.target/i386/avx512ifma-check.h: Likewise.
+ * gcc.target/i386/avx512vbmi-check.h: Likewise.
+ * gcc.target/i386/avx512vpopcntdq-check.h: Likewise.
+ * gcc.target/i386/avx512bw-check.h: Rewrite.
+ * gcc.target/i386/avx512dq-check.h: Likewise.
+ * gcc.target/i386/avx512er-check.h: Likewise.
+ * gcc.target/i386/avx512f-check.h: Likewise.
+ * gcc.target/i386/avx512vl-check.h: Likewise.
+ * gcc.target/i386/avx512f-helper.h: Include "avx512-check.h"
+ only.
+ (test_512): Removed.
+ (avx512*_test): Likewise.
+ * gcc.target/i386/avx512f-pr71559.c (TEST): Undef.
+
+2017-08-04 Marek Polacek <polacek@redhat.com>
+
+ PR middle-end/81695
+ * gcc.dg/pr81695.c: New test.
+
+2017-08-04 Richard Sandiford <richard.sandiford@linaro.org>
+
+ PR tree-optimization/81136
+ * gcc.dg/vect/pr81136.c: Add scan test.
+
+2017-08-04 Richard Sandiford <richard.sandiford@linaro.org>
+
+ * gcc.dg/vect/vect-alias-check-3.c: New test.
+ * gcc.dg/vect/vect-alias-check-4.c: Likewise.
+ * gcc.dg/vect/vect-alias-check-5.c: Likewise.
+
+2017-08-04 Richard Biener <rguenther@suse.de>
+
+ PR middle-end/81705
+ * c-c++-common/ubsan/pr81705.c: New testcase.
+
+2017-08-03 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
+
+ * gcc.target/powerpc/bfp/scalar-cmp-exp-eq-2.c: Adjust for error
+ messages that used to start with a capital letter.
+ * gcc.target/powerpc/bfp/scalar-cmp-exp-gt-2.c: Likewise.
+ * gcc.target/powerpc/bfp/scalar-cmp-exp-lt-2.c: Likewise.
+ * gcc.target/powerpc/bfp/scalar-cmp-unordered-2.c: Likewise.
+ * gcc.target/powerpc/bfp/scalar-extract-exp-1.c: Likewise.
+ * gcc.target/powerpc/bfp/scalar-extract-exp-4.c: Likewise.
+ * gcc.target/powerpc/bfp/scalar-extract-sig-1.c: Likewise.
+ * gcc.target/powerpc/bfp/scalar-extract-sig-4.c: Likewise.
+ * gcc.target/powerpc/bfp/scalar-insert-exp-1.c: Likewise.
+ * gcc.target/powerpc/bfp/scalar-insert-exp-10.c: Likewise.
+ * gcc.target/powerpc/bfp/scalar-insert-exp-4.c: Likewise.
+ * gcc.target/powerpc/bfp/scalar-insert-exp-7.c: Likewise.
+ * gcc.target/powerpc/bfp/scalar-test-data-class-11.c: Likewise.
+ * gcc.target/powerpc/bfp/scalar-test-data-class-6.c: Likewise.
+ * gcc.target/powerpc/bfp/scalar-test-data-class-7.c: Likewise.
+ * gcc.target/powerpc/bfp/scalar-test-neg-2.c: Likewise.
+ * gcc.target/powerpc/bfp/scalar-test-neg-3.c: Likewise.
+ * gcc.target/powerpc/bfp/scalar-test-neg-5.c: Likewise.
+ * gcc.target/powerpc/bfp/vec-extract-exp-2.c: Likewise.
+ * gcc.target/powerpc/bfp/vec-extract-exp-3.c: Likewise.
+ * gcc.target/powerpc/bfp/vec-extract-sig-2.c: Likewise.
+ * gcc.target/powerpc/bfp/vec-extract-sig-3.c: Likewise.
+ * gcc.target/powerpc/bfp/vec-insert-exp-2.c: Likewise.
+ * gcc.target/powerpc/bfp/vec-insert-exp-3.c: Likewise.
+ * gcc.target/powerpc/bfp/vec-insert-exp-6.c: Likewise.
+ * gcc.target/powerpc/bfp/vec-insert-exp-7.c: Likewise.
+ * gcc.target/powerpc/bfp/vec-test-data-class-2.c: Likewise.
+ * gcc.target/powerpc/bfp/vec-test-data-class-3.c: Likewise.
+ * gcc.target/powerpc/byte-in-either-range-1.c: Likewise.
+ * gcc.target/powerpc/byte-in-range-1.c: Likewise.
+ * gcc.target/powerpc/byte-in-set-1.c: Likewise.
+ * gcc.target/powerpc/crypto-builtin-2.c: Likewise.
+ * gcc.target/powerpc/dfp/dtstsfi-1.c: Likewise.
+ * gcc.target/powerpc/dfp/dtstsfi-11.c: Likewise.
+ * gcc.target/powerpc/dfp/dtstsfi-16.c: Likewise.
+ * gcc.target/powerpc/dfp/dtstsfi-21.c: Likewise.
+ * gcc.target/powerpc/dfp/dtstsfi-26.c: Likewise.
+ * gcc.target/powerpc/dfp/dtstsfi-31.c: Likewise.
+ * gcc.target/powerpc/dfp/dtstsfi-36.c: Likewise.
+ * gcc.target/powerpc/dfp/dtstsfi-41.c: Likewise.
+ * gcc.target/powerpc/dfp/dtstsfi-46.c: Likewise.
+ * gcc.target/powerpc/dfp/dtstsfi-51.c: Likewise.
+ * gcc.target/powerpc/dfp/dtstsfi-56.c: Likewise.
+ * gcc.target/powerpc/dfp/dtstsfi-6.c: Likewise.
+ * gcc.target/powerpc/dfp/dtstsfi-61.c: Likewise.
+ * gcc.target/powerpc/dfp/dtstsfi-66.c: Likewise.
+ * gcc.target/powerpc/dfp/dtstsfi-71.c: Likewise.
+ * gcc.target/powerpc/dfp/dtstsfi-76.c: Likewise.
+ * gcc.target/powerpc/vsu/vec-all-nez-7.c: Likewise.
+ * gcc.target/powerpc/vsu/vec-any-eqz-7.c: Likewise.
+ * gcc.target/powerpc/vsu/vec-cmpnez-7.c: Likewise.
+ * gcc.target/powerpc/vsu/vec-cntlz-lsbb-2.c: Likewise.
+ * gcc.target/powerpc/vsu/vec-cnttz-lsbb-2.c: Likewise.
+ * gcc.target/powerpc/vsu/vec-xl-len-12.c: Likewise.
+ * gcc.target/powerpc/vsu/vec-xlx-7.c: Likewise.
+ * gcc.target/powerpc/vsu/vec-xrx-7.c: Likewise.
+ * gcc.target/powerpc/vsu/vec-xst-len-12.c: Likewise.
+
+2017-08-03 Jakub Jelinek <jakub@redhat.com>
+
+ PR target/81621
+ * gcc.dg/pr81621.c: New test.
+
+2017-08-03 Richard Biener <rguenther@suse.de>
+
+ * gcc.dg/tree-ssa/reassoc-23.c: Adjust to fool early folding
+ and CSE.
+
+2017-08-03 Richard Biener <rguenther@suse.de>
+
+ PR middle-end/81148
+ * c-c++-common/ubsan/pr81148.c: New testcase.
+
+2017-08-03 Tom de Vries <tom@codesourcery.com>
+
+ PR target/81662
+ * gcc.target/nvptx/patchable_function_entry-default.c: New test.
+
+2017-08-03 Jakub Jelinek <jakub@redhat.com>
+
+ PR driver/81650
+ * gcc.dg/pr81650.c: New test.
+
+2017-08-03 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/71440
+ * g++.dg/template/crash127.C: New.
+
+2017-08-03 Jakub Jelinek <jakub@redhat.com>
+
+ PR middle-end/81052
+ * c-c++-common/pr81052.c: New test.
+
+2017-08-03 Tom de Vries <tom@codesourcery.com>
+
+ * gcc.dg/pr56727-2.c: Require alias.
+
+2017-08-03 Tom de Vries <tom@codesourcery.com>
+
+ * gcc.dg/attr-noipa.c: Require alloca.
+
+2017-08-03 Tom de Vries <tom@codesourcery.com>
+
+ * gcc.dg/torture/pr80163.c: Require label_values.
+
+2017-08-03 Tom de Vries <tom@codesourcery.com>
+
+ PR target/81662
+ * c-c++-common/patchable_function_entry-decl.c: Skip for nvptx.
+ * c-c++-common/patchable_function_entry-default.c: Same.
+ * c-c++-common/patchable_function_entry-definition.c: Same.
+
+2017-08-02 Uros Bizjak <ubizjak@gmail.com>
+
+ PR target/81644
+ * gcc.target/i386/pr81644.c: New test.
+
+2017-08-02 Tom de Vries <tom@codesourcery.com>
+
+ * gcc.dg/Walloca-14.c: Use relative line number.
+
+2017-08-02 Uros Bizjak <ubizjak@gmail.com>
+
+ * gcc.target/i386/funcspec-56.inc (no_3dnowa): Properly
+ test "no-3dnowa" target attribute.
+
+2017-08-02 Marek Polacek <polacek@redhat.com>
+
+ PR c/81289
+ * gcc.dg/noncompile/pr81289.c: New test.
+
+ PR c/81448
+ PR c/81306
+ * c-c++-common/Wmultistatement-macros-13.c: New test.
+
+2017-08-02 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/81640
+ * g++.dg/warn/Wshadow-compatible-local-2.C: New test.
+
+ PR middle-end/79499
+ * gcc.dg/pr79499.c: New test.
+
+2017-08-02 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/81633
+ * gcc.dg/vect/pr81633.c: New testcase.
+
+2017-08-01 H.J. Lu <hongjiu.lu@intel.com>
+
+ * gcc.dg/guality/pr25967-1.c: New test.
+ * gcc.dg/guality/pr25967-2.c: Likewise.
+ * gcc.dg/torture/pr25967-1.c: Likewise.
+ * gcc.dg/torture/pr25967-2.c: Likewise.
+
+2017-08-01 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR target/81654
+ * gcc.target/i386/pr81654.c: New test.
+
+2017-08-01 Thomas König <tkoenig@gcc.gnu.org>
+
+ PR fortran/79312
+ * gfortran.dg/logical_assignment_1.f90: New test.
+
+2017-08-01 Martin Liska <mliska@suse.cz>
+
+ PR middle-end/70140
+ * gcc.dg/string-opt-1.c: Adjust test-case to scan for memcpy.
+
+2017-08-01 Martin Liska <mliska@suse.cz>
+
+ Revert r250771
+ Make mempcpy more optimal (PR middle-end/70140).
+
+2017-08-01 Jakub Jelinek <jakub@redhat.com>
+
+ PR target/81622
+ * gcc.target/powerpc/pr81622.c: New test.
+
+2017-08-01 Steve Ellcey <sellcey@cavium.com>
+
+ PR tree-optimization/80925
+ * gcc.dg/vect/vect-28.c: Add
+ --param vect-max-peeling-for-alignment=0 option.
+ Remove unaligned access and peeling checks.
+ * gcc.dg/vect/vect-33-big-array.c: Ditto.
+ * gcc.dg/vect/vect-70.c: Ditto.
+ * gcc.dg/vect/vect-87.c: Ditto.
+ * gcc.dg/vect/vect-88.c: Ditto.
+ * gcc.dg/vect/vect-91.c: Ditto.
+ * gcc.dg/vect/vect-93.c: Ditto.
+
+2017-08-01 Tom de Vries <tom@codesourcery.com>
+
+ * gcc.target/nvptx/slp-2.c (foo): Use signed loop iteration variable.
+ * gcc.target/nvptx/slp.c (foo): Same.
+
+2017-08-01 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/81181
+ * gcc.dg/torture/pr81181.c: New testcase.
+
+2017-08-01 Martin Liska <mliska@suse.cz>
+
+ PR middle-end/70140
+ * gcc.dg/string-opt-1.c: Adjust test-case to scan for memcpy.
+
+2017-08-01 Uros Bizjak <ubizjak@gmail.com>
+
+ PR target/81641
+ * gcc.target/i386/pr81641.c: New test.
+
+2017-08-01 Uros Bizjak <ubizjak@gmail.com>
+
+ PR target/81639
+ * gcc.target/i386/pr81639.c: New test.
+
+2017-08-01 Richard Biener <rguenther@suse.de>
+
+ * gcc.dg/tree-ssa/ssa-dce-3.c: Adjust.
+ * gcc.dg/tree-ssa/split-path-5.c: Remove case with just dead
+ endless loop.
+ * gcc.dg/uninit-23.c: Adjust.
+
+2017-08-01 Bin Cheng <bin.cheng@arm.com>
+
+ * gcc.dg/no-strict-overflow-7.c: Revise comment and test string.
+ * gcc.dg/tree-ssa/pr81388-1.c: Ditto.
+
+2017-08-01 Bin Cheng <bin.cheng@arm.com>
+
+ PR tree-optimization/81627
+ * gcc.dg/tree-ssa/pr81627.c: New.
+
+2017-08-01 Bin Cheng <bin.cheng@arm.com>
+
+ PR tree-optimization/81620
+ * gcc.dg/tree-ssa/pr81620-1.c: New.
+ * gcc.dg/tree-ssa/pr81620-2.c: New.
+
+2017-08-01 Dominique d'Humieres <dominiq@lps.ens.fr>
+
+ PR testsuite/53542
+ * gfortran.dg/use_30.f90: New test.
+
+2017-08-01 Jakub Jelinek <jakub@redhat.com>
+
+ PR tree-optimization/81588
+ * gcc.dg/tree-ssa/pr81588.c: New test.
+ * gcc.dg/pr81588.c: New test.
+ * gcc.c-torture/execute/pr81588.c: New test.
+
+2017-08-01 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/81297
+ * gcc.dg/torture/pr81297.c: New testcase.
+
+2017-07-31 Uros Bizjak <ubizjak@gmail.com>
+
+ * gcc.target/i386/naked-1.c (dg-options): Add -fno-pic.
+
+2017-07-31 Steve Ellcey <sellcey@cavium.com>
+
+ PR tree-optimization/80925
+ * gcc.dg/vect/no-section-anchors-vect-69.c: Add
+ --param vect-max-peeling-for-alignment=0 option.
+ Remove unaligned access and peeling checks.
+ * gcc.dg/vect/section-anchors-vect-69.c: Ditto.
+
+2017-07-31 Carl Love <cel@us.ibm.com>
+
+ * gcc.target/powerpc/builtins-4-runnable.c: Fix dg argument that got
+ missed in commit 250746.
+
+2017-07-31 Carl Love <cel@us.ibm.com>
+
+ * gcc.target/powerpc/builtins-4-runnable.c: Add test cases for the
+ new builtins.
+
+2017-07-31 H.J. Lu <hongjiu.lu@intel.com>
+
+ * gcc.target/i386/pr79793-1.c: Compile with -mtune=generic.
+ * gcc.target/i386/pr79793-2.c: Likewise.
+
+2017-07-31 Uros Bizjak <ubizjak@gmail.com>
+
+ PR target/25967
+ * gcc.target/i386/naked-3.c (dg-options): Use -O0.
+ (naked): Add attribute regparm(1) for x86_32 targets.
+ Add integer argument. Remove global "data" variable.
+ (main): Pass integer argument to naked function.
+ * gcc.target/i386/naked-4.c: New test.
+
2017-07-31 Jan Hubicka <hubicka@ucw.cz>
Martin Liska <mliska@suse.cz>
diff --git a/gcc/testsuite/c-c++-common/Wmultistatement-macros-13.c b/gcc/testsuite/c-c++-common/Wmultistatement-macros-13.c
new file mode 100644
index 00000000000..9f42e268d9f
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/Wmultistatement-macros-13.c
@@ -0,0 +1,104 @@
+/* PR c/81448 */
+/* { dg-do compile } */
+/* { dg-options "-Wmultistatement-macros" } */
+
+extern int i;
+
+#define BAD4 i++; i++ /* { dg-warning "macro expands to multiple statements" } */
+#define BAD5 i++; i++ /* { dg-warning "macro expands to multiple statements" } */
+#define BAD6 i++; i++ /* { dg-warning "macro expands to multiple statements" } */
+#define BAD7 i++; i++ /* { dg-warning "macro expands to multiple statements" } */
+#define BAD8 i++; i++ /* { dg-warning "macro expands to multiple statements" } */
+#define BAD9 i++; i++ /* { dg-warning "macro expands to multiple statements" } */
+#define IF if (1) /* { dg-message "not guarded by this 'if' clause" } */
+#define IF2 IF /* { dg-message "in expansion of macro .IF." } */
+#define BADB7 BAD7 /* { dg-message "in expansion of macro .BAD7." } */
+#define BADB8 BAD8 /* { dg-message "in expansion of macro .BAD8." } */
+#define BADB9 BAD9 /* { dg-message "in expansion of macro .BAD9." } */
+
+#define FN0 \
+void fn0 (void) \
+{ \
+ IF \
+ i++; \
+ return; \
+}
+
+#define FN1 \
+void fn1 (void) \
+{ \
+ IF2 \
+ i++; \
+ return; \
+}
+
+#define FN2 \
+void fn2 (void) \
+{ \
+ if (1) \
+ i++; \
+ return; \
+}
+
+#define TOP FN3
+#define FN3 \
+void fn3 (void) \
+{ \
+ IF \
+ i++; \
+ return; \
+}
+
+#define TOP2 FN4 /* { dg-message "in expansion of macro .FN4." } */
+#define FN4 \
+void fn4 (void) \
+{ \
+ IF2 /* { dg-message "in expansion of macro .IF2." } */ \
+ BAD4; /* { dg-message "in expansion of macro .BAD4." } */ \
+}
+
+#define FN5 \
+void fn5 (void) \
+{ \
+ IF /* { dg-message "in expansion of macro .IF." } */ \
+ BAD5; /* { dg-message "in expansion of macro .BAD5." } */ \
+}
+
+#define FN6 \
+void fn6 (void) \
+{ \
+ if (1) /* { dg-message "not guarded by this 'if' clause" } */ \
+ BAD6; /* { dg-message "in expansion of macro .BAD6." } */ \
+}
+
+#define FN7 \
+void fn7 (void) \
+{ \
+ if (1) /* { dg-message "not guarded by this 'if' clause" } */ \
+ BADB7; /* { dg-message "in expansion of macro .BADB7." } */ \
+}
+
+#define FN8 \
+void fn8 (void) \
+{ \
+ IF2 /* { dg-message "in expansion of macro .IF2." } */ \
+ BADB8; /* { dg-message "in expansion of macro .BADB8." } */ \
+}
+
+#define FN9 \
+void fn9 (void) \
+{ \
+ IF /* { dg-message "in expansion of macro .IF." } */ \
+ BADB9; /* { dg-message "in expansion of macro .BADB9." } */ \
+}
+
+FN0
+FN1
+FN2
+TOP
+TOP2 /* { dg-message "in expansion of macro .TOP2." } */
+FN5 /* { dg-message "in expansion of macro .FN5." } */
+FN6 /* { dg-message "in expansion of macro .FN6." } */
+FN7 /* { dg-message "in expansion of macro .FN7." } */
+FN8 /* { dg-message "in expansion of macro .FN8." } */
+FN9 /* { dg-message "in expansion of macro .FN9." } */
diff --git a/gcc/testsuite/c-c++-common/missing-close-symbol.c b/gcc/testsuite/c-c++-common/missing-close-symbol.c
new file mode 100644
index 00000000000..85b96f28ef8
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/missing-close-symbol.c
@@ -0,0 +1,33 @@
+/* { dg-options "-fdiagnostics-show-caret" } */
+
+/* Verify that the C/C++ frontends show the pertinent opening symbol when
+ a closing symbol is missing. */
+
+/* Verify that, when they are on the same line, that the opening symbol is
+ shown as a secondary range within the main diagnostic. */
+
+void test_static_assert_same_line (void)
+{
+ _Static_assert(sizeof(int) >= sizeof(char), "msg"; /* { dg-error "expected '\\)' before ';' token" } */
+ /* { dg-begin-multiline-output "" }
+ _Static_assert(sizeof(int) >= sizeof(char), "msg";
+ ~ ^
+ { dg-end-multiline-output "" } */
+}
+
+/* Verify that, when they are on different lines, that the opening symbol is
+ shown via a secondary diagnostic. */
+
+void test_static_assert_different_line (void)
+{
+ _Static_assert(sizeof(int) >= sizeof(char), /* { dg-message "to match this '\\('" } */
+ "msg"; /* { dg-error "expected '\\)' before ';' token" } */
+ /* { dg-begin-multiline-output "" }
+ "msg";
+ ^
+ { dg-end-multiline-output "" } */
+ /* { dg-begin-multiline-output "" }
+ _Static_assert(sizeof(int) >= sizeof(char),
+ ^
+ { dg-end-multiline-output "" } */
+}
diff --git a/gcc/testsuite/c-c++-common/missing-symbol.c b/gcc/testsuite/c-c++-common/missing-symbol.c
new file mode 100644
index 00000000000..33a501b9988
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/missing-symbol.c
@@ -0,0 +1,50 @@
+/* { dg-options "-fdiagnostics-show-caret" } */
+
+extern int foo (void);
+extern int bar (void);
+
+int missing_close_paren_in_switch (int i)
+{
+ switch (i /* { dg-message "10: to match this '\\('" } */
+ { /* { dg-error "5: expected '\\)' before '.' token" } */
+ /* { dg-begin-multiline-output "" }
+ {
+ ^
+ { dg-end-multiline-output "" } */
+ /* { dg-begin-multiline-output "" }
+ switch (i
+ ^
+ { dg-end-multiline-output "" } */
+
+ case 0:
+ return 5;
+ default:
+ return i;
+ }
+} /* { dg-error "1: expected" } */
+ /* { dg-begin-multiline-output "" }
+ }
+ ^
+ { dg-end-multiline-output "" } */
+
+void missing_close_paren_in_if (void)
+{
+ if (foo () /* { dg-line start_of_if } */
+ && bar ()
+ { /* { dg-error "5: expected '\\)' before '.' token" } */
+ /* { dg-begin-multiline-output "" }
+ {
+ ^
+ { dg-end-multiline-output "" } */
+ /* { dg-message "6: to match this '\\('" "" { target *-*-* } start_of_if } */
+ /* { dg-begin-multiline-output "" }
+ if (foo ()
+ ^
+ { dg-end-multiline-output "" } */
+ }
+
+} /* { dg-error "1: expected" } */
+ /* { dg-begin-multiline-output "" }
+ }
+ ^
+ { dg-end-multiline-output "" } */
diff --git a/gcc/testsuite/c-c++-common/patchable_function_entry-decl.c b/gcc/testsuite/c-c++-common/patchable_function_entry-decl.c
index 8514b10e820..5c39a354559 100644
--- a/gcc/testsuite/c-c++-common/patchable_function_entry-decl.c
+++ b/gcc/testsuite/c-c++-common/patchable_function_entry-decl.c
@@ -1,4 +1,4 @@
-/* { dg-do compile } */
+/* { dg-do compile { target { ! nvptx*-*-* } } } */
/* { dg-options "-O2 -fpatchable-function-entry=3,1" } */
/* { dg-final { scan-assembler-times "nop" 2 } } */
diff --git a/gcc/testsuite/c-c++-common/patchable_function_entry-default.c b/gcc/testsuite/c-c++-common/patchable_function_entry-default.c
index 0dcf1181dde..48094f75f78 100644
--- a/gcc/testsuite/c-c++-common/patchable_function_entry-default.c
+++ b/gcc/testsuite/c-c++-common/patchable_function_entry-default.c
@@ -1,4 +1,4 @@
-/* { dg-do compile } */
+/* { dg-do compile { target { ! nvptx*-*-* } } } */
/* { dg-options "-O2 -fpatchable-function-entry=3,1" } */
/* { dg-final { scan-assembler-times "nop" 3 } } */
diff --git a/gcc/testsuite/c-c++-common/patchable_function_entry-definition.c b/gcc/testsuite/c-c++-common/patchable_function_entry-definition.c
index a007867dcb0..af8202f283b 100644
--- a/gcc/testsuite/c-c++-common/patchable_function_entry-definition.c
+++ b/gcc/testsuite/c-c++-common/patchable_function_entry-definition.c
@@ -1,4 +1,4 @@
-/* { dg-do compile } */
+/* { dg-do compile { target { ! nvptx*-*-* } } } */
/* { dg-options "-O2 -fpatchable-function-entry=3,1" } */
/* { dg-final { scan-assembler-times "nop" 1 } } */
diff --git a/gcc/testsuite/c-c++-common/pr57371-1.c b/gcc/testsuite/c-c++-common/pr57371-1.c
new file mode 100644
index 00000000000..1bac8118406
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/pr57371-1.c
@@ -0,0 +1,341 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -fdump-tree-original" } */
+
+#include <limits.h>
+
+/* Original testcase from PR. */
+
+int foo1 (short x) {
+ return (double) x != 0;
+ /* { dg-final { scan-tree-dump "return (<retval> = )?x != 0" "original" } } */
+}
+
+int foo2 (short x) {
+ return (float) x != 0;
+ /* { dg-final { scan-tree-dump "return (<retval> = )?x != 0" "original" } } */
+}
+
+int foo3 (int x) {
+ return (double) x != 0;
+ /* { dg-final { scan-tree-dump "return (<retval> = )?x != 0" "original" } } */
+}
+
+/* Tests when RHS is within range of integer type. */
+
+void in_range (unsigned short x)
+{
+ {
+ volatile int in_range_1;
+ in_range_1 = (float) x > 100.0f;
+ /* { dg-final { scan-tree-dump "in_range_1 = x > 100" "original" } } */
+ }
+
+ {
+ volatile int in_range_2;
+ in_range_2 = (float) x < 100.0f;
+ /* { dg-final { scan-tree-dump "in_range_2 = x <= 99" "original" } } */
+ }
+
+ {
+ volatile int in_range_3;
+ in_range_3 = (float) x > 100.5f;
+ /* { dg-final { scan-tree-dump "in_range_3 = x (>= 101|> 100)" "original" } } */
+ }
+
+ {
+ volatile int in_range_4;
+ in_range_4 = (float) x < 100.5f;
+ /* { dg-final { scan-tree-dump "in_range_4 = x <= 100" "original" } } */
+ }
+
+ {
+ volatile int in_range_5;
+ in_range_5 = (float) x == 100.0f;
+ /* { dg-final { scan-tree-dump "in_range_5 = x == 100" "original" } } */
+ }
+
+ {
+ volatile int in_range_6;
+ in_range_6 = (float) x != 100.0f;
+ /* { dg-final { scan-tree-dump "in_range_6 = x != 100" "original" } } */
+ }
+
+ {
+ volatile int in_range_7;
+ in_range_7 = (float) x == 100.5f;
+ /* { dg-final { scan-tree-dump "in_range_7 = 0" "original" } } */
+ }
+
+ {
+ volatile int in_range_8;
+ in_range_8 = (float) x != 100.5f;
+ /* { dg-final { scan-tree-dump "in_range_8 = 1" "original" } } */
+ }
+}
+
+/* Tests for cases where RHS is out of range of integer type. */
+
+void out_range (unsigned short x)
+{
+ {
+ volatile int out_range_1;
+ out_range_1 = (float) x > -100.5f;
+ /* { dg-final { scan-tree-dump "out_range_1 = 1" "original" } } */
+ }
+
+ {
+ volatile int out_range_2;
+ out_range_2 = (float) x >= -100.5f;
+ /* { dg-final { scan-tree-dump "out_range_2 = 1" "original" } } */
+ }
+
+ {
+ volatile int out_range_3;
+ out_range_3 = (float) x < -100.5f;
+ /* { dg-final { scan-tree-dump "out_range_3 = 0" "original" } } */
+ }
+
+ {
+ volatile int out_range_4;
+ out_range_4 = (float) x <= -100.5f;
+ /* { dg-final { scan-tree-dump "out_range_4 = 0" "original" } } */
+ }
+
+ {
+ volatile int out_range_5;
+ out_range_5 = (float) x == -100.5f;
+ /* { dg-final { scan-tree-dump "out_range_5 = 0" "original" } } */
+ }
+
+ {
+ volatile int out_range_6;
+ out_range_6 = (float) x != -100.5f;
+ /* { dg-final { scan-tree-dump "out_range_6 = 1" "original" } } */
+ }
+}
+
+/* Tests when RHS is at boundary of integer type. */
+
+void lo_bounds (unsigned short x)
+{
+ {
+ volatile int lo_bounds_1;
+ lo_bounds_1 = (float) x > 0x0;
+ /* { dg-final { scan-tree-dump "lo_bounds_1 = x (>|!=) 0" "original" } } */
+ }
+
+ {
+ volatile int lo_bounds_2;
+ lo_bounds_2 = (float) x >= 0x0;
+ /* { dg-final { scan-tree-dump "lo_bounds_2 = 1" "original" } } */
+ }
+
+ {
+ volatile int lo_bounds_3;
+ lo_bounds_3 = (float) x < 0x0;
+ /* { dg-final { scan-tree-dump "lo_bounds_3 = 0" "original" } } */
+ }
+
+ {
+ volatile int lo_bounds_4;
+ lo_bounds_4 = (float) x <= 0x0;
+ /* { dg-final { scan-tree-dump "lo_bounds_4 = x (<=|==) 0" "original" } } */
+ }
+
+ {
+ volatile int lo_bounds_5;
+ lo_bounds_5 = (float) x > 0x0 - 0.5f;
+ /* { dg-final { scan-tree-dump "lo_bounds_5 = 1" "original" } } */
+ }
+
+ {
+ volatile int lo_bounds_6;
+ lo_bounds_6 = (float) x >= 0x0 - 0.5f;
+ /* { dg-final { scan-tree-dump "lo_bounds_6 = 1" "original" } } */
+ }
+
+ {
+ volatile int lo_bounds_7;
+ lo_bounds_7 = (float) x < 0x0 - 0.5f;
+ /* { dg-final { scan-tree-dump "lo_bounds_7 = 0" "original" } } */
+ }
+
+ {
+ volatile int lo_bounds_8;
+ lo_bounds_8 = (float) x <= 0x0 - 0.5f;
+ /* { dg-final { scan-tree-dump "lo_bounds_8 = 0" "original" } } */
+ }
+
+ {
+ volatile int lo_bounds_9;
+ lo_bounds_9 = (float) x > 0x0 + 0.5f;
+ /* { dg-final { scan-tree-dump "lo_bounds_9 = x (>= 1|!= 0)" "original" } } */
+ }
+
+ {
+ volatile int lo_bounds_10;
+ lo_bounds_10 = (float) x >= 0x0 + 0.5f;
+ /* { dg-final { scan-tree-dump "lo_bounds_10 = x (>= 1|!= 0)" "original" } } */
+ }
+
+ {
+ volatile int lo_bounds_11;
+ lo_bounds_11 = (float) x < 0x0 + 0.5f;
+ /* { dg-final { scan-tree-dump "lo_bounds_11 = x (<=|==) 0" "original" } } */
+ }
+
+ {
+ volatile int lo_bounds_12;
+ lo_bounds_12 = (float) x <= 0x0 + 0.5f;
+ /* { dg-final { scan-tree-dump "lo_bounds_12 = x (<=|==) 0" "original" } } */
+ }
+}
+
+void hi_bounds (unsigned short x)
+{
+ {
+ volatile int hi_bounds_1;
+ hi_bounds_1 = (float) x > USHRT_MAX;
+ /* { dg-final { scan-tree-dump "hi_bounds_1 = 0" "original" } } */
+ }
+
+ {
+ volatile int hi_bounds_2;
+ hi_bounds_2 = (float) x >= USHRT_MAX;
+ /* { dg-final { scan-tree-dump "hi_bounds_2 = x (>=|==) 65535" "original" } } */
+ }
+
+ {
+ volatile int hi_bounds_3;
+ hi_bounds_3 = (float) x < USHRT_MAX;
+ /* { dg-final { scan-tree-dump "hi_bounds_3 = x (<|!=) 65535" "original" } } */
+ }
+
+ {
+ volatile int hi_bounds_4;
+ hi_bounds_4 = (float) x <= USHRT_MAX;
+ /* { dg-final { scan-tree-dump "hi_bounds_4 = 1" "original" } } */
+ }
+
+ {
+ volatile int hi_bounds_5;
+ hi_bounds_5 = (float) x > USHRT_MAX - 0.5f;
+ /* { dg-final { scan-tree-dump "hi_bounds_5 = x (>=|==) 65535" "original" } } */
+ }
+
+ {
+ volatile int hi_bounds_6;
+ hi_bounds_6 = (float) x >= USHRT_MAX - 0.5f;
+ /* { dg-final { scan-tree-dump "hi_bounds_6 = x (>=|==) 65535" "original" } } */
+ }
+
+ {
+ volatile int hi_bounds_7;
+ hi_bounds_7 = (float) x < USHRT_MAX - 0.5f;
+ /* { dg-final { scan-tree-dump "hi_bounds_7 = x (<= 65534|!= 65535)" "original" } } */
+ }
+
+ {
+ volatile int hi_bounds_8;
+ hi_bounds_8 = (float) x <= USHRT_MAX - 0.5f;
+ /* { dg-final { scan-tree-dump "hi_bounds_8 = x (<= 65534|!= 65535)" "original" } } */
+ }
+
+ {
+ volatile int hi_bounds_9;
+ hi_bounds_9 = (float) x > USHRT_MAX + 0.5f;
+ /* { dg-final { scan-tree-dump "hi_bounds_9 = 0" "original" } } */
+ }
+
+ {
+ volatile int hi_bounds_10;
+ hi_bounds_10 = (float) x >= USHRT_MAX + 0.5f;
+ /* { dg-final { scan-tree-dump "hi_bounds_10 = 0" "original" } } */
+ }
+
+ {
+ volatile int hi_bounds_11;
+ hi_bounds_11 = (float) x < USHRT_MAX + 0.5f;
+ /* { dg-final { scan-tree-dump "hi_bounds_11 = 1" "original" } } */
+ }
+
+ {
+ volatile int hi_bounds_12;
+ hi_bounds_12 = (float) x <= USHRT_MAX + 0.5f;
+ /* { dg-final { scan-tree-dump "hi_bounds_12 = 1" "original" } } */
+ }
+}
+
+/* Tests with non-finite float consts. */
+
+void nonfinite (unsigned short x)
+{
+#define INFINITY __builtin_inff ()
+
+ {
+ volatile int nonfinite_1;
+ nonfinite_1 = (float) x > INFINITY;
+ /* { dg-final { scan-tree-dump "nonfinite_1 = 0" "original" } } */
+ }
+
+ {
+ volatile int nonfinite_2;
+ nonfinite_2 = (float) x >= INFINITY;
+ /* { dg-final { scan-tree-dump "nonfinite_2 = 0" "original" } } */
+ }
+
+ {
+ volatile int nonfinite_3;
+ nonfinite_3 = (float) x < INFINITY;
+ /* { dg-final { scan-tree-dump "nonfinite_3 = 1" "original" } } */
+ }
+
+ {
+ volatile int nonfinite_4;
+ nonfinite_4 = (float) x <= INFINITY;
+ /* { dg-final { scan-tree-dump "nonfinite_4 = 1" "original" } } */
+ }
+
+ {
+ volatile int nonfinite_5;
+ nonfinite_5 = (float) x > -INFINITY;
+ /* { dg-final { scan-tree-dump "nonfinite_5 = 1" "original" } } */
+ }
+
+ {
+ volatile int nonfinite_6;
+ nonfinite_6 = (float) x >= -INFINITY;
+ /* { dg-final { scan-tree-dump "nonfinite_6 = 1" "original" } } */
+ }
+
+ {
+ volatile int nonfinite_7;
+ nonfinite_7 = (float) x < -INFINITY;
+ /* { dg-final { scan-tree-dump "nonfinite_7 = 0" "original" } } */
+ }
+
+ {
+ volatile int nonfinite_8;
+ nonfinite_8 = (float) x <= -INFINITY;
+ /* { dg-final { scan-tree-dump "nonfinite_8 = 0" "original" } } */
+ }
+
+#define QNAN __builtin_nanf ("0")
+
+ /* Even for qNaNs, only == and != are quiet. */
+
+ {
+ volatile int nonfinite_9;
+ nonfinite_9 = (float) x == QNAN;
+ /* { dg-final { scan-tree-dump "nonfinite_9 = 0" "original" } } */
+ }
+
+ {
+ volatile int nonfinite_10;
+ nonfinite_10 = (float) x != QNAN;
+ /* { dg-final { scan-tree-dump "nonfinite_10 = 1" "original" } } */
+ }
+}
+
+/* { dg-final { scan-tree-dump-not "\\(float\\)" "original" } } */
+/* { dg-final { scan-tree-dump-not "\\(double\\)" "original" } } */
diff --git a/gcc/testsuite/c-c++-common/pr57371-2.c b/gcc/testsuite/c-c++-common/pr57371-2.c
new file mode 100644
index 00000000000..d07cff318c2
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/pr57371-2.c
@@ -0,0 +1,17 @@
+/* { dg-do compile } */
+/* { dg-options "-O -fdump-tree-optimized" } */
+
+/* We can not get rid of comparison in tests below because of
+ potential inexact exception.
+
+ TODO: enable when -fno-trapping-math. */
+
+int foo1(int x) {
+ return (float) x != 0;
+ /* { dg-final { scan-tree-dump "\\(float\\)" "optimized" } } */
+}
+
+int foo2(long long x) {
+ /* { dg-final { scan-tree-dump "\\(double\\)" "optimized" } } */
+ return (double) x != 0;
+}
diff --git a/gcc/testsuite/c-c++-common/pr57371-3.c b/gcc/testsuite/c-c++-common/pr57371-3.c
new file mode 100644
index 00000000000..973baacbb18
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/pr57371-3.c
@@ -0,0 +1,13 @@
+/* { dg-do compile } */
+/* { dg-options "-O -fdump-tree-optimized" } */
+/* { dg-require-effective-target int128 } */
+
+/* We can not get rid of comparison in tests below because of
+ potential overflow exception.
+
+ TODO: enable when -fno-trapping-math. */
+
+int foo(__int128_t x) {
+ /* { dg-final { scan-tree-dump "\\(float\\)" "optimized" } } */
+ return (float) x != 0;
+}
diff --git a/gcc/testsuite/c-c++-common/pr57371-4.c b/gcc/testsuite/c-c++-common/pr57371-4.c
new file mode 100644
index 00000000000..6265f520f93
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/pr57371-4.c
@@ -0,0 +1,72 @@
+/* { dg-do compile } */
+/* { dg-options "-O -fsignaling-nans -fdump-tree-original" } */
+
+/* We can not get rid of comparison in tests below because of
+ pending NaN exceptions.
+
+ TODO: avoid under -fno-trapping-math. */
+
+#define QNAN __builtin_nanf ("0")
+#define SNAN __builtin_nansf ("0")
+
+void nonfinite(unsigned short x) {
+ {
+ volatile int nonfinite_1;
+ nonfinite_1 = (float) x > QNAN;
+ /* { dg-final { scan-tree-dump "nonfinite_1 = \\(float\\)" "original" } } */
+ }
+
+ {
+ volatile int nonfinite_2;
+ nonfinite_2 = (float) x >= QNAN;
+ /* { dg-final { scan-tree-dump "nonfinite_2 = \\(float\\)" "original" } } */
+ }
+
+ {
+ volatile int nonfinite_3;
+ nonfinite_3 = (float) x < QNAN;
+ /* { dg-final { scan-tree-dump "nonfinite_3 = \\(float\\)" "original" } } */
+ }
+
+ {
+ volatile int nonfinite_4;
+ nonfinite_4 = (float) x <= QNAN;
+ /* { dg-final { scan-tree-dump "nonfinite_4 = \\(float\\)" "original" } } */
+ }
+
+ {
+ volatile int nonfinite_5;
+ nonfinite_5 = (float) x > SNAN;
+ /* { dg-final { scan-tree-dump "nonfinite_5 = \\(float\\)" "original" } } */
+ }
+
+ {
+ volatile int nonfinite_6;
+ nonfinite_6 = (float) x >= SNAN;
+ /* { dg-final { scan-tree-dump "nonfinite_6 = \\(float\\)" "original" } } */
+ }
+
+ {
+ volatile int nonfinite_7;
+ nonfinite_7 = (float) x < SNAN;
+ /* { dg-final { scan-tree-dump "nonfinite_7 = \\(float\\)" "original" } } */
+ }
+
+ {
+ volatile int nonfinite_8;
+ nonfinite_8 = (float) x <= SNAN;
+ /* { dg-final { scan-tree-dump "nonfinite_8 = \\(float\\)" "original" } } */
+ }
+
+ {
+ volatile int nonfinite_9;
+ nonfinite_9 = (float) x == SNAN;
+ /* { dg-final { scan-tree-dump "nonfinite_9 = \\(float\\)" "original" } } */
+ }
+
+ {
+ volatile int nonfinite_10;
+ nonfinite_10 = (float) x != SNAN;
+ /* { dg-final { scan-tree-dump "nonfinite_10 = \\(float\\)" "original" } } */
+ }
+}
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/ubsan/pr81148.c b/gcc/testsuite/c-c++-common/ubsan/pr81148.c
new file mode 100644
index 00000000000..f2d46c8dc56
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/ubsan/pr81148.c
@@ -0,0 +1,9 @@
+/* { dg-do run } */
+/* { dg-options "-fsanitize=undefined -fsanitize-undefined-trap-on-error" } */
+
+int x = -106;
+int main()
+{
+ // -123 - (0x8000000000000000 - -1)
+ return (-123 - ((9223372036854775806LL ^ ~(x && 1)) - -1)) == 0;
+}
diff --git a/gcc/testsuite/c-c++-common/ubsan/pr81705.c b/gcc/testsuite/c-c++-common/ubsan/pr81705.c
new file mode 100644
index 00000000000..081c741c206
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/ubsan/pr81705.c
@@ -0,0 +1,12 @@
+/* { dg-do run } */
+/* { dg-options "-fsanitize=undefined -fsanitize-undefined-trap-on-error" } */
+
+int var_4 = -1716607962;
+int var_14 = 943738830;
+volatile int a;
+int main()
+{
+ // (-(-1716607962) - 516151698) - -(9403738830)
+ a = (-var_4 - 516151698) - -var_14;
+ return 0;
+}
diff --git a/gcc/testsuite/g++.dg/asan/asan.exp b/gcc/testsuite/g++.dg/asan/asan.exp
index 124c44e9e9a..620071ba7dc 100644
--- a/gcc/testsuite/g++.dg/asan/asan.exp
+++ b/gcc/testsuite/g++.dg/asan/asan.exp
@@ -26,7 +26,7 @@ asan_init
# Main loop.
if [check_effective_target_fsanitize_address] {
- gcc-dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/*.C $srcdir/c-c++-common/asan/*.c]] "" ""
+ gcc-dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/*.C $srcdir/$subdir/*.cc $srcdir/c-c++-common/asan/*.c]] "" ""
}
# All done.
diff --git a/gcc/testsuite/g++.dg/cpp0x/move-return1.C b/gcc/testsuite/g++.dg/cpp0x/move-return1.C
new file mode 100644
index 00000000000..dc2b313fee6
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/move-return1.C
@@ -0,0 +1,22 @@
+// PR c++/80452
+// { dg-do compile { target c++11 } }
+
+template<typename> struct check { };
+template<typename T> struct check<T&>;
+
+struct A {
+ A() = default;
+ A(A&&) = default;
+ A(const A&) = delete;
+};
+
+template <class T>
+struct B {
+ template <class U> B(U&&) { check<U> u; }
+};
+
+B<A> f()
+{
+ A a;
+ return a;
+}
diff --git a/gcc/testsuite/g++.dg/cpp0x/nsdmi-defer6.C b/gcc/testsuite/g++.dg/cpp0x/nsdmi-defer6.C
index 0f06343958b..056d16dca4a 100644
--- a/gcc/testsuite/g++.dg/cpp0x/nsdmi-defer6.C
+++ b/gcc/testsuite/g++.dg/cpp0x/nsdmi-defer6.C
@@ -2,7 +2,7 @@
struct A
{
- int i = (A(), 42); // { dg-error "constructor required" }
+ int i = (A(), 42); // { dg-error "" }
};
A a;
diff --git a/gcc/testsuite/g++.dg/cpp0x/nsdmi-template14.C b/gcc/testsuite/g++.dg/cpp0x/nsdmi-template14.C
index 1a00ec0d6a9..a885a241279 100644
--- a/gcc/testsuite/g++.dg/cpp0x/nsdmi-template14.C
+++ b/gcc/testsuite/g++.dg/cpp0x/nsdmi-template14.C
@@ -3,14 +3,14 @@
template<int> struct A
{
- int i = (A<0>(), 0); // { dg-error "recursive instantiation of non-static data" }
+ int i = (A<0>(), 0); // { dg-error "recursive instantiation of default" }
};
A<0> a;
template<int N> struct B
{
- B* p = new B<N>; // { dg-error "recursive instantiation of non-static data" }
+ B* p = new B<N>; // { dg-error "recursive instantiation of default" }
};
B<1> x;
diff --git a/gcc/testsuite/g++.dg/cpp0x/nsdmi10.C b/gcc/testsuite/g++.dg/cpp0x/nsdmi10.C
index 56f9ff08bdf..d8588b7f29e 100644
--- a/gcc/testsuite/g++.dg/cpp0x/nsdmi10.C
+++ b/gcc/testsuite/g++.dg/cpp0x/nsdmi10.C
@@ -6,7 +6,7 @@ struct A1 {
int y1 = 1;
};
- A1(const B1& opts = B1()) {} // { dg-error "constructor" }
+ A1(const B1& opts = B1()) {} // { dg-error "default member initializer" }
};
struct A2 {
@@ -14,5 +14,5 @@ struct A2 {
int x2, y2 = 1;
};
- A2(const B2& opts = B2()) {} // { dg-error "constructor" }
+ A2(const B2& opts = B2()) {} // { dg-error "default member initializer" }
};
diff --git a/gcc/testsuite/g++.dg/cpp0x/nullptr39.C b/gcc/testsuite/g++.dg/cpp0x/nullptr39.C
new file mode 100644
index 00000000000..a34a6af73e9
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/nullptr39.C
@@ -0,0 +1,15 @@
+// PR c++/81671
+// { dg-do compile { target c++11 } }
+
+namespace std { typedef decltype(nullptr) nullptr_t; }
+
+template<class R, class CB> struct Bar
+{};
+template<class R> struct Bar<R, std::nullptr_t>
+{
+ template<std::nullptr_t> struct Bind { constexpr static int const cb = 0; };
+};
+int foo()
+{
+ return Bar<int, decltype(nullptr)>::Bind<nullptr>::cb;
+}
diff --git a/gcc/testsuite/g++.dg/cpp0x/pr65558.C b/gcc/testsuite/g++.dg/cpp0x/pr65558.C
index d294c95a657..12946b35eda 100644
--- a/gcc/testsuite/g++.dg/cpp0x/pr65558.C
+++ b/gcc/testsuite/g++.dg/cpp0x/pr65558.C
@@ -2,6 +2,6 @@
// { dg-do compile { target c++11 } }
inline namespace
-__attribute__((__abi_tag__)) // { dg-warning "ignoring .__abi_tag__. attribute on anonymous namespace" }
+__attribute__((__abi_tag__)) // { dg-warning "ignoring .abi_tag. attribute on anonymous namespace" }
{
}
diff --git a/gcc/testsuite/g++.dg/cpp0x/sfinae59.C b/gcc/testsuite/g++.dg/cpp0x/sfinae59.C
new file mode 100644
index 00000000000..d1c730b6d23
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/sfinae59.C
@@ -0,0 +1,19 @@
+// PR c++/81359
+// { dg-do compile { target c++11 } }
+
+template<typename _Tp, typename = decltype(_Tp())>
+static int test(int);
+
+template<typename>
+static void test(...);
+
+template <class T, class = decltype(test<T>(0))>
+struct A { };
+
+struct B
+{
+ struct C {
+ int i = 0;
+ };
+ A<C> a;
+};
diff --git a/gcc/testsuite/g++.dg/cpp1y/lambda-generic-const4.C b/gcc/testsuite/g++.dg/cpp1y/lambda-generic-const4.C
new file mode 100644
index 00000000000..52f4373ccbd
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp1y/lambda-generic-const4.C
@@ -0,0 +1,20 @@
+// PR c++/81525
+// { dg-do compile { target c++14 } }
+
+template <int i> struct A {
+ constexpr operator int () const { return i; }
+};
+template <int i> constexpr A<i> a = {};
+
+template <typename F> void foo (F f) {
+ f (A<0>{});
+}
+template <typename T>
+void bar (T) {
+ constexpr auto N = a<1>;
+ auto f = [&] (auto i) {
+ static_assert (static_cast<int>(N) == 1, "");
+ };
+ foo (f);
+}
+int main () { bar (0); }
diff --git a/gcc/testsuite/g++.dg/cpp1z/class-deduction43.C b/gcc/testsuite/g++.dg/cpp1z/class-deduction43.C
new file mode 100644
index 00000000000..a906a0f3626
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp1z/class-deduction43.C
@@ -0,0 +1,10 @@
+// PR c++/79790
+// { dg-options -std=c++1z }
+
+template <int N>
+struct array
+{
+ int a [N];
+};
+
+array a = { 1, 2, 3 }; // { dg-error "cannot deduce" }
diff --git a/gcc/testsuite/g++.dg/diagnostic/unclosed-extern-c.C b/gcc/testsuite/g++.dg/diagnostic/unclosed-extern-c.C
new file mode 100644
index 00000000000..fda3532266d
--- /dev/null
+++ b/gcc/testsuite/g++.dg/diagnostic/unclosed-extern-c.C
@@ -0,0 +1,3 @@
+extern "C" { /* { dg-message "12: to match this '.'" } */
+
+void test (void); /* { dg-error "17: expected '.' at end of input" } */
diff --git a/gcc/testsuite/g++.dg/diagnostic/unclosed-function.C b/gcc/testsuite/g++.dg/diagnostic/unclosed-function.C
new file mode 100644
index 00000000000..e1e15504172
--- /dev/null
+++ b/gcc/testsuite/g++.dg/diagnostic/unclosed-function.C
@@ -0,0 +1,3 @@
+void test (void)
+{ /* { dg-message "1: to match this '.'" } */
+ int filler; /* { dg-error "13: expected '.' at end of input" } */
diff --git a/gcc/testsuite/g++.dg/diagnostic/unclosed-namespace.C b/gcc/testsuite/g++.dg/diagnostic/unclosed-namespace.C
new file mode 100644
index 00000000000..ff113226cc7
--- /dev/null
+++ b/gcc/testsuite/g++.dg/diagnostic/unclosed-namespace.C
@@ -0,0 +1,2 @@
+namespace unclosed { /* { dg-message "20: to match this '.'" } */
+int filler; /* { dg-error "11: expected '.' at end of input" } */
diff --git a/gcc/testsuite/g++.dg/diagnostic/unclosed-struct.C b/gcc/testsuite/g++.dg/diagnostic/unclosed-struct.C
new file mode 100644
index 00000000000..8c206bbecc4
--- /dev/null
+++ b/gcc/testsuite/g++.dg/diagnostic/unclosed-struct.C
@@ -0,0 +1,3 @@
+struct unclosed { /* { dg-message "17: to match this '.'" } */
+ int dummy; /* { dg-error "12: expected '.' at end of input" } */
+ // { dg-error "expected unqualified-id at end of input" "" { target *-*-* } .-1 }
diff --git a/gcc/testsuite/g++.dg/ext/packed8.C b/gcc/testsuite/g++.dg/ext/packed8.C
index 91ee8b3ee74..1476010cef3 100644
--- a/gcc/testsuite/g++.dg/ext/packed8.C
+++ b/gcc/testsuite/g++.dg/ext/packed8.C
@@ -1,8 +1,6 @@
// PR c++/18378
// NOTE: This test assumes packed structure layout differs from unpacked
-// structure layout. This isn't true, e.g., with the default
-// arm-none-elf options.
-// { dg-options "-mstructure-size-boundary=8" { target arm*-*-* } }
+// structure layout.
class A
{
diff --git a/gcc/testsuite/g++.dg/inherit/vdtor1.C b/gcc/testsuite/g++.dg/inherit/vdtor1.C
new file mode 100644
index 00000000000..caba17fde6a
--- /dev/null
+++ b/gcc/testsuite/g++.dg/inherit/vdtor1.C
@@ -0,0 +1,7 @@
+struct A {
+ void operator delete(void *, unsigned long);
+};
+struct B : A {
+ virtual ~B();
+};
+struct C : B {};
diff --git a/gcc/testsuite/g++.dg/init/array16.C b/gcc/testsuite/g++.dg/init/array16.C
index 188d1a84ff1..2f6c63dc8db 100644
--- a/gcc/testsuite/g++.dg/init/array16.C
+++ b/gcc/testsuite/g++.dg/init/array16.C
@@ -1,7 +1,6 @@
// Causes timeout for the MMIX simulator on a 3GHz P4 and we can't
// have "compile" for some targets and "run" for others.
// { dg-do run { target { ! mmix-*-* } } }
-// { dg-options "-mstructure-size-boundary=8" { target arm*-*-* } }
// Copyright (C) 2004 Free Software Foundation, Inc.
// Contributed by Nathan Sidwell 8 Dec 2004 <nathan@codesourcery.com>
@@ -10,8 +9,7 @@
// Origin: Matt LaFary <lafary@activmedia.com>
// NOTE: This test assumes that 4M instances of struct ELT can fit into
-// a 5MB array. This isn't true, e.g., with the default
-// arm-none-elf options.
+// a 5MB array.
struct elt
{
diff --git a/gcc/testsuite/g++.dg/other/bitfield6.C b/gcc/testsuite/g++.dg/other/bitfield6.C
new file mode 100644
index 00000000000..c1e8a17989b
--- /dev/null
+++ b/gcc/testsuite/g++.dg/other/bitfield6.C
@@ -0,0 +1,9 @@
+// PR c++/81607
+
+int a;
+
+struct b {
+ long c : 32;
+} d;
+
+char f = (903092 ? int(d.c) : 0) << a;
diff --git a/gcc/testsuite/g++.dg/other/crash-4.C b/gcc/testsuite/g++.dg/other/crash-4.C
index a77fe05d487..db5c5bd8a8e 100644
--- a/gcc/testsuite/g++.dg/other/crash-4.C
+++ b/gcc/testsuite/g++.dg/other/crash-4.C
@@ -5,9 +5,7 @@
// Origin: Andrew Pinski pinskia@gcc.gnu.org
// NOTE: This test assumes packed structure layout differs from unpacked
-// structure layout. This isn't true, e.g., with the default
-// arm-none-elf options.
-// { dg-options "-mstructure-size-boundary=8" { target arm*-*-* } }
+// structure layout.
struct a
{
diff --git a/gcc/testsuite/g++.dg/other/pr81355.C b/gcc/testsuite/g++.dg/other/pr81355.C
new file mode 100644
index 00000000000..89d1b419581
--- /dev/null
+++ b/gcc/testsuite/g++.dg/other/pr81355.C
@@ -0,0 +1,14 @@
+/* { dg-do compile { target x86_64-*-* } } */
+
+__attribute__((target("default")))
+int foo() {return 1;}
+
+__attribute__((target("arch=core2", "")))
+int foo2() {return 2;} /* { dg-warning "empty string in attribute .target." } */
+
+__attribute__((target("sse4.2", "", "")))
+int foo3() {return 2;} /* { dg-warning "empty string in attribute .target." } */
+
+int main() {
+ return foo() + foo2() + foo3();
+}
diff --git a/gcc/testsuite/g++.dg/parse/pragma2.C b/gcc/testsuite/g++.dg/parse/pragma2.C
index c5616ff74f5..3dc5fc17788 100644
--- a/gcc/testsuite/g++.dg/parse/pragma2.C
+++ b/gcc/testsuite/g++.dg/parse/pragma2.C
@@ -4,5 +4,5 @@
// does not.
int f(int x,
#pragma interface // { dg-error "not allowed here" }
- // The parser gets confused and issues an error on the next line.
- int y); // { dg-bogus "" "" { xfail *-*-* } }
+ // { dg-bogus "expected identifier" "" { xfail *-*-* } .-1 }
+ int y);
diff --git a/gcc/testsuite/g++.dg/template/crash127.C b/gcc/testsuite/g++.dg/template/crash127.C
new file mode 100644
index 00000000000..b7c03251f8c
--- /dev/null
+++ b/gcc/testsuite/g++.dg/template/crash127.C
@@ -0,0 +1,22 @@
+// PR c++/71440
+
+struct A
+{
+ void f () {}
+};
+
+typedef void (A::*Ptr) ();
+
+template < Ptr > struct B {};
+
+template < class T >
+struct C : public A
+{
+ void bar ()
+ {
+ B < &A::A > b; // { dg-error "taking address of constructor 'A::A" "" { target c++98_only } }
+ // { dg-error "taking address of constructor 'constexpr A::A" "" { target c++11 } .-1 }
+ }
+};
+
+template class C < int >;
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/tree-ssa/pr81719.C b/gcc/testsuite/g++.dg/tree-ssa/pr81719.C
new file mode 100644
index 00000000000..6e017afbae2
--- /dev/null
+++ b/gcc/testsuite/g++.dg/tree-ssa/pr81719.C
@@ -0,0 +1,24 @@
+/* { dg-do compile { target c++11 } } */
+/* { dg-options "-O3 -fdump-tree-optimized" } */
+
+typedef int Items[2];
+
+struct ItemArray
+{
+ Items items;
+ int sum_x2() const;
+};
+
+int ItemArray::sum_x2() const
+{
+ int total = 0;
+ for (int item : items)
+ {
+ total += item;
+ }
+ return total;
+}
+
+/* We should be able to compute the number of iterations to two, unroll
+ the loop and end up with a single basic-block in sum_x2. */
+/* { dg-final { scan-tree-dump-times "bb" 1 "optimized" } } */
diff --git a/gcc/testsuite/g++.dg/warn/Wshadow-compatible-local-2.C b/gcc/testsuite/g++.dg/warn/Wshadow-compatible-local-2.C
new file mode 100644
index 00000000000..da8f43bd67d
--- /dev/null
+++ b/gcc/testsuite/g++.dg/warn/Wshadow-compatible-local-2.C
@@ -0,0 +1,21 @@
+// PR c++/81640
+// { dg-do compile }
+// { dg-options "-Wshadow=compatible-local" }
+
+struct A {};
+struct B { operator bool () const { return true; } };
+
+template <typename T>
+void
+foo ()
+{
+ T d, e;
+ if (e)
+ A d;
+}
+
+void
+bar ()
+{
+ foo <B> ();
+}
diff --git a/gcc/testsuite/gcc.c-torture/execute/builtins/memops-asm-lib.c b/gcc/testsuite/gcc.c-torture/execute/builtins/memops-asm-lib.c
index 25d4a40a67e..3baf7a64622 100644
--- a/gcc/testsuite/gcc.c-torture/execute/builtins/memops-asm-lib.c
+++ b/gcc/testsuite/gcc.c-torture/execute/builtins/memops-asm-lib.c
@@ -38,7 +38,7 @@ my_bcopy (const void *s, void *d, size_t n)
}
__attribute__ ((used))
-void
+void *
my_memmove (void *d, const void *s, size_t n)
{
char *dst = (char *) d;
@@ -53,6 +53,8 @@ my_memmove (void *d, const void *s, size_t n)
while (n--)
*--dst = *--src;
}
+
+ return d;
}
/* LTO code is at the present to able to track that asm alias my_bcopy on builtin
diff --git a/gcc/testsuite/gcc.c-torture/execute/pr81423.c b/gcc/testsuite/gcc.c-torture/execute/pr81423.c
new file mode 100644
index 00000000000..731aa8f1c65
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/execute/pr81423.c
@@ -0,0 +1,36 @@
+extern void abort (void);
+
+unsigned long long int ll = 0;
+unsigned long long int ull1 = 1ULL;
+unsigned long long int ull2 = 12008284144813806346ULL;
+unsigned long long int ull3;
+
+unsigned long long int __attribute__ ((noinline))
+foo (void)
+{
+ ll = -5597998501375493990LL;
+
+ ll = (5677365550390624949L - ll) - (ull1 > 0);
+ unsigned long long int ull3;
+ ull3 = (unsigned int)
+ (2067854353L <<
+ (((ll + -2129105131L) ^ 10280750144413668236ULL) -
+ 10280750143997242009ULL)) >> ((2873442921854271231ULL | ull2)
+ - 12098357307243495419ULL);
+
+ return ull3;
+}
+
+int
+main (void)
+{
+ /* We need a long long of exactly 64 bits for this test. */
+ ll--;
+ if (ll != 0xffffffffffffffffULL)
+ return 0;
+
+ ull3 = foo ();
+ if (ull3 != 3998784)
+ abort ();
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.c-torture/execute/pr81588.c b/gcc/testsuite/gcc.c-torture/execute/pr81588.c
new file mode 100644
index 00000000000..b8f84b3e18c
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/execute/pr81588.c
@@ -0,0 +1,45 @@
+/* PR tree-optimization/81588 */
+
+__attribute__((noinline, noclone)) int
+bar (int x)
+{
+ __asm volatile ("" : : "g" (x) : "memory");
+}
+
+__attribute__((noinline, noclone)) int
+foo (unsigned x, long long y)
+{
+ if (y < 0)
+ return 0;
+ if (y < (long long) (4 * x))
+ {
+ bar (y);
+ return 1;
+ }
+ return 0;
+}
+
+int
+main ()
+{
+ volatile unsigned x = 10;
+ volatile long long y = -10000;
+ if (foo (x, y) != 0)
+ __builtin_abort ();
+ y = -1;
+ if (foo (x, y) != 0)
+ __builtin_abort ();
+ y = 0;
+ if (foo (x, y) != 1)
+ __builtin_abort ();
+ y = 39;
+ if (foo (x, y) != 1)
+ __builtin_abort ();
+ y = 40;
+ if (foo (x, y) != 0)
+ __builtin_abort ();
+ y = 10000;
+ if (foo (x, y) != 0)
+ __builtin_abort ();
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/Walloca-14.c b/gcc/testsuite/gcc.dg/Walloca-14.c
index f3e3f579439..ea48227f7e8 100644
--- a/gcc/testsuite/gcc.dg/Walloca-14.c
+++ b/gcc/testsuite/gcc.dg/Walloca-14.c
@@ -9,6 +9,6 @@ g (int *p)
extern void f (void *);
void *q = __builtin_alloca (p); /* { dg-warning "passing argument 1" } */
- /* { dg-warning "unbounded use of 'alloca'" "unbounded" { target *-*-* } 11 } */
+ /* { dg-warning "unbounded use of 'alloca'" "unbounded" { target *-*-* } .-1 } */
f (q);
}
diff --git a/gcc/testsuite/gcc.dg/Wattributes-5.c b/gcc/testsuite/gcc.dg/Wattributes-5.c
new file mode 100644
index 00000000000..34483391e6d
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/Wattributes-5.c
@@ -0,0 +1,13 @@
+/* { dg-do compile } */
+/* { dg-options -Wattributes } */
+
+void __attribute__((_foobar)) foo() { } /* { dg-warning "attribute directive ignored" } */
+void __attribute__((_xformat__)) foo2() { } /* { dg-warning "attribute directive ignored" } */
+void __attribute__((xformat__)) foo3() { } /* { dg-warning "attribute directive ignored" } */
+void __attribute__((__xformat)) foo4() { } /* { dg-warning "attribute directive ignored" } */
+void __attribute__((_)) foo5() { } /* { dg-warning "attribute directive ignored" } */
+void __attribute__((_)) foo6() { } /* { dg-warning "attribute directive ignored" } */
+void __attribute__((__)) foo7() { } /* { dg-warning "attribute directive ignored" } */
+void __attribute__((___)) foo8() { } /* { dg-warning "attribute directive ignored" } */
+void __attribute__((____)) foo9() { } /* { dg-warning "attribute directive ignored" } */
+void __attribute__((_____)) foo10() { } /* { dg-warning "attribute directive ignored" } */
diff --git a/gcc/testsuite/gcc.dg/Wsign-compare-1.c b/gcc/testsuite/gcc.dg/Wsign-compare-1.c
new file mode 100644
index 00000000000..be3bd2fcbd8
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/Wsign-compare-1.c
@@ -0,0 +1,83 @@
+/* PR c/81417 */
+/* { dg-do compile } */
+/* { dg-options "-Wsign-compare -fdiagnostics-show-caret" } */
+
+unsigned int
+f0 (int x, unsigned int y)
+{
+ return x ? y : -1; /* { dg-warning "18:operand of \\?: changes signedness from 'int' to 'unsigned int'" } */
+/* { dg-begin-multiline-output "" }
+ return x ? y : -1;
+ ^~
+ { dg-end-multiline-output "" } */
+}
+
+unsigned int
+f1 (int xxx, unsigned int yyy)
+{
+ return xxx ? yyy : -1; /* { dg-warning "22:operand of \\?: changes signedness from 'int' to 'unsigned int'" } */
+/* { dg-begin-multiline-output "" }
+ return xxx ? yyy : -1;
+ ^~
+ { dg-end-multiline-output "" } */
+}
+
+unsigned int
+f2 (int xxx, unsigned int yyy)
+{
+ return xxx ? -1 : yyy; /* { dg-warning "16:operand of \\?: changes signedness from 'int' to 'unsigned int'" } */
+/* { dg-begin-multiline-output "" }
+ return xxx ? -1 : yyy;
+ ^~
+ { dg-end-multiline-output "" } */
+}
+
+unsigned int
+f3 (unsigned int yyy)
+{
+ return yyy ?: -1; /* { dg-warning "17:operand of \\?: changes signedness from 'int' to 'unsigned int'" } */
+/* { dg-begin-multiline-output "" }
+ return yyy ?: -1;
+ ^~
+ { dg-end-multiline-output "" } */
+}
+
+unsigned int
+f4 (int xxx, unsigned yyy, short uuu)
+{
+ return xxx ? yyy : uuu; /* { dg-warning "22:operand of \\?: changes signedness from 'short int' to 'unsigned int'" } */
+/* { dg-begin-multiline-output "" }
+ return xxx ? yyy : uuu;
+ ^~~
+ { dg-end-multiline-output "" } */
+}
+
+unsigned int
+f5 (int xxx, unsigned yyy, short uuu)
+{
+ return xxx ? uuu : yyy; /* { dg-warning "16:operand of \\?: changes signedness from 'short int' to 'unsigned int'" } */
+/* { dg-begin-multiline-output "" }
+ return xxx ? uuu : yyy;
+ ^~~
+ { dg-end-multiline-output "" } */
+}
+
+unsigned int
+f6 (int xxx, unsigned yyy, signed char uuu)
+{
+ return xxx ? yyy : uuu; /* { dg-warning "22:operand of \\?: changes signedness from 'signed char' to 'unsigned int'" } */
+/* { dg-begin-multiline-output "" }
+ return xxx ? yyy : uuu;
+ ^~~
+ { dg-end-multiline-output "" } */
+}
+
+unsigned int
+f7 (int xxx, unsigned yyy, signed char uuu)
+{
+ return xxx ? uuu : yyy; /* { dg-warning "16:operand of \\?: changes signedness from 'signed char' to 'unsigned int'" } */
+/* { dg-begin-multiline-output "" }
+ return xxx ? uuu : yyy;
+ ^~~
+ { dg-end-multiline-output "" } */
+}
diff --git a/gcc/testsuite/gcc.dg/assign-warn-1.c b/gcc/testsuite/gcc.dg/assign-warn-1.c
index f26a5447ea0..365025724c4 100644
--- a/gcc/testsuite/gcc.dg/assign-warn-1.c
+++ b/gcc/testsuite/gcc.dg/assign-warn-1.c
@@ -50,63 +50,63 @@ TESTRET(dfe, void *, fp); /* { dg-warning "ISO C forbids return between function
TESTARG(sua, int *, unsigned int *); /* { dg-warning "pointer targets in passing argument 1 of 'suaF' differ in signedness" } */
TESTARP(sub, int *, unsigned int *); /* { dg-warning "pointer targets in passing argument 1 of 'subFp.x' differ in signedness" } */
-TESTASS(suc, int *, unsigned int *); /* { dg-warning "pointer targets in assignment differ in signedness" } */
-TESTINI(sud, int *, unsigned int *); /* { dg-warning "pointer targets in initialization differ in signedness" } */
-TESTRET(sue, int *, unsigned int *); /* { dg-warning "pointer targets in return differ in signedness" } */
+TESTASS(suc, int *, unsigned int *); /* { dg-warning "pointer targets in assignment from 'unsigned int \\*' to 'int \\*' differ in signedness" } */
+TESTINI(sud, int *, unsigned int *); /* { dg-warning "pointer targets in initialization of 'int \\*' from 'unsigned int \\*' differ in signedness" } */
+TESTRET(sue, int *, unsigned int *); /* { dg-warning "pointer targets in returning 'unsigned int \\*' from a function with return type 'int \\*' differ in signedness" } */
TESTARG(usa, unsigned int *, int *); /* { dg-warning "pointer targets in passing argument 1 of 'usaF' differ in signedness" } */
TESTARP(usb, unsigned int *, int *); /* { dg-warning "pointer targets in passing argument 1 of 'usbFp.x' differ in signedness" } */
-TESTASS(usc, unsigned int *, int *); /* { dg-warning "pointer targets in assignment differ in signedness" } */
-TESTINI(usd, unsigned int *, int *); /* { dg-warning "pointer targets in initialization differ in signedness" } */
-TESTRET(use, unsigned int *, int *); /* { dg-warning "pointer targets in return differ in signedness" } */
+TESTASS(usc, unsigned int *, int *); /* { dg-warning "pointer targets in assignment from 'int \\*' to 'unsigned int \\*' differ in signedness" } */
+TESTINI(usd, unsigned int *, int *); /* { dg-warning "pointer targets in initialization of 'unsigned int \\*' from 'int \\*' differ in signedness" } */
+TESTRET(use, unsigned int *, int *); /* { dg-warning "pointer targets in returning 'int \\*' from a function with return type 'unsigned int \\*' differ in signedness" } */
TESTARG(cua, char *, unsigned char *); /* { dg-warning "pointer targets in passing argument 1 of 'cuaF' differ in signedness" } */
TESTARP(cub, char *, unsigned char *); /* { dg-warning "pointer targets in passing argument 1 of 'cubFp.x' differ in signedness" } */
-TESTASS(cuc, char *, unsigned char *); /* { dg-warning "pointer targets in assignment differ in signedness" } */
-TESTINI(cud, char *, unsigned char *); /* { dg-warning "pointer targets in initialization differ in signedness" } */
-TESTRET(cue, char *, unsigned char *); /* { dg-warning "pointer targets in return differ in signedness" } */
+TESTASS(cuc, char *, unsigned char *); /* { dg-warning "pointer targets in assignment from 'unsigned char \\*' to 'char \\*' differ in signedness" } */
+TESTINI(cud, char *, unsigned char *); /* { dg-warning "pointer targets in initialization of 'char \\*' from 'unsigned char \\*' differ in signedness" } */
+TESTRET(cue, char *, unsigned char *); /* { dg-warning "pointer targets in returning 'unsigned char \\*' from a function with return type 'char \\*' differ in signedness" } */
TESTARG(uca, unsigned char *, char *); /* { dg-warning "pointer targets in passing argument 1 of 'ucaF' differ in signedness" } */
TESTARP(ucb, unsigned char *, char *); /* { dg-warning "pointer targets in passing argument 1 of 'ucbFp.x' differ in signedness" } */
-TESTASS(ucc, unsigned char *, char *); /* { dg-warning "pointer targets in assignment differ in signedness" } */
-TESTINI(ucd, unsigned char *, char *); /* { dg-warning "pointer targets in initialization differ in signedness" } */
-TESTRET(uce, unsigned char *, char *); /* { dg-warning "pointer targets in return differ in signedness" } */
+TESTASS(ucc, unsigned char *, char *); /* { dg-warning "pointer targets in assignment from 'char \\*' to 'unsigned char \\*' differ in signedness" } */
+TESTINI(ucd, unsigned char *, char *); /* { dg-warning "pointer targets in initialization of 'unsigned char \\*' from 'char \\*' differ in signedness" } */
+TESTRET(uce, unsigned char *, char *); /* { dg-warning "pointer targets in returning 'char \\*' from a function with return type 'unsigned char \\*' differ in signedness" } */
TESTARG(csa, char *, signed char *); /* { dg-warning "pointer targets in passing argument 1 of 'csaF' differ in signedness" } */
TESTARP(csb, char *, signed char *); /* { dg-warning "pointer targets in passing argument 1 of 'csbFp.x' differ in signedness" } */
-TESTASS(csc, char *, signed char *); /* { dg-warning "pointer targets in assignment differ in signedness" } */
-TESTINI(csd, char *, signed char *); /* { dg-warning "pointer targets in initialization differ in signedness" } */
-TESTRET(cse, char *, signed char *); /* { dg-warning "pointer targets in return differ in signedness" } */
+TESTASS(csc, char *, signed char *); /* { dg-warning "pointer targets in assignment from 'signed char \\*' to 'char \\*' differ in signedness" } */
+TESTINI(csd, char *, signed char *); /* { dg-warning "pointer targets in initialization of 'char \\*' from 'signed char \\*' differ in signedness" } */
+TESTRET(cse, char *, signed char *); /* { dg-warning "pointer targets in returning 'signed char \\*' from a function with return type 'char \\*' differ in signedness" } */
TESTARG(sca, signed char *, char *); /* { dg-warning "pointer targets in passing argument 1 of 'scaF' differ in signedness" } */
TESTARP(scb, signed char *, char *); /* { dg-warning "pointer targets in passing argument 1 of 'scbFp.x' differ in signedness" } */
-TESTASS(scc, signed char *, char *); /* { dg-warning "pointer targets in assignment differ in signedness" } */
-TESTINI(scd, signed char *, char *); /* { dg-warning "pointer targets in initialization differ in signedness" } */
-TESTRET(sce, signed char *, char *); /* { dg-warning "pointer targets in return differ in signedness" } */
+TESTASS(scc, signed char *, char *); /* { dg-warning "pointer targets in assignment from 'char \\*' to 'signed char \\*' differ in signedness" } */
+TESTINI(scd, signed char *, char *); /* { dg-warning "pointer targets in initialization of 'signed char \\*' from 'char \\*' differ in signedness" } */
+TESTRET(sce, signed char *, char *); /* { dg-warning "pointer targets in returning 'char \\*' from a function with return type 'signed char \\*' differ in signedness" } */
TESTARG(cia, char *, int *); /* { dg-warning "passing argument 1 of 'ciaF' from incompatible pointer type" } */
TESTARP(cib, char *, int *); /* { dg-warning "passing argument 1 of 'cibFp.x' from incompatible pointer type" } */
-TESTASS(cic, char *, int *); /* { dg-warning "assignment from incompatible pointer type" } */
-TESTINI(cid, char *, int *); /* { dg-warning "initialization from incompatible pointer type" } */
-TESTRET(cie, char *, int *); /* { dg-warning "return from incompatible pointer type" } */
+TESTASS(cic, char *, int *); /* { dg-warning "assignment to 'char \\*' from incompatible pointer type 'int \\*'" } */
+TESTINI(cid, char *, int *); /* { dg-warning "initialization of 'char \\*' from incompatible pointer type 'int \\*'" } */
+TESTRET(cie, char *, int *); /* { dg-warning "returning 'int \\*' from a function with incompatible return type 'char \\*'" } */
TESTARG(ica, int *, char *); /* { dg-warning "passing argument 1 of 'icaF' from incompatible pointer type" } */
TESTARP(icb, int *, char *); /* { dg-warning "passing argument 1 of 'icbFp.x' from incompatible pointer type" } */
-TESTASS(icc, int *, char *); /* { dg-warning "assignment from incompatible pointer type" } */
-TESTINI(icd, int *, char *); /* { dg-warning "initialization from incompatible pointer type" } */
-TESTRET(ice, int *, char *); /* { dg-warning "return from incompatible pointer type" } */
+TESTASS(icc, int *, char *); /* { dg-warning "assignment to 'int \\*' from incompatible pointer type 'char \\*'" } */
+TESTINI(icd, int *, char *); /* { dg-warning "initialization of 'int \\*' from incompatible pointer type 'char \\*'" } */
+TESTRET(ice, int *, char *); /* { dg-warning "returning 'char \\*' from a function with incompatible return type 'int \\*'" } */
TESTARG(ciia, char *, int); /* { dg-warning "passing argument 1 of 'ciiaF' makes pointer from integer without a cast" } */
TESTARP(ciib, char *, int); /* { dg-warning "passing argument 1 of 'ciibFp.x' makes pointer from integer without a cast" } */
-TESTASS(ciic, char *, int); /* { dg-warning "assignment makes pointer from integer without a cast" } */
-TESTINI(ciid, char *, int); /* { dg-warning "initialization makes pointer from integer without a cast" } */
-TESTRET(ciie, char *, int); /* { dg-warning "return makes pointer from integer without a cast" } */
+TESTASS(ciic, char *, int); /* { dg-warning "assignment to 'char \\*' from 'int' makes pointer from integer without a cast" } */
+TESTINI(ciid, char *, int); /* { dg-warning "initialization of 'char \\*' from 'int' makes pointer from integer without a cast" } */
+TESTRET(ciie, char *, int); /* { dg-warning "returning 'int' from a function with return type 'char \\*' makes pointer from integer without a cast" } */
TESTARG(iica, int, char *); /* { dg-warning "passing argument 1 of 'iicaF' makes integer from pointer without a cast" } */
TESTARP(iicb, int, char *); /* { dg-warning "passing argument 1 of 'iicbFp.x' makes integer from pointer without a cast" } */
-TESTASS(iicc, int, char *); /* { dg-warning "assignment makes integer from pointer without a cast" } */
-TESTINI(iicd, int, char *); /* { dg-warning "initialization makes integer from pointer without a cast" } */
-TESTRET(iice, int, char *); /* { dg-warning "return makes integer from pointer without a cast" } */
+TESTASS(iicc, int, char *); /* { dg-warning "assignment to 'int' from 'char \\*' makes integer from pointer without a cast" } */
+TESTINI(iicd, int, char *); /* { dg-warning "initialization of 'int' from 'char \\*' makes integer from pointer without a cast" } */
+TESTRET(iice, int, char *); /* { dg-warning "returning 'char \\*' from a function with return type 'int' makes integer from pointer without a cast" } */
struct s { int a; };
diff --git a/gcc/testsuite/gcc.dg/assign-warn-2.c b/gcc/testsuite/gcc.dg/assign-warn-2.c
index 1e5eb1ca6e5..0c8a8ee7833 100644
--- a/gcc/testsuite/gcc.dg/assign-warn-2.c
+++ b/gcc/testsuite/gcc.dg/assign-warn-2.c
@@ -51,63 +51,63 @@ TESTRET(dfe, void *, fp); /* { dg-error "ISO C forbids return between function p
TESTARG(sua, int *, unsigned int *); /* { dg-error "pointer targets in passing argument 1 of 'suaF' differ in signedness" } */
TESTARP(sub, int *, unsigned int *); /* { dg-error "pointer targets in passing argument 1 of 'subFp.x' differ in signedness" } */
-TESTASS(suc, int *, unsigned int *); /* { dg-error "pointer targets in assignment differ in signedness" } */
-TESTINI(sud, int *, unsigned int *); /* { dg-error "pointer targets in initialization differ in signedness" } */
-TESTRET(sue, int *, unsigned int *); /* { dg-error "pointer targets in return differ in signedness" } */
+TESTASS(suc, int *, unsigned int *); /* { dg-error "pointer targets in assignment from 'unsigned int \\*' to 'int \\*' differ in signedness" } */
+TESTINI(sud, int *, unsigned int *); /* { dg-error "pointer targets in initialization of 'int \\*' from 'unsigned int \\*' differ in signedness" } */
+TESTRET(sue, int *, unsigned int *); /* { dg-error "pointer targets in returning 'unsigned int \\*' from a function with return type 'int \\*' differ in signedness" } */
TESTARG(usa, unsigned int *, int *); /* { dg-error "pointer targets in passing argument 1 of 'usaF' differ in signedness" } */
TESTARP(usb, unsigned int *, int *); /* { dg-error "pointer targets in passing argument 1 of 'usbFp.x' differ in signedness" } */
-TESTASS(usc, unsigned int *, int *); /* { dg-error "pointer targets in assignment differ in signedness" } */
-TESTINI(usd, unsigned int *, int *); /* { dg-error "pointer targets in initialization differ in signedness" } */
-TESTRET(use, unsigned int *, int *); /* { dg-error "pointer targets in return differ in signedness" } */
+TESTASS(usc, unsigned int *, int *); /* { dg-error "pointer targets in assignment from 'int \\*' to 'unsigned int \\*' differ in signedness" } */
+TESTINI(usd, unsigned int *, int *); /* { dg-error "pointer targets in initialization of 'unsigned int \\*' from 'int \\*' differ in signedness" } */
+TESTRET(use, unsigned int *, int *); /* { dg-error "pointer targets in returning 'int \\*' from a function with return type 'unsigned int \\*' differ in signedness" } */
TESTARG(cua, char *, unsigned char *); /* { dg-error "pointer targets in passing argument 1 of 'cuaF' differ in signedness" } */
TESTARP(cub, char *, unsigned char *); /* { dg-error "pointer targets in passing argument 1 of 'cubFp.x' differ in signedness" } */
-TESTASS(cuc, char *, unsigned char *); /* { dg-error "pointer targets in assignment differ in signedness" } */
-TESTINI(cud, char *, unsigned char *); /* { dg-error "pointer targets in initialization differ in signedness" } */
-TESTRET(cue, char *, unsigned char *); /* { dg-error "pointer targets in return differ in signedness" } */
+TESTASS(cuc, char *, unsigned char *); /* { dg-error "pointer targets in assignment from 'unsigned char \\*' to 'char \\*' differ in signedness" } */
+TESTINI(cud, char *, unsigned char *); /* { dg-error "pointer targets in initialization of 'char \\*' from 'unsigned char \\*' differ in signedness" } */
+TESTRET(cue, char *, unsigned char *); /* { dg-error "pointer targets in returning 'unsigned char \\*' from a function with return type 'char \\*' differ in signedness" } */
TESTARG(uca, unsigned char *, char *); /* { dg-error "pointer targets in passing argument 1 of 'ucaF' differ in signedness" } */
TESTARP(ucb, unsigned char *, char *); /* { dg-error "pointer targets in passing argument 1 of 'ucbFp.x' differ in signedness" } */
-TESTASS(ucc, unsigned char *, char *); /* { dg-error "pointer targets in assignment differ in signedness" } */
-TESTINI(ucd, unsigned char *, char *); /* { dg-error "pointer targets in initialization differ in signedness" } */
-TESTRET(uce, unsigned char *, char *); /* { dg-error "pointer targets in return differ in signedness" } */
+TESTASS(ucc, unsigned char *, char *); /* { dg-error "pointer targets in assignment from 'char \\*' to 'unsigned char \\*' differ in signedness" } */
+TESTINI(ucd, unsigned char *, char *); /* { dg-error "pointer targets in initialization of 'unsigned char \\*' from 'char \\*' differ in signedness" } */
+TESTRET(uce, unsigned char *, char *); /* { dg-error "pointer targets in returning 'char \\*' from a function with return type 'unsigned char \\*' differ in signedness" } */
TESTARG(csa, char *, signed char *); /* { dg-error "pointer targets in passing argument 1 of 'csaF' differ in signedness" } */
TESTARP(csb, char *, signed char *); /* { dg-error "pointer targets in passing argument 1 of 'csbFp.x' differ in signedness" } */
-TESTASS(csc, char *, signed char *); /* { dg-error "pointer targets in assignment differ in signedness" } */
-TESTINI(csd, char *, signed char *); /* { dg-error "pointer targets in initialization differ in signedness" } */
-TESTRET(cse, char *, signed char *); /* { dg-error "pointer targets in return differ in signedness" } */
+TESTASS(csc, char *, signed char *); /* { dg-error "pointer targets in assignment from 'signed char \\*' to 'char \\*' differ in signedness" } */
+TESTINI(csd, char *, signed char *); /* { dg-error "pointer targets in initialization of 'char \\*' from 'signed char \\*' differ in signedness" } */
+TESTRET(cse, char *, signed char *); /* { dg-error "pointer targets in returning 'signed char \\*' from a function with return type 'char \\*' differ in signedness" } */
TESTARG(sca, signed char *, char *); /* { dg-error "pointer targets in passing argument 1 of 'scaF' differ in signedness" } */
TESTARP(scb, signed char *, char *); /* { dg-error "pointer targets in passing argument 1 of 'scbFp.x' differ in signedness" } */
-TESTASS(scc, signed char *, char *); /* { dg-error "pointer targets in assignment differ in signedness" } */
-TESTINI(scd, signed char *, char *); /* { dg-error "pointer targets in initialization differ in signedness" } */
-TESTRET(sce, signed char *, char *); /* { dg-error "pointer targets in return differ in signedness" } */
+TESTASS(scc, signed char *, char *); /* { dg-error "pointer targets in assignment from 'char \\*' to 'signed char \\*' differ in signedness" } */
+TESTINI(scd, signed char *, char *); /* { dg-error "pointer targets in initialization of 'signed char \\*' from 'char \\*' differ in signedness" } */
+TESTRET(sce, signed char *, char *); /* { dg-error "pointer targets in returning 'char \\*' from a function with return type 'signed char \\*' differ in signedness" } */
TESTARG(cia, char *, int *); /* { dg-error "passing argument 1 of 'ciaF' from incompatible pointer type" } */
TESTARP(cib, char *, int *); /* { dg-error "passing argument 1 of 'cibFp.x' from incompatible pointer type" } */
-TESTASS(cic, char *, int *); /* { dg-error "assignment from incompatible pointer type" } */
-TESTINI(cid, char *, int *); /* { dg-error "initialization from incompatible pointer type" } */
-TESTRET(cie, char *, int *); /* { dg-error "return from incompatible pointer type" } */
+TESTASS(cic, char *, int *); /* { dg-error "assignment to 'char \\*' from incompatible pointer type 'int \\*'" } */
+TESTINI(cid, char *, int *); /* { dg-error "initialization of 'char \\*' from incompatible pointer type 'int \\*'" } */
+TESTRET(cie, char *, int *); /* { dg-error "returning 'int \\*' from a function with incompatible return type 'char \\*'" } */
TESTARG(ica, int *, char *); /* { dg-error "passing argument 1 of 'icaF' from incompatible pointer type" } */
TESTARP(icb, int *, char *); /* { dg-error "passing argument 1 of 'icbFp.x' from incompatible pointer type" } */
-TESTASS(icc, int *, char *); /* { dg-error "assignment from incompatible pointer type" } */
-TESTINI(icd, int *, char *); /* { dg-error "initialization from incompatible pointer type" } */
-TESTRET(ice, int *, char *); /* { dg-error "return from incompatible pointer type" } */
+TESTASS(icc, int *, char *); /* { dg-error "assignment to 'int \\*' from incompatible pointer type 'char \\*'" } */
+TESTINI(icd, int *, char *); /* { dg-error "initialization of 'int \\*' from incompatible pointer type 'char \\*'" } */
+TESTRET(ice, int *, char *); /* { dg-error "returning 'char \\*' from a function with incompatible return type 'int \\*'" } */
TESTARG(ciia, char *, int); /* { dg-error "passing argument 1 of 'ciiaF' makes pointer from integer without a cast" } */
TESTARP(ciib, char *, int); /* { dg-error "passing argument 1 of 'ciibFp.x' makes pointer from integer without a cast" } */
-TESTASS(ciic, char *, int); /* { dg-error "assignment makes pointer from integer without a cast" } */
-TESTINI(ciid, char *, int); /* { dg-error "initialization makes pointer from integer without a cast" } */
-TESTRET(ciie, char *, int); /* { dg-error "return makes pointer from integer without a cast" } */
+TESTASS(ciic, char *, int); /* { dg-error "assignment to 'char \\*' from 'int' makes pointer from integer without a cast" } */
+TESTINI(ciid, char *, int); /* { dg-error "initialization of 'char \\*' from 'int' makes pointer from integer without a cast" } */
+TESTRET(ciie, char *, int); /* { dg-error "returning 'int' from a function with return type 'char \\*' makes pointer from integer without a cast" } */
TESTARG(iica, int, char *); /* { dg-error "passing argument 1 of 'iicaF' makes integer from pointer without a cast" } */
TESTARP(iicb, int, char *); /* { dg-error "passing argument 1 of 'iicbFp.x' makes integer from pointer without a cast" } */
-TESTASS(iicc, int, char *); /* { dg-error "assignment makes integer from pointer without a cast" } */
-TESTINI(iicd, int, char *); /* { dg-error "initialization makes integer from pointer without a cast" } */
-TESTRET(iice, int, char *); /* { dg-error "return makes integer from pointer without a cast" } */
+TESTASS(iicc, int, char *); /* { dg-error "assignment to 'int' from 'char \\*' makes integer from pointer without a cast" } */
+TESTINI(iicd, int, char *); /* { dg-error "initialization of 'int' from 'char \\*' makes integer from pointer without a cast" } */
+TESTRET(iice, int, char *); /* { dg-error "returning 'char \\*' from a function with return type 'int' makes integer from pointer without a cast" } */
struct s { int a; };
diff --git a/gcc/testsuite/gcc.dg/attr-noipa.c b/gcc/testsuite/gcc.dg/attr-noipa.c
index 1d2b86894ed..e2349b6a418 100644
--- a/gcc/testsuite/gcc.dg/attr-noipa.c
+++ b/gcc/testsuite/gcc.dg/attr-noipa.c
@@ -1,6 +1,7 @@
/* Test the noipa attribute. */
/* { dg-do compile } */
/* { dg-options "-O2 -fdump-tree-optimized" } */
+/* { dg-require-effective-target alloca } */
static inline int __attribute__((noipa))
fn1 (void) /* { dg-warning "inline function \[^\n\]* given attribute noinline" "" } */
diff --git a/gcc/testsuite/gcc.dg/builtin-stringop-chk-1.c b/gcc/testsuite/gcc.dg/builtin-stringop-chk-1.c
index e2655785444..35cc6dc93bb 100644
--- a/gcc/testsuite/gcc.dg/builtin-stringop-chk-1.c
+++ b/gcc/testsuite/gcc.dg/builtin-stringop-chk-1.c
@@ -2,7 +2,6 @@
are emitted properly. */
/* { dg-do compile } */
/* { dg-options "-O2 -Wno-format -std=gnu99 -ftrack-macro-expansion=0" } */
-/* { dg-additional-options "-mstructure-size-boundary=8" { target arm*-*-* } } */
// { dg-skip-if "packed attribute missing for t" { "epiphany-*-*" } }
extern void abort (void);
diff --git a/gcc/testsuite/gcc.dg/c90-const-expr-5.c b/gcc/testsuite/gcc.dg/c90-const-expr-5.c
index 9f5cdef8399..e7422eb6020 100644
--- a/gcc/testsuite/gcc.dg/c90-const-expr-5.c
+++ b/gcc/testsuite/gcc.dg/c90-const-expr-5.c
@@ -15,8 +15,8 @@ f (void)
{
/* (V *)0 is a null pointer constant, so the assignment should be
diagnosed. */
- q = (j ? p : (V *)0); /* { dg-error "5:assignment from incompatible pointer type" } */
- q = (j ? p : (void *)0); /* { dg-error "5:assignment from incompatible pointer type" } */
+ q = (j ? p : (V *)0); /* { dg-error "5:assignment to 'long int \\*' from incompatible pointer type 'int \\*'" } */
+ q = (j ? p : (void *)0); /* { dg-error "5:assignment to 'long int \\*' from incompatible pointer type 'int \\*'" } */
/* And this conversion should be valid. */
(void (*)(void))(V *)0;
(void (*)(void))(void *)0;
diff --git a/gcc/testsuite/gcc.dg/c99-const-expr-5.c b/gcc/testsuite/gcc.dg/c99-const-expr-5.c
index 3bfa7f6fe27..693b97d018c 100644
--- a/gcc/testsuite/gcc.dg/c99-const-expr-5.c
+++ b/gcc/testsuite/gcc.dg/c99-const-expr-5.c
@@ -15,8 +15,8 @@ f (void)
{
/* (V *)0 is a null pointer constant, so the assignment should be
diagnosed. */
- q = (j ? p : (V *)0); /* { dg-error "assignment from incompatible pointer type" } */
- q = (j ? p : (void *)0); /* { dg-error "assignment from incompatible pointer type" } */
+ q = (j ? p : (V *)0); /* { dg-error "assignment to 'long int \\*' from incompatible pointer type 'int \\*'" } */
+ q = (j ? p : (void *)0); /* { dg-error "assignment to 'long int \\*' from incompatible pointer type 'int \\*'" } */
/* And this conversion should be valid. */
(void (*)(void))(V *)0;
(void (*)(void))(void *)0;
diff --git a/gcc/testsuite/gcc.dg/compare1.c b/gcc/testsuite/gcc.dg/compare1.c
index 7becfbdb17f..ebab8c2cbf7 100644
--- a/gcc/testsuite/gcc.dg/compare1.c
+++ b/gcc/testsuite/gcc.dg/compare1.c
@@ -22,17 +22,17 @@ enum mm2
int f(enum mm1 x)
{
- return x == (tf?DI:SI); /* { dg-bogus "signed and unsigned" "case 1" } */
+ return x == (tf?DI:SI); /* { dg-bogus "changes signedness" "case 1" } */
}
int g(enum mm1 x)
{
- return x == (tf?DI:-1); /* { dg-bogus "signed and unsigned" "case 2" } */
+ return x == (tf?DI:-1); /* { dg-bogus "changes signedness" "case 2" } */
}
int h(enum mm2 x)
{
- return x == (tf?DI2:SI2); /* { dg-bogus "signed and unsigned" "case 3" } */
+ return x == (tf?DI2:SI2); /* { dg-bogus "changes signedness" "case 3" } */
}
int i(enum mm2 x)
diff --git a/gcc/testsuite/gcc.dg/compare2.c b/gcc/testsuite/gcc.dg/compare2.c
index c309f1d00eb..f742e95f605 100644
--- a/gcc/testsuite/gcc.dg/compare2.c
+++ b/gcc/testsuite/gcc.dg/compare2.c
@@ -9,50 +9,50 @@ int tf = 1;
void f(int x, unsigned int y)
{
/* ?: branches are constants. */
- x > (tf?64:128); /* { dg-bogus "signed and unsigned" "case 1" } */
- y > (tf?64:128); /* { dg-bogus "signed and unsigned" "case 2" } */
+ x > (tf?64:128); /* { dg-bogus "changes signedness" "case 1" } */
+ y > (tf?64:128); /* { dg-bogus "changes signedness" "case 2" } */
/* ?: branches are (recursively) constants. */
- x > (tf?64:(tf?128:256)); /* { dg-bogus "signed and unsigned" "case 3" } */
- y > (tf?64:(tf?128:256)); /* { dg-bogus "signed and unsigned" "case 4" } */
+ x > (tf?64:(tf?128:256)); /* { dg-bogus "changes signedness" "case 3" } */
+ y > (tf?64:(tf?128:256)); /* { dg-bogus "changes signedness" "case 4" } */
/* ?: branches are signed constants. */
- x > (tf?64:-1); /* { dg-bogus "signed and unsigned" "case 5" } */
+ x > (tf?64:-1); /* { dg-bogus "changes signedness" "case 5" } */
y > (tf?64:-1); /* { dg-warning "different signedness" "case 6" } */
/* ?: branches are (recursively) signed constants. */
- x > (tf?64:(tf?128:-1)); /* { dg-bogus "signed and unsigned" "case 7" } */
+ x > (tf?64:(tf?128:-1)); /* { dg-bogus "changes signedness" "case 7" } */
y > (tf?64:(tf?128:-1)); /* { dg-warning "different signedness" "case 8" } */
/* Statement expression. */
- x > ({tf; 64;}); /* { dg-bogus "signed and unsigned" "case 9" } */
- y > ({tf; 64;}); /* { dg-bogus "signed and unsigned" "case 10" } */
+ x > ({tf; 64;}); /* { dg-bogus "changes signedness" "case 9" } */
+ y > ({tf; 64;}); /* { dg-bogus "changes signedness" "case 10" } */
/* Statement expression with recursive ?: . */
- x > ({tf; tf?64:(tf?128:256);}); /* { dg-bogus "signed and unsigned" "case 11" } */
- y > ({tf; tf?64:(tf?128:256);}); /* { dg-bogus "signed and unsigned" "case 12" } */
+ x > ({tf; tf?64:(tf?128:256);}); /* { dg-bogus "changes signedness" "case 11" } */
+ y > ({tf; tf?64:(tf?128:256);}); /* { dg-bogus "changes signedness" "case 12" } */
/* Statement expression with signed ?:. */
- x > ({tf; tf?64:-1;}); /* { dg-bogus "signed and unsigned" "case 13" } */
+ x > ({tf; tf?64:-1;}); /* { dg-bogus "changes signedness" "case 13" } */
y > ({tf; tf?64:-1;}); /* { dg-warning "different signedness" "case 14" } */
/* Statement expression with recursive signed ?:. */
- x > ({tf; tf?64:(tf?128:-1);}); /* { dg-bogus "signed and unsigned" "case 15" } */
+ x > ({tf; tf?64:(tf?128:-1);}); /* { dg-bogus "changes signedness" "case 15" } */
y > ({tf; tf?64:(tf?128:-1);}); /* { dg-warning "different signedness" "case 16" } */
/* ?: branches are constants. */
- tf ? x : (tf?64:32); /* { dg-bogus "conditional expression" "case 17" } */
- tf ? y : (tf?64:32); /* { dg-bogus "conditional expression" "case 18" } */
+ tf ? x : (tf?64:32); /* { dg-bogus "changes signedness" "case 17" } */
+ tf ? y : (tf?64:32); /* { dg-bogus "changes signedness" "case 18" } */
/* ?: branches are signed constants. */
- tf ? x : (tf?64:-1); /* { dg-bogus "conditional expression" "case 19" } */
- tf ? y : (tf?64:-1); /* { dg-warning "conditional expression" "case 20" } */
+ tf ? x : (tf?64:-1); /* { dg-bogus "changes signedness" "case 19" } */
+ tf ? y : (tf?64:-1); /* { dg-warning "changes signedness" "case 20" } */
/* ?: branches are (recursively) constants. */
- tf ? x : (tf?64:(tf?128:256)); /* { dg-bogus "conditional expression" "case 21" } */
- tf ? y : (tf?64:(tf?128:256)); /* { dg-bogus "conditional expression" "case 22" } */
+ tf ? x : (tf?64:(tf?128:256)); /* { dg-bogus "changes signedness" "case 21" } */
+ tf ? y : (tf?64:(tf?128:256)); /* { dg-bogus "changes signedness" "case 22" } */
/* ?: branches are (recursively) signed constants. */
- tf ? x : (tf?64:(tf?128:-1)); /* { dg-bogus "conditional expression" "case 23" } */
- tf ? y : (tf?64:(tf?128:-1)); /* { dg-warning "conditional expression" "case 24" } */
+ tf ? x : (tf?64:(tf?128:-1)); /* { dg-bogus "changes signedness" "case 23" } */
+ tf ? y : (tf?64:(tf?128:-1)); /* { dg-warning "changes signedness" "case 24" } */
}
diff --git a/gcc/testsuite/gcc.dg/compare3.c b/gcc/testsuite/gcc.dg/compare3.c
index eda3faf2754..836231fb870 100644
--- a/gcc/testsuite/gcc.dg/compare3.c
+++ b/gcc/testsuite/gcc.dg/compare3.c
@@ -11,49 +11,49 @@ void f(int x, unsigned int y)
/* Test comparing conditional expressions containing truth values.
This can occur explicitly, or e.g. when (foo?2:(bar?1:0)) is
optimized into (foo?2:(bar!=0)). */
- x > (tf?64:(tf!=x)); /* { dg-bogus "signed and unsigned" "case 1" } */
- y > (tf?64:(tf!=x)); /* { dg-bogus "signed and unsigned" "case 2" } */
- x > (tf?(tf!=x):64); /* { dg-bogus "signed and unsigned" "case 3" } */
- y > (tf?(tf!=x):64); /* { dg-bogus "signed and unsigned" "case 4" } */
-
- x > (tf?64:(tf==x)); /* { dg-bogus "signed and unsigned" "case 5" } */
- y > (tf?64:(tf==x)); /* { dg-bogus "signed and unsigned" "case 6" } */
- x > (tf?(tf==x):64); /* { dg-bogus "signed and unsigned" "case 7" } */
- y > (tf?(tf==x):64); /* { dg-bogus "signed and unsigned" "case 8" } */
-
- x > (tf?64:(tf>x)); /* { dg-bogus "signed and unsigned" "case 9" } */
- y > (tf?64:(tf>x)); /* { dg-bogus "signed and unsigned" "case 10" } */
- x > (tf?(tf>x):64); /* { dg-bogus "signed and unsigned" "case 11" } */
- y > (tf?(tf>x):64); /* { dg-bogus "signed and unsigned" "case 12" } */
-
- x < (tf?64:(tf<x)); /* { dg-bogus "signed and unsigned" "case 13" } */
- y < (tf?64:(tf<x)); /* { dg-bogus "signed and unsigned" "case 14" } */
- x < (tf?(tf<x):64); /* { dg-bogus "signed and unsigned" "case 15" } */
- y < (tf?(tf<x):64); /* { dg-bogus "signed and unsigned" "case 16" } */
-
- x > (tf?64:(tf>=x)); /* { dg-bogus "signed and unsigned" "case 17" } */
- y > (tf?64:(tf>=x)); /* { dg-bogus "signed and unsigned" "case 18" } */
- x > (tf?(tf>=x):64); /* { dg-bogus "signed and unsigned" "case 19" } */
- y > (tf?(tf>=x):64); /* { dg-bogus "signed and unsigned" "case 20" } */
-
- x > (tf?64:(tf<=x)); /* { dg-bogus "signed and unsigned" "case 21" } */
- y > (tf?64:(tf<=x)); /* { dg-bogus "signed and unsigned" "case 22" } */
- x > (tf?(tf<=x):64); /* { dg-bogus "signed and unsigned" "case 23" } */
- y > (tf?(tf<=x):64); /* { dg-bogus "signed and unsigned" "case 24" } */
-
- x > (tf?64:(tf&&x)); /* { dg-bogus "signed and unsigned" "case 25" } */
- y > (tf?64:(tf&&x)); /* { dg-bogus "signed and unsigned" "case 26" } */
- x > (tf?(tf&&x):64); /* { dg-bogus "signed and unsigned" "case 27" } */
- y > (tf?(tf&&x):64); /* { dg-bogus "signed and unsigned" "case 28" } */
-
- x > (tf?64:(tf||x)); /* { dg-bogus "signed and unsigned" "case 29" } */
- y > (tf?64:(tf||x)); /* { dg-bogus "signed and unsigned" "case 30" } */
- x > (tf?(tf||x):64); /* { dg-bogus "signed and unsigned" "case 31" } */
- y > (tf?(tf||x):64); /* { dg-bogus "signed and unsigned" "case 32" } */
-
- x > (tf?64:(!tf)); /* { dg-bogus "signed and unsigned" "case 33" } */
- y > (tf?64:(!tf)); /* { dg-bogus "signed and unsigned" "case 34" } */
- x > (tf?(!tf):64); /* { dg-bogus "signed and unsigned" "case 35" } */
- y > (tf?(!tf):64); /* { dg-bogus "signed and unsigned" "case 36" } */
+ x > (tf?64:(tf!=x)); /* { dg-bogus "changes signedness" "case 1" } */
+ y > (tf?64:(tf!=x)); /* { dg-bogus "changes signedness" "case 2" } */
+ x > (tf?(tf!=x):64); /* { dg-bogus "changes signedness" "case 3" } */
+ y > (tf?(tf!=x):64); /* { dg-bogus "changes signedness" "case 4" } */
+
+ x > (tf?64:(tf==x)); /* { dg-bogus "changes signedness" "case 5" } */
+ y > (tf?64:(tf==x)); /* { dg-bogus "changes signedness" "case 6" } */
+ x > (tf?(tf==x):64); /* { dg-bogus "changes signedness" "case 7" } */
+ y > (tf?(tf==x):64); /* { dg-bogus "changes signedness" "case 8" } */
+
+ x > (tf?64:(tf>x)); /* { dg-bogus "changes signedness" "case 9" } */
+ y > (tf?64:(tf>x)); /* { dg-bogus "changes signedness" "case 10" } */
+ x > (tf?(tf>x):64); /* { dg-bogus "changes signedness" "case 11" } */
+ y > (tf?(tf>x):64); /* { dg-bogus "changes signedness" "case 12" } */
+
+ x < (tf?64:(tf<x)); /* { dg-bogus "changes signedness" "case 13" } */
+ y < (tf?64:(tf<x)); /* { dg-bogus "changes signedness" "case 14" } */
+ x < (tf?(tf<x):64); /* { dg-bogus "changes signedness" "case 15" } */
+ y < (tf?(tf<x):64); /* { dg-bogus "changes signedness" "case 16" } */
+
+ x > (tf?64:(tf>=x)); /* { dg-bogus "changes signedness" "case 17" } */
+ y > (tf?64:(tf>=x)); /* { dg-bogus "changes signedness" "case 18" } */
+ x > (tf?(tf>=x):64); /* { dg-bogus "changes signedness" "case 19" } */
+ y > (tf?(tf>=x):64); /* { dg-bogus "changes signedness" "case 20" } */
+
+ x > (tf?64:(tf<=x)); /* { dg-bogus "changes signedness" "case 21" } */
+ y > (tf?64:(tf<=x)); /* { dg-bogus "changes signedness" "case 22" } */
+ x > (tf?(tf<=x):64); /* { dg-bogus "changes signedness" "case 23" } */
+ y > (tf?(tf<=x):64); /* { dg-bogus "changes signedness" "case 24" } */
+
+ x > (tf?64:(tf&&x)); /* { dg-bogus "changes signedness" "case 25" } */
+ y > (tf?64:(tf&&x)); /* { dg-bogus "changes signedness" "case 26" } */
+ x > (tf?(tf&&x):64); /* { dg-bogus "changes signedness" "case 27" } */
+ y > (tf?(tf&&x):64); /* { dg-bogus "changes signedness" "case 28" } */
+
+ x > (tf?64:(tf||x)); /* { dg-bogus "changes signedness" "case 29" } */
+ y > (tf?64:(tf||x)); /* { dg-bogus "changes signedness" "case 30" } */
+ x > (tf?(tf||x):64); /* { dg-bogus "changes signedness" "case 31" } */
+ y > (tf?(tf||x):64); /* { dg-bogus "changes signedness" "case 32" } */
+
+ x > (tf?64:(!tf)); /* { dg-bogus "changes signedness" "case 33" } */
+ y > (tf?64:(!tf)); /* { dg-bogus "changes signedness" "case 34" } */
+ x > (tf?(!tf):64); /* { dg-bogus "changes signedness" "case 35" } */
+ y > (tf?(!tf):64); /* { dg-bogus "changes signedness" "case 36" } */
}
diff --git a/gcc/testsuite/gcc.dg/compare7.c b/gcc/testsuite/gcc.dg/compare7.c
index e2fbc04bfc2..b6fe6e78334 100644
--- a/gcc/testsuite/gcc.dg/compare7.c
+++ b/gcc/testsuite/gcc.dg/compare7.c
@@ -6,5 +6,5 @@
int f(unsigned a, int b)
{
- return a < b; /* { dg-bogus "signed and unsigned" } */
+ return a < b; /* { dg-bogus "changes signedness" } */
}
diff --git a/gcc/testsuite/gcc.dg/compare8.c b/gcc/testsuite/gcc.dg/compare8.c
index d723c45a095..d09b69c53a2 100644
--- a/gcc/testsuite/gcc.dg/compare8.c
+++ b/gcc/testsuite/gcc.dg/compare8.c
@@ -4,18 +4,18 @@
int
f(unsigned short a1, unsigned short a2, unsigned int b)
{
- return ((a1+a2)|5) > b ? 2 : 3; /* { dg-bogus "signed and unsigned" } */
+ return ((a1+a2)|5) > b ? 2 : 3; /* { dg-bogus "changes signedness" } */
}
int
g(unsigned short a1, unsigned short a2, unsigned int b)
{
- return ((a1+a2)&5) > b ? 2 : 3; /* { dg-bogus "signed and unsigned" } */
+ return ((a1+a2)&5) > b ? 2 : 3; /* { dg-bogus "changes signedness" } */
}
int
h(unsigned short a1, unsigned short a2, unsigned int b)
{
- return ((a1+a2)^5) > b ? 2 : 3; /* { dg-bogus "signed and unsigned" } */
+ return ((a1+a2)^5) > b ? 2 : 3; /* { dg-bogus "changes signedness" } */
}
diff --git a/gcc/testsuite/gcc.dg/compare9.c b/gcc/testsuite/gcc.dg/compare9.c
index 02150cb1fb6..fba61e42a48 100644
--- a/gcc/testsuite/gcc.dg/compare9.c
+++ b/gcc/testsuite/gcc.dg/compare9.c
@@ -22,20 +22,20 @@ enum mm2
int f(enum mm1 x)
{
- return x == (tf?DI:SI); /* { dg-bogus "signed and unsigned" "case 1" } */
+ return x == (tf?DI:SI); /* { dg-bogus "changes signedness" "case 1" } */
}
int g(enum mm1 x)
{
- return x == (tf?DI:-1); /* { dg-bogus "signed and unsigned" "case 2" } */
+ return x == (tf?DI:-1); /* { dg-bogus "changes signedness" "case 2" } */
}
int h(enum mm2 x)
{
- return x == (tf?DI2:SI2); /* { dg-bogus "signed and unsigned" "case 3" } */
+ return x == (tf?DI2:SI2); /* { dg-bogus "changes signedness" "case 3" } */
}
int i(enum mm2 x)
{
- return x == (tf?DI2:-1); /* { dg-bogus "signed and unsigned" "case 4" } */
+ return x == (tf?DI2:-1); /* { dg-bogus "changes signedness" "case 4" } */
}
diff --git a/gcc/testsuite/gcc.dg/conv-2.c b/gcc/testsuite/gcc.dg/conv-2.c
index 388dee3d746..83468cdad1c 100644
--- a/gcc/testsuite/gcc.dg/conv-2.c
+++ b/gcc/testsuite/gcc.dg/conv-2.c
@@ -12,15 +12,15 @@ int main()
unsigned char *ucp;
signed char *scp;
- ulp = lp; /* { dg-warning " pointer targets in assignment differ in signedness" } */
- lp = ulp; /* { dg-warning " pointer targets in assignment differ in signedness" } */
+ ulp = lp; /* { dg-warning " pointer targets in assignment from 'long int \\*' to 'long unsigned int \\*' differ in signedness" } */
+ lp = ulp; /* { dg-warning " pointer targets in assignment from 'long unsigned int \\*' to 'long int \\*' differ in signedness" } */
f1(ulp); /* { dg-warning " differ in signedness" } */
f2(lp); /* { dg-warning " differ in signedness" } */
- cp = ucp; /* { dg-warning " pointer targets in assignment differ in signedness" } */
- cp = scp; /* { dg-warning " pointer targets in assignment differ in signedness" } */
- ucp = scp; /* { dg-warning " pointer targets in assignment differ in signedness" } */
- ucp = cp; /* { dg-warning " pointer targets in assignment differ in signedness" } */
- scp = ucp; /* { dg-warning " pointer targets in assignment differ in signedness" } */
- scp = cp; /* { dg-warning " pointer targets in assignment differ in signedness" } */
+ cp = ucp; /* { dg-warning " pointer targets in assignment from 'unsigned char \\*' to 'char \\*' differ in signedness" } */
+ cp = scp; /* { dg-warning " pointer targets in assignment from 'signed char \\*' to 'char \\*' differ in signedness" } */
+ ucp = scp; /* { dg-warning " pointer targets in assignment from 'signed char \\*' to 'unsigned char \\*' differ in signedness" } */
+ ucp = cp; /* { dg-warning " pointer targets in assignment from 'char \\*' to 'unsigned char \\*' differ in signedness" } */
+ scp = ucp; /* { dg-warning " pointer targets in assignment from 'unsigned char \\*' to 'signed char \\*' differ in signedness" } */
+ scp = cp; /* { dg-warning " pointer targets in assignment from 'char \\*' to 'signed char \\*' differ in signedness" } */
}
diff --git a/gcc/testsuite/gcc.dg/diagnostic-types-1.c b/gcc/testsuite/gcc.dg/diagnostic-types-1.c
new file mode 100644
index 00000000000..fc4b104df05
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/diagnostic-types-1.c
@@ -0,0 +1,57 @@
+/* PR c/81233 */
+/* { dg-do compile } */
+/* { dg-options "-Wc++-compat -Wpedantic" } */
+/* Test we're printing the types, like the good compiler we are. */
+
+enum E1 { A } e;
+enum E2 { B };
+extern void foo_E (enum E1); /* { dg-message "expected 'enum E1' but argument is of type 'int'" } */
+extern void foo (char *); /* { dg-message "expected 'char \\*' but argument is of type 'int \\*'" } */
+extern void foo2 (int *); /* { dg-message "expected 'int \\*' but argument is of type 'int'" } */
+extern void foo3 (int); /* { dg-message "expected 'int' but argument is of type 'int \\*'" } */
+extern void foo4 (int *); /* { dg-message "expected 'int \\*' but argument is of type 'unsigned int \\*'" } */
+
+char *
+fn0 (int *p, char *q)
+{
+ p = q; /* { dg-warning "assignment to 'int \\*' from incompatible pointer type 'char \\*'" } */
+ int *r = q; /* { dg-warning "initialization of 'int \\*' from incompatible pointer type 'char \\*'" } */
+ foo (r); /* { dg-warning "passing argument 1 of 'foo' from incompatible pointer type" } */
+ return p; /* { dg-warning "returning 'int \\*' from a function with incompatible return type 'char \\*'" } */
+}
+
+int *
+fn1 (int *p)
+{
+ p = 1; /* { dg-warning "assignment to 'int \\*' from 'int' makes pointer from integer without a cast" } */
+ int *q = 1; /* { dg-warning "initialization of 'int \\*' from 'int' makes pointer from integer without a cast" } */
+ foo2 (1); /* { dg-warning "passing argument 1 of 'foo2' makes pointer from integer without a cast" } */
+ return 1; /* { dg-warning "returning 'int' from a function with return type 'int \\*' makes pointer from integer without a cast" } */
+}
+
+int
+fn2 (int i, int *p)
+{
+ i = p; /* { dg-warning "assignment to 'int' from 'int \\*' makes integer from pointer without a cast" } */
+ int j = p; /* { dg-warning "initialization of 'int' from 'int \\*' makes integer from pointer without a cast" } */
+ foo3 (p); /* { dg-warning "passing argument 1 of 'foo3' makes integer from pointer without a cast" } */
+ return p; /* { dg-warning "returning 'int \\*' from a function with return type 'int' makes integer from pointer without a cast" } */
+}
+
+int *
+fn3 (int *p, unsigned int *u)
+{
+ p = u; /* { dg-warning "pointer targets in assignment from 'unsigned int \\*' to 'int \\*' differ in signedness" } */
+ int *q = u; /* { dg-warning "pointer targets in initialization of 'int \\*' from 'unsigned int \\*' differ in signedness" } */
+ foo4 (u); /* { dg-warning "pointer targets in passing argument 1 of 'foo4' differ in signedness" } */
+ return u; /* { dg-warning "pointer targets in returning 'unsigned int \\*' from a function with return type 'int \\*' differ in signedness" } */
+}
+
+enum E1
+fn4 (void)
+{
+ foo_E (B); /* { dg-warning "enum conversion when passing argument" } */
+ e = 0; /* { dg-warning "enum conversion from 'int' to 'enum E1' in assignment is invalid" } */
+ enum E1 f = 0; /* { dg-warning "enum conversion from 'int' to 'enum E1' in initialization is invalid" } */
+ return 0; /* { dg-warning "enum conversion from 'int' to 'enum E1' in return is invalid" } */
+}
diff --git a/gcc/testsuite/gcc.dg/guality/pr25967-1.c b/gcc/testsuite/gcc.dg/guality/pr25967-1.c
new file mode 100644
index 00000000000..0924d1c03c1
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/guality/pr25967-1.c
@@ -0,0 +1,70 @@
+/* { dg-do run { target i?86-*-* x86_64-*-* } } */
+/* { dg-options "-g -mgeneral-regs-only" } */
+
+extern void exit (int);
+
+typedef unsigned int uword_t __attribute__ ((mode (__word__)));
+
+#define ERROR 0x12345670
+#define IP 0x12345671
+#define CS 0x12345672
+#define FLAGS 0x12345673
+#define SP 0x12345674
+#define SS 0x12345675
+
+#define STRING(x) XSTRING(x)
+#define XSTRING(x) #x
+#define ASMNAME(cname) ASMNAME2 (__USER_LABEL_PREFIX__, cname)
+#define ASMNAME2(prefix, cname) XSTRING (prefix) cname
+
+struct interrupt_frame
+{
+ uword_t ip;
+ uword_t cs;
+ uword_t flags;
+ uword_t sp;
+ uword_t ss;
+};
+
+__attribute__((naked, used))
+void
+fn (void)
+{
+ register uword_t *sp __asm__("sp");
+ uword_t error = *sp;
+ struct interrupt_frame *frame = (struct interrupt_frame *) (sp + 1);
+ if (ERROR != error) /* BREAK */
+ __builtin_abort ();
+ if (IP != frame->ip)
+ __builtin_abort ();
+ if (CS != frame->cs)
+ __builtin_abort ();
+ if (FLAGS != frame->flags)
+ __builtin_abort ();
+ if (SP != frame->sp)
+ __builtin_abort ();
+ if (SS != frame->ss)
+ __builtin_abort ();
+
+ exit (0);
+}
+
+int
+main ()
+{
+ asm ("push $" STRING (SS) "; \
+ push $" STRING (SP) "; \
+ push $" STRING (FLAGS) "; \
+ push $" STRING (CS) "; \
+ push $" STRING (IP) "; \
+ push $" STRING (ERROR) "; \
+ jmp " ASMNAME ("fn"));
+ return 0;
+}
+
+/* { dg-final { gdb-test 36 "error" "0x12345670" } } */
+/* { dg-final { gdb-test 36 "frame->ip" "0x12345671" } } */
+/* { dg-final { gdb-test 36 "frame->cs" "0x12345672" } } */
+/* { dg-final { gdb-test 36 "frame->flags" "0x12345673" } } */
+/* { dg-final { gdb-test 36 "frame->sp" "0x12345674" } } */
+/* { dg-final { gdb-test 36 "frame->ss" "0x12345675" } } */
diff --git a/gcc/testsuite/gcc.dg/guality/pr25967-2.c b/gcc/testsuite/gcc.dg/guality/pr25967-2.c
new file mode 100644
index 00000000000..c3b59e21251
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/guality/pr25967-2.c
@@ -0,0 +1,64 @@
+/* { dg-do run { target i?86-*-* x86_64-*-* } } */
+/* { dg-options "-g -mgeneral-regs-only" } */
+
+extern void exit (int);
+
+typedef unsigned int uword_t __attribute__ ((mode (__word__)));
+
+#define IP 0x12345671
+#define CS 0x12345672
+#define FLAGS 0x12345673
+#define SP 0x12345674
+#define SS 0x12345675
+
+#define STRING(x) XSTRING(x)
+#define XSTRING(x) #x
+#define ASMNAME(cname) ASMNAME2 (__USER_LABEL_PREFIX__, cname)
+#define ASMNAME2(prefix, cname) XSTRING (prefix) cname
+
+struct interrupt_frame
+{
+ uword_t ip;
+ uword_t cs;
+ uword_t flags;
+ uword_t sp;
+ uword_t ss;
+};
+
+__attribute__((naked, used))
+void
+fn (void)
+{
+ register uword_t *sp __asm__("sp");
+ struct interrupt_frame *frame = (struct interrupt_frame *) sp;
+ if (IP != frame->ip) /* BREAK */
+ __builtin_abort ();
+ if (CS != frame->cs)
+ __builtin_abort ();
+ if (FLAGS != frame->flags)
+ __builtin_abort ();
+ if (SP != frame->sp)
+ __builtin_abort ();
+ if (SS != frame->ss)
+ __builtin_abort ();
+
+ exit (0);
+}
+
+int
+main ()
+{
+ asm ("push $" STRING (SS) "; \
+ push $" STRING (SP) "; \
+ push $" STRING (FLAGS) "; \
+ push $" STRING (CS) "; \
+ push $" STRING (IP) "; \
+ jmp " ASMNAME ("fn"));
+ return 0;
+}
+
+/* { dg-final { gdb-test 34 "frame->ip" "0x12345671" } } */
+/* { dg-final { gdb-test 34 "frame->cs" "0x12345672" } } */
+/* { dg-final { gdb-test 34 "frame->flags" "0x12345673" } } */
+/* { dg-final { gdb-test 34 "frame->sp" "0x12345674" } } */
+/* { dg-final { gdb-test 34 "frame->ss" "0x12345675" } } */
diff --git a/gcc/testsuite/gcc.dg/init-bad-7.c b/gcc/testsuite/gcc.dg/init-bad-7.c
index 738ed605060..de5e570978c 100644
--- a/gcc/testsuite/gcc.dg/init-bad-7.c
+++ b/gcc/testsuite/gcc.dg/init-bad-7.c
@@ -8,4 +8,4 @@ struct f
};
char b[10];
-struct f g = {b}; /* { dg-warning "initialization from incompatible pointer type|near initialization for" } */
+struct f g = {b}; /* { dg-warning "initialization of 'int \\*' from incompatible pointer type|near initialization for" } */
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/no-strict-overflow-7.c b/gcc/testsuite/gcc.dg/no-strict-overflow-7.c
index 19e1b55bb12..0e73d486f22 100644
--- a/gcc/testsuite/gcc.dg/no-strict-overflow-7.c
+++ b/gcc/testsuite/gcc.dg/no-strict-overflow-7.c
@@ -3,8 +3,8 @@
/* Source: Ian Lance Taylor. Dual of strict-overflow-6.c. */
-/* We can only simplify the conditional when using strict overflow
- semantics. */
+/* We can simplify the conditional because pointer overflow always has
+ undefined semantics. */
int
foo (char* p)
@@ -12,4 +12,4 @@ foo (char* p)
return p + 1000 < p;
}
-/* { dg-final { scan-tree-dump "\[+\]\[ \]*1000" "optimized" } } */
+/* { dg-final { scan-tree-dump "return 0" "optimized" } } */
diff --git a/gcc/testsuite/gcc.dg/noncompile/pr81289.c b/gcc/testsuite/gcc.dg/noncompile/pr81289.c
new file mode 100644
index 00000000000..dd211466718
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/noncompile/pr81289.c
@@ -0,0 +1,8 @@
+/* PR c/81289 */
+/* { dg-do compile } */
+
+int
+fn (int mm)
+{
+ mm == *&&
+} /* { dg-error "expected identifier" } */
diff --git a/gcc/testsuite/gcc.dg/overflow-warn-1.c b/gcc/testsuite/gcc.dg/overflow-warn-1.c
index a5cd5738636..a9d9fbae148 100644
--- a/gcc/testsuite/gcc.dg/overflow-warn-1.c
+++ b/gcc/testsuite/gcc.dg/overflow-warn-1.c
@@ -47,10 +47,10 @@ static int sc = INT_MAX + 1; /* { dg-warning "25:integer overflow in expression"
constants. The third has the overflow in an unevaluated
subexpression, so is a null pointer constant. */
void *p = 0 * (INT_MAX + 1); /* { dg-warning "integer overflow in expression" } */
-/* { dg-warning "initialization makes pointer from integer without a cast" "null" { target *-*-* } .-1 } */
+/* { dg-warning "initialization of 'void \\*' from 'int' makes pointer from integer without a cast" "null" { target *-*-* } .-1 } */
void *q = 0 * (1 / 0); /* { dg-warning "division by zero" } */
/* { dg-error "initializer element is not constant" "constant" { target *-*-* } .-1 } */
-/* { dg-warning "initialization makes pointer from integer without a cast" "null" { target *-*-* } .-2 } */
+/* { dg-warning "initialization of 'void \\*' from 'int' makes pointer from integer without a cast" "null" { target *-*-* } .-2 } */
void *r = (1 ? 0 : INT_MAX+1);
void
diff --git a/gcc/testsuite/gcc.dg/overflow-warn-2.c b/gcc/testsuite/gcc.dg/overflow-warn-2.c
index 05ab104fa4a..9232800fb2e 100644
--- a/gcc/testsuite/gcc.dg/overflow-warn-2.c
+++ b/gcc/testsuite/gcc.dg/overflow-warn-2.c
@@ -47,10 +47,10 @@ static int sc = INT_MAX + 1; /* { dg-warning "integer overflow in expression" }
constants. The third has the overflow in an unevaluated
subexpression, so is a null pointer constant. */
void *p = 0 * (INT_MAX + 1); /* { dg-warning "integer overflow in expression" } */
-/* { dg-warning "initialization makes pointer from integer without a cast" "null" { target *-*-* } .-1 } */
+/* { dg-warning "initialization of 'void \\*' from 'int' makes pointer from integer without a cast" "null" { target *-*-* } .-1 } */
void *q = 0 * (1 / 0); /* { dg-warning "division by zero" } */
/* { dg-error "initializer element is not constant" "constant" { target *-*-* } .-1 } */
-/* { dg-warning "initialization makes pointer from integer without a cast" "null" { target *-*-* } .-2 } */
+/* { dg-warning "initialization of 'void \\*' from 'int' makes pointer from integer without a cast" "null" { target *-*-* } .-2 } */
void *r = (1 ? 0 : INT_MAX+1);
void
diff --git a/gcc/testsuite/gcc.dg/overflow-warn-3.c b/gcc/testsuite/gcc.dg/overflow-warn-3.c
index fd4a34f67e2..f64047795c7 100644
--- a/gcc/testsuite/gcc.dg/overflow-warn-3.c
+++ b/gcc/testsuite/gcc.dg/overflow-warn-3.c
@@ -53,10 +53,10 @@ static int sc = INT_MAX + 1; /* { dg-warning "integer overflow in expression" }
subexpression, so is a null pointer constant. */
void *p = 0 * (INT_MAX + 1); /* { dg-warning "integer overflow in expression" } */
/* { dg-warning "overflow in constant expression" "constant" { target *-*-* } .-1 } */
-/* { dg-warning "initialization makes pointer from integer without a cast" "null" { target *-*-* } .-2 } */
+/* { dg-warning "initialization of 'void \\*' from 'int' makes pointer from integer without a cast" "null" { target *-*-* } .-2 } */
void *q = 0 * (1 / 0); /* { dg-warning "division by zero" } */
/* { dg-error "initializer element is not constant" "constant" { target *-*-* } .-1 } */
-/* { dg-warning "initialization makes pointer from integer without a cast" "null" { target *-*-* } .-2 } */
+/* { dg-warning "initialization of 'void \\*' from 'int' makes pointer from integer without a cast" "null" { target *-*-* } .-2 } */
void *r = (1 ? 0 : INT_MAX+1);
void
diff --git a/gcc/testsuite/gcc.dg/overflow-warn-4.c b/gcc/testsuite/gcc.dg/overflow-warn-4.c
index 018e3e1e4cd..eb595aa7914 100644
--- a/gcc/testsuite/gcc.dg/overflow-warn-4.c
+++ b/gcc/testsuite/gcc.dg/overflow-warn-4.c
@@ -53,10 +53,10 @@ static int sc = INT_MAX + 1; /* { dg-warning "integer overflow in expression" }
subexpression, so is a null pointer constant. */
void *p = 0 * (INT_MAX + 1); /* { dg-warning "integer overflow in expression" } */
/* { dg-error "overflow in constant expression" "constant" { target *-*-* } .-1 } */
-/* { dg-error "initialization makes pointer from integer without a cast" "null" { target *-*-* } .-2 } */
+/* { dg-error "initialization of 'void \\*' from 'int' makes pointer from integer without a cast" "null" { target *-*-* } .-2 } */
void *q = 0 * (1 / 0); /* { dg-warning "division by zero" } */
/* { dg-error "initializer element is not constant" "constant" { target *-*-* } .-1 } */
-/* { dg-error "initialization makes pointer from integer without a cast" "null" { target *-*-* } .-2 } */
+/* { dg-error "initialization of 'void \\*' from 'int' makes pointer from integer without a cast" "null" { target *-*-* } .-2 } */
void *r = (1 ? 0 : INT_MAX+1);
void
diff --git a/gcc/testsuite/gcc.dg/parm-impl-decl-1.c b/gcc/testsuite/gcc.dg/parm-impl-decl-1.c
index 5c7ddb0a259..c1219273c75 100644
--- a/gcc/testsuite/gcc.dg/parm-impl-decl-1.c
+++ b/gcc/testsuite/gcc.dg/parm-impl-decl-1.c
@@ -7,7 +7,7 @@
/* Implicit function declaration in attribute in definition (testcase
from bug). */
int
-foo (int __attribute__ ((__mode__ (vector_size(8)))) i) /* { dg-warning "'__mode__' attribute ignored" } */
+foo (int __attribute__ ((__mode__ (vector_size(8)))) i) /* { dg-warning "'mode' attribute ignored" } */
{
return (long long) i;
}
diff --git a/gcc/testsuite/gcc.dg/parm-impl-decl-3.c b/gcc/testsuite/gcc.dg/parm-impl-decl-3.c
index 904295258d7..20197b52402 100644
--- a/gcc/testsuite/gcc.dg/parm-impl-decl-3.c
+++ b/gcc/testsuite/gcc.dg/parm-impl-decl-3.c
@@ -4,7 +4,7 @@
/* { dg-options "-g -std=gnu89" } */
int
-foo (int __attribute__ ((__mode__ (vector_size(8)))) i) /* { dg-warning "'__mode__' attribute ignored" } */
+foo (int __attribute__ ((__mode__ (vector_size(8)))) i) /* { dg-warning "'mode' attribute ignored" } */
{
return (long long) i;
}
diff --git a/gcc/testsuite/gcc.dg/pie-7.c b/gcc/testsuite/gcc.dg/pie-7.c
new file mode 100644
index 00000000000..e118a98bafd
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pie-7.c
@@ -0,0 +1,7 @@
+/* { dg-do run { target pie } } */
+/* { dg-options "-fno-pie -no-pie" } */
+
+int main(void)
+{
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/pie-static-1.c b/gcc/testsuite/gcc.dg/pie-static-1.c
new file mode 100644
index 00000000000..4273049be7b
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pie-static-1.c
@@ -0,0 +1,9 @@
+/* { dg-do run } */
+/* { dg-require-effective-target static } */
+/* { dg-require-effective-target pie } */
+/* { dg-options "-static -fpie -pie" } */
+
+int main(void)
+{
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/pie-static-2.c b/gcc/testsuite/gcc.dg/pie-static-2.c
new file mode 100644
index 00000000000..a673c997af8
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pie-static-2.c
@@ -0,0 +1,9 @@
+/* { dg-do run } */
+/* { dg-require-effective-target pie } */
+/* { dg-require-effective-target static } */
+/* { dg-options "-fpie -pie -static" } */
+
+int main(void)
+{
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/pointer-array-atomic.c b/gcc/testsuite/gcc.dg/pointer-array-atomic.c
index 55b58e84e35..bb63797b237 100644
--- a/gcc/testsuite/gcc.dg/pointer-array-atomic.c
+++ b/gcc/testsuite/gcc.dg/pointer-array-atomic.c
@@ -6,8 +6,8 @@ void transpose0(double* out, _Atomic double* in) { }
void transpose1(double out[2][2], _Atomic double in[2][2]) { }
void transpose2(double out[2][2][2], _Atomic double in[2][2][2]) { }
// return
-int (*x2(_Atomic int x[3][3]))[3] { return x; } /* { dg-warning "return from incompatible pointer type" } */
-_Atomic int (*x3(int x[3][3]))[3] { return x; } /* { dg-warning "return from incompatible pointer type" } */
+int (*x2(_Atomic int x[3][3]))[3] { return x; } /* { dg-warning "returning '_Atomic int \\(\\*\\)\\\[3\\\]' from a function with incompatible return type" } */
+_Atomic int (*x3(int x[3][3]))[3] { return x; } /* { dg-warning "returning 'int \\(\\*\\)\\\[3\\\]' from a function with incompatible return type" } */
void test(void)
{
double x0[2];
@@ -31,13 +31,13 @@ void test(void)
transpose2(y2, o2); /* { dg-warning "passing argument 2 of 'transpose2' from incompatible pointer type" } */
transpose2(y2, x2); /* { dg-warning "passing argument 2 of 'transpose2' from incompatible pointer type" } */
// initialization
- _Atomic double (*x0p) = x0; /* { dg-warning "initialization from incompatible pointer type" } */
- _Atomic double (*x1p)[2] = x1; /* { dg-warning "initialization from incompatible pointer type" } */
- _Atomic double (*x2p)[2][2] = x2; /* { dg-warning "initialization from incompatible pointer type" } */
+ _Atomic double (*x0p) = x0; /* { dg-warning "initialization of '_Atomic double \\*' from incompatible pointer type" } */
+ _Atomic double (*x1p)[2] = x1; /* { dg-warning "initialization of '_Atomic double \\(\\*\\)\\\[2\\\]' from incompatible pointer type" } */
+ _Atomic double (*x2p)[2][2] = x2; /* { dg-warning "initialization of '_Atomic double \\(\\*\\)\\\[2\\\]\\\[2\\\]' from incompatible pointer type" } */
// assignment
- x0p = x0; /* { dg-warning "assignment from incompatible pointer type" } */
- x1p = x1; /* { dg-warning "assignment from incompatible pointer type" } */
- x2p = x2; /* { dg-warning "assignment from incompatible pointer type" } */
+ x0p = x0; /* { dg-warning "assignment to '_Atomic double \\*' from incompatible pointer type" } */
+ x1p = x1; /* { dg-warning "assignment to '_Atomic double \\(\\*\\)\\\[2\\\]' from incompatible pointer type" } */
+ x2p = x2; /* { dg-warning "assignment to '_Atomic double \\(\\*\\)\\\[2\\\]\\\[2\\\]' from incompatible pointer type" } */
// subtraction
&(x0[1]) - &(z0[0]); /* { dg-error "invalid operands to binary" } */
&(x1[1]) - &(z1[0]); /* { dg-error "invalid operands to binary" } */
diff --git a/gcc/testsuite/gcc.dg/pr11492.c b/gcc/testsuite/gcc.dg/pr11492.c
index cf17712dde1..86435a83e79 100644
--- a/gcc/testsuite/gcc.dg/pr11492.c
+++ b/gcc/testsuite/gcc.dg/pr11492.c
@@ -5,7 +5,7 @@ int main( void )
{
unsigned int a;
unsigned char b;
- for ( a = 0, b = 2; a > b * 100; a++ ) /* { dg-bogus "comparison between signed and unsigned integer" } */
+ for ( a = 0, b = 2; a > b * 100; a++ ) /* { dg-bogus "comparison of integer expressions of different signedness" } */
{ ; }
return 0;
diff --git a/gcc/testsuite/gcc.dg/pr26865.c b/gcc/testsuite/gcc.dg/pr26865.c
index d9f1fe0d3a1..f49d1d29f9c 100644
--- a/gcc/testsuite/gcc.dg/pr26865.c
+++ b/gcc/testsuite/gcc.dg/pr26865.c
@@ -4,5 +4,5 @@
void
foo (void)
{
- char *e = alloca (100); /* { dg-warning "implicit declaration|initialization makes" } */
+ char *e = alloca (100); /* { dg-warning "implicit declaration|initialization of 'char \\*' from 'int' makes" } */
}
diff --git a/gcc/testsuite/gcc.dg/pr46932.c b/gcc/testsuite/gcc.dg/pr46932.c
index b96febcc095..4eb1a99e1bd 100644
--- a/gcc/testsuite/gcc.dg/pr46932.c
+++ b/gcc/testsuite/gcc.dg/pr46932.c
@@ -1,5 +1,8 @@
/* { dg-options "-O2 -fdump-rtl-auto_inc_dec" } */
+/* Build on targets which have pre increment. */
+/* { dg-do compile { target aarch64*-*-* arm*-*-* rs6000-*-* powerpc*-*-* arc*-*-* m32r-*-* tic6x-*-* } } */
+
/* Check that accesses based on the frame pointer do not
use auto increment. */
diff --git a/gcc/testsuite/gcc.dg/pr56727-2.c b/gcc/testsuite/gcc.dg/pr56727-2.c
index e47ee3cd96b..62a74d1ea31 100644
--- a/gcc/testsuite/gcc.dg/pr56727-2.c
+++ b/gcc/testsuite/gcc.dg/pr56727-2.c
@@ -1,5 +1,6 @@
/* { dg-do compile { target fpic } } */
/* { dg-options "-O2 -fPIC" } */
+/* { dg-require-alias "" } */
/* { dg-final { scan-assembler "@(PLT|plt)" { target i?86-*-* x86_64-*-* powerpc*-*-linux* } } } */
__attribute__((noinline, noclone))
diff --git a/gcc/testsuite/gcc.dg/pr57371-5.c b/gcc/testsuite/gcc.dg/pr57371-5.c
new file mode 100644
index 00000000000..ddad25db622
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr57371-5.c
@@ -0,0 +1,10 @@
+/* { dg-do compile } */
+/* { dg-options "-O -fdump-tree-optimized" } */
+/* { dg-require-effective-target dfp } */
+
+/* We do not support DFPs. */
+
+int foo(short x) {
+ /* { dg-final { scan-tree-dump "\\(_Decimal32\\)" "optimized" } } */
+ return (_Decimal32) x != 0;
+}
diff --git a/gcc/testsuite/gcc.dg/pr61162-2.c b/gcc/testsuite/gcc.dg/pr61162-2.c
index 1045408d736..4aa8493d1a3 100644
--- a/gcc/testsuite/gcc.dg/pr61162-2.c
+++ b/gcc/testsuite/gcc.dg/pr61162-2.c
@@ -8,7 +8,7 @@ struct s { int a; };
enum e
fn1 (void)
{
- return 0; /* { dg-warning "10:enum conversion in return" } */
+ return 0; /* { dg-warning "10:enum conversion from 'int' to 'enum e' in return" } */
}
int
@@ -26,19 +26,19 @@ fn3 (void)
int
fn4 (int *a)
{
- return a; /* { dg-warning "10:return makes integer from pointer without a cast" } */
+ return a; /* { dg-warning "10:returning 'int \\*' from a function with return type 'int' makes integer from pointer without a cast" } */
}
int *
fn5 (int a)
{
- return a; /* { dg-warning "10:return makes pointer from integer without a cast" } */
+ return a; /* { dg-warning "10:returning 'int' from a function with return type 'int \\*' makes pointer from integer without a cast" } */
}
unsigned int *
fn6 (int *i)
{
- return i; /* { dg-warning "10:pointer targets in return differ" } */
+ return i; /* { dg-warning "10:pointer targets in returning 'int \\*' from a function with return type 'unsigned int \\*' differ" } */
}
void *
diff --git a/gcc/testsuite/gcc.dg/pr61162.c b/gcc/testsuite/gcc.dg/pr61162.c
index 8dcb0c8ed40..7ed0741e6c0 100644
--- a/gcc/testsuite/gcc.dg/pr61162.c
+++ b/gcc/testsuite/gcc.dg/pr61162.c
@@ -6,7 +6,7 @@ enum e { A };
enum e
fn1 (void)
{
- enum e e, q = 0; /* { dg-warning "17:enum conversion in initialization is invalid" } */
- e = 0; /* { dg-warning "5:enum conversion in assignment is invalid" } */
- 1; return 0; /* { dg-warning "13:enum conversion in return is invalid" } */
+ enum e e, q = 0; /* { dg-warning "17:enum conversion from 'int' to 'enum e' in initialization is invalid" } */
+ e = 0; /* { dg-warning "5:enum conversion from 'int' to 'enum e' in assignment is invalid" } */
+ 1; return 0; /* { dg-warning "13:enum conversion from 'int' to 'enum e' in return is invalid" } */
}
diff --git a/gcc/testsuite/gcc.dg/pr67730-2.c b/gcc/testsuite/gcc.dg/pr67730-2.c
index 29d726754bf..260cc3e3821 100644
--- a/gcc/testsuite/gcc.dg/pr67730-2.c
+++ b/gcc/testsuite/gcc.dg/pr67730-2.c
@@ -9,14 +9,14 @@ extern void bar (int);
int
fn1 (void)
{
- int a = NULL; /* { dg-warning "initialization makes integer from pointer" } */
- a = NULL; /* { dg-warning "assignment makes integer from pointer" } */
+ int a = NULL; /* { dg-warning "initialization of 'int' from 'void \\*' makes integer from pointer" } */
+ a = NULL; /* { dg-warning "assignment to 'int' from 'void \\*' makes integer from pointer" } */
bar (NULL); /* { dg-warning "passing argument 1" } */
- return NULL; /* { dg-warning "return makes integer from pointer" } */
+ return NULL; /* { dg-warning "returning 'void \\*' from a function with return type 'int' makes integer from pointer" } */
}
int
fn2 (void)
{
- RETURN; /* { dg-warning "return makes integer from pointer" } */
+ RETURN; /* { dg-warning "returning 'void \\*' from a function with return type 'int' makes integer from pointer" } */
}
diff --git a/gcc/testsuite/gcc.dg/pr69156.c b/gcc/testsuite/gcc.dg/pr69156.c
index b22aaec4706..1addfa3f6aa 100644
--- a/gcc/testsuite/gcc.dg/pr69156.c
+++ b/gcc/testsuite/gcc.dg/pr69156.c
@@ -5,6 +5,6 @@
_Bool
foo ()
{
- _Bool (*f) () = __builtin_abs; /* { dg-warning "initialization from incompatible pointer type" } */
+ _Bool (*f) () = __builtin_abs; /* { dg-warning "initialization of '_Bool \\(\\*\\)\\(\\)' from incompatible pointer type" } */
return f (0);
}
diff --git a/gcc/testsuite/gcc.dg/pr70174.c b/gcc/testsuite/gcc.dg/pr70174.c
index 8a3bc904fad..59d231e1623 100644
--- a/gcc/testsuite/gcc.dg/pr70174.c
+++ b/gcc/testsuite/gcc.dg/pr70174.c
@@ -7,5 +7,5 @@ struct S { int f : 4; } a;
void
foo (void)
{
- a.f = foo; /* { dg-warning "assignment makes integer from pointer without a cast" } */
+ a.f = foo; /* { dg-warning "assignment to 'signed char:4' from 'void \\(\\*\\)\\(void\\)' makes integer from pointer without a cast" } */
}
diff --git a/gcc/testsuite/gcc.dg/pr78582.c b/gcc/testsuite/gcc.dg/pr78582.c
index 51e3a1f09ed..6d125cf8bab 100644
--- a/gcc/testsuite/gcc.dg/pr78582.c
+++ b/gcc/testsuite/gcc.dg/pr78582.c
@@ -1,6 +1,7 @@
/* PR target/78582. */
/* { dg-options "-fprofile-generate" } */
/* { dg-do compile } */
+/* { dg-require-effective-target nonlocal_goto } */
#include <setjmp.h>
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/pr81588.c b/gcc/testsuite/gcc.dg/pr81588.c
new file mode 100644
index 00000000000..4e83607f2a8
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr81588.c
@@ -0,0 +1,26 @@
+/* PR tree-optimization/81588 */
+/* { dg-do run } */
+/* { dg-options "-O2" } */
+
+long long int a = 5011877430933453486LL, c = 1;
+unsigned short b = 24847;
+
+#include "tree-ssa/pr81588.c"
+
+int
+main ()
+{
+ foo ();
+ if (c != 0)
+ __builtin_abort ();
+ a = 24846;
+ c = 1;
+ foo ();
+ if (c != 1)
+ __builtin_abort ();
+ a = -5;
+ foo ();
+ if (c != 0)
+ __builtin_abort ();
+ return 0;
+}
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/pr81650.c b/gcc/testsuite/gcc.dg/pr81650.c
new file mode 100644
index 00000000000..99e84ded30d
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr81650.c
@@ -0,0 +1,9 @@
+/* PR driver/81650 */
+/* { dg-do compile } */
+/* { dg-options "-Walloc-size-larger-than=9223372036854775807" } */
+
+void *
+foo (void)
+{
+ return __builtin_malloc (5);
+}
diff --git a/gcc/testsuite/gcc.dg/pr81695.c b/gcc/testsuite/gcc.dg/pr81695.c
new file mode 100644
index 00000000000..c3452580f1c
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr81695.c
@@ -0,0 +1,11 @@
+/* PR middle-end/81695 */
+/* { dg-do compile } */
+/* { dg-options "" } */
+
+int z[] = { };
+
+int
+main (void)
+{
+ __builtin_printf ("%d\n", *(z + 1));
+}
diff --git a/gcc/testsuite/gcc.dg/pr81737.c b/gcc/testsuite/gcc.dg/pr81737.c
new file mode 100644
index 00000000000..493358956ef
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr81737.c
@@ -0,0 +1,6 @@
+/* PR middle-end/81737 */
+/* { dg-do compile } */
+/* { dg-options "" } */
+
+extern int a[];
+void fn1() { (a + 0)[1]; }
diff --git a/gcc/testsuite/gcc.dg/pr81795.c b/gcc/testsuite/gcc.dg/pr81795.c
new file mode 100644
index 00000000000..b035bd0b530
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr81795.c
@@ -0,0 +1,14 @@
+/* PR c/81795 */
+/* { dg-do compile } */
+/* { dg-options "-Wc++-compat" } */
+
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wc++-compat"
+
+struct S { int f; }; /* { dg-bogus "note: originally defined here" } */
+typedef int S; /* { dg-bogus "invalid in C\[+\]\[+\]" } */
+
+typedef int T; /* { dg-bogus "note: originally defined here" } */
+struct T { int f; }; /* { dg-bogus "invalid in C\[+\]\[+\]" } */
+
+#pragma GCC diagnostic pop
diff --git a/gcc/testsuite/gcc.dg/string-opt-1.c b/gcc/testsuite/gcc.dg/string-opt-1.c
index bc0f30098fa..2f060732bf0 100644
--- a/gcc/testsuite/gcc.dg/string-opt-1.c
+++ b/gcc/testsuite/gcc.dg/string-opt-1.c
@@ -1,11 +1,52 @@
-/* Ensure mempcpy is not "optimized" into memcpy followed by addition. */
+/* Ensure mempcpy is "optimized" into memcpy followed by addition. */
/* { dg-do compile } */
/* { dg-options "-O2" } */
-void *
-fn (char *x, char *y, int z)
+char *buffer;
+char *test;
+
+#define SIZE 100
+
+char *
+__attribute__((noinline))
+my_memcpy (char *d, char *s, unsigned l)
+{
+ return __builtin_memcpy (d, s, l);
+}
+
+char *
+__attribute__((noinline))
+my_mempcpy (char *d, char *s, unsigned l)
+{
+ return __builtin_mempcpy (d, s, l);
+}
+
+void
+run_test (char *d, char *s, unsigned l)
{
- return __builtin_mempcpy (x, y, z);
+ char *r = my_mempcpy (d, s, l);
+ if (r != d + l)
+ __builtin_abort ();
+
+ r = my_memcpy (d, s, l);
+ if (r != d)
+ __builtin_abort ();
+}
+
+int
+main (void)
+{
+ const char* const foo = "hello world";
+ unsigned l = __builtin_strlen (foo) + 1;
+
+ buffer = __builtin_malloc (SIZE);
+ __builtin_memcpy (buffer, foo, l);
+ test = __builtin_malloc (SIZE);
+
+ run_test (test, buffer, l);
+
+ return 0;
}
-/* { dg-final { scan-assembler-not "memcpy" } } */
+/* { dg-final { scan-assembler-not "\<mempcpy\>" } } */
+/* { dg-final { scan-assembler "memcpy" } } */
diff --git a/gcc/testsuite/gcc.dg/torture/pr25967-1.c b/gcc/testsuite/gcc.dg/torture/pr25967-1.c
new file mode 100644
index 00000000000..fd26a8b8ce3
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/pr25967-1.c
@@ -0,0 +1,63 @@
+/* { dg-do run { target i?86-*-* x86_64-*-* } } */
+/* { dg-options "-mgeneral-regs-only" } */
+
+extern void exit (int);
+
+typedef unsigned int uword_t __attribute__ ((mode (__word__)));
+
+#define ERROR 0x12345670
+#define IP 0x12345671
+#define CS 0x12345672
+#define FLAGS 0x12345673
+#define SP 0x12345674
+#define SS 0x12345675
+
+#define STRING(x) XSTRING(x)
+#define XSTRING(x) #x
+#define ASMNAME(cname) ASMNAME2 (__USER_LABEL_PREFIX__, cname)
+#define ASMNAME2(prefix, cname) XSTRING (prefix) cname
+
+struct interrupt_frame
+{
+ uword_t ip;
+ uword_t cs;
+ uword_t flags;
+ uword_t sp;
+ uword_t ss;
+};
+
+__attribute__((naked, used))
+void
+fn (void)
+{
+ register uword_t *sp __asm__("sp");
+ uword_t error = *sp;
+ struct interrupt_frame *frame = (struct interrupt_frame *) (sp + 1);
+ if (ERROR != error) /* BREAK */
+ __builtin_abort ();
+ if (IP != frame->ip)
+ __builtin_abort ();
+ if (CS != frame->cs)
+ __builtin_abort ();
+ if (FLAGS != frame->flags)
+ __builtin_abort ();
+ if (SP != frame->sp)
+ __builtin_abort ();
+ if (SS != frame->ss)
+ __builtin_abort ();
+
+ exit (0);
+}
+
+int
+main ()
+{
+ asm ("push $" STRING (SS) "; \
+ push $" STRING (SP) "; \
+ push $" STRING (FLAGS) "; \
+ push $" STRING (CS) "; \
+ push $" STRING (IP) "; \
+ push $" STRING (ERROR) "; \
+ jmp " ASMNAME ("fn"));
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/torture/pr25967-2.c b/gcc/testsuite/gcc.dg/torture/pr25967-2.c
new file mode 100644
index 00000000000..4a0dd78c0ad
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/pr25967-2.c
@@ -0,0 +1,58 @@
+/* { dg-do run { target i?86-*-* x86_64-*-* } } */
+/* { dg-options "-mgeneral-regs-only" } */
+
+extern void exit (int);
+
+typedef unsigned int uword_t __attribute__ ((mode (__word__)));
+
+#define IP 0x12345671
+#define CS 0x12345672
+#define FLAGS 0x12345673
+#define SP 0x12345674
+#define SS 0x12345675
+
+#define STRING(x) XSTRING(x)
+#define XSTRING(x) #x
+#define ASMNAME(cname) ASMNAME2 (__USER_LABEL_PREFIX__, cname)
+#define ASMNAME2(prefix, cname) XSTRING (prefix) cname
+
+struct interrupt_frame
+{
+ uword_t ip;
+ uword_t cs;
+ uword_t flags;
+ uword_t sp;
+ uword_t ss;
+};
+
+__attribute__((naked, used))
+void
+fn (void)
+{
+ register uword_t *sp __asm__("sp");
+ struct interrupt_frame *frame = (struct interrupt_frame *) sp;
+ if (IP != frame->ip) /* BREAK */
+ __builtin_abort ();
+ if (CS != frame->cs)
+ __builtin_abort ();
+ if (FLAGS != frame->flags)
+ __builtin_abort ();
+ if (SP != frame->sp)
+ __builtin_abort ();
+ if (SS != frame->ss)
+ __builtin_abort ();
+
+ exit (0);
+}
+
+int
+main ()
+{
+ asm ("push $" STRING (SS) "; \
+ push $" STRING (SP) "; \
+ push $" STRING (FLAGS) "; \
+ push $" STRING (CS) "; \
+ push $" STRING (IP) "; \
+ jmp " ASMNAME ("fn"));
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/torture/pr78218.c b/gcc/testsuite/gcc.dg/torture/pr78218.c
index b3e2892429d..fd6ddc9d90d 100644
--- a/gcc/testsuite/gcc.dg/torture/pr78218.c
+++ b/gcc/testsuite/gcc.dg/torture/pr78218.c
@@ -1,15 +1,18 @@
/* { dg-do run } */
-struct
+struct v
{
int v;
-} a[2];
+};
-int b;
+struct v a[2];
+
+struct v *gp;
void __attribute__((noinline,noclone))
-check ()
+check (struct v *p)
{
+ gp = p;
if (a[0].v != 1)
__builtin_abort ();
}
diff --git a/gcc/testsuite/gcc.dg/torture/pr80163.c b/gcc/testsuite/gcc.dg/torture/pr80163.c
index 80cc68dd76d..a9a4438d66f 100644
--- a/gcc/testsuite/gcc.dg/torture/pr80163.c
+++ b/gcc/testsuite/gcc.dg/torture/pr80163.c
@@ -1,5 +1,6 @@
/* PR c/80163 */
/* { dg-do compile { target int128 } } */
+/* { dg-require-effective-target label_values } */
volatile int v;
diff --git a/gcc/testsuite/gcc.dg/torture/pr81181.c b/gcc/testsuite/gcc.dg/torture/pr81181.c
new file mode 100644
index 00000000000..e7216d7bf3e
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/pr81181.c
@@ -0,0 +1,30 @@
+/* { dg-do compile } */
+
+unsigned int lh;
+
+void
+ny (int t3, int ys, int rt, int p8)
+{
+ if (lh != 0)
+ {
+ if (0)
+ {
+oo:
+ do
+ {
+ rt = (p8 != 0) ? t3 : 0;
+ rt = (rt != 0 || lh != (unsigned int)ys);
+ rt += lh + ys;
+ }
+ while (t3 <= 0);
+
+ lh = ys;
+ ys = rt;
+ }
+
+ if (lh != 0)
+ p8 = lh;
+ }
+
+ goto oo;
+}
diff --git a/gcc/testsuite/gcc.dg/torture/pr81297.c b/gcc/testsuite/gcc.dg/torture/pr81297.c
new file mode 100644
index 00000000000..be346c4c0d1
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/pr81297.c
@@ -0,0 +1,16 @@
+/* { dg-do compile } */
+
+int
+nf (int gy, int x0)
+{
+ while (gy < 1)
+ ++x0;
+
+ gy += !!gy;
+ if (gy < 0)
+ {
+ x0 += gy;
+ return (x0 > (gy + x0)) ? (1 / 0) : 1; /* { dg-warning "division by zero" } */
+ }
+}
+
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/pr81388-1.c b/gcc/testsuite/gcc.dg/tree-ssa/pr81388-1.c
index ecfe12929cc..0beb5109d40 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/pr81388-1.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/pr81388-1.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O2 -fno-strict-overflow -fdump-tree-ivcanon-details" } */
+/* { dg-options "-O2 -fno-strict-overflow -fdump-tree-tailc-details" } */
void bar();
void foo(char *dst)
@@ -11,4 +11,6 @@ void foo(char *dst)
} while (dst < end);
}
-/* { dg-final { scan-tree-dump-times " zero if " 1 "ivcanon" } } */
+/* The loop only iterates once because pointer overflow always has undefined
+ semantics. As a result, call to bar becomes tail call. */
+/* { dg-final { scan-tree-dump-times "Found tail call " 1 "tailc" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/pr81588.c b/gcc/testsuite/gcc.dg/tree-ssa/pr81588.c
new file mode 100644
index 00000000000..2709abd89a1
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/pr81588.c
@@ -0,0 +1,15 @@
+/* PR tree-optimization/81588 */
+/* { dg-do compile } */
+/* { dg-options "-O2 -fdump-tree-reassoc1-details" } */
+
+extern long long int a, c;
+extern unsigned short b;
+
+/* { dg-final { scan-tree-dump-times "Optimizing range test \[^\n\r]* and comparison" 1 "reassoc1" } } */
+
+__attribute__((noinline, noclone)) void
+foo (void)
+{
+ if ((b > a) != (1 + (a < 0)))
+ c = 0;
+}
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/pr81620-1.c b/gcc/testsuite/gcc.dg/tree-ssa/pr81620-1.c
new file mode 100644
index 00000000000..f8f2dd8ad6c
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/pr81620-1.c
@@ -0,0 +1,20 @@
+/* { dg-do run } */
+/* { dg-options "-O3 -fno-tree-loop-vectorize -fdump-tree-pcom-details" } */
+
+int a[7];
+char b;
+void abort (void);
+
+int main() {
+ b = 4;
+ for (; b; b--) {
+ a[b] = b;
+ a[b + 2] = 1;
+ }
+ if (a[0] != 0 || a[1] != 1 || a[2] != 2
+ || a[3] != 1 || a[4] != 1 || a[5] != 1 || a[6] != 1)
+ abort ();
+ return 0;
+}
+
+/* { dg-final { scan-tree-dump-times "Store-stores chain" 1 "pcom" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/pr81620-2.c b/gcc/testsuite/gcc.dg/tree-ssa/pr81620-2.c
new file mode 100644
index 00000000000..85a8e350840
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/pr81620-2.c
@@ -0,0 +1,25 @@
+/* { dg-do run } */
+/* { dg-options "-O3 -fno-tree-loop-vectorize -fdump-tree-pcom-details" } */
+
+int a[200];
+char b;
+void abort (void);
+
+int main() {
+ int i;
+ b = 100;
+ for (; b; b--) {
+ a[b] = 2;
+ a[b + 2] = 1;
+ }
+
+ if (a[0] != 0 || a[1] != 2 || a[2] != 2)
+ abort ();
+ for (i = 3; i < 103; i++)
+ if (a[i] != 1)
+ abort ();
+
+ return 0;
+}
+
+/* { dg-final { scan-tree-dump-times "Store-stores chain" 1 "pcom" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/pr81627.c b/gcc/testsuite/gcc.dg/tree-ssa/pr81627.c
new file mode 100644
index 00000000000..9ba43be5052
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/pr81627.c
@@ -0,0 +1,28 @@
+/* { dg-do run } */
+/* { dg-options "-O3 -fno-tree-loop-vectorize -fdump-tree-pcom-details" } */
+
+int a, b, c, d[6], e = 3, f;
+
+void abort (void);
+void fn1 ()
+{
+ for (b = 1; b < 5; b++)
+ {
+ for (c = 0; c < 5; c++)
+ d[b] = e;
+ if (a)
+ f++;
+ d[b + 1] = 1;
+ }
+}
+
+int main ()
+{
+ fn1 ();
+ if (d[0] != 0 || d[1] != 3 || d[2] != 3
+ || d[3] != 3 || d[4] != 3 || d[5] != 1)
+ abort ();
+
+ return 0;
+}
+/* { dg-final { scan-tree-dump-times "Store-stores chain" 1 "pcom" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/pr81744.c b/gcc/testsuite/gcc.dg/tree-ssa/pr81744.c
new file mode 100644
index 00000000000..b0f5d38ff93
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/pr81744.c
@@ -0,0 +1,13 @@
+/* { dg-do compile } */
+/* { dg-options "-O3 -fno-tree-loop-vectorize -fno-tree-slp-vectorize -fno-inline -fdump-tree-pcom-details" } */
+
+typedef struct {
+ int a, b;
+} CompandSegment;
+int a;
+CompandSegment *b;
+void fn1() {
+ for (; a; a++)
+ b[a].a = b[a].b = b[a - 1].a = b[a - 1].b = 0;
+}
+/* { dg-final { scan-tree-dump-times "Store-stores chain" 2 "pcom"} } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/reassoc-23.c b/gcc/testsuite/gcc.dg/tree-ssa/reassoc-23.c
index 0ab967d20ab..a5451ade6ef 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/reassoc-23.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/reassoc-23.c
@@ -6,9 +6,10 @@ foo(unsigned int a, unsigned int b, unsigned int c, unsigned int d,
unsigned int e, unsigned int f, unsigned int g, unsigned int h)
{
/* Should be transformed into e = 20 */
- unsigned int i = (a + 9) + (c + 8);
- unsigned int j = (-c + 1) + (-a + 2);
-
+ unsigned int i = (a + 9);
+ unsigned int j = (-c + 1);
+ i += (c + 8);
+ j += (-a + 2);
e = i + j;
return e;
}
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/split-path-5.c b/gcc/testsuite/gcc.dg/tree-ssa/split-path-5.c
index 5044c7301a1..95aabdaf6be 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/split-path-5.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/split-path-5.c
@@ -41,20 +41,4 @@ bmhi_init (const char *pattern)
}
}
-char *
-bmhi_search (const char *string, const int stringlen)
-{
- int i, j;
- char *s;
- for (;;)
- {
- while (--j >= 0 && (
- {
- __typeof__ (s[j]) __x = (s[j]);
- ((((__ctype_ptr__ +
- sizeof (""[__x]))[(int) (__x)]) &
- (01 | 02)) ==
- 02) ? (int) __x - 'a' +
- 'A' : (int) __x;}) == pat[j]);
-}}
-/* { dg-final { scan-tree-dump-times "Duplicating join block" 2 "split-paths" } } */
+/* { dg-final { scan-tree-dump-times "Duplicating join block" 1 "split-paths" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/ssa-dce-3.c b/gcc/testsuite/gcc.dg/tree-ssa/ssa-dce-3.c
index 64b30ca1eb3..863aa79b4eb 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/ssa-dce-3.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/ssa-dce-3.c
@@ -26,9 +26,6 @@ int main(void)
by marking the j % 7 condition as useful. See PR45178. */
/* We should eliminate the inner condition, but the loop must be preserved
- as it is infinite. Therefore there should be just one phi node (for i): */
-/* { dg-final { scan-tree-dump-times "PHI " 1 "cddce1" { xfail *-*-* } } } */
-
-/* And one if (for the exit condition of the loop): */
-/* { dg-final { scan-tree-dump-times "if " 1 "cddce1" } } */
-
+ as it is infinite. Therefore there should be just one goto and no PHI. */
+/* { dg-final { scan-tree-dump-times "PHI " 0 "cddce1" } } */
+/* { dg-final { scan-tree-dump-times "goto" 1 "cddce1" } } */
diff --git a/gcc/testsuite/gcc.dg/unclosed-init.c b/gcc/testsuite/gcc.dg/unclosed-init.c
new file mode 100644
index 00000000000..c0e4dd8da9b
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/unclosed-init.c
@@ -0,0 +1,3 @@
+int unclosed[] = { /* { dg-message "18: to match this '.'" } */
+ 42
+ /* { dg-error "0: expected '.' at end of input" } */
diff --git a/gcc/testsuite/gcc.dg/uninit-23.c b/gcc/testsuite/gcc.dg/uninit-23.c
index b38e1d08eab..d64eb7d2ee9 100644
--- a/gcc/testsuite/gcc.dg/uninit-23.c
+++ b/gcc/testsuite/gcc.dg/uninit-23.c
@@ -15,10 +15,10 @@ ql (void)
for (;;)
{
int *go;
- int *t4 = go;
+ int *t4 = go; /* { dg-warning "is used uninitialized" } */
l1:
- *t4 = (*t4 != 0) ? 0 : 2; /* { dg-warning "may be used uninitialized" } */
+ *t4 = (*t4 != 0) ? 0 : 2;
}
if (ij != 0)
diff --git a/gcc/testsuite/gcc.dg/vect/no-section-anchors-vect-69.c b/gcc/testsuite/gcc.dg/vect/no-section-anchors-vect-69.c
index fe968de3432..1458ba60426 100644
--- a/gcc/testsuite/gcc.dg/vect/no-section-anchors-vect-69.c
+++ b/gcc/testsuite/gcc.dg/vect/no-section-anchors-vect-69.c
@@ -1,5 +1,6 @@
/* { dg-require-effective-target vect_int } */
/* { dg-add-options bind_pic_locally } */
+/* { dg-additional-options "--param vect-max-peeling-for-alignment=0" } */
#include <stdarg.h>
#include "tree-vect.h"
@@ -114,7 +115,4 @@ int main (void)
}
/* { dg-final { scan-tree-dump-times "vectorized 4 loops" 1 "vect" } } */
-/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 0 "vect" } } */
-/* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 2 "vect" { xfail { {! vector_alignment_reachable} || { vect_sizes_32B_16B} } } } } */
/* { dg-final { scan-tree-dump-times "Alignment of access forced using versioning" 1 "vect" { target { {! vector_alignment_reachable} && {! vect_hw_misalign} } } } } */
-/* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 1 "vect" { target { {! vector_alignment_reachable} && {! vect_hw_misalign} } } } } */
diff --git a/gcc/testsuite/gcc.dg/vect/pr81136.c b/gcc/testsuite/gcc.dg/vect/pr81136.c
index 24bd8fa3b19..c67357684df 100644
--- a/gcc/testsuite/gcc.dg/vect/pr81136.c
+++ b/gcc/testsuite/gcc.dg/vect/pr81136.c
@@ -14,3 +14,5 @@ fn1 (int n)
for (int i = 0; i < n; i++)
a->bar[i] = b[i];
}
+
+/* { dg-final { scan-tree-dump-not "Unknown misalignment" "vect" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/pr81633.c b/gcc/testsuite/gcc.dg/vect/pr81633.c
new file mode 100644
index 00000000000..1ae15504e81
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/pr81633.c
@@ -0,0 +1,33 @@
+/* { dg-do run } */
+
+static double identity[4][4] = {{1, 0, 0, 0},
+ {0, 1, 0, 0},
+ {0, 0, 1, 0},
+ {0, 0, 0, 1}};
+static double expected[4][4] = {{1, 0, 0, 0},
+ {0, 0, 0, 0},
+ {0, 0, 0, 0},
+ {0, 0, 0, 0}};
+
+static void __attribute__((noinline,noclone))
+kernel(double A[4][4])
+{
+ double tmp[4][4];
+ for (int j = 0; j < 4; j++)
+ for (int k = 0; k < 4; k++)
+ tmp[j][k] = identity[j][0] * identity[j][k];
+ for (int j = 0; j < 4; j++ )
+ for (int k = 0; k < 4; k++)
+ A[j][k] = tmp[j][k];
+}
+
+int main(void)
+{
+ double A[4][4] = {{0.0}};
+ kernel(A);
+ for ( int i = 0; i < 4; i++ )
+ for ( int j = 0; j < 4; j++ )
+ if (A[i][j] != expected[i][j])
+ __builtin_abort ();
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/vect/section-anchors-vect-69.c b/gcc/testsuite/gcc.dg/vect/section-anchors-vect-69.c
index 8c88e5f6d18..26bcf4b0d76 100644
--- a/gcc/testsuite/gcc.dg/vect/section-anchors-vect-69.c
+++ b/gcc/testsuite/gcc.dg/vect/section-anchors-vect-69.c
@@ -1,4 +1,5 @@
/* { dg-require-effective-target section_anchors } */
+/* { dg-additional-options "--param vect-max-peeling-for-alignment=0" } */
#include <stdarg.h>
#include "tree-vect.h"
@@ -112,8 +113,6 @@ int main (void)
}
/* { dg-final { scan-tree-dump-times "vectorized 4 loops" 1 "vect" { target vect_int } } } */
-/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 0 "vect" } } */
/* Alignment forced using versioning until the pass that increases alignment
is extended to handle structs. */
-/* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 2 "vect" { target {vect_int && vector_alignment_reachable } } } } */
/* { dg-final { scan-tree-dump-times "Alignment of access forced using versioning" 4 "vect" { target {vect_int && {! vector_alignment_reachable} } } } } */
diff --git a/gcc/testsuite/gcc.dg/vect/vect-28.c b/gcc/testsuite/gcc.dg/vect/vect-28.c
index b28fbd9c79a..e213df1a465 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-28.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-28.c
@@ -1,4 +1,5 @@
/* { dg-require-effective-target vect_int } */
+/* { dg-additional-options "--param vect-max-peeling-for-alignment=0" } */
#include <stdarg.h>
#include "tree-vect.h"
@@ -39,6 +40,4 @@ int main (void)
}
/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */
-/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 0 "vect" } } */
-/* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 1 "vect" { target { vector_alignment_reachable } } } } */
/* { dg-final { scan-tree-dump-times "Alignment of access forced using versioning" 1 "vect" { target { {! vector_alignment_reachable} && {! vect_hw_misalign} } } } } */
diff --git a/gcc/testsuite/gcc.dg/vect/vect-33-big-array.c b/gcc/testsuite/gcc.dg/vect/vect-33-big-array.c
index 5ad3953810b..c1aa399a240 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-33-big-array.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-33-big-array.c
@@ -1,5 +1,6 @@
/* { dg-do compile } */
/* { dg-require-effective-target vect_int } */
+/* { dg-additional-options "--param vect-max-peeling-for-alignment=0" } */
#include <stdarg.h>
#include "tree-vect.h"
@@ -38,6 +39,4 @@ int main (void)
/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */
-/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 0 "vect" } } */
-/* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 1 "vect" { target vector_alignment_reachable } } } */
/* { dg-final { scan-tree-dump-times "Alignment of access forced using versioning" 1 "vect" { target { {! vector_alignment_reachable} && {! vect_hw_misalign} } } } } */
diff --git a/gcc/testsuite/gcc.dg/vect/vect-70.c b/gcc/testsuite/gcc.dg/vect/vect-70.c
index 0ec06a273df..a110f9c34e8 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-70.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-70.c
@@ -1,4 +1,5 @@
/* { dg-require-effective-target vect_int } */
+/* { dg-additional-options "--param vect-max-peeling-for-alignment=0" } */
#include <stdarg.h>
#include "tree-vect.h"
@@ -63,6 +64,4 @@ int main (void)
}
/* { dg-final { scan-tree-dump-times "vectorized 2 loops" 1 "vect" } } */
-/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 0 "vect" } } */
-/* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 1 "vect" {target { vector_alignment_reachable} } } } */
/* { dg-final { scan-tree-dump-times "Alignment of access forced using versioning" 1 "vect" {target {{! vector_alignment_reachable} && {! vect_hw_misalign} } } } } */
diff --git a/gcc/testsuite/gcc.dg/vect/vect-87.c b/gcc/testsuite/gcc.dg/vect/vect-87.c
index 4f743975852..17b1dcdee99 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-87.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-87.c
@@ -1,4 +1,5 @@
/* { dg-require-effective-target vect_int } */
+/* { dg-additional-options "--param vect-max-peeling-for-alignment=0" } */
#include <stdarg.h>
#include "tree-vect.h"
@@ -50,6 +51,4 @@ int main (void)
/* Fails for targets that don't vectorize PLUS (e.g alpha). */
/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */
-/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 0 "vect" } } */
-/* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 1 "vect" {target vector_alignment_reachable} } } */
/* { dg-final { scan-tree-dump-times "Alignment of access forced using versioning" 1 "vect" {target { {! vector_alignment_reachable} && {! vect_hw_misalign} } } } } */
diff --git a/gcc/testsuite/gcc.dg/vect/vect-88.c b/gcc/testsuite/gcc.dg/vect/vect-88.c
index f35c5259a8d..b99cb4d89a4 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-88.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-88.c
@@ -1,4 +1,5 @@
/* { dg-require-effective-target vect_int } */
+/* { dg-additional-options "--param vect-max-peeling-for-alignment=0" } */
#include <stdarg.h>
#include "tree-vect.h"
@@ -50,6 +51,4 @@ int main (void)
/* Fails for targets that don't vectorize PLUS (e.g alpha). */
/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */
-/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 0 "vect" } } */
-/* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 1 "vect" {target vector_alignment_reachable } } } */
/* { dg-final { scan-tree-dump-times "Alignment of access forced using versioning" 1 "vect" {target { {! vector_alignment_reachable} && {! vect_hw_misalign} } } } } */
diff --git a/gcc/testsuite/gcc.dg/vect/vect-91.c b/gcc/testsuite/gcc.dg/vect/vect-91.c
index de9d5d1e1e8..979b8e93aef 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-91.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-91.c
@@ -1,5 +1,6 @@
/* { dg-do compile } */
/* { dg-require-effective-target vect_int } */
+/* { dg-additional-options "--param vect-max-peeling-for-alignment=0" } */
#include <stdarg.h>
#include "tree-vect.h"
@@ -60,5 +61,4 @@ main3 ()
/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 3 "vect" { xfail vect_no_int_add } } } */
/* { dg-final { scan-tree-dump-times "accesses have the same alignment." 3 "vect" { target { { vect_aligned_arrays } && {! vect_sizes_32B_16B} } } } } */
/* { dg-final { scan-tree-dump-times "accesses have the same alignment." 2 "vect" { target { {! vect_aligned_arrays } && {vect_sizes_32B_16B} } } } } */
-/* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 3 "vect" {target { vector_alignment_reachable } } } } */
/* { dg-final { scan-tree-dump-times "Alignment of access forced using versioning" 3 "vect" {target { {! vector_alignment_reachable} && {! vect_hw_misalign} } } } } */
diff --git a/gcc/testsuite/gcc.dg/vect/vect-93.c b/gcc/testsuite/gcc.dg/vect/vect-93.c
index 790ef2d7596..dfa4d42b8b2 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-93.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-93.c
@@ -1,4 +1,5 @@
/* { dg-require-effective-target vect_float } */
+/* { dg-additional-options "--param vect-max-peeling-for-alignment=0" } */
#include <stdarg.h>
#include "tree-vect.h"
@@ -71,8 +72,6 @@ int main (void)
/* main && main1 together: */
/* { dg-final { scan-tree-dump-times "vectorized 2 loops" 2 "vect" { target powerpc*-*-* i?86-*-* x86_64-*-* } } } */
-/* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 2 "vect" { target { vect_no_align && {! vector_alignment_reachable} } } } } */
-/* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 3 "vect" { xfail { { vect_no_align } || { { ! vector_alignment_reachable} || vect_element_align } } } } } */
/* in main1: */
/* { dg-final { scan-tree-dump-times "vectorized 2 loops" 1 "vect" { target !powerpc*-*-* !i?86-*-* !x86_64-*-* } } } */
@@ -80,5 +79,4 @@ int main (void)
/* in main: */
/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { target { vect_no_align && { ! vect_hw_misalign } } } } } */
-/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 1 "vect" { xfail { vect_no_align && { ! vect_hw_misalign } } } } } */
diff --git a/gcc/testsuite/gcc.dg/vect/vect-alias-check-3.c b/gcc/testsuite/gcc.dg/vect/vect-alias-check-3.c
new file mode 100644
index 00000000000..10b4c3d2c2a
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/vect-alias-check-3.c
@@ -0,0 +1,120 @@
+/* { dg-do compile } */
+/* { dg-require-effective-target vect_int } */
+/* { dg-additional-options "--param vect-max-version-for-alias-checks=0 -fopenmp-simd" } */
+
+/* Intended to be larger than any VF. */
+#define GAP 128
+#define N (GAP * 3)
+
+struct s { int x[N + 1]; };
+struct t { struct s x[N + 1]; };
+struct u { int x[N + 1]; int y; };
+struct v { struct s s; };
+
+void
+f1 (struct s *a, struct s *b)
+{
+ for (int i = 0; i < N; ++i)
+ a->x[i] += b->x[i];
+}
+
+void
+f2 (struct s *a, struct s *b)
+{
+ for (int i = 0; i < N; ++i)
+ a[1].x[i] += b[2].x[i];
+}
+
+void
+f3 (struct s *a, struct s *b)
+{
+ for (int i = 0; i < N; ++i)
+ a[1].x[i] += b[i].x[i];
+}
+
+void
+f4 (struct s *a, struct s *b)
+{
+ for (int i = 0; i < N; ++i)
+ a[i].x[i] += b[i].x[i];
+}
+
+void
+f5 (struct s *a, struct s *b)
+{
+ for (int i = 0; i < N; ++i)
+ a->x[i] += b->x[i + 1];
+}
+
+void
+f6 (struct s *a, struct s *b)
+{
+ for (int i = 0; i < N; ++i)
+ a[1].x[i] += b[2].x[i + 1];
+}
+
+void
+f7 (struct s *a, struct s *b)
+{
+ for (int i = 0; i < N; ++i)
+ a[1].x[i] += b[i].x[i + 1];
+}
+
+void
+f8 (struct s *a, struct s *b)
+{
+ for (int i = 0; i < N; ++i)
+ a[i].x[i] += b[i].x[i + 1];
+}
+
+void
+f9 (struct s *a, struct t *b)
+{
+ for (int i = 0; i < N; ++i)
+ a->x[i] += b->x[1].x[i];
+}
+
+void
+f10 (struct s *a, struct t *b)
+{
+ for (int i = 0; i < N; ++i)
+ a->x[i] += b->x[i].x[i];
+}
+
+void
+f11 (struct u *a, struct u *b)
+{
+ for (int i = 0; i < N; ++i)
+ a->x[i] += b->x[i] + b[i].y;
+}
+
+void
+f12 (struct s *a, struct s *b)
+{
+ for (int i = 0; i < GAP; ++i)
+ a->x[i + GAP] += b->x[i];
+}
+
+void
+f13 (struct s *a, struct s *b)
+{
+ for (int i = 0; i < GAP * 2; ++i)
+ a->x[i + GAP] += b->x[i];
+}
+
+void
+f14 (struct v *a, struct s *b)
+{
+ for (int i = 0; i < N; ++i)
+ a->s.x[i] = b->x[i];
+}
+
+void
+f15 (struct s *a, struct s *b)
+{
+ #pragma omp simd safelen(N)
+ for (int i = 0; i < N; ++i)
+ a->x[i + 1] += b->x[i];
+}
+
+/* { dg-final { scan-tree-dump-times "LOOP VECTORIZED" 15 "vect" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/vect-alias-check-4.c b/gcc/testsuite/gcc.dg/vect/vect-alias-check-4.c
new file mode 100644
index 00000000000..1e5fc273ec1
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/vect-alias-check-4.c
@@ -0,0 +1,35 @@
+/* { dg-do compile } */
+/* { dg-require-effective-target vect_int } */
+/* { dg-additional-options "--param vect-max-version-for-alias-checks=0" } */
+
+#define N 16
+
+struct s1 { int a[N]; };
+struct s2 { struct s1 b; int c; };
+struct s3 { int d; struct s1 e; };
+union u { struct s2 f; struct s3 g; };
+
+/* We allow a and b to overlap arbitrarily. */
+
+void
+f1 (int a[][N], int b[][N])
+{
+ for (int i = 0; i < N; ++i)
+ a[0][i] += b[0][i];
+}
+
+void
+f2 (union u *a, union u *b)
+{
+ for (int i = 0; i < N; ++i)
+ a->f.b.a[i] += b->g.e.a[i];
+}
+
+void
+f3 (struct s1 *a, struct s1 *b)
+{
+ for (int i = 0; i < N - 1; ++i)
+ a->a[i + 1] += b->a[i];
+}
+
+/* { dg-final { scan-tree-dump-not "LOOP VECTORIZED" "vect" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/vect-alias-check-5.c b/gcc/testsuite/gcc.dg/vect/vect-alias-check-5.c
new file mode 100644
index 00000000000..bfa946b9ad2
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/vect-alias-check-5.c
@@ -0,0 +1,19 @@
+/* { dg-do compile } */
+/* { dg-require-effective-target vect_int } */
+
+/* Intended to be larger than any VF. */
+#define GAP 128
+#define N (GAP * 3)
+
+struct s { int x[N]; };
+
+void
+f1 (struct s *a, struct s *b)
+{
+ for (int i = 0; i < GAP * 2; ++i)
+ a->x[i + GAP] += b->x[i];
+}
+
+/* { dg-final { scan-tree-dump-times "consider run-time aliasing" 1 "vect" } } */
+/* { dg-final { scan-tree-dump-times "improved number of alias checks from 1 to 0" 1 "vect" } } */
+/* { dg-final { scan-tree-dump-times "LOOP VECTORIZED" 1 "vect" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/vect-alias-check-6.c b/gcc/testsuite/gcc.dg/vect/vect-alias-check-6.c
new file mode 100644
index 00000000000..5bb78f8ad5c
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/vect-alias-check-6.c
@@ -0,0 +1,16 @@
+/* { dg-do compile } */
+/* { dg-require-effective-target vect_int } */
+
+#define N 16
+
+struct s { int x[N]; };
+
+void
+f1 (struct s *a, struct s *b)
+{
+ for (int i = 0; i < N - 1; ++i)
+ a->x[i + 1] += b->x[i];
+}
+
+/* { dg-final { scan-tree-dump {checking that [^\n]* and [^\n]* have different addresses} "vect" } } */
+/* { dg-final { scan-tree-dump "LOOP VECTORIZED" "vect" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/vect-alias-check-7.c b/gcc/testsuite/gcc.dg/vect/vect-alias-check-7.c
new file mode 100644
index 00000000000..812349de914
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/vect-alias-check-7.c
@@ -0,0 +1,16 @@
+/* { dg-do compile } */
+/* { dg-require-effective-target vect_int } */
+
+#define N 16
+
+struct s { int x[N]; };
+
+void
+f1 (struct s *a, struct s *b)
+{
+ for (int i = 0; i < N; ++i)
+ a->x[i] += b->x[N - i - 1];
+}
+
+/* { dg-final { scan-tree-dump {checking that [^\n]* and [^\n]* have different addresses} "vect" } } */
+/* { dg-final { scan-tree-dump "LOOP VECTORIZED" "vect" { target { vect_perm && vect_element_align } } } } */
diff --git a/gcc/testsuite/gcc.target/aarch64/_Float16_1.c b/gcc/testsuite/gcc.target/aarch64/_Float16_1.c
index 320f154acf2..00c1a81cf7f 100644
--- a/gcc/testsuite/gcc.target/aarch64/_Float16_1.c
+++ b/gcc/testsuite/gcc.target/aarch64/_Float16_1.c
@@ -1,5 +1,6 @@
/* { dg-do compile } */
/* { dg-options "-O3 -march=armv8.2-a+nofp16" } */
+/* { dg-skip-if "" { *-*-* } { "-mcpu=*" } { "" } } */
#pragma GCC target ("arch=armv8.2-a+nofp16")
diff --git a/gcc/testsuite/gcc.target/aarch64/_Float16_2.c b/gcc/testsuite/gcc.target/aarch64/_Float16_2.c
index 8b2aa1e784c..061606e0b55 100644
--- a/gcc/testsuite/gcc.target/aarch64/_Float16_2.c
+++ b/gcc/testsuite/gcc.target/aarch64/_Float16_2.c
@@ -1,5 +1,6 @@
/* { dg-do compile } */
/* { dg-options "-O3 -march=armv8.2-a+nofp16 -fpermitted-flt-eval-methods=c11" } */
+/* { dg-skip-if "" { *-*-* } { "-mcpu=*" } { "" } } */
#pragma GCC target ("arch=armv8.2-a+nofp16")
diff --git a/gcc/testsuite/gcc.target/aarch64/_Float16_3.c b/gcc/testsuite/gcc.target/aarch64/_Float16_3.c
index 2d202503850..92d6dd9647d 100644
--- a/gcc/testsuite/gcc.target/aarch64/_Float16_3.c
+++ b/gcc/testsuite/gcc.target/aarch64/_Float16_3.c
@@ -1,5 +1,6 @@
/* { dg-do compile } */
/* { dg-options "-O3 -march=armv8.2-a+nofp16 -std=c11 -ffp-contract=fast" } */
+/* { dg-skip-if "" { *-*-* } { "-mcpu=*" } { "" } } */
#pragma GCC target ("arch=armv8.2-a+nofp16")
diff --git a/gcc/testsuite/gcc.target/aarch64/atomic_cmp_exchange_zero_reg_1.c b/gcc/testsuite/gcc.target/aarch64/atomic_cmp_exchange_zero_reg_1.c
index 15606b68990..f2a21ddf2e1 100644
--- a/gcc/testsuite/gcc.target/aarch64/atomic_cmp_exchange_zero_reg_1.c
+++ b/gcc/testsuite/gcc.target/aarch64/atomic_cmp_exchange_zero_reg_1.c
@@ -1,5 +1,6 @@
/* { dg-do compile } */
-/* { dg-options "-O2" } */
+/* { dg-options "-O2 -march=armv8-a+nolse" } */
+/* { dg-skip-if "" { *-*-* } { "-mcpu=*" } { "" } } */
int
foo (int *a)
diff --git a/gcc/testsuite/gcc.target/aarch64/atomic_cmp_exchange_zero_strong_1.c b/gcc/testsuite/gcc.target/aarch64/atomic_cmp_exchange_zero_strong_1.c
index b14a7c29437..8d2ae67dfbe 100644
--- a/gcc/testsuite/gcc.target/aarch64/atomic_cmp_exchange_zero_strong_1.c
+++ b/gcc/testsuite/gcc.target/aarch64/atomic_cmp_exchange_zero_strong_1.c
@@ -1,5 +1,6 @@
/* { dg-do compile } */
-/* { dg-options "-O2" } */
+/* { dg-options "-O2 -march=armv8-a+nolse" } */
+/* { dg-skip-if "" { *-*-* } { "-mcpu=*" } { "" } } */
int
foo (int *a)
diff --git a/gcc/testsuite/gcc.target/aarch64/target_attr_1.c b/gcc/testsuite/gcc.target/aarch64/target_attr_1.c
index 0527d0c3d61..4a3a1ee233a 100644
--- a/gcc/testsuite/gcc.target/aarch64/target_attr_1.c
+++ b/gcc/testsuite/gcc.target/aarch64/target_attr_1.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O2 -mcpu=thunderx -dA" } */
+/* { dg-options "-O2 -mcpu=thunderx -march=armv8-a -dA" } */
/* Test that cpu attribute overrides the command-line -mcpu. */
diff --git a/gcc/testsuite/gcc.target/aarch64/target_attr_10.c b/gcc/testsuite/gcc.target/aarch64/target_attr_10.c
index 6d0577178f0..18499047112 100644
--- a/gcc/testsuite/gcc.target/aarch64/target_attr_10.c
+++ b/gcc/testsuite/gcc.target/aarch64/target_attr_10.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O2 -march=armv8-a+simd" } */
+/* { dg-options "-O2 -march=armv8-a+simd -mcpu=generic" } */
/* Using a SIMD intrinsic from a function tagged with nosimd should fail
due to inlining rules. */
diff --git a/gcc/testsuite/gcc.target/aarch64/target_attr_13.c b/gcc/testsuite/gcc.target/aarch64/target_attr_13.c
index 0f81e9aa587..d5bee3a7b90 100644
--- a/gcc/testsuite/gcc.target/aarch64/target_attr_13.c
+++ b/gcc/testsuite/gcc.target/aarch64/target_attr_13.c
@@ -1,5 +1,5 @@
/* { dg-do assemble } */
-/* { dg-options "-O2 -march=armv8-a+crc+crypto" } */
+/* { dg-options "-O2 -march=armv8-a+crc+crypto -mcpu=generic" } */
#include "arm_acle.h"
diff --git a/gcc/testsuite/gcc.target/aarch64/target_attr_15.c b/gcc/testsuite/gcc.target/aarch64/target_attr_15.c
index 2d8c7b955ce..108b372e4cc 100644
--- a/gcc/testsuite/gcc.target/aarch64/target_attr_15.c
+++ b/gcc/testsuite/gcc.target/aarch64/target_attr_15.c
@@ -1,5 +1,5 @@
/* { dg-do assemble } */
-/* { dg-options "-march=armv8-a+crypto -save-temps" } */
+/* { dg-options "-march=armv8-a+crypto -mcpu=generic -save-temps" } */
/* Check that "+nothing" clears the ISA flags. */
diff --git a/gcc/testsuite/gcc.target/aarch64/target_attr_2.c b/gcc/testsuite/gcc.target/aarch64/target_attr_2.c
index 39bb6e7dd36..f84342d889f 100644
--- a/gcc/testsuite/gcc.target/aarch64/target_attr_2.c
+++ b/gcc/testsuite/gcc.target/aarch64/target_attr_2.c
@@ -1,5 +1,5 @@
/* { dg-do assemble } */
-/* { dg-options "-O2 -mcpu=cortex-a57 -ftree-vectorize -fdump-tree-vect-all" } */
+/* { dg-options "-O2 -mcpu=cortex-a57 -march=armv8-a -ftree-vectorize -fdump-tree-vect-all" } */
/* The various ways to turn off simd availability should
turn off vectorization. */
diff --git a/gcc/testsuite/gcc.target/aarch64/target_attr_3.c b/gcc/testsuite/gcc.target/aarch64/target_attr_3.c
index 9f9c27654f6..eacec5a6552 100644
--- a/gcc/testsuite/gcc.target/aarch64/target_attr_3.c
+++ b/gcc/testsuite/gcc.target/aarch64/target_attr_3.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O2 -mno-fix-cortex-a53-835769 -save-temps" } */
+/* { dg-options "-O2 -mno-fix-cortex-a53-835769 -march=armv8-a -mcpu=generic -save-temps" } */
/* Check that the attribute overrides the command line option
and the fix is applied once. */
diff --git a/gcc/testsuite/gcc.target/aarch64/target_attr_4.c b/gcc/testsuite/gcc.target/aarch64/target_attr_4.c
index d98ba42303f..e0114084800 100644
--- a/gcc/testsuite/gcc.target/aarch64/target_attr_4.c
+++ b/gcc/testsuite/gcc.target/aarch64/target_attr_4.c
@@ -1,5 +1,5 @@
/* { dg-do assemble } */
-/* { dg-options "-O2 -march=armv8-a+nocrc -save-temps" } */
+/* { dg-options "-O2 -march=armv8-a+nocrc -mcpu=generic -save-temps" } */
#include "arm_acle.h"
diff --git a/gcc/testsuite/gcc.target/aarch64/target_attr_7.c b/gcc/testsuite/gcc.target/aarch64/target_attr_7.c
index 818d327705f..6067ffed30e 100644
--- a/gcc/testsuite/gcc.target/aarch64/target_attr_7.c
+++ b/gcc/testsuite/gcc.target/aarch64/target_attr_7.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O2 -mcpu=thunderx -dA" } */
+/* { dg-options "-O2 -mcpu=thunderx -march=armv8-a -dA" } */
/* Make sure that #pragma overrides command line option and
target attribute overrides the pragma. */
diff --git a/gcc/testsuite/gcc.target/aarch64/target_attr_crypto_ice_1.c b/gcc/testsuite/gcc.target/aarch64/target_attr_crypto_ice_1.c
index 42f14c461a2..c74cc900f98 100644
--- a/gcc/testsuite/gcc.target/aarch64/target_attr_crypto_ice_1.c
+++ b/gcc/testsuite/gcc.target/aarch64/target_attr_crypto_ice_1.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O2 -mcpu=thunderx+nofp" } */
+/* { dg-options "-O2 -mcpu=thunderx+nofp -march=armv8-a" } */
#include "arm_neon.h"
diff --git a/gcc/testsuite/gcc.target/aarch64/target_attr_crypto_ice_2.c b/gcc/testsuite/gcc.target/aarch64/target_attr_crypto_ice_2.c
index d6e7b681832..d0a62b83351 100644
--- a/gcc/testsuite/gcc.target/aarch64/target_attr_crypto_ice_2.c
+++ b/gcc/testsuite/gcc.target/aarch64/target_attr_crypto_ice_2.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O2 -mcpu=thunderx+nofp" } */
+/* { dg-options "-O2 -mcpu=thunderx+nofp -march=armv8-a" } */
/* Make sure that we don't ICE when dealing with vector parameters
in a simd-tagged function within a non-simd translation unit. */
diff --git a/gcc/testsuite/gcc.target/aarch64/vect-xorsign_exec.c b/gcc/testsuite/gcc.target/aarch64/vect-xorsign_exec.c
new file mode 100644
index 00000000000..cfa22115831
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/vect-xorsign_exec.c
@@ -0,0 +1,58 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-details --save-temps" } */
+
+extern void abort ();
+
+#define N 16
+float a[N] = {-0.1f, -3.2f, -6.3f, -9.4f,
+ -12.5f, -15.6f, -18.7f, -21.8f,
+ 24.9f, 27.1f, 30.2f, 33.3f,
+ 36.4f, 39.5f, 42.6f, 45.7f};
+float b[N] = {-1.2f, 3.4f, -5.6f, 7.8f,
+ -9.0f, 1.0f, -2.0f, 3.0f,
+ -4.0f, -5.0f, 6.0f, 7.0f,
+ -8.0f, -9.0f, 10.0f, 11.0f};
+float r[N];
+
+double ad[N] = {-0.1d, -3.2d, -6.3d, -9.4d,
+ -12.5d, -15.6d, -18.7d, -21.8d,
+ 24.9d, 27.1d, 30.2d, 33.3d,
+ 36.4d, 39.5d, 42.6d, 45.7d};
+double bd[N] = {-1.2d, 3.4d, -5.6d, 7.8d,
+ -9.0d, 1.0d, -2.0d, 3.0d,
+ -4.0d, -5.0d, 6.0d, 7.0d,
+ -8.0d, -9.0d, 10.0d, 11.0d};
+double rd[N];
+
+int
+main (void)
+{
+ int i;
+
+ for (i = 0; i < N; i++)
+ r[i] = a[i] * __builtin_copysignf (1.0f, b[i]);
+
+ /* check results: */
+ for (i = 0; i < N; i++)
+ if (r[i] != a[i] * __builtin_copysignf (1.0f, b[i]))
+ abort ();
+
+ for (i = 0; i < N; i++)
+ rd[i] = ad[i] * __builtin_copysign (1.0d, bd[i]);
+
+ /* check results: */
+ for (i = 0; i < N; i++)
+ if (rd[i] != ad[i] * __builtin_copysign (1.0d, bd[i]))
+ abort ();
+
+
+ return 0;
+}
+
+/* { dg-final { scan-tree-dump-times "vectorized 2 loops" 1 "vect" } } */
+/* { dg-final { scan-assembler "\[ \t\]?eor\[ \t\]?" } } */
+/* { dg-final { scan-assembler "\[ \t\]?and\[ \t\]?" } } */
+/* { dg-final { scan-assembler-not "copysign" } } */
+/* { dg-final { scan-assembler-not "\[ \t\]?orr\[ \t\]?" } } */
+/* { dg-final { scan-assembler-not "\[ \t\]?fmul\[ \t\]?" } } */
+
diff --git a/gcc/testsuite/gcc.target/aarch64/xorsign.c b/gcc/testsuite/gcc.target/aarch64/xorsign.c
new file mode 100644
index 00000000000..22c5829449d
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/xorsign.c
@@ -0,0 +1,86 @@
+/* { dg-do compile } */
+/* { dg-options "-O3" } */
+
+double
+check_d_pos (double x, double y)
+{
+ return x * __builtin_copysign (1.0, y);
+}
+
+float
+check_f_pos (float x, float y)
+{
+ return x * __builtin_copysignf (1.0f, y);
+}
+
+long double
+check_l_pos (long double x, long double y)
+{
+ return x * __builtin_copysignl (1.0, y);
+}
+
+/* --------------- */
+
+double
+check_d_neg (double x, double y)
+{
+ return x * __builtin_copysign (-1.0, y);
+}
+
+float
+check_f_neg (float x, float y)
+{
+ return x * __builtin_copysignf (-1.0f, y);
+}
+
+long double
+check_l_neg (long double x, long double y)
+{
+ return x * __builtin_copysignl (-1.0, y);
+}
+
+/* --------------- */
+
+double
+check_d_pos_rev (double x, double y)
+{
+ return __builtin_copysign (1.0, y) * x;
+}
+
+float
+check_f_pos_rev (float x, float y)
+{
+ return __builtin_copysignf (1.0f, y) * x;
+}
+
+long double
+check_l_pos_rev (long double x, long double y)
+{
+ return __builtin_copysignl (1.0, y) * x;
+}
+
+/* --------------- */
+
+double
+check_d_neg_rev (double x, double y)
+{
+ return __builtin_copysign (-1.0, y) * x;
+}
+
+float
+check_f_neg_rev (float x, float y)
+{
+ return __builtin_copysignf (-1.0f, y) * x;
+}
+
+long double
+check_l_neg_rev (long double x, long double y)
+{
+ return __builtin_copysignl (-1.0, y) * x;
+}
+
+/* { dg-final { scan-assembler "\[ \t\]?eor\[ \t\]?" } } */
+/* { dg-final { scan-assembler "\[ \t\]?and\[ \t\]?" } } */
+/* { dg-final { scan-assembler-not "copysign" } } */
+/* { dg-final { scan-assembler-not "\[ \t\]?orr\[ \t\]?" } } */
+/* { dg-final { scan-assembler-not "\[ \t\]?fmul\[ \t\]?" } } */
diff --git a/gcc/testsuite/gcc.target/aarch64/xorsign_exec.c b/gcc/testsuite/gcc.target/aarch64/xorsign_exec.c
new file mode 100644
index 00000000000..64bf8044cbd
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/xorsign_exec.c
@@ -0,0 +1,26 @@
+/* { dg-do run } */
+/* { dg-options "-O -ffast-math" } */
+
+#include <math.h>
+
+extern void abort(void);
+
+static double x = 2.0;
+static float y = 2.0;
+
+int main()
+{
+ if ((2.5 * __builtin_copysign(1.0d, x)) != 2.5)
+ abort();
+
+ if ((2.5 * __builtin_copysign(1.0f, y)) != 2.5)
+ abort();
+
+ if ((2.5 * __builtin_copysignf(1.0d, -x)) != -2.5)
+ abort();
+
+ if ((2.5 * __builtin_copysignf(1.0f, -y)) != -2.5)
+ abort();
+
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512-check.h b/gcc/testsuite/gcc.target/i386/avx512-check.h
new file mode 100644
index 00000000000..bfe14960100
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512-check.h
@@ -0,0 +1,113 @@
+#include <stdlib.h>
+#include "cpuid.h"
+#include "m512-check.h"
+#include "avx512f-os-support.h"
+
+#ifndef DO_TEST
+#define DO_TEST do_test
+#ifdef AVX512VL
+static void test_256 (void);
+static void test_128 (void);
+#else
+static void test_512 (void);
+#endif
+
+__attribute__ ((noinline))
+static void
+do_test (void)
+{
+#ifdef AVX512VL
+ test_256 ();
+ test_128 ();
+#else
+ test_512 ();
+#endif
+}
+#endif
+
+int
+main ()
+{
+ unsigned int eax, ebx, ecx, edx;
+
+ if (!__get_cpuid (1, &eax, &ebx, &ecx, &edx))
+ goto skipped;
+
+ /* Run AVX512F test only if host has AVX512F support. */
+ if (!(ecx & bit_OSXSAVE))
+ goto skipped;
+
+ if (__get_cpuid_max (0, NULL) < 7)
+ goto skipped;
+
+ __cpuid_count (7, 0, eax, ebx, ecx, edx);
+
+ if (!(ebx & bit_AVX512F))
+ goto skipped;
+
+#ifdef AVX512VL
+ if (!(ebx & bit_AVX512VL))
+ goto skipped;
+#endif
+
+#ifdef AVX512ER
+ if (!(ebx & bit_AVX512ER))
+ goto skipped;
+#endif
+
+#ifdef AVX512CD
+ if (!(ebx & bit_AVX512CD))
+ goto skipped;
+#endif
+
+#ifdef AVX512DQ
+ if (!(ebx & bit_AVX512DQ))
+ goto skipped;
+#endif
+
+#ifdef AVX512BW
+ if (!(ebx & bit_AVX512BW))
+ goto skipped;
+#endif
+
+#ifdef AVX512IFMA
+ if (!(ebx & bit_AVX512IFMA))
+ goto skipped;
+#endif
+
+#ifdef AVX512VBMI
+ if (!(ecx & bit_AVX512VBMI))
+ goto skipped;
+#endif
+
+#ifdef AVX5124FMAPS
+ if (!(edx & bit_AVX5124FMAPS))
+ goto skipped;
+#endif
+
+#ifdef AVX5124VNNIW
+ if (!(edx & bit_AVX5124VNNIW))
+ goto skipped;
+#endif
+
+#ifdef AVX512VPOPCNTDQ
+ if (!(ecx & bit_AVX512VPOPCNTDQ))
+ goto skipped;
+#endif
+
+ if (!avx512f_os_support ())
+ goto skipped;
+
+ DO_TEST ();
+
+#ifdef DEBUG
+ printf ("PASSED\n");
+#endif
+ return 0;
+
+skipped:
+#ifdef DEBUG
+ printf ("SKIPPED\n");
+#endif
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx5124fmaps-check.h b/gcc/testsuite/gcc.target/i386/avx5124fmaps-check.h
deleted file mode 100644
index 13ea70b0a8d..00000000000
--- a/gcc/testsuite/gcc.target/i386/avx5124fmaps-check.h
+++ /dev/null
@@ -1,47 +0,0 @@
-#include <stdlib.h>
-#include "cpuid.h"
-#include "m512-check.h"
-#include "avx512f-os-support.h"
-
-static void avx5124fmaps_test (void);
-
-static void __attribute__ ((noinline)) do_test (void)
-{
- avx5124fmaps_test ();
-}
-
-int
-main ()
-{
- unsigned int eax, ebx, ecx, edx;
-
- if (!__get_cpuid (1, &eax, &ebx, &ecx, &edx))
- return 0;
-
- /* Run AVX512_4FMAPS test only if host has the support. */
- if ((ecx & bit_OSXSAVE) == (bit_OSXSAVE))
- {
- if (__get_cpuid_max (0, NULL) < 7)
- return 0;
-
- __cpuid_count (7, 0, eax, ebx, ecx, edx);
-
- if ((avx512f_os_support ()) && ((edx & bit_AVX5124FMAPS) == bit_AVX5124FMAPS))
- {
- do_test ();
-#ifdef DEBUG
- printf ("PASSED\n");
-#endif
- return 0;
- }
-#ifdef DEBUG
- printf ("SKIPPED\n");
-#endif
- }
-#ifdef DEBUG
- else
- printf ("SKIPPED\n");
-#endif
-
- return 0;
-}
diff --git a/gcc/testsuite/gcc.target/i386/avx5124vnniw-check.h b/gcc/testsuite/gcc.target/i386/avx5124vnniw-check.h
deleted file mode 100644
index 27d35a57490..00000000000
--- a/gcc/testsuite/gcc.target/i386/avx5124vnniw-check.h
+++ /dev/null
@@ -1,47 +0,0 @@
-#include <stdlib.h>
-#include "cpuid.h"
-#include "m512-check.h"
-#include "avx512f-os-support.h"
-
-static void avx5124vnniw_test (void);
-
-static void __attribute__ ((noinline)) do_test (void)
-{
- avx5124vnniw_test ();
-}
-
-int
-main ()
-{
- unsigned int eax, ebx, ecx, edx;
-
- if (!__get_cpuid (1, &eax, &ebx, &ecx, &edx))
- return 0;
-
- /* Run AVX512_4VNNIW test only if host has the support. */
- if ((ecx & bit_OSXSAVE) == (bit_OSXSAVE))
- {
- if (__get_cpuid_max (0, NULL) < 7)
- return 0;
-
- __cpuid_count (7, 0, eax, ebx, ecx, edx);
-
- if ((avx512f_os_support ()) && ((edx & bit_AVX5124VNNIW) == bit_AVX5124VNNIW))
- {
- do_test ();
-#ifdef DEBUG
- printf ("PASSED\n");
-#endif
- return 0;
- }
-#ifdef DEBUG
- printf ("SKIPPED\n");
-#endif
- }
-#ifdef DEBUG
- else
- printf ("SKIPPED\n");
-#endif
-
- return 0;
-}
diff --git a/gcc/testsuite/gcc.target/i386/avx512bw-check.h b/gcc/testsuite/gcc.target/i386/avx512bw-check.h
index d5288aaabd4..899a006363e 100644
--- a/gcc/testsuite/gcc.target/i386/avx512bw-check.h
+++ b/gcc/testsuite/gcc.target/i386/avx512bw-check.h
@@ -1,47 +1,3 @@
-#include <stdlib.h>
-#include "cpuid.h"
-#include "m512-check.h"
-#include "avx512f-os-support.h"
-
-static void avx512bw_test (void);
-
-static void __attribute__ ((noinline)) do_test (void)
-{
- avx512bw_test ();
-}
-
-int
-main ()
-{
- unsigned int eax, ebx, ecx, edx;
-
- if (!__get_cpuid (1, &eax, &ebx, &ecx, &edx))
- return 0;
-
- /* Run AVX512BW test only if host has AVX512BW support. */
- if (ecx & bit_OSXSAVE)
- {
- if (__get_cpuid_max (0, NULL) < 7)
- return 0;
-
- __cpuid_count (7, 0, eax, ebx, ecx, edx);
-
- if ((ebx & bit_AVX512BW) && avx512f_os_support ())
- {
- do_test ();
-#ifdef DEBUG
- printf ("PASSED\n");
-#endif
- return 0;
- }
-#ifdef DEBUG
- printf ("SKIPPED\n");
-#endif
- }
-#ifdef DEBUG
- else
- printf ("SKIPPED\n");
-#endif
-
- return 0;
-}
+#define AVX512BW
+#define avx512bw_test test_512
+#include "avx512-check.h"
diff --git a/gcc/testsuite/gcc.target/i386/avx512cd-check.h b/gcc/testsuite/gcc.target/i386/avx512cd-check.h
deleted file mode 100644
index fd0b9eb05d6..00000000000
--- a/gcc/testsuite/gcc.target/i386/avx512cd-check.h
+++ /dev/null
@@ -1,46 +0,0 @@
-#include <stdlib.h>
-#include "cpuid.h"
-#include "m512-check.h"
-#include "avx512f-os-support.h"
-
-static void avx512cd_test (void);
-
-static void __attribute__ ((noinline)) do_test (void)
-{
- avx512cd_test ();
-}
-
-int
-main ()
-{
- unsigned int eax, ebx, ecx, edx;
-
- if (!__get_cpuid (1, &eax, &ebx, &ecx, &edx))
- return 0;
-
- if (ecx & bit_OSXSAVE)
- {
- if (__get_cpuid_max (0, NULL) < 7)
- return 0;
-
- __cpuid_count (7, 0, eax, ebx, ecx, edx);
-
- if ((ebx & bit_AVX512CD) && avx512f_os_support ())
- {
- do_test ();
-#ifdef DEBUG
- printf ("PASSED\n");
-#endif
- return 0;
- }
-#ifdef DEBUG
- printf ("SKIPPED\n");
-#endif
- }
-#ifdef DEBUG
- else
- printf ("SKIPPED\n");
-#endif
-
- return 0;
-}
diff --git a/gcc/testsuite/gcc.target/i386/avx512dq-check.h b/gcc/testsuite/gcc.target/i386/avx512dq-check.h
index 7955f48e912..1b728836731 100644
--- a/gcc/testsuite/gcc.target/i386/avx512dq-check.h
+++ b/gcc/testsuite/gcc.target/i386/avx512dq-check.h
@@ -1,47 +1,3 @@
-#include <stdlib.h>
-#include "cpuid.h"
-#include "m512-check.h"
-#include "avx512f-os-support.h"
-
-static void avx512dq_test (void);
-
-static void __attribute__ ((noinline)) do_test (void)
-{
- avx512dq_test ();
-}
-
-int
-main ()
-{
- unsigned int eax, ebx, ecx, edx;
-
- if (!__get_cpuid (1, &eax, &ebx, &ecx, &edx))
- return 0;
-
- /* Run AVX512DQ test only if host has AVX512DQ support. */
- if (ecx & bit_OSXSAVE)
- {
- if (__get_cpuid_max (0, NULL) < 7)
- return 0;
-
- __cpuid_count (7, 0, eax, ebx, ecx, edx);
-
- if ((ebx & bit_AVX512DQ) && avx512f_os_support ())
- {
- do_test ();
-#ifdef DEBUG
- printf ("PASSED\n");
-#endif
- return 0;
- }
-#ifdef DEBUG
- printf ("SKIPPED\n");
-#endif
- }
-#ifdef DEBUG
- else
- printf ("SKIPPED\n");
-#endif
-
- return 0;
-}
+#define AVX512DQ
+#define avx512dq_test test_512
+#include "avx512-check.h"
diff --git a/gcc/testsuite/gcc.target/i386/avx512er-check.h b/gcc/testsuite/gcc.target/i386/avx512er-check.h
index 06fc18a098b..eb44c2f7ade 100644
--- a/gcc/testsuite/gcc.target/i386/avx512er-check.h
+++ b/gcc/testsuite/gcc.target/i386/avx512er-check.h
@@ -1,46 +1,3 @@
-#include <stdlib.h>
-#include "cpuid.h"
-#include "m512-check.h"
-#include "avx512f-os-support.h"
-
-static void avx512er_test (void);
-
-static void __attribute__ ((noinline)) do_test (void)
-{
- avx512er_test ();
-}
-
-int
-main ()
-{
- unsigned int eax, ebx, ecx, edx;
-
- if (!__get_cpuid (1, &eax, &ebx, &ecx, &edx))
- return 0;
-
- if (ecx & bit_OSXSAVE)
- {
- if (__get_cpuid_max (0, NULL) < 7)
- return 0;
-
- __cpuid_count (7, 0, eax, ebx, ecx, edx);
-
- if ((ebx & bit_AVX512ER) && avx512f_os_support ())
- {
- do_test ();
-#ifdef DEBUG
- printf ("PASSED\n");
-#endif
- return 0;
- }
-#ifdef DEBUG
- printf ("SKIPPED\n");
-#endif
- }
-#ifdef DEBUG
- else
- printf ("SKIPPED\n");
-#endif
-
- return 0;
-}
+#define AVX512ER
+#define avx512er_test test_512
+#include "avx512f-helper.h"
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-check.h b/gcc/testsuite/gcc.target/i386/avx512f-check.h
index 811184b2fd7..b3bdd9a05c4 100644
--- a/gcc/testsuite/gcc.target/i386/avx512f-check.h
+++ b/gcc/testsuite/gcc.target/i386/avx512f-check.h
@@ -1,47 +1,2 @@
-#include <stdlib.h>
-#include "cpuid.h"
-#include "m512-check.h"
-#include "avx512f-os-support.h"
-
-static void avx512f_test (void);
-
-static void __attribute__ ((noinline)) do_test (void)
-{
- avx512f_test ();
-}
-
-int
-main ()
-{
- unsigned int eax, ebx, ecx, edx;
-
- if (!__get_cpuid (1, &eax, &ebx, &ecx, &edx))
- return 0;
-
- /* Run AVX512F test only if host has AVX512F support. */
- if (ecx & bit_OSXSAVE)
- {
- if (__get_cpuid_max (0, NULL) < 7)
- return 0;
-
- __cpuid_count (7, 0, eax, ebx, ecx, edx);
-
- if ((ebx & bit_AVX512F) && avx512f_os_support ())
- {
- do_test ();
-#ifdef DEBUG
- printf ("PASSED\n");
-#endif
- return 0;
- }
-#ifdef DEBUG
- printf ("SKIPPED\n");
-#endif
- }
-#ifdef DEBUG
- else
- printf ("SKIPPED\n");
-#endif
-
- return 0;
-}
+#define avx512f_test test_512
+#include "avx512f-helper.h"
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-helper.h b/gcc/testsuite/gcc.target/i386/avx512f-helper.h
index ef4661a3453..72982f95aed 100644
--- a/gcc/testsuite/gcc.target/i386/avx512f-helper.h
+++ b/gcc/testsuite/gcc.target/i386/avx512f-helper.h
@@ -8,29 +8,7 @@
#ifndef AVX512F_HELPER_INCLUDED
#define AVX512F_HELPER_INCLUDED
-#if defined (AVX512F) && !defined (AVX512VL)
-#include "avx512f-check.h"
-#elif defined (AVX512ER) && !defined (AVX512VL)
-#include "avx512er-check.h"
-#elif defined (AVX512CD) && !defined (AVX512VL)
-#include "avx512cd-check.h"
-#elif defined (AVX512DQ) && !defined (AVX512VL)
-#include "avx512dq-check.h"
-#elif defined (AVX512BW) && !defined (AVX512VL)
-#include "avx512bw-check.h"
-#elif defined (AVX512IFMA) && !defined (AVX512VL)
-#include "avx512ifma-check.h"
-#elif defined (AVX512VBMI) && !defined (AVX512VL)
-#include "avx512vbmi-check.h"
-#elif defined (AVX5124FMAPS) && !defined (AVX512VL)
-#include "avx5124fmaps-check.h"
-#elif defined (AVX5124VNNIW) && !defined (AVX512VL)
-#include "avx5124vnniw-check.h"
-#elif defined (AVX512VPOPCNTDQ) && !defined (AVX512VL)
-#include "avx512vpopcntdq-check.h"
-#elif defined (AVX512VL)
-#include "avx512vl-check.h"
-#endif
+#include "avx512-check.h"
/* Macros expansion. */
#define CONCAT(a,b,c) a ## b ## c
@@ -112,46 +90,6 @@ MAKE_MASK_ZERO(i_uq, unsigned long long)
#ifndef AVX512VL
#define AVX512F_LEN 512
#define AVX512F_LEN_HALF 256
-void test_512 ();
-#endif
-
-void test_512 ();
-void test_256 ();
-void test_128 ();
-
-#if defined (AVX512F) && !defined (AVX512VL)
-void
-avx512f_test (void) { test_512 (); }
-#elif defined (AVX512CD) && !defined (AVX512VL)
-void
-avx512cd_test (void) { test_512 (); }
-#elif defined (AVX512ER) && !defined (AVX512VL)
-void
-avx512er_test (void) { test_512 (); }
-#elif defined (AVX512DQ) && !defined (AVX512VL)
-void
-avx512dq_test (void) { test_512 (); }
-#elif defined (AVX512BW) && !defined (AVX512VL)
-void
-avx512bw_test (void) { test_512 (); }
-#elif defined (AVX512IFMA) && !defined (AVX512VL)
-void
-avx512ifma_test (void) { test_512 (); }
-#elif defined (AVX512VBMI) && !defined (AVX512VL)
-void
-avx512vbmi_test (void) { test_512 (); }
-#elif defined (AVX5124FMAPS) && !defined (AVX512VL)
-void
-avx5124fmaps_test (void) { test_512 (); }
-#elif defined (AVX5124VNNIW) && !defined (AVX512VL)
-void
-avx5124vnniw_test (void) { test_512 (); }
-#elif defined (AVX512VPOPCNTDQ) && !defined (AVX512VL)
-void
-avx512vpopcntdq_test (void) { test_512 (); }
-#elif defined (AVX512VL)
-void
-avx512vl_test (void) { test_256 (); test_128 (); }
#endif
#endif /* AVX512F_HELPER_INCLUDED */
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-pr71559.c b/gcc/testsuite/gcc.target/i386/avx512f-pr71559.c
index d78d86ac2f8..43dc236c410 100644
--- a/gcc/testsuite/gcc.target/i386/avx512f-pr71559.c
+++ b/gcc/testsuite/gcc.target/i386/avx512f-pr71559.c
@@ -3,6 +3,7 @@
/* { dg-options "-O2 -ftree-vectorize -mavx512f" } */
#include "avx512f-check.h"
+#undef TEST
#define PR71559_TEST avx512f_test
#include "sse2-pr71559.c"
diff --git a/gcc/testsuite/gcc.target/i386/avx512ifma-check.h b/gcc/testsuite/gcc.target/i386/avx512ifma-check.h
deleted file mode 100644
index b90a4d55103..00000000000
--- a/gcc/testsuite/gcc.target/i386/avx512ifma-check.h
+++ /dev/null
@@ -1,46 +0,0 @@
-#include <stdlib.h>
-#include "cpuid.h"
-#include "m512-check.h"
-#include "avx512f-os-support.h"
-
-static void avx512ifma_test (void);
-
-static void __attribute__ ((noinline)) do_test (void)
-{
- avx512ifma_test ();
-}
-
-int
-main ()
-{
- unsigned int eax, ebx, ecx, edx;
-
- if (!__get_cpuid (1, &eax, &ebx, &ecx, &edx))
- return 0;
-
- if (ecx & bit_OSXSAVE)
- {
- if (__get_cpuid_max (0, NULL) < 7)
- return 0;
-
- __cpuid_count (7, 0, eax, ebx, ecx, edx);
-
- if ((ebx & bit_AVX512IFMA) && avx512f_os_support ())
- {
- do_test ();
-#ifdef DEBUG
- printf ("PASSED\n");
-#endif
- return 0;
- }
-#ifdef DEBUG
- printf ("SKIPPED\n");
-#endif
- }
-#ifdef DEBUG
- else
- printf ("SKIPPED\n");
-#endif
-
- return 0;
-}
diff --git a/gcc/testsuite/gcc.target/i386/avx512vbmi-check.h b/gcc/testsuite/gcc.target/i386/avx512vbmi-check.h
deleted file mode 100644
index 2c1f6259401..00000000000
--- a/gcc/testsuite/gcc.target/i386/avx512vbmi-check.h
+++ /dev/null
@@ -1,46 +0,0 @@
-#include <stdlib.h>
-#include "cpuid.h"
-#include "m512-check.h"
-#include "avx512f-os-support.h"
-
-static void avx512vbmi_test (void);
-
-static void __attribute__ ((noinline)) do_test (void)
-{
- avx512vbmi_test ();
-}
-
-int
-main ()
-{
- unsigned int eax, ebx, ecx, edx;
-
- if (!__get_cpuid (1, &eax, &ebx, &ecx, &edx))
- return 0;
-
- if (ecx & bit_OSXSAVE)
- {
- if (__get_cpuid_max (0, NULL) < 7)
- return 0;
-
- __cpuid_count (7, 0, eax, ebx, ecx, edx);
-
- if ((ecx & bit_AVX512VBMI) && avx512f_os_support ())
- {
- do_test ();
-#ifdef DEBUG
- printf ("PASSED\n");
-#endif
- return 0;
- }
-#ifdef DEBUG
- printf ("SKIPPED\n");
-#endif
- }
-#ifdef DEBUG
- else
- printf ("SKIPPED\n");
-#endif
-
- return 0;
-}
diff --git a/gcc/testsuite/gcc.target/i386/avx512vl-check.h b/gcc/testsuite/gcc.target/i386/avx512vl-check.h
index 29d984d03dd..9d02cc82c46 100644
--- a/gcc/testsuite/gcc.target/i386/avx512vl-check.h
+++ b/gcc/testsuite/gcc.target/i386/avx512vl-check.h
@@ -1,47 +1,4 @@
-#include <stdlib.h>
-#include "cpuid.h"
-#include "m512-check.h"
-#include "avx512f-os-support.h"
-
-static void avx512vl_test (void);
-
-static void __attribute__ ((noinline)) do_test (void)
-{
- avx512vl_test ();
-}
-
-int
-main ()
-{
- unsigned int eax, ebx, ecx, edx;
-
- if (!__get_cpuid (1, &eax, &ebx, &ecx, &edx))
- return 0;
-
- /* Run avx512vl test only if host has avx512vl support. */
- if (ecx & bit_OSXSAVE)
- {
- if (__get_cpuid_max (0, NULL) < 7)
- return 0;
-
- __cpuid_count (7, 0, eax, ebx, ecx, edx);
-
- if ((ebx & bit_AVX512VL) && avx512f_os_support ())
- {
- do_test ();
-#ifdef DEBUG
- printf ("PASSED\n");
-#endif
- return 0;
- }
-#ifdef DEBUG
- printf ("SKIPPED\n");
-#endif
- }
-#ifdef DEBUG
- else
- printf ("SKIPPED\n");
-#endif
-
- return 0;
-}
+#define AVX512VL
+#define DO_TEST avx512vl_test
+static void DO_TEST (void);
+#include "avx512-check.h"
diff --git a/gcc/testsuite/gcc.target/i386/avx512vpopcntdq-check.h b/gcc/testsuite/gcc.target/i386/avx512vpopcntdq-check.h
deleted file mode 100644
index 179548bf8cb..00000000000
--- a/gcc/testsuite/gcc.target/i386/avx512vpopcntdq-check.h
+++ /dev/null
@@ -1,47 +0,0 @@
-#include <stdlib.h>
-#include "cpuid.h"
-#include "m512-check.h"
-#include "avx512f-os-support.h"
-
-static void avx512vpopcntdq_test (void);
-
-static void __attribute__ ((noinline)) do_test (void)
-{
- avx512vpopcntdq_test ();
-}
-
-int
-main ()
-{
- unsigned int eax, ebx, ecx, edx;
-
- if (!__get_cpuid (1, &eax, &ebx, &ecx, &edx))
- return 0;
-
- /* Run AVX512_VPOPCNTDQ test only if host has the support. */
- if ((ecx & bit_OSXSAVE) == (bit_OSXSAVE))
- {
- if (__get_cpuid_max (0, NULL) < 7)
- return 0;
-
- __cpuid_count (7, 0, eax, ebx, ecx, edx);
-
- if ((avx512f_os_support ()) && ((ecx & bit_AVX512VPOPCNTDQ) == bit_AVX512VPOPCNTDQ))
- {
- do_test ();
-#ifdef DEBUG
- printf ("PASSED\n");
-#endif
- return 0;
- }
-#ifdef DEBUG
- printf ("SKIPPED\n");
-#endif
- }
-#ifdef DEBUG
- else
- printf ("SKIPPED\n");
-#endif
-
- return 0;
-}
diff --git a/gcc/testsuite/gcc.target/i386/funcspec-56.inc b/gcc/testsuite/gcc.target/i386/funcspec-56.inc
index 14abf42b887..746c9cfc4e1 100644
--- a/gcc/testsuite/gcc.target/i386/funcspec-56.inc
+++ b/gcc/testsuite/gcc.target/i386/funcspec-56.inc
@@ -99,7 +99,7 @@ extern void test_no_sha (void) __attribute__((__target__("no-sha")));
extern void test_no_pclmul (void) __attribute__((__target__("no-pclmul")));
extern void test_no_sse2 (void) __attribute__((__target__("no-sse2")));
extern void test_no_sse (void) __attribute__((__target__("no-sse")));
-extern void test_no_3dnowa (void) __attribute__((__target__("3dnowa")));
+extern void test_no_3dnowa (void) __attribute__((__target__("no-3dnowa")));
extern void test_no_3dnow (void) __attribute__((__target__("no-3dnow")));
extern void test_no_mmx (void) __attribute__((__target__("no-mmx")));
extern void test_no_rtm (void) __attribute__((__target__("no-rtm")));
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/naked-1.c b/gcc/testsuite/gcc.target/i386/naked-1.c
index 440dbe9ee7a..cf62bb1114f 100644
--- a/gcc/testsuite/gcc.target/i386/naked-1.c
+++ b/gcc/testsuite/gcc.target/i386/naked-1.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O0" } */
+/* { dg-options "-O0 -fno-pic" } */
/* Verify that __attribute__((naked)) produces a naked function
that does not use ret to return but traps at the end. */
diff --git a/gcc/testsuite/gcc.target/i386/naked-3.c b/gcc/testsuite/gcc.target/i386/naked-3.c
index 845300d6e4a..b3a17f635ee 100644
--- a/gcc/testsuite/gcc.target/i386/naked-3.c
+++ b/gcc/testsuite/gcc.target/i386/naked-3.c
@@ -1,17 +1,18 @@
/* { dg-do run { target *-*-linux* *-*-gnu* } } */
-/* { dg-options "-O2" } */
+/* { dg-options "-O0" } */
#include <unistd.h>
#include <signal.h>
#include <stdlib.h>
-int data;
-
/* Verify that naked function traps at the end. */
void
__attribute__((naked, noinline, noclone))
-naked (void)
+#ifdef __i386__
+__attribute__((regparm(1)))
+#endif
+naked (int data)
{
if (data == 0x12345678)
return;
@@ -32,8 +33,7 @@ int main ()
s.sa_flags = 0;
sigaction (SIGILL, &s, NULL);
- data = 0x12345678;
- naked ();
+ naked (0x12345678);
abort ();
}
diff --git a/gcc/testsuite/gcc.target/i386/naked-4.c b/gcc/testsuite/gcc.target/i386/naked-4.c
new file mode 100644
index 00000000000..07b32424f5f
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/naked-4.c
@@ -0,0 +1,17 @@
+/* { dg-do compile } */
+/* { dg-options "-O0" } */
+/* { dg-additional-options "-mregparm=3" { target ia32 } } */
+
+/* Verify that __attribute__((naked)) produces a naked function
+ that does not allocate stack slots for args. */
+extern void bar (int);
+
+int
+__attribute__((naked))
+foo (int a, int b, int c)
+{
+ bar (c);
+ asm volatile ("ret" :: "a" (b));
+}
+
+/* { dg-final { scan-assembler-not "%\[re\]bp" } } */
diff --git a/gcc/testsuite/gcc.target/i386/pr79793-1.c b/gcc/testsuite/gcc.target/i386/pr79793-1.c
index a382fe9c5e2..1cc67a83ba3 100644
--- a/gcc/testsuite/gcc.target/i386/pr79793-1.c
+++ b/gcc/testsuite/gcc.target/i386/pr79793-1.c
@@ -1,5 +1,5 @@
/* { dg-do compile { target { *-*-linux* && { ! ia32 } } } } */
-/* { dg-options "-O2 -mgeneral-regs-only" } */
+/* { dg-options "-O2 -mgeneral-regs-only -mtune=generic" } */
void
__attribute__ ((interrupt))
diff --git a/gcc/testsuite/gcc.target/i386/pr79793-2.c b/gcc/testsuite/gcc.target/i386/pr79793-2.c
index f6ae5aed33a..e1e6463e120 100644
--- a/gcc/testsuite/gcc.target/i386/pr79793-2.c
+++ b/gcc/testsuite/gcc.target/i386/pr79793-2.c
@@ -1,5 +1,5 @@
/* { dg-do compile { target { *-*-linux* && { ! ia32 } } } } */
-/* { dg-options "-O2 -mgeneral-regs-only" } */
+/* { dg-options "-O2 -mgeneral-regs-only -mtune=generic" } */
typedef unsigned int uword_t __attribute__ ((mode (__word__)));
diff --git a/gcc/testsuite/gcc.target/i386/pr81213.c b/gcc/testsuite/gcc.target/i386/pr81213.c
new file mode 100644
index 00000000000..13e15d5fef0
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr81213.c
@@ -0,0 +1,19 @@
+/* PR ipa/81214. */
+/* { dg-do compile } */
+/* { dg-require-ifunc "" } */
+
+__attribute__((target_clones("avx","arch=slm","arch=core-avx2","default")))
+static int
+foo ()
+{
+ return -2;
+}
+
+int main()
+{
+ return foo();
+}
+
+/* { dg-final { scan-assembler "\t.globl\tfoo\\..*\\.ifunc" } } */
+/* { dg-final { scan-assembler "foo.resolver:" } } */
+/* { dg-final { scan-assembler "foo\\..*\\.ifunc, @gnu_indirect_function" } } */
diff --git a/gcc/testsuite/gcc.target/i386/pr81639.c b/gcc/testsuite/gcc.target/i386/pr81639.c
new file mode 100644
index 00000000000..da2211532eb
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr81639.c
@@ -0,0 +1,12 @@
+/* PR target/81639 */
+/* { dg-do compile } */
+/* { dg-options "-O2" } */
+
+void b (void);
+
+void
+__attribute__ ((naked))
+a (void)
+{
+ b ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/pr81641.c b/gcc/testsuite/gcc.target/i386/pr81641.c
new file mode 100644
index 00000000000..15da9ac26ef
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr81641.c
@@ -0,0 +1,11 @@
+/* PR target/81641 */
+/* { dg-do assemble } */
+/* { dg-options "-O -masm=intel" } */
+/* { dg-require-effective-target masm_intel } */
+
+int test(void)
+{
+ int __seg_fs *f = (int __seg_fs *)16;
+ int __seg_gs *g = (int __seg_gs *)16;
+ return *f + *g;
+}
diff --git a/gcc/testsuite/gcc.target/i386/pr81644.c b/gcc/testsuite/gcc.target/i386/pr81644.c
new file mode 100644
index 00000000000..61f94a409ff
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr81644.c
@@ -0,0 +1,15 @@
+/* PR target/81644 */
+/* { dg-do compile } */
+/* { dg-options "-O2" } */
+/* { dg-additional-options "-mregparm=1" { target ia32 } } */
+
+void b (void);
+
+void
+__attribute__ ((naked))
+a (int z)
+{
+ if (z)
+ return;
+ b ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/pr81654.c b/gcc/testsuite/gcc.target/i386/pr81654.c
new file mode 100644
index 00000000000..2a1a4b72f1e
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr81654.c
@@ -0,0 +1,8 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -mgeneral-regs-only" } */
+
+__attribute__((interrupt, naked))
+void
+fn (void *frame) /* { dg-error "not compatible" } */
+{
+}
diff --git a/gcc/testsuite/gcc.target/i386/pr81736-1.c b/gcc/testsuite/gcc.target/i386/pr81736-1.c
new file mode 100644
index 00000000000..92c7bc97a0d
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr81736-1.c
@@ -0,0 +1,13 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -fno-omit-frame-pointer" } */
+
+extern int i;
+
+int
+foo (void)
+{
+ return i;
+}
+
+/* No need to use a frame pointer. */
+/* { dg-final { scan-assembler-not "%\[re\]bp" } } */
diff --git a/gcc/testsuite/gcc.target/i386/pr81736-2.c b/gcc/testsuite/gcc.target/i386/pr81736-2.c
new file mode 100644
index 00000000000..a3720879937
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr81736-2.c
@@ -0,0 +1,14 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -fno-omit-frame-pointer" } */
+
+int
+#ifndef __x86_64__
+__attribute__((regparm(3)))
+#endif
+foo (int i)
+{
+ return i;
+}
+
+/* No need to use a frame pointer. */
+/* { dg-final { scan-assembler-not "%\[re\]bp" } } */
diff --git a/gcc/testsuite/gcc.target/i386/pr81736-3.c b/gcc/testsuite/gcc.target/i386/pr81736-3.c
new file mode 100644
index 00000000000..c3bde7dd933
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr81736-3.c
@@ -0,0 +1,11 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -fno-omit-frame-pointer" } */
+
+void
+foo (void)
+{
+ asm ("# " : : : "ebx");
+}
+
+/* Need to use a frame pointer. */
+/* { dg-final { scan-assembler "%\[re\]bp" } } */
diff --git a/gcc/testsuite/gcc.target/i386/pr81736-4.c b/gcc/testsuite/gcc.target/i386/pr81736-4.c
new file mode 100644
index 00000000000..25f50016a64
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr81736-4.c
@@ -0,0 +1,11 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -fno-omit-frame-pointer" } */
+
+int
+foo (int i1, int i2, int i3, int i4, int i5, int i6, int i7)
+{
+ return i7;
+}
+
+/* Need to use a frame pointer. */
+/* { dg-final { scan-assembler "%\[re\]bp" } } */
diff --git a/gcc/testsuite/gcc.target/i386/pr81736-5.c b/gcc/testsuite/gcc.target/i386/pr81736-5.c
new file mode 100644
index 00000000000..e1602cf25ba
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr81736-5.c
@@ -0,0 +1,20 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -fno-omit-frame-pointer -mavx" } */
+
+typedef int v8si __attribute__ ((vector_size (32)));
+
+void
+#ifndef __x86_64__
+__attribute__((regparm(3)))
+#endif
+foo (v8si *out_start, v8si *out_end, v8si *regions)
+{
+ v8si base = regions[3];
+ *out_start = base;
+ *out_end = base;
+}
+
+/* No need to use a frame pointer. */
+/* { dg-final { scan-assembler-not "%\[re\]bp" } } */
+/* Verify no dynamic realignment is performed. */
+/* { dg-final { scan-assembler-not "and\[^\n\r]*sp" } } */
diff --git a/gcc/testsuite/gcc.target/i386/pr81736-6.c b/gcc/testsuite/gcc.target/i386/pr81736-6.c
new file mode 100644
index 00000000000..6198574c8cc
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr81736-6.c
@@ -0,0 +1,16 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -fno-omit-frame-pointer" } */
+
+struct foo
+{
+ int head;
+} a;
+
+int
+bar (void)
+{
+ return a.head != 0;
+}
+
+/* No need to use a frame pointer. */
+/* { dg-final { scan-assembler-not "%\[re\]bp" } } */
diff --git a/gcc/testsuite/gcc.target/i386/pr81736-7.c b/gcc/testsuite/gcc.target/i386/pr81736-7.c
new file mode 100644
index 00000000000..f947886e642
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr81736-7.c
@@ -0,0 +1,13 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -fno-omit-frame-pointer" } */
+
+extern int foo (void);
+
+int
+bar (void)
+{
+ return foo ();
+}
+
+/* No need to use a frame pointer. */
+/* { dg-final { scan-assembler-not "%\[re\]bp" } } */
diff --git a/gcc/testsuite/gcc.target/i386/stack-prot-guard.c b/gcc/testsuite/gcc.target/i386/stack-prot-guard.c
new file mode 100644
index 00000000000..120ef3cf5c1
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/stack-prot-guard.c
@@ -0,0 +1,6 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -fstack-protector-all -mstack-protector-guard=tls -mstack-protector-guard-reg=gs -mstack-protector-guard-offset=0x3038" } */
+
+void f(void) { }
+
+/* { dg-final { scan-assembler "gs:12344" } } */
diff --git a/gcc/testsuite/gcc.target/i386/stack-prot-sym.c b/gcc/testsuite/gcc.target/i386/stack-prot-sym.c
new file mode 100644
index 00000000000..7f63424c55f
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/stack-prot-sym.c
@@ -0,0 +1,6 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -fstack-protector-all -mstack-protector-guard=tls -mstack-protector-guard-reg=gs -mstack-protector-guard-symbol=my_guard" } */
+
+void f(void) { }
+
+/* { dg-final { scan-assembler "gs:my_guard" } } */
diff --git a/gcc/testsuite/gcc.target/nvptx/patchable_function_entry-default.c b/gcc/testsuite/gcc.target/nvptx/patchable_function_entry-default.c
new file mode 100644
index 00000000000..42544562725
--- /dev/null
+++ b/gcc/testsuite/gcc.target/nvptx/patchable_function_entry-default.c
@@ -0,0 +1,15 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -fpatchable-function-entry=3,1" } */
+
+extern int a;
+
+int f3 (void);
+
+int
+__attribute__((noinline))
+f3 (void)
+{
+ return 5*a;
+}
+
+/* { dg-excess-errors "sorry, unimplemented: not generating patch area, nops not supported" } */
diff --git a/gcc/testsuite/gcc.target/nvptx/slp-2.c b/gcc/testsuite/gcc.target/nvptx/slp-2.c
index 66394918d63..18219996788 100644
--- a/gcc/testsuite/gcc.target/nvptx/slp-2.c
+++ b/gcc/testsuite/gcc.target/nvptx/slp-2.c
@@ -9,7 +9,7 @@ foo ()
{
long long int a, b;
- unsigned int i;
+ int i;
for (i = 0; i < 1000; i += 2)
{
a = p[i];
diff --git a/gcc/testsuite/gcc.target/nvptx/slp.c b/gcc/testsuite/gcc.target/nvptx/slp.c
index 5dee147af9c..ca8191cccce 100644
--- a/gcc/testsuite/gcc.target/nvptx/slp.c
+++ b/gcc/testsuite/gcc.target/nvptx/slp.c
@@ -9,7 +9,7 @@ foo ()
{
int a, b;
- unsigned int i;
+ int i;
for (i = 0; i < 1000; i += 2)
{
a = p[i];
diff --git a/gcc/testsuite/gcc.target/powerpc/bfp/scalar-cmp-exp-eq-2.c b/gcc/testsuite/gcc.target/powerpc/bfp/scalar-cmp-exp-eq-2.c
index 45f0df89894..e19ad0b349a 100644
--- a/gcc/testsuite/gcc.target/powerpc/bfp/scalar-cmp-exp-eq-2.c
+++ b/gcc/testsuite/gcc.target/powerpc/bfp/scalar-cmp-exp-eq-2.c
@@ -12,5 +12,5 @@ compare_exponents_eq (double *exponent1_p, double *exponent2_p)
double exponent1 = *exponent1_p;
double exponent2 = *exponent2_p;
- return __builtin_vec_scalar_cmp_exp_eq (exponent1, exponent2); /* { dg-error "Builtin function __builtin_vsx_scalar_cmp_exp_dp_eq requires" } */
+ return __builtin_vec_scalar_cmp_exp_eq (exponent1, exponent2); /* { dg-error "builtin function __builtin_vsx_scalar_cmp_exp_dp_eq requires" } */
}
diff --git a/gcc/testsuite/gcc.target/powerpc/bfp/scalar-cmp-exp-gt-2.c b/gcc/testsuite/gcc.target/powerpc/bfp/scalar-cmp-exp-gt-2.c
index 0ccf1ceea2a..cf0fafb5aad 100644
--- a/gcc/testsuite/gcc.target/powerpc/bfp/scalar-cmp-exp-gt-2.c
+++ b/gcc/testsuite/gcc.target/powerpc/bfp/scalar-cmp-exp-gt-2.c
@@ -12,5 +12,5 @@ compare_exponents_gt (double *exponent1_p, double *exponent2_p)
double exponent1 = *exponent1_p;
double exponent2 = *exponent2_p;
- return __builtin_vec_scalar_cmp_exp_gt (exponent1, exponent2); /* { dg-error "Builtin function __builtin_vsx_scalar_cmp_exp_dp_gt requires" } */
+ return __builtin_vec_scalar_cmp_exp_gt (exponent1, exponent2); /* { dg-error "builtin function __builtin_vsx_scalar_cmp_exp_dp_gt requires" } */
}
diff --git a/gcc/testsuite/gcc.target/powerpc/bfp/scalar-cmp-exp-lt-2.c b/gcc/testsuite/gcc.target/powerpc/bfp/scalar-cmp-exp-lt-2.c
index e453f236c66..592e320eb70 100644
--- a/gcc/testsuite/gcc.target/powerpc/bfp/scalar-cmp-exp-lt-2.c
+++ b/gcc/testsuite/gcc.target/powerpc/bfp/scalar-cmp-exp-lt-2.c
@@ -12,5 +12,5 @@ compare_exponents_lt (double *exponent1_p, double *exponent2_p)
double exponent1 = *exponent1_p;
double exponent2 = *exponent2_p;
- return __builtin_vec_scalar_cmp_exp_lt (exponent1, exponent2); /* { dg-error "Builtin function __builtin_vsx_scalar_cmp_exp_dp_lt requires" } */
+ return __builtin_vec_scalar_cmp_exp_lt (exponent1, exponent2); /* { dg-error "builtin function __builtin_vsx_scalar_cmp_exp_dp_lt requires" } */
}
diff --git a/gcc/testsuite/gcc.target/powerpc/bfp/scalar-cmp-exp-unordered-2.c b/gcc/testsuite/gcc.target/powerpc/bfp/scalar-cmp-exp-unordered-2.c
index dcedf0de887..e9a474e8e1b 100644
--- a/gcc/testsuite/gcc.target/powerpc/bfp/scalar-cmp-exp-unordered-2.c
+++ b/gcc/testsuite/gcc.target/powerpc/bfp/scalar-cmp-exp-unordered-2.c
@@ -12,5 +12,5 @@ compare_exponents_unordered (double *exponent1_p, double *exponent2_p)
double exponent1 = *exponent1_p;
double exponent2 = *exponent2_p;
- return __builtin_vec_scalar_cmp_exp_unordered (exponent1, exponent2); /* { dg-error "Builtin function __builtin_vsx_scalar_cmp_exp_dp_unordered requires" } */
+ return __builtin_vec_scalar_cmp_exp_unordered (exponent1, exponent2); /* { dg-error "builtin function __builtin_vsx_scalar_cmp_exp_dp_unordered requires" } */
}
diff --git a/gcc/testsuite/gcc.target/powerpc/bfp/scalar-extract-exp-1.c b/gcc/testsuite/gcc.target/powerpc/bfp/scalar-extract-exp-1.c
index e2f045cdce8..0b805221d1b 100644
--- a/gcc/testsuite/gcc.target/powerpc/bfp/scalar-extract-exp-1.c
+++ b/gcc/testsuite/gcc.target/powerpc/bfp/scalar-extract-exp-1.c
@@ -12,7 +12,7 @@ get_exponent (double *p)
{
double source = *p;
- return __builtin_vec_scalar_extract_exp (source); /* { dg-error "Builtin function __builtin_vsx_scalar_extract_exp requires" } */
+ return __builtin_vec_scalar_extract_exp (source); /* { dg-error "builtin function __builtin_vsx_scalar_extract_exp requires" } */
}
diff --git a/gcc/testsuite/gcc.target/powerpc/bfp/scalar-extract-exp-2.c b/gcc/testsuite/gcc.target/powerpc/bfp/scalar-extract-exp-2.c
index a60b54a6089..594d92cad99 100644
--- a/gcc/testsuite/gcc.target/powerpc/bfp/scalar-extract-exp-2.c
+++ b/gcc/testsuite/gcc.target/powerpc/bfp/scalar-extract-exp-2.c
@@ -15,7 +15,7 @@ get_exponent (double *p)
{
double source = *p;
- return scalar_extract_exp (source); /* { dg-error "Builtin function __builtin_vec_scalar_extract_exp not supported in this compiler configuration" } */
+ return scalar_extract_exp (source); /* { dg-error "builtin function __builtin_vec_scalar_extract_exp not supported in this compiler configuration" } */
}
diff --git a/gcc/testsuite/gcc.target/powerpc/bfp/scalar-extract-exp-4.c b/gcc/testsuite/gcc.target/powerpc/bfp/scalar-extract-exp-4.c
index 502241581d9..d4dd43f5371 100644
--- a/gcc/testsuite/gcc.target/powerpc/bfp/scalar-extract-exp-4.c
+++ b/gcc/testsuite/gcc.target/powerpc/bfp/scalar-extract-exp-4.c
@@ -12,7 +12,7 @@ get_exponent (__ieee128 *p)
{
__ieee128 source = *p;
- return __builtin_vec_scalar_extract_exp (source); /* { dg-error "Builtin function __builtin_vsx_scalar_extract_expq requires" } */
+ return __builtin_vec_scalar_extract_exp (source); /* { dg-error "builtin function __builtin_vsx_scalar_extract_expq requires" } */
}
diff --git a/gcc/testsuite/gcc.target/powerpc/bfp/scalar-extract-exp-5.c b/gcc/testsuite/gcc.target/powerpc/bfp/scalar-extract-exp-5.c
index 07e0c1de7e3..569de683df0 100644
--- a/gcc/testsuite/gcc.target/powerpc/bfp/scalar-extract-exp-5.c
+++ b/gcc/testsuite/gcc.target/powerpc/bfp/scalar-extract-exp-5.c
@@ -15,7 +15,7 @@ get_exponent (__ieee128 *p)
{
__ieee128 source = *p;
- return scalar_extract_exp (source); /* { dg-error "Builtin function __builtin_vec_scalar_extract_exp not supported in this compiler configuration" } */
+ return scalar_extract_exp (source); /* { dg-error "builtin function __builtin_vec_scalar_extract_exp not supported in this compiler configuration" } */
}
diff --git a/gcc/testsuite/gcc.target/powerpc/bfp/scalar-extract-sig-1.c b/gcc/testsuite/gcc.target/powerpc/bfp/scalar-extract-sig-1.c
index b2e5647673d..a856028a1aa 100644
--- a/gcc/testsuite/gcc.target/powerpc/bfp/scalar-extract-sig-1.c
+++ b/gcc/testsuite/gcc.target/powerpc/bfp/scalar-extract-sig-1.c
@@ -12,5 +12,5 @@ get_significand (double *p)
{
double source = *p;
- return __builtin_vec_scalar_extract_sig (source); /* { dg-error "Builtin function __builtin_vsx_scalar_extract_sig requires" } */
+ return __builtin_vec_scalar_extract_sig (source); /* { dg-error "builtin function __builtin_vsx_scalar_extract_sig requires" } */
}
diff --git a/gcc/testsuite/gcc.target/powerpc/bfp/scalar-extract-sig-2.c b/gcc/testsuite/gcc.target/powerpc/bfp/scalar-extract-sig-2.c
index 237bd027cab..cdf163d9f9c 100644
--- a/gcc/testsuite/gcc.target/powerpc/bfp/scalar-extract-sig-2.c
+++ b/gcc/testsuite/gcc.target/powerpc/bfp/scalar-extract-sig-2.c
@@ -13,5 +13,5 @@ get_significand (double *p)
{
double source = *p;
- return __builtin_vec_scalar_extract_sig (source); /* { dg-error "Builtin function __builtin_vec_scalar_extract_sig not supported in this compiler configuration" } */
+ return __builtin_vec_scalar_extract_sig (source); /* { dg-error "builtin function __builtin_vec_scalar_extract_sig not supported in this compiler configuration" } */
}
diff --git a/gcc/testsuite/gcc.target/powerpc/bfp/scalar-extract-sig-4.c b/gcc/testsuite/gcc.target/powerpc/bfp/scalar-extract-sig-4.c
index 0c2ec4739f5..8b33c788db2 100644
--- a/gcc/testsuite/gcc.target/powerpc/bfp/scalar-extract-sig-4.c
+++ b/gcc/testsuite/gcc.target/powerpc/bfp/scalar-extract-sig-4.c
@@ -12,5 +12,5 @@ get_significand (__ieee128 *p)
{
__ieee128 source = *p;
- return __builtin_vec_scalar_extract_sig (source); /* { dg-error "Builtin function __builtin_vsx_scalar_extract_sigq requires" } */
+ return __builtin_vec_scalar_extract_sig (source); /* { dg-error "builtin function __builtin_vsx_scalar_extract_sigq requires" } */
}
diff --git a/gcc/testsuite/gcc.target/powerpc/bfp/scalar-extract-sig-5.c b/gcc/testsuite/gcc.target/powerpc/bfp/scalar-extract-sig-5.c
index 19ca4c4a09a..17ac4852984 100644
--- a/gcc/testsuite/gcc.target/powerpc/bfp/scalar-extract-sig-5.c
+++ b/gcc/testsuite/gcc.target/powerpc/bfp/scalar-extract-sig-5.c
@@ -13,5 +13,5 @@ get_significand (__ieee128 *p)
{
__ieee128 source = *p;
- return __builtin_vec_scalar_extract_sig (source); /* { dg-error "Builtin function __builtin_vec_scalar_extract_sig not supported in this compiler configuration" } */
+ return __builtin_vec_scalar_extract_sig (source); /* { dg-error "builtin function __builtin_vec_scalar_extract_sig not supported in this compiler configuration" } */
}
diff --git a/gcc/testsuite/gcc.target/powerpc/bfp/scalar-insert-exp-1.c b/gcc/testsuite/gcc.target/powerpc/bfp/scalar-insert-exp-1.c
index f2b720f444b..37c8796f040 100644
--- a/gcc/testsuite/gcc.target/powerpc/bfp/scalar-insert-exp-1.c
+++ b/gcc/testsuite/gcc.target/powerpc/bfp/scalar-insert-exp-1.c
@@ -14,5 +14,5 @@ insert_exponent (unsigned long long int *significand_p,
unsigned long long int significand = *significand_p;
unsigned long long int exponent = *exponent_p;
- return __builtin_vec_scalar_insert_exp (significand, exponent); /* { dg-error "Builtin function __builtin_vsx_scalar_insert_exp requires" } */
+ return __builtin_vec_scalar_insert_exp (significand, exponent); /* { dg-error "builtin function __builtin_vsx_scalar_insert_exp requires" } */
}
diff --git a/gcc/testsuite/gcc.target/powerpc/bfp/scalar-insert-exp-10.c b/gcc/testsuite/gcc.target/powerpc/bfp/scalar-insert-exp-10.c
index e730556c5c9..096761fc2db 100644
--- a/gcc/testsuite/gcc.target/powerpc/bfp/scalar-insert-exp-10.c
+++ b/gcc/testsuite/gcc.target/powerpc/bfp/scalar-insert-exp-10.c
@@ -14,5 +14,5 @@ insert_exponent (__ieee128 *significand_p,
__ieee128 significand = *significand_p;
unsigned long long int exponent = *exponent_p;
- return __builtin_vec_scalar_insert_exp (significand, exponent); /* { dg-error "Builtin function __builtin_vsx_scalar_insert_exp_qp requires" } */
+ return __builtin_vec_scalar_insert_exp (significand, exponent); /* { dg-error "builtin function __builtin_vsx_scalar_insert_exp_qp requires" } */
}
diff --git a/gcc/testsuite/gcc.target/powerpc/bfp/scalar-insert-exp-11.c b/gcc/testsuite/gcc.target/powerpc/bfp/scalar-insert-exp-11.c
index d44e6ccec5b..188bdfeac62 100644
--- a/gcc/testsuite/gcc.target/powerpc/bfp/scalar-insert-exp-11.c
+++ b/gcc/testsuite/gcc.target/powerpc/bfp/scalar-insert-exp-11.c
@@ -17,5 +17,5 @@ insert_exponent (__ieee128 *significand_p,
__ieee128 significand = *significand_p;
unsigned long long int exponent = *exponent_p;
- return scalar_insert_exp (significand, exponent); /* { dg-error "Builtin function __builtin_vec_scalar_insert_exp not supported in this compiler configuration" } */
+ return scalar_insert_exp (significand, exponent); /* { dg-error "builtin function __builtin_vec_scalar_insert_exp not supported in this compiler configuration" } */
}
diff --git a/gcc/testsuite/gcc.target/powerpc/bfp/scalar-insert-exp-2.c b/gcc/testsuite/gcc.target/powerpc/bfp/scalar-insert-exp-2.c
index 5044c81f069..c48d4e6885c 100644
--- a/gcc/testsuite/gcc.target/powerpc/bfp/scalar-insert-exp-2.c
+++ b/gcc/testsuite/gcc.target/powerpc/bfp/scalar-insert-exp-2.c
@@ -17,5 +17,5 @@ insert_exponent (unsigned long long int *significand_p,
unsigned long long int significand = *significand_p;
unsigned long long int exponent = *exponent_p;
- return scalar_insert_exp (significand, exponent); /* { dg-error "Builtin function __builtin_vec_scalar_insert_exp not supported in this compiler configuration" } */
+ return scalar_insert_exp (significand, exponent); /* { dg-error "builtin function __builtin_vec_scalar_insert_exp not supported in this compiler configuration" } */
}
diff --git a/gcc/testsuite/gcc.target/powerpc/bfp/scalar-insert-exp-4.c b/gcc/testsuite/gcc.target/powerpc/bfp/scalar-insert-exp-4.c
index 8b72cec88d9..2d17691e263 100644
--- a/gcc/testsuite/gcc.target/powerpc/bfp/scalar-insert-exp-4.c
+++ b/gcc/testsuite/gcc.target/powerpc/bfp/scalar-insert-exp-4.c
@@ -14,5 +14,5 @@ insert_exponent (double *significand_p,
double significand = *significand_p;
unsigned long long int exponent = *exponent_p;
- return __builtin_vec_scalar_insert_exp (significand, exponent); /* { dg-error "Builtin function __builtin_vsx_scalar_insert_exp_dp requires" } */
+ return __builtin_vec_scalar_insert_exp (significand, exponent); /* { dg-error "builtin function __builtin_vsx_scalar_insert_exp_dp requires" } */
}
diff --git a/gcc/testsuite/gcc.target/powerpc/bfp/scalar-insert-exp-5.c b/gcc/testsuite/gcc.target/powerpc/bfp/scalar-insert-exp-5.c
index e831f20e589..f662fa86ced 100644
--- a/gcc/testsuite/gcc.target/powerpc/bfp/scalar-insert-exp-5.c
+++ b/gcc/testsuite/gcc.target/powerpc/bfp/scalar-insert-exp-5.c
@@ -17,5 +17,5 @@ insert_exponent (double *significand_p,
double significand = *significand_p;
unsigned long long int exponent = *exponent_p;
- return scalar_insert_exp (significand, exponent); /* { dg-error "Builtin function __builtin_vec_scalar_insert_exp not supported in this compiler configuration" } */
+ return scalar_insert_exp (significand, exponent); /* { dg-error "builtin function __builtin_vec_scalar_insert_exp not supported in this compiler configuration" } */
}
diff --git a/gcc/testsuite/gcc.target/powerpc/bfp/scalar-insert-exp-7.c b/gcc/testsuite/gcc.target/powerpc/bfp/scalar-insert-exp-7.c
index fe565c8f416..08e95207794 100644
--- a/gcc/testsuite/gcc.target/powerpc/bfp/scalar-insert-exp-7.c
+++ b/gcc/testsuite/gcc.target/powerpc/bfp/scalar-insert-exp-7.c
@@ -14,5 +14,5 @@ insert_exponent (unsigned __int128 *significand_p,
unsigned __int128 significand = *significand_p;
unsigned long long int exponent = *exponent_p;
- return __builtin_vec_scalar_insert_exp (significand, exponent); /* { dg-error "Builtin function __builtin_vsx_scalar_insert_exp_q requires" } */
+ return __builtin_vec_scalar_insert_exp (significand, exponent); /* { dg-error "builtin function __builtin_vsx_scalar_insert_exp_q requires" } */
}
diff --git a/gcc/testsuite/gcc.target/powerpc/bfp/scalar-insert-exp-8.c b/gcc/testsuite/gcc.target/powerpc/bfp/scalar-insert-exp-8.c
index 3a3f1c4aa82..ce6dd548727 100644
--- a/gcc/testsuite/gcc.target/powerpc/bfp/scalar-insert-exp-8.c
+++ b/gcc/testsuite/gcc.target/powerpc/bfp/scalar-insert-exp-8.c
@@ -17,5 +17,5 @@ insert_exponent (unsigned __int128 *significand_p, /* { dg-error "'__int128' is
unsigned __int128 significand = *significand_p; /* { dg-error "'__int128' is not supported on this target" } */
unsigned long long int exponent = *exponent_p;
- return scalar_insert_exp (significand, exponent); /* { dg-error "Builtin function __builtin_vec_scalar_insert_exp not supported in this compiler configuration" } */
+ return scalar_insert_exp (significand, exponent); /* { dg-error "builtin function __builtin_vec_scalar_insert_exp not supported in this compiler configuration" } */
}
diff --git a/gcc/testsuite/gcc.target/powerpc/bfp/scalar-test-data-class-11.c b/gcc/testsuite/gcc.target/powerpc/bfp/scalar-test-data-class-11.c
index 0065b77746a..7562cc3027e 100644
--- a/gcc/testsuite/gcc.target/powerpc/bfp/scalar-test-data-class-11.c
+++ b/gcc/testsuite/gcc.target/powerpc/bfp/scalar-test-data-class-11.c
@@ -11,5 +11,5 @@ test_data_class (__ieee128 *p)
{
__ieee128 source = *p;
- return __builtin_vec_scalar_test_data_class (source, 3); /* { dg-error "Builtin function __builtin_vsx_scalar_test_data_class_qp requires" } */
+ return __builtin_vec_scalar_test_data_class (source, 3); /* { dg-error "builtin function __builtin_vsx_scalar_test_data_class_qp requires" } */
}
diff --git a/gcc/testsuite/gcc.target/powerpc/bfp/scalar-test-data-class-6.c b/gcc/testsuite/gcc.target/powerpc/bfp/scalar-test-data-class-6.c
index 10405a386c0..81dbe392c9d 100644
--- a/gcc/testsuite/gcc.target/powerpc/bfp/scalar-test-data-class-6.c
+++ b/gcc/testsuite/gcc.target/powerpc/bfp/scalar-test-data-class-6.c
@@ -11,5 +11,5 @@ test_data_class (double *p)
{
double source = *p;
- return __builtin_vec_scalar_test_data_class (source, 3); /* { dg-error "Builtin function __builtin_vsx_scalar_test_data_class_dp requires" } */
+ return __builtin_vec_scalar_test_data_class (source, 3); /* { dg-error "builtin function __builtin_vsx_scalar_test_data_class_dp requires" } */
}
diff --git a/gcc/testsuite/gcc.target/powerpc/bfp/scalar-test-data-class-7.c b/gcc/testsuite/gcc.target/powerpc/bfp/scalar-test-data-class-7.c
index a7482eff559..8d4716b191c 100644
--- a/gcc/testsuite/gcc.target/powerpc/bfp/scalar-test-data-class-7.c
+++ b/gcc/testsuite/gcc.target/powerpc/bfp/scalar-test-data-class-7.c
@@ -11,5 +11,5 @@ test_data_class (float *p)
{
float source = *p;
- return __builtin_vec_scalar_test_data_class (source, 3); /* { dg-error "Builtin function __builtin_vsx_scalar_test_data_class_sp requires" } */
+ return __builtin_vec_scalar_test_data_class (source, 3); /* { dg-error "builtin function __builtin_vsx_scalar_test_data_class_sp requires" } */
}
diff --git a/gcc/testsuite/gcc.target/powerpc/bfp/scalar-test-neg-2.c b/gcc/testsuite/gcc.target/powerpc/bfp/scalar-test-neg-2.c
index 3d93376e4bd..236a895fc3b 100644
--- a/gcc/testsuite/gcc.target/powerpc/bfp/scalar-test-neg-2.c
+++ b/gcc/testsuite/gcc.target/powerpc/bfp/scalar-test-neg-2.c
@@ -11,5 +11,5 @@ test_neg (float *p)
{
float source = *p;
- return __builtin_vec_scalar_test_neg_sp (source); /* { dg-error "Builtin function __builtin_vsx_scalar_test_neg_sp requires" } */
+ return __builtin_vec_scalar_test_neg_sp (source); /* { dg-error "builtin function __builtin_vsx_scalar_test_neg_sp requires" } */
}
diff --git a/gcc/testsuite/gcc.target/powerpc/bfp/scalar-test-neg-3.c b/gcc/testsuite/gcc.target/powerpc/bfp/scalar-test-neg-3.c
index 33971f6574c..af5eb8c633f 100644
--- a/gcc/testsuite/gcc.target/powerpc/bfp/scalar-test-neg-3.c
+++ b/gcc/testsuite/gcc.target/powerpc/bfp/scalar-test-neg-3.c
@@ -11,5 +11,5 @@ test_neg (double *p)
{
double source = *p;
- return __builtin_vec_scalar_test_neg_dp (source); /* { dg-error "Builtin function __builtin_vsx_scalar_test_neg_dp requires" } */
+ return __builtin_vec_scalar_test_neg_dp (source); /* { dg-error "builtin function __builtin_vsx_scalar_test_neg_dp requires" } */
}
diff --git a/gcc/testsuite/gcc.target/powerpc/bfp/scalar-test-neg-5.c b/gcc/testsuite/gcc.target/powerpc/bfp/scalar-test-neg-5.c
index 041a4a1c820..1018296cb4d 100644
--- a/gcc/testsuite/gcc.target/powerpc/bfp/scalar-test-neg-5.c
+++ b/gcc/testsuite/gcc.target/powerpc/bfp/scalar-test-neg-5.c
@@ -11,5 +11,5 @@ test_neg (__ieee128 *p)
{
__ieee128 source = *p;
- return __builtin_vec_scalar_test_neg_qp (source); /* { dg-error "Builtin function __builtin_vsx_scalar_test_neg_qp requires" } */
+ return __builtin_vec_scalar_test_neg_qp (source); /* { dg-error "builtin function __builtin_vsx_scalar_test_neg_qp requires" } */
}
diff --git a/gcc/testsuite/gcc.target/powerpc/bfp/vec-extract-exp-2.c b/gcc/testsuite/gcc.target/powerpc/bfp/vec-extract-exp-2.c
index 1462e4797bf..4b8ad56e21b 100644
--- a/gcc/testsuite/gcc.target/powerpc/bfp/vec-extract-exp-2.c
+++ b/gcc/testsuite/gcc.target/powerpc/bfp/vec-extract-exp-2.c
@@ -10,5 +10,5 @@ get_exponents (__vector double *p)
{
__vector double source = *p;
- return __builtin_vec_extract_exp (source); /* { dg-error "Builtin function __builtin_vsx_extract_exp_dp requires" } */
+ return __builtin_vec_extract_exp (source); /* { dg-error "builtin function __builtin_vsx_extract_exp_dp requires" } */
}
diff --git a/gcc/testsuite/gcc.target/powerpc/bfp/vec-extract-exp-3.c b/gcc/testsuite/gcc.target/powerpc/bfp/vec-extract-exp-3.c
index 15dc0dde7ad..5b1637bce0c 100644
--- a/gcc/testsuite/gcc.target/powerpc/bfp/vec-extract-exp-3.c
+++ b/gcc/testsuite/gcc.target/powerpc/bfp/vec-extract-exp-3.c
@@ -10,5 +10,5 @@ get_exponents (__vector float *p)
{
__vector float source = *p;
- return __builtin_vec_extract_exp (source); /* { dg-error "Builtin function __builtin_vsx_extract_exp_sp requires" } */
+ return __builtin_vec_extract_exp (source); /* { dg-error "builtin function __builtin_vsx_extract_exp_sp requires" } */
}
diff --git a/gcc/testsuite/gcc.target/powerpc/bfp/vec-extract-sig-2.c b/gcc/testsuite/gcc.target/powerpc/bfp/vec-extract-sig-2.c
index c4088cfc67e..c26739c5931 100644
--- a/gcc/testsuite/gcc.target/powerpc/bfp/vec-extract-sig-2.c
+++ b/gcc/testsuite/gcc.target/powerpc/bfp/vec-extract-sig-2.c
@@ -10,5 +10,5 @@ get_significands (__vector double *p)
{
__vector double source = *p;
- return __builtin_vec_extract_sig (source); /* { dg-error "Builtin function __builtin_vsx_extract_sig_dp requires" } */
+ return __builtin_vec_extract_sig (source); /* { dg-error "builtin function __builtin_vsx_extract_sig_dp requires" } */
}
diff --git a/gcc/testsuite/gcc.target/powerpc/bfp/vec-extract-sig-3.c b/gcc/testsuite/gcc.target/powerpc/bfp/vec-extract-sig-3.c
index 0adbbc25ee2..f01300fae64 100644
--- a/gcc/testsuite/gcc.target/powerpc/bfp/vec-extract-sig-3.c
+++ b/gcc/testsuite/gcc.target/powerpc/bfp/vec-extract-sig-3.c
@@ -10,5 +10,5 @@ get_significands (__vector float *p)
{
__vector float source = *p;
- return __builtin_vec_extract_sig (source); /* { dg-error "Builtin function __builtin_vsx_extract_sig_sp requires" } */
+ return __builtin_vec_extract_sig (source); /* { dg-error "builtin function __builtin_vsx_extract_sig_sp requires" } */
}
diff --git a/gcc/testsuite/gcc.target/powerpc/bfp/vec-insert-exp-2.c b/gcc/testsuite/gcc.target/powerpc/bfp/vec-insert-exp-2.c
index 1a02bf2d81d..afb7b930eb4 100644
--- a/gcc/testsuite/gcc.target/powerpc/bfp/vec-insert-exp-2.c
+++ b/gcc/testsuite/gcc.target/powerpc/bfp/vec-insert-exp-2.c
@@ -12,5 +12,5 @@ make_floats (__vector unsigned int *significands_p,
__vector unsigned int significands = *significands_p;
__vector unsigned int exponents = *exponents_p;
- return __builtin_vec_insert_exp (significands, exponents); /* { dg-error "Builtin function __builtin_vsx_insert_exp_sp requires" } */
+ return __builtin_vec_insert_exp (significands, exponents); /* { dg-error "builtin function __builtin_vsx_insert_exp_sp requires" } */
}
diff --git a/gcc/testsuite/gcc.target/powerpc/bfp/vec-insert-exp-3.c b/gcc/testsuite/gcc.target/powerpc/bfp/vec-insert-exp-3.c
index 97d44719943..c612b250205 100644
--- a/gcc/testsuite/gcc.target/powerpc/bfp/vec-insert-exp-3.c
+++ b/gcc/testsuite/gcc.target/powerpc/bfp/vec-insert-exp-3.c
@@ -12,5 +12,5 @@ make_doubles (__vector unsigned long long int *significands_p,
__vector unsigned long long int significands = *significands_p;
__vector unsigned long long int exponents = *exponents_p;
- return __builtin_vec_insert_exp (significands, exponents); /* { dg-error "Builtin function __builtin_vsx_insert_exp_dp requires" } */
+ return __builtin_vec_insert_exp (significands, exponents); /* { dg-error "builtin function __builtin_vsx_insert_exp_dp requires" } */
}
diff --git a/gcc/testsuite/gcc.target/powerpc/bfp/vec-insert-exp-6.c b/gcc/testsuite/gcc.target/powerpc/bfp/vec-insert-exp-6.c
index 5a76af7ed67..f5790cd9c8d 100644
--- a/gcc/testsuite/gcc.target/powerpc/bfp/vec-insert-exp-6.c
+++ b/gcc/testsuite/gcc.target/powerpc/bfp/vec-insert-exp-6.c
@@ -12,5 +12,5 @@ make_floats (__vector float *significands_p,
__vector float significands = *significands_p;
__vector unsigned int exponents = *exponents_p;
- return __builtin_vec_insert_exp (significands, exponents); /* { dg-error "Builtin function __builtin_vsx_insert_exp_sp requires" } */
+ return __builtin_vec_insert_exp (significands, exponents); /* { dg-error "builtin function __builtin_vsx_insert_exp_sp requires" } */
}
diff --git a/gcc/testsuite/gcc.target/powerpc/bfp/vec-insert-exp-7.c b/gcc/testsuite/gcc.target/powerpc/bfp/vec-insert-exp-7.c
index 8655818fc40..90de306500a 100644
--- a/gcc/testsuite/gcc.target/powerpc/bfp/vec-insert-exp-7.c
+++ b/gcc/testsuite/gcc.target/powerpc/bfp/vec-insert-exp-7.c
@@ -12,5 +12,5 @@ make_doubles (__vector double *significands_p,
__vector double significands = *significands_p;
__vector unsigned long long int exponents = *exponents_p;
- return __builtin_vec_insert_exp (significands, exponents); /* { dg-error "Builtin function __builtin_vsx_insert_exp_dp requires" } */
+ return __builtin_vec_insert_exp (significands, exponents); /* { dg-error "builtin function __builtin_vsx_insert_exp_dp requires" } */
}
diff --git a/gcc/testsuite/gcc.target/powerpc/bfp/vec-test-data-class-2.c b/gcc/testsuite/gcc.target/powerpc/bfp/vec-test-data-class-2.c
index c7e236fdb82..f60a148cdb1 100644
--- a/gcc/testsuite/gcc.target/powerpc/bfp/vec-test-data-class-2.c
+++ b/gcc/testsuite/gcc.target/powerpc/bfp/vec-test-data-class-2.c
@@ -10,5 +10,5 @@ get_data_class_flags (__vector double *p)
{
__vector double source = *p;
- return __builtin_vec_test_data_class (source, 0x37); /* { dg-error "Builtin function __builtin_vsx_test_data_class_dp requires" } */
+ return __builtin_vec_test_data_class (source, 0x37); /* { dg-error "builtin function __builtin_vsx_test_data_class_dp requires" } */
}
diff --git a/gcc/testsuite/gcc.target/powerpc/bfp/vec-test-data-class-3.c b/gcc/testsuite/gcc.target/powerpc/bfp/vec-test-data-class-3.c
index 9a6c069ac11..2e2a99a6904 100644
--- a/gcc/testsuite/gcc.target/powerpc/bfp/vec-test-data-class-3.c
+++ b/gcc/testsuite/gcc.target/powerpc/bfp/vec-test-data-class-3.c
@@ -10,5 +10,5 @@ get_data_class_flags (__vector float *p)
{
__vector float source = *p;
- return __builtin_vec_test_data_class (source, 0x37); /* { dg-error "Builtin function __builtin_vsx_test_data_class_sp requires" } */
+ return __builtin_vec_test_data_class (source, 0x37); /* { dg-error "builtin function __builtin_vsx_test_data_class_sp requires" } */
}
diff --git a/gcc/testsuite/gcc.target/powerpc/builtins-3-p8.c b/gcc/testsuite/gcc.target/powerpc/builtins-3-p8.c
index 3baa1d85442..bc1c8508203 100644
--- a/gcc/testsuite/gcc.target/powerpc/builtins-3-p8.c
+++ b/gcc/testsuite/gcc.target/powerpc/builtins-3-p8.c
@@ -85,6 +85,30 @@ test_vss_mradds_vss_vss (vector signed short x, vector signed short y,
return vec_mradds (x, y, z);
}
+vector signed long long
+test_vsll_mule_vsi_vsi (vector signed int x, vector signed int y)
+{
+ return vec_mule (x, y);
+}
+
+vector unsigned long long
+test_vull_mule_vui_vui (vector unsigned int x, vector unsigned int y)
+{
+ return vec_mule (x, y);
+}
+
+vector signed long long
+test_vsll_mulo_vsi_vsi (vector signed int x, vector signed int y)
+{
+ return vec_mulo (x, y);
+}
+
+vector unsigned long long
+test_vull_mulo_vui_vui (vector unsigned int x, vector unsigned int y)
+{
+ return vec_mulo (x, y);
+}
+
/* Expected test results:
test_eq_long_long 1 vcmpequd inst
@@ -98,7 +122,12 @@ test_vss_mradds_vss_vss (vector signed short x, vector signed short y,
test_unsigned_int_popcnt_signed_int 2 vpopcntw
test_unsigned_int_popcnt_unsigned_int 1 vpopcntd
test_unsigned_long_long_popcnt_unsigned_long 1 vpopcntd
- test_vss_mradds_vss_vsss 1 vmhraddshs */
+ test_vss_mradds_vss_vsss 1 vmhraddshs
+ test_vsll_mulo_vsi_vsi 1 vmulosw
+ test_vull_mulo_vui_vui 1 vmulouw
+ test_vsll_mule_vsi_vsi 1 vmulesw
+ test_vull_mule_vui_vui 1 vmuleuw
+ */
/* { dg-final { scan-assembler-times "vcmpequd" 1 } } */
/* { dg-final { scan-assembler-times "vpkudum" 1 } } */
@@ -109,3 +138,7 @@ test_vss_mradds_vss_vss (vector signed short x, vector signed short y,
/* { dg-final { scan-assembler-times "vpopcntw" 2 } } */
/* { dg-final { scan-assembler-times "vpopcntd" 2 } } */
/* { dg-final { scan-assembler-times "vmhraddshs" 1 } } */
+/* { dg-final { scan-assembler-times "vmulosw" 1 } } */
+/* { dg-final { scan-assembler-times "vmulouw" 1 } } */
+/* { dg-final { scan-assembler-times "vmulesw" 1 } } */
+/* { dg-final { scan-assembler-times "vmuleuw" 1 } } */
diff --git a/gcc/testsuite/gcc.target/powerpc/builtins-3.c b/gcc/testsuite/gcc.target/powerpc/builtins-3.c
index 00fa6ec0274..42153da63b4 100644
--- a/gcc/testsuite/gcc.target/powerpc/builtins-3.c
+++ b/gcc/testsuite/gcc.target/powerpc/builtins-3.c
@@ -112,30 +112,6 @@ test_vull_slo_vull_vuc (vector unsigned long long x, vector unsigned char y)
return vec_slo (x, y);
}
-vector signed long long
-test_vsll_mule_vsi_vsi (vector signed int x, vector signed int y)
-{
- return vec_mule (x, y);
-}
-
-vector unsigned long long
-test_vull_mule_vui_vui (vector unsigned int x, vector unsigned int y)
-{
- return vec_mule (x, y);
-}
-
-vector signed long long
-test_vsll_mulo_vsi_vsi (vector signed int x, vector signed int y)
-{
- return vec_mulo (x, y);
-}
-
-vector unsigned long long
-test_vull_mulo_vui_vui (vector unsigned int x, vector unsigned int y)
-{
- return vec_mulo (x, y);
-}
-
vector signed char
test_vsc_sldw_vsc_vsc (vector signed char x, vector signed char y)
{
@@ -207,10 +183,6 @@ test_vul_sldw_vul_vul (vector unsigned long long x,
test_vsll_slo_vsll_vuc 1 vslo
test_vull_slo_vsll_vsc 1 vslo
test_vull_slo_vsll_vuc 1 vslo
- test_vsll_mulo_vsi_vsi 1 vmulosw
- test_vull_mulo_vui_vui 1 vmulouw
- test_vsll_mule_vsi_vsi 1 vmulesw
- test_vull_mule_vui_vui 1 vmuleuw
test_vsc_mulo_vsc_vsc 1 xxsldwi
test_vuc_mulo_vuc_vuc 1 xxsldwi
test_vssi_mulo_vssi_vssi 1 xxsldwi
@@ -236,8 +208,4 @@ test_vul_sldw_vul_vul (vector unsigned long long x,
/* { dg-final { scan-assembler-times "xvnegsp" 1 } } */
/* { dg-final { scan-assembler-times "xvnegdp" 1 } } */
/* { dg-final { scan-assembler-times "vslo" 4 } } */
-/* { dg-final { scan-assembler-times "vmulosw" 1 } } */
-/* { dg-final { scan-assembler-times "vmulouw" 1 } } */
-/* { dg-final { scan-assembler-times "vmulesw" 1 } } */
-/* { dg-final { scan-assembler-times "vmuleuw" 1 } } */
/* { dg-final { scan-assembler-times "xxsldwi" 8 } } */
diff --git a/gcc/testsuite/gcc.target/powerpc/builtins-4-runnable.c b/gcc/testsuite/gcc.target/powerpc/builtins-4-runnable.c
new file mode 100644
index 00000000000..ed37424ca86
--- /dev/null
+++ b/gcc/testsuite/gcc.target/powerpc/builtins-4-runnable.c
@@ -0,0 +1,321 @@
+/* { dg-do run } */
+/* { dg-require-effective-target vsx_hw } */
+/* { dg-options "-maltivec -mvsx" } */
+
+#include <inttypes.h>
+#include <altivec.h> // vector
+#include <stdio.h>
+
+void abort (void);
+
+int main() {
+ int i;
+ signed char data_c[100];
+ unsigned char data_uc[100];
+
+ signed short int data_ssi[100];
+ unsigned short int data_usi[100];
+
+ signed int data_si[100];
+ unsigned int data_ui[100];
+
+ signed long long data_sll[100];
+ unsigned long long data_ull[100];
+
+ float data_f[100];
+ double data_d[100];
+
+ signed long long disp;
+
+ vector signed char vec_c_expected1, vec_c_expected2, vec_c_result1, vec_c_result2;
+ vector unsigned char vec_uc_expected1, vec_uc_expected2,
+ vec_uc_result1, vec_uc_result2;
+ vector signed short int vec_ssi_expected1, vec_ssi_expected2,
+ vec_ssi_result1, vec_ssi_result2;
+ vector unsigned short int vec_usi_expected1, vec_usi_expected2,
+ vec_usi_result1, vec_usi_result2;
+ vector signed int vec_si_expected1, vec_si_expected2, vec_si_result1,
+ vec_si_result2;
+ vector unsigned int vec_ui_expected1, vec_ui_expected2, vec_ui_result1,
+ vec_ui_result2;
+ vector signed long long vec_sll_expected1, vec_sll_expected2,
+ vec_sll_result1, vec_sll_result2;
+ vector unsigned long long vec_ull_expected1, vec_ull_expected2,
+ vec_ull_result1, vec_ull_result2;
+ vector float vec_f_expected1, vec_f_expected2, vec_f_result1, vec_f_result2;
+ vector double vec_d_expected1, vec_d_expected2, vec_d_result1, vec_d_result2;
+ char buf[20];
+ signed long long zero = (signed long long) 0;
+
+ for (i = 0; i < 100; i++)
+ {
+ data_c[i] = i;
+ data_uc[i] = i+1;
+ data_ssi[i] = i+10;
+ data_usi[i] = i+11;
+ data_si[i] = i+100;
+ data_ui[i] = i+101;
+ data_sll[i] = i+1000;
+ data_ull[i] = i+1001;
+ data_f[i] = i+100000.0;
+ data_d[i] = i+1000000.0;
+ }
+
+ disp = 0;
+#ifdef __BIG_ENDIAN__
+ printf("BIG ENDIAN\n");
+ vec_c_expected1 = (vector signed char){0, 1, 2, 3, 4, 5, 6, 7,
+ 8, 9, 10, 11, 12, 13, 14, 15};
+#else
+ printf("LITTLE ENDIAN\n");
+ vec_c_expected1 = (vector signed char){15, 14, 13, 12, 11, 10, 9, 8,
+ 7, 6, 5, 4, 3, 2, 1, 0};
+#endif
+ vec_c_result1 = vec_xl_be (0, data_c);
+
+ disp = 1;
+
+#ifdef __BIG_ENDIAN__
+ vec_c_expected2 = (vector signed char){1, 2, 3, 4, 5, 6, 7, 8,
+ 9, 10, 11, 12, 13, 14, 15, 16};
+#else
+ vec_c_expected2 = (vector signed char){16, 15, 14, 13, 12, 11, 10, 9,
+ 8, 7, 6, 5, 4, 3, 2, 1};
+#endif
+
+ vec_c_result2 = vec_xl_be (disp, data_c);
+
+#ifdef __BIG_ENDIAN__
+ vec_uc_expected1 = (vector unsigned char){1, 2, 3, 4, 5, 6, 7, 8,
+ 9, 10, 11, 12, 13, 14, 15, 16};
+#else
+ vec_uc_expected1 = (vector unsigned char){16, 15, 14, 13, 12, 11, 10, 9,
+ 8, 7, 6, 5, 4, 3, 2, 1};
+#endif
+
+ vec_uc_result1 = vec_xl_be (0, data_uc);
+
+#ifdef __BIG_ENDIAN__
+ vec_uc_expected2 = (vector unsigned char){2, 3, 4, 5, 6, 7, 8, 9,
+ 10, 11, 12, 13, 14, 15, 16, 17};
+#else
+ vec_uc_expected2 = (vector unsigned char){17, 16, 15, 14, 13, 12, 11, 10,
+ 9, 8, 7, 6, 5, 4, 3, 2};
+#endif
+
+ vec_uc_result2 = vec_xl_be (disp, data_uc);
+
+ for (i = 0; i < 16; i++)
+ {
+ if (vec_c_result1[i] != vec_c_expected1[i])
+ abort ();
+
+ if (vec_c_result2[i] != vec_c_expected2[i])
+ abort ();
+
+ if (vec_uc_result1[i] != vec_uc_expected1[i])
+ abort ();
+
+ if (vec_uc_result2[i] != vec_uc_expected2[i])
+ abort ();
+ }
+
+ vec_ssi_result1 = vec_xl_be (zero, data_ssi);
+
+#ifdef __BIG_ENDIAN__
+ vec_ssi_expected1 = (vector signed short){10, 11, 12, 13, 14, 15, 16, 17};
+#else
+ vec_ssi_expected1 = (vector signed short){17, 16, 15, 14, 13, 12, 11, 10};
+#endif
+
+ disp = 2;
+ vec_ssi_result2 = vec_xl_be (disp, data_ssi);
+
+#ifdef __BIG_ENDIAN__
+ vec_ssi_expected2 = (vector signed short){11, 12, 13, 14, 15, 16, 17, 18};
+#else
+ vec_ssi_expected2 = (vector signed short){18, 17, 16, 15, 14, 13, 12, 11};
+#endif
+
+ vec_usi_result1 = vec_xl_be (zero, data_usi);
+
+#ifdef __BIG_ENDIAN__
+ vec_usi_expected1 = (vector unsigned short){11, 12, 13, 14, 15, 16, 17, 18};
+#else
+ vec_usi_expected1 = (vector unsigned short){18, 17, 16, 15, 14, 13, 12, 11};
+#endif
+
+ disp = 2;
+ vec_usi_result2 = vec_xl_be (disp, data_usi);
+
+#ifdef __BIG_ENDIAN__
+ vec_usi_expected2 = (vector unsigned short){12, 13, 14, 15, 16, 17, 18, 19};
+#else
+ vec_usi_expected2 = (vector unsigned short){19, 18, 17, 16, 15, 14, 13, 12};
+#endif
+
+ for (i = 0; i < 8; i++)
+ {
+ if (vec_ssi_result1[i] != vec_ssi_expected1[i])
+ abort ();
+
+ if (vec_ssi_result2[i] != vec_ssi_expected2[i])
+ abort ();
+
+ if (vec_usi_result1[i] != vec_usi_expected1[i])
+ abort ();
+
+ if (vec_usi_result2[i] != vec_usi_expected2[i])
+ abort ();
+ }
+
+ vec_si_result1 = vec_xl_be (zero, data_si);
+
+#ifdef __BIG_ENDIAN__
+ vec_si_expected1 = (vector int){100, 101, 102, 103};
+#else
+ vec_si_expected1 = (vector int){103, 102, 101, 100};
+#endif
+
+ disp = 4;
+ vec_si_result2 = vec_xl_be (disp, data_si);
+
+#ifdef __BIG_ENDIAN__
+ vec_si_expected2 = (vector int){101, 102, 103, 104};
+#else
+ vec_si_expected2 = (vector int){104, 103, 102, 101};
+#endif
+
+ vec_ui_result1 = vec_xl_be (zero, data_ui);
+
+#ifdef __BIG_ENDIAN__
+ vec_ui_expected1 = (vector unsigned int){101, 102, 103, 104};
+#else
+ vec_ui_expected1 = (vector unsigned int){104, 103, 102, 101};
+#endif
+
+ disp = 4;
+ vec_ui_result2 = vec_xl_be (disp, data_ui);
+
+#ifdef __BIG_ENDIAN__
+ vec_ui_expected2 = (vector unsigned int){102, 103, 104, 105};
+#else
+ vec_ui_expected2 = (vector unsigned int){105, 104, 103, 102};
+#endif
+
+
+ for (i = 0; i < 4; i++)
+ {
+ if (vec_si_result1[i] != vec_si_expected1[i])
+ abort ();
+
+ if (vec_si_result2[i] != vec_si_expected2[i])
+ abort ();
+
+ if (vec_ui_result1[i] != vec_ui_expected1[i])
+ abort ();
+
+ if (vec_ui_result2[i] != vec_ui_expected2[i])
+ abort ();
+ }
+
+ vec_sll_result1 = vec_xl_be (zero, data_sll);
+
+#ifdef __BIG_ENDIAN__
+ vec_sll_expected1 = (vector signed long long){1000, 1001};
+#else
+ vec_sll_expected1 = (vector signed long long){1001, 1000};
+#endif
+
+ disp = 8;
+ vec_sll_result2 = vec_xl_be (disp, data_sll);
+
+#ifdef __BIG_ENDIAN__
+ vec_sll_expected2 = (vector signed long long){1001, 1002};
+#else
+ vec_sll_expected2 = (vector signed long long){1002, 1001};
+#endif
+
+ vec_ull_result1 = vec_xl_be (zero, data_ull);
+
+#ifdef __BIG_ENDIAN__
+ vec_ull_expected1 = (vector unsigned long long){1001, 1002};
+#else
+ vec_ull_expected1 = (vector unsigned long long){1002, 1001};
+#endif
+
+ disp = 8;
+ vec_ull_result2 = vec_xl_be (disp, data_ull);
+
+#ifdef __BIG_ENDIAN__
+ vec_ull_expected2 = (vector unsigned long long){1002, 1003};
+#else
+ vec_ull_expected2 = (vector unsigned long long){1003, 1002};
+#endif
+
+
+ for (i = 0; i < 2; i++)
+ {
+ if (vec_sll_result1[i] != vec_sll_expected1[i])
+ abort ();
+
+ if (vec_sll_result2[i] != vec_sll_expected2[i])
+ abort ();
+
+ if (vec_ull_result1[i] != vec_ull_expected1[i])
+ abort ();
+
+ if (vec_ull_result2[i] != vec_ull_expected2[i])
+ abort ();
+ }
+
+ vec_f_result1 = vec_xl_be (zero, data_f);
+
+#ifdef __BIG_ENDIAN__
+ vec_f_expected1 = (vector float){100000.0, 100001.0, 100002.0, 100003.0};
+#else
+ vec_f_expected1 = (vector float){100003.0, 100002.0, 100001.0, 100000.0};
+#endif
+
+ disp = 4;
+ vec_f_result2 = vec_xl_be (disp, data_f);
+
+#ifdef __BIG_ENDIAN__
+ vec_f_expected2 = (vector float){100001.0, 100002.0, 100003.0, 100004.0};
+#else
+ vec_f_expected2 = (vector float){100004.0, 100003.0, 100002.0, 100001.0};
+#endif
+
+ for (i = 0; i < 4; i++)
+ {
+ if (vec_f_result1[i] != vec_f_expected1[i])
+ abort ();
+ if (vec_f_result2[i] != vec_f_expected2[i])
+ abort ();
+ }
+
+ vec_d_result1 = vec_xl_be (zero, data_d);
+
+#ifdef __BIG_ENDIAN__
+ vec_d_expected1 = (vector double){1000000.0, 1000001.0};
+#else
+ vec_d_expected1 = (vector double){1000001.0, 1000000.0};
+#endif
+
+ disp = 8;
+ vec_d_result2 = vec_xl_be (disp, data_d);
+
+#ifdef __BIG_ENDIAN__
+ vec_d_expected2 = (vector double){1000001.0, 1000002.0};
+#else
+ vec_d_expected2 = (vector double){1000002.0, 1000001.0};
+#endif
+
+ for (i = 0; i < 2; i++)
+ {
+ if (vec_d_result1[i] != vec_d_expected1[i])
+ abort ();
+ if (vec_d_result2[i] != vec_d_expected2[i])
+ abort ();
+ }
+}
diff --git a/gcc/testsuite/gcc.target/powerpc/byte-in-either-range-1.c b/gcc/testsuite/gcc.target/powerpc/byte-in-either-range-1.c
index 52107c716c5..28b19820e57 100644
--- a/gcc/testsuite/gcc.target/powerpc/byte-in-either-range-1.c
+++ b/gcc/testsuite/gcc.target/powerpc/byte-in-either-range-1.c
@@ -18,5 +18,5 @@ test_byte_in_either_range (unsigned char b,
range_encoding = ((first_hi_bound << 24) | (first_lo_bound << 16)
| (second_hi_bound << 8) | second_lo_bound);
- return __builtin_byte_in_either_range (b, range_encoding); /* { dg-error "Builtin function __builtin_scalar_byte_in_either_range requires" } */
+ return __builtin_byte_in_either_range (b, range_encoding); /* { dg-error "builtin function __builtin_scalar_byte_in_either_range requires" } */
}
diff --git a/gcc/testsuite/gcc.target/powerpc/byte-in-range-1.c b/gcc/testsuite/gcc.target/powerpc/byte-in-range-1.c
index aaf46d0f8f3..e002c44dd8f 100644
--- a/gcc/testsuite/gcc.target/powerpc/byte-in-range-1.c
+++ b/gcc/testsuite/gcc.target/powerpc/byte-in-range-1.c
@@ -11,6 +11,6 @@ test_byte_in_range (unsigned char b,
unsigned char low_range, unsigned char high_range)
{
unsigned int range_encoding = (high_range << 8) | low_range;
- return __builtin_byte_in_range (b, range_encoding); /* { dg-error "Builtin function __builtin_scalar_byte_in_range requires" } */
+ return __builtin_byte_in_range (b, range_encoding); /* { dg-error "builtin function __builtin_scalar_byte_in_range requires" } */
}
diff --git a/gcc/testsuite/gcc.target/powerpc/byte-in-set-1.c b/gcc/testsuite/gcc.target/powerpc/byte-in-set-1.c
index 80c3a7d1a4d..bd5b50366e3 100644
--- a/gcc/testsuite/gcc.target/powerpc/byte-in-set-1.c
+++ b/gcc/testsuite/gcc.target/powerpc/byte-in-set-1.c
@@ -10,5 +10,5 @@
int
test_byte_in_set (unsigned char b, unsigned long long set_members)
{
- return __builtin_byte_in_set (b, set_members); /* { dg-error "Builtin function __builtin_scalar_byte_in_set requires" } */
+ return __builtin_byte_in_set (b, set_members); /* { dg-error "builtin function __builtin_scalar_byte_in_set requires" } */
}
diff --git a/gcc/testsuite/gcc.target/powerpc/byte-in-set-2.c b/gcc/testsuite/gcc.target/powerpc/byte-in-set-2.c
index 1915c707162..b2a6a98c8e3 100644
--- a/gcc/testsuite/gcc.target/powerpc/byte-in-set-2.c
+++ b/gcc/testsuite/gcc.target/powerpc/byte-in-set-2.c
@@ -12,5 +12,5 @@
int
test_byte_in_set (unsigned char b, unsigned long long set_members)
{
- return __builtin_byte_in_set (b, set_members); /* { dg-error "Builtin function __builtin_byte_in_set not supported in this compiler configuration" } */
+ return __builtin_byte_in_set (b, set_members); /* { dg-error "builtin function __builtin_byte_in_set not supported in this compiler configuration" } */
}
diff --git a/gcc/testsuite/gcc.target/powerpc/cmpb-3.c b/gcc/testsuite/gcc.target/powerpc/cmpb-3.c
index edb62f19b83..a3b72581434 100644
--- a/gcc/testsuite/gcc.target/powerpc/cmpb-3.c
+++ b/gcc/testsuite/gcc.target/powerpc/cmpb-3.c
@@ -9,7 +9,7 @@ void abort ();
long long int
do_compare (long long int a, long long int b)
{
- return __builtin_cmpb (a, b); /* { dg-error "Builtin function __builtin_cmpb not supported in this compiler configuration" } */
+ return __builtin_cmpb (a, b); /* { dg-error "builtin function __builtin_cmpb not supported in this compiler configuration" } */
}
void expect (long long int pattern, long long int value)
diff --git a/gcc/testsuite/gcc.target/powerpc/crypto-builtin-2.c b/gcc/testsuite/gcc.target/powerpc/crypto-builtin-2.c
index f3d58b0c80b..4df13c7cf3c 100644
--- a/gcc/testsuite/gcc.target/powerpc/crypto-builtin-2.c
+++ b/gcc/testsuite/gcc.target/powerpc/crypto-builtin-2.c
@@ -6,21 +6,21 @@
void use_builtins_d (__vector unsigned long long *p, __vector unsigned long long *q, __vector unsigned long long *r, __vector unsigned long long *s)
{
- p[0] = __builtin_crypto_vcipher (q[0], r[0]); /* { dg-error "Builtin function __builtin_crypto_vcipher is not supported with the current options" } */
- p[1] = __builtin_crypto_vcipherlast (q[1], r[1]); /* { dg-error "Builtin function __builtin_crypto_vcipherlast is not supported with the current options" } */
- p[2] = __builtin_crypto_vncipher (q[2], r[2]); /* { dg-error "Builtin function __builtin_crypto_vncipher is not supported with the current options" } */
- p[3] = __builtin_crypto_vncipherlast (q[3], r[3]); /* { dg-error "Builtin function __builtin_crypto_vncipherlast is not supported with the current options" } */
+ p[0] = __builtin_crypto_vcipher (q[0], r[0]); /* { dg-error "builtin function __builtin_crypto_vcipher is not supported with the current options" } */
+ p[1] = __builtin_crypto_vcipherlast (q[1], r[1]); /* { dg-error "builtin function __builtin_crypto_vcipherlast is not supported with the current options" } */
+ p[2] = __builtin_crypto_vncipher (q[2], r[2]); /* { dg-error "builtin function __builtin_crypto_vncipher is not supported with the current options" } */
+ p[3] = __builtin_crypto_vncipherlast (q[3], r[3]); /* { dg-error "builtin function __builtin_crypto_vncipherlast is not supported with the current options" } */
p[4] = __builtin_crypto_vpermxor (q[4], r[4], s[4]);
p[5] = __builtin_crypto_vpmsumd (q[5], r[5]);
- p[6] = __builtin_crypto_vshasigmad (q[6], 1, 15); /* { dg-error "Builtin function __builtin_crypto_vshasigmad is not supported with the current options" } */
- p[7] = __builtin_crypto_vsbox (q[7]); /* { dg-error "Builtin function __builtin_crypto_vsbox is not supported with the current options" } */
+ p[6] = __builtin_crypto_vshasigmad (q[6], 1, 15); /* { dg-error "builtin function __builtin_crypto_vshasigmad is not supported with the current options" } */
+ p[7] = __builtin_crypto_vsbox (q[7]); /* { dg-error "builtin function __builtin_crypto_vsbox is not supported with the current options" } */
}
void use_builtins_w (__vector unsigned int *p, __vector unsigned int *q, __vector unsigned int *r, __vector unsigned int *s)
{
p[0] = __builtin_crypto_vpermxor (q[0], r[0], s[0]);
p[1] = __builtin_crypto_vpmsumw (q[1], r[1]);
- p[2] = __builtin_crypto_vshasigmaw (q[2], 1, 15); /* { dg-error "Builtin function __builtin_crypto_vshasigmaw is not supported with the current options" } */
+ p[2] = __builtin_crypto_vshasigmaw (q[2], 1, 15); /* { dg-error "builtin function __builtin_crypto_vshasigmaw is not supported with the current options" } */
}
void use_builtins_h (__vector unsigned short *p, __vector unsigned short *q, __vector unsigned short *r, __vector unsigned short *s)
diff --git a/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-1.c b/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-1.c
index d634a2acd04..7a791af07f8 100644
--- a/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-1.c
+++ b/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-1.c
@@ -10,6 +10,6 @@ int doTestBCDSignificance (_Decimal64 *p)
{
_Decimal64 source = *p;
- return __builtin_dfp_dtstsfi_lt (5, source); /* { dg-error "Builtin function __builtin_dtstsfi_lt_dd requires" } */
+ return __builtin_dfp_dtstsfi_lt (5, source); /* { dg-error "builtin function __builtin_dtstsfi_lt_dd requires" } */
}
diff --git a/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-11.c b/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-11.c
index 523facea156..4a57a208b1f 100644
--- a/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-11.c
+++ b/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-11.c
@@ -10,6 +10,6 @@ int doTestBCDSignificance (_Decimal64 *p)
{
_Decimal64 source = *p;
- return __builtin_dfp_dtstsfi_lt_dd (5, source); /* { dg-error "Builtin function __builtin_dtstsfi_lt_dd requires" } */
+ return __builtin_dfp_dtstsfi_lt_dd (5, source); /* { dg-error "builtin function __builtin_dtstsfi_lt_dd requires" } */
}
diff --git a/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-16.c b/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-16.c
index dcd4a16635f..b6998f2025a 100644
--- a/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-16.c
+++ b/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-16.c
@@ -10,7 +10,7 @@ int doTestBCDSignificance (_Decimal128 *p)
{
_Decimal128 source = *p;
- return __builtin_dfp_dtstsfi_lt_td (5, source); /* { dg-error "Builtin function __builtin_dtstsfi_lt_td requires" } */
+ return __builtin_dfp_dtstsfi_lt_td (5, source); /* { dg-error "builtin function __builtin_dtstsfi_lt_td requires" } */
}
diff --git a/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-21.c b/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-21.c
index 975843c6a02..0f6d70e7e60 100644
--- a/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-21.c
+++ b/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-21.c
@@ -10,6 +10,6 @@ int doTestBCDSignificance (_Decimal64 *p)
{
_Decimal64 source = *p;
- return __builtin_dfp_dtstsfi_gt (5, source); /* { dg-error "Builtin function __builtin_dtstsfi_gt_dd requires" } */
+ return __builtin_dfp_dtstsfi_gt (5, source); /* { dg-error "builtin function __builtin_dtstsfi_gt_dd requires" } */
}
diff --git a/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-26.c b/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-26.c
index e30c2f4ac79..f47cbcee383 100644
--- a/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-26.c
+++ b/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-26.c
@@ -10,7 +10,7 @@ int doTestBCDSignificance (_Decimal128 *p)
{
_Decimal128 source = *p;
- return __builtin_dfp_dtstsfi_gt (5, source); /* { dg-error "Builtin function __builtin_dtstsfi_gt_td requires" } */
+ return __builtin_dfp_dtstsfi_gt (5, source); /* { dg-error "builtin function __builtin_dtstsfi_gt_td requires" } */
}
diff --git a/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-31.c b/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-31.c
index a95dcb8dbb6..bce88ca5d30 100644
--- a/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-31.c
+++ b/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-31.c
@@ -10,6 +10,6 @@ int doTestBCDSignificance (_Decimal64 *p)
{
_Decimal64 source = *p;
- return __builtin_dfp_dtstsfi_gt_dd (5, source); /* { dg-error "Builtin function __builtin_dtstsfi_gt_dd requires" } */
+ return __builtin_dfp_dtstsfi_gt_dd (5, source); /* { dg-error "builtin function __builtin_dtstsfi_gt_dd requires" } */
}
diff --git a/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-36.c b/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-36.c
index 00be5389310..5cdfa1be7e2 100644
--- a/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-36.c
+++ b/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-36.c
@@ -10,7 +10,7 @@ int doTestBCDSignificance (_Decimal128 *p)
{
_Decimal128 source = *p;
- return __builtin_dfp_dtstsfi_gt_td (5, source); /* { dg-error "Builtin function __builtin_dtstsfi_gt_td requires" } */
+ return __builtin_dfp_dtstsfi_gt_td (5, source); /* { dg-error "builtin function __builtin_dtstsfi_gt_td requires" } */
}
diff --git a/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-41.c b/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-41.c
index c84387dc38b..c3b84332316 100644
--- a/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-41.c
+++ b/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-41.c
@@ -10,6 +10,6 @@ int doTestBCDSignificance (_Decimal64 *p)
{
_Decimal64 source = *p;
- return __builtin_dfp_dtstsfi_eq (5, source); /* { dg-error "Builtin function __builtin_dtstsfi_eq_dd requires" } */
+ return __builtin_dfp_dtstsfi_eq (5, source); /* { dg-error "builtin function __builtin_dtstsfi_eq_dd requires" } */
}
diff --git a/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-46.c b/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-46.c
index f1d6e2de80f..fbcbbdb0abc 100644
--- a/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-46.c
+++ b/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-46.c
@@ -10,7 +10,7 @@ int doTestBCDSignificance (_Decimal128 *p)
{
_Decimal128 source = *p;
- return __builtin_dfp_dtstsfi_eq (5, source); /* { dg-error "Builtin function __builtin_dtstsfi_eq_td requires" } */
+ return __builtin_dfp_dtstsfi_eq (5, source); /* { dg-error "builtin function __builtin_dtstsfi_eq_td requires" } */
}
diff --git a/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-51.c b/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-51.c
index 58f542673de..71839922eec 100644
--- a/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-51.c
+++ b/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-51.c
@@ -10,6 +10,6 @@ int doTestBCDSignificance (_Decimal64 *p)
{
_Decimal64 source = *p;
- return __builtin_dfp_dtstsfi_eq_dd (5, source); /* { dg-error "Builtin function __builtin_dtstsfi_eq_dd requires" } */
+ return __builtin_dfp_dtstsfi_eq_dd (5, source); /* { dg-error "builtin function __builtin_dtstsfi_eq_dd requires" } */
}
diff --git a/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-56.c b/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-56.c
index 7efb1a3d0f1..1b894ff669c 100644
--- a/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-56.c
+++ b/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-56.c
@@ -10,7 +10,7 @@ int doTestBCDSignificance (_Decimal128 *p)
{
_Decimal128 source = *p;
- return __builtin_dfp_dtstsfi_eq_td (5, source); /* { dg-error "Builtin function __builtin_dtstsfi_eq_td requires" } */
+ return __builtin_dfp_dtstsfi_eq_td (5, source); /* { dg-error "builtin function __builtin_dtstsfi_eq_td requires" } */
}
diff --git a/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-6.c b/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-6.c
index 1bddb651b0e..293e6ca19ad 100644
--- a/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-6.c
+++ b/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-6.c
@@ -10,7 +10,7 @@ int doTestBCDSignificance (_Decimal128 *p)
{
_Decimal128 source = *p;
- return __builtin_dfp_dtstsfi_lt (5, source); /* { dg-error "Builtin function __builtin_dtstsfi_lt_td requires" } */
+ return __builtin_dfp_dtstsfi_lt (5, source); /* { dg-error "builtin function __builtin_dtstsfi_lt_td requires" } */
}
diff --git a/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-61.c b/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-61.c
index 247c1448a70..aa7591f7dc4 100644
--- a/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-61.c
+++ b/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-61.c
@@ -10,6 +10,6 @@ int doTestBCDSignificance (_Decimal64 *p)
{
_Decimal64 source = *p;
- return __builtin_dfp_dtstsfi_ov (5, source); /* { dg-error "Builtin function __builtin_dtstsfi_ov_dd requires" } */
+ return __builtin_dfp_dtstsfi_ov (5, source); /* { dg-error "builtin function __builtin_dtstsfi_ov_dd requires" } */
}
diff --git a/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-66.c b/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-66.c
index 69272acb47a..644f3101c13 100644
--- a/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-66.c
+++ b/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-66.c
@@ -10,7 +10,7 @@ int doTestBCDSignificance (_Decimal128 *p)
{
_Decimal128 source = *p;
- return __builtin_dfp_dtstsfi_ov (5, source); /* { dg-error "Builtin function __builtin_dtstsfi_ov_td requires" } */
+ return __builtin_dfp_dtstsfi_ov (5, source); /* { dg-error "builtin function __builtin_dtstsfi_ov_td requires" } */
}
diff --git a/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-71.c b/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-71.c
index 3e512038cf3..3f71eee3858 100644
--- a/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-71.c
+++ b/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-71.c
@@ -10,6 +10,6 @@ int doTestBCDSignificance (_Decimal64 *p)
{
_Decimal64 source = *p;
- return __builtin_dfp_dtstsfi_ov_dd (5, source); /* { dg-error "Builtin function __builtin_dtstsfi_ov_dd requires" } */
+ return __builtin_dfp_dtstsfi_ov_dd (5, source); /* { dg-error "builtin function __builtin_dtstsfi_ov_dd requires" } */
}
diff --git a/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-76.c b/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-76.c
index 572897fee55..d9e327a7b34 100644
--- a/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-76.c
+++ b/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-76.c
@@ -10,7 +10,7 @@ int doTestBCDSignificance (_Decimal128 *p)
{
_Decimal128 source = *p;
- return __builtin_dfp_dtstsfi_ov_td (5, source); /* { dg-error "Builtin function __builtin_dtstsfi_ov_td requires" } */
+ return __builtin_dfp_dtstsfi_ov_td (5, source); /* { dg-error "builtin function __builtin_dtstsfi_ov_td requires" } */
}
diff --git a/gcc/testsuite/gcc.target/powerpc/fold-vec-cntlz-char.c b/gcc/testsuite/gcc.target/powerpc/fold-vec-cntlz-char.c
new file mode 100644
index 00000000000..61dfbccd672
--- /dev/null
+++ b/gcc/testsuite/gcc.target/powerpc/fold-vec-cntlz-char.c
@@ -0,0 +1,22 @@
+/* Verify that overloaded built-ins for vec_cntlz with char
+ inputs produce the right results. */
+
+/* { dg-do compile } */
+/* { dg-require-effective-target powerpc_p8vector_ok } */
+/* { dg-options "-maltivec -mpower8-vector -O2" } */
+
+#include <altivec.h>
+
+vector signed char
+testsc_h (vector signed char vsc2)
+{
+ return vec_cntlz (vsc2);
+}
+
+vector unsigned char
+testuc_h (vector unsigned char vuc2)
+{
+ return vec_cntlz (vuc2);
+}
+
+/* { dg-final { scan-assembler-times "vclzb" 2 } } */
diff --git a/gcc/testsuite/gcc.target/powerpc/fold-vec-cntlz-int.c b/gcc/testsuite/gcc.target/powerpc/fold-vec-cntlz-int.c
new file mode 100644
index 00000000000..ae4dd577692
--- /dev/null
+++ b/gcc/testsuite/gcc.target/powerpc/fold-vec-cntlz-int.c
@@ -0,0 +1,22 @@
+/* Verify that overloaded built-ins for vec_cntlz with int
+ inputs produce the right results. */
+
+/* { dg-do compile } */
+/* { dg-require-effective-target powerpc_p8vector_ok } */
+/* { dg-options "-maltivec -mpower8-vector -O2" } */
+
+#include <altivec.h>
+
+vector signed int
+testsi (vector signed int vsi2)
+{
+ return vec_cntlz (vsi2);
+}
+
+vector unsigned int
+testui (vector unsigned int vui2)
+{
+ return vec_cntlz (vui2);
+}
+
+/* { dg-final { scan-assembler-times "vclzw" 2 } } */
diff --git a/gcc/testsuite/gcc.target/powerpc/fold-vec-cntlz-longlong.c b/gcc/testsuite/gcc.target/powerpc/fold-vec-cntlz-longlong.c
new file mode 100644
index 00000000000..1a72a2d38c7
--- /dev/null
+++ b/gcc/testsuite/gcc.target/powerpc/fold-vec-cntlz-longlong.c
@@ -0,0 +1,22 @@
+/* Verify that overloaded built-ins for vec_cntlz with long long
+ inputs produce the right results. */
+
+/* { dg-do compile } */
+/* { dg-require-effective-target powerpc_p8vector_ok } */
+/* { dg-options "-mvsx -mpower8-vector -O2" } */
+
+#include <altivec.h>
+
+vector signed long long
+testsl (vector signed long long vsl2)
+{
+ return vec_cntlz (vsl2);
+}
+
+vector unsigned long long
+testul (vector unsigned long long vul2)
+{
+ return vec_cntlz (vul2);
+}
+
+/* { dg-final { scan-assembler-times "vclzd" 2 } } */
diff --git a/gcc/testsuite/gcc.target/powerpc/fold-vec-cntlz-short.c b/gcc/testsuite/gcc.target/powerpc/fold-vec-cntlz-short.c
new file mode 100644
index 00000000000..0f05cace2e6
--- /dev/null
+++ b/gcc/testsuite/gcc.target/powerpc/fold-vec-cntlz-short.c
@@ -0,0 +1,22 @@
+/* Verify that overloaded built-ins for vec_cntlz with int
+ inputs produce the right results. */
+
+/* { dg-do compile } */
+/* { dg-require-effective-target powerpc_p8vector_ok } */
+/* { dg-options "-maltivec -mpower8-vector -O2" } */
+
+#include <altivec.h>
+
+vector signed short
+testsi (vector signed short vss2)
+{
+ return vec_cntlz (vss2);
+}
+
+vector unsigned short
+testui (vector unsigned short vus2)
+{
+ return vec_cntlz (vus2);
+}
+
+/* { dg-final { scan-assembler-times "vclzh" 2 } } */
diff --git a/gcc/testsuite/gcc.target/powerpc/fold-vec-madd-double.c b/gcc/testsuite/gcc.target/powerpc/fold-vec-madd-double.c
new file mode 100644
index 00000000000..0fe78241294
--- /dev/null
+++ b/gcc/testsuite/gcc.target/powerpc/fold-vec-madd-double.c
@@ -0,0 +1,17 @@
+/* Verify that overloaded built-ins for vec_madd with
+ double inputs produce the right results. */
+
+/* { dg-do compile } */
+/* { dg-require-effective-target powerpc_vsx_ok } */
+/* { dg-options "-mvsx -O2" } */
+
+#include <altivec.h>
+
+vector double
+testd_l (vector double vd2, vector double vd3, vector double vd4)
+{
+ return vec_madd (vd2, vd3, vd4);
+}
+
+/* { dg-final { scan-assembler-times "xvmaddmdp|xvmaddadp" 1 } } */
+
diff --git a/gcc/testsuite/gcc.target/powerpc/fold-vec-madd-float.c b/gcc/testsuite/gcc.target/powerpc/fold-vec-madd-float.c
new file mode 100644
index 00000000000..fcfe0c38656
--- /dev/null
+++ b/gcc/testsuite/gcc.target/powerpc/fold-vec-madd-float.c
@@ -0,0 +1,17 @@
+/* Verify that overloaded built-ins for vec_madd with float
+ inputs produce the right results. */
+
+/* { dg-do compile } */
+/* { dg-require-effective-target powerpc_vsx_ok } */
+/* { dg-options "-mvsx -O2" } */
+
+#include <altivec.h>
+
+vector float
+testf_l (vector float vf2, vector float vf3, vector float vf4)
+{
+ return vec_madd (vf2, vf3, vf4);
+}
+
+/* { dg-final { scan-assembler-times "xvmaddmsp|xvmaddasp" 1 } } */
+
diff --git a/gcc/testsuite/gcc.target/powerpc/fold-vec-madd-short.c b/gcc/testsuite/gcc.target/powerpc/fold-vec-madd-short.c
new file mode 100644
index 00000000000..0e78f3585f5
--- /dev/null
+++ b/gcc/testsuite/gcc.target/powerpc/fold-vec-madd-short.c
@@ -0,0 +1,38 @@
+/* Verify that overloaded built-ins for vec_madd with short
+ inputs produce the right results. */
+
+/* { dg-do compile } */
+/* { dg-require-effective-target powerpc_altivec_ok } */
+/* { dg-options "-maltivec -O2" } */
+
+#include <altivec.h>
+
+vector signed short
+test_mad_sss (vector signed short vss2, vector signed short vss3,
+ vector signed short vss4)
+{
+ return vec_madd (vss2, vss3, vss4);
+}
+
+vector signed short
+test_mad_suu (vector signed short vss2, vector unsigned short vus3,
+ vector unsigned short vus4)
+{
+ return vec_madd (vss2, vus3, vus4);
+}
+
+vector signed short
+test_mad_uss (vector unsigned short vus2, vector signed short vss3,
+ vector signed short vss4)
+{
+ return vec_madd (vus2, vss3, vss4);
+}
+
+vector unsigned short
+test_mad_uuu (vector unsigned short vus2, vector unsigned short vus3,
+ vector unsigned short vus4)
+{
+ return vec_madd (vus2, vus3, vus4);
+}
+
+/* { dg-final { scan-assembler-times "vmladduhm" 4 } } */
diff --git a/gcc/testsuite/gcc.target/powerpc/fold-vec-msum-char.c b/gcc/testsuite/gcc.target/powerpc/fold-vec-msum-char.c
new file mode 100644
index 00000000000..53519d50293
--- /dev/null
+++ b/gcc/testsuite/gcc.target/powerpc/fold-vec-msum-char.c
@@ -0,0 +1,25 @@
+/* Verify that overloaded built-ins for vec_msum() with char inputs
+ produce the right results. */
+
+/* { dg-do compile } */
+/* { dg-require-effective-target powerpc_altivec_ok } */
+/* { dg-options "-maltivec -O2" } */
+
+#include <altivec.h>
+
+vector unsigned int
+test_msum_ui_uc_uc_ui (vector unsigned char vuc2, vector unsigned char vuc3,
+ vector unsigned int vui2)
+{
+ return vec_msum (vuc2, vuc3, vui2);
+}
+
+vector signed int
+test_msum_si_sc_uc_si (vector signed char vsc2, vector unsigned char vuc3,
+ vector signed int vsi2)
+{
+ return vec_msum (vsc2, vuc3, vsi2);
+}
+
+/* { dg-final { scan-assembler-times "vmsumubm" 1 } } */
+/* { dg-final { scan-assembler-times "vmsummbm" 1 } } */
diff --git a/gcc/testsuite/gcc.target/powerpc/fold-vec-msum-short.c b/gcc/testsuite/gcc.target/powerpc/fold-vec-msum-short.c
new file mode 100644
index 00000000000..2e590ab8066
--- /dev/null
+++ b/gcc/testsuite/gcc.target/powerpc/fold-vec-msum-short.c
@@ -0,0 +1,25 @@
+/* Verify that overloaded built-ins for vec_msum with int
+ inputs produce the right results. */
+
+/* { dg-do compile } */
+/* { dg-require-effective-target powerpc_altivec_ok } */
+/* { dg-options "-maltivec -O2" } */
+
+#include <altivec.h>
+
+vector signed int
+test_msum_si (vector signed short vss2, vector signed short vss3,
+ vector signed int vsi2)
+{
+ return vec_msum (vss2, vss3, vsi2);
+}
+
+vector unsigned int
+test_msum_ui (vector unsigned short vus2, vector unsigned short vus3,
+ vector unsigned int vui2)
+{
+ return vec_msum (vus2, vus3, vui2);
+}
+
+/* { dg-final { scan-assembler-times "vmsumshm" 1 } } */
+/* { dg-final { scan-assembler-times "vmsumuhm" 1 } } */
diff --git a/gcc/testsuite/gcc.target/powerpc/fold-vec-pack-double.c b/gcc/testsuite/gcc.target/powerpc/fold-vec-pack-double.c
new file mode 100644
index 00000000000..29d049abe80
--- /dev/null
+++ b/gcc/testsuite/gcc.target/powerpc/fold-vec-pack-double.c
@@ -0,0 +1,18 @@
+/* Verify that overloaded built-ins for vec_pack with
+ double inputs produce the right results. */
+
+/* { dg-do compile } */
+/* { dg-require-effective-target powerpc_p8vector_ok } */
+/* { dg-options "-mvsx -mpower8-vector -O2" } */
+
+#include <altivec.h>
+
+// vector float vec_pack (vector double, vector double);
+
+vector float
+test_pack (vector double vd2, vector double vd3)
+{
+ return vec_pack (vd2, vd3);
+}
+
+/* { dg-final { scan-assembler-times "vpkudum" 1 } } */
diff --git a/gcc/testsuite/gcc.target/powerpc/fold-vec-pack-int.c b/gcc/testsuite/gcc.target/powerpc/fold-vec-pack-int.c
new file mode 100644
index 00000000000..940faf36755
--- /dev/null
+++ b/gcc/testsuite/gcc.target/powerpc/fold-vec-pack-int.c
@@ -0,0 +1,28 @@
+/* Verify that overloaded built-ins for vec_pack with int
+ inputs produce the right results. */
+
+/* { dg-do compile } */
+/* { dg-require-effective-target powerpc_altivec_ok } */
+/* { dg-options "-maltivec -O2" } */
+
+#include <altivec.h>
+
+vector bool short
+testbi_h (vector bool int vbi2, vector bool int vbi3)
+{
+ return vec_pack (vbi2, vbi3);
+}
+
+vector signed short
+testsi_h (vector signed int vsi2, vector signed int vsi3)
+{
+ return vec_pack (vsi2, vsi3);
+}
+
+vector unsigned short
+testui_h (vector unsigned int vui2, vector unsigned int vui3)
+{
+ return vec_pack (vui2, vui3);
+}
+
+/* { dg-final { scan-assembler-times "vpkuwum" 3 } } */
diff --git a/gcc/testsuite/gcc.target/powerpc/fold-vec-pack-longlong.c b/gcc/testsuite/gcc.target/powerpc/fold-vec-pack-longlong.c
new file mode 100644
index 00000000000..25c3c3710d2
--- /dev/null
+++ b/gcc/testsuite/gcc.target/powerpc/fold-vec-pack-longlong.c
@@ -0,0 +1,28 @@
+/* Verify that overloaded built-ins for vec_pack with long long
+ inputs produce the right results. */
+
+/* { dg-do compile { target lp64 } } */
+/* { dg-require-effective-target powerpc_p8vector_ok } */
+/* { dg-options "-mvsx -mpower8-vector -O2" } */
+
+#include <altivec.h>
+
+vector bool int
+testbl_h (vector bool long long vbl2, vector bool long long vbl3)
+{
+ return vec_pack (vbl2, vbl3);
+}
+
+vector signed int
+testsl_h (vector signed long long vsl2, vector signed long long vsl3)
+{
+ return vec_pack (vsl2, vsl3);
+}
+
+vector unsigned int
+testul_h (vector unsigned long vul2, vector unsigned long vul3)
+{
+ return vec_pack (vul2, vul3);
+}
+
+/* { dg-final { scan-assembler-times "vpkudum" 3 } } */
diff --git a/gcc/testsuite/gcc.target/powerpc/fold-vec-pack-short.c b/gcc/testsuite/gcc.target/powerpc/fold-vec-pack-short.c
new file mode 100644
index 00000000000..37cd191dbd8
--- /dev/null
+++ b/gcc/testsuite/gcc.target/powerpc/fold-vec-pack-short.c
@@ -0,0 +1,28 @@
+/* Verify that overloaded built-ins for vec_pack with short
+ inputs produce the right results. */
+
+/* { dg-do compile } */
+/* { dg-require-effective-target powerpc_altivec_ok } */
+/* { dg-options "-maltivec -O2" } */
+
+#include <altivec.h>
+
+vector bool char
+testbi_eh (vector bool short vbs2, vector bool short vbs3)
+{
+ return vec_pack (vbs2, vbs3);
+}
+
+vector signed char
+testsi_eh (vector signed short vss2, vector signed short vss3)
+{
+ return vec_pack (vss2, vss3);
+}
+
+vector unsigned char
+testui_eh (vector unsigned short vus2, vector unsigned short vus3)
+{
+ return vec_pack (vus2, vus3);
+}
+
+/* { dg-final { scan-assembler-times "vpkuhum" 3 } } */
diff --git a/gcc/testsuite/gcc.target/powerpc/pr81622.c b/gcc/testsuite/gcc.target/powerpc/pr81622.c
new file mode 100644
index 00000000000..fa13ac98a2b
--- /dev/null
+++ b/gcc/testsuite/gcc.target/powerpc/pr81622.c
@@ -0,0 +1,13 @@
+/* PR target/81622 */
+/* { dg-do compile { target { powerpc*-*-linux* } } } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power9" } } */
+/* { dg-require-effective-target powerpc_p9vector_ok } */
+/* { dg-options "-mcpu=power9 -O2" } */
+
+void
+foo (void)
+{
+ __builtin_vec_ld (1, 2); /* { dg-error "invalid parameter combination" } */
+ __builtin_vec_cmpne (1, 2); /* { dg-error "invalid parameter combination" } */
+ __builtin_vec_st (1, 0, 5); /* { dg-error "invalid parameter combination" } */
+}
diff --git a/gcc/testsuite/gcc.target/powerpc/vec-setup-be-double.c b/gcc/testsuite/gcc.target/powerpc/vec-setup-be-double.c
new file mode 100644
index 00000000000..acf429acaa9
--- /dev/null
+++ b/gcc/testsuite/gcc.target/powerpc/vec-setup-be-double.c
@@ -0,0 +1,12 @@
+/* { dg-do run { target { powerpc*-*-linux* } } } */
+/* { dg-require-effective-target vsx_hw } */
+/* { dg-options "-O2 -mvsx" } */
+
+/* Test various ways of creating vectors with 2 double words and accessing the
+ elements. This test uses the double datatype.
+
+ This test explicitly tests -maltivec=be to make sure things are correct. */
+
+#define DO_DOUBLE
+
+#include "vec-setup.h"
diff --git a/gcc/testsuite/gcc.target/powerpc/vec-setup-be-long.c b/gcc/testsuite/gcc.target/powerpc/vec-setup-be-long.c
new file mode 100644
index 00000000000..492cd2d76a2
--- /dev/null
+++ b/gcc/testsuite/gcc.target/powerpc/vec-setup-be-long.c
@@ -0,0 +1,11 @@
+/* { dg-do run { target { powerpc64le*-*-linux* } } } */
+/* { dg-require-effective-target vsx_hw } */
+/* { dg-options "-O2 -mvsx -maltivec=be" } */
+
+/* Test various ways of creating vectors with 2 double words and accessing the
+ elements. This test uses the long (on 64-bit systems) or long long datatype
+ (on 32-bit systems).
+
+ This test explicitly tests -maltivec=be to make sure things are correct. */
+
+#include "vec-setup.h"
diff --git a/gcc/testsuite/gcc.target/powerpc/vec-setup-double.c b/gcc/testsuite/gcc.target/powerpc/vec-setup-double.c
new file mode 100644
index 00000000000..36c6405caf7
--- /dev/null
+++ b/gcc/testsuite/gcc.target/powerpc/vec-setup-double.c
@@ -0,0 +1,11 @@
+/* { dg-do run { target { powerpc*-*-linux* } } } */
+/* { dg-require-effective-target vsx_hw } */
+/* { dg-options "-O2 -mvsx" } */
+
+/* Test various ways of creating vectors with 2 double words and accessing the
+ elements. This test uses the double datatype and the default endian
+ order. */
+
+#define DO_DOUBLE
+
+#include "vec-setup.h"
diff --git a/gcc/testsuite/gcc.target/powerpc/vec-setup-long.c b/gcc/testsuite/gcc.target/powerpc/vec-setup-long.c
new file mode 100644
index 00000000000..5588e1586f3
--- /dev/null
+++ b/gcc/testsuite/gcc.target/powerpc/vec-setup-long.c
@@ -0,0 +1,9 @@
+/* { dg-do run { target { powerpc*-*-linux* } } } */
+/* { dg-require-effective-target vsx_hw } */
+/* { dg-options "-O2 -mvsx" } */
+
+/* Test various ways of creating vectors with 2 double words and accessing the
+ elements. This test uses the long (on 64-bit systems) or long long datatype
+ (on 32-bit systems). The default endian order is used. */
+
+#include "vec-setup.h"
diff --git a/gcc/testsuite/gcc.target/powerpc/vec-setup.h b/gcc/testsuite/gcc.target/powerpc/vec-setup.h
new file mode 100644
index 00000000000..9e251646d2d
--- /dev/null
+++ b/gcc/testsuite/gcc.target/powerpc/vec-setup.h
@@ -0,0 +1,366 @@
+#include <altivec.h>
+
+/* Test various ways of creating vectors with 2 double words and accessing the
+ elements. This include files supports:
+
+ testing double
+ testing long on 64-bit systems
+ testing long long on 32-bit systems.
+
+ The endian support is:
+
+ big endian
+ little endian with little endian element ordering
+ little endian with big endian element ordering. */
+
+#ifdef DEBUG
+#include <stdio.h>
+#define DEBUG0(STR) fputs (STR, stdout)
+#define DEBUG2(STR,A,B) printf (STR, A, B)
+
+static int errors = 0;
+
+#else
+#include <stdlib.h>
+#define DEBUG0(STR)
+#define DEBUG2(STR,A,B)
+#endif
+
+#if defined(DO_DOUBLE)
+#define TYPE double
+#define STYPE "double"
+#define ZERO 0.0
+#define ONE 1.0
+#define TWO 2.0
+#define THREE 3.0
+#define FOUR 4.0
+#define FIVE 5.0
+#define SIX 6.0
+#define FMT "g"
+
+#elif defined(_ARCH_PPC64)
+#define TYPE long
+#define STYPE "long"
+#define ZERO 0L
+#define ONE 1L
+#define TWO 2L
+#define THREE 3L
+#define FOUR 4L
+#define FIVE 5L
+#define SIX 6L
+#define FMT "ld"
+
+#else
+#define TYPE long long
+#define STYPE "long long"
+#define ZERO 0LL
+#define ONE 1LL
+#define TWO 2LL
+#define THREE 3LL
+#define FOUR 4LL
+#define FIVE 5LL
+#define SIX 6LL
+#define FMT "lld"
+#endif
+
+/* Macros to order the left/right values correctly. Note, -maltivec=be does
+ not change the order for static initializations, so we have to handle it
+ specially. */
+
+#if __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
+#define INIT_ORDER(A, B) (TYPE) A, (TYPE) B
+#define ELEMENT_ORDER(A, B) (TYPE) A, (TYPE) B
+#define ENDIAN "-mbig"
+
+#elif __VEC_ELEMENT_REG_ORDER__ == __ORDER_BIG_ENDIAN__
+#define NO_ARRAY
+#define INIT_ORDER(A, B) (TYPE) B, (TYPE) A
+#define ELEMENT_ORDER(A, B) (TYPE) A, (TYPE) B
+#define ENDIAN "-mlittle -maltivec=be"
+
+#else
+#define INIT_ORDER(A, B) (TYPE) B, (TYPE) A
+#define ELEMENT_ORDER(A, B) (TYPE) B, (TYPE) A
+#define ENDIAN "-mlittle"
+#endif
+
+static volatile TYPE five = FIVE;
+static volatile TYPE six = SIX;
+static volatile vector TYPE s_v12 = { ONE, TWO };
+static volatile vector TYPE g_v34 = { THREE, FOUR };
+
+
+__attribute__((__noinline__))
+static void
+vector_check (vector TYPE v, TYPE expect_hi, TYPE expect_lo)
+{
+ TYPE actual_hi, actual_lo;
+#ifdef DEBUG
+ const char *pass_fail;
+#endif
+
+ __asm__ ("xxlor %x0,%x1,%x1" : "=&wa" (actual_hi) : "wa" (v));
+ __asm__ ("xxpermdi %x0,%x1,%x1,3" : "=&wa" (actual_lo) : "wa" (v));
+
+#ifdef DEBUG
+ if ((actual_hi == expect_hi) && (actual_lo == expect_lo))
+ pass_fail = ", pass";
+ else
+ {
+ pass_fail = ", fail";
+ errors++;
+ }
+
+ printf ("Expected %" FMT ", %" FMT ", got %" FMT ", %" FMT "%s\n",
+ expect_hi, expect_lo,
+ actual_hi, actual_lo,
+ pass_fail);
+#else
+ if ((actual_hi != expect_hi) || (actual_lo != expect_lo))
+ abort ();
+#endif
+}
+
+__attribute__((__noinline__))
+static vector TYPE
+combine (TYPE op0, TYPE op1)
+{
+ return (vector TYPE) { op0, op1 };
+}
+
+__attribute__((__noinline__))
+static vector TYPE
+combine_insert (TYPE op0, TYPE op1)
+{
+ vector TYPE ret = (vector TYPE) { ZERO, ZERO };
+ ret = vec_insert (op0, ret, 0);
+ ret = vec_insert (op1, ret, 1);
+ return ret;
+}
+
+__attribute__((__noinline__))
+static vector TYPE
+concat_extract_00 (vector TYPE a, vector TYPE b)
+{
+ return (vector TYPE) { vec_extract (a, 0), vec_extract (b, 0) };
+}
+
+__attribute__((__noinline__))
+static vector TYPE
+concat_extract_01 (vector TYPE a, vector TYPE b)
+{
+ return (vector TYPE) { vec_extract (a, 0), vec_extract (b, 1) };
+}
+
+__attribute__((__noinline__))
+static vector TYPE
+concat_extract_10 (vector TYPE a, vector TYPE b)
+{
+ return (vector TYPE) { vec_extract (a, 1), vec_extract (b, 0) };
+}
+
+__attribute__((__noinline__))
+static vector TYPE
+concat_extract_11 (vector TYPE a, vector TYPE b)
+{
+ return (vector TYPE) { vec_extract (a, 1), vec_extract (b, 1) };
+}
+
+__attribute__((__noinline__))
+static vector TYPE
+concat_extract2_0s (vector TYPE a, TYPE b)
+{
+ return (vector TYPE) { vec_extract (a, 0), b };
+}
+
+__attribute__((__noinline__))
+static vector TYPE
+concat_extract2_1s (vector TYPE a, TYPE b)
+{
+ return (vector TYPE) { vec_extract (a, 1), b };
+}
+
+__attribute__((__noinline__))
+static vector TYPE
+concat_extract2_s0 (TYPE a, vector TYPE b)
+{
+ return (vector TYPE) { a, vec_extract (b, 0) };
+}
+
+__attribute__((__noinline__))
+static vector TYPE
+concat_extract2_s1 (TYPE a, vector TYPE b)
+{
+ return (vector TYPE) { a, vec_extract (b, 1) };
+}
+
+__attribute__((__noinline__))
+static vector TYPE
+concat_extract_nn (vector TYPE a, vector TYPE b, size_t i, size_t j)
+{
+ return (vector TYPE) { vec_extract (a, i), vec_extract (b, j) };
+}
+
+#ifndef NO_ARRAY
+__attribute__((__noinline__))
+static vector TYPE
+array_0 (vector TYPE v, TYPE a)
+{
+ v[0] = a;
+ return v;
+}
+
+__attribute__((__noinline__))
+static vector TYPE
+array_1 (vector TYPE v, TYPE a)
+{
+ v[1] = a;
+ return v;
+}
+
+__attribute__((__noinline__))
+static vector TYPE
+array_01 (vector TYPE v, TYPE a, TYPE b)
+{
+ v[0] = a;
+ v[1] = b;
+ return v;
+}
+
+__attribute__((__noinline__))
+static vector TYPE
+array_01b (TYPE a, TYPE b)
+{
+ vector TYPE v = (vector TYPE) { 0, 0 };
+ v[0] = a;
+ v[1] = b;
+ return v;
+}
+#endif
+
+int
+main (void)
+{
+ vector TYPE a = (vector TYPE) { ONE, TWO };
+ vector TYPE b = (vector TYPE) { THREE, FOUR };
+ size_t i, j;
+
+#ifndef NO_ARRAY
+ vector TYPE z = (vector TYPE) { ZERO, ZERO };
+#endif
+
+ DEBUG2 ("Endian: %s, type: %s\n", ENDIAN, STYPE);
+ DEBUG0 ("\nStatic/global initialization\n");
+ vector_check (s_v12, INIT_ORDER (1, 2));
+ vector_check (g_v34, INIT_ORDER (3, 4));
+
+ DEBUG0 ("\nVector via constant runtime intiialization\n");
+ vector_check (a, INIT_ORDER (1, 2));
+ vector_check (b, INIT_ORDER (3, 4));
+
+ DEBUG0 ("\nCombine scalars using vector initialization\n");
+ vector_check (combine (1, 2), INIT_ORDER (1, 2));
+ vector_check (combine (3, 4), INIT_ORDER (3, 4));
+
+ DEBUG0 ("\nSetup with vec_insert\n");
+ a = combine_insert (1, 2);
+ b = combine_insert (3, 4);
+ vector_check (a, ELEMENT_ORDER (1, 2));
+ vector_check (b, ELEMENT_ORDER (3, 4));
+
+#ifndef NO_ARRAY
+ DEBUG0 ("\nTesting array syntax\n");
+ vector_check (array_0 (a, FIVE), ELEMENT_ORDER (5, 2));
+ vector_check (array_1 (b, SIX), ELEMENT_ORDER (3, 6));
+ vector_check (array_01 (z, FIVE, SIX), ELEMENT_ORDER (5, 6));
+ vector_check (array_01b (FIVE, SIX), ELEMENT_ORDER (5, 6));
+
+ vector_check (array_0 (a, five), ELEMENT_ORDER (5, 2));
+ vector_check (array_1 (b, six), ELEMENT_ORDER (3, 6));
+ vector_check (array_01 (z, five, six), ELEMENT_ORDER (5, 6));
+ vector_check (array_01b (five, six), ELEMENT_ORDER (5, 6));
+#else
+ DEBUG0 ("\nSkipping array syntax on -maltivec=be\n");
+#endif
+
+ DEBUG0 ("\nTesting concat and extract\n");
+ vector_check (concat_extract_00 (a, b), INIT_ORDER (1, 3));
+ vector_check (concat_extract_01 (a, b), INIT_ORDER (1, 4));
+ vector_check (concat_extract_10 (a, b), INIT_ORDER (2, 3));
+ vector_check (concat_extract_11 (a, b), INIT_ORDER (2, 4));
+
+ DEBUG0 ("\nTesting concat and extract #2\n");
+ vector_check (concat_extract2_0s (a, FIVE), INIT_ORDER (1, 5));
+ vector_check (concat_extract2_1s (a, FIVE), INIT_ORDER (2, 5));
+ vector_check (concat_extract2_s0 (SIX, a), INIT_ORDER (6, 1));
+ vector_check (concat_extract2_s1 (SIX, a), INIT_ORDER (6, 2));
+
+ DEBUG0 ("\nTesting variable concat and extract\n");
+ for (i = 0; i < 2; i++)
+ {
+ for (j = 0; j < 2; j++)
+ {
+ static struct {
+ TYPE hi;
+ TYPE lo;
+ } hilo[2][2] =
+ { { { ONE, THREE }, { ONE, FOUR } },
+ { { TWO, THREE }, { TWO, FOUR } } };
+
+ vector_check (concat_extract_nn (a, b, i, j),
+ INIT_ORDER (hilo[i][j].hi, hilo[i][j].lo));
+ }
+ }
+
+ DEBUG0 ("\nTesting separate function\n");
+ vector_check (combine (vec_extract (a, 0), vec_extract (b, 0)),
+ INIT_ORDER (1, 3));
+
+ vector_check (combine (vec_extract (a, 0), vec_extract (b, 1)),
+ INIT_ORDER (1, 4));
+
+ vector_check (combine (vec_extract (a, 1), vec_extract (b, 0)),
+ INIT_ORDER (2, 3));
+
+ vector_check (combine (vec_extract (a, 1), vec_extract (b, 1)),
+ INIT_ORDER (2, 4));
+
+ vector_check (combine_insert (vec_extract (a, 0), vec_extract (b, 0)),
+ ELEMENT_ORDER (1, 3));
+
+ vector_check (combine_insert (vec_extract (a, 0), vec_extract (b, 1)),
+ ELEMENT_ORDER (1, 4));
+
+ vector_check (combine_insert (vec_extract (a, 1), vec_extract (b, 0)),
+ ELEMENT_ORDER (2, 3));
+
+ vector_check (combine_insert (vec_extract (a, 1), vec_extract (b, 1)),
+ ELEMENT_ORDER (2, 4));
+
+
+#if defined(DO_DOUBLE)
+ DEBUG0 ("\nTesting explicit 2df concat\n");
+ vector_check (__builtin_vsx_concat_2df (FIVE, SIX), INIT_ORDER (5, 6));
+ vector_check (__builtin_vsx_concat_2df (five, six), INIT_ORDER (5, 6));
+
+#elif defined(_ARCH_PPC64)
+ DEBUG0 ("\nTesting explicit 2di concat\n");
+ vector_check (__builtin_vsx_concat_2di (FIVE, SIX), INIT_ORDER (5, 6));
+ vector_check (__builtin_vsx_concat_2di (five, six), INIT_ORDER (5, 6));
+
+#else
+ DEBUG0 ("\nSkip explicit 2di concat on 32-bit\n");
+#endif
+
+#ifdef DEBUG
+ if (errors)
+ printf ("\n%d error%s were found", errors, (errors == 1) ? "" : "s");
+ else
+ printf ("\nNo errors were found.\n");
+
+ return errors;
+
+#else
+ return 0;
+#endif
+}
diff --git a/gcc/testsuite/gcc.target/powerpc/vsu/vec-all-nez-7.c b/gcc/testsuite/gcc.target/powerpc/vsu/vec-all-nez-7.c
index 8f8271f8f1c..d2febf934f3 100644
--- a/gcc/testsuite/gcc.target/powerpc/vsu/vec-all-nez-7.c
+++ b/gcc/testsuite/gcc.target/powerpc/vsu/vec-all-nez-7.c
@@ -12,5 +12,5 @@ test_all_not_equal_and_not_zero (vector unsigned short *arg1_p,
vector unsigned short arg_1 = *arg1_p;
vector unsigned short arg_2 = *arg2_p;
- return __builtin_vec_vcmpnez_p (__CR6_LT, arg_1, arg_2); /* { dg-error "Builtin function __builtin_vec_vcmpnez_p not supported in this compiler configuration" } */
+ return __builtin_vec_vcmpnez_p (__CR6_LT, arg_1, arg_2); /* { dg-error "builtin function __builtin_vec_vcmpnez_p not supported in this compiler configuration" } */
}
diff --git a/gcc/testsuite/gcc.target/powerpc/vsu/vec-any-eqz-7.c b/gcc/testsuite/gcc.target/powerpc/vsu/vec-any-eqz-7.c
index 7b2d4ddf49b..5e1226a651e 100644
--- a/gcc/testsuite/gcc.target/powerpc/vsu/vec-any-eqz-7.c
+++ b/gcc/testsuite/gcc.target/powerpc/vsu/vec-any-eqz-7.c
@@ -11,5 +11,5 @@ test_any_equal (vector unsigned int *arg1_p, vector unsigned int *arg2_p)
vector unsigned int arg_1 = *arg1_p;
vector unsigned int arg_2 = *arg2_p;
- return __builtin_vec_vcmpnez_p (__CR6_LT_REV, arg_1, arg_2); /* { dg-error "Builtin function __builtin_vec_vcmpnez_p not supported in this compiler configuration" } */
+ return __builtin_vec_vcmpnez_p (__CR6_LT_REV, arg_1, arg_2); /* { dg-error "builtin function __builtin_vec_vcmpnez_p not supported in this compiler configuration" } */
}
diff --git a/gcc/testsuite/gcc.target/powerpc/vsu/vec-cmpnez-7.c b/gcc/testsuite/gcc.target/powerpc/vsu/vec-cmpnez-7.c
index 06eb8d7cec6..c425d5a37c2 100644
--- a/gcc/testsuite/gcc.target/powerpc/vsu/vec-cmpnez-7.c
+++ b/gcc/testsuite/gcc.target/powerpc/vsu/vec-cmpnez-7.c
@@ -11,5 +11,5 @@ fetch_data (vector unsigned int *arg1_p, vector unsigned int *arg2_p)
vector unsigned int arg_1 = *arg1_p;
vector unsigned int arg_2 = *arg2_p;
- return __builtin_vec_vcmpnez (arg_1, arg_2); /* { dg-error "Builtin function __builtin_altivec_vcmpnezw requires the -mcpu=power9 option" } */
+ return __builtin_vec_vcmpnez (arg_1, arg_2); /* { dg-error "builtin function __builtin_altivec_vcmpnezw requires the -mcpu=power9 option" } */
}
diff --git a/gcc/testsuite/gcc.target/powerpc/vsu/vec-cntlz-lsbb-2.c b/gcc/testsuite/gcc.target/powerpc/vsu/vec-cntlz-lsbb-2.c
index f1f30092bd3..03c44c11fb5 100644
--- a/gcc/testsuite/gcc.target/powerpc/vsu/vec-cntlz-lsbb-2.c
+++ b/gcc/testsuite/gcc.target/powerpc/vsu/vec-cntlz-lsbb-2.c
@@ -10,5 +10,5 @@ count_leading_zero_byte_bits (vector unsigned char *arg1_p)
{
vector unsigned char arg_1 = *arg1_p;
- return __builtin_vec_vclzlsbb (arg_1); /* { dg-error "Builtin function __builtin_altivec_vclzlsbb requires the -mcpu=power9 option" } */
+ return __builtin_vec_vclzlsbb (arg_1); /* { dg-error "builtin function __builtin_altivec_vclzlsbb requires the -mcpu=power9 option" } */
}
diff --git a/gcc/testsuite/gcc.target/powerpc/vsu/vec-cnttz-lsbb-2.c b/gcc/testsuite/gcc.target/powerpc/vsu/vec-cnttz-lsbb-2.c
index 4d6182b02c7..1171e25adba 100644
--- a/gcc/testsuite/gcc.target/powerpc/vsu/vec-cnttz-lsbb-2.c
+++ b/gcc/testsuite/gcc.target/powerpc/vsu/vec-cnttz-lsbb-2.c
@@ -10,5 +10,5 @@ count_trailing_zero_byte_bits (vector unsigned char *arg1_p)
{
vector unsigned char arg_1 = *arg1_p;
- return __builtin_vec_vctzlsbb (arg_1); /* { dg-error "Builtin function __builtin_altivec_vctzlsbb requires the -mcpu=power9 option" } */
+ return __builtin_vec_vctzlsbb (arg_1); /* { dg-error "builtin function __builtin_altivec_vctzlsbb requires the -mcpu=power9 option" } */
}
diff --git a/gcc/testsuite/gcc.target/powerpc/vsu/vec-xl-len-12.c b/gcc/testsuite/gcc.target/powerpc/vsu/vec-xl-len-12.c
index 6e81b383936..cb61fc8a9b9 100644
--- a/gcc/testsuite/gcc.target/powerpc/vsu/vec-xl-len-12.c
+++ b/gcc/testsuite/gcc.target/powerpc/vsu/vec-xl-len-12.c
@@ -12,5 +12,5 @@
__vector float
fetch_data (float *address, size_t length)
{
- return __builtin_vec_lxvl (address, length); /* { dg-error "Builtin function __builtin_vsx_lxvl requires" } */
+ return __builtin_vec_lxvl (address, length); /* { dg-error "builtin function __builtin_vsx_lxvl requires" } */
}
diff --git a/gcc/testsuite/gcc.target/powerpc/vsu/vec-xl-len-13.c b/gcc/testsuite/gcc.target/powerpc/vsu/vec-xl-len-13.c
index 58d364131ba..55e3db43ca2 100644
--- a/gcc/testsuite/gcc.target/powerpc/vsu/vec-xl-len-13.c
+++ b/gcc/testsuite/gcc.target/powerpc/vsu/vec-xl-len-13.c
@@ -14,5 +14,5 @@
__vector float
fetch_data (float *address, size_t length)
{
- return __builtin_vec_lxvl (address, length); /* { dg-error "Builtin function __builtin_vec_lxvl not supported in this compiler configuration" } */
+ return __builtin_vec_lxvl (address, length); /* { dg-error "builtin function __builtin_vec_lxvl not supported in this compiler configuration" } */
}
diff --git a/gcc/testsuite/gcc.target/powerpc/vsu/vec-xlx-7.c b/gcc/testsuite/gcc.target/powerpc/vsu/vec-xlx-7.c
index 2fc5567b043..2a69302fe56 100644
--- a/gcc/testsuite/gcc.target/powerpc/vsu/vec-xlx-7.c
+++ b/gcc/testsuite/gcc.target/powerpc/vsu/vec-xlx-7.c
@@ -11,5 +11,5 @@ fetch_data (unsigned int offset, vector signed int *datap)
{
vector signed int data = *datap;
- return __builtin_vec_vextulx (offset, data); /* { dg-error "Builtin function __builtin_altivec_vextuwlx requires" } */
+ return __builtin_vec_vextulx (offset, data); /* { dg-error "builtin function __builtin_altivec_vextuwlx requires" } */
}
diff --git a/gcc/testsuite/gcc.target/powerpc/vsu/vec-xrx-7.c b/gcc/testsuite/gcc.target/powerpc/vsu/vec-xrx-7.c
index fb82157ca10..27215ce23e5 100644
--- a/gcc/testsuite/gcc.target/powerpc/vsu/vec-xrx-7.c
+++ b/gcc/testsuite/gcc.target/powerpc/vsu/vec-xrx-7.c
@@ -11,5 +11,5 @@ fetch_data (unsigned short offset, vector signed short *datap)
{
vector signed short data = *datap;
- return __builtin_vec_vexturx (offset, data); /* { dg-error "Builtin function __builtin_altivec_vextuhrx requires" } */
+ return __builtin_vec_vexturx (offset, data); /* { dg-error "builtin function __builtin_altivec_vextuhrx requires" } */
}
diff --git a/gcc/testsuite/gcc.target/powerpc/vsu/vec-xst-len-12.c b/gcc/testsuite/gcc.target/powerpc/vsu/vec-xst-len-12.c
index 42fe2c638ed..86354b03d66 100644
--- a/gcc/testsuite/gcc.target/powerpc/vsu/vec-xst-len-12.c
+++ b/gcc/testsuite/gcc.target/powerpc/vsu/vec-xst-len-12.c
@@ -14,5 +14,5 @@ store_data (vector double *datap, double *address, size_t length)
{
vector double data = *datap;
- __builtin_vec_stxvl (data, address, length); /* { dg-error "Builtin function __builtin_vec_stxvl not supported in this compiler configuration" } */
+ __builtin_vec_stxvl (data, address, length); /* { dg-error "builtin function __builtin_vec_stxvl not supported in this compiler configuration" } */
}
diff --git a/gcc/testsuite/gcc.target/powerpc/vsu/vec-xst-len-13.c b/gcc/testsuite/gcc.target/powerpc/vsu/vec-xst-len-13.c
index cc07b3a7f64..49feaa67a18 100644
--- a/gcc/testsuite/gcc.target/powerpc/vsu/vec-xst-len-13.c
+++ b/gcc/testsuite/gcc.target/powerpc/vsu/vec-xst-len-13.c
@@ -15,5 +15,5 @@ store_data (vector double *datap, double *address, size_t length)
{
vector double data = *datap;
- __builtin_vec_stxvl (data, address, length); /* { dg-error "Builtin function __builtin_altivec_stxvl requires" } */
+ __builtin_vec_stxvl (data, address, length); /* { dg-error "builtin function __builtin_altivec_stxvl requires" } */
}
diff --git a/gcc/testsuite/gcc.target/powerpc/vsx-extract-6.c b/gcc/testsuite/gcc.target/powerpc/vsx-extract-6.c
new file mode 100644
index 00000000000..8a5eb573f79
--- /dev/null
+++ b/gcc/testsuite/gcc.target/powerpc/vsx-extract-6.c
@@ -0,0 +1,25 @@
+/* { dg-do compile { target { powerpc*-*-* && lp64 } } } */
+/* { dg-skip-if "" { powerpc*-*-darwin* } } */
+/* { dg-require-effective-target powerpc_vsx_ok } */
+/* { dg-options "-O2 -mvsx" } */
+
+vector unsigned long
+test_vpasted (vector unsigned long high, vector unsigned long low)
+{
+ vector unsigned long res;
+ res[1] = high[1];
+ res[0] = low[0];
+ return res;
+}
+
+/* { dg-final { scan-assembler-times {\mxxpermdi\M} 1 } } */
+/* { dg-final { scan-assembler-not {\mvspltisw\M} } } */
+/* { dg-final { scan-assembler-not {\mxxlor\M} } } */
+/* { dg-final { scan-assembler-not {\mxxlxor\M} } } */
+/* { dg-final { scan-assembler-not {\mxxspltib\M} } } */
+/* { dg-final { scan-assembler-not {\mlxvx?\M} } } */
+/* { dg-final { scan-assembler-not {\mlxv[dw][24]x\M} } } */
+/* { dg-final { scan-assembler-not {\mlvx\M} } } */
+/* { dg-final { scan-assembler-not {\mstxvx?\M} } } */
+/* { dg-final { scan-assembler-not {\mstxv[dw][24]x\M} } } */
+/* { dg-final { scan-assembler-not {\mstvx\M} } } */
diff --git a/gcc/testsuite/gcc.target/powerpc/vsx-extract-7.c b/gcc/testsuite/gcc.target/powerpc/vsx-extract-7.c
new file mode 100644
index 00000000000..961a980794e
--- /dev/null
+++ b/gcc/testsuite/gcc.target/powerpc/vsx-extract-7.c
@@ -0,0 +1,25 @@
+/* { dg-do compile { target { powerpc*-*-* } } } */
+/* { dg-skip-if "" { powerpc*-*-darwin* } } */
+/* { dg-require-effective-target powerpc_vsx_ok } */
+/* { dg-options "-O2 -mvsx" } */
+
+vector double
+test_vpasted (vector double high, vector double low)
+{
+ vector double res;
+ res[1] = high[1];
+ res[0] = low[0];
+ return res;
+}
+
+/* { dg-final { scan-assembler-times {\mxxpermdi\M} 1 } } */
+/* { dg-final { scan-assembler-not {\mvspltisw\M} } } */
+/* { dg-final { scan-assembler-not {\mxxlor\M} } } */
+/* { dg-final { scan-assembler-not {\mxxlxor\M} } } */
+/* { dg-final { scan-assembler-not {\mxxspltib\M} } } */
+/* { dg-final { scan-assembler-not {\mlxvx?\M} } } */
+/* { dg-final { scan-assembler-not {\mlxv[dw][24]x\M} } } */
+/* { dg-final { scan-assembler-not {\mlvx\M} } } */
+/* { dg-final { scan-assembler-not {\mstxvx?\M} } } */
+/* { dg-final { scan-assembler-not {\mstxv[dw][24]x\M} } } */
+/* { dg-final { scan-assembler-not {\mstvx\M} } } */
diff --git a/gcc/testsuite/gfortran.dg/bind_c_usage_30.f90 b/gcc/testsuite/gfortran.dg/bind_c_usage_30.f90
new file mode 100644
index 00000000000..932d38edd30
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/bind_c_usage_30.f90
@@ -0,0 +1,6 @@
+! { dg-do compile }
+! PR 60355 - there was no error message for implicitly typed variables
+! Test case contributed by Vladimir Fuka
+program main
+ bind(c) test_BIND ! { dg-error "cannot be BIND" }
+END
diff --git a/gcc/testsuite/gfortran.dg/dec_d_lines_1.f b/gcc/testsuite/gfortran.dg/dec_d_lines_1.f
new file mode 100644
index 00000000000..2cc7a01daff
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/dec_d_lines_1.f
@@ -0,0 +1,9 @@
+! { dg-do compile }
+! { dg-options "-ffixed-form -fd-lines-as-code -fdec" }
+!
+! Ensure -fd-lines-as-code is not overridden by -fdec.
+!
+ i = 0
+d end
+ subroutine s
+D end
diff --git a/gcc/testsuite/gfortran.dg/dec_d_lines_2.f b/gcc/testsuite/gfortran.dg/dec_d_lines_2.f
new file mode 100644
index 00000000000..31eaf5f2328
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/dec_d_lines_2.f
@@ -0,0 +1,8 @@
+! { dg-do compile }
+! { dg-options "-ffixed-form -fdec" }
+!
+! Ensure -fd-lines-as-comments is enabled by default with -fdec.
+!
+d This is a comment.
+D This line, too.
+ end
diff --git a/gcc/testsuite/gfortran.dg/dec_structure_18.f90 b/gcc/testsuite/gfortran.dg/dec_structure_18.f90
new file mode 100644
index 00000000000..1e6b229216b
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/dec_structure_18.f90
@@ -0,0 +1,38 @@
+ ! { dg-do run }
+ ! { dg-options "-fdec-structure -ffixed-form" }
+ !
+ ! Test the %FILL component extension.
+ !
+ implicit none
+
+ structure /s/
+ character(2) i
+ character(2) %fill
+ character(2) j
+ end structure
+
+ structure /s2/
+ character buf(6)
+ end structure
+
+ record /s/ x
+ record /s2/ y
+ equivalence (x, y)
+
+ x.i = '12'
+ x.j = '34'
+
+ if (y.buf(1) .ne. '1') then
+ call abort
+ endif
+ if (y.buf(2) .ne. '2') then
+ call abort
+ endif
+ if (y.buf(5) .ne. '3') then
+ call abort
+ endif
+ if (y.buf(6) .ne. '4') then
+ call abort
+ endif
+
+ end
diff --git a/gcc/testsuite/gfortran.dg/dec_structure_19.f90 b/gcc/testsuite/gfortran.dg/dec_structure_19.f90
new file mode 100644
index 00000000000..9ea0b3efe13
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/dec_structure_19.f90
@@ -0,0 +1,38 @@
+! { dg-do compile }
+! { dg-options "-fdec-structure -ffree-form" }
+!
+! Test the %FILL component extension.
+!
+implicit none
+
+structure /s/
+ character(2) i
+ character(2) %fill
+ character(2) j
+end structure
+
+structure /s2/
+ character buf(6)
+end structure
+
+record /s/ x
+record /s2/ y
+equivalence (x, y)
+
+x.i = "12"
+x.j = "34"
+
+if (y.buf(1) .ne. '1') then
+ call abort
+endif
+if (y.buf(2) .ne. '2') then
+ call abort
+endif
+if (y.buf(5) .ne. '3') then
+ call abort
+endif
+if (y.buf(6) .ne. '4') then
+ call abort
+endif
+
+end
diff --git a/gcc/testsuite/gfortran.dg/dec_structure_20.f90 b/gcc/testsuite/gfortran.dg/dec_structure_20.f90
new file mode 100644
index 00000000000..9e952040076
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/dec_structure_20.f90
@@ -0,0 +1,18 @@
+ ! { dg-do compile }
+ ! { dg-options "-fdec-structure" }
+ !
+ ! Test error handling for %FILL
+ !
+ implicit none
+
+ structure /s/
+ integer(2) i /3/
+ integer(2) %fill /4/ ! { dg-error "cannot have an initializer" }
+ integer(2), pointer :: %fill ! { dg-error "cannot have attributes" }
+ end structure
+
+ type t
+ integer %fill ! { dg-error "not allowed outside STRUCTURE" }
+ endtype
+
+ end
diff --git a/gcc/testsuite/gfortran.dg/dec_structure_21.f90 b/gcc/testsuite/gfortran.dg/dec_structure_21.f90
new file mode 100644
index 00000000000..64e8ca39e46
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/dec_structure_21.f90
@@ -0,0 +1,10 @@
+ ! { dg-do compile }
+ ! { dg-options "-ffixed-form" }
+ !
+ ! Test errors for %FILL without -fdec-structure.
+ !
+ implicit none
+
+ character(2) %fill ! { dg-error "is a DEC extension" }
+
+ end
diff --git a/gcc/testsuite/gfortran.dg/logical_assignment_1.f90 b/gcc/testsuite/gfortran.dg/logical_assignment_1.f90
new file mode 100644
index 00000000000..c2289805118
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/logical_assignment_1.f90
@@ -0,0 +1,10 @@
+! { dg-do compile }
+! PR 79312 - assigning a logical value to a real
+! is invalid.
+! Test case by John Harper.
+program emptyarray5
+ implicit none
+ real a(0)
+ a = [logical::] ! { dg-error "Can't convert LOGICAL" }
+ print *,size(a)
+end program emptyarray5
diff --git a/gcc/testsuite/gfortran.dg/o_fast_stacksize.f90 b/gcc/testsuite/gfortran.dg/o_fast_stacksize.f90
new file mode 100644
index 00000000000..a373d15e54e
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/o_fast_stacksize.f90
@@ -0,0 +1,17 @@
+! { dg-do compile }
+! { dg-options "-Ofast -fmax-stack-var-size=100 -fdump-tree-original" }
+MODULE foo
+CONTAINS
+ SUBROUTINE mysum(a)
+ INTEGER :: a(:)
+ WRITE(6,*) SUM(a)
+ END SUBROUTINE
+END MODULE foo
+
+USE foo
+INTEGER, ALLOCATABLE :: a(:)
+INTEGER, PARAMETER :: N=2**26 ! 256Mb array
+ALLOCATE(a(N)) ; a=1
+CALL mysum(a*a)
+END
+! { dg-final { scan-tree-dump-times "__builtin_malloc" 2 "original" } }
diff --git a/gcc/testsuite/gfortran.dg/pr81723.f b/gcc/testsuite/gfortran.dg/pr81723.f
new file mode 100644
index 00000000000..977c1b69bbf
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/pr81723.f
@@ -0,0 +1,56 @@
+! { dg-do compile }
+! { dg-options "-O3 -fno-automatic" }
+
+ FUNCTION WWERF(Z)
+
+ IMPLICIT DOUBLE PRECISION (A-H,O-Z)
+ COMPLEX*16 WWERF
+ COMPLEX*16 Z,ZH,R(37),S,T,V,W
+
+ PARAMETER (Z1 = 1, HF = Z1/2, Z10 = 10)
+ PARAMETER (C1 = 74/Z10, C2 = 83/Z10, C3 = Z10/32, C4 = 16/Z10)
+ PARAMETER (C = 1.12837 91670 95512 57D0, P = (2*C4)**33)
+
+ DOUBLE PRECISION GREAL,GIMAG,XARG,YARG
+ COMPLEX*16 ZARG,GCONJG,GCMPLX
+ GREAL( ZARG)=DREAL( ZARG)
+ GIMAG( ZARG)=DIMAG( ZARG)
+ GCONJG(ZARG)=DCONJG(ZARG)
+ GCMPLX(XARG,YARG)=DCMPLX(XARG,YARG)
+
+ X=Z
+ Y=GIMAG(Z)
+ XA=ABS(X)
+ YA=ABS(Y)
+ IF(YA .LT. C1 .AND. XA .LT. C2) THEN
+ ZH=GCMPLX(YA+C4,XA)
+ R(37)=0
+ DO 1 N = 36,1,-1
+ T=ZH+N*GCONJG(R(N+1))
+ 1 R(N)=HF*T/(GREAL(T)**2+GIMAG(T)**2)
+ XL=P
+ S=0
+ DO 2 N = 33,1,-1
+ XL=C3*XL
+ 2 S=R(N)*(S+XL)
+ V=C*S
+ ELSE
+ ZH=GCMPLX(YA,XA)
+ R(1)=0
+ DO 3 N = 9,1,-1
+ T=ZH+N*GCONJG(R(1))
+ 3 R(1)=HF*T/(GREAL(T)**2+GIMAG(T)**2)
+ V=C*R(1)
+ END IF
+ IF(YA .EQ. 0) V=GCMPLX(EXP(-XA**2),GIMAG(V))
+ IF(Y .LT. 0) THEN
+ V=2*EXP(-GCMPLX(XA,YA)**2)-V
+ IF(X .GT. 0) V=GCONJG(V)
+ ELSE
+ IF(X .LT. 0) V=GCONJG(V)
+ END IF
+
+ WWERF=V
+
+ RETURN
+ END
diff --git a/gcc/testsuite/gfortran.dg/use_30.f90 b/gcc/testsuite/gfortran.dg/use_30.f90
new file mode 100644
index 00000000000..b0f2ad470bb
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/use_30.f90
@@ -0,0 +1,17 @@
+! { dg-do compile }
+!
+! PR53542 USE-associated variables shows original instead of renamed symbol name
+! Contributed by Tobias Burnus <burnus@gcc.gnu.org>
+!
+module select_precision
+ integer :: dp = kind(1.0)
+end module select_precision
+
+module ode_types
+ use select_precision, only: wp => dp
+contains
+ subroutine ode_derivative(x)
+ real(wp) :: x ! { dg-error "Parameter .wp. at .1. has not been declared" }
+ end subroutine ode_derivative
+end module ode_types
+end
diff --git a/gcc/testsuite/gnat.dg/debug13.adb b/gcc/testsuite/gnat.dg/debug13.adb
new file mode 100644
index 00000000000..4b94b3e6bf1
--- /dev/null
+++ b/gcc/testsuite/gnat.dg/debug13.adb
@@ -0,0 +1,38 @@
+-- { dg-options "-cargs -O2 -g -margs" }
+
+package body Debug13 is
+
+ procedure Compile (P : Natural)
+ is
+ Max_Pos : constant Natural := P;
+ type Position_Set is array (1 .. Max_Pos) of Boolean;
+
+ Empty : constant Position_Set := (others => False);
+
+ type Position_Set_Array is array (1 .. Max_Pos) of Position_Set;
+
+ Follow : Position_Set_Array := (others => Empty);
+
+ function Get_Follows return Position_Set;
+
+ procedure Make_DFA;
+
+ function Get_Follows return Position_Set is
+ Result : Position_Set := Empty;
+ begin
+ Result := Result or Follow (1);
+
+ return Result;
+ end Get_Follows;
+
+ procedure Make_DFA is
+ Next : constant Position_Set := Get_Follows;
+ begin
+ null;
+ end Make_DFA;
+
+ begin
+ Make_DFA;
+ end Compile;
+
+end Debug13;
diff --git a/gcc/testsuite/gnat.dg/debug13.ads b/gcc/testsuite/gnat.dg/debug13.ads
new file mode 100644
index 00000000000..512a9ef75bb
--- /dev/null
+++ b/gcc/testsuite/gnat.dg/debug13.ads
@@ -0,0 +1,5 @@
+package Debug13 is
+
+ procedure Compile (P : Natural);
+
+end Debug13;
diff --git a/gcc/testsuite/jit.dg/all-non-failing-tests.h b/gcc/testsuite/jit.dg/all-non-failing-tests.h
index 58e0c30eb0f..4af704a4ca2 100644
--- a/gcc/testsuite/jit.dg/all-non-failing-tests.h
+++ b/gcc/testsuite/jit.dg/all-non-failing-tests.h
@@ -228,6 +228,8 @@
of gcc_jit_context_set_bool_allow_unreachable_blocks affects the whole
context. */
+/* test-vector-types.cc: We don't use this, since it's C++. */
+
/* test-volatile.c */
#define create_code create_code_volatile
#define verify_code verify_code_volatile
diff --git a/gcc/testsuite/jit.dg/test-error-gcc_jit_type_get_vector-bad-type.c b/gcc/testsuite/jit.dg/test-error-gcc_jit_type_get_vector-bad-type.c
new file mode 100644
index 00000000000..59aed337184
--- /dev/null
+++ b/gcc/testsuite/jit.dg/test-error-gcc_jit_type_get_vector-bad-type.c
@@ -0,0 +1,30 @@
+#include <stdlib.h>
+#include <stdio.h>
+
+#include "libgccjit.h"
+
+#include "harness.h"
+
+void
+create_code (gcc_jit_context *ctxt, void *user_data)
+{
+ gcc_jit_type *void_type =
+ gcc_jit_context_get_type (ctxt, GCC_JIT_TYPE_VOID);
+
+ /* Trigger an API error by passing a bad type. */
+ (void)gcc_jit_type_get_vector (void_type, 4);
+}
+
+void
+verify_code (gcc_jit_context *ctxt, gcc_jit_result *result)
+{
+ /* Ensure that the bad API usage prevents the API giving a bogus
+ result back. */
+ CHECK_VALUE (result, NULL);
+
+ /* Verify that the correct error message was emitted. */
+ CHECK_STRING_VALUE (gcc_jit_context_get_first_error (ctxt),
+ ("gcc_jit_type_get_vector:"
+ " type is not integral or floating point: void"));
+}
+
diff --git a/gcc/testsuite/jit.dg/test-error-gcc_jit_type_get_vector-non-power-of-two.c b/gcc/testsuite/jit.dg/test-error-gcc_jit_type_get_vector-non-power-of-two.c
new file mode 100644
index 00000000000..aa3bdbde507
--- /dev/null
+++ b/gcc/testsuite/jit.dg/test-error-gcc_jit_type_get_vector-non-power-of-two.c
@@ -0,0 +1,29 @@
+#include <stdlib.h>
+#include <stdio.h>
+
+#include "libgccjit.h"
+
+#include "harness.h"
+
+void
+create_code (gcc_jit_context *ctxt, void *user_data)
+{
+ gcc_jit_type *int_type =
+ gcc_jit_context_get_type (ctxt, GCC_JIT_TYPE_INT);
+
+ /* Trigger an API error by passing a bad number of units. */
+ (void)gcc_jit_type_get_vector (int_type, 7);
+}
+
+void
+verify_code (gcc_jit_context *ctxt, gcc_jit_result *result)
+{
+ /* Ensure that the bad API usage prevents the API giving a bogus
+ result back. */
+ CHECK_VALUE (result, NULL);
+
+ /* Verify that the correct error message was emitted. */
+ CHECK_STRING_VALUE (gcc_jit_context_get_first_error (ctxt),
+ ("gcc_jit_type_get_vector:"
+ " num_units not a power of two: 7"));
+}
diff --git a/gcc/testsuite/jit.dg/test-vector-types.cc b/gcc/testsuite/jit.dg/test-vector-types.cc
new file mode 100644
index 00000000000..3389e04a082
--- /dev/null
+++ b/gcc/testsuite/jit.dg/test-vector-types.cc
@@ -0,0 +1,185 @@
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+
+#include "libgccjit.h"
+
+#include "harness.h"
+
+typedef int v4si __attribute__ ((vector_size (16)));
+typedef unsigned int v4ui __attribute__ ((vector_size (16)));
+typedef float v4f __attribute__ ((vector_size (16)));
+
+static void
+create_vec_fn (gcc_jit_context *ctxt, const char *fnname,
+ gcc_jit_type *the_type, enum gcc_jit_binary_op op)
+{
+ /* Create equivalent to:
+
+ static void
+ FNNAME (const T *a, const T *b, T *c)
+ {
+ *c = *a OP *b;
+ }
+
+ where T is "the_type" (e.g. v4si). */
+
+ gcc_jit_type *ptr_type = gcc_jit_type_get_pointer (the_type);
+
+ gcc_jit_type *const_type = gcc_jit_type_get_const (the_type);
+ gcc_jit_type *ptr_to_const_type = gcc_jit_type_get_pointer (const_type);
+
+ gcc_jit_param *a =
+ gcc_jit_context_new_param (ctxt, NULL, ptr_to_const_type, "a");
+ gcc_jit_param *b =
+ gcc_jit_context_new_param (ctxt, NULL, ptr_to_const_type, "b");
+ gcc_jit_param *c =
+ gcc_jit_context_new_param (ctxt, NULL, ptr_type, "c");
+
+ gcc_jit_type *return_type =
+ gcc_jit_context_get_type (ctxt, GCC_JIT_TYPE_VOID);
+
+ gcc_jit_param *params[3] = {a, b, c};
+ gcc_jit_function *func =
+ gcc_jit_context_new_function (ctxt, NULL,
+ GCC_JIT_FUNCTION_EXPORTED,
+ return_type,
+ fnname,
+ 3, params, 0);
+ gcc_jit_block *initial =
+ gcc_jit_function_new_block (func, "initial");
+
+ /* (*a OP *b) */
+ gcc_jit_rvalue *op_result =
+ gcc_jit_context_new_binary_op (
+ ctxt, NULL,
+ op,
+ the_type,
+ gcc_jit_lvalue_as_rvalue (gcc_jit_rvalue_dereference (gcc_jit_param_as_rvalue (a),
+ NULL)),
+ gcc_jit_lvalue_as_rvalue (gcc_jit_rvalue_dereference (gcc_jit_param_as_rvalue (b),
+ NULL)));
+ /* *c = *a OP *b; */
+ gcc_jit_block_add_assignment (
+ initial, NULL,
+ gcc_jit_rvalue_dereference (gcc_jit_param_as_rvalue (c), NULL),
+ op_result);
+ gcc_jit_block_end_with_void_return (initial, NULL);
+}
+
+void
+create_code (gcc_jit_context *ctxt, void *user_data)
+{
+ gcc_jit_type *int_type = gcc_jit_context_get_type (ctxt, GCC_JIT_TYPE_INT);
+ gcc_jit_type *unsigned_type
+ = gcc_jit_context_get_type (ctxt, GCC_JIT_TYPE_UNSIGNED_INT);
+ gcc_jit_type *float_type = gcc_jit_context_get_type (ctxt, GCC_JIT_TYPE_FLOAT);
+
+ gcc_jit_type *v4si_type = gcc_jit_type_get_vector (int_type, 4);
+ gcc_jit_type *v4ui_type = gcc_jit_type_get_vector (unsigned_type, 4);
+ gcc_jit_type *v4f_type = gcc_jit_type_get_vector (float_type, 4);
+
+ create_vec_fn (ctxt, "jit_v4si_add",
+ v4si_type, GCC_JIT_BINARY_OP_PLUS);
+ create_vec_fn (ctxt, "jit_v4si_sub",
+ v4si_type, GCC_JIT_BINARY_OP_MINUS);
+ create_vec_fn (ctxt, "jit_v4si_mult",
+ v4si_type, GCC_JIT_BINARY_OP_MULT);
+ create_vec_fn (ctxt, "jit_v4si_div",
+ v4si_type, GCC_JIT_BINARY_OP_DIVIDE);
+
+ create_vec_fn (ctxt, "jit_v4ui_add",
+ v4ui_type, GCC_JIT_BINARY_OP_PLUS);
+ create_vec_fn (ctxt, "jit_v4ui_sub",
+ v4ui_type, GCC_JIT_BINARY_OP_MINUS);
+ create_vec_fn (ctxt, "jit_v4ui_mult",
+ v4ui_type, GCC_JIT_BINARY_OP_MULT);
+ create_vec_fn (ctxt, "jit_v4ui_div",
+ v4ui_type, GCC_JIT_BINARY_OP_DIVIDE);
+
+ create_vec_fn (ctxt, "jit_v4f_add",
+ v4f_type, GCC_JIT_BINARY_OP_PLUS);
+ create_vec_fn (ctxt, "jit_v4f_sub",
+ v4f_type, GCC_JIT_BINARY_OP_MINUS);
+ create_vec_fn (ctxt, "jit_v4f_mult",
+ v4f_type, GCC_JIT_BINARY_OP_MULT);
+ create_vec_fn (ctxt, "jit_v4f_div",
+ v4f_type, GCC_JIT_BINARY_OP_DIVIDE);
+}
+
+template <typename T>
+void
+check_add (const T &a, const T &b, const T &c)
+{
+ for (int i = 0; i < 4; i++)
+ CHECK_VALUE (c[i], a[i] + b[i]);
+}
+
+template <typename T>
+void
+check_sub (const T &a, const T &b, const T &c)
+{
+ for (int i = 0; i < 4; i++)
+ CHECK_VALUE (c[i], a[i] - b[i]);
+}
+
+template <typename T>
+void
+check_mult (const T &a, const T &b, const T &c)
+{
+ for (int i = 0; i < 4; i++)
+ CHECK_VALUE (c[i], a[i] * b[i]);
+}
+
+template <typename T>
+void
+check_div (const T &a, const T &b, const T &c)
+{
+ for (int i = 0; i < 4; i++)
+ CHECK_VALUE (c[i], a[i] / b[i]);
+}
+
+template <typename T>
+void
+verify_vec_code (gcc_jit_context *ctxt, gcc_jit_result *result,
+ const char *fnname,
+ void (*check_cb) (const T &a, const T &b, const T &c))
+{
+ typedef void (*binop_type) (const T *a, const T *b, T *c);
+ CHECK_NON_NULL (result);
+ binop_type fn =
+ (binop_type)gcc_jit_result_get_code (result, fnname);
+ CHECK_NON_NULL (fn);
+
+ T a, b, c;
+
+ /* Init. */
+ for (int i = 0; i < 4; i++)
+ {
+ a[i] = i + 5;
+ b[i] = (i + 4) * 3;
+ }
+
+ /* Run jit-compiled code and verify result. */
+ fn (&a, &b, &c);
+ check_cb (a, b, c);
+}
+
+void
+verify_code (gcc_jit_context *ctxt, gcc_jit_result *result)
+{
+ verify_vec_code<v4si> (ctxt, result, "jit_v4si_add", check_add);
+ verify_vec_code<v4si> (ctxt, result, "jit_v4si_sub", check_sub);
+ verify_vec_code<v4si> (ctxt, result, "jit_v4si_mult", check_mult);
+ verify_vec_code<v4si> (ctxt, result, "jit_v4si_div", check_div);
+
+ verify_vec_code<v4ui> (ctxt, result, "jit_v4ui_add", check_add);
+ verify_vec_code<v4ui> (ctxt, result, "jit_v4ui_sub", check_sub);
+ verify_vec_code<v4ui> (ctxt, result, "jit_v4ui_mult", check_mult);
+ verify_vec_code<v4ui> (ctxt, result, "jit_v4ui_div", check_div);
+
+ verify_vec_code<v4f> (ctxt, result, "jit_v4f_add", check_add);
+ verify_vec_code<v4f> (ctxt, result, "jit_v4f_sub", check_sub);
+ verify_vec_code<v4f> (ctxt, result, "jit_v4f_mult", check_mult);
+ verify_vec_code<v4f> (ctxt, result, "jit_v4f_div", check_div);
+}
diff --git a/gcc/testsuite/objc.dg/proto-lossage-4.m b/gcc/testsuite/objc.dg/proto-lossage-4.m
index e72328b3703..c9c80b7c427 100644
--- a/gcc/testsuite/objc.dg/proto-lossage-4.m
+++ b/gcc/testsuite/objc.dg/proto-lossage-4.m
@@ -28,13 +28,13 @@ long foo(void) {
receiver += [receiver anotherValue]; /* { dg-warning "invalid receiver type .intptr_t." } */
receiver += [(Obj *)receiver someValue]; /* { dg-warning ".Obj. may not respond to .\\-someValue." } */
-/* { dg-warning "assignment makes integer from pointer without a cast" "" { target *-*-* } .-1 } */
+/* { dg-warning "assignment to 'intptr_t {aka (long )?int}' from 'id' makes integer from pointer without a cast" "" { target *-*-* } .-1 } */
receiver += [(Obj *)receiver anotherValue];
receiver += [(Obj <Proto> *)receiver someValue];
receiver += [(Obj <Proto> *)receiver anotherValue];
receiver += [objrcvr someValue]; /* { dg-warning ".Obj. may not respond to .\\-someValue." } */
-/* { dg-warning "assignment makes integer from pointer without a cast" "" { target *-*-* } .-1 } */
+/* { dg-warning "assignment to 'intptr_t {aka (long )?int}' from 'id' makes integer from pointer without a cast" "" { target *-*-* } .-1 } */
receiver += [objrcvr anotherValue];
receiver += [(Obj <Proto> *)objrcvr someValue];
@@ -42,7 +42,7 @@ long foo(void) {
receiver += [objrcvr2 someValue];
receiver += [objrcvr2 anotherValue];
receiver += [(Obj *)objrcvr2 someValue]; /* { dg-warning ".Obj. may not respond to .\\-someValue." } */
-/* { dg-warning "assignment makes integer from pointer without a cast" "" { target *-*-* } .-1 } */
+/* { dg-warning "assignment to 'intptr_t {aka (long )?int}' from 'id' makes integer from pointer without a cast" "" { target *-*-* } .-1 } */
receiver += [(Obj *)objrcvr2 anotherValue];